@cursor/bdk 0.2.22 → 0.2.23
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/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +10 -5
- package/dist/channels/slack/types.d.ts +7 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.BD1yvHJK.js → app.AXQcJZaf.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.B3j7LFef.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.D25E8cn2.js → VPLocalSearchBox.hlZ2vmun.js} +1 -1
- package/dist/docs/assets/chunks/{arc.1hKM2X5X.js → arc.9KNWdH-l.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.B1jE4xrG.js → architectureDiagram-Q4EWVU46.BfGzkBHI.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.BwPi_maB.js → baseUniq.Btk8-2Rs.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.Cpy78QaZ.js → blockDiagram-DXYQGD6D.BmHm9OH5.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DkCQNehT.js → c4Diagram-AHTNJAMY.9POrbDHJ.js} +1 -1
- package/dist/docs/assets/chunks/channel.RoCpi7X1.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.BuR2bNxe.js → chunk-4BX2VUAB.YWZVSM6S.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C24IlKyd.js → chunk-4TB4RGXK.Cxr_SFgw.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.CRD5fIjA.js → chunk-55IACEB6.DtiJyPlD.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.gKhxQpy2.js → chunk-EDXVE4YY.b5gNHJPH.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DPlyJIaG.js → chunk-FMBD7UC4.DmN9yA_M.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.DfDSVvIq.js → chunk-OYMX7WX6.Dfm3xgV5.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CsA80Wio.js → chunk-QZHKN3VN.sXNxDcJA.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BtXaaMC_.js → chunk-YZCP3GAM.DgBnDUV7.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.oxdmwwqk.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.oxdmwwqk.js +1 -0
- package/dist/docs/assets/chunks/clone.BkguoIMm.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.Bw9v-Pfp.js → cose-bilkent-S5V4N54A.D18MEcoN.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.Wc53s510.js → dagre-KV5264BT.CSf3tihh.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DxJJrlh5.js → diagram-5BDNPKRD.cbfzAfoC.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Ldxa4MKP.js → diagram-G4DWMVQ6.6i6P3uu9.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.D30RWuU-.js → diagram-MMDJMWI5.B9HAIfN6.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.BuJ0aD65.js → diagram-TYMM5635.B9baAjUv.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.2N-5dVK2.js → erDiagram-SMLLAGMA.DaBmX_GN.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.B_te6Lre.js → flowDiagram-DWJPFMVM.CJqQJjkb.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CuNbn0Wd.js → ganttDiagram-T4ZO3ILL.CIXBLQhC.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.C1uOicx6.js → gitGraphDiagram-UUTBAWPF.CDgentto.js} +1 -1
- package/dist/docs/assets/chunks/{graph.lSlSs4kh.js → graph.BWHn6JBQ.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.Cw_LmsnD.js → infoDiagram-42DDH7IO.d9VU_ts_.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DikoN3ai.js → ishikawaDiagram-UXIWVN3A.BNO79Prj.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.buwzIgeY.js → journeyDiagram-VCZTEJTY.CPgUTM1R.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.yacNqa4l.js → kanban-definition-6JOO6SKY.idl0Eoe1.js} +1 -1
- package/dist/docs/assets/chunks/{layout.CPlTUhtI.js → layout.BY7DIMr6.js} +1 -1
- package/dist/docs/assets/chunks/{linear.BpHFbx_2.js → linear.DYaUDrHd.js} +1 -1
- package/dist/docs/assets/chunks/{min.B_dSxH85.js → min.V6MWb1UC.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BO5-vmxy.js → mindmap-definition-QFDTVHPH.BRlJXuFS.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Bwj1Zq54.js → pieDiagram-DEJITSTG.BIhkDLcB.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.D5dcUqJC.js → quadrantDiagram-34T5L4WZ.Bw-_VEL3.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CCP5yuT4.js → requirementDiagram-MS252O5E.DolEGwxw.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.BWAu-_Jq.js → sankeyDiagram-XADWPNL6.hMM-8BhN.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.w545hYyz.js → sequenceDiagram-FGHM5R23.Bg_CRVDy.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.CxcpDNk2.js → stateDiagram-FHFEXIEX.DNWdl34_.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.7W-btjJ2.js +1 -0
- package/dist/docs/assets/chunks/{theme.DSJaK7i1.js → theme.CBW1oolh.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.2WxkfxRf.js → timeline-definition-GMOUNBTQ.Cr1wJ1mB.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BGZwcK-Z.js → vennDiagram-DHZGUBPP.BltDV9j7.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.BtotXz_c.js → wardley-RL74JXVD.BWPaUhOs.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.oryRmynQ.js → wardleyDiagram-NUSXRM2D.nsADqCCo.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.Bq7gMvIU.js → xychartDiagram-5P7HB3ND.CCwbO3dK.js} +1 -1
- package/dist/docs/assets/guides_migrate.md.CQlGaBKX.js +7 -0
- package/dist/docs/assets/{guides_migrate.md.DZBL7dqT.lean.js → guides_migrate.md.CQlGaBKX.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Bkrsce22.js → reference_cli.md.DB7Llw3T.js} +3 -3
- package/dist/docs/assets/{reference_cli.md.Bkrsce22.lean.js → reference_cli.md.DB7Llw3T.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.03Ryy9ca.js → reference_schedules.md.BqWnJES4.js} +3 -3
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +35 -35
- package/dist/docs/guides/agent-to-agent.html +35 -35
- package/dist/docs/guides/bitbucket.html +35 -35
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/export-grokbot.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/migrate.html +38 -38
- package/dist/docs/guides/migrate.md +46 -4
- package/dist/docs/guides/opentelemetry.html +35 -35
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/llms-full.txt +62 -9
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +35 -35
- package/dist/docs/reference/artifacts.html +35 -35
- package/dist/docs/reference/channels.html +35 -35
- package/dist/docs/reference/cli.html +39 -39
- package/dist/docs/reference/cli.md +16 -5
- package/dist/docs/reference/connections.html +35 -35
- package/dist/docs/reference/evals.html +35 -35
- package/dist/docs/reference/extensions.html +35 -35
- package/dist/docs/reference/hooks.html +35 -35
- package/dist/docs/reference/http-api.html +35 -35
- package/dist/docs/reference/instructions.html +35 -35
- package/dist/docs/reference/memory.html +35 -35
- package/dist/docs/reference/playground.html +35 -35
- package/dist/docs/reference/project-layout.html +35 -35
- package/dist/docs/reference/prompt.html +35 -35
- package/dist/docs/reference/schedules.html +38 -38
- package/dist/docs/reference/sessions.html +35 -35
- package/dist/docs/reference/skills.html +35 -35
- package/dist/docs/reference/subagents.html +35 -35
- package/dist/docs/reference/tools.html +35 -35
- package/dist/docs/templates/agentic-owners.html +35 -35
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/internal/cli-deploy.d.ts +3 -3
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +63 -21
- package/dist/internal/cli-migrate.d.ts.map +1 -1
- package/dist/internal/cli-migrate.js +227 -12
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +56 -3
- package/dist/internal/deploy-client.d.ts +7 -0
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +15 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +6 -2
- package/dist/internal/slack-provision-client.d.ts +1 -0
- package/dist/internal/slack-provision-client.d.ts.map +1 -1
- package/dist/playground/assets/index-BtsbIqV9.css +1 -0
- package/dist/playground/assets/index-CD8VRa25.js +71 -0
- package/dist/playground/index.html +2 -2
- package/docs/guides/migrate.md +46 -4
- package/docs/reference/cli.md +16 -5
- package/package.json +3 -3
- package/skills/migrate-v2/SKILL.md +140 -11
- package/dist/docs/assets/chunks/@localSearchIndexroot.DLNj_nNf.js +0 -1
- package/dist/docs/assets/chunks/channel.DRdmGkBC.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CAGM3Q8f.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CAGM3Q8f.js +0 -1
- package/dist/docs/assets/chunks/clone.DjA1k4gh.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CjwS--3R.js +0 -1
- package/dist/docs/assets/guides_migrate.md.DZBL7dqT.js +0 -7
- package/dist/playground/assets/index-CzV_Cybi.css +0 -1
- package/dist/playground/assets/index-XXYKgdQn.js +0 -71
- /package/dist/docs/assets/{reference_schedules.md.03Ryy9ca.lean.js → reference_schedules.md.BqWnJES4.lean.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function Qj(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 Pc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jj(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 sb={exports:{}},zu={};var xw;function ez(){if(xw)return zu;xw=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 zu.Fragment=t,zu.jsx=n,zu.jsxs=n,zu}var kw;function tz(){return kw||(kw=1,sb.exports=ez()),sb.exports}var g=tz(),ob={exports:{}},Et={};var Sw;function nz(){if(Sw)return Et;Sw=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"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(F){return F===null||typeof F!="object"?null:(F=b&&F[b]||F["@@iterator"],typeof F=="function"?F:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,T={};function C(F,G,L){this.props=F,this.context=G,this.refs=T,this.updater=L||S}C.prototype.isReactComponent={},C.prototype.setState=function(F,G){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,G,"setState")},C.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function E(){}E.prototype=C.prototype;function R(F,G,L){this.props=F,this.context=G,this.refs=T,this.updater=L||S}var _=R.prototype=new E;_.constructor=R,k(_,C.prototype),_.isPureReactComponent=!0;var D=Array.isArray;function A(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(F,G,L){var X=L.ref;return{$$typeof:e,type:F,key:G,ref:X!==void 0?X:null,props:L}}function I(F,G){return $(F.type,G,F.props)}function V(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var G={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(L){return G[L]})}var z=/\/+/g;function j(F,G){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):G.toString(36)}function H(F){switch(F.status){case"fulfilled":return F.value;case"rejected":throw F.reason;default:switch(typeof F.status=="string"?F.then(A,A):(F.status="pending",F.then(function(G){F.status==="pending"&&(F.status="fulfilled",F.value=G)},function(G){F.status==="pending"&&(F.status="rejected",F.reason=G)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function q(F,G,L,X,te){var J=typeof F;(J==="undefined"||J==="boolean")&&(F=null);var le=!1;if(F===null)le=!0;else switch(J){case"bigint":case"string":case"number":le=!0;break;case"object":switch(F.$$typeof){case e:case t:le=!0;break;case h:return le=F._init,q(le(F._payload),G,L,X,te)}}if(le)return te=te(F),le=X===""?"."+j(F,0):X,D(te)?(L="",le!=null&&(L=le.replace(z,"$&/")+"/"),q(te,G,L,"",function(xe){return xe})):te!=null&&(V(te)&&(te=I(te,L+(te.key==null||F&&F.key===te.key?"":(""+te.key).replace(z,"$&/")+"/")+le)),G.push(te)),1;le=0;var oe=X===""?".":X+":";if(D(F))for(var ue=0;ue<F.length;ue++)X=F[ue],J=oe+j(X,ue),le+=q(X,G,L,J,te);else if(ue=y(F),typeof ue=="function")for(F=ue.call(F),ue=0;!(X=F.next()).done;)X=X.value,J=oe+j(X,ue++),le+=q(X,G,L,J,te);else if(J==="object"){if(typeof F.then=="function")return q(H(F),G,L,X,te);throw G=String(F),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return le}function K(F,G,L){if(F==null)return F;var X=[],te=0;return q(F,X,"","",function(J){return G.call(L,J,te++)}),X}function U(F){if(F._status===-1){var G=F._result;G=G(),G.then(function(L){(F._status===0||F._status===-1)&&(F._status=1,F._result=L)},function(L){(F._status===0||F._status===-1)&&(F._status=2,F._result=L)}),F._status===-1&&(F._status=0,F._result=G)}if(F._status===1)return F._result.default;throw F._result}var Y=typeof reportError=="function"?reportError:function(F){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof F=="object"&&F!==null&&typeof F.message=="string"?String(F.message):String(F),error:F});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",F);return}console.error(F)},O={map:K,forEach:function(F,G,L){K(F,function(){G.apply(this,arguments)},L)},count:function(F){var G=0;return K(F,function(){G++}),G},toArray:function(F){return K(F,function(G){return G})||[]},only:function(F){if(!V(F))throw Error("React.Children.only expected to receive a single React element child.");return F}};return Et.Activity=m,Et.Children=O,Et.Component=C,Et.Fragment=n,Et.Profiler=s,Et.PureComponent=R,Et.StrictMode=r,Et.Suspense=f,Et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,Et.__COMPILER_RUNTIME={__proto__:null,c:function(F){return N.H.useMemoCache(F)}},Et.cache=function(F){return function(){return F.apply(null,arguments)}},Et.cacheSignal=function(){return null},Et.cloneElement=function(F,G,L){if(F==null)throw Error("The argument must be a React element, but you passed "+F+".");var X=k({},F.props),te=F.key;if(G!=null)for(J in G.key!==void 0&&(te=""+G.key),G)!P.call(G,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&G.ref===void 0||(X[J]=G[J]);var J=arguments.length-2;if(J===1)X.children=L;else if(1<J){for(var le=Array(J),oe=0;oe<J;oe++)le[oe]=arguments[oe+2];X.children=le}return $(F.type,te,X)},Et.createContext=function(F){return F={$$typeof:l,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null},F.Provider=F,F.Consumer={$$typeof:a,_context:F},F},Et.createElement=function(F,G,L){var X,te={},J=null;if(G!=null)for(X in G.key!==void 0&&(J=""+G.key),G)P.call(G,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(te[X]=G[X]);var le=arguments.length-2;if(le===1)te.children=L;else if(1<le){for(var oe=Array(le),ue=0;ue<le;ue++)oe[ue]=arguments[ue+2];te.children=oe}if(F&&F.defaultProps)for(X in le=F.defaultProps,le)te[X]===void 0&&(te[X]=le[X]);return $(F,J,te)},Et.createRef=function(){return{current:null}},Et.forwardRef=function(F){return{$$typeof:c,render:F}},Et.isValidElement=V,Et.lazy=function(F){return{$$typeof:h,_payload:{_status:-1,_result:F},_init:U}},Et.memo=function(F,G){return{$$typeof:d,type:F,compare:G===void 0?null:G}},Et.startTransition=function(F){var G=N.T,L={};N.T=L;try{var X=F(),te=N.S;te!==null&&te(L,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(A,Y)}catch(J){Y(J)}finally{G!==null&&L.types!==null&&(G.types=L.types),N.T=G}},Et.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},Et.use=function(F){return N.H.use(F)},Et.useActionState=function(F,G,L){return N.H.useActionState(F,G,L)},Et.useCallback=function(F,G){return N.H.useCallback(F,G)},Et.useContext=function(F){return N.H.useContext(F)},Et.useDebugValue=function(){},Et.useDeferredValue=function(F,G){return N.H.useDeferredValue(F,G)},Et.useEffect=function(F,G){return N.H.useEffect(F,G)},Et.useEffectEvent=function(F){return N.H.useEffectEvent(F)},Et.useId=function(){return N.H.useId()},Et.useImperativeHandle=function(F,G,L){return N.H.useImperativeHandle(F,G,L)},Et.useInsertionEffect=function(F,G){return N.H.useInsertionEffect(F,G)},Et.useLayoutEffect=function(F,G){return N.H.useLayoutEffect(F,G)},Et.useMemo=function(F,G){return N.H.useMemo(F,G)},Et.useOptimistic=function(F,G){return N.H.useOptimistic(F,G)},Et.useReducer=function(F,G,L){return N.H.useReducer(F,G,L)},Et.useRef=function(F){return N.H.useRef(F)},Et.useState=function(F){return N.H.useState(F)},Et.useSyncExternalStore=function(F,G,L){return N.H.useSyncExternalStore(F,G,L)},Et.useTransition=function(){return N.H.useTransition()},Et.version="19.2.6",Et}var ww;function $c(){return ww||(ww=1,ob.exports=nz()),ob.exports}var v=$c();const tc=Pc(v),Vv=Qj({__proto__:null,default:tc},[v]);var ab={exports:{}},Pu={},lb={exports:{}},ub={};var Ew;function rz(){return Ew||(Ew=1,(function(e){function t(q,K){var U=q.length;q.push(K);e:for(;0<U;){var Y=U-1>>>1,O=q[Y];if(0<s(O,K))q[Y]=K,q[U]=O,U=Y;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var K=q[0],U=q.pop();if(U!==K){q[0]=U;e:for(var Y=0,O=q.length,F=O>>>1;Y<F;){var G=2*(Y+1)-1,L=q[G],X=G+1,te=q[X];if(0>s(L,U))X<O&&0>s(te,L)?(q[Y]=te,q[X]=U,Y=X):(q[Y]=L,q[G]=U,Y=G);else if(X<O&&0>s(te,U))q[Y]=te,q[X]=U,Y=X;else break e}}return K}function s(q,K){var U=q.sortIndex-K.sortIndex;return U!==0?U:q.id-K.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 f=[],d=[],h=1,m=null,b=3,y=!1,S=!1,k=!1,T=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(q){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=q)r(d),K.sortIndex=K.expirationTime,t(f,K);else break;K=n(d)}}function D(q){if(k=!1,_(q),!S)if(n(f)!==null)S=!0,A||(A=!0,B());else{var K=n(d);K!==null&&H(D,K.startTime-q)}}var A=!1,N=-1,P=5,$=-1;function I(){return T?!0:!(e.unstable_now()-$<P)}function V(){if(T=!1,A){var q=e.unstable_now();$=q;var K=!0;try{e:{S=!1,k&&(k=!1,E(N),N=-1),y=!0;var U=b;try{t:{for(_(q),m=n(f);m!==null&&!(m.expirationTime>q&&I());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,b=m.priorityLevel;var O=Y(m.expirationTime<=q);if(q=e.unstable_now(),typeof O=="function"){m.callback=O,_(q),K=!0;break t}m===n(f)&&r(f),_(q)}else r(f);m=n(f)}if(m!==null)K=!0;else{var F=n(d);F!==null&&H(D,F.startTime-q),K=!1}}break e}finally{m=null,b=U,y=!1}K=void 0}}finally{K?B():A=!1}}}var B;if(typeof R=="function")B=function(){R(V)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,j=z.port2;z.port1.onmessage=V,B=function(){j.postMessage(null)}}else B=function(){C(V,0)};function H(q,K){N=C(function(){q(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var U=b;b=K;try{return q()}finally{b=U}},e.unstable_requestPaint=function(){T=!0},e.unstable_runWithPriority=function(q,K){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var U=b;b=q;try{return K()}finally{b=U}},e.unstable_scheduleCallback=function(q,K,U){var Y=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Y+U:Y):U=Y,q){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=U+O,q={id:h++,callback:K,priorityLevel:q,startTime:U,expirationTime:O,sortIndex:-1},U>Y?(q.sortIndex=U,t(d,q),n(f)===null&&q===n(d)&&(k?(E(N),N=-1):k=!0,H(D,U-Y))):(q.sortIndex=O,t(f,q),S||y||(S=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(q){var K=b;return function(){var U=b;b=K;try{return q.apply(this,arguments)}finally{b=U}}}})(ub)),ub}var Tw;function iz(){return Tw||(Tw=1,lb.exports=rz()),lb.exports}var cb={exports:{}},ur={};var Cw;function sz(){if(Cw)return ur;Cw=1;var e=$c();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" 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(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return ur.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ur.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return a(f,d,null,h)},ur.flushSync=function(f){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=h,r.d.f()}},ur.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},ur.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},ur.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(f,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},ur.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},ur.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);r.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},ur.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},ur.requestFormReset=function(f){r.d.r(f)},ur.unstable_batchedUpdates=function(f,d){return f(d)},ur.useFormState=function(f,d,h){return l.H.useFormState(f,d,h)},ur.useFormStatus=function(){return l.H.useHostTransitionStatus()},ur.version="19.2.6",ur}var Rw;function u_(){if(Rw)return cb.exports;Rw=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(),cb.exports=sz(),cb.exports}var _w;function oz(){if(_w)return Pu;_w=1;var e=iz(),t=$c(),n=u_();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 f(i){if(a(i)!==i)throw Error(r(188))}function d(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 f(x),i;if(w===p)return f(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var M=!1,W=x.child;W;){if(W===u){M=!0,u=x,p=w;break}if(W===p){M=!0,p=x,u=w;break}W=W.sibling}if(!M){for(W=w.child;W;){if(W===u){M=!0,u=w,p=x;break}if(W===p){M=!0,p=w,u=x;break}W=W.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"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var z=Symbol.for("react.client.reference");function j(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===z?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case k:return"Fragment";case C:return"Profiler";case T:return"StrictMode";case D:return"Suspense";case A:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case R:return i.displayName||"Context";case E: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 N:return o=i.displayName||null,o!==null?o:j(i.type)||"Memo";case P:o=i._payload,i=i._init;try{return j(i(o))}catch{}}return null}var H=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},Y=[],O=-1;function F(i){return{current:i}}function G(i){0>O||(i.current=Y[O],Y[O]=null,O--)}function L(i,o){O++,Y[O]=i.current,i.current=o}var X=F(null),te=F(null),J=F(null),le=F(null);function oe(i,o){switch(L(J,o),L(te,i),L(X,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?HS(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=HS(o),i=qS(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(X),L(X,i)}function ue(){G(X),G(te),G(J)}function xe(i){i.memoizedState!==null&&L(le,i);var o=X.current,u=qS(o,i.type);o!==u&&(L(te,i),L(X,u))}function ye(i){te.current===i&&(G(X),G(te)),le.current===i&&(G(le),Mu._currentValue=U)}var pe,me;function ke(i){if(pe===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);pe=o&&o[1]||"",me=-1<u.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+pe+i+me}var Se=!1;function Te(i,o){if(!i||Se)return"";Se=!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(ge){var he=ge}Reflect.construct(i,[],Ae)}else{try{Ae.call()}catch(ge){he=ge}i.call(Ae.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Ae=i())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.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],W=w[1];if(M&&W){var ne=M.split(`
|
|
4
|
+
`),fe=W.split(`
|
|
5
|
+
`);for(x=p=0;p<ne.length&&!ne[p].includes("DetermineComponentFrameRoot");)p++;for(;x<fe.length&&!fe[x].includes("DetermineComponentFrameRoot");)x++;if(p===ne.length||x===fe.length)for(p=ne.length-1,x=fe.length-1;1<=p&&0<=x&&ne[p]!==fe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(ne[p]!==fe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||ne[p]!==fe[x]){var we=`
|
|
6
|
+
`+ne[p].replace(" at new "," at ");return i.displayName&&we.includes("<anonymous>")&&(we=we.replace("<anonymous>",i.displayName)),we}while(1<=p&&0<=x);break}}}finally{Se=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?ke(u):""}function ve(i,o){switch(i.tag){case 26:case 27:case 5:return ke(i.type);case 16:return ke("Lazy");case 13:return i.child!==o&&o!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Te(i.type,!1);case 11:return Te(i.type.render,!1);case 1:return Te(i.type,!0);case 31:return ke("Activity");default:return""}}function Ie(i){try{var o="",u=null;do o+=ve(i,u),u=i,i=i.return;while(i);return o}catch(p){return`
|
|
7
|
+
Error generating stack: `+p.message+`
|
|
8
|
+
`+p.stack}}var _e=Object.prototype.hasOwnProperty,je=e.unstable_scheduleCallback,We=e.unstable_cancelCallback,Ce=e.unstable_shouldYield,$e=e.unstable_requestPaint,se=e.unstable_now,Ee=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,ee=e.unstable_UserBlockingPriority,be=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,at=e.log,ft=e.unstable_setDisableYieldValue,nt=null,vt=null;function St(i){if(typeof at=="function"&&ft(i),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(nt,i)}catch{}}var et=Math.clz32?Math.clz32:pt,Qe=Math.log,Pe=Math.LN2;function pt(i){return i>>>=0,i===0?32:31-(Qe(i)/Pe|0)|0}var lt=256,ut=262144,Ge=4194304;function Ze(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 Z(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 W=p&134217727;return W!==0?(p=W&~w,p!==0?x=Ze(p):(M&=W,M!==0?x=Ze(M):u||(u=W&~i,u!==0&&(x=Ze(u))))):(W=p&~w,W!==0?x=Ze(W):M!==0?x=Ze(M):u||(u=p&~i,u!==0&&(x=Ze(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 de(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Oe(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 Xe(){var i=Ge;return Ge<<=1,(Ge&62914560)===0&&(Ge=4194304),i}function Ct(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function kt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function He(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 W=i.entanglements,ne=i.expirationTimes,fe=i.hiddenUpdates;for(u=M&~u;0<u;){var we=31-et(u),Ae=1<<we;W[we]=0,ne[we]=-1;var he=fe[we];if(he!==null)for(fe[we]=null,we=0;we<he.length;we++){var ge=he[we];ge!==null&&(ge.lane&=-536870913)}u&=~Ae}p!==0&&Fe(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(M&~o))}function Fe(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-et(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Le(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-et(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function Me(i,o){var u=o&-o;return u=(u&42)!==0?1:st(u),(u&(i.suspendedLanes|o))!==0?0:u}function st(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 _t(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function gn(){var i=K.p;return i!==0?i:(i=window.event,i===void 0?32:pw(i.type))}function bn(i,o){var u=K.p;try{return K.p=i,o()}finally{K.p=u}}var tt=Math.random().toString(36).slice(2),Ut="__reactFiber$"+tt,ot="__reactProps$"+tt,Sn="__reactContainer$"+tt,Jn="__reactEvents$"+tt,ar="__reactListeners$"+tt,Xn="__reactHandles$"+tt,yn="__reactResources$"+tt,Fr="__reactMarker$"+tt;function Li(i){delete i[Ut],delete i[ot],delete i[Jn],delete i[ar],delete i[Xn]}function $n(i){var o=i[Ut];if(o)return o;for(var u=i.parentNode;u;){if(o=u[Sn]||u[Ut]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=ZS(i);i!==null;){if(u=i[Ut])return u;i=ZS(i)}return o}i=u,u=i.parentNode}return null}function vr(i){if(i=i[Ut]||i[Sn]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function zs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Ps(i){var o=i[yn];return o||(o=i[yn]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Fn(i){i[Fr]=!0}var uf=new Set,Oo={};function Zi(i,o){De(i,o),De(i+"Capture",o)}function De(i,o){for(Oo[i]=o,i=0;i<o.length;i++)uf.add(o[i])}var ct=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]*$"),Mt={},Jt={};function Dn(i){return _e.call(Jt,i)?!0:_e.call(Mt,i)?!1:ct.test(i)?Jt[i]=!0:(Mt[i]=!0,!1)}function lr(i,o,u){if(Dn(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 Br(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 Rr(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 vn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ur(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function cf(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 ka(i){if(!i._valueTracker){var o=Ur(i)?"checked":"value";i._valueTracker=cf(i,o,""+i[o])}}function Gl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=Ur(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Sa(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 im=/[\n"\\]/g;function _r(i){return i.replace(im,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Wl(i,o,u,p,x,w,M,W){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=""+vn(o)):i.value!==""+vn(o)&&(i.value=""+vn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?wa(i,M,vn(o)):u!=null?wa(i,M,vn(u)):p!=null&&i.removeAttribute("value"),x==null&&w!=null&&(i.defaultChecked=!!w),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?i.name=""+vn(W):i.removeAttribute("name")}function Io(i,o,u,p,x,w,M,W){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)){ka(i);return}u=u!=null?""+vn(u):"",o=o!=null?""+vn(o):u,W||o===i.value||(i.value=o),i.defaultValue=o}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=W?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),ka(i)}function wa(i,o,u){o==="number"&&Sa(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function er(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=""+vn(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 ff(i,o,u){if(o!=null&&(o=""+vn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+vn(u):""}function Ea(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(H(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=vn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),ka(i)}function xt(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var df=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 Bn(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||df.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function en(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&&Bn(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&Bn(i,w,o[w])}function $s(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"]]),Kl=/^[\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 Fs(i){return Kl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ue(){}var rt=null;function Tt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var $t=null,Rn=null;function ni(i){var o=vr(i);if(o&&(i=o.stateNode)){var u=i[ot]||null;e:switch(i=o.stateNode,o.type){case"input":if(Wl(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="'+_r(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[ot]||null;if(!x)throw Error(r(90));Wl(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&&Gl(p)}break e;case"textarea":ff(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&er(i,!!u.multiple,o,!1)}}}var Yl=!1;function pf(i,o,u){if(Yl)return i(o,u);Yl=!0;try{var p=i(o);return p}finally{if(Yl=!1,($t!==null||Rn!==null)&&(ed(),$t&&(o=$t,i=Rn,Rn=$t=null,ni(o),i)))for(o=0;o<i.length;o++)ni(i[o])}}function Xl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[ot]||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"),sm=!1;if(Ji)try{var Zl={};Object.defineProperty(Zl,"passive",{get:function(){sm=!0}}),window.addEventListener("test",Zl,Zl),window.removeEventListener("test",Zl,Zl)}catch{sm=!1}var Bs=null,om=null,hf=null;function qx(){if(hf)return hf;var i,o=om,u=o.length,p,x="value"in Bs?Bs.value:Bs.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 hf=x.slice(i,1<p?1-p:void 0)}function mf(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 gf(){return!0}function Vx(){return!1}function Ar(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 W in i)i.hasOwnProperty(W)&&(u=i[W],this[W]=u?u(w):w[W]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?gf:Vx,this.isPropagationStopped=Vx,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=gf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=gf)},persist:function(){},isPersistent:gf}),o}var Mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bf=Ar(Mo),Ql=m({},Mo,{view:0,detail:0}),XD=Ar(Ql),am,lm,Jl,yf=m({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cm,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!==Jl&&(Jl&&i.type==="mousemove"?(am=i.screenX-Jl.screenX,lm=i.screenY-Jl.screenY):lm=am=0,Jl=i),am)},movementY:function(i){return"movementY"in i?i.movementY:lm}}),Gx=Ar(yf),ZD=m({},yf,{dataTransfer:0}),QD=Ar(ZD),JD=m({},Ql,{relatedTarget:0}),um=Ar(JD),eL=m({},Mo,{animationName:0,elapsedTime:0,pseudoElement:0}),tL=Ar(eL),nL=m({},Mo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),rL=Ar(nL),iL=m({},Mo,{data:0}),Wx=Ar(iL),sL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oL={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"},aL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lL(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=aL[i])?!!o[i]:!1}function cm(){return lL}var uL=m({},Ql,{key:function(i){if(i.key){var o=sL[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=mf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?oL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cm,charCode:function(i){return i.type==="keypress"?mf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?mf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),cL=Ar(uL),fL=m({},yf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kx=Ar(fL),dL=m({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cm}),pL=Ar(dL),hL=m({},Mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),mL=Ar(hL),gL=m({},yf,{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}),bL=Ar(gL),yL=m({},Mo,{newState:0,oldState:0}),vL=Ar(yL),xL=[9,13,27,32],fm=Ji&&"CompositionEvent"in window,eu=null;Ji&&"documentMode"in document&&(eu=document.documentMode);var kL=Ji&&"TextEvent"in window&&!eu,Yx=Ji&&(!fm||eu&&8<eu&&11>=eu),Xx=" ",Zx=!1;function Qx(i,o){switch(i){case"keyup":return xL.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jx(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ta=!1;function SL(i,o){switch(i){case"compositionend":return Jx(o);case"keypress":return o.which!==32?null:(Zx=!0,Xx);case"textInput":return i=o.data,i===Xx&&Zx?null:i;default:return null}}function wL(i,o){if(Ta)return i==="compositionend"||!fm&&Qx(i,o)?(i=qx(),hf=om=Bs=null,Ta=!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 Yx&&o.locale!=="ko"?null:o.data;default:return null}}var EL={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 ek(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!EL[i.type]:o==="textarea"}function tk(i,o,u,p){$t?Rn?Rn.push(p):Rn=[p]:$t=p,o=ad(o,"onChange"),0<o.length&&(u=new bf("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var tu=null,nu=null;function TL(i){zS(i,0)}function vf(i){var o=zs(i);if(Gl(o))return i}function nk(i,o){if(i==="change")return o}var rk=!1;if(Ji){var dm;if(Ji){var pm="oninput"in document;if(!pm){var ik=document.createElement("div");ik.setAttribute("oninput","return;"),pm=typeof ik.oninput=="function"}dm=pm}else dm=!1;rk=dm&&(!document.documentMode||9<document.documentMode)}function sk(){tu&&(tu.detachEvent("onpropertychange",ok),nu=tu=null)}function ok(i){if(i.propertyName==="value"&&vf(nu)){var o=[];tk(o,nu,i,Tt(i)),pf(TL,o)}}function CL(i,o,u){i==="focusin"?(sk(),tu=o,nu=u,tu.attachEvent("onpropertychange",ok)):i==="focusout"&&sk()}function RL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return vf(nu)}function _L(i,o){if(i==="click")return vf(o)}function AL(i,o){if(i==="input"||i==="change")return vf(o)}function NL(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Hr=typeof Object.is=="function"?Object.is:NL;function ru(i,o){if(Hr(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(!_e.call(o,x)||!Hr(i[x],o[x]))return!1}return!0}function ak(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function lk(i,o){var u=ak(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=ak(u)}}function uk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?uk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function ck(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Sa(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=Sa(i.document)}return o}function hm(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 OL=Ji&&"documentMode"in document&&11>=document.documentMode,Ca=null,mm=null,iu=null,gm=!1;function fk(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;gm||Ca==null||Ca!==Sa(p)||(p=Ca,"selectionStart"in p&&hm(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}),iu&&ru(iu,p)||(iu=p,p=ad(mm,"onSelect"),0<p.length&&(o=new bf("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Ca)))}function Do(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Ra={animationend:Do("Animation","AnimationEnd"),animationiteration:Do("Animation","AnimationIteration"),animationstart:Do("Animation","AnimationStart"),transitionrun:Do("Transition","TransitionRun"),transitionstart:Do("Transition","TransitionStart"),transitioncancel:Do("Transition","TransitionCancel"),transitionend:Do("Transition","TransitionEnd")},bm={},dk={};Ji&&(dk=document.createElement("div").style,"AnimationEvent"in window||(delete Ra.animationend.animation,delete Ra.animationiteration.animation,delete Ra.animationstart.animation),"TransitionEvent"in window||delete Ra.transitionend.transition);function Lo(i){if(bm[i])return bm[i];if(!Ra[i])return i;var o=Ra[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in dk)return bm[i]=o[u];return i}var pk=Lo("animationend"),hk=Lo("animationiteration"),mk=Lo("animationstart"),IL=Lo("transitionrun"),ML=Lo("transitionstart"),DL=Lo("transitioncancel"),gk=Lo("transitionend"),bk=new Map,ym="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(" ");ym.push("scrollEnd");function xi(i,o){bk.set(i,o),Zi(o,[i])}var xf=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)},ri=[],_a=0,vm=0;function kf(){for(var i=_a,o=vm=_a=0;o<i;){var u=ri[o];ri[o++]=null;var p=ri[o];ri[o++]=null;var x=ri[o];ri[o++]=null;var w=ri[o];if(ri[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&&yk(u,x,w)}}function Sf(i,o,u,p){ri[_a++]=i,ri[_a++]=o,ri[_a++]=u,ri[_a++]=p,vm|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function xm(i,o,u,p){return Sf(i,o,u,p),wf(i)}function jo(i,o){return Sf(i,null,null,o),wf(i)}function yk(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-et(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function wf(i){if(50<Cu)throw Cu=0,Ag=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Aa={};function LL(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 qr(i,o,u,p){return new LL(i,o,u,p)}function km(i){return i=i.prototype,!(!i||!i.isReactComponent)}function es(i,o){var u=i.alternate;return u===null?(u=qr(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 vk(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 Ef(i,o,u,p,x,w){var M=0;if(p=i,typeof i=="function")km(i)&&(M=1);else if(typeof i=="string")M=Fj(i,u,X.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=qr(31,u,o,x),i.elementType=$,i.lanes=w,i;case k:return zo(u.children,x,w,o);case T:M=8,x|=24;break;case C:return i=qr(12,u,o,x|2),i.elementType=C,i.lanes=w,i;case D:return i=qr(13,u,o,x),i.elementType=D,i.lanes=w,i;case A:return i=qr(19,u,o,x),i.elementType=A,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:M=10;break e;case E:M=9;break e;case _:M=11;break e;case N:M=14;break e;case P:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=qr(M,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function zo(i,o,u,p){return i=qr(7,i,p,o),i.lanes=u,i}function Sm(i,o,u){return i=qr(6,i,null,o),i.lanes=u,i}function xk(i){var o=qr(18,null,null,0);return o.stateNode=i,o}function wm(i,o,u){return o=qr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var kk=new WeakMap;function ii(i,o){if(typeof i=="object"&&i!==null){var u=kk.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Ie(o)},kk.set(i,o),o)}return{value:i,source:o,stack:Ie(o)}}var Na=[],Oa=0,Tf=null,su=0,si=[],oi=0,Us=null,ji=1,zi="";function ts(i,o){Na[Oa++]=su,Na[Oa++]=Tf,Tf=i,su=o}function Sk(i,o,u){si[oi++]=ji,si[oi++]=zi,si[oi++]=Us,Us=i;var p=ji;i=zi;var x=32-et(p)-1;p&=~(1<<x),u+=1;var w=32-et(o)+x;if(30<w){var M=x-x%5;w=(p&(1<<M)-1).toString(32),p>>=M,x-=M,ji=1<<32-et(o)+x|u<<x|p,zi=w+i}else ji=1<<w|u<<x|p,zi=i}function Em(i){i.return!==null&&(ts(i,1),Sk(i,1,0))}function Tm(i){for(;i===Tf;)Tf=Na[--Oa],Na[Oa]=null,su=Na[--Oa],Na[Oa]=null;for(;i===Us;)Us=si[--oi],si[oi]=null,zi=si[--oi],si[oi]=null,ji=si[--oi],si[oi]=null}function wk(i,o){si[oi++]=ji,si[oi++]=zi,si[oi++]=Us,ji=o.id,zi=o.overflow,Us=i}var tr=null,wn=null,Ht=!1,Hs=null,ai=!1,Cm=Error(r(519));function qs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ou(ii(o,i)),Cm}function Ek(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[Ut]=i,o[ot]=p,u){case"dialog":jt("cancel",o),jt("close",o);break;case"iframe":case"object":case"embed":jt("load",o);break;case"video":case"audio":for(u=0;u<_u.length;u++)jt(_u[u],o);break;case"source":jt("error",o);break;case"img":case"image":case"link":jt("error",o),jt("load",o);break;case"details":jt("toggle",o);break;case"input":jt("invalid",o),Io(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":jt("invalid",o);break;case"textarea":jt("invalid",o),Ea(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||BS(o.textContent,u)?(p.popover!=null&&(jt("beforetoggle",o),jt("toggle",o)),p.onScroll!=null&&jt("scroll",o),p.onScrollEnd!=null&&jt("scrollend",o),p.onClick!=null&&(o.onclick=Ue),o=!0):o=!1,o||qs(i,!0)}function Tk(i){for(tr=i.return;tr;)switch(tr.tag){case 5:case 31:case 13:ai=!1;return;case 27:case 3:ai=!0;return;default:tr=tr.return}}function Ia(i){if(i!==tr)return!1;if(!Ht)return Tk(i),Ht=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||qg(i.type,i.memoizedProps)),u=!u),u&&wn&&qs(i),Tk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=XS(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));wn=XS(i)}else o===27?(o=wn,io(i.type)?(i=Yg,Yg=null,wn=i):wn=o):wn=tr?ui(i.stateNode.nextSibling):null;return!0}function Po(){wn=tr=null,Ht=!1}function Rm(){var i=Hs;return i!==null&&(Mr===null?Mr=i:Mr.push.apply(Mr,i),Hs=null),i}function ou(i){Hs===null?Hs=[i]:Hs.push(i)}var _m=F(null),$o=null,ns=null;function Vs(i,o,u){L(_m,o._currentValue),o._currentValue=u}function rs(i){i._currentValue=_m.current,G(_m)}function Am(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 Nm(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 W=w;w=x;for(var ne=0;ne<o.length;ne++)if(W.context===o[ne]){w.lanes|=u,W=w.alternate,W!==null&&(W.lanes|=u),Am(w.return,u,i),p||(M=null);break e}w=W.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),Am(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 Ma(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 W=x.type;Hr(x.pendingProps.value,M.value)||(i!==null?i.push(W):i=[W])}}else if(x===le.current){if(M=x.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(Mu):i=[Mu])}x=x.return}i!==null&&Nm(o,i,u,p),o.flags|=262144}function Cf(i){for(i=i.firstContext;i!==null;){if(!Hr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fo(i){$o=i,ns=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function nr(i){return Ck($o,i)}function Rf(i,o){return $o===null&&Fo(i),Ck(i,o)}function Ck(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 jL=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()})}},zL=e.unstable_scheduleCallback,PL=e.unstable_NormalPriority,Un={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Om(){return{controller:new jL,data:new Map,refCount:0}}function au(i){i.refCount--,i.refCount===0&&zL(PL,function(){i.controller.abort()})}var lu=null,Im=0,Da=0,La=null;function $L(i,o){if(lu===null){var u=lu=[];Im=0,Da=Lg(),La={status:"pending",value:void 0,then:function(p){u.push(p)}}}return Im++,o.then(Rk,Rk),o}function Rk(){if(--Im===0&&lu!==null){La!==null&&(La.status="fulfilled");var i=lu;lu=null,Da=0,La=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function FL(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 _k=q.S;q.S=function(i,o){fS=se(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&$L(i,o),_k!==null&&_k(i,o)};var Bo=F(null);function Mm(){var i=Bo.current;return i!==null?i:pn.pooledCache}function _f(i,o){o===null?L(Bo,Bo.current):L(Bo,o.pool)}function Ak(){var i=Mm();return i===null?null:{parent:Un._currentValue,pool:i}}var ja=Error(r(460)),Dm=Error(r(474)),Af=Error(r(542)),Nf={then:function(){}};function Nk(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Ok(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ue,Ue),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Mk(i),i;default:if(typeof o.status=="string")o.then(Ue,Ue);else{if(i=pn,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,Mk(i),i}throw Ho=o,ja}}function Uo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ho=u,ja):u}}var Ho=null;function Ik(){if(Ho===null)throw Error(r(459));var i=Ho;return Ho=null,i}function Mk(i){if(i===ja||i===Af)throw Error(r(483))}var za=null,uu=0;function Of(i){var o=uu;return uu+=1,za===null&&(za=[]),Ok(za,i,o)}function cu(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 Dk(i){function o(ae,ie){if(i){var ce=ae.deletions;ce===null?(ae.deletions=[ie],ae.flags|=16):ce.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,ce){return ae.index=ce,i?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<ie?(ae.flags|=67108866,ie):ce):(ae.flags|=67108866,ie)):(ae.flags|=1048576,ie)}function M(ae){return i&&ae.alternate===null&&(ae.flags|=67108866),ae}function W(ae,ie,ce,Re){return ie===null||ie.tag!==6?(ie=Sm(ce,ae.mode,Re),ie.return=ae,ie):(ie=x(ie,ce),ie.return=ae,ie)}function ne(ae,ie,ce,Re){var dt=ce.type;return dt===k?we(ae,ie,ce.props.children,Re,ce.key):ie!==null&&(ie.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===P&&Uo(dt)===ie.type)?(ie=x(ie,ce.props),cu(ie,ce),ie.return=ae,ie):(ie=Ef(ce.type,ce.key,ce.props,null,ae.mode,Re),cu(ie,ce),ie.return=ae,ie)}function fe(ae,ie,ce,Re){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ce.containerInfo||ie.stateNode.implementation!==ce.implementation?(ie=wm(ce,ae.mode,Re),ie.return=ae,ie):(ie=x(ie,ce.children||[]),ie.return=ae,ie)}function we(ae,ie,ce,Re,dt){return ie===null||ie.tag!==7?(ie=zo(ce,ae.mode,Re,dt),ie.return=ae,ie):(ie=x(ie,ce),ie.return=ae,ie)}function Ae(ae,ie,ce){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Sm(""+ie,ae.mode,ce),ie.return=ae,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return ce=Ef(ie.type,ie.key,ie.props,null,ae.mode,ce),cu(ce,ie),ce.return=ae,ce;case S:return ie=wm(ie,ae.mode,ce),ie.return=ae,ie;case P:return ie=Uo(ie),Ae(ae,ie,ce)}if(H(ie)||B(ie))return ie=zo(ie,ae.mode,ce,null),ie.return=ae,ie;if(typeof ie.then=="function")return Ae(ae,Of(ie),ce);if(ie.$$typeof===R)return Ae(ae,Rf(ae,ie),ce);If(ae,ie)}return null}function he(ae,ie,ce,Re){var dt=ie!==null?ie.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return dt!==null?null:W(ae,ie,""+ce,Re);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===dt?ne(ae,ie,ce,Re):null;case S:return ce.key===dt?fe(ae,ie,ce,Re):null;case P:return ce=Uo(ce),he(ae,ie,ce,Re)}if(H(ce)||B(ce))return dt!==null?null:we(ae,ie,ce,Re,null);if(typeof ce.then=="function")return he(ae,ie,Of(ce),Re);if(ce.$$typeof===R)return he(ae,ie,Rf(ae,ce),Re);If(ae,ce)}return null}function ge(ae,ie,ce,Re,dt){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return ae=ae.get(ce)||null,W(ie,ae,""+Re,dt);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case y:return ae=ae.get(Re.key===null?ce:Re.key)||null,ne(ie,ae,Re,dt);case S:return ae=ae.get(Re.key===null?ce:Re.key)||null,fe(ie,ae,Re,dt);case P:return Re=Uo(Re),ge(ae,ie,ce,Re,dt)}if(H(Re)||B(Re))return ae=ae.get(ce)||null,we(ie,ae,Re,dt,null);if(typeof Re.then=="function")return ge(ae,ie,ce,Of(Re),dt);if(Re.$$typeof===R)return ge(ae,ie,ce,Rf(ie,Re),dt);If(ie,Re)}return null}function Je(ae,ie,ce,Re){for(var dt=null,Kt=null,it=ie,At=ie=0,Bt=null;it!==null&&At<ce.length;At++){it.index>At?(Bt=it,it=null):Bt=it.sibling;var Yt=he(ae,it,ce[At],Re);if(Yt===null){it===null&&(it=Bt);break}i&&it&&Yt.alternate===null&&o(ae,it),ie=w(Yt,ie,At),Kt===null?dt=Yt:Kt.sibling=Yt,Kt=Yt,it=Bt}if(At===ce.length)return u(ae,it),Ht&&ts(ae,At),dt;if(it===null){for(;At<ce.length;At++)it=Ae(ae,ce[At],Re),it!==null&&(ie=w(it,ie,At),Kt===null?dt=it:Kt.sibling=it,Kt=it);return Ht&&ts(ae,At),dt}for(it=p(it);At<ce.length;At++)Bt=ge(it,ae,At,ce[At],Re),Bt!==null&&(i&&Bt.alternate!==null&&it.delete(Bt.key===null?At:Bt.key),ie=w(Bt,ie,At),Kt===null?dt=Bt:Kt.sibling=Bt,Kt=Bt);return i&&it.forEach(function(uo){return o(ae,uo)}),Ht&&ts(ae,At),dt}function yt(ae,ie,ce,Re){if(ce==null)throw Error(r(151));for(var dt=null,Kt=null,it=ie,At=ie=0,Bt=null,Yt=ce.next();it!==null&&!Yt.done;At++,Yt=ce.next()){it.index>At?(Bt=it,it=null):Bt=it.sibling;var uo=he(ae,it,Yt.value,Re);if(uo===null){it===null&&(it=Bt);break}i&&it&&uo.alternate===null&&o(ae,it),ie=w(uo,ie,At),Kt===null?dt=uo:Kt.sibling=uo,Kt=uo,it=Bt}if(Yt.done)return u(ae,it),Ht&&ts(ae,At),dt;if(it===null){for(;!Yt.done;At++,Yt=ce.next())Yt=Ae(ae,Yt.value,Re),Yt!==null&&(ie=w(Yt,ie,At),Kt===null?dt=Yt:Kt.sibling=Yt,Kt=Yt);return Ht&&ts(ae,At),dt}for(it=p(it);!Yt.done;At++,Yt=ce.next())Yt=ge(it,ae,At,Yt.value,Re),Yt!==null&&(i&&Yt.alternate!==null&&it.delete(Yt.key===null?At:Yt.key),ie=w(Yt,ie,At),Kt===null?dt=Yt:Kt.sibling=Yt,Kt=Yt);return i&&it.forEach(function(Zj){return o(ae,Zj)}),Ht&&ts(ae,At),dt}function an(ae,ie,ce,Re){if(typeof ce=="object"&&ce!==null&&ce.type===k&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var dt=ce.key;ie!==null;){if(ie.key===dt){if(dt=ce.type,dt===k){if(ie.tag===7){u(ae,ie.sibling),Re=x(ie,ce.props.children),Re.return=ae,ae=Re;break e}}else if(ie.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===P&&Uo(dt)===ie.type){u(ae,ie.sibling),Re=x(ie,ce.props),cu(Re,ce),Re.return=ae,ae=Re;break e}u(ae,ie);break}else o(ae,ie);ie=ie.sibling}ce.type===k?(Re=zo(ce.props.children,ae.mode,Re,ce.key),Re.return=ae,ae=Re):(Re=Ef(ce.type,ce.key,ce.props,null,ae.mode,Re),cu(Re,ce),Re.return=ae,ae=Re)}return M(ae);case S:e:{for(dt=ce.key;ie!==null;){if(ie.key===dt)if(ie.tag===4&&ie.stateNode.containerInfo===ce.containerInfo&&ie.stateNode.implementation===ce.implementation){u(ae,ie.sibling),Re=x(ie,ce.children||[]),Re.return=ae,ae=Re;break e}else{u(ae,ie);break}else o(ae,ie);ie=ie.sibling}Re=wm(ce,ae.mode,Re),Re.return=ae,ae=Re}return M(ae);case P:return ce=Uo(ce),an(ae,ie,ce,Re)}if(H(ce))return Je(ae,ie,ce,Re);if(B(ce)){if(dt=B(ce),typeof dt!="function")throw Error(r(150));return ce=dt.call(ce),yt(ae,ie,ce,Re)}if(typeof ce.then=="function")return an(ae,ie,Of(ce),Re);if(ce.$$typeof===R)return an(ae,ie,Rf(ae,ce),Re);If(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,ie!==null&&ie.tag===6?(u(ae,ie.sibling),Re=x(ie,ce),Re.return=ae,ae=Re):(u(ae,ie),Re=Sm(ce,ae.mode,Re),Re.return=ae,ae=Re),M(ae)):u(ae,ie)}return function(ae,ie,ce,Re){try{uu=0;var dt=an(ae,ie,ce,Re);return za=null,dt}catch(it){if(it===ja||it===Af)throw it;var Kt=qr(29,it,null,ae.mode);return Kt.lanes=Re,Kt.return=ae,Kt}}}var qo=Dk(!0),Lk=Dk(!1),Gs=!1;function Lm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jm(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 Ws(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ks(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Zt&2)!==0){var x=p.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),p.pending=o,o=wf(i),yk(i,null,u),o}return Sf(i,p,o,u),wf(i)}function fu(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,Le(i,u)}}function zm(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 Pm=!1;function du(){if(Pm){var i=La;if(i!==null)throw i}}function pu(i,o,u,p){Pm=!1;var x=i.updateQueue;Gs=!1;var w=x.firstBaseUpdate,M=x.lastBaseUpdate,W=x.shared.pending;if(W!==null){x.shared.pending=null;var ne=W,fe=ne.next;ne.next=null,M===null?w=fe:M.next=fe,M=ne;var we=i.alternate;we!==null&&(we=we.updateQueue,W=we.lastBaseUpdate,W!==M&&(W===null?we.firstBaseUpdate=fe:W.next=fe,we.lastBaseUpdate=ne))}if(w!==null){var Ae=x.baseState;M=0,we=fe=ne=null,W=w;do{var he=W.lane&-536870913,ge=he!==W.lane;if(ge?(Ft&he)===he:(p&he)===he){he!==0&&he===Da&&(Pm=!0),we!==null&&(we=we.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var Je=i,yt=W;he=o;var an=u;switch(yt.tag){case 1:if(Je=yt.payload,typeof Je=="function"){Ae=Je.call(an,Ae,he);break e}Ae=Je;break e;case 3:Je.flags=Je.flags&-65537|128;case 0:if(Je=yt.payload,he=typeof Je=="function"?Je.call(an,Ae,he):Je,he==null)break e;Ae=m({},Ae,he);break e;case 2:Gs=!0}}he=W.callback,he!==null&&(i.flags|=64,ge&&(i.flags|=8192),ge=x.callbacks,ge===null?x.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:W.tag,payload:W.payload,callback:W.callback,next:null},we===null?(fe=we=ge,ne=Ae):we=we.next=ge,M|=he;if(W=W.next,W===null){if(W=x.shared.pending,W===null)break;ge=W,W=ge.next,ge.next=null,x.lastBaseUpdate=ge,x.shared.pending=null}}while(!0);we===null&&(ne=Ae),x.baseState=ne,x.firstBaseUpdate=fe,x.lastBaseUpdate=we,w===null&&(x.shared.lanes=0),Js|=M,i.lanes=M,i.memoizedState=Ae}}function jk(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function zk(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)jk(u[i],o)}var Pa=F(null),Mf=F(0);function Pk(i,o){i=ds,L(Mf,i),L(Pa,o),ds=i|o.baseLanes}function $m(){L(Mf,ds),L(Pa,Pa.current)}function Fm(){ds=Mf.current,G(Pa),G(Mf)}var Vr=F(null),li=null;function Ys(i){var o=i.alternate;L(Ln,Ln.current&1),L(Vr,i),li===null&&(o===null||Pa.current!==null||o.memoizedState!==null)&&(li=i)}function Bm(i){L(Ln,Ln.current),L(Vr,i),li===null&&(li=i)}function $k(i){i.tag===22?(L(Ln,Ln.current),L(Vr,i),li===null&&(li=i)):Xs()}function Xs(){L(Ln,Ln.current),L(Vr,Vr.current)}function Gr(i){G(Vr),li===i&&(li=null),G(Ln)}var Ln=F(0);function Df(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Wg(u)||Kg(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,Rt=null,sn=null,Hn=null,Lf=!1,$a=!1,Vo=!1,jf=0,hu=0,Fa=null,BL=0;function Nn(){throw Error(r(321))}function Um(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Hr(i[u],o[u]))return!1;return!0}function Hm(i,o,u,p,x,w){return is=w,Rt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,q.H=i===null||i.memoizedState===null?S1:ig,Vo=!1,w=u(p,x),Vo=!1,$a&&(w=Bk(o,u,p,x)),Fk(i),w}function Fk(i){q.H=bu;var o=sn!==null&&sn.next!==null;if(is=0,Hn=sn=Rt=null,Lf=!1,hu=0,Fa=null,o)throw Error(r(300));i===null||qn||(i=i.dependencies,i!==null&&Cf(i)&&(qn=!0))}function Bk(i,o,u,p){Rt=i;var x=0;do{if($a&&(Fa=null),hu=0,$a=!1,25<=x)throw Error(r(301));if(x+=1,Hn=sn=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}q.H=w1,w=o(u,p)}while($a);return w}function UL(){var i=q.H,o=i.useState()[0];return o=typeof o.then=="function"?mu(o):o,i=i.useState()[0],(sn!==null?sn.memoizedState:null)!==i&&(Rt.flags|=1024),o}function qm(){var i=jf!==0;return jf=0,i}function Vm(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Gm(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,Hn=sn=Rt=null,$a=!1,hu=jf=0,Fa=null}function xr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?Rt.memoizedState=Hn=i:Hn=Hn.next=i,Hn}function jn(){if(sn===null){var i=Rt.alternate;i=i!==null?i.memoizedState:null}else i=sn.next;var o=Hn===null?Rt.memoizedState:Hn.next;if(o!==null)Hn=o,sn=i;else{if(i===null)throw Rt.alternate===null?Error(r(467)):Error(r(310));sn=i,i={memoizedState:sn.memoizedState,baseState:sn.baseState,baseQueue:sn.baseQueue,queue:sn.queue,next:null},Hn===null?Rt.memoizedState=Hn=i:Hn=Hn.next=i}return Hn}function zf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mu(i){var o=hu;return hu+=1,Fa===null&&(Fa=[]),i=Ok(Fa,i,o),o=Rt,(Hn===null?o.memoizedState:Hn.next)===null&&(o=o.alternate,q.H=o===null||o.memoizedState===null?S1:ig),i}function Pf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return mu(i);if(i.$$typeof===R)return nr(i)}throw Error(r(438,String(i)))}function Wm(i){var o=null,u=Rt.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=Rt.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=zf(),Rt.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 $f(i){var o=jn();return Km(o,sn,i)}function Km(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 W=M=null,ne=null,fe=o,we=!1;do{var Ae=fe.lane&-536870913;if(Ae!==fe.lane?(Ft&Ae)===Ae:(is&Ae)===Ae){var he=fe.revertLane;if(he===0)ne!==null&&(ne=ne.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Ae===Da&&(we=!0);else if((is&he)===he){fe=fe.next,he===Da&&(we=!0);continue}else Ae={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ne===null?(W=ne=Ae,M=w):ne=ne.next=Ae,Rt.lanes|=he,Js|=he;Ae=fe.action,Vo&&u(w,Ae),w=fe.hasEagerState?fe.eagerState:u(w,Ae)}else he={lane:Ae,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ne===null?(W=ne=he,M=w):ne=ne.next=he,Rt.lanes|=Ae,Js|=Ae;fe=fe.next}while(fe!==null&&fe!==o);if(ne===null?M=w:ne.next=W,!Hr(w,i.memoizedState)&&(qn=!0,we&&(u=La,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=ne,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function Ym(i){var o=jn(),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);Hr(w,o.memoizedState)||(qn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function Uk(i,o,u){var p=Rt,x=jn(),w=Ht;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Hr((sn||x).memoizedState,u);if(M&&(x.memoizedState=u,qn=!0),x=x.queue,Qm(Vk.bind(null,p,x,i),[i]),x.getSnapshot!==o||M||Hn!==null&&Hn.memoizedState.tag&1){if(p.flags|=2048,Ba(9,{destroy:void 0},qk.bind(null,p,x,u,o),null),pn===null)throw Error(r(349));w||(is&127)!==0||Hk(p,o,u)}return u}function Hk(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Rt.updateQueue,o===null?(o=zf(),Rt.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function qk(i,o,u,p){o.value=u,o.getSnapshot=p,Gk(o)&&Wk(i)}function Vk(i,o,u){return u(function(){Gk(o)&&Wk(i)})}function Gk(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Hr(i,u)}catch{return!0}}function Wk(i){var o=jo(i,2);o!==null&&Dr(o,i,2)}function Xm(i){var o=xr();if(typeof i=="function"){var u=i;if(i=u(),Vo){St(!0);try{u()}finally{St(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:i},o}function Kk(i,o,u,p){return i.baseState=u,Km(i,sn,typeof p=="function"?p:ss)}function HL(i,o,u,p,x){if(Uf(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)}};q.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,Yk(o,w)):(w.next=u.next,o.pending=u.next=w)}}function Yk(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=q.T,M={};q.T=M;try{var W=u(x,p),ne=q.S;ne!==null&&ne(M,W),Xk(i,o,W)}catch(fe){Zm(i,o,fe)}finally{w!==null&&M.types!==null&&(w.types=M.types),q.T=w}}else try{w=u(x,p),Xk(i,o,w)}catch(fe){Zm(i,o,fe)}}function Xk(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Zk(i,o,p)},function(p){return Zm(i,o,p)}):Zk(i,o,u)}function Zk(i,o,u){o.status="fulfilled",o.value=u,Qk(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,Yk(i,u)))}function Zm(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,Qk(o),o=o.next;while(o!==p)}i.action=null}function Qk(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Jk(i,o){return o}function e1(i,o){if(Ht){var u=pn.formState;if(u!==null){e:{var p=Rt;if(Ht){if(wn){t:{for(var x=wn,w=ai;x.nodeType!==8;){if(!w){x=null;break t}if(x=ui(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){wn=ui(x.nextSibling),p=x.data==="F!";break e}}qs(p)}p=!1}p&&(o=u[0])}}return u=xr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jk,lastRenderedState:o},u.queue=p,u=v1.bind(null,Rt,p),p.dispatch=u,p=Xm(!1),w=rg.bind(null,Rt,!1,p.queue),p=xr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=HL.bind(null,Rt,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function t1(i){var o=jn();return n1(o,sn,i)}function n1(i,o,u){if(o=Km(i,o,Jk)[0],i=$f(ss)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=mu(o)}catch(M){throw M===ja?Af:M}else p=o;o=jn();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Rt.flags|=2048,Ba(9,{destroy:void 0},qL.bind(null,x,u),null)),[p,w,i]}function qL(i,o){i.action=o}function r1(i){var o=jn(),u=sn;if(u!==null)return n1(o,u,i);jn(),o=o.memoizedState,u=jn();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Ba(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=Rt.updateQueue,o===null&&(o=zf(),Rt.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 i1(){return jn().memoizedState}function Ff(i,o,u,p){var x=xr();Rt.flags|=i,x.memoizedState=Ba(1|o,{destroy:void 0},u,p===void 0?null:p)}function Bf(i,o,u,p){var x=jn();p=p===void 0?null:p;var w=x.memoizedState.inst;sn!==null&&p!==null&&Um(p,sn.memoizedState.deps)?x.memoizedState=Ba(o,w,u,p):(Rt.flags|=i,x.memoizedState=Ba(1|o,w,u,p))}function s1(i,o){Ff(8390656,8,i,o)}function Qm(i,o){Bf(2048,8,i,o)}function VL(i){Rt.flags|=4;var o=Rt.updateQueue;if(o===null)o=zf(),Rt.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function o1(i){var o=jn().memoizedState;return VL({ref:o,nextImpl:i}),function(){if((Zt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function a1(i,o){return Bf(4,2,i,o)}function l1(i,o){return Bf(4,4,i,o)}function u1(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 c1(i,o,u){u=u!=null?u.concat([i]):null,Bf(4,4,u1.bind(null,o,i),u)}function Jm(){}function f1(i,o){var u=jn();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Um(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function d1(i,o){var u=jn();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Um(o,p[1]))return p[0];if(p=i(),Vo){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[p,o],p}function eg(i,o,u){return u===void 0||(is&1073741824)!==0&&(Ft&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=pS(),Rt.lanes|=i,Js|=i,u)}function p1(i,o,u,p){return Hr(u,o)?u:Pa.current!==null?(i=eg(i,u,p),Hr(i,o)||(qn=!0),i):(is&42)===0||(is&1073741824)!==0&&(Ft&261930)===0?(qn=!0,i.memoizedState=u):(i=pS(),Rt.lanes|=i,Js|=i,o)}function h1(i,o,u,p,x){var w=K.p;K.p=w!==0&&8>w?w:8;var M=q.T,W={};q.T=W,rg(i,!1,o,u);try{var ne=x(),fe=q.S;if(fe!==null&&fe(W,ne),ne!==null&&typeof ne=="object"&&typeof ne.then=="function"){var we=FL(ne,p);gu(i,o,we,Yr(i))}else gu(i,o,p,Yr(i))}catch(Ae){gu(i,o,{then:function(){},status:"rejected",reason:Ae},Yr())}finally{K.p=w,M!==null&&W.types!==null&&(M.types=W.types),q.T=M}}function GL(){}function tg(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=m1(i).queue;h1(i,x,o,U,u===null?GL:function(){return g1(i),u(p)})}function m1(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:U},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 g1(i){var o=m1(i);o.next===null&&(o=i.alternate.memoizedState),gu(i,o.next.queue,{},Yr())}function ng(){return nr(Mu)}function b1(){return jn().memoizedState}function y1(){return jn().memoizedState}function WL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Yr();i=Ws(u);var p=Ks(o,i,u);p!==null&&(Dr(p,o,u),fu(p,o,u)),o={cache:Om()},i.payload=o;return}o=o.return}}function KL(i,o,u){var p=Yr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uf(i)?x1(o,u):(u=xm(i,o,u,p),u!==null&&(Dr(u,i,p),k1(u,o,p)))}function v1(i,o,u){var p=Yr();gu(i,o,u,p)}function gu(i,o,u,p){var x={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Uf(i))x1(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,W=w(M,u);if(x.hasEagerState=!0,x.eagerState=W,Hr(W,M))return Sf(i,o,x,0),pn===null&&kf(),!1}catch{}if(u=xm(i,o,x,p),u!==null)return Dr(u,i,p),k1(u,o,p),!0}return!1}function rg(i,o,u,p){if(p={lane:2,revertLane:Lg(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Uf(i)){if(o)throw Error(r(479))}else o=xm(i,u,p,2),o!==null&&Dr(o,i,2)}function Uf(i){var o=i.alternate;return i===Rt||o!==null&&o===Rt}function x1(i,o){$a=Lf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function k1(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Le(i,u)}}var bu={readContext:nr,use:Pf,useCallback:Nn,useContext:Nn,useEffect:Nn,useImperativeHandle:Nn,useLayoutEffect:Nn,useInsertionEffect:Nn,useMemo:Nn,useReducer:Nn,useRef:Nn,useState:Nn,useDebugValue:Nn,useDeferredValue:Nn,useTransition:Nn,useSyncExternalStore:Nn,useId:Nn,useHostTransitionStatus:Nn,useFormState:Nn,useActionState:Nn,useOptimistic:Nn,useMemoCache:Nn,useCacheRefresh:Nn};bu.useEffectEvent=Nn;var S1={readContext:nr,use:Pf,useCallback:function(i,o){return xr().memoizedState=[i,o===void 0?null:o],i},useContext:nr,useEffect:s1,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Ff(4194308,4,u1.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=xr();o=o===void 0?null:o;var p=i();if(Vo){St(!0);try{i()}finally{St(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=xr();if(u!==void 0){var x=u(o);if(Vo){St(!0);try{u(o)}finally{St(!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=KL.bind(null,Rt,i),[p.memoizedState,i]},useRef:function(i){var o=xr();return i={current:i},o.memoizedState=i},useState:function(i){i=Xm(i);var o=i.queue,u=v1.bind(null,Rt,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Jm,useDeferredValue:function(i,o){var u=xr();return eg(u,i,o)},useTransition:function(){var i=Xm(!1);return i=h1.bind(null,Rt,i.queue,!0,!1),xr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Rt,x=xr();if(Ht){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),pn===null)throw Error(r(349));(Ft&127)!==0||Hk(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,s1(Vk.bind(null,p,w,i),[i]),p.flags|=2048,Ba(9,{destroy:void 0},qk.bind(null,p,w,u,o),null),u},useId:function(){var i=xr(),o=pn.identifierPrefix;if(Ht){var u=zi,p=ji;u=(p&~(1<<32-et(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=jf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=BL++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:ng,useFormState:e1,useActionState:e1,useOptimistic:function(i){var o=xr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=rg.bind(null,Rt,!0,u),u.dispatch=o,[i,o]},useMemoCache:Wm,useCacheRefresh:function(){return xr().memoizedState=WL.bind(null,Rt)},useEffectEvent:function(i){var o=xr(),u={impl:i};return o.memoizedState=u,function(){if((Zt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},ig={readContext:nr,use:Pf,useCallback:f1,useContext:nr,useEffect:Qm,useImperativeHandle:c1,useInsertionEffect:a1,useLayoutEffect:l1,useMemo:d1,useReducer:$f,useRef:i1,useState:function(){return $f(ss)},useDebugValue:Jm,useDeferredValue:function(i,o){var u=jn();return p1(u,sn.memoizedState,i,o)},useTransition:function(){var i=$f(ss)[0],o=jn().memoizedState;return[typeof i=="boolean"?i:mu(i),o]},useSyncExternalStore:Uk,useId:b1,useHostTransitionStatus:ng,useFormState:t1,useActionState:t1,useOptimistic:function(i,o){var u=jn();return Kk(u,sn,i,o)},useMemoCache:Wm,useCacheRefresh:y1};ig.useEffectEvent=o1;var w1={readContext:nr,use:Pf,useCallback:f1,useContext:nr,useEffect:Qm,useImperativeHandle:c1,useInsertionEffect:a1,useLayoutEffect:l1,useMemo:d1,useReducer:Ym,useRef:i1,useState:function(){return Ym(ss)},useDebugValue:Jm,useDeferredValue:function(i,o){var u=jn();return sn===null?eg(u,i,o):p1(u,sn.memoizedState,i,o)},useTransition:function(){var i=Ym(ss)[0],o=jn().memoizedState;return[typeof i=="boolean"?i:mu(i),o]},useSyncExternalStore:Uk,useId:b1,useHostTransitionStatus:ng,useFormState:r1,useActionState:r1,useOptimistic:function(i,o){var u=jn();return sn!==null?Kk(u,sn,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Wm,useCacheRefresh:y1};w1.useEffectEvent=o1;function sg(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 og={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Yr(),x=Ws(p);x.payload=o,u!=null&&(x.callback=u),o=Ks(i,x,p),o!==null&&(Dr(o,i,p),fu(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Yr(),x=Ws(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Ks(i,x,p),o!==null&&(Dr(o,i,p),fu(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Yr(),p=Ws(u);p.tag=2,o!=null&&(p.callback=o),o=Ks(i,p,u),o!==null&&(Dr(o,i,u),fu(o,i,u))}};function E1(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?!ru(u,p)||!ru(x,w):!0}function T1(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&&og.enqueueReplaceState(o,o.state,null)}function Go(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 C1(i){xf(i)}function R1(i){console.error(i)}function _1(i){xf(i)}function Hf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function A1(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 ag(i,o,u){return u=Ws(u),u.tag=3,u.payload={element:null},u.callback=function(){Hf(i,o)},u}function N1(i){return i=Ws(i),i.tag=3,i}function O1(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(){A1(o,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){A1(o,u,p),typeof x!="function"&&(eo===null?eo=new Set([this]):eo.add(this));var W=p.stack;this.componentDidCatch(p.value,{componentStack:W!==null?W:""})})}function YL(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Ma(o,u,x,!0),u=Vr.current,u!==null){switch(u.tag){case 31:case 13:return li===null?td():u.alternate===null&&On===0&&(On=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===Nf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),Ig(i,p,x)),!1;case 22:return u.flags|=65536,p===Nf?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)),Ig(i,p,x)),!1}throw Error(r(435,u.tag))}return Ig(i,p,x),td(),!1}if(Ht)return o=Vr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==Cm&&(i=Error(r(422),{cause:p}),ou(ii(i,u)))):(p!==Cm&&(o=Error(r(423),{cause:p}),ou(ii(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=ii(p,u),x=ag(i.stateNode,p,x),zm(i,x),On!==4&&(On=2)),!1;var w=Error(r(520),{cause:p});if(w=ii(w,u),Tu===null?Tu=[w]:Tu.push(w),On!==4&&(On=2),o===null)return!0;p=ii(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=ag(u.stateNode,p,i),zm(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"&&(eo===null||!eo.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=N1(x),O1(x,i,u,p),zm(u,x),!1}u=u.return}while(u!==null);return!1}var lg=Error(r(461)),qn=!1;function rr(i,o,u,p){o.child=i===null?Lk(o,null,u,p):qo(o,i.child,u,p)}function I1(i,o,u,p,x){u=u.render;var w=o.ref;if("ref"in p){var M={};for(var W in p)W!=="ref"&&(M[W]=p[W])}else M=p;return Fo(o),p=Hm(i,o,u,M,w,x),W=qm(),i!==null&&!qn?(Vm(i,o,x),os(i,o,x)):(Ht&&W&&Em(o),o.flags|=1,rr(i,o,p,x),o.child)}function M1(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!km(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,D1(i,o,w,p,x)):(i=Ef(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!gg(i,x)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:ru,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 D1(i,o,u,p,x){if(i!==null){var w=i.memoizedProps;if(ru(w,p)&&i.ref===o.ref)if(qn=!1,o.pendingProps=p=w,gg(i,x))(i.flags&131072)!==0&&(qn=!0);else return o.lanes=i.lanes,os(i,o,x)}return ug(i,o,u,p,x)}function L1(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 j1(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&_f(o,w!==null?w.cachePool:null),w!==null?Pk(o,w):$m(),$k(o);else return p=o.lanes=536870912,j1(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(_f(o,w.cachePool),Pk(o,w),Xs(),o.memoizedState=null):(i!==null&&_f(o,null),$m(),Xs());return rr(i,o,x,u),o.child}function yu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function j1(i,o,u,p,x){var w=Mm();return w=w===null?null:{parent:Un._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&_f(o,null),$m(),$k(o),i!==null&&Ma(i,o,p,!0),o.childLanes=x,null}function qf(i,o){return o=Gf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function z1(i,o,u){return qo(o,i.child,null,u),i=qf(o,o.pendingProps),i.flags|=2,Gr(o),o.memoizedState=null,i}function XL(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Ht){if(p.mode==="hidden")return i=qf(o,p),o.lanes=536870912,yu(null,i);if(Bm(o),(i=wn)?(i=YS(i,ai),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Us!==null?{id:ji,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=xk(i),u.return=o,o.child=u,tr=o,wn=null)):i=null,i===null)throw qs(o);return o.lanes=536870912,null}return qf(o,p)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(Bm(o),x)if(o.flags&256)o.flags&=-257,o=z1(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(qn||Ma(i,o,u,!1),x=(u&i.childLanes)!==0,qn||x){if(p=pn,p!==null&&(M=Me(p,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,jo(i,M),Dr(p,i,M),lg;td(),o=z1(i,o,u)}else i=w.treeContext,wn=ui(M.nextSibling),tr=o,Ht=!0,Hs=null,ai=!1,i!==null&&wk(o,i),o=qf(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 ug(i,o,u,p,x){return Fo(o),u=Hm(i,o,u,p,void 0,x),p=qm(),i!==null&&!qn?(Vm(i,o,x),os(i,o,x)):(Ht&&p&&Em(o),o.flags|=1,rr(i,o,u,x),o.child)}function P1(i,o,u,p,x,w){return Fo(o),o.updateQueue=null,u=Bk(o,p,u,x),Fk(i),p=qm(),i!==null&&!qn?(Vm(i,o,w),os(i,o,w)):(Ht&&p&&Em(o),o.flags|=1,rr(i,o,u,w),o.child)}function $1(i,o,u,p,x){if(Fo(o),o.stateNode===null){var w=Aa,M=u.contextType;typeof M=="object"&&M!==null&&(w=nr(M)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=og,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},Lm(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?nr(M):Aa,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(sg(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&&og.enqueueReplaceState(w,w.state,null),pu(o,p,w,x),du(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var W=o.memoizedProps,ne=Go(u,W);w.props=ne;var fe=w.context,we=u.contextType;M=Aa,typeof we=="object"&&we!==null&&(M=nr(we));var Ae=u.getDerivedStateFromProps;we=typeof Ae=="function"||typeof w.getSnapshotBeforeUpdate=="function",W=o.pendingProps!==W,we||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(W||fe!==M)&&T1(o,w,p,M),Gs=!1;var he=o.memoizedState;w.state=he,pu(o,p,w,x),du(),fe=o.memoizedState,W||he!==fe||Gs?(typeof Ae=="function"&&(sg(o,u,Ae,p),fe=o.memoizedState),(ne=Gs||E1(o,u,ne,p,he,fe,M))?(we||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=fe),w.props=p,w.state=fe,w.context=M,p=ne):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,jm(i,o),M=o.memoizedProps,we=Go(u,M),w.props=we,Ae=o.pendingProps,he=w.context,fe=u.contextType,ne=Aa,typeof fe=="object"&&fe!==null&&(ne=nr(fe)),W=u.getDerivedStateFromProps,(fe=typeof W=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Ae||he!==ne)&&T1(o,w,p,ne),Gs=!1,he=o.memoizedState,w.state=he,pu(o,p,w,x),du();var ge=o.memoizedState;M!==Ae||he!==ge||Gs||i!==null&&i.dependencies!==null&&Cf(i.dependencies)?(typeof W=="function"&&(sg(o,u,W,p),ge=o.memoizedState),(we=Gs||E1(o,u,we,p,he,ge,ne)||i!==null&&i.dependencies!==null&&Cf(i.dependencies))?(fe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ge,ne),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ge,ne)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ge),w.props=p,w.state=ge,w.context=ne,p=we):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&he===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=qo(o,i.child,null,x),o.child=qo(o,null,u,x)):rr(i,o,u,x),o.memoizedState=w.state,i=o.child):i=os(i,o,x),i}function F1(i,o,u,p){return Po(),o.flags|=256,rr(i,o,u,p),o.child}var cg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fg(i){return{baseLanes:i,cachePool:Ak()}}function dg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Kr),i}function B1(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:(Ln.current&2)!==0),M&&(x=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Ht){if(x?Ys(o):Xs(),(i=wn)?(i=YS(i,ai),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Us!==null?{id:ji,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=xk(i),u.return=o,o.child=u,tr=o,wn=null)):i=null,i===null)throw qs(o);return Kg(i)?o.lanes=32:o.lanes=536870912,null}var W=p.children;return p=p.fallback,x?(Xs(),x=o.mode,W=Gf({mode:"hidden",children:W},x),p=zo(p,x,u,null),W.return=o,p.return=o,W.sibling=p,o.child=W,p=o.child,p.memoizedState=fg(u),p.childLanes=dg(i,M,u),o.memoizedState=cg,yu(null,p)):(Ys(o),pg(o,W))}var ne=i.memoizedState;if(ne!==null&&(W=ne.dehydrated,W!==null)){if(w)o.flags&256?(Ys(o),o.flags&=-257,o=hg(i,o,u)):o.memoizedState!==null?(Xs(),o.child=i.child,o.flags|=128,o=null):(Xs(),W=p.fallback,x=o.mode,p=Gf({mode:"visible",children:p.children},x),W=zo(W,x,u,null),W.flags|=2,p.return=o,W.return=o,p.sibling=W,o.child=p,qo(o,i.child,null,u),p=o.child,p.memoizedState=fg(u),p.childLanes=dg(i,M,u),o.memoizedState=cg,o=yu(null,p));else if(Ys(o),Kg(W)){if(M=W.nextSibling&&W.nextSibling.dataset,M)var fe=M.dgst;M=fe,p=Error(r(419)),p.stack="",p.digest=M,ou({value:p,source:null,stack:null}),o=hg(i,o,u)}else if(qn||Ma(i,o,u,!1),M=(u&i.childLanes)!==0,qn||M){if(M=pn,M!==null&&(p=Me(M,u),p!==0&&p!==ne.retryLane))throw ne.retryLane=p,jo(i,p),Dr(M,i,p),lg;Wg(W)||td(),o=hg(i,o,u)}else Wg(W)?(o.flags|=192,o.child=i.child,o=null):(i=ne.treeContext,wn=ui(W.nextSibling),tr=o,Ht=!0,Hs=null,ai=!1,i!==null&&wk(o,i),o=pg(o,p.children),o.flags|=4096);return o}return x?(Xs(),W=p.fallback,x=o.mode,ne=i.child,fe=ne.sibling,p=es(ne,{mode:"hidden",children:p.children}),p.subtreeFlags=ne.subtreeFlags&65011712,fe!==null?W=es(fe,W):(W=zo(W,x,u,null),W.flags|=2),W.return=o,p.return=o,p.sibling=W,o.child=p,yu(null,p),p=o.child,W=i.child.memoizedState,W===null?W=fg(u):(x=W.cachePool,x!==null?(ne=Un._currentValue,x=x.parent!==ne?{parent:ne,pool:ne}:x):x=Ak(),W={baseLanes:W.baseLanes|u,cachePool:x}),p.memoizedState=W,p.childLanes=dg(i,M,u),o.memoizedState=cg,yu(i.child,p)):(Ys(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 pg(i,o){return o=Gf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Gf(i,o){return i=qr(22,i,null,o),i.lanes=0,i}function hg(i,o,u){return qo(o,i.child,null,u),i=pg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function U1(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),Am(i.return,o,u)}function mg(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 H1(i,o,u){var p=o.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var M=Ln.current,W=(M&2)!==0;if(W?(M=M&1|2,o.flags|=128):M&=1,L(Ln,M),rr(i,o,p,u),p=Ht?su:0,!W&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&U1(i,u,o);else if(i.tag===19)U1(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&&Df(i)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),mg(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&&Df(i)===null){o.child=x;break}i=x.sibling,x.sibling=u,u=x,x=i}mg(o,!0,u,null,w,p);break;case"together":mg(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),Js|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Ma(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 gg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Cf(i)))}function ZL(i,o,u){switch(o.tag){case 3:oe(o,o.stateNode.containerInfo),Vs(o,Un,i.memoizedState.cache),Po();break;case 27:case 5:xe(o);break;case 4:oe(o,o.stateNode.containerInfo);break;case 10:Vs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Bm(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Ys(o),o.flags|=128,null):(u&o.child.childLanes)!==0?B1(i,o,u):(Ys(o),i=os(i,o,u),i!==null?i.sibling:null);Ys(o);break;case 19:var x=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(Ma(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return H1(i,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),L(Ln,Ln.current),p)break;return null;case 22:return o.lanes=0,L1(i,o,u,o.pendingProps);case 24:Vs(o,Un,i.memoizedState.cache)}return os(i,o,u)}function q1(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)qn=!0;else{if(!gg(i,u)&&(o.flags&128)===0)return qn=!1,ZL(i,o,u);qn=(i.flags&131072)!==0}else qn=!1,Ht&&(o.flags&1048576)!==0&&Sk(o,su,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=Uo(o.elementType),o.type=i,typeof i=="function")km(i)?(p=Go(i,p),o.tag=1,o=$1(null,o,i,p,u)):(o.tag=0,o=ug(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===_){o.tag=11,o=I1(null,o,i,p,u);break e}else if(x===N){o.tag=14,o=M1(null,o,i,p,u);break e}}throw o=j(i)||i,Error(r(306,o,""))}}return o;case 0:return ug(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Go(p,o.pendingProps),$1(i,o,p,x,u);case 3:e:{if(oe(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;x=w.element,jm(i,o),pu(o,p,null,u);var M=o.memoizedState;if(p=M.cache,Vs(o,Un,p),p!==w.cache&&Nm(o,[Un],u,!0),du(),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=F1(i,o,p,u);break e}else if(p!==x){x=ii(Error(r(424)),o),ou(x),o=F1(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=ui(i.firstChild),tr=o,Ht=!0,Hs=null,ai=!0,u=Lk(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Po(),p===x){o=os(i,o,u);break e}rr(i,o,p,u)}o=o.child}return o;case 26:return Vf(i,o),i===null?(u=tw(o.type,null,o.pendingProps,null))?o.memoizedState=u:Ht||(u=o.type,i=o.pendingProps,p=ld(J.current).createElement(u),p[Ut]=o,p[ot]=i,ir(p,u,i),Fn(p),o.stateNode=p):o.memoizedState=tw(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return xe(o),i===null&&Ht&&(p=o.stateNode=QS(o.type,o.pendingProps,J.current),tr=o,ai=!0,x=wn,io(o.type)?(Yg=x,wn=ui(p.firstChild)):wn=x),rr(i,o,o.pendingProps.children,u),Vf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Ht&&((x=p=wn)&&(p=Rj(p,o.type,o.pendingProps,ai),p!==null?(o.stateNode=p,tr=o,wn=ui(p.firstChild),ai=!1,x=!0):x=!1),x||qs(o)),xe(o),x=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,p=w.children,qg(x,w)?p=null:M!==null&&qg(x,M)&&(o.flags|=32),o.memoizedState!==null&&(x=Hm(i,o,UL,null,null,u),Mu._currentValue=x),Vf(i,o),rr(i,o,p,u),o.child;case 6:return i===null&&Ht&&((i=u=wn)&&(u=_j(u,o.pendingProps,ai),u!==null?(o.stateNode=u,tr=o,wn=null,i=!0):i=!1),i||qs(o)),null;case 13:return B1(i,o,u);case 4:return oe(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=qo(o,null,p,u):rr(i,o,p,u),o.child;case 11:return I1(i,o,o.type,o.pendingProps,u);case 7:return rr(i,o,o.pendingProps,u),o.child;case 8:return rr(i,o,o.pendingProps.children,u),o.child;case 12:return rr(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Vs(o,o.type,p.value),rr(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Fo(o),x=nr(x),p=p(x),o.flags|=1,rr(i,o,p,u),o.child;case 14:return M1(i,o,o.type,o.pendingProps,u);case 15:return D1(i,o,o.type,o.pendingProps,u);case 19:return H1(i,o,u);case 31:return XL(i,o,u);case 22:return L1(i,o,u,o.pendingProps);case 24:return Fo(o),p=nr(Un),i===null?(x=Mm(),x===null&&(x=pn,w=Om(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},Lm(o),Vs(o,Un,x)):((i.lanes&u)!==0&&(jm(i,o),pu(o,null,null,u),du()),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),Vs(o,Un,p)):(p=w.cache,Vs(o,Un,p),p!==x.cache&&Nm(o,[Un],u,!0))),rr(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 bg(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(bS())i.flags|=8192;else throw Ho=Nf,Dm}else i.flags&=-16777217}function V1(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!ow(o))if(bS())i.flags|=8192;else throw Ho=Nf,Dm}function Wf(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Xe():536870912,i.lanes|=o,Va|=o)}function vu(i,o){if(!Ht)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 QL(i,o,u){var p=o.pendingProps;switch(Tm(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(Un),ue(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Ia(o)?as(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Rm())),En(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(as(o),w!==null?(En(o),V1(o,w)):(En(o),bg(o,x,null,p,u))):w?w!==i.memoizedState?(as(o),En(o),V1(o,w)):(En(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&as(o),En(o),bg(o,x,i,p,u)),null;case 27:if(ye(o),u=J.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=X.current,Ia(o)?Ek(o):(i=QS(x,p,u),o.stateNode=i,as(o))}return En(o),null;case 5:if(ye(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=X.current,Ia(o))Ek(o);else{var M=ld(J.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[Ut]=o,w[ot]=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(ir(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),bg(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=J.current,Ia(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=tr,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[Ut]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||BS(i.nodeValue,u)),i||qs(o,!0)}else i=ld(i).createTextNode(p),i[Ut]=o,o.stateNode=i}return En(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=Ia(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[Ut]=o}else Po(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),i=!1}else u=Rm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Gr(o),o):(Gr(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=Ia(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[Ut]=o}else Po(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;En(o),x=!1}else x=Rm(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Gr(o),o):(Gr(o),null)}return Gr(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),Wf(o,o.updateQueue),En(o),null);case 4:return ue(),i===null&&$g(o.stateNode.containerInfo),En(o),null;case 10:return rs(o.type),En(o),null;case 19:if(G(Ln),p=o.memoizedState,p===null)return En(o),null;if(x=(o.flags&128)!==0,w=p.rendering,w===null)if(x)vu(p,!1);else{if(On!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Df(i),w!==null){for(o.flags|=128,vu(p,!1),i=w.updateQueue,o.updateQueue=i,Wf(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)vk(u,i),u=u.sibling;return L(Ln,Ln.current&1|2),Ht&&ts(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&se()>Qf&&(o.flags|=128,x=!0,vu(p,!1),o.lanes=4194304)}else{if(!x)if(i=Df(w),i!==null){if(o.flags|=128,x=!0,i=i.updateQueue,o.updateQueue=i,Wf(o,i),vu(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Ht)return En(o),null}else 2*se()-p.renderingStartTime>Qf&&u!==536870912&&(o.flags|=128,x=!0,vu(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=se(),i.sibling=null,u=Ln.current,L(Ln,x?u&1|2:u&1),Ht&&ts(o,p.treeForkCount),i):(En(o),null);case 22:case 23:return Gr(o),Fm(),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&&Wf(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&&G(Bo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),rs(Un),En(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function JL(i,o){switch(Tm(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return rs(Un),ue(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return ye(o),null;case 31:if(o.memoizedState!==null){if(Gr(o),o.alternate===null)throw Error(r(340));Po()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Gr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Po()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return G(Ln),null;case 4:return ue(),null;case 10:return rs(o.type),null;case 22:case 23:return Gr(o),Fm(),i!==null&&G(Bo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return rs(Un),null;case 25:return null;default:return null}}function G1(i,o){switch(Tm(o),o.tag){case 3:rs(Un),ue();break;case 26:case 27:case 5:ye(o);break;case 4:ue();break;case 31:o.memoizedState!==null&&Gr(o);break;case 13:Gr(o);break;case 19:G(Ln);break;case 10:rs(o.type);break;case 22:case 23:Gr(o),Fm(),i!==null&&G(Bo);break;case 24:rs(Un)}}function xu(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(W){nn(o,o.return,W)}}function Zs(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,W=M.destroy;if(W!==void 0){M.destroy=void 0,x=o;var ne=u,fe=W;try{fe()}catch(we){nn(x,ne,we)}}}p=p.next}while(p!==w)}}catch(we){nn(o,o.return,we)}}function W1(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{zk(o,u)}catch(p){nn(i,i.return,p)}}}function K1(i,o,u){u.props=Go(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){nn(i,o,p)}}function ku(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){nn(i,o,x)}}function Pi(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){nn(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){nn(i,o,x)}else u.current=null}function Y1(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){nn(i,i.return,x)}}function yg(i,o,u){try{var p=i.stateNode;kj(p,i.type,u,o),p[ot]=o}catch(x){nn(i,i.return,x)}}function X1(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&io(i.type)||i.tag===4}function vg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||X1(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&&io(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 xg(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=Ue));else if(p!==4&&(p===27&&io(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(xg(i,o,u),i=i.sibling;i!==null;)xg(i,o,u),i=i.sibling}function Kf(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&&io(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Kf(i,o,u),i=i.sibling;i!==null;)Kf(i,o,u),i=i.sibling}function Z1(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);ir(o,p,u),o[Ut]=i,o[ot]=u}catch(w){nn(i,i.return,w)}}var ls=!1,Vn=!1,kg=!1,Q1=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function ej(i,o){if(i=i.containerInfo,Ug=md,i=ck(i),hm(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,W=-1,ne=-1,fe=0,we=0,Ae=i,he=null;t:for(;;){for(var ge;Ae!==u||x!==0&&Ae.nodeType!==3||(W=M+x),Ae!==w||p!==0&&Ae.nodeType!==3||(ne=M+p),Ae.nodeType===3&&(M+=Ae.nodeValue.length),(ge=Ae.firstChild)!==null;)he=Ae,Ae=ge;for(;;){if(Ae===i)break t;if(he===u&&++fe===x&&(W=M),he===w&&++we===p&&(ne=M),(ge=Ae.nextSibling)!==null)break;Ae=he,he=Ae.parentNode}Ae=ge}u=W===-1||ne===-1?null:{start:W,end:ne}}else u=null}u=u||{start:0,end:0}}else u=null;for(Hg={focusedElem:i,selectionRange:u},md=!1,Zn=o;Zn!==null;)if(o=Zn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Zn=i;else for(;Zn!==null;){switch(o=Zn,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=Go(u.type,x);i=p.getSnapshotBeforeUpdate(Je,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(yt){nn(u,u.return,yt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Gg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Gg(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,Zn=i;break}Zn=o.return}}function J1(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:cs(i,u),p&4&&xu(5,u);break;case 1:if(cs(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){nn(u,u.return,M)}else{var x=Go(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){nn(u,u.return,M)}}p&64&&W1(u),p&512&&ku(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{zk(i,o)}catch(M){nn(u,u.return,M)}}break;case 27:o===null&&p&4&&Z1(u);case 26:case 5:cs(i,u),o===null&&p&4&&Y1(u),p&512&&ku(u,u.return);break;case 12:cs(i,u);break;case 31:cs(i,u),p&4&&nS(i,u);break;case 13:cs(i,u),p&4&&rS(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=uj.bind(null,u),Aj(i,u))));break;case 22:if(p=u.memoizedState!==null||ls,!p){o=o!==null&&o.memoizedState!==null||Vn,x=ls;var w=Vn;ls=p,(Vn=o)&&!w?fs(i,u,(u.subtreeFlags&8772)!==0):cs(i,u),ls=x,Vn=w}break;case 30:break;default:cs(i,u)}}function eS(i){var o=i.alternate;o!==null&&(i.alternate=null,eS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Li(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,Nr=!1;function us(i,o,u){for(u=u.child;u!==null;)tS(i,o,u),u=u.sibling}function tS(i,o,u){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(nt,u)}catch{}switch(u.tag){case 26:Vn||Pi(u,o),us(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Vn||Pi(u,o);var p=Tn,x=Nr;io(u.type)&&(Tn=u.stateNode,Nr=!1),us(i,o,u),Nu(u.stateNode),Tn=p,Nr=x;break;case 5:Vn||Pi(u,o);case 6:if(p=Tn,x=Nr,Tn=null,us(i,o,u),Tn=p,Nr=x,Tn!==null)if(Nr)try{(Tn.nodeType===9?Tn.body:Tn.nodeName==="HTML"?Tn.ownerDocument.body:Tn).removeChild(u.stateNode)}catch(w){nn(u,o,w)}else try{Tn.removeChild(u.stateNode)}catch(w){nn(u,o,w)}break;case 18:Tn!==null&&(Nr?(i=Tn,WS(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),Ja(i)):WS(Tn,u.stateNode));break;case 4:p=Tn,x=Nr,Tn=u.stateNode.containerInfo,Nr=!0,us(i,o,u),Tn=p,Nr=x;break;case 0:case 11:case 14:case 15:Zs(2,u,o),Vn||Zs(4,u,o),us(i,o,u);break;case 1:Vn||(Pi(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&K1(u,o,p)),us(i,o,u);break;case 21:us(i,o,u);break;case 22:Vn=(p=Vn)||u.memoizedState!==null,us(i,o,u),Vn=p;break;default:us(i,o,u)}}function nS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Ja(i)}catch(u){nn(o,o.return,u)}}}function rS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Ja(i)}catch(u){nn(o,o.return,u)}}function tj(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new Q1),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new Q1),o;default:throw Error(r(435,i.tag))}}function Yf(i,o){var u=tj(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=cj.bind(null,i,p);p.then(x,x)}})}function Or(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,W=M;e:for(;W!==null;){switch(W.tag){case 27:if(io(W.type)){Tn=W.stateNode,Nr=!1;break e}break;case 5:Tn=W.stateNode,Nr=!1;break e;case 3:case 4:Tn=W.stateNode.containerInfo,Nr=!0;break e}W=W.return}if(Tn===null)throw Error(r(160));tS(w,M,x),Tn=null,Nr=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)iS(o,i),o=o.sibling}var ki=null;function iS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Or(o,i),Ir(i),p&4&&(Zs(3,i,i.return),xu(3,i),Zs(5,i,i.return));break;case 1:Or(o,i),Ir(i),p&512&&(Vn||u===null||Pi(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=ki;if(Or(o,i),Ir(i),p&512&&(Vn||u===null||Pi(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[Fr]||w[Ut]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),ir(w,p,u),w[Ut]=i,Fn(w),p=w;break e;case"link":var M=iw("link","href",x).get(p+(u.href||""));if(M){for(var W=0;W<M.length;W++)if(w=M[W],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(W,1);break t}}w=x.createElement(p),ir(w,p,u),x.head.appendChild(w);break;case"meta":if(M=iw("meta","content",x).get(p+(u.content||""))){for(W=0;W<M.length;W++)if(w=M[W],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(W,1);break t}}w=x.createElement(p),ir(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[Ut]=i,Fn(w),p=w}i.stateNode=p}else sw(x,i.type,i.stateNode);else i.stateNode=rw(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?sw(x,i.type,i.stateNode):rw(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&yg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Or(o,i),Ir(i),p&512&&(Vn||u===null||Pi(u,u.return)),u!==null&&p&4&&yg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Or(o,i),Ir(i),p&512&&(Vn||u===null||Pi(u,u.return)),i.flags&32){x=i.stateNode;try{xt(x,"")}catch(Je){nn(i,i.return,Je)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,yg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(kg=!0);break;case 6:if(Or(o,i),Ir(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Je){nn(i,i.return,Je)}}break;case 3:if(fd=null,x=ki,ki=ud(o.containerInfo),Or(o,i),ki=x,Ir(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{Ja(o.containerInfo)}catch(Je){nn(i,i.return,Je)}kg&&(kg=!1,sS(i));break;case 4:p=ki,ki=ud(i.stateNode.containerInfo),Or(o,i),Ir(i),ki=p;break;case 12:Or(o,i),Ir(i);break;case 31:Or(o,i),Ir(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Yf(i,p)));break;case 13:Or(o,i),Ir(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Zf=se()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Yf(i,p)));break;case 22:x=i.memoizedState!==null;var ne=u!==null&&u.memoizedState!==null,fe=ls,we=Vn;if(ls=fe||x,Vn=we||ne,Or(o,i),Vn=we,ls=fe,Ir(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||ne||ls||Vn||Wo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){ne=u=o;try{if(w=ne.stateNode,x)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{W=ne.stateNode;var Ae=ne.memoizedProps.style,he=Ae!=null&&Ae.hasOwnProperty("display")?Ae.display:null;W.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Je){nn(ne,ne.return,Je)}}}else if(o.tag===6){if(u===null){ne=o;try{ne.stateNode.nodeValue=x?"":ne.memoizedProps}catch(Je){nn(ne,ne.return,Je)}}}else if(o.tag===18){if(u===null){ne=o;try{var ge=ne.stateNode;x?KS(ge,!0):KS(ne.stateNode,!1)}catch(Je){nn(ne,ne.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,Yf(i,u))));break;case 19:Or(o,i),Ir(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Yf(i,p)));break;case 30:break;case 21:break;default:Or(o,i),Ir(i)}}function Ir(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(X1(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=vg(i);Kf(i,w,x);break;case 5:var M=u.stateNode;u.flags&32&&(xt(M,""),u.flags&=-33);var W=vg(i);Kf(i,W,M);break;case 3:case 4:var ne=u.stateNode.containerInfo,fe=vg(i);xg(i,fe,ne);break;default:throw Error(r(161))}}catch(we){nn(i,i.return,we)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function sS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;sS(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;)J1(i,o.alternate,o),o=o.sibling}function Wo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Zs(4,o,o.return),Wo(o);break;case 1:Pi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&K1(o,o.return,u),Wo(o);break;case 27:Nu(o.stateNode);case 26:case 5:Pi(o,o.return),Wo(o);break;case 22:o.memoizedState===null&&Wo(o);break;case 30:Wo(o);break;default:Wo(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),xu(4,w);break;case 1:if(fs(x,w,u),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(fe){nn(p,p.return,fe)}if(p=w,x=p.updateQueue,x!==null){var W=p.stateNode;try{var ne=x.shared.hiddenCallbacks;if(ne!==null)for(x.shared.hiddenCallbacks=null,x=0;x<ne.length;x++)jk(ne[x],W)}catch(fe){nn(p,p.return,fe)}}u&&M&64&&W1(w),ku(w,w.return);break;case 27:Z1(w);case 26:case 5:fs(x,w,u),u&&p===null&&M&4&&Y1(w),ku(w,w.return);break;case 12:fs(x,w,u);break;case 31:fs(x,w,u),u&&M&4&&nS(x,w);break;case 13:fs(x,w,u),u&&M&4&&rS(x,w);break;case 22:w.memoizedState===null&&fs(x,w,u),ku(w,w.return);break;case 30:break;default:fs(x,w,u)}o=o.sibling}}function Sg(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&&au(u))}function wg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&au(i))}function Si(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)oS(i,o,u,p),o=o.sibling}function oS(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:Si(i,o,u,p),x&2048&&xu(9,o);break;case 1:Si(i,o,u,p);break;case 3:Si(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&&au(i)));break;case 12:if(x&2048){Si(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,W=w.onPostCommit;typeof W=="function"&&W(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ne){nn(o,o.return,ne)}}else Si(i,o,u,p);break;case 31:Si(i,o,u,p);break;case 13:Si(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?Si(i,o,u,p):Su(i,o):w._visibility&2?Si(i,o,u,p):(w._visibility|=2,Ua(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Sg(M,o);break;case 24:Si(i,o,u,p),x&2048&&wg(o.alternate,o);break;default:Si(i,o,u,p)}}function Ua(i,o,u,p,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,W=u,ne=p,fe=M.flags;switch(M.tag){case 0:case 11:case 15:Ua(w,M,W,ne,x),xu(8,M);break;case 23:break;case 22:var we=M.stateNode;M.memoizedState!==null?we._visibility&2?Ua(w,M,W,ne,x):Su(w,M):(we._visibility|=2,Ua(w,M,W,ne,x)),x&&fe&2048&&Sg(M.alternate,M);break;case 24:Ua(w,M,W,ne,x),x&&fe&2048&&wg(M.alternate,M);break;default:Ua(w,M,W,ne,x)}o=o.sibling}}function Su(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:Su(u,p),x&2048&&Sg(p.alternate,p);break;case 24:Su(u,p),x&2048&&wg(p.alternate,p);break;default:Su(u,p)}o=o.sibling}}var wu=8192;function Ha(i,o,u){if(i.subtreeFlags&wu)for(i=i.child;i!==null;)aS(i,o,u),i=i.sibling}function aS(i,o,u){switch(i.tag){case 26:Ha(i,o,u),i.flags&wu&&i.memoizedState!==null&&Bj(u,ki,i.memoizedState,i.memoizedProps);break;case 5:Ha(i,o,u);break;case 3:case 4:var p=ki;ki=ud(i.stateNode.containerInfo),Ha(i,o,u),ki=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=wu,wu=16777216,Ha(i,o,u),wu=p):Ha(i,o,u));break;default:Ha(i,o,u)}}function lS(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 Eu(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];Zn=p,cS(p,i)}lS(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)uS(i),i=i.sibling}function uS(i){switch(i.tag){case 0:case 11:case 15:Eu(i),i.flags&2048&&Zs(9,i,i.return);break;case 3:Eu(i);break;case 12:Eu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Xf(i)):Eu(i);break;default:Eu(i)}}function Xf(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];Zn=p,cS(p,i)}lS(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Zs(8,o,o.return),Xf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,Xf(o));break;default:Xf(o)}i=i.sibling}}function cS(i,o){for(;Zn!==null;){var u=Zn;switch(u.tag){case 0:case 11:case 15:Zs(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:au(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Zn=p;else e:for(u=i;Zn!==null;){p=Zn;var x=p.sibling,w=p.return;if(eS(p),p===u){Zn=null;break e}if(x!==null){x.return=w,Zn=x;break e}Zn=w}}}var nj={getCacheForType:function(i){var o=nr(Un),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return nr(Un).controller.signal}},rj=typeof WeakMap=="function"?WeakMap:Map,Zt=0,pn=null,Lt=null,Ft=0,tn=0,Wr=null,Qs=!1,qa=!1,Eg=!1,ds=0,On=0,Js=0,Ko=0,Tg=0,Kr=0,Va=0,Tu=null,Mr=null,Cg=!1,Zf=0,fS=0,Qf=1/0,Jf=null,eo=null,Wn=0,to=null,Ga=null,ps=0,Rg=0,_g=null,dS=null,Cu=0,Ag=null;function Yr(){return(Zt&2)!==0&&Ft!==0?Ft&-Ft:q.T!==null?Lg():gn()}function pS(){if(Kr===0)if((Ft&536870912)===0||Ht){var i=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),Kr=i}else Kr=536870912;return i=Vr.current,i!==null&&(i.flags|=32),Kr}function Dr(i,o,u){(i===pn&&(tn===2||tn===9)||i.cancelPendingCommit!==null)&&(Wa(i,0),no(i,Ft,Kr,!1)),kt(i,u),((Zt&2)===0||i!==pn)&&(i===pn&&((Zt&2)===0&&(Ko|=u),On===4&&no(i,Ft,Kr,!1)),$i(i))}function hS(i,o,u){if((Zt&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||de(i,o),x=p?oj(i,o):Og(i,o,!0),w=p;do{if(x===0){qa&&!p&&no(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!ij(u)){x=Og(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 W=i;x=Tu;var ne=W.current.memoizedState.isDehydrated;if(ne&&(Wa(W,M).flags|=256),M=Og(W,M,!1),M!==2){if(Eg&&!ne){W.errorRecoveryDisabledLanes|=w,Ko|=w,x=4;break e}w=Mr,Mr=x,w!==null&&(Mr===null?Mr=w:Mr.push.apply(Mr,w))}x=M}if(w=!1,x!==2)continue}}if(x===1){Wa(i,0),no(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:no(p,o,Kr,!Qs);break e;case 2:Mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=Zf+300-se(),10<x)){if(no(p,o,Kr,!Qs),Z(p,0,!0)!==0)break e;ps=o,p.timeoutHandle=VS(mS.bind(null,p,u,Mr,Jf,Cg,o,Kr,Ko,Va,Qs,w,"Throttled",-0,0),x);break e}mS(p,u,Mr,Jf,Cg,o,Kr,Ko,Va,Qs,w,null,-0,0)}}break}while(!0);$i(i)}function mS(i,o,u,p,x,w,M,W,ne,fe,we,Ae,he,ge){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:Ue},aS(o,w,Ae);var Je=(w&62914560)===w?Zf-se():(w&4194048)===w?fS-se():0;if(Je=Uj(Ae,Je),Je!==null){ps=w,i.cancelPendingCommit=Je(wS.bind(null,i,o,w,u,p,x,M,W,ne,we,Ae,null,he,ge)),no(i,w,M,!fe);return}}wS(i,o,w,u,p,x,M,W,ne)}function ij(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(!Hr(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 no(i,o,u,p){o&=~Tg,o&=~Ko,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-et(x),M=1<<w;p[w]=-1,x&=~M}u!==0&&Fe(i,u,o)}function ed(){return(Zt&6)===0?(Ru(0),!1):!0}function Ng(){if(Lt!==null){if(tn===0)var i=Lt.return;else i=Lt,ns=$o=null,Gm(i),za=null,uu=0,i=Lt;for(;i!==null;)G1(i.alternate,i),i=i.return;Lt=null}}function Wa(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,Ej(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ps=0,Ng(),pn=i,Lt=u=es(i.current,null),Ft=o,tn=0,Wr=null,Qs=!1,qa=de(i,o),Eg=!1,Va=Kr=Tg=Ko=Js=On=0,Mr=Tu=null,Cg=!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-et(p),w=1<<x;o|=i[x],p&=~w}return ds=o,kf(),u}function gS(i,o){Rt=null,q.H=bu,o===ja||o===Af?(o=Ik(),tn=3):o===Dm?(o=Ik(),tn=4):tn=o===lg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Wr=o,Lt===null&&(On=1,Hf(i,ii(o,i.current)))}function bS(){var i=Vr.current;return i===null?!0:(Ft&4194048)===Ft?li===null:(Ft&62914560)===Ft||(Ft&536870912)!==0?i===li:!1}function yS(){var i=q.H;return q.H=bu,i===null?bu:i}function vS(){var i=q.A;return q.A=nj,i}function td(){On=4,Qs||(Ft&4194048)!==Ft&&Vr.current!==null||(qa=!0),(Js&134217727)===0&&(Ko&134217727)===0||pn===null||no(pn,Ft,Kr,!1)}function Og(i,o,u){var p=Zt;Zt|=2;var x=yS(),w=vS();(pn!==i||Ft!==o)&&(Jf=null,Wa(i,o)),o=!1;var M=On;e:do try{if(tn!==0&&Lt!==null){var W=Lt,ne=Wr;switch(tn){case 8:Ng(),M=6;break e;case 3:case 2:case 9:case 6:Vr.current===null&&(o=!0);var fe=tn;if(tn=0,Wr=null,Ka(i,W,ne,fe),u&&qa){M=0;break e}break;default:fe=tn,tn=0,Wr=null,Ka(i,W,ne,fe)}}sj(),M=On;break}catch(we){gS(i,we)}while(!0);return o&&i.shellSuspendCounter++,ns=$o=null,Zt=p,q.H=x,q.A=w,Lt===null&&(pn=null,Ft=0,kf()),M}function sj(){for(;Lt!==null;)xS(Lt)}function oj(i,o){var u=Zt;Zt|=2;var p=yS(),x=vS();pn!==i||Ft!==o?(Jf=null,Qf=se()+500,Wa(i,o)):qa=de(i,o);e:do try{if(tn!==0&&Lt!==null){o=Lt;var w=Wr;t:switch(tn){case 1:tn=0,Wr=null,Ka(i,o,w,1);break;case 2:case 9:if(Nk(w)){tn=0,Wr=null,kS(o);break}o=function(){tn!==2&&tn!==9||pn!==i||(tn=7),$i(i)},w.then(o,o);break e;case 3:tn=7;break e;case 4:tn=5;break e;case 7:Nk(w)?(tn=0,Wr=null,kS(o)):(tn=0,Wr=null,Ka(i,o,w,7));break;case 5:var M=null;switch(Lt.tag){case 26:M=Lt.memoizedState;case 5:case 27:var W=Lt;if(M?ow(M):W.stateNode.complete){tn=0,Wr=null;var ne=W.sibling;if(ne!==null)Lt=ne;else{var fe=W.return;fe!==null?(Lt=fe,nd(fe)):Lt=null}break t}}tn=0,Wr=null,Ka(i,o,w,5);break;case 6:tn=0,Wr=null,Ka(i,o,w,6);break;case 8:Ng(),On=6;break e;default:throw Error(r(462))}}aj();break}catch(we){gS(i,we)}while(!0);return ns=$o=null,q.H=p,q.A=x,Zt=u,Lt!==null?0:(pn=null,Ft=0,kf(),On)}function aj(){for(;Lt!==null&&!Ce();)xS(Lt)}function xS(i){var o=q1(i.alternate,i,ds);i.memoizedProps=i.pendingProps,o===null?nd(i):Lt=o}function kS(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=P1(u,o,o.pendingProps,o.type,void 0,Ft);break;case 11:o=P1(u,o,o.pendingProps,o.type.render,o.ref,Ft);break;case 5:Gm(o);default:G1(u,o),o=Lt=vk(o,ds),o=q1(u,o,ds)}i.memoizedProps=i.pendingProps,o===null?nd(i):Lt=o}function Ka(i,o,u,p){ns=$o=null,Gm(o),za=null,uu=0;var x=o.return;try{if(YL(i,x,o,u,Ft)){On=1,Hf(i,ii(u,i.current)),Lt=null;return}}catch(w){if(x!==null)throw Lt=x,w;On=1,Hf(i,ii(u,i.current)),Lt=null;return}o.flags&32768?(Ht||p===1?i=!0:qa||(Ft&536870912)!==0?i=!1:(Qs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Vr.current,p!==null&&p.tag===13&&(p.flags|=16384))),SS(o,i)):nd(o)}function nd(i){var o=i;do{if((o.flags&32768)!==0){SS(o,Qs);return}i=o.return;var u=QL(o.alternate,o,ds);if(u!==null){Lt=u;return}if(o=o.sibling,o!==null){Lt=o;return}Lt=o=i}while(o!==null);On===0&&(On=5)}function SS(i,o){do{var u=JL(i.alternate,i);if(u!==null){u.flags&=32767,Lt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){Lt=i;return}Lt=i=u}while(i!==null);On=6,Lt=null}function wS(i,o,u,p,x,w,M,W,ne){i.cancelPendingCommit=null;do rd();while(Wn!==0);if((Zt&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=vm,He(i,u,w,M,W,ne),i===pn&&(Lt=pn=null,Ft=0),Ga=o,to=i,ps=u,Rg=w,_g=x,dS=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,fj(be,function(){return _S(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=q.T,q.T=null,x=K.p,K.p=2,M=Zt,Zt|=4;try{ej(i,o,u)}finally{Zt=M,K.p=x,q.T=p}}Wn=1,ES(),TS(),CS()}}function ES(){if(Wn===1){Wn=0;var i=to,o=Ga,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var p=K.p;K.p=2;var x=Zt;Zt|=4;try{iS(o,i);var w=Hg,M=ck(i.containerInfo),W=w.focusedElem,ne=w.selectionRange;if(M!==W&&W&&W.ownerDocument&&uk(W.ownerDocument.documentElement,W)){if(ne!==null&&hm(W)){var fe=ne.start,we=ne.end;if(we===void 0&&(we=fe),"selectionStart"in W)W.selectionStart=fe,W.selectionEnd=Math.min(we,W.value.length);else{var Ae=W.ownerDocument||document,he=Ae&&Ae.defaultView||window;if(he.getSelection){var ge=he.getSelection(),Je=W.textContent.length,yt=Math.min(ne.start,Je),an=ne.end===void 0?yt:Math.min(ne.end,Je);!ge.extend&&yt>an&&(M=an,an=yt,yt=M);var ae=lk(W,yt),ie=lk(W,an);if(ae&&ie&&(ge.rangeCount!==1||ge.anchorNode!==ae.node||ge.anchorOffset!==ae.offset||ge.focusNode!==ie.node||ge.focusOffset!==ie.offset)){var ce=Ae.createRange();ce.setStart(ae.node,ae.offset),ge.removeAllRanges(),yt>an?(ge.addRange(ce),ge.extend(ie.node,ie.offset)):(ce.setEnd(ie.node,ie.offset),ge.addRange(ce))}}}}for(Ae=[],ge=W;ge=ge.parentNode;)ge.nodeType===1&&Ae.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<Ae.length;W++){var Re=Ae[W];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}md=!!Ug,Hg=Ug=null}finally{Zt=x,K.p=p,q.T=u}}i.current=o,Wn=2}}function TS(){if(Wn===2){Wn=0;var i=to,o=Ga,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var p=K.p;K.p=2;var x=Zt;Zt|=4;try{J1(i,o.alternate,o)}finally{Zt=x,K.p=p,q.T=u}}Wn=3}}function CS(){if(Wn===4||Wn===3){Wn=0,$e();var i=to,o=Ga,u=ps,p=dS;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Wn=5:(Wn=0,Ga=to=null,RS(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(eo=null),_t(u),o=o.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(nt,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=q.T,x=K.p,K.p=2,q.T=null;try{for(var w=i.onRecoverableError,M=0;M<p.length;M++){var W=p[M];w(W.value,{componentStack:W.stack})}}finally{q.T=o,K.p=x}}(ps&3)!==0&&rd(),$i(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===Ag?Cu++:(Cu=0,Ag=i):Cu=0,Ru(0)}}function RS(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,au(o)))}function rd(){return ES(),TS(),CS(),_S()}function _S(){if(Wn!==5)return!1;var i=to,o=Rg;Rg=0;var u=_t(ps),p=q.T,x=K.p;try{K.p=32>u?32:u,q.T=null,u=_g,_g=null;var w=to,M=ps;if(Wn=0,Ga=to=null,ps=0,(Zt&6)!==0)throw Error(r(331));var W=Zt;if(Zt|=4,uS(w.current),oS(w,w.current,M,u),Zt=W,Ru(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(nt,w)}catch{}return!0}finally{K.p=x,q.T=p,RS(i,o)}}function AS(i,o,u){o=ii(u,o),o=ag(i.stateNode,o,2),i=Ks(i,o,2),i!==null&&(kt(i,2),$i(i))}function nn(i,o,u){if(i.tag===3)AS(i,i,u);else for(;o!==null;){if(o.tag===3){AS(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(eo===null||!eo.has(p))){i=ii(u,i),u=N1(2),p=Ks(o,u,2),p!==null&&(O1(u,p,o,i),kt(p,2),$i(p));break}}o=o.return}}function Ig(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new rj;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)||(Eg=!0,x.add(u),i=lj.bind(null,i,o,u),o.then(i,i))}function lj(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,pn===i&&(Ft&u)===u&&(On===4||On===3&&(Ft&62914560)===Ft&&300>se()-Zf?(Zt&2)===0&&Wa(i,0):Tg|=u,Va===Ft&&(Va=0)),$i(i)}function NS(i,o){o===0&&(o=Xe()),i=jo(i,o),i!==null&&(kt(i,o),$i(i))}function uj(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),NS(i,u)}function cj(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),NS(i,u)}function fj(i,o){return je(i,o)}var id=null,Ya=null,Mg=!1,sd=!1,Dg=!1,ro=0;function $i(i){i!==Ya&&i.next===null&&(Ya===null?id=Ya=i:Ya=Ya.next=i),sd=!0,Mg||(Mg=!0,pj())}function Ru(i,o){if(!Dg&&sd){Dg=!0;do for(var u=!1,p=id;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var M=p.suspendedLanes,W=p.pingedLanes;w=(1<<31-et(42|i)+1)-1,w&=x&~(M&~W),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,DS(p,w))}else w=Ft,w=Z(p,p===pn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||de(p,w)||(u=!0,DS(p,w));p=p.next}while(u);Dg=!1}}function dj(){OS()}function OS(){sd=Mg=!1;var i=0;ro!==0&&wj()&&(i=ro);for(var o=se(),u=null,p=id;p!==null;){var x=p.next,w=IS(p,o);w===0?(p.next=null,u===null?id=x:u.next=x,x===null&&(Ya=u)):(u=p,(i!==0||(w&3)!==0)&&(sd=!0)),p=x}Wn!==0&&Wn!==5||Ru(i),ro!==0&&(ro=0)}function IS(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-et(w),W=1<<M,ne=x[M];ne===-1?((W&u)===0||(W&p)!==0)&&(x[M]=Oe(W,o)):ne<=o&&(i.expiredLanes|=W),w&=~W}if(o=pn,u=Ft,u=Z(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(tn===2||tn===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&We(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||de(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&We(p),_t(u)){case 2:case 8:u=ee;break;case 32:u=be;break;case 268435456:u=Ye;break;default:u=be}return p=MS.bind(null,i),u=je(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&We(p),i.callbackPriority=2,i.callbackNode=null,2}function MS(i,o){if(Wn!==0&&Wn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(rd()&&i.callbackNode!==u)return null;var p=Ft;return p=Z(i,i===pn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(hS(i,p,o),IS(i,se()),i.callbackNode!=null&&i.callbackNode===u?MS.bind(null,i):null)}function DS(i,o){if(rd())return null;hS(i,o,!0)}function pj(){Tj(function(){(Zt&6)!==0?je(Q,dj):OS()})}function Lg(){if(ro===0){var i=Da;i===0&&(i=lt,lt<<=1,(lt&261888)===0&&(lt=256)),ro=i}return ro}function LS(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Fs(""+i)}function jS(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 hj(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=LS((x[ot]||null).action),M=p.submitter;M&&(o=(o=M[ot]||null)?LS(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var W=new bf("action","action",null,p,x);i.push({event:W,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ro!==0){var ne=M?jS(x,M):new FormData(x);tg(u,{pending:!0,data:ne,method:x.method,action:w},null,ne)}}else typeof w=="function"&&(W.preventDefault(),ne=M?jS(x,M):new FormData(x),tg(u,{pending:!0,data:ne,method:x.method,action:w},w,ne))},currentTarget:x}]})}}for(var jg=0;jg<ym.length;jg++){var zg=ym[jg],mj=zg.toLowerCase(),gj=zg[0].toUpperCase()+zg.slice(1);xi(mj,"on"+gj)}xi(pk,"onAnimationEnd"),xi(hk,"onAnimationIteration"),xi(mk,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(IL,"onTransitionRun"),xi(ML,"onTransitionStart"),xi(DL,"onTransitionCancel"),xi(gk,"onTransitionEnd"),De("onMouseEnter",["mouseout","mouseover"]),De("onMouseLeave",["mouseout","mouseover"]),De("onPointerEnter",["pointerout","pointerover"]),De("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 _u="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(" "),bj=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_u));function zS(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 W=p[M],ne=W.instance,fe=W.currentTarget;if(W=W.listener,ne!==w&&x.isPropagationStopped())break e;w=W,x.currentTarget=fe;try{w(x)}catch(we){xf(we)}x.currentTarget=null,w=ne}else for(M=0;M<p.length;M++){if(W=p[M],ne=W.instance,fe=W.currentTarget,W=W.listener,ne!==w&&x.isPropagationStopped())break e;w=W,x.currentTarget=fe;try{w(x)}catch(we){xf(we)}x.currentTarget=null,w=ne}}}}function jt(i,o){var u=o[Jn];u===void 0&&(u=o[Jn]=new Set);var p=i+"__bubble";u.has(p)||(PS(o,i,2,!1),u.add(p))}function Pg(i,o,u){var p=0;o&&(p|=4),PS(u,i,p,o)}var od="_reactListening"+Math.random().toString(36).slice(2);function $g(i){if(!i[od]){i[od]=!0,uf.forEach(function(u){u!=="selectionchange"&&(bj.has(u)||Pg(u,!1,i),Pg(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[od]||(o[od]=!0,Pg("selectionchange",!1,o))}}function PS(i,o,u,p){switch(pw(o)){case 2:var x=Vj;break;case 8:x=Gj;break;default:x=eb}u=x.bind(null,o,u,i),x=void 0,!sm||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 Fg(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 W=p.stateNode.containerInfo;if(W===x)break;if(M===4)for(M=p.return;M!==null;){var ne=M.tag;if((ne===3||ne===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;W!==null;){if(M=$n(W),M===null)return;if(ne=M.tag,ne===5||ne===6||ne===26||ne===27){p=w=M;continue e}W=W.parentNode}}p=p.return}pf(function(){var fe=w,we=Tt(u),Ae=[];e:{var he=bk.get(i);if(he!==void 0){var ge=bf,Je=i;switch(i){case"keypress":if(mf(u)===0)break e;case"keydown":case"keyup":ge=cL;break;case"focusin":Je="focus",ge=um;break;case"focusout":Je="blur",ge=um;break;case"beforeblur":case"afterblur":ge=um;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":ge=Gx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=QD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=pL;break;case pk:case hk:case mk:ge=tL;break;case gk:ge=mL;break;case"scroll":case"scrollend":ge=XD;break;case"wheel":ge=bL;break;case"copy":case"cut":case"paste":ge=rL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=Kx;break;case"toggle":case"beforetoggle":ge=vL}var yt=(o&4)!==0,an=!yt&&(i==="scroll"||i==="scrollend"),ae=yt?he!==null?he+"Capture":null:he;yt=[];for(var ie=fe,ce;ie!==null;){var Re=ie;if(ce=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||ce===null||ae===null||(Re=Xl(ie,ae),Re!=null&&yt.push(Au(ie,Re,ce))),an)break;ie=ie.return}0<yt.length&&(he=new ge(he,Je,null,u,we),Ae.push({event:he,listeners:yt}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",he&&u!==rt&&(Je=u.relatedTarget||u.fromElement)&&($n(Je)||Je[Sn]))break e;if((ge||he)&&(he=we.window===we?we:(he=we.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(Je=u.relatedTarget||u.toElement,ge=fe,Je=Je?$n(Je):null,Je!==null&&(an=a(Je),yt=Je.tag,Je!==an||yt!==5&&yt!==27&&yt!==6)&&(Je=null)):(ge=null,Je=fe),ge!==Je)){if(yt=Gx,Re="onMouseLeave",ae="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(yt=Kx,Re="onPointerLeave",ae="onPointerEnter",ie="pointer"),an=ge==null?he:zs(ge),ce=Je==null?he:zs(Je),he=new yt(Re,ie+"leave",ge,u,we),he.target=an,he.relatedTarget=ce,Re=null,$n(we)===fe&&(yt=new yt(ae,ie+"enter",Je,u,we),yt.target=ce,yt.relatedTarget=an,Re=yt),an=Re,ge&&Je)t:{for(yt=yj,ae=ge,ie=Je,ce=0,Re=ae;Re;Re=yt(Re))ce++;Re=0;for(var dt=ie;dt;dt=yt(dt))Re++;for(;0<ce-Re;)ae=yt(ae),ce--;for(;0<Re-ce;)ie=yt(ie),Re--;for(;ce--;){if(ae===ie||ie!==null&&ae===ie.alternate){yt=ae;break t}ae=yt(ae),ie=yt(ie)}yt=null}else yt=null;ge!==null&&$S(Ae,he,ge,yt,!1),Je!==null&&an!==null&&$S(Ae,an,Je,yt,!0)}}e:{if(he=fe?zs(fe):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var Kt=nk;else if(ek(he))if(rk)Kt=AL;else{Kt=RL;var it=CL}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?fe&&$s(fe.elementType)&&(Kt=nk):Kt=_L;if(Kt&&(Kt=Kt(i,fe))){tk(Ae,Kt,u,we);break e}it&&it(i,he,fe),i==="focusout"&&fe&&he.type==="number"&&fe.memoizedProps.value!=null&&wa(he,"number",he.value)}switch(it=fe?zs(fe):window,i){case"focusin":(ek(it)||it.contentEditable==="true")&&(Ca=it,mm=fe,iu=null);break;case"focusout":iu=mm=Ca=null;break;case"mousedown":gm=!0;break;case"contextmenu":case"mouseup":case"dragend":gm=!1,fk(Ae,u,we);break;case"selectionchange":if(OL)break;case"keydown":case"keyup":fk(Ae,u,we)}var At;if(fm)e:{switch(i){case"compositionstart":var Bt="onCompositionStart";break e;case"compositionend":Bt="onCompositionEnd";break e;case"compositionupdate":Bt="onCompositionUpdate";break e}Bt=void 0}else Ta?Qx(i,u)&&(Bt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Bt="onCompositionStart");Bt&&(Yx&&u.locale!=="ko"&&(Ta||Bt!=="onCompositionStart"?Bt==="onCompositionEnd"&&Ta&&(At=qx()):(Bs=we,om="value"in Bs?Bs.value:Bs.textContent,Ta=!0)),it=ad(fe,Bt),0<it.length&&(Bt=new Wx(Bt,i,null,u,we),Ae.push({event:Bt,listeners:it}),At?Bt.data=At:(At=Jx(u),At!==null&&(Bt.data=At)))),(At=kL?SL(i,u):wL(i,u))&&(Bt=ad(fe,"onBeforeInput"),0<Bt.length&&(it=new Wx("onBeforeInput","beforeinput",null,u,we),Ae.push({event:it,listeners:Bt}),it.data=At)),hj(Ae,i,fe,u,we)}zS(Ae,o)})}function Au(i,o,u){return{instance:i,listener:o,currentTarget:u}}function ad(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=Xl(i,u),x!=null&&p.unshift(Au(i,x,w)),x=Xl(i,o),x!=null&&p.push(Au(i,x,w))),i.tag===3)return p;i=i.return}return[]}function yj(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function $S(i,o,u,p,x){for(var w=o._reactName,M=[];u!==null&&u!==p;){var W=u,ne=W.alternate,fe=W.stateNode;if(W=W.tag,ne!==null&&ne===p)break;W!==5&&W!==26&&W!==27||fe===null||(ne=fe,x?(fe=Xl(u,w),fe!=null&&M.unshift(Au(u,fe,ne))):x||(fe=Xl(u,w),fe!=null&&M.push(Au(u,fe,ne)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var vj=/\r\n?/g,xj=/\u0000|\uFFFD/g;function FS(i){return(typeof i=="string"?i:""+i).replace(vj,`
|
|
9
|
+
`).replace(xj,"")}function BS(i,o){return o=FS(o),FS(i)===o}function on(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||xt(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&xt(i,""+p);break;case"className":Br(i,"class",p);break;case"tabIndex":Br(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Br(i,u,p);break;case"style":en(i,p,w);break;case"data":if(o!=="object"){Br(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=Fs(""+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"&&on(i,o,"name",x.name,x,null),on(i,o,"formEncType",x.formEncType,x,null),on(i,o,"formMethod",x.formMethod,x,null),on(i,o,"formTarget",x.formTarget,x,null)):(on(i,o,"encType",x.encType,x,null),on(i,o,"method",x.method,x,null),on(i,o,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Fs(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ue);break;case"onScroll":p!=null&&jt("scroll",i);break;case"onScrollEnd":p!=null&&jt("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=Fs(""+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":jt("beforetoggle",i),jt("toggle",i),lr(i,"popover",p);break;case"xlinkActuate":Rr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Rr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Rr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Rr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Rr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Rr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Rr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":lr(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,lr(i,u,p))}}function Bg(i,o,u,p,x,w){switch(u){case"style":en(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"?xt(i,p):(typeof p=="number"||typeof p=="bigint")&&xt(i,""+p);break;case"onScroll":p!=null&&jt("scroll",i);break;case"onScrollEnd":p!=null&&jt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ue);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oo.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[ot]||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,""):lr(i,u,p)}}}function ir(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jt("error",i),jt("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:on(i,o,w,M,u,null)}}x&&on(i,o,"srcSet",u.srcSet,u,null),p&&on(i,o,"src",u.src,u,null);return;case"input":jt("invalid",i);var W=w=M=x=null,ne=null,fe=null;for(p in u)if(u.hasOwnProperty(p)){var we=u[p];if(we!=null)switch(p){case"name":x=we;break;case"type":M=we;break;case"checked":ne=we;break;case"defaultChecked":fe=we;break;case"value":w=we;break;case"defaultValue":W=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(r(137,o));break;default:on(i,o,p,we,u,null)}}Io(i,w,W,ne,fe,M,x,!1);return;case"select":jt("invalid",i),p=M=w=null;for(x in u)if(u.hasOwnProperty(x)&&(W=u[x],W!=null))switch(x){case"value":w=W;break;case"defaultValue":M=W;break;case"multiple":p=W;default:on(i,o,x,W,u,null)}o=w,u=M,i.multiple=!!p,o!=null?er(i,!!p,o,!1):u!=null&&er(i,!!p,u,!0);return;case"textarea":jt("invalid",i),w=x=p=null;for(M in u)if(u.hasOwnProperty(M)&&(W=u[M],W!=null))switch(M){case"value":p=W;break;case"defaultValue":x=W;break;case"children":w=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:on(i,o,M,W,u,null)}Ea(i,p,x,w);return;case"option":for(ne in u)u.hasOwnProperty(ne)&&(p=u[ne],p!=null)&&(ne==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":on(i,o,ne,p,u,null));return;case"dialog":jt("beforetoggle",i),jt("toggle",i),jt("cancel",i),jt("close",i);break;case"iframe":case"object":jt("load",i);break;case"video":case"audio":for(p=0;p<_u.length;p++)jt(_u[p],i);break;case"image":jt("error",i),jt("load",i);break;case"details":jt("toggle",i);break;case"embed":case"source":case"link":jt("error",i),jt("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(fe in u)if(u.hasOwnProperty(fe)&&(p=u[fe],p!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:on(i,o,fe,p,u,null)}return;default:if($s(o)){for(we in u)u.hasOwnProperty(we)&&(p=u[we],p!==void 0&&Bg(i,o,we,p,u,void 0));return}}for(W in u)u.hasOwnProperty(W)&&(p=u[W],p!=null&&on(i,o,W,p,u,null))}function kj(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,W=null,ne=null,fe=null,we=null;for(ge in u){var Ae=u[ge];if(u.hasOwnProperty(ge)&&Ae!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":ne=Ae;default:p.hasOwnProperty(ge)||on(i,o,ge,null,p,Ae)}}for(var he in p){var ge=p[he];if(Ae=u[he],p.hasOwnProperty(he)&&(ge!=null||Ae!=null))switch(he){case"type":w=ge;break;case"name":x=ge;break;case"checked":fe=ge;break;case"defaultChecked":we=ge;break;case"value":M=ge;break;case"defaultValue":W=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,o));break;default:ge!==Ae&&on(i,o,he,ge,p,Ae)}}Wl(i,M,W,ne,fe,we,w,x);return;case"select":ge=M=W=he=null;for(w in u)if(ne=u[w],u.hasOwnProperty(w)&&ne!=null)switch(w){case"value":break;case"multiple":ge=ne;default:p.hasOwnProperty(w)||on(i,o,w,null,p,ne)}for(x in p)if(w=p[x],ne=u[x],p.hasOwnProperty(x)&&(w!=null||ne!=null))switch(x){case"value":he=w;break;case"defaultValue":W=w;break;case"multiple":M=w;default:w!==ne&&on(i,o,x,w,p,ne)}o=W,u=M,p=ge,he!=null?er(i,!!u,he,!1):!!p!=!!u&&(o!=null?er(i,!!u,o,!0):er(i,!!u,u?[]:"",!1));return;case"textarea":ge=he=null;for(W in u)if(x=u[W],u.hasOwnProperty(W)&&x!=null&&!p.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:on(i,o,W,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":he=x;break;case"defaultValue":ge=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&on(i,o,M,x,p,w)}ff(i,he,ge);return;case"option":for(var Je in u)he=u[Je],u.hasOwnProperty(Je)&&he!=null&&!p.hasOwnProperty(Je)&&(Je==="selected"?i.selected=!1:on(i,o,Je,null,p,he));for(ne in p)he=p[ne],ge=u[ne],p.hasOwnProperty(ne)&&he!==ge&&(he!=null||ge!=null)&&(ne==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":on(i,o,ne,he,p,ge));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 yt in u)he=u[yt],u.hasOwnProperty(yt)&&he!=null&&!p.hasOwnProperty(yt)&&on(i,o,yt,null,p,he);for(fe in p)if(he=p[fe],ge=u[fe],p.hasOwnProperty(fe)&&he!==ge&&(he!=null||ge!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,o));break;default:on(i,o,fe,he,p,ge)}return;default:if($s(o)){for(var an in u)he=u[an],u.hasOwnProperty(an)&&he!==void 0&&!p.hasOwnProperty(an)&&Bg(i,o,an,void 0,p,he);for(we in p)he=p[we],ge=u[we],!p.hasOwnProperty(we)||he===ge||he===void 0&&ge===void 0||Bg(i,o,we,he,p,ge);return}}for(var ae in u)he=u[ae],u.hasOwnProperty(ae)&&he!=null&&!p.hasOwnProperty(ae)&&on(i,o,ae,null,p,he);for(Ae in p)he=p[Ae],ge=u[Ae],!p.hasOwnProperty(Ae)||he===ge||he==null&&ge==null||on(i,o,Ae,he,p,ge)}function US(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sj(){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,W=x.duration;if(w&&W&&US(M)){for(M=0,W=x.responseEnd,p+=1;p<u.length;p++){var ne=u[p],fe=ne.startTime;if(fe>W)break;var we=ne.transferSize,Ae=ne.initiatorType;we&&US(Ae)&&(ne=ne.responseEnd,M+=we*(ne<W?1:(W-fe)/(ne-fe)))}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 Ug=null,Hg=null;function ld(i){return i.nodeType===9?i:i.ownerDocument}function HS(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 qS(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 qg(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 Vg=null;function wj(){var i=window.event;return i&&i.type==="popstate"?i===Vg?!1:(Vg=i,!0):(Vg=null,!1)}var VS=typeof setTimeout=="function"?setTimeout:void 0,Ej=typeof clearTimeout=="function"?clearTimeout:void 0,GS=typeof Promise=="function"?Promise:void 0,Tj=typeof queueMicrotask=="function"?queueMicrotask:typeof GS<"u"?function(i){return GS.resolve(null).then(i).catch(Cj)}:VS;function Cj(i){setTimeout(function(){throw i})}function io(i){return i==="head"}function WS(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),Ja(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Nu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Nu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,W=w.nodeName;w[Fr]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&Nu(i.ownerDocument.body);u=x}while(u);Ja(o)}function KS(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 Gg(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":Gg(u),Li(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function Rj(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[Fr])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=ui(i.nextSibling),i===null)break}return null}function _j(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=ui(i.nextSibling),i===null))return null;return i}function YS(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=ui(i.nextSibling),i===null))return null;return i}function Wg(i){return i.data==="$?"||i.data==="$~"}function Kg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function Aj(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 ui(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 Yg=null;function XS(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return ui(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function ZS(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 QS(i,o,u){switch(o=ld(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 Nu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Li(i)}var ci=new Map,JS=new Set;function ud(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var hs=K.d;K.d={f:Nj,r:Oj,D:Ij,C:Mj,L:Dj,m:Lj,X:zj,S:jj,M:Pj};function Nj(){var i=hs.f(),o=ed();return i||o}function Oj(i){var o=vr(i);o!==null&&o.tag===5&&o.type==="form"?g1(o):hs.r(i)}var Xa=typeof document>"u"?null:document;function ew(i,o,u){var p=Xa;if(p&&typeof o=="string"&&o){var x=_r(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),JS.has(x)||(JS.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),ir(o,"link",i),Fn(o),p.head.appendChild(o)))}}function Ij(i){hs.D(i),ew("dns-prefetch",i,null)}function Mj(i,o){hs.C(i,o),ew("preconnect",i,o)}function Dj(i,o,u){hs.L(i,o,u);var p=Xa;if(p&&i&&o){var x='link[rel="preload"][as="'+_r(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+_r(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+_r(u.imageSizes)+'"]')):x+='[href="'+_r(i)+'"]';var w=x;switch(o){case"style":w=Za(i);break;case"script":w=Qa(i)}ci.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),ci.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Ou(w))||o==="script"&&p.querySelector(Iu(w))||(o=p.createElement("link"),ir(o,"link",i),Fn(o),p.head.appendChild(o)))}}function Lj(i,o){hs.m(i,o);var u=Xa;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+_r(p)+'"][href="'+_r(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Qa(i)}if(!ci.has(w)&&(i=m({rel:"modulepreload",href:i},o),ci.set(w,i),u.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Iu(w)))return}p=u.createElement("link"),ir(p,"link",i),Fn(p),u.head.appendChild(p)}}}function jj(i,o,u){hs.S(i,o,u);var p=Xa;if(p&&i){var x=Ps(p).hoistableStyles,w=Za(i);o=o||"default";var M=x.get(w);if(!M){var W={loading:0,preload:null};if(M=p.querySelector(Ou(w)))W.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=ci.get(w))&&Xg(i,u);var ne=M=p.createElement("link");Fn(ne),ir(ne,"link",i),ne._p=new Promise(function(fe,we){ne.onload=fe,ne.onerror=we}),ne.addEventListener("load",function(){W.loading|=1}),ne.addEventListener("error",function(){W.loading|=2}),W.loading|=4,cd(M,o,p)}M={type:"stylesheet",instance:M,count:1,state:W},x.set(w,M)}}}function zj(i,o){hs.X(i,o);var u=Xa;if(u&&i){var p=Ps(u).hoistableScripts,x=Qa(i),w=p.get(x);w||(w=u.querySelector(Iu(x)),w||(i=m({src:i,async:!0},o),(o=ci.get(x))&&Zg(i,o),w=u.createElement("script"),Fn(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function Pj(i,o){hs.M(i,o);var u=Xa;if(u&&i){var p=Ps(u).hoistableScripts,x=Qa(i),w=p.get(x);w||(w=u.querySelector(Iu(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=ci.get(x))&&Zg(i,o),w=u.createElement("script"),Fn(w),ir(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function tw(i,o,u,p){var x=(x=J.current)?ud(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=Za(u.href),u=Ps(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=Za(u.href);var w=Ps(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(Ou(i)))&&!w._p&&(M.instance=w,M.state.loading=5),ci.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},ci.set(i,u),w||$j(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=Qa(u),u=Ps(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 Za(i){return'href="'+_r(i)+'"'}function Ou(i){return'link[rel="stylesheet"]['+i+"]"}function nw(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function $j(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}),ir(o,"link",u),Fn(o),i.head.appendChild(o))}function Qa(i){return'[src="'+_r(i)+'"]'}function Iu(i){return"script[async]"+i}function rw(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+_r(u.href)+'"]');if(p)return o.instance=p,Fn(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"),Fn(p),ir(p,"style",x),cd(p,u.precedence,i),o.instance=p;case"stylesheet":x=Za(u.href);var w=i.querySelector(Ou(x));if(w)return o.state.loading|=4,o.instance=w,Fn(w),w;p=nw(u),(x=ci.get(x))&&Xg(p,x),w=(i.ownerDocument||i).createElement("link"),Fn(w);var M=w;return M._p=new Promise(function(W,ne){M.onload=W,M.onerror=ne}),ir(w,"link",p),o.state.loading|=4,cd(w,u.precedence,i),o.instance=w;case"script":return w=Qa(u.src),(x=i.querySelector(Iu(w)))?(o.instance=x,Fn(x),x):(p=u,(x=ci.get(w))&&(p=m({},u),Zg(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),Fn(x),ir(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,cd(p,u.precedence,i));return o.instance}function cd(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 W=p[M];if(W.dataset.precedence===o)w=W;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 Xg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Zg(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var fd=null;function iw(i,o,u){if(fd===null){var p=new Map,x=fd=new Map;x.set(u,p)}else x=fd,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[Fr]||w[Ut]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var W=p.get(M);W?W.push(w):p.set(M,[w])}}return p}function sw(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function Fj(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 ow(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Bj(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=Za(p.href),w=o.querySelector(Ou(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=dd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,Fn(w);return}w=o.ownerDocument||o,p=nw(p),(x=ci.get(x))&&Xg(p,x),w=w.createElement("link"),Fn(w);var M=w;M._p=new Promise(function(W,ne){M.onload=W,M.onerror=ne}),ir(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=dd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Qg=0;function Uj(i,o){return i.stylesheets&&i.count===0&&hd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&hd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&Qg===0&&(Qg=62500*Sj());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&hd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>Qg?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function dd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var pd=null;function hd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,pd=new Map,o.forEach(Hj,i),pd=null,dd.call(i))}function Hj(i,o){if(!(o.state.loading&4)){var u=pd.get(i);if(u)var p=u.get(null);else{u=new Map,pd.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=dd.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 Mu={$$typeof:R,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function qj(i,o,u,p,x,w,M,W,ne){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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ne,this.incompleteTransitions=new Map}function aw(i,o,u,p,x,w,M,W,ne,fe,we,Ae){return i=new qj(i,o,u,M,ne,fe,we,Ae,W),o=1,w===!0&&(o|=24),w=qr(3,null,null,o),i.current=w,w.stateNode=i,o=Om(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},Lm(w),i}function lw(i){return i?(i=Aa,i):Aa}function uw(i,o,u,p,x,w){x=lw(x),p.context===null?p.context=x:p.pendingContext=x,p=Ws(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Ks(i,p,o),u!==null&&(Dr(u,i,o),fu(u,i,o))}function cw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Jg(i,o){cw(i,o),(i=i.alternate)&&cw(i,o)}function fw(i){if(i.tag===13||i.tag===31){var o=jo(i,67108864);o!==null&&Dr(o,i,67108864),Jg(i,67108864)}}function dw(i){if(i.tag===13||i.tag===31){var o=Yr();o=st(o);var u=jo(i,o);u!==null&&Dr(u,i,o),Jg(i,o)}}var md=!0;function Vj(i,o,u,p){var x=q.T;q.T=null;var w=K.p;try{K.p=2,eb(i,o,u,p)}finally{K.p=w,q.T=x}}function Gj(i,o,u,p){var x=q.T;q.T=null;var w=K.p;try{K.p=8,eb(i,o,u,p)}finally{K.p=w,q.T=x}}function eb(i,o,u,p){if(md){var x=tb(p);if(x===null)Fg(i,o,p,gd,u),hw(i,p);else if(Kj(x,i,o,u,p))p.stopPropagation();else if(hw(i,p),o&4&&-1<Wj.indexOf(i)){for(;x!==null;){var w=vr(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=Ze(w.pendingLanes);if(M!==0){var W=w;for(W.pendingLanes|=2,W.entangledLanes|=2;M;){var ne=1<<31-et(M);W.entanglements[1]|=ne,M&=~ne}$i(w),(Zt&6)===0&&(Qf=se()+500,Ru(0))}}break;case 31:case 13:W=jo(w,2),W!==null&&Dr(W,w,2),ed(),Jg(w,2)}if(w=tb(p),w===null&&Fg(i,o,p,gd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Fg(i,o,p,null,u)}}function tb(i){return i=Tt(i),nb(i)}var gd=null;function nb(i){if(gd=null,i=$n(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 gd=i,null}function pw(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(Ee()){case Q:return 2;case ee:return 8;case be:case Ne:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var rb=!1,so=null,oo=null,ao=null,Du=new Map,Lu=new Map,lo=[],Wj="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 hw(i,o){switch(i){case"focusin":case"focusout":so=null;break;case"dragenter":case"dragleave":oo=null;break;case"mouseover":case"mouseout":ao=null;break;case"pointerover":case"pointerout":Du.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lu.delete(o.pointerId)}}function ju(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=vr(o),o!==null&&fw(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function Kj(i,o,u,p,x){switch(o){case"focusin":return so=ju(so,i,o,u,p,x),!0;case"dragenter":return oo=ju(oo,i,o,u,p,x),!0;case"mouseover":return ao=ju(ao,i,o,u,p,x),!0;case"pointerover":var w=x.pointerId;return Du.set(w,ju(Du.get(w)||null,i,o,u,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Lu.set(w,ju(Lu.get(w)||null,i,o,u,p,x)),!0}return!1}function mw(i){var o=$n(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,bn(i.priority,function(){dw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,bn(i.priority,function(){dw(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 bd(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=tb(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=vr(u),o!==null&&fw(o),i.blockedOn=u,!1;o.shift()}return!0}function gw(i,o,u){bd(i)&&u.delete(o)}function Yj(){rb=!1,so!==null&&bd(so)&&(so=null),oo!==null&&bd(oo)&&(oo=null),ao!==null&&bd(ao)&&(ao=null),Du.forEach(gw),Lu.forEach(gw)}function yd(i,o){i.blockedOn===o&&(i.blockedOn=null,rb||(rb=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Yj)))}var vd=null;function bw(i){vd!==i&&(vd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vd===i&&(vd=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(nb(p||u)===null)continue;break}var w=vr(u);w!==null&&(i.splice(o,3),o-=3,tg(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function Ja(i){function o(ne){return yd(ne,i)}so!==null&&yd(so,i),oo!==null&&yd(oo,i),ao!==null&&yd(ao,i),Du.forEach(o),Lu.forEach(o);for(var u=0;u<lo.length;u++){var p=lo[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<lo.length&&(u=lo[0],u.blockedOn===null);)mw(u),u.blockedOn===null&&lo.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[ot]||null;if(typeof w=="function")M||bw(u);else if(M){var W=null;if(w&&w.hasAttribute("formAction")){if(x=w,M=w[ot]||null)W=M.formAction;else if(nb(x)!==null)continue}else W=M.action;typeof W=="function"?u[p+1]=W:(u.splice(p,3),p-=3),bw(u)}}}function yw(){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 ib(i){this._internalRoot=i}xd.prototype.render=ib.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Yr();uw(u,p,i,o,null,null)},xd.prototype.unmount=ib.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;uw(i.current,2,null,i,null,null),ed(),o[Sn]=null}};function xd(i){this._internalRoot=i}xd.prototype.unstable_scheduleHydration=function(i){if(i){var o=gn();i={blockedOn:null,target:i,priority:o};for(var u=0;u<lo.length&&o!==0&&o<lo[u].priority;u++);lo.splice(u,0,i),u===0&&mw(i)}};var vw=t.version;if(vw!=="19.2.6")throw Error(r(527,vw,"19.2.6"));K.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=d(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var Xj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{nt=kd.inject(Xj),vt=kd}catch{}}return Pu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=C1,w=R1,M=_1;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=aw(i,1,!1,null,null,u,p,null,x,w,M,yw),i[Sn]=o.current,$g(i),new ib(o)},Pu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=C1,M=R1,W=_1,ne=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&&(W=u.onRecoverableError),u.formState!==void 0&&(ne=u.formState)),o=aw(i,1,!0,o,u??null,p,x,ne,w,M,W,yw),o.context=lw(null),u=o.current,p=Yr(),p=st(p),x=Ws(p),x.callback=null,Ks(u,x,p),u=p,o.current.lanes=u,kt(o,u),$i(o),i[Sn]=o.current,$g(i),new xd(o)},Pu.version="19.2.6",Pu}var Aw;function az(){if(Aw)return ab.exports;Aw=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(),ab.exports=oz(),ab.exports}var lz=az(),$u={},Nw;function uz(){if(Nw)return $u;Nw=1,Object.defineProperty($u,"__esModule",{value:!0}),$u.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 d=[],h="",m=null,b="",y=a?null:e,S=new Array(arguments.length),k=0;k<arguments.length;k++)S[k]=arguments[k];for(;S.length>0;){var T=S.pop();if(!(T==null||T===!1)){if(Array.isArray(T)){for(var C=0;C<T.length;C++)S.push(T[C]);continue}var E=c!=null?c(T):T;if(E.$$css!=null){var R="";if(y!=null&&y.has(E)){var _=y.get(E);_!=null&&(R=_[0],b=_[2],d.push.apply(d,_[1]),y=_[3])}else{var D=[];for(var A in E){var N=E[A];if(A===t){var P=E[A];P!==!0&&(b=b?P+"; "+b:P);continue}typeof N=="string"||N===null?d.includes(A)||(d.push(A),y!=null&&D.push(A),typeof N=="string"&&(R+=R?" "+N:N)):console.error("styleq: ".concat(A," typeof ").concat(String(N),' is not "string" or "null".'))}if(y!=null){var $=new WeakMap;y.set(E,[R,D,b,$]),y=$}}R&&(h=h?R+" "+h:R)}else if(l)m==null&&(m={}),m=Object.assign({},E,m);else{var I=null;for(var V in E){var B=E[V];B!==void 0&&(d.includes(V)||(B!=null&&(m==null&&(m={}),I==null&&(I={}),I[V]=B),d.push(V),y=null))}I!=null&&(m=Object.assign(I,m))}}}var z=[h,m,b];return z}}var r=$u.styleq=n();return r.factory=n,$u}var cz=uz();function Dt(...e){const[t,n,r]=cz.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 c_(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=c_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fz(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=c_(e))&&(r&&(r+=" "),r+=t);return r}function Qt(...e){return fz(e)}function qt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=Dt(t);return{className:Qt(e,s.className,n),style:{...s.style,...r}}}const dz={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},Ti={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},sizeMd:{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},pillSizeMd:{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-18wk26n",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-t9f1jb",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-qhj6il",$$css:!0}};function pz({pill:e,size:t,variant:n}){return[Ti.base,t==="sm"?Ti.sizeSm:Ti.sizeMd,e?[Ti.pill,t==="sm"?Ti.pillSizeSm:Ti.pillSizeMd]:null,hz(n)]}function hz(e){switch(e){case"accent":return Ti.variantAccent;case"neutral":return Ti.variantNeutral;case"success":return Ti.variantSuccess;case"warn":return Ti.variantWarn;case"danger":return Ti.variantDanger}}function ko({children:e,variant:t="neutral",size:n="md",pill:r=!1,as:s="span",className:a,style:l,...c}){const f=qt({rootClass:"ui-status-badge",stylexStyles:pz({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:f.className,style:f.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function mz(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 Mn=mz("https://base-ui.com/production-error","Base UI"),Ow={};function gr(e,t){const n=v.useRef(Ow);return n.current===Ow&&(n.current=e(t)),n}function So(e,t,n,r){const s=gr(f_).current;return bz(s,e,t,n,r)&&d_(s,[e,t,n,r]),s.callback}function gz(e){const t=gr(f_).current;return yz(t,e)&&d_(t,e),t.callback}function f_(){return{callback:null,cleanup:null,refs:[]}}function bz(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function yz(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function d_(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 vz=parseInt(v.version,10);function Gv(e){return vz>=e}function Iw(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(Gv(19)?n?.ref:t.ref)??null}function Ay(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Cn(){}const Yi=Object.freeze([]),In=Object.freeze({});function xz(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 kz(e,t){return typeof e=="function"?e(t):e}function p_(e,t){return typeof e=="function"?e(t):e}const Wv={};function ra(e,t,n,r,s){if(!n&&!r&&!s&&!e)return xp(t);let a=xp(e);return t&&(a=nc(a,t)),n&&(a=nc(a,n)),r&&(a=nc(a,r)),s&&(a=nc(a,s)),a}function Sz(e){if(e.length===0)return Wv;if(e.length===1)return xp(e[0]);let t=xp(e[0]);for(let n=1;n<e.length;n+=1)t=nc(t,e[n]);return t}function xp(e){return Kv(e)?{...m_(e,Wv)}:wz(e)}function nc(e,t){return Kv(t)?m_(t,e):Ez(e,t)}function wz(e){const t={...e};for(const n in t){const r=t[n];h_(n,r)&&(t[n]=g_(r))}return t}function Ez(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Ay(e.style,r);break}case"className":{e[n]=b_(e.className,r);break}default:h_(n,r)?e[n]=Tz(e[n],r):e[n]=r}}return e}function h_(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 Kv(e){return typeof e=="function"}function m_(e,t){return Kv(e)?e(t):e??Wv}function Tz(e,t){return t?e?(...n)=>{const r=n[0];if(y_(r)){const a=r;kp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:g_(t):e}function g_(e){return e&&((...t)=>{const n=t[0];return y_(n)&&kp(n),e(...t)})}function kp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function b_(e,t){return t?e?t+" "+e:t:e}function y_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function dn(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Az(r));const s=Cz(t,n,r);if(n.enabled===!1)return null;const a=n.state??In;return Nz(e,r,s,a)}function Cz(e,t,n){const{className:r,style:s}=e,{state:a=In,ref:l,props:c,stateAttributesMapping:f,enabled:d=!0}=t,h=d?kz(r,a):void 0,m=d?p_(s,a):void 0,b=d?xz(a,f):In,y=d&&c?Rz(c):void 0,S=d?Ay(b,y)??{}:In;return typeof document<"u"&&(d?Array.isArray(l)?S.ref=gz([S.ref,Iw(n),...l]):S.ref=So(S.ref,Iw(n),l):So(null,null)),d?(h!==void 0&&(S.className=b_(S.className,h)),m!==void 0&&(S.style=Ay(S.style,m)),S):In}function Rz(e){return Array.isArray(e)?Sz(e):ra(void 0,e)}const _z=Symbol.for("react.lazy");function Az(e){if(e?.$$typeof!==_z)return e;const t=v.Children.toArray(e)[0];return v.isValidElement(t)?t:e}function Nz(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=ra(n,t.props);return s.ref=n.ref,v.cloneElement(t,s)}if(e&&typeof e=="string")return Oz(e,n);throw new Error(Mn(8))}function Oz(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)}const Yv="data-starting-style",Iz="data-ending-style",Mz={[Yv]:""},Dz={[Iz]:""},da={transitionStatus(e){return e==="starting"?Mz:e==="ending"?Dz:null}},Lz="data-open",jz="data-closed",zz="data-anchor-hidden",v_="data-popup-open",Pz="data-pressed",$z={[v_]:""},Fz={[v_]:"",[Pz]:""},Bz={[Lz]:""},Uz={[jz]:""},Hz={[zz]:""},x_={open(e){return e?$z:null}},qz={open(e){return e?Fz:null}},sh={open(e){return e?Bz:Uz},anchorHidden(e){return e?Hz:null}},k_={...sh,...da};function oh(){return typeof window<"u"}function Yn(e){return ah(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Os(e){var t;return(t=(ah(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ah(e){return oh()?e instanceof Node||e instanceof rn(e).Node:!1}function bt(e){return oh()?e instanceof Element||e instanceof rn(e).Element:!1}function It(e){return oh()?e instanceof HTMLElement||e instanceof rn(e).HTMLElement:!1}function wo(e){return!oh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot}function Fc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Cr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function Vz(e){return/^(table|td|th)$/.test(Yn(e))}function lh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Gz=/transform|translate|scale|rotate|perspective|filter/,Wz=/paint|layout|strict|content/,Yo=e=>!!e&&e!=="none";let fb;function Xv(e){const t=bt(e)?Cr(e):e;return Yo(t.transform)||Yo(t.translate)||Yo(t.scale)||Yo(t.rotate)||Yo(t.perspective)||!uh()&&(Yo(t.backdropFilter)||Yo(t.filter))||Gz.test(t.willChange||"")||Wz.test(t.contain||"")}function Kz(e){let t=Ai(e);for(;It(t)&&!mi(t);){if(Xv(t))return t;if(lh(t))return null;t=Ai(t)}return null}function uh(){return fb==null&&(fb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),fb}function mi(e){return/^(html|body|#document)$/.test(Yn(e))}function Cr(e){return rn(e).getComputedStyle(e)}function ch(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ai(e){if(Yn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wo(e)&&e.host||Os(e);return wo(t)?t.host:t}function S_(e){const t=Ai(e);return mi(t)?(e.ownerDocument||e).body:It(t)&&Fc(t)?t:S_(t)}function yo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=S_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=rn(s);if(a){const c=Ny(l);return t.concat(l,l.visualViewport||[],Fc(s)?s:[],c&&n?yo(c):[])}else return t.concat(s,yo(s,[],n))}function Ny(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Zv={...Vv},db=Zv.useInsertionEffect,Yz=db&&db!==Zv.useLayoutEffect?db:e=>e();function Ve(e){const t=gr(Xz).current;return t.next=e,Yz(t.effect),t.trampoline}function Xz(){const e={next:void 0,callback:Zz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Zz(){}const Qz=()=>{},qe=typeof document<"u"?v.useLayoutEffect:Qz,w_=v.createContext(void 0);function Qv(e=!1){const t=v.useContext(w_);if(t===void 0&&!e)throw new Error(Mn(16));return t}function Jz(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 d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=s,!a&&n&&(d.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(d["aria-disabled"]=n),a&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,a,s])}}function Gt(e){return e?.ownerDocument||document}function pb(e,t,{detail:n=0}={}){e.dispatchEvent(new(rn(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function jl(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=Qv(!0),f=a??c!==void 0,{props:d}=Jz({focusableWhenDisabled:n,disabled:t,composite:f,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;hb(y)&&f&&t&&d.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,d.disabled,f]);qe(h,[h]);const m=v.useCallback((y={})=>{const{onClick:S,onMouseDown:k,onKeyUp:T,onKeyDown:C,onPointerDown:E,...R}=y;return ra({onClick(_){if(t){_.preventDefault();return}S?.(_)},onMouseDown(_){t||k?.(_)},onKeyDown(_){if(t||(kp(_),C?.(_),_.baseUIHandlerPrevented))return;const D=_.target===_.currentTarget,A=_.currentTarget,N=hb(A),P=!s&&eP(A),$=D&&(s?N:!P),I=_.key==="Enter",V=_.key===" ",B=A.getAttribute("role"),z=B?.startsWith("menuitem")||B==="option"||B==="gridcell";if(D&&f&&V){if(_.defaultPrevented&&z)return;_.preventDefault(),(!s||N)&&(_.preventBaseUIHandler(),pb(A,_));return}if(!$||s||!V&&!I){D&&P&&V&&_.preventDefault();return}_.defaultPrevented||(_.preventDefault(),I&&(_.preventBaseUIHandler(),pb(A,_)))},onKeyUp(_){if(!t){if(kp(_),T?.(_),_.target===_.currentTarget&&s&&f&&hb(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!s&&!f&&!_.defaultPrevented&&_.key===" "&&(_.preventBaseUIHandler(),pb(_.currentTarget,_))}},onPointerDown(_){if(t){_.preventDefault();return}E?.(_)}},s?{type:"button"}:{role:"button"},d,R)},[t,d,f,s]),b=Ve(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function hb(e){return It(e)&&e.tagName==="BUTTON"}function eP(e){return It(e)&&e.tagName==="A"&&!!e.href}const Ni="none",zl="trigger-press",wr="trigger-hover",cp="trigger-focus",Jv="outside-press",mb="item-press",fh="focus-out",e0="escape-key",Mw="list-navigation",tP="cancel-open",E_="disabled",Dw="missing",Lw="initial",Sp="imperative-action",nP="window-resize";function wt(e,t,n,r){let s=!1,a=!1;const l=r??In;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 jw=0;function rP(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(jw+=1,r(`${t}-${jw}`))},[n,t]),s}const zw=Zv.useId;function Bc(e,t){if(zw!==void 0){const n=zw();return e??(t?`${t}-${n}`:n)}return rP(e,t)}function Pl(e){return Bc(e,"base-ui")}function t0(e){v.useEffect(e,Yi)}const Fu=0;class Oi{static create(){return new Oi}currentId=Fu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Fu,n()},t)}isStarted(){return this.currentId!==Fu}clear=()=>{this.currentId!==Fu&&(clearTimeout(this.currentId),this.currentId=Fu)};disposeEffect=()=>this.clear}function ei(){const e=gr(Oi.create).current;return t0(e.disposeEffect),e}function iP(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:sP,platform:oP,maxTouchPoints:aP}=iP(),dh=sP.toLowerCase(),gc=oP.toLowerCase(),ph=/^i(os$|p)/.test(gc)||gc==="macintel"&&aP>1,Pw="android",Oy=gc===Pw||dh.includes(Pw),T_=!ph&&gc.startsWith("mac");gc.startsWith("win");const lP=T_||ph,Is=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Is&&dh.includes("firefox");!Is&&dh.includes("chrom");const uP=lP,n0=/jsdom|happydom/.test(dh);function Hi(e){e.preventDefault(),e.stopPropagation()}function cP(e){return"nativeEvent"in e}function hh(e){return e.pointerType===""&&e.isTrusted?!0:Oy&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function r0(e){return n0?!1:!Oy&&e.width===0&&e.height===0||Oy&&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 vo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function dr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&wo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function mr(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}const Iy="data-base-ui-focusable",C_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",mh="ArrowLeft",gh="ArrowRight",R_="ArrowUp",i0="ArrowDown",My="data-trigger-disabled";function wp(e,t){if(!bt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute(My);for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute(My);return!1}function gb(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 dP(e){return e.matches("html,body")}function bh(e){return It(e)&&e.matches(C_)}function pP(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${C_}`)!=null}function Dy(e){return e?e.getAttribute("role")==="combobox"&&bh(e):!1}function hP(e){if(!e||n0)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ep(e){return e?e.hasAttribute(Iy)?e:e.querySelector(`[${Iy}]`)||e:null}function mP(e,t){return t!=null&&!vo(t)?0:typeof e=="function"?e():e}function bc(e,t,n){const r=mP(e,n);return typeof r=="number"?r:r?.[t]}function $w(e){return typeof e=="function"?e():e}function __(e,t){return t||e==="click"||e==="mousedown"}function gP(e){return e?.includes("mouse")&&e!=="mousedown"}const bP=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Oi,currentIdRef:{current:null},currentContextRef:{current:null}});function yP(e,t){e.current=t.current}function vP(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(bP),{currentIdRef:l,delayRef:c,timeoutMs:f,initialDelayRef:d,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,S]=v.useState(!1),k=v.useRef(n);return qe(()=>{k.current=n},[n]),qe(()=>{function T(){h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=d.current,b.clear()}if(l.current&&!n&&l.current===s){if(S(!1),f){const C=s;return b.start(f,()=>{r.select("open")||l.current&&l.current!==C||T()}),()=>{(k.current||l.current!==C)&&b.clear()}}T()}},[n,s,l,c,f,d,h,b,r]),qe(()=>{if(!n)return;const T=h.current,C=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:S},l.current=s,c.current={open:0,close:bc(d.current,"close")},C!==null&&C!==s?(S(!0),T?.setIsInstantPhase(!0),T?.onOpenChange(!1,wt(Ni))):(S(!1),T?.setIsInstantPhase(!1))},[n,s,r,l,c,d,h,b]),qe(()=>()=>{if(l.current===s){if(h.current=null,!k.current)return;l.current=null,yP(c,d),b.clear()}},[h,l,c,s,d,b]),v.useMemo(()=>({activeIdRef:l,hasProvider:m,delayRef:c,isInstantPhase:y}),[l,m,c,y])}function Ot(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Wi(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function An(e){const t=gr(xP,e).current;return t.next=e,qe(t.effect),t}function xP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Sd=null;class kP{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.callbacks[n]=null,this.callbacksCount-=1)}}let wd=new kP;class jr{static create(){return new jr}static request(t){return wd.request(t)}static cancel(t){return wd.cancel(t)}currentId=Sd;request(t){this.cancel(),this.currentId=wd.request(()=>{this.currentId=Sd,t()})}cancel=()=>{this.currentId!==Sd&&(wd.cancel(this.currentId),this.currentId=Sd)};disposeEffect=()=>this.cancel}function Sl(){const e=gr(jr.create).current;return t0(e.disposeEffect),e}const A_={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},N_={...A_,position:"fixed",top:0,left:0},SP={...A_,position:"absolute"},Tp=v.forwardRef(function(t,n){const[r,s]=v.useState();qe(()=>{uP&&Is&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:N_,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),wl=Math.min,Cs=Math.max,El=Math.round,dl=Math.floor,Rs=e=>({x:e,y:e}),wP={left:"right",right:"left",bottom:"top",top:"bottom"};function O_(e,t,n){return Cs(e,wl(t,n))}function Eo(e,t){return typeof e=="function"?e(t):e}function gi(e){return e.split("-")[0]}function As(e){return e.split("-")[1]}function s0(e){return e==="x"?"y":"x"}function o0(e){return e==="y"?"height":"width"}function pi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function a0(e){return s0(pi(e))}function EP(e,t,n){n===void 0&&(n=!1);const r=As(e),s=a0(e),a=o0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Cp(l)),[l,Cp(l)]}function TP(e){const t=Cp(e);return[Ly(e),t,Ly(t)]}function Ly(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Fw=["left","right"],Bw=["right","left"],CP=["top","bottom"],RP=["bottom","top"];function _P(e,t,n){switch(e){case"top":case"bottom":return n?t?Bw:Fw:t?Fw:Bw;case"left":case"right":return t?CP:RP;default:return[]}}function AP(e,t,n,r){const s=As(e);let a=_P(gi(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Ly)))),a}function Cp(e){const t=gi(e);return wP[t]+e.slice(t.length)}function NP(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function I_(e){return typeof e!="number"?NP(e):{top:e,right:e,bottom:e,left:e}}function yc(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 sc(e,t){return t<0||t>=e.length}function fp(e,t){return ws(e.current,{disabledIndices:t})}function jy(e,t){return ws(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ws(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&&ml(e,a,r));return a}function ml(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?!yh(s)||s.matches(":disabled")?!0:!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!1}function OP(e){return e.visibility==="hidden"||e.visibility==="collapse"}function yh(e,t=e?Cr(e):null){return!e||!e.isConnected||!t||OP(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const IP='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function MP(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return wo(n)?n.host:null}function zy(e){for(const t of Array.from(e.children))if(Yn(t)==="summary")return t;return null}function DP(e,t){const n=zy(t);return!!n&&(e===n||ht(n,e))}function M_(e){const t=e?Yn(e):"";return e!=null&&e.matches(IP)&&(t!=="summary"||e.parentElement!=null&&Yn(e.parentElement)==="details"&&zy(e.parentElement)===e)&&(t!=="details"||zy(e)==null)&&(t!=="input"||e.type!=="hidden")}function D_(e){if(!M_(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=MP(t)){const n=t!==e,r=Yn(t)==="slot";if(t.hasAttribute("inert")||n&&Yn(t)==="details"&&!t.open&&!DP(e,t)||t.hasAttribute("hidden")||!r&&!LP(t,n))return!1}return!0}function LP(e,t){const n=Cr(e);return t?n.display!=="none":yh(e,n)}function L_(e){const t=e.tabIndex;if(t<0){const n=Yn(e);if(n==="details"||n==="audio"||n==="video"||It(e)&&e.isContentEditable)return 0}return t}function bb(e){if(Yn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function jP(e,t){const n=bb(e);if(!n)return!0;const r=t.find(s=>{const a=bb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=bb(s);return a?.name===n.name&&a.form===n.form})===n}function j_(e){if(It(e)&&Yn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return It(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function z_(e,t){j_(e).forEach(n=>{M_(n)&&t.push(n),z_(n,t)})}function P_(e,t,n){j_(e).forEach(r=>{It(r)&&r.matches(t)&&n.push(r),P_(r,t,n)})}function l0(e){return D_(e)&&L_(e)>=0}function $_(e){const t=[];return z_(e,t),t.filter(D_)}function vh(e){const t=$_(e);return t.filter(n=>L_(n)>=0&&jP(n,t))}function F_(e,t){const n=vh(e),r=n.length;if(r===0)return;const s=dr(Gt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function B_(e){return F_(Gt(e).body,1)||e}function U_(e){return F_(Gt(e).body,-1)||e}function oc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function zP(e){vh(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Uw(e){const t=[];P_(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 To(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...To(e,s.id,n)])}function Hw(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 vc(e){return`data-base-ui-${e}`}let Ed=0;function dp(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Ed);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Cn;const l=requestAnimationFrame(a);return Ed=l,()=>{Ed===l&&(cancelAnimationFrame(l),Ed=0)}}const yb={inert:new WeakMap,"aria-hidden":new WeakMap},qw="data-base-ui-inert",Py={inert:new WeakSet,"aria-hidden":new WeakSet};let Bu=new WeakMap,vb=0;function PP(e){return Py[e]}function H_(e){return e?wo(e)?e.host:H_(e.parentNode):null}const Vw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=H_(n);return e.contains(r)?r:null}).filter(n=>n!=null),Gw=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Ww=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Yn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function $P(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const f=Vw(t,e),d=s?Ww(t,Gw(f),new Set(f)):[],h=[],m=[];if(a){const b=yb[a],y=PP(a);c=y,l=b;const S=Vw(t,Array.from(t.querySelectorAll("[aria-live]"))),k=f.concat(S);Ww(t,Gw(k),new Set(k)).forEach(C=>{const E=C.getAttribute(a),R=E!==null&&E!=="false",_=(b.get(C)||0)+1;b.set(C,_),h.push(C),_===1&&R&&y.add(C),R||C.setAttribute(a,a==="inert"?"":"true")})}return s&&d.forEach(b=>{const y=(Bu.get(b)||0)+1;Bu.set(b,y),m.push(b),y===1&&b.setAttribute(qw,"")}),vb+=1,()=>{l&&h.forEach(b=>{const S=(l.get(b)||0)-1;l.set(b,S),S||(!c?.has(b)&&a&&b.removeAttribute(a),c?.delete(b))}),s&&m.forEach(b=>{const y=(Bu.get(b)||0)-1;Bu.set(b,y),y||b.removeAttribute(qw)}),vb-=1,vb||(yb.inert=new WeakMap,yb["aria-hidden"]=new WeakMap,Py.inert=new WeakSet,Py["aria-hidden"]=new WeakSet,Bu=new WeakMap)}}function Kw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Gt(e[0]).body;return $P(e,a,n,r,{mark:s})}var vi=u_();const FP={style:{transition:"none"}},BP="data-base-ui-click-trigger",UP={fallbackAxisSide:"none"},q_={fallbackAxisSide:"end"},HP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},V_=v.createContext(null),G_=()=>v.useContext(V_),qP=vc("portal");function W_(e={}){const{ref:t,container:n,componentProps:r=In,elementProps:s}=e,a=Bc(),c=G_()?.portalNode,[f,d]=v.useState(null),[h,m]=v.useState(null),b=Ve(T=>{T!==null&&m(T)}),y=v.useRef(null);qe(()=>{if(n===null){y.current&&(y.current=null,m(null),d(null));return}const T=(n&&(ah(n)?n:n.current))??c??document.body;if(T==null){y.current&&(y.current=null,m(null),d(null));return}y.current!==T&&(y.current=T,m(null),d(T))},[n,c]);const S=dn("div",r,{ref:[t,b],props:[{id:a,[qP]:""},s]}),k=f&&S?vi.createPortal(S,f):null;return{node:h,nodeId:v.isValidElement(S)?S.props.id:void 0,subtree:k}}const VP=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,portalOwnerRole:f,...d}=t,{node:h,nodeId:m,subtree:b}=W_({container:c,ref:n,componentProps:t,elementProps:d}),y=v.useRef(null),S=v.useRef(null),k=v.useRef(null),T=v.useRef(null),[C,E]=v.useState(null),R=v.useRef(!1),_=C?.modal,D=C?.open,A=!!C&&!C.modal&&C.open&&!!h;v.useEffect(()=>{if(!h||_)return;function P($){h&&$.relatedTarget&&oc($)&&($.type==="focusin"?R.current&&(Uw(h),R.current=!1):(zP(h),R.current=!0))}return Wi(Ot(h,"focusin",P,!0),Ot(h,"focusout",P,!0))},[h,_]),qe(()=>{!h||D!==!0||!R.current||(Uw(h),R.current=!1)},[D,h]);const N=v.useMemo(()=>({beforeOutsideRef:y,afterOutsideRef:S,beforeInsideRef:k,afterInsideRef:T,portalNode:h,setFocusManagerState:E}),[h]);return g.jsxs(v.Fragment,{children:[b,g.jsxs(V_.Provider,{value:N,children:[A&&h&&g.jsx(Tp,{"data-type":"outside",ref:y,onFocus:P=>{if(oc(P,h))k.current?.focus();else{const $=C?C.domReference:null;U_($)?.focus()}}}),A&&h&&g.jsx("span",{role:f,"aria-owns":m,style:HP}),h&&vi.createPortal(l,h),A&&h&&g.jsx(Tp,{"data-type":"outside",ref:S,onFocus:P=>{if(oc(P,h))T.current?.focus();else{const $=C?C.domReference:null;B_($)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,wt(fh,P.nativeEvent))}}})]})]})});function K_(){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 GP{nodesRef={current:[]};events=K_();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 Y_=v.createContext(null),X_=v.createContext(null),$l=()=>v.useContext(Y_)?.id||null,pa=e=>{const t=v.useContext(X_);return e??t};function WP(e){const t=Bc(),n=pa(e),r=$l();return qe(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function KP(e){const{children:t,id:n}=e,r=$l();return g.jsx(Y_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function YP(e){const{children:t,externalTree:n}=e,r=gr(()=>n??new GP).current;return g.jsx(X_.Provider,{value:r,children:t})}function bs(e){return e==null?e:"current"in e?e.current:e}function XP(e,t){const n=rn(mr(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 Yw=20;let go=[];function u0(){go=go.filter(e=>e.deref()?.isConnected)}function Xw(e){u0(),e&&Yn(e)!=="body"&&(go.push(new WeakRef(e)),go.length>Yw&&(go=go.slice(-Yw)))}function Zw(){return u0(),go[go.length-1]?.deref()}function ZP(e){return e?l0(e)?e:vh(e)[0]||e:null}function Qw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=$_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return l0(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 QP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:f=!0,openInteractionType:d="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:S}=e,k="rootStore"in t?t.rootStore:t,T=k.useState("open"),C=k.useState("domReferenceElement"),E=k.useState("floatingElement"),{events:R,dataRef:_}=k.context,D=Ve(()=>_.current.floatingContext?.nodeId),A=s===!1,N=Dy(C)&&A,P=An(s),$=An(a),I=An(d),V=An(T),B=pa(y),z=G_(),j=v.useRef(!1),H=v.useRef(!1),q=v.useRef(!1),K=v.useRef(null),U=v.useRef(""),Y=v.useRef(""),O=v.useRef(null),F=v.useRef(null),G=So(O,b,z?.beforeInsideRef),L=So(F,z?.afterInsideRef),X=ei(),te=ei(),J=Sl(),le=z!=null,oe=Ep(E),ue=Ve((pe=oe)=>pe?vh(pe):[]),xe=Ve(()=>S?.().filter(pe=>pe!=null)??[]);v.useEffect(()=>{if(r||!c)return;function pe(ke){ke.key==="Tab"&&ht(oe,dr(Gt(oe)))&&ue().length===0&&!N&&Hi(ke)}const me=Gt(oe);return Ot(me,"keydown",pe)},[r,oe,c,N,ue]),v.useEffect(()=>{if(r||!T)return;const pe=Gt(oe);function me(){q.current=!1}function ke(Te){const ve=mr(Te),Ie=xe(),_e=ht(E,ve)||ht(C,ve)||ht(z?.portalNode,ve)||Ie.some(je=>je===ve||ht(je,ve));q.current=!_e,Y.current=Te.pointerType||"keyboard",ve?.closest(`[${BP}]`)&&(H.current=!0,te.start(0,()=>{H.current=!1}))}function Se(){Y.current="keyboard"}return Wi(Ot(pe,"pointerdown",ke,!0),Ot(pe,"pointerup",me,!0),Ot(pe,"pointercancel",me,!0),Ot(pe,"keydown",Se,!0),me)},[r,E,C,oe,T,z,te,xe]),v.useEffect(()=>{if(r||!f)return;const pe=Gt(oe);function me(){H.current=!0,te.start(0,()=>{H.current=!1})}function ke(Ie){const _e=mr(Ie);l0(_e)&&(K.current=_e)}function Se(Ie){const _e=Ie.relatedTarget,je=Ie.currentTarget,We=mr(Ie);c&&_e==null&&We!=null&&ht(E,We)&&Xw(We),queueMicrotask(()=>{const Ce=D(),$e=k.context.triggerElements,se=xe(),Ee=_e?.hasAttribute(vc("focus-guard"))&&[O.current,F.current,z?.beforeInsideRef.current,z?.afterInsideRef.current,z?.beforeOutsideRef.current,z?.afterOutsideRef.current,bs(m),bs(h)].includes(_e),Q=!(ht(C,_e)||ht(E,_e)||ht(_e,E)||ht(z?.portalNode,_e)||se.some(ee=>ee===_e||ht(ee,_e))||$e.hasMatchingElement(ee=>ht(ee,_e))||Ee||B&&(To(B.nodesRef.current,Ce).find(ee=>ht(ee.context?.elements.floating,_e)||ht(ee.context?.elements.domReference,_e))||Hw(B.nodesRef.current,Ce).find(ee=>[ee.context?.elements.floating,Ep(ee.context?.elements.floating)].includes(_e)||ee.context?.elements.domReference===_e)));if(je===C&&oe&&Qw(oe),l&&je!==C&&!yh(We)&&dr(pe)===pe.body){if(It(oe)&&(oe.focus(),l==="popup")){J.request(()=>{oe.focus()});return}const ee=ue(),be=K.current,Ne=(be&&ee.includes(be)?be:null)||ee[ee.length-1]||oe;It(Ne)&&Ne.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(N||!c)&&_e&&Q&&!H.current&&(N||_e!==Zw())&&(j.current=!0,k.setOpen(!1,wt(fh,Ie)))})}function Te(){q.current||(_.current.insideReactTree=!0,X.start(0,()=>{_.current.insideReactTree=!1}))}const ve=It(C)?C:null;if(!(!E&&!ve))return Wi(ve&&Ot(ve,"focusout",Se),ve&&Ot(ve,"pointerdown",me),E&&Ot(E,"focusin",ke),E&&Ot(E,"focusout",Se),E&&z&&Ot(E,"focusout",Te,!0))},[r,C,E,oe,c,B,z,k,f,l,ue,N,D,_,X,te,J,h,m,xe]),v.useEffect(()=>{if(r||!E||!T)return;const pe=Array.from(z?.portalNode?.querySelectorAll(`[${vc("portal")}]`)||[]),ke=(B?Hw(B.nodesRef.current,D()):[]).find(je=>Dy(je.context?.elements.domReference||null))?.context?.elements.domReference,Te=[...[E,...pe,O.current,F.current,z?.beforeOutsideRef.current,z?.afterOutsideRef.current,...xe()],ke,bs(m),bs(h),N?C:null].filter(je=>je!=null),ve=Kw(Te,{ariaHidden:c||N,mark:!1}),Ie=[E,...pe].filter(je=>je!=null),_e=Kw(Ie);return()=>{_e(),ve()}},[T,r,C,E,c,z,N,B,D,h,m,xe]),qe(()=>{if(!T||r||!It(oe))return;U.current="",Y.current="";const pe=Gt(oe),me=dr(pe);queueMicrotask(()=>{const ke=P.current,Se=typeof ke=="function"?ke(I.current||""):ke;if(Se===void 0||Se===!1||ht(oe,me))return;let ve=null;const Ie=()=>(ve==null&&(ve=ue(oe)),ve[0]||oe);let _e;Se===!0||Se===null?_e=Ie():_e=bs(Se),_e=_e||Ie();const je=ht(oe,dr(pe));dp(_e,{preventScroll:_e===oe,shouldFocus(){if(!V.current)return!1;if(je)return!0;const We=dr(pe);return!(We!==_e&&ht(oe,We))}})})},[r,T,oe,ue,P,I,V]),qe(()=>{if(r||!oe)return;const pe=Gt(oe),me=dr(pe),ke=I.current==null;Xw(me);function Se(ve){if(ve.open||(U.current=XP(ve.nativeEvent,Y.current)),ve.reason===wr&&ve.nativeEvent.type==="mouseleave"&&(j.current=!0),ve.reason===Jv)if(ve.nested)j.current=!1;else if(hh(ve.nativeEvent)||r0(ve.nativeEvent))j.current=!1;else{let Ie=!1;Gt(oe).createElement("div").focus({get preventScroll(){return Ie=!0,!1}}),Ie?j.current=!1:j.current=!0}}R.on("openchange",Se);function Te(ve){const Ie=$.current;let _e=typeof Ie=="function"?Ie(ve):Ie;if(_e===void 0||_e===!1)return null;_e===null&&(_e=!0);const je=C?.isConnected?C:null,We=me?.isConnected&&Yn(me)!=="body"?me:null;let Ce=ke?We||je:je||We;return Ce||(Ce=Zw()||null),typeof _e=="boolean"?Ce:bs(_e)||Ce||null}return()=>{R.off("openchange",Se);const ve=dr(pe),Ie=xe(),_e=ht(E,ve)||Ie.some($e=>$e===ve||ht($e,ve))||B&&To(B.nodesRef.current,D(),!1).some($e=>ht($e.context?.elements.floating,ve)),je=$.current,We=U.current,Ce=Te(We);queueMicrotask(()=>{const $e=ZP(Ce),se=typeof je!="boolean";if(je&&!j.current&&It($e)&&(!(!se&&$e!==ve&&ve!==pe.body)||_e)){const Ee={preventScroll:!0};We==="keyboard"&&(Ee.focusVisible=!0),$e.focus(Ee)}j.current=!1})}},[r,E,oe,$,I,R,B,C,D,xe]),qe(()=>{if(!Is||T||!E)return;const pe=dr(Gt(E));!It(pe)||!bh(pe)||ht(E,pe)&&pe.blur()},[T,E]),qe(()=>{if(!(r||!z))return z.setFocusManagerState({modal:c,closeOnFocusOut:f,open:T,onOpenChange:k.setOpen,domReference:C}),()=>{z.setFocusManagerState(null)}},[r,z,c,T,k,f,C]),qe(()=>{if(!(r||!oe))return Qw(oe),()=>{queueMicrotask(u0)}},[r,oe]);const ye=!r&&(c?!N:!0)&&(le||c);return g.jsxs(v.Fragment,{children:[ye&&g.jsx(Tp,{"data-type":"inside",ref:G,onFocus:pe=>{if(c){const me=ue();dp(me[me.length-1])}else z?.portalNode&&(j.current=!1,oc(pe,z.portalNode)?B_(C)?.focus():bs(m??z.beforeOutsideRef)?.focus())}}),n,ye&&g.jsx(Tp,{"data-type":"inside",ref:L,onFocus:pe=>{c?dp(ue()[0]):z?.portalNode&&(f&&(j.current=!0),oc(pe,z.portalNode)?U_(C)?.focus():bs(h??z.afterOutsideRef)?.focus())}})]})}function JP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:f=zl}=t,d="rootStore"in e?e.rootStore:e,h=d.context.dataRef,m=v.useRef(void 0),b=Sl(),y=ei(),S=v.useMemo(()=>{function k(C,E,R,_){const D=wt(f,E,R);C&&_==="touch"&&c>0?y.start(c,()=>{d.setOpen(!0,D)}):d.setOpen(C,D)}function T(C,E,R){const _=h.current.openEvent,D=d.select("domReferenceElement")!==E;return C&&D||!C||!s?!0:_&&l?!R(_.type):!1}return{onPointerDown(C){m.current=vo(C.pointerType,!0)&&r0(C.nativeEvent)?"virtual":C.pointerType},onMouseDown(C){const E=m.current,R=C.nativeEvent,_=d.select("open");if(C.button!==0||r==="click"||vo(E,!0)&&a)return;const D=T(_,C.currentTarget,P=>P==="click"||P==="mousedown"),A=mr(R);if(bh(A)){k(D,R,A,E);return}const N=C.currentTarget;b.request(()=>{k(D,R,N,E)})},onClick(C){if(r==="mousedown-only")return;const E=m.current;if(r==="mousedown"&&E){m.current=void 0;return}if(vo(E,!0)&&a)return;const R=d.select("open"),_=T(R,C.currentTarget,D=>D==="click"||D==="mousedown"||D==="keydown"||D==="keyup");k(_,C.nativeEvent,C.currentTarget,E)},onKeyDown(){m.current=void 0}}},[h,r,a,f,d,l,s,b,y,c]);return v.useMemo(()=>n?{reference:S}:In,[n,S])}function e6(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",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let d=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,d=0,h=0,!s||f?(d=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&&!f&&(h=t.axis==="x"?a.height:h,d=t.axis==="y"?a.width:d),s=!0,{width:d,height:h,x:m,y:b,top:b,right:m+d,bottom:b+h,left:m}}}}function Jw(e){return e!=null&&e.clientX!=null}function t6(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"),f=s.context.dataRef,d=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,S]=v.useState([]),k=Ve(_=>{s.set("positionReference",_)}),T=Ve((_,D,A)=>{d.current||f.current.openEvent&&!Jw(f.current.openEvent)||s.set("positionReference",e6(A??c,{x:_,y:D,axis:r,dataRef:f,pointerType:m}))}),C=Ve(_=>{a?h.current||(T(_.clientX,_.clientY,_.currentTarget),S([])):T(_.clientX,_.clientY,_.currentTarget)}),E=vo(m)?l:a;v.useEffect(()=>{if(!n){k(c);return}if(!E)return;function _(){h.current?.(),h.current=null}const D=rn(l);function A(N){const P=mr(N);ht(l,P)?_():T(N.clientX,N.clientY)}return!f.current.openEvent||Jw(f.current.openEvent)?h.current=Ot(D,"mousemove",A):k(c),_},[E,n,l,f,c,s,T,k,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(d.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(d.current=!0)},[n,a]);const R=v.useMemo(()=>{function _(D){b(D.pointerType)}return{onPointerDown:_,onPointerEnter:_,onMouseMove:C,onMouseEnter:C}},[C]);return v.useMemo(()=>n?{reference:R,trigger:R}:{},[n,R])}function n6(){return!1}function r6(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function c0(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=n6,bubbles:c,externalTree:f}=t,d="rootStore"in e?e.rootStore:e,h=d.useState("open"),m=d.useState("floatingElement"),{dataRef:b,events:y}=d.context,S=pa(f),k=Ve(typeof s=="function"?s:()=>!1),T=typeof s=="function"?k:s,C=T!==!1,E=Ve(()=>a),{escapeKey:R,outsidePress:_}=r6(c),D=v.useRef(!1),A=v.useRef(!1),N=v.useRef(!1),P=v.useRef(!1),$=v.useRef(!1),I=v.useRef(""),V=v.useRef(null),B=ei(),z=ei(),j=Ve(()=>{z.clear(),b.current.insideReactTree=!1}),H=Ve(X=>{const te=b.current.floatingContext?.nodeId;return(S?To(S.nodesRef.current,te):[]).some(le=>le.context?.open&&!le.context.dataRef.current[X])}),q=Ve(X=>gb(X,d.select("floatingElement"))||gb(X,d.select("domReferenceElement"))),K=Ve(X=>{l()&&d.setOpen(!1,wt(zl,X.nativeEvent))}),U=Ve(X=>{if(!h||!n||!r||X.key!=="Escape"||$.current||!R&&H("__escapeKeyBubbles"))return;const te=cP(X)?X.nativeEvent:X,J=wt(e0,te);d.setOpen(!1,J),J.isCanceled||X.preventDefault(),!R&&!J.isPropagationAllowed&&X.stopPropagation()}),Y=Ve(()=>{b.current.insideReactTree=!0,z.start(0,j)}),O=Ve(X=>{if(!h||!n||X.button!==0)return;const te=mr(X.nativeEvent);ht(d.select("floatingElement"),te)&&(D.current||(D.current=!0,A.current=!1))}),F=Ve(X=>{!h||!n||(X.defaultPrevented||X.nativeEvent.defaultPrevented)&&D.current&&(A.current=!0)});v.useEffect(()=>{function X(te){te.open||(P.current=!1)}return y.on("openchange",X),()=>{y.off("openchange",X)}},[y]),v.useEffect(()=>{if(!h||!n)return h||(P.current=!1),j;b.current.__escapeKeyBubbles=R,b.current.__outsidePressBubbles=_;const X=new Oi,te=new Oi,J=Gt(m);function le(){X.clear(),$.current=!0}function oe(){X.start(Is?5:0,()=>{$.current=!1})}function ue(){N.current=!0,te.start(0,()=>{N.current=!1})}function xe(){D.current=!1,A.current=!1}function ye(){const Q=I.current,ee=Q==="pen"||!Q?"mouse":Q,be=E(),Ne=typeof be=="function"?be():be;return typeof Ne=="string"?Ne:Ne[ee]}function pe(Q){const ee=ye();return ee==="intentional"&&Q.type!=="click"||ee==="sloppy"&&Q.type==="click"}function me(Q){const ee=b.current.floatingContext?.nodeId,be=S&&To(S.nodesRef.current,ee).some(Ne=>gb(Q,Ne.context?.elements.floating));return q(Q)||be}function ke(Q){if(pe(Q)){Q.type!=="click"&&!q(Q)&&(te.clear(),N.current=!1),j();return}if(b.current.insideReactTree){j();return}const ee=mr(Q),be=`[${vc("inert")}]`,Ne=bt(ee)?ee.getRootNode():null,Ye=Array.from((wo(Ne)?Ne:Gt(d.select("floatingElement"))).querySelectorAll(be)),at=d.context.triggerElements;if(ee&&(at.hasElement(ee)||at.hasMatchingElement(nt=>ht(nt,ee))))return;let ft=bt(ee)?ee:null;for(;ft&&!mi(ft);){const nt=Ai(ft);if(mi(nt)||!bt(nt))break;ft=nt}if(!(Ye.length&&bt(ee)&&!dP(ee)&&!ht(ee,d.select("floatingElement"))&&Ye.every(nt=>!ht(ft,nt)))){if(It(ee)&&!("touches"in Q)){const nt=mi(ee),vt=Cr(ee),St=/auto|scroll/,et=nt||St.test(vt.overflowX),Qe=nt||St.test(vt.overflowY),Pe=et&&ee.clientWidth>0&&ee.scrollWidth>ee.clientWidth,pt=Qe&&ee.clientHeight>0&&ee.scrollHeight>ee.clientHeight,lt=vt.direction==="rtl",ut=pt&&(lt?Q.offsetX<=ee.offsetWidth-ee.clientWidth:Q.offsetX>ee.clientWidth),Ge=Pe&&Q.offsetY>ee.clientHeight;if(ut||Ge)return}if(!me(Q)){if(ye()==="intentional"){if(Q.detail!==0&&!hh(Q)&&!P.current)return;if(N.current){te.clear(),N.current=!1;return}}typeof T=="function"&&!T(Q)||H("__outsidePressBubbles")||(d.setOpen(!1,wt(Jv,Q)),j())}}}function Se(Q){ye()!=="sloppy"||Q.pointerType==="touch"||!d.select("open")||!n||q(Q)||ke(Q)}function Te(Q){if(ye()!=="sloppy"||!d.select("open")||!n||q(Q))return;const ee=Q.touches[0];ee&&(V.current={startTime:Date.now(),startX:ee.clientX,startY:ee.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{V.current&&(V.current.dismissOnTouchEnd=!1,V.current.dismissOnMouseDown=!1)}))}function ve(Q,ee){const be=mr(Q);if(!be)return;const Ne=Ot(be,Q.type,()=>{ee(Q),Ne()})}function Ie(Q){I.current="touch",ve(Q,Te)}function _e(Q){B.clear(),Q.type==="pointerdown"&&(Q.button===0&&(P.current=!0),I.current=Q.pointerType),!(Q.type==="mousedown"&&V.current&&!V.current.dismissOnMouseDown)&&ve(Q,ee=>{ee.type==="pointerdown"?Se(ee):ke(ee)})}function je(Q){if(Q.type==="pointercancel"&&(P.current=!1),!D.current)return;const ee=A.current;if(xe(),ye()==="intentional"){if(Q.type==="pointercancel"){ee&&ue();return}if(!me(Q)){if(ee){ue();return}typeof T=="function"&&!T(Q)||(te.clear(),N.current=!0,j())}}}function We(Q){if(ye()!=="sloppy"||!V.current||q(Q))return;const ee=Q.touches[0];if(!ee)return;const be=Math.abs(ee.clientX-V.current.startX),Ne=Math.abs(ee.clientY-V.current.startY),Ye=Math.sqrt(be*be+Ne*Ne);Ye>5&&(V.current.dismissOnTouchEnd=!0),Ye>10&&(ke(Q),B.clear(),V.current=null)}function Ce(Q){ve(Q,We)}function $e(Q){ye()!=="sloppy"||!V.current||q(Q)||(V.current.dismissOnTouchEnd&&ke(Q),B.clear(),V.current=null)}function se(Q){ve(Q,$e)}const Ee=Wi(r&&Wi(Ot(J,"keydown",U),Ot(J,"compositionstart",le),Ot(J,"compositionend",oe)),C&&Wi(Ot(J,"click",_e,!0),Ot(J,"pointerdown",_e,!0),Ot(J,"pointerup",je,!0),Ot(J,"pointercancel",je,!0),Ot(J,"mousedown",_e,!0),Ot(J,"mouseup",je,!0),Ot(J,"touchstart",Ie,{capture:!0,passive:!0}),Ot(J,"touchmove",Ce,{capture:!0,passive:!0}),Ot(J,"touchend",se,{capture:!0,passive:!0})));return()=>{Ee(),X.clear(),te.clear(),xe(),N.current=!1,j()}},[b,m,r,C,T,h,n,R,_,U,j,E,H,q,S,d,B]);const G=v.useMemo(()=>({onKeyDown:U,onPointerDown:K,onClick:K}),[U,K]),L=v.useMemo(()=>({onKeyDown:U,onPointerDown:F,onMouseDown:F,onClickCapture:Y,onMouseDownCapture(X){Y(),O(X)},onPointerDownCapture(X){Y(),O(X)},onMouseUpCapture:Y,onTouchEndCapture:Y,onTouchMoveCapture:Y}),[U,Y,O,F]);return v.useMemo(()=>n?{reference:G,floating:L,trigger:G}:{},[n,G,L])}function eE(e,t,n){let{reference:r,floating:s}=e;const a=pi(t),l=a0(t),c=o0(l),f=gi(t),d=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(f){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}}const S=As(t);return S&&(y[l]+=b*(S==="end"?1:-1)*(n&&d?-1:1)),y}async function i6(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Eo(t,e),S=I_(y),T=c[b?m==="floating"?"reference":"floating":m],C=yc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(T)))==null||n?T:T.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:f})),E=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),_=await(a.isElement==null?void 0:a.isElement(R))&&await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1},D=yc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:R,strategy:f}):E);return{top:(C.top-D.top+S.top)/_.y,bottom:(D.bottom-C.bottom+S.bottom)/_.y,left:(C.left-D.left+S.left)/_.x,right:(D.right-C.right+S.right)/_.x}}const s6=50,o6=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:i6},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=eE(d,r,f),b=r,y=0;const S={};for(let k=0;k<a.length;k++){const T=a[k];if(!T)continue;const{name:C,fn:E}=T,{x:R,y:_,data:D,reset:A}=await E({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:S,rects:d,platform:c,elements:{reference:e,floating:t}});h=R??h,m=_??m,S[C]={...S[C],...D},A&&y<s6&&(y++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(d=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:h,y:m}=eE(d,b,f)),k=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:S}},a6=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:f,elements:d}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...T}=Eo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const C=gi(s),E=pi(c),R=gi(c)===c,_=await(f.isRTL==null?void 0:f.isRTL(d.floating)),D=b||(R||!k?[Cp(c)]:TP(c)),A=S!=="none";!b&&A&&D.push(...AP(c,k,S,_));const N=[c,...D],P=await f.detectOverflow(t,T),$=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&$.push(P[C]),m){const j=EP(s,l,_);$.push(P[j[0]],P[j[1]])}if(I=[...I,{placement:s,overflows:$}],!$.every(j=>j<=0)){var V,B;const j=(((V=a.flip)==null?void 0:V.index)||0)+1,H=N[j];if(H&&(!(m==="alignment"?E!==pi(H):!1)||I.every(U=>pi(U.placement)===E?U.overflows[0]>0:!0)))return{data:{index:j,overflows:I},reset:{placement:H}};let q=(B=I.filter(K=>K.overflows[0]<=0).sort((K,U)=>K.overflows[1]-U.overflows[1])[0])==null?void 0:B.placement;if(!q)switch(y){case"bestFit":{var z;const K=(z=I.filter(U=>{if(A){const Y=pi(U.placement);return Y===E||Y==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Y=>Y>0).reduce((Y,O)=>Y+O,0)]).sort((U,Y)=>U[1]-Y[1])[0])==null?void 0:z[0];K&&(q=K);break}case"initialPlacement":q=c;break}if(s!==q)return{reset:{placement:q}}}return{}}}},Z_=new Set(["left","top"]);async function l6(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=gi(n),c=As(n),f=pi(n)==="y",d=Z_.has(l)?-1:1,h=a&&f?-1:1,m=Eo(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:S}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof S=="number"&&(y=c==="end"?S*-1:S),f?{x:y*h,y:b*d}:{x:b*d,y:y*h}}const u6=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,f=await l6(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+f.x,y:a+f.y,data:{...f,placement:l}}}}},c6=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:f={fn:E=>{let{x:R,y:_}=E;return{x:R,y:_}}},...d}=Eo(e,t),h={x:n,y:r},m=await a.detectOverflow(t,d),b=pi(s),y=s0(b);let S=h[y],k=h[b];const T=(E,R)=>O_(R+m[E==="y"?"top":"left"],R,R-m[E==="y"?"bottom":"right"]);l&&(S=T(y,S)),c&&(k=T(b,k));const C=f.fn({...t,[y]:S,[b]:k});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[b]:c}}}}}},f6=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:l,rects:c,middlewareData:f}=t,{offset:d=0,mainAxis:h=!0,crossAxis:m=!0}=Eo(e,t),b={x:s,y:a},y=pi(l),S=s0(y);let k=b[S],T=b[y];const C=Eo(d,t),E=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:(n=C.mainAxis)!=null?n:0,crossAxis:(r=C.crossAxis)!=null?r:0};if(h){const D=S==="y"?"height":"width",A=c.reference[S]-c.floating[D]+E.mainAxis,N=c.reference[S]+c.reference[D]-E.mainAxis;k<A?k=A:k>N&&(k=N)}if(m){var R,_;const D=S==="y"?"width":"height",A=Z_.has(gi(l)),N=c.reference[y]-c.floating[D]+(A&&((R=f.offset)==null?void 0:R[y])||0)+(A?0:E.crossAxis),P=c.reference[y]+c.reference[D]+(A?0:((_=f.offset)==null?void 0:_[y])||0)-(A?E.crossAxis:0);T<N?T=N:T>P&&(T=P)}return{[S]:k,[y]:T}}}},d6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Eo(e,t),f=await s.detectOverflow(t,c),d=gi(n),h=As(n),m=pi(n)==="y",{width:b,height:y}=r.floating;let S,k;d==="top"||d==="bottom"?(S=d,k=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(k=d,S=h==="end"?"top":"bottom");const T=y-f.top-f.bottom,C=b-f.left-f.right,E=wl(y-f[S],T),R=wl(b-f[k],C),_=t.middlewareData.shift,D=!_;let A=E,N=R;_!=null&&_.enabled.x&&(N=C),_!=null&&_.enabled.y&&(A=T),D&&!h&&(m?N=b-2*Cs(f.left,f.right):A=y-2*Cs(f.top,f.bottom)),await l({...t,availableWidth:N,availableHeight:A});const P=await s.getDimensions(a.floating);return b!==P.width||y!==P.height?{reset:{rects:!0}}:{}}}};function Q_(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=El(n)!==a||El(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function f0(e){return bt(e)?e:e.contextElement}function gl(e){const t=f0(e);if(!It(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=Q_(t);let l=(a?El(n.width):n.width)/r,c=(a?El(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const p6=Rs(0);function J_(e){const t=rn(e);return!uh()||!t.visualViewport?p6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function h6(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===rn(e)}function ia(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=f0(e);let l=Rs(1);t&&(r?bt(r)&&(l=gl(r)):l=gl(e));const c=h6(a,n,r)?J_(a):Rs(0);let f=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a&&r){const b=rn(a),y=bt(r)?rn(r):r;let S=b,k=Ny(S);for(;k&&y!==S;){const T=gl(k),C=k.getBoundingClientRect(),E=Cr(k),R=C.left+(k.clientLeft+parseFloat(E.paddingLeft))*T.x,_=C.top+(k.clientTop+parseFloat(E.paddingTop))*T.y;f*=T.x,d*=T.y,h*=T.x,m*=T.y,f+=R,d+=_,S=rn(k),k=Ny(S)}}return yc({width:h,height:m,x:f,y:d})}function xh(e,t){const n=ch(e).scrollLeft;return t?t.left+n:ia(Os(e)).left+n}function eA(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-xh(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function m6(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Os(r),c=t?lh(t.floating):!1;if(r===l||c&&a)return n;let f={scrollLeft:0,scrollTop:0},d=Rs(1);const h=Rs(0),m=It(r);if((m||!a)&&((Yn(r)!=="body"||Fc(l))&&(f=ch(r)),m)){const y=ia(r);d=gl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?eA(l,f):Rs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+b.x,y:n.y*d.y-f.scrollTop*d.y+h.y+b.y}}function g6(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function b6(e){const t=ch(e),n=e.ownerDocument.body,r=Cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+xh(e);const l=-t.scrollTop;return Cr(n).direction==="rtl"&&(a+=Cs(e.clientWidth,n.clientWidth)-r),{width:r,height:s,x:a,y:l}}const y6=25;function v6(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=rn(e),a=Os(e),l=s.visualViewport;let c=a.clientWidth,f=a.clientHeight,d=0,h=0;if(l){const b=!uh()||t==="fixed";r?b||(d=-l.offsetLeft,h=-l.offsetTop):(c=l.width,f=l.height,b&&(d=l.offsetLeft,h=l.offsetTop))}if(xh(a)<=0){const b=a.ownerDocument,y=b.body,S=getComputedStyle(y),k=b.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(a.clientWidth-y.clientWidth-k),C=getComputedStyle(a).scrollbarGutter==="stable both-edges"?T/2:T;C<=y6&&(c-=C)}return{width:c,height:f,x:d,y:h}}function x6(e,t){const n=ia(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=gl(e),l=e.clientWidth*a.x,c=e.clientHeight*a.y,f=s*a.x,d=r*a.y;return{width:l,height:c,x:f,y:d}}function tE(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=v6(e,n,t);else if(t==="document")r=b6(Os(e));else if(bt(t))r=x6(t,n);else{const s=J_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return yc(r)}function k6(e,t){const n=t.get(e);if(n)return n;let r=yo(e,[],!1).filter(c=>bt(c)&&Yn(c)!=="body"),s=null;const a=Cr(e).position==="fixed";let l=a?Ai(e):e;for(;bt(l)&&!mi(l);){const c=Cr(l),f=Xv(l),d=s?s.position:a?"fixed":"";!f&&(d==="fixed"||d==="absolute"&&c.position==="static")?r=r.filter(m=>m!==l):s=c,l=Ai(l)}return t.set(e,r),r}function S6(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?lh(t)?[]:k6(t,this._c):[].concat(n),r],c=tE(t,l[0],s);let f=c.top,d=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=tE(t,l[b],s);f=Cs(y.top,f),d=wl(y.right,d),h=wl(y.bottom,h),m=Cs(y.left,m)}return{width:d-m,height:h-f,x:m,y:f}}function w6(e){const{width:t,height:n}=Q_(e);return{width:t,height:n}}function E6(e,t,n){const r=It(t),s=Os(t),a=n==="fixed",l=ia(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=Rs(0);if((r||!a)&&((Yn(t)!=="body"||Fc(s))&&(c=ch(t)),r)){const b=ia(t,!0,a,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!r&&s&&(f.x=xh(s));const d=s&&!r&&!a?eA(s,c):Rs(0),h=l.left+c.scrollLeft-f.x-d.x,m=l.top+c.scrollTop-f.y-d.y;return{x:h,y:m,width:l.width,height:l.height}}function xb(e){return Cr(e).position==="static"}function nE(e,t){if(!It(e)||Cr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Os(e)===n&&(n=n.ownerDocument.body),n}function tA(e,t){const n=rn(e);if(lh(e))return n;if(!It(e)){let s=Ai(e);for(;s&&!mi(s);){if(bt(s)&&!xb(s))return s;s=Ai(s)}return n}let r=nE(e,t);for(;r&&Vz(r)&&xb(r);)r=nE(r,t);return r&&mi(r)&&xb(r)&&!Xv(r)?n:r||Kz(e)||n}const T6=async function(e){const t=this.getOffsetParent||tA,n=this.getDimensions,r=await n(e.floating);return{reference:E6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C6(e){return Cr(e).direction==="rtl"}const nA={convertOffsetParentRelativeRectToViewportRelativeRect:m6,getDocumentElement:Os,getClippingRect:S6,getOffsetParent:tA,getElementRects:T6,getClientRects:g6,getDimensions:w6,getScale:gl,isElement:bt,isRTL:C6};function rA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function R6(e,t,n){let r=null,s;const a=Os(e);function l(){var h;clearTimeout(s),(h=r)==null||h.disconnect(),r=null}function c(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),l();const b=e.getBoundingClientRect(),{left:y,top:S,width:k,height:T}=b;if(h||t(),!k||!T)return;const C=dl(S),E=dl(a.clientWidth-(y+k)),R=dl(a.clientHeight-(S+T)),_=dl(y),A={rootMargin:-C+"px "+-E+"px "+-R+"px "+-_+"px",threshold:Cs(0,wl(1,m))||1};let N=!0;function P($){const I=$[0].intersectionRatio;if(!rA(b,e.getBoundingClientRect()))return c();if(I!==m){if(!N)return c();I?c(!1,I):s=setTimeout(()=>{c(!1,1e-7)},1e3)}N=!1}try{r=new IntersectionObserver(P,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(P,A)}r.observe(e)}const f=rn(e),d=()=>c(n);return f.addEventListener("resize",d),c(!0),()=>{f.removeEventListener("resize",d),l()}}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:f=!1}=r,d=f0(e),h=s||a?[...d?yo(d):[],...t?yo(t):[]]:[];h.forEach(C=>{s&&C.addEventListener("scroll",n),a&&C.addEventListener("resize",n)});const m=d&&c?R6(d,n,a):null;let b=-1,y=null;l&&(y=new ResizeObserver(C=>{let[E]=C;E&&E.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),d&&!f&&y.observe(d),t&&y.observe(t));let S,k=f?ia(e):null;f&&T();function T(){const C=ia(e);k&&!rA(k,C)&&n(),k=C,S=requestAnimationFrame(T)}return n(),()=>{var C;h.forEach(E=>{s&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),m?.(),(C=y)==null||C.disconnect(),y=null,f&&cancelAnimationFrame(S)}}const _6=u6,A6=c6,N6=a6,O6=d6,I6=f6,M6=(e,t,n)=>{const r=new Map,s=n??{},a={...nA,...s.platform,_c:r};return o6(e,t,{...s,platform:a})};var D6=typeof document<"u",L6=function(){},pp=D6?v.useLayoutEffect:L6;function _p(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(!_p(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)&&!_p(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function iA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rE(e,t){const n=iA(e);return Math.round(t*n)/n}function kb(e){const t=v.useRef(e);return pp(()=>{t.current=e}),t}function sA(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:f,open:d}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);_p(b,r)||y(r);const[S,k]=v.useState(null),[T,C]=v.useState(null),E=v.useCallback(U=>{U!==A.current&&(A.current=U,k(U))},[]),R=v.useCallback(U=>{U!==N.current&&(N.current=U,C(U))},[]),_=a||S,D=l||T,A=v.useRef(null),N=v.useRef(null),P=v.useRef(h),$=f!=null,I=kb(f),V=kb(s),B=kb(d),z=v.useCallback(()=>{if(!A.current||!N.current)return;const U={placement:t,strategy:n,middleware:b};V.current&&(U.platform=V.current),M6(A.current,N.current,U).then(Y=>{const O={...Y,isPositioned:B.current!==!1};j.current&&!_p(P.current,O)&&(P.current=O,vi.flushSync(()=>{m(O)}))})},[b,t,n,V,B]);pp(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(U=>({...U,isPositioned:!1})))},[d]);const j=v.useRef(!1);pp(()=>(j.current=!0,()=>{j.current=!1}),[]),pp(()=>{if(_&&(A.current=_),D&&(N.current=D),_&&D){if(I.current)return I.current(_,D,z);z()}},[_,D,z,I,$]);const H=v.useMemo(()=>({reference:A,floating:N,setReference:E,setFloating:R}),[E,R]),q=v.useMemo(()=>({reference:_,floating:D}),[_,D]),K=v.useMemo(()=>{const U={position:n,left:0,top:0};if(!q.floating)return U;const Y=rE(q.floating,h.x),O=rE(q.floating,h.y);return c?{...U,transform:"translate("+Y+"px, "+O+"px)",...iA(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:O}},[n,c,q.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:z,refs:H,elements:q,floatingStyles:K}),[h,z,H,q,K])}const d0=(e,t)=>{const n=_6(e);return{name:n.name,fn:n.fn,options:[e,t]}},p0=(e,t)=>{const n=A6(e);return{name:n.name,fn:n.fn,options:[e,t]}},j6=(e,t)=>({fn:I6(e).fn,options:[e,t]}),h0=(e,t)=>{const n=N6(e);return{name:n.name,fn:n.fn,options:[e,t]}},m0=(e,t)=>{const n=O6(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ap(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function z6(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function oA(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((f,d)=>f.top-d.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(z6(c));else{const f=t[t.length-1];f.left=Math.min(f.left,c.left),f.right=Math.max(f.right,c.right),f.bottom=Math.max(f.bottom,c.bottom),f.width=f.right-f.left,f.height=f.bottom-f.top}n=c}return{lines:t,fallback:Ap(r,s,a,l)}}function aA(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function iE(e){return Ap(e.left,e.top,e.right,e.bottom)}function P6(e,t,n){const{lines:r}=oA(e.getClientRects());if(r.length<2)return;const s=aA(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function $6(e,t,n){const{lines:r,fallback:s}=oA(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 iE(r[n.lineIndex]);if(a!=null&&l!=null){const S=aA(r,a,l);if(S!==-1)return iE(r[S])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&l!=null)return s;if(c==="t"||c==="b"){const S=r[0],k=r[r.length-1],T=c==="t"?S:k;return Ap(T.left,S.top,T.right,k.bottom)}const f=c==="l";let d=r[0].left,h=r[0].right,m=f?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const S of r){d=Math.min(d,S.left),h=Math.max(h,S.right);const k=f?S.left:S.right;f&&k<m||!f&&k>m?(m=k,b=S,y=S):k===m&&(y=S)}return Ap(d,b.top,h,y.bottom)}function F6(e){return"contextElement"in e&&e.contextElement?e.contextElement:bt(e)?e:void 0}function B6(e,t){function n(s){lA(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function lA(e,t,n,r){const s=P6(t,n,r);return e.current=s,s}function U6(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=F6(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=$6(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}}}}}class H6{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,n,r=!0){this.fallbackStore=t,this.componentName=n,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{const n=this.attachedStores.lastIndexOf(t);n!==-1&&this.attachedStores.splice(n,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(n=>{n()}))}openByTrigger(t){const n=this.attachedStore;if(n===null)return;let r;if(t){for(let s=this.attachedStores.length-1;s>=0&&!r;s-=1)r=this.attachedStores[s].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(Mn(99,this.componentName,t,this.componentName));n.setOpen(!0,wt(Sp,void 0,r))}closePopup(){const t=this.attachedStore;t!==null&&t.setOpen(!1,wt(Sp))}}var Sb={exports:{}},wb={};var sE;function q6(){if(sE)return wb;sE=1;var e=$c();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(),S=r({inst:{value:y,getSnapshot:b}}),k=S[0].inst,T=S[1];return a(function(){k.value=y,k.getSnapshot=b,f(k)&&T({inst:k})},[m,y,b]),s(function(){return f(k)&&T({inst:k}),m(function(){f(k)&&T({inst:k})})},[m]),l(y),y}function f(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function d(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return wb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,wb}var oE;function uA(){return oE||(oE=1,Sb.exports=q6()),Sb.exports}var kh=uA(),Eb={exports:{}},Tb={};var aE;function V6(){if(aE)return Tb;aE=1;var e=$c(),t=uA();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return Tb.useSyncExternalStoreWithSelector=function(d,h,m,b,y){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=c(function(){function C(A){if(!E){if(E=!0,R=A,A=b(A),y!==void 0&&k.hasValue){var N=k.value;if(y(N,A))return _=N}return _=A}if(N=_,r(R,A))return N;var P=b(A);return y!==void 0&&y(N,P)?(R=A,N):(R=A,_=P)}var E=!1,R,_,D=m===void 0?null:m;return[function(){return C(h())},D===null?void 0:function(){return C(D())}]},[h,m,b,y]);var T=s(d,S[0],S[1]);return l(function(){k.hasValue=!0,k.value=T},[T]),f(T),T},Tb}var lE;function G6(){return lE||(lE=1,Eb.exports=V6()),Eb.exports}var W6=G6();const $y=[];let Fy;function K6(){return Fy}function Y6(e){$y.push(e)}function g0(e){const t=(n,r)=>{const s=gr(X6).current;let a;try{Fy=s;for(const l of $y)l.before(s);a=e(n,r);for(const l of $y)l.after(s);s.didInitialize=!0}finally{Fy=void 0}return a};return t.displayName=e.displayName||e.name,t}function cA(e){return v.forwardRef(g0(e))}function X6(){return{didInitialize:!1}}const Z6=Gv(19),Q6=Z6?e3:t3;function fA(e,t,n,r,s){return Q6(e,t,n,r,s)}function J6(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return kh.useSyncExternalStore(e.subscribe,a,a)}Y6({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()}}),kh.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function e3(e,t,n,r,s){const a=K6();if(!a)return J6(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 t3(e,t,n,r,s){return W6.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class n3{static create(t){return new this(t)}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 fA(this,t,n,r,s)}}class Uc extends n3{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;qe(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;qe(()=>(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);qe(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;qe(()=>{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),fA(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=Ve(n??Cn);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 r3(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const i3={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class b0 extends Uc{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:K_(),nested:r,triggerElements:a},i3),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&fP(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 s3(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),f=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new b0({open:c,transitionStatus:void 0,referenceElement:f,floatingElement:d,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),qe(()=>{const S={open:c,floatingId:s,referenceElement:f,floatingElement:d};bt(f)&&(S.domReferenceElement=f),y.state.positionReference===y.state.referenceElement&&(S.positionReference=f),y.update(S)},[c,s,f,d,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Hc(e,t=!1,n=!1,r=!1){const[s,a]=v.useState(e&&t?"idle":void 0),[l,c]=v.useState(e&&!r);return e&&!l&&(c(!0),a("starting")),!e&&l&&s!=="ending"&&!n&&a("ending"),!e&&!l&&s==="ending"&&a(void 0),qe(()=>{if(!e&&l&&s!=="ending"&&n){const f=jr.request(()=>{a("ending")});return()=>{jr.cancel(f)}}},[e,l,s,n]),qe(()=>{if(!e||t)return;const f=jr.request(()=>{a(void 0)});return()=>{jr.cancel(f)}},[t,e]),qe(()=>{if(!e||!t)return;e&&l&&s!=="idle"&&a("starting");const f=jr.request(()=>{a("idle")});return()=>{jr.cancel(f)}},[t,e,l,s]),{mounted:l,setMounted:c,transitionStatus:s}}let Td=null;function o3(e){if(!Td){const t=[];Td=t,queueMicrotask(()=>{Td=null,vi.flushSync(()=>{for(const n of t)n()})})}Td.push(e)}function dA(e,t=!1,n=!1){const r=Sl();return Ve((s,a=null)=>{r.cancel();const l=bs(e);if(l==null)return;const c=l,f=()=>{if(!n){vi.flushSync(s);return}o3(()=>{a?.aborted||s()})};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||f()},()=>{if(a?.aborted)return;if(c.getAnimations().some(m=>m.pending||m.playState!=="finished")){d();return}f()})}if(t){const h=Yv;if(!c.hasAttribute(h)){r.request(d);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),d())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(d)})}function Ro(e){const{enabled:t=!0,open:n,ref:r,batch:s=!1,onComplete:a}=e,l=Ve(a),c=dA(r,n,s);v.useEffect(()=>{if(!t)return;const f=new AbortController;return c(l,f.signal),()=>{f.abort()}},[t,n,l,c])}const y0={tabIndex:-1,[Iy]:""};function pA(e,t=!1){const n=Bc(),r=$l()!=null,s=gr(()=>e(n,r)).current;return s3({popupStore:s,treatPopupAsFloatingElement:t,floatingRootContext:s.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:s.setOpen}),s}function hA({handle:e,store:t}){return qe(()=>e.attachStore(t),[e,t]),null}function uE(e){const t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function a3(e,t){const n=v.useRef(null);return Ve(r=>{const s=n.current;if(s!==null){if(s.element===r&&s.store===t&&s.id===e)return;n.current=null;const a=s.store;a.context.triggerElements.getById(s.id)===s.element&&(a.context.triggerElements.delete(s.id),uE(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),uE(t))})}function l3(e,t,n,r=!1){let s=e.preventUnmountingOnClose;t?s=!1:r&&(s=!0);const a=n?.id??null;let l=e.activeTriggerId,c=e.activeTriggerElement;return(a||t)&&(l=a,c=n??null),{open:t,preventUnmountingOnClose:s,activeTriggerId:l,activeTriggerElement:c}}function u3(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function mA(e,t,n,r={}){const s=n.reason,a=s===wr,l=t&&s===cp,c=!t&&(s===zl||s===e0),f=u3(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const d=()=>{const h=l3(e.state,t,n.trigger,f()),m={...r.extraState,...h};l?m.instantType="focus":c?m.instantType="dismiss":a&&(m.instantType=void 0),e.update(m)};a?vi.flushSync(d):d()}function gA(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=a3(e,n),l=Ve(f=>{const d=n.select("open"),h=n.select("activeTriggerId");if(h===e){const m={activeTriggerElement:f,...d?r:null};n.update(m);return}if(h==null&&d){const m={activeTriggerId:e??null,activeTriggerElement:f,...r};n.update(m)}}),c=Ve(f=>{a(f),f&&l(f)});return qe(()=>(c(t.current),()=>c(null)),[c,t,n,e]),qe(()=>{if(s){const f={activeTriggerElement:t.current,...r};n.update(f)}},[s,n,t,...Object.values(r)]),{registerTrigger:c,isMountedByThisTrigger:s}}function bA(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=v.useRef(null),s=e.useState("open"),a=e.useState("triggerCount"),l=e.useState("activeTriggerId"),c=e.useState("activeTriggerElement");qe(()=>{if(!s){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const f=e.context.triggerElements.size,d={};e.state.triggerCount!==f&&(d.triggerCount=f);const h=e.select("activeTriggerId");let m=null;if(h){const b=e.context.triggerElements.getById(h);if(b)r.current=h,b!==e.state.activeTriggerElement&&(d.activeTriggerElement=b);else{for(const[y,S]of e.context.triggerElements.entries())if(S===e.state.activeTriggerElement){d.activeTriggerId=y,d.activeTriggerElement=S,r.current=y;break}d.activeTriggerId===void 0&&(r.current===h?m=h:r.current=null)}}else r.current=null;if(!m&&!h&&f===1){const b=e.context.triggerElements.entries().next();if(!b.done){const[y,S]=b.value;d.activeTriggerId=y,d.activeTriggerElement=S,r.current=y}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&e.update(d),m&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===m&&!e.context.triggerElements.getById(m)){const b=wt(Ni);e.setOpen(!1,b),b.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[s,e,a,l,c,n])}function yA(e,t,n,r){const{mounted:s,setMounted:a,transitionStatus:l}=Hc(e,!1,!1,r),c=t.useState("preventUnmountingOnClose"),f=e?!1:c;t.useSyncedValues({mounted:s,transitionStatus:l,preventUnmountingOnClose:f});const d=Ve(()=>{a(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ro({enabled:s&&!e&&!f,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:l}}function vA(e,t){e.useSyncedValues(t),qe(()=>()=>{e.update({activeTriggerProps:In,inactiveTriggerProps:In,popupProps:In})},[e])}class Sh{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}function xA(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new b0({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:In,inactiveTriggerProps:In,popupProps:In}}const ac=e=>e.triggerIdProp??e.activeTriggerId,v0=e=>e.openProp??e.open,cE=e=>(e.popupElement?.id??e.floatingId)||void 0;function kA(e,t){return t!==void 0&&v0(e)&&ac(e)===t}function c3(e,t){return kA(e,t)?!0:t!==void 0&&v0(e)&&ac(e)==null&&e.triggerCount===1}const SA={open:v0,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:ac,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:cE,isTriggerActive:(e,t)=>t!==void 0&&ac(e)===t,isOpenedByTrigger:(e,t)=>kA(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&ac(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>c3(e,t)?cE(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function wA(e){const t=v.useCallback(r=>e===void 0?Cn:e.subscribeStore(r),[e]),n=v.useCallback(()=>e===void 0?void 0:e.store,[e]);return kh.useSyncExternalStore(t,n,()=>e?.serverStore)}function f3(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=Bc(),a=$l()!=null,l=gr(()=>new b0({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Sh,floatingId:s,syncOnly:!1,nested:a})).current;return qe(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=bt(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 d3(e){return p3(e,e.rootContext)}function p3(e,t){const{nodeId:n,externalTree:r}=e,s=t.useState("referenceElement"),a=t.useState("floatingElement"),l=t.useState("domReferenceElement"),c=t.useState("open"),f=t.useState("floatingId"),[d,h]=v.useState(null),[m,b]=v.useState(void 0),[y,S]=v.useState(void 0),k=v.useRef(null),T=pa(r),C=v.useMemo(()=>({reference:s,floating:a,domReference:l}),[s,a,l]),E=sA({...e,elements:{...C,...d&&{reference:d}}}),R=bt(m)?m:null,_=y===void 0?t.state.floatingElement:y;t.useSyncedValue("referenceElement",m??null),t.useSyncedValue("domReferenceElement",m===void 0?l:R),t.useSyncedValue("floatingElement",_);const D=v.useCallback(V=>{const B=bt(V)?{getBoundingClientRect:()=>V.getBoundingClientRect(),getClientRects:()=>V.getClientRects(),contextElement:V}:V;h(B),E.refs.setReference(B)},[E.refs]),A=v.useCallback(V=>{(bt(V)||V===null)&&(k.current=V,b(V)),(bt(E.refs.reference.current)||E.refs.reference.current===null||V!==null&&!bt(V))&&E.refs.setReference(V)},[E.refs,b]),N=v.useCallback(V=>{S(V),E.refs.setFloating(V)},[E.refs]),P=v.useMemo(()=>({...E.refs,setReference:A,setFloating:N,setPositionReference:D,domReference:k}),[E.refs,A,N,D]),$=v.useMemo(()=>({...E.elements,domReference:l}),[E.elements,l]),I=v.useMemo(()=>({...E,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:f,refs:P,elements:$,nodeId:n,rootStore:t}),[E,P,$,n,t,c,f]);return qe(()=>{l&&(k.current=l)},[l]),qe(()=>{t.context.dataRef.current.floatingContext=I;const V=T?.nodesRef.current.find(B=>B.id===n);V&&(V.context=I)}),v.useMemo(()=>({...E,context:I,refs:P,elements:$,rootStore:t}),[E,P,$,I,t])}const Cb=T_&&Is;function EA(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),f=v.useRef(null),d=v.useRef(!0),h=ei();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=rn(b);function S(){const C=s.select("domReferenceElement");!s.select("open")&&It(C)&&C===dr(Gt(C))&&(c.current=!0,f.current=C)}function k(){d.current=!0}function T(){d.current=!1}return Wi(Ot(y,"blur",S),Cb&&Ot(y,"keydown",k,!0),Cb&&Ot(y,"pointerdown",T,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===zl||y.reason===e0){const S=s.select("domReferenceElement");bt(S)&&(f.current=S,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,f.current=null}return{onMouseLeave(){b()},onFocus(y){const S=y.currentTarget;if(c.current){if(f.current===S)return;b()}const k=mr(y.nativeEvent);if(bt(k)){if(Cb&&!y.relatedTarget){if(!d.current&&!bh(k))return}else if(!hP(k))return}const T=wp(y.relatedTarget,s.context.triggerElements),{nativeEvent:C,currentTarget:E}=y,R=typeof r=="function"?r():r;if(s.select("open")&&T||R===0||R===void 0){s.setOpen(!0,wt(cp,C,E));return}h.start(R,()=>{c.current||s.setOpen(!0,wt(cp,C,E))})},onBlur(y){b();const S=y.relatedTarget,k=y.nativeEvent,T=bt(S)&&S.hasAttribute(vc("focus-guard"))&&S.getAttribute("data-type")==="outside";h.start(0,()=>{const C=s.select("domReferenceElement"),E=dr(Gt(C));!S&&E===C||ht(l.current.floatingContext?.refs.floating.current,E)||ht(C,E)||T||wp(S??E,s.context.triggerElements)||s.setOpen(!1,wt(cp,k))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class x0{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 Oi,this.restTimeout=new Oi,this.handleCloseOptions=void 0}static create(){return new x0}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Np=new WeakMap;function Op(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 TA(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Np.get(n);a&&a!==e&&Op(a),Op(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 k0(e){const t=e.context.dataRef.current,n=gr(()=>t.hoverInteractionState??x0.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),t0(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function CA(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"),f=a.useState("domReferenceElement"),{dataRef:d}=a.context,h=pa(),m=$l(),b=k0(a),y=ei(),S=Ve(()=>__(d.current.openEvent?.type,b.interactedInside)),k=Ve(()=>gP(d.current.openEvent?.type)),T=Ve(()=>{Op(b)});qe(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,T())},[l,b,T]),v.useEffect(()=>T,[T]),qe(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&k()&&bt(f)&&c){const C=f,E=c,R=Gt(c),_=h?.nodesRef.current.find(P=>P.id===m)?.context?.elements.floating;_&&(_.style.pointerEvents="");const D=b.pointerEventsScopeElement!==E?b.pointerEventsScopeElement:null,A=_!==E?_:null,N=b.handleCloseOptions?.getScope?.()??D??A??C.closest("[data-rootownerid]")??R.body;return TA(b,{scopeElement:N,referenceElement:C,floatingElement:E}),()=>{T()}}},[n,l,f,c,b,k,h,m,T]),v.useEffect(()=>{if(!n)return;function C(){return!!(h&&m&&To(h.nodesRef.current,m).length>0)}function E(P){const $=bc(r,"close",b.pointerType),I=()=>{a.setOpen(!1,wt(wr,P)),h?.events.emit("floating.closed",P)};$?b.openChangeTimeout.start($,I):(b.openChangeTimeout.clear(),I())}function R(P){const $=mr(P);if(!pP($)){b.interactedInside=!1;return}b.interactedInside=$?.closest("[aria-haspopup]")!=null}function _(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",A),T()}function D(P){if(C()&&h){h.events.on("floating.closed",A);return}if(wp(P.relatedTarget,a.context.triggerElements))return;const $=d.current.floatingContext?.nodeId??s,I=P.relatedTarget;if(!(h&&$&&bt(I)&&To(h.nodesRef.current,$,!1).some(B=>ht(B.context?.elements.floating,I)))){if(b.handler){b.handler(P);return}T(),k()&&!S()&&E(P)}}function A(P){!h||!m||C()||y.start(0,()=>{h.events.off("floating.closed",A),a.setOpen(!1,wt(wr,P)),h.events.emit("floating.closed",P)})}const N=c;return Wi(N&&Ot(N,"mouseenter",_),N&&Ot(N,"mouseleave",D),N&&Ot(N,"pointerdown",R,!0),()=>{h?.events.off("floating.closed",A)})},[n,c,a,d,r,s,k,S,T,b,h,m,y])}const h3={current:null};function RA(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:f=h3,externalTree:d,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y,guardStaleOpen:S=!1}=t,k="rootStore"in e?e.rootStore:e,{dataRef:T,events:C}=k.context,E=pa(d),R=k0(k),_=v.useRef(!1),D=An(s),A=An(r),N=An(l),P=An(n),$=An(y),I=An(b),V=Ve(()=>__(T.current.openEvent?.type,R.interactedInside)),B=Ve(()=>$.current?.()!==!1),z=Ve((q,K,U)=>{const Y=k.context.triggerElements;if(Y.hasElement(K))return!q||!ht(q,K);if(!bt(U))return!1;const O=U;return Y.hasMatchingElement(F=>ht(F,O))&&(!q||!ht(q,O))}),j=Ve(()=>{if(!R.handler)return;Gt(k.select("domReferenceElement")).removeEventListener("mousemove",R.handler),R.handler=void 0}),H=Ve(()=>{Op(R)});return h&&(R.handleCloseOptions=s?.__options),v.useEffect(()=>j,[j]),v.useEffect(()=>{if(!n)return;function q(K){K.open?_.current=!1:(_.current=K.reason===wr,j(),R.openChangeTimeout.clear(),R.restTimeout.clear(),R.blockMouseMove=!0,R.restTimeoutPending=!1)}return C.on("openchange",q),()=>{C.off("openchange",q)}},[n,C,R,j]),v.useEffect(()=>{if(!n)return;function q(G,L=!0){const X=bc(A.current,"close",R.pointerType);X?R.openChangeTimeout.start(X,()=>{k.setOpen(!1,wt(wr,G)),E?.events.emit("floating.closed",G)}):L&&(R.openChangeTimeout.clear(),k.setOpen(!1,wt(wr,G)),E?.events.emit("floating.closed",G))}const K=f.current??(h?k.select("domReferenceElement"):null);if(!bt(K))return;function U(G){if(R.openChangeTimeout.clear(),R.blockMouseMove=!1,a&&!vo(R.pointerType))return;const L=$w(N.current),X=bc(A.current,"open",R.pointerType),te=mr(G),J=G.currentTarget??null,le=k.select("domReferenceElement");let oe=J;if(bt(te)&&!k.context.triggerElements.hasElement(te)){for(const ve of k.context.triggerElements.elements())if(ht(ve,te)){oe=ve;break}}bt(J)&&bt(le)&&!k.context.triggerElements.hasElement(J)&&ht(J,le)&&(oe=le);const ue=oe==null?!1:z(le,oe,te),xe=k.select("open"),ye=I.current?.()??k.select("transitionStatus")==="ending",pe=!xe&&ye&&_.current,me=!ue&&bt(oe)&&bt(le)&&ht(le,oe)&&pe,ke=L>0&&!X,Se=ue&&(xe||pe)||me,Te=!xe||ue;if(Se){B()&&k.setOpen(!0,wt(wr,G,oe));return}ke||(X?R.openChangeTimeout.start(X,()=>{Te&&B()&&k.setOpen(!0,wt(wr,G,oe))}):Te&&B()&&k.setOpen(!0,wt(wr,G,oe)))}function Y(G){if(V()){H();return}j();const L=k.select("domReferenceElement"),X=Gt(L);R.restTimeout.clear(),R.restTimeoutPending=!1;const te=T.current.floatingContext??m?.();if(wp(G.relatedTarget,k.context.triggerElements))return;if(D.current&&te){k.select("open")||R.openChangeTimeout.clear();const le=f.current;R.handler=D.current({...te,tree:E,x:G.clientX,y:G.clientY,onClose(){H(),j(),P.current&&!V()&&le===k.select("domReferenceElement")&&q(G,!0)}}),X.addEventListener("mousemove",R.handler),R.handler(G);return}(R.pointerType!=="touch"||!ht(k.select("floatingElement"),G.relatedTarget))&&q(G)}function O(G){ht(K,G.relatedTarget)||(R.openChangeTimeout.clear(),R.restTimeout.clear(),R.restTimeoutPending=!1)}const F=S?Ot(K,"mouseout",O):void 0;return c?Wi(Ot(K,"mousemove",U,{once:!0}),Ot(K,"mouseenter",U),Ot(K,"mouseleave",Y),F):Wi(Ot(K,"mouseenter",U),Ot(K,"mouseleave",Y),F)},[j,H,T,A,k,n,D,R,h,z,V,a,c,N,f,E,P,m,I,B,S]),v.useMemo(()=>{if(!n)return;function q(K){R.pointerType=K.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(K){const{nativeEvent:U}=K,Y=K.currentTarget,O=k.select("domReferenceElement"),F=k.select("open"),G=z(O,Y,K.target);if(a&&!vo(R.pointerType))return;if(F&&G&&R.handleCloseOptions?.blockPointerEvents){const te=k.select("floatingElement");if(te){const J=R.handleCloseOptions?.getScope?.()??Y.ownerDocument.body;TA(R,{scopeElement:J,referenceElement:Y,floatingElement:te})}}const L=$w(N.current);if(F&&!G||L===0||!G&&R.restTimeoutPending&&K.movementX**2+K.movementY**2<2)return;R.restTimeout.clear();function X(){if(R.restTimeoutPending=!1,V())return;const te=k.select("open");!R.blockMouseMove&&(!te||G)&&B()&&k.setOpen(!0,wt(wr,U,Y))}R.pointerType==="touch"?vi.flushSync(()=>{X()}):G&&F?X():(R.restTimeoutPending=!0,R.restTimeout.start(L,X))}}},[n,R,V,z,a,k,N,B])}const m3="Escape";function fE(e){return Is&&e.movementX===0&&e.movementY===0}function wh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Cd(e,t){return wh(t,e===R_||e===i0,e===mh||e===gh)}function Rb(e,t,n){return wh(t,e===i0,n?e===mh:e===gh)||e==="Enter"||e===" "||e===""}function g3(e,t,n){return wh(t,n?e===mh:e===gh,e===i0)}function b3(e,t,n,r){const s=n?e===gh:e===mh,a=e===R_;return t==="both"||t==="horizontal"&&r?e===m3:wh(t,s,a)}function y3(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:f=!1,nested:d=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:S=!0,disabledIndices:k=void 0,orientation:T="vertical",parentOrientation:C,id:E,resetOnPointerLeave:R=!0,externalTree:_,grid:D}=t,A=D!=null,N="rootStore"in e?e.rootStore:e,P=N.useState("open"),$=N.useState("floatingElement"),I=N.useState("domReferenceElement"),V=N.context.dataRef,B=Ep($),z=Dy(I),j=An(B),H=$l(),q=pa(_),K=v.useRef(b),U=v.useRef(l??-1),Y=v.useRef(null),O=v.useRef(!0),F=Ve(se=>{s(U.current===-1?null:U.current,se)}),G=v.useRef(!!$),L=v.useRef(P),X=v.useRef(!1),te=v.useRef(!1),J=v.useRef(null),le=An(k),oe=An(P),ue=An(l),xe=An(R),ye=Sl(),pe=Sl(),me=Ve(()=>{function se(be){m?q?.events.emit("virtualfocus",be):J.current=dp(be,{sync:X.current,preventScroll:!0})}const Ee=n.current[U.current],Q=te.current;Ee&&se(Ee),(X.current?be=>be():be=>ye.request(be))(()=>{const be=n.current[U.current]||Ee;if(!be)return;Ee||se(be),_e&&(Q||!O.current)&&be.scrollIntoView?.({block:"nearest",inline:"nearest"})})});qe(()=>{V.current.orientation=T},[V,T]),qe(()=>{a&&(P&&$?(U.current=l??-1,K.current&&l!=null&&(te.current=!0,F())):G.current&&(U.current=-1,F()))},[a,P,$,l,F]),qe(()=>{if(a){if(!P){X.current=!1;return}if($)if(r==null){if(X.current=!1,ue.current!=null)return;if(G.current&&(U.current=-1,me()),(!L.current||!G.current)&&K.current&&(Y.current!=null||K.current===!0&&Y.current==null)){let se=0;const Ee=()=>{n.current[0]==null?(se<2&&(se?ee=>pe.request(ee):queueMicrotask)(Ee),se+=1):(U.current=Y.current==null||Rb(Y.current,T,h)||d?fp(n):jy(n),Y.current=null,F())};Ee()}}else sc(n.current,r)||(U.current=r,me(),te.current=!1)}},[a,P,$,r,ue,d,n,T,h,F,me,pe]),qe(()=>{if(!a||$||!q||m||!G.current)return;const se=q.nodesRef.current,Ee=se.find(be=>be.id===H)?.context?.elements.floating,Q=dr(Gt(I??Ee??null)),ee=se.some(be=>be.context&&ht(be.context.elements.floating,Q));Ee&&!ee&&O.current&&Ee.focus({preventScroll:!0})},[a,$,I,q,H,m]),qe(()=>{L.current=P,G.current=!!$}),qe(()=>{P||(Y.current=null,K.current=b)},[P,b]);const ke=r!=null,Se=Ve(se=>{if(!oe.current)return;const Ee=n.current.indexOf(se.currentTarget);Ee!==-1&&(U.current!==Ee||r!==Ee)&&(U.current=Ee,F(se))}),Te=Ve(()=>C??q?.nodesRef.current.find(se=>se.id===H)?.context?.dataRef?.current.orientation),ve=Ve(()=>fp(n,le.current)),Ie=Ve(se=>{if(O.current=!1,X.current=!0,se.which===229||!oe.current&&se.currentTarget===j.current)return;if(d&&b3(se.key,T,h,A)){Cd(se.key,Te())||Hi(se),N.setOpen(!1,wt(Mw,se.nativeEvent)),It(I)&&(m?q?.events.emit("virtualfocus",I):I.focus());return}const Ee=U.current,Q=fp(n,k),ee=jy(n,k);if(z||(se.key==="Home"&&(Hi(se),U.current=Q,F(se)),se.key==="End"&&(Hi(se),U.current=ee,F(se))),D!=null){const be=D(se,U.current,n,T,f,h,k,Q,ee);if(be!=null&&(U.current=be,F(se)),T==="both")return}if(Cd(se.key,T)){if(Hi(se),P&&!m&&dr(se.currentTarget.ownerDocument)===se.currentTarget){U.current=Rb(se.key,T,h)?Q:ee,F(se);return}Rb(se.key,T,h)?f?Ee>=ee?c&&Ee!==n.current.length?U.current=-1:(X.current=!1,U.current=Q):U.current=ws(n.current,{startingIndex:Ee,disabledIndices:k}):U.current=Math.min(ee,ws(n.current,{startingIndex:Ee,disabledIndices:k})):f?Ee<=Q?c&&Ee!==-1?U.current=n.current.length:(X.current=!1,U.current=ee):U.current=ws(n.current,{startingIndex:Ee,decrement:!0,disabledIndices:k}):U.current=Math.max(Q,ws(n.current,{startingIndex:Ee,decrement:!0,disabledIndices:k})),sc(n.current,U.current)&&(U.current=-1),F(se)}}),_e=v.useMemo(()=>({onFocus(Ee){X.current=!0,Se(Ee)},onClick:({currentTarget:Ee})=>Ee.focus({preventScroll:!0}),onMouseMove(Ee){fE(Ee)||(X.current=!0,te.current=!1,y&&Se(Ee))},onPointerLeave(Ee){if(!oe.current||!O.current||Ee.pointerType==="touch")return;X.current=!0;const Q=Ee.relatedTarget;if(!(!y||n.current.includes(Q))&&xe.current&&(J.current?.(),J.current=null,U.current=-1,F(Ee),!m)){const ee=j.current,be=dr(Gt(ee));ee&&ht(ee,be)&&ee.focus({preventScroll:!0})}}}),[Se,oe,j,y,n,F,xe,m]),je=v.useMemo(()=>m&&P&&ke&&{"aria-activedescendant":`${E}-${r}`},[m,P,ke,E,r]),We=v.useMemo(()=>({...z?{}:je,onKeyDown(se){if(se.key==="Tab"&&se.shiftKey&&P&&!m){const Ee=mr(se.nativeEvent);if(Ee&&!ht(j.current,Ee))return;Hi(se),N.setOpen(!1,wt(fh,se.nativeEvent)),It(I)&&I.focus();return}Ie(se)},onPointerMove(se){fE(se)||(O.current=!0)}}),[je,Ie,j,z,N,P,m,I]),Ce=v.useMemo(()=>{function se(ee){N.setOpen(!0,wt(Mw,ee.nativeEvent,ee.currentTarget))}function Ee(ee){b==="auto"&&hh(ee.nativeEvent)&&(K.current=!m)}function Q(ee){K.current=b,b==="auto"&&r0(ee.nativeEvent)&&(K.current=!0)}return{onKeyDown(ee){const be=N.select("open");O.current=!1;const Ne=ee.key.startsWith("Arrow"),Ye=g3(ee.key,Te(),h),at=Cd(ee.key,T),ft=(d?Ye:at)||ee.key==="Enter"||ee.key.trim()==="";if(m&&be)return Ie(ee);if(!(!be&&!S&&Ne)){if(ft){const nt=Cd(ee.key,Te());Y.current=d&&nt?null:ee.key}if(d){Ye&&(Hi(ee),be?(U.current=ve(),F(ee)):se(ee));return}at&&(ue.current!=null&&(U.current=ue.current),Hi(ee),!be&&S?se(ee):Ie(ee),be&&F(ee))}},onFocus(ee){N.select("open")&&!m&&(U.current=-1,F(ee))},onPointerDown:Q,onPointerEnter:Q,onMouseDown:Ee,onClick:Ee}},[Ie,b,ve,d,F,N,S,T,Te,h,ue,m]),$e=v.useMemo(()=>({...je,...Ce}),[je,Ce]);return v.useMemo(()=>a?{reference:$e,floating:We,item:_e,trigger:Ce}:{},[a,$e,We,Ce,_e])}function v3(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:f=!0,resetMs:d=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=ei(),S=v.useRef(""),k=v.useRef(h??s??-1),T=v.useRef(null),C=Ve(_=>{function D(j){return r?.current[j]}function A(j){const H=D(j);return H&&!yh(H)||H?.matches(":disabled")?!1:l==null||!ml(Yi,j,l)}function N(j,H,q=0){if(j.length===0)return-1;const K=(q%j.length+j.length)%j.length,U=H.toLowerCase();for(let Y=0;Y<j.length;Y+=1){const O=(K+Y)%j.length;if(!(!j[O]?.toLowerCase().startsWith(U)||!A(O)))return O}return-1}const P=n.current;if(S.current.length>0&&_.key===" "&&(Hi(_),c?.(!0)),S.current.length>0&&S.current[0]!==" "&&N(P,S.current)===-1&&_.key!==" "&&c?.(!1),P==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;b&&_.key!==" "&&(Hi(_),c?.(!0));const $=S.current==="";$&&(k.current=h??s??-1),P.every((j,H)=>j&&A(H)?j[0]?.toLowerCase()!==j[1]?.toLowerCase():!0)&&S.current===_.key&&(S.current="",k.current=T.current),S.current+=_.key,y.start(d,()=>{S.current="",k.current=T.current,c?.(!1)});const B=(($?h??s??-1:k.current)??0)+1,z=N(P,S.current,B);z!==-1?(a?.(z),T.current=z):_.key!==" "&&(S.current="",c?.(!1))}),E=Ve(_=>{const D=_.relatedTarget,A=m.select("domReferenceElement"),N=m.select("floatingElement");ht(A,D)||ht(N,D)||(y.clear(),S.current="",k.current=T.current,c?.(!1))});qe(()=>{!b&&h!==null||(y.clear(),T.current=null,S.current!==""&&(S.current=""))},[b,h,y]);const R=v.useMemo(()=>({onKeyDown:C,onBlur:E}),[C,E]);return v.useMemo(()=>f?{reference:R,floating:R}:{},[f,R])}const dE=.1,x3=dE*dE,ln=.5;function Rd(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,f,d){let h=!1;return Rd(e,t,n,r,s,a)&&(h=!h),Rd(e,t,s,a,l,c)&&(h=!h),Rd(e,t,l,c,f,d)&&(h=!h),Rd(e,t,f,d,n,r)&&(h=!h),h}function k3(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Ad(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),f=Math.min(r,a),d=Math.max(r,a);return e>=l&&e<=c&&t>=f&&t<=d}function _A(e={}){const{blockPointerEvents:t=!1}=e,n=new Oi,r=({x:s,y:a,placement:l,elements:c,onClose:f,nodeId:d,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,S=null,k=typeof performance<"u"?performance.now():0;function T(E,R){const _=performance.now(),D=_-k;if(y===null||S===null||D===0)return y=E,S=R,k=_,!1;const A=E-y,N=R-S,P=A*A+N*N,$=D*D*x3;return y=E,S=R,k=_,P<$}function C(){n.clear(),f()}return function(R){n.clear();const _=c.domReference,D=c.floating;if(!_||!D||m==null||s==null||a==null)return;const{clientX:A,clientY:N}=R,P=mr(R),$=R.type==="mouseleave",I=ht(D,P),V=ht(_,P);if(I&&(b=!0,!$))return;if(V&&(b=!1,!$)){b=!0;return}if($&&bt(R.relatedTarget)&&ht(D,R.relatedTarget))return;function B(){return!!(h&&To(h.nodesRef.current,d).length>0)}function z(){B()||C()}if(B())return;const j=_.getBoundingClientRect(),H=D.getBoundingClientRect(),q=s>H.right-H.width/2,K=a>H.bottom-H.height/2,U=H.width>j.width,Y=H.height>j.height,O=(U?j:H).left,F=(U?j:H).right,G=(Y?j:H).top,L=(Y?j:H).bottom;if(m==="top"&&a>=j.bottom-1||m==="bottom"&&a<=j.top+1||m==="left"&&s>=j.right-1||m==="right"&&s<=j.left+1){z();return}let X=!1;switch(m){case"top":X=Ad(A,N,O,j.top+1,F,H.bottom-1);break;case"bottom":X=Ad(A,N,O,H.top+1,F,j.bottom-1);break;case"left":X=Ad(A,N,H.right-1,L,j.left+1,G);break;case"right":X=Ad(A,N,j.right-1,L,H.left+1,G);break}if(X)return;if(b&&!k3(A,N,j)){z();return}if(!$&&T(A,N)){z();return}let te=!1;switch(m){case"top":{const J=U?ln/2:ln*4,le=U||q?s+J:s-J,oe=U?s-J:q?s+J:s-J,ue=a+ln+1,xe=q||U?H.bottom-ln:H.top,ye=q?U?H.bottom-ln:H.top:H.bottom-ln;te=_d(A,N,le,ue,oe,ue,H.left,xe,H.right,ye);break}case"bottom":{const J=U?ln/2:ln*4,le=U||q?s+J:s-J,oe=U?s-J:q?s+J:s-J,ue=a-ln,xe=q||U?H.top+ln:H.bottom,ye=q?U?H.top+ln:H.bottom:H.top+ln;te=_d(A,N,le,ue,oe,ue,H.left,xe,H.right,ye);break}case"left":{const J=Y?ln/2:ln*4,le=Y||K?a+J:a-J,oe=Y?a-J:K?a+J:a-J,ue=s+ln+1,xe=K||Y?H.right-ln:H.left,ye=K?Y?H.right-ln:H.left:H.right-ln;te=_d(A,N,xe,H.top,ye,H.bottom,ue,le,ue,oe);break}case"right":{const J=Y?ln/2:ln*4,le=Y||K?a+J:a-J,oe=Y?a-J:K?a+J:a-J,ue=s-ln,xe=K||Y?H.left+ln:H.right,ye=K?Y?H.left+ln:H.right:H.left+ln;te=_d(A,N,ue,le,ue,oe,xe,H.top,ye,H.bottom);break}}te?b||n.start(40,z):z()}};return r.__options={...e,blockPointerEvents:t},r}const By="ArrowUp",Uy="ArrowDown",Hy="ArrowLeft",qy="ArrowRight",Vy="Home",Gy="End",AA=new Set([By,Uy,Hy,qy,Vy,Gy]),S3="Shift",w3=[S3,"Control","Alt","Meta"];function E3(e){return It(e)&&e.tagName==="INPUT"}function pE(e){return!!(E3(e)&&e.selectionStart!=null||It(e)&&e.tagName==="TEXTAREA")}function hE(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 f=mE(e,t,"left"),d=Nd(e),h=Nd(t);n==="ltr"&&(f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:f-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(s=f-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(f-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft?s=f-h.scrollMarginLeft-d.scrollPaddingLeft:f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const f=mE(e,t,"top"),d=Nd(e),h=Nd(t);f-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=f-h.scrollMarginTop-d.scrollPaddingTop:f+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=f+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function mE(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 Nd(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 T3(e){return Gv(19)?e:e?"true":void 0}const C3=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 gE={},bE={},yE="";function Eh(e,t){return Fc(e)?e:t}function vE(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Eh(t,n)).overflowY)}function R3(e){if(typeof document>"u")return!1;const t=Gt(e);return rn(t).innerWidth-t.documentElement.clientWidth>0}function _3(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Gt(e),r=n.documentElement,s=n.body,a=Eh(r,s),l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const f=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,f===d}function A3(e){const t=Gt(e),n=t.documentElement,r=t.body,s=Eh(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 N3(e){const t=Gt(e),n=t.documentElement,r=t.body,s=rn(n);let a=0,l=0,c=!1;const f=jr.create();if(Is&&(s.visualViewport?.scale??1)!==1)return()=>{};function d(){const y=s.getComputedStyle(n),S=s.getComputedStyle(r),C=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,gE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},yE=n.style.scrollBehavior,bE={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 E=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||S.overflowY==="scroll",D=y.overflowX==="scroll"||S.overflowX==="scroll",A=Math.max(0,s.innerWidth-r.clientWidth),N=Math.max(0,s.innerHeight-r.clientHeight),P=parseFloat(S.marginTop)+parseFloat(S.marginBottom),$=parseFloat(S.marginLeft)+parseFloat(S.marginRight),I=Eh(n,r);if(c=_3(e),c){n.style.scrollbarGutter=C,I.style.overflowY="hidden",I.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(E||_)&&(n.style.overflowY="scroll"),(R||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:P||N?`calc(100dvh - ${P+N}px)`:"100dvh",width:$||A?`calc(100vw - ${$+A}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"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,gE),Object.assign(r.style,bE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=yE)}function m(){h(),f.request(d)}d();const b=Ot(s,"resize",m);return()=>{f.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class O3{lockCount=0;restore=null;timeoutLock=Oi.create();timeoutUnlock=Oi.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 n=Gt(t),r=n.documentElement,s=n.body,a=rn(r);if(vE(a,r,s)){const c=new a.MutationObserver(()=>{vE(a,r,s)||(c.disconnect(),this.restore=null,this.lock(t))}),f={attributes:!0};c.observe(r,f),c.observe(s,f),this.restore=()=>c.disconnect();return}const l=ph||!R3(t);this.restore=l?A3(t):N3(t)}}const I3=new O3;function M3(e=!0,t=null){qe(()=>{if(e)return I3.acquire(t)},[e,t])}class D3 extends Uc{setState(t){}update(t){}set(t,n){}notifyAll(){}}function L3(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 S0(e,t){const n=v.useRef(e),r=Ve(t);qe(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function j3(e,t){const n=Ve((a,l)=>{(typeof e=="function"?e():e)||t(l||(ph?"touch":""))}),{onClick:r,onPointerDown:s}=L3(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function z3(e){const[t,n]=v.useState(null),r=j3(e,n);return S0(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const P3=v.createContext(void 0);function Mi(){return v.useContext(P3)?.direction??"ltr"}const $3="0account 1dd 1gent 5-circle 6square 5s 6-swarm 1larm-clock 2ert 1rchive 2my-base 2row-bend-up-left eright 7lock-bend-up-left cdown cleft dine-down hleft hright hup cright cup 7racket-from-down jleft jright jup l-dashed eto-down hleft hright hup 6ccw 7ircle-down dleft dright dup 7w 6down 6elbow-down-left hright cup-left fright 6left a-down bup 6right b-down cup 6square-down dfrom-down ileft iright iup dleft h-down itop iup dright i-down jtop jup dto-down gleft gright gup dup 7wap 6u-up-left bright 7p 5s-both-horizontal cvertical 7ccw a-angular 8ontract f-simple 8w 7down-up 7elbow-up-left 8xpand d-simple 7left-right 7out-cardinal 1sterisk 1t 2om 0bandaid 3knote 8s-stack 2rbell 2sketball 1each-umbrella 3ker 6-stop 2ehouse 2ll 4-dot 5slash 1inary 3oculars 1luetooth 1oard-kanban 2ok 4-open 4mark 4s 2wtie 1racket 7-dot 8error 7s-curly e-dot fx 9square 3in 5-hourglass 6simple cst 7lash 2iefcase 2owser 7s 2ush 1ug 3bot 2ilding 8s 2llseye 0calculator 3endar 8-hourglass 2mera 2r 3dholder 2stle 1d 1hart-bars 6line 6pie 7yramid 6scatter 3t-bubble b-chevrons-left-right cellipsis dxclamation cpencil dlus g-center cquestion bs c-grid 4Bubble a-ellipsis cxclamation bquestion as 2eck 5-circle 6square 5s 3f-hat 3ss-king 6tower 3vron-circle-down fleft fright fup 8down c-small 8left c-small 8right d-small 8up a-small 7s-down d-up 9left d-right 9right e-dotted-left 9up b-down 2ip 4-simple 1ircle 6-circle 7dashed 6s 7-check 1lipboard 2ock 3ne 3se 3ud 5-arrow-down cup 6download 6laptop 6upload 1ode 4-brackets 5simple 2g 2llection a-plus 3or-mode 2mmand 4ent 7-dashed 9iscussion 9ot 7s 3pass 7-check 8dot 2nversation 2okie 2pilot 3y 2rners-in 8out b-check csparkle 2st-high 5low 5medium 1redit-card 2oss-medical 5hair 3wn 2ystal-ball 1ube 4-coordinates 5nodes 5transparent 2rrency-btc 9dollar 9eth 3sor-logo 7text 2tlery 1ylinder 0dashboard 2tabase 8-network 1ebug-pause 6restart 6start 8op 2ckchair-umbrella 2sktop-download 2vice-camera d-video 7desktop 7mobile 1iagram 2ff 4-added 5ignored 5modified 6ultiple 5removed 7named 5single b-arrow-right-up cdot 2scard 3play 7-check 9ircle 9onnect 8play 8waves 7s 1ots-3-horizontal 7vertical 1rop 0easel 1dit 1lephant 2lipsis 1nvelope 8-open 1raser 2ror 1xclamation-circle ctriangle 2ecution-parallel asequential 2tensions 1ye 3-closed 4slash 0fast-backward 5forward 1eedback 1ile 4-add 6rrow-right-up 5binary 5chevrons-left-right 6ode 5directory e-create 5image 5list 6ock 5media 5pdf 6lus 5text 6ype-adobe-illustrator gphotoshop ababel czel bevy bicep comejs bower bun ac-plus-plus csharp blojure brystal buda adart bocker aejs blixir bslint af-sharp birebase ageckodriver bit-meta bo cdot brails dphql coovy cunt bulp ahaml cndlebars cskell aionic ajava escript bulia cpyter akarma botlin alatex biquid amaven bustache anpm bunjucks aocaml bdata apdf berl blatformio bowershell brettier cisma colog buppet bython areason cscript bollup bust asass bbt bcala blim btylus bublime bvelte bwift aterraform bypescript avala bite bsc bue aweb-assembly dpack bindows ayarn azig 5zip 4s 3m-reel 5strip 3ter 1lag 4-hill 3me 3sk 5-slash-circle 2oppy-disc 1ocus-window 2ld-dashed 4er 6-active 8rrow-right-up 7check 7dashed 7library 7open bed 7plus 6s 2rk 1unnel 6-simple 0game-controller f-retro 2uge 1ear 2m 1ift 2t-branch 4commit a-horizontal 7pare 4fetch 5ork 4merge 4pull 8-request g-closed ireate hdone iraft 6sh 3hub 6-actions 1lobe 1raduation-cap 3ph 5-line 6scatter 2id 4-plus 5sparkle 3pper 0hamburger 3mer 2sh 2t 1eadphones 4set 3rt 2xagon 1istory 1ome 2urglass 3se 0i-circle 1mage 5-square 1nbox 2finity 3o 2spect 1ssue 5-closed 6draft 5s 0joystick 1son 0kebab-horizontal 6vertical 2y 3board 8-tab 0laptop 2yers 3out-dialog 7empty 7floating-window 7panel-bottom j-dock kon kundock doff 7sidebar-left j-dock koff ln kundock fright k-dock loff mn lundock 8plit-horizontal n-dashed oright-dock uundock dvertical 1eaf 2go 1ibrary 2ghtbulb 9-sparkle 5ning 2nk 4-external 2st-bullets 5checks 5filter 5ordered 5todo 9-subtask 5x 1oading 2cation 3k 4-locked 5unlocked 2go-azure a-devops 5figma 5git 8hub 8lab 5jira 5linear 5markdown 6cp 6icrosoft-teams 5notion 5python 5sentry 6lack 5vscode b-insiders 5x 0mac-mini 2gic-wand 3net 4ifying-glass g-fuzzy hminus hplus hslash-circle iparkle aGlass f-minus gplus gslash-circle 2il 2p 3-pin 2rk-github 4down 2sk-happy 4s-happy 1cp 1egaphone 2ntion 3u 2rge 1ic 3roscope 2nus 5-circle 6small 1obile 2on 4-sparkle 5z 2re 1usic 2te 0new-file 5older 3spaper 1ote 0one-circle 1rganization c-filled 1wl 0package 7-zipper 2int-roller 2lette 2perclip 5plane 2ragraph 2ss 2use 5-circle 2w 1en-nib 3cil 6-square 3tagon 2ople 6-3 2rcent 3son 6-add 7chat-bubble 8ircle 7follow 7plus 1iano 2e-chart 2lcrow 2n 3-slash 2pe 1lan 4e 3y 4-bug 5circle 5slow 6uper-fast 4back-loop 4s-bug 2ug 4-slash 3s 4-circle 5minus 1ointer-arrow 1ug 2lse 2zzle-piece 0question 8-circle 2ote 0radar 3io-tower 1ect-magnifying-glass fGlass 2do 2fresh 2gex 2mote-control 4ve 6-close 2place 7-all 3ort 2turn 2view 1obot 2cket 4ing-chair 1ss 1uler 4s 2n 0satellite 1cales 1eal 4-check 5question 3rch 6-stop 2nd 2rver 6s 2ttings 8-gear 1hapes-square-circle 3re 2ield 6-check 7question 7x 2oe-fast 3pping-bag bsket 1ignal 1kills 6-capability 1lash-circle 2iders 1martwatch 2iley-happy c-square 7neutral 7plus 7sad 1nowflake 1occer-ball 2rt-ascending 5descending 2urce-control 1parkle 7s 2eaker-hifi 8waves 8x 2inner 2lit 5-horizontal 6vertical 2rint 1quare 6-dashed 8ot 6s 7-minus 8plus 8x 1tack 3r 4-empty 5full 3tus-done 8raft 7needs-attention 2op 4-circle 4watch 3refront 1un 1watches 1ymbol-folder 2nc 0t-shirt 1able 3s 2g 3s-chevron-down dleft dright dup 2rget 1erminal 8-rectangle 2xt-aa 6b 5b 5c 5d 5italic 5j 5r 5s 6trikethrough 5t 6-square 6t 5y 1hinking-high 9low 9medium 2reads-parallel 8single 4e-bars 2umbs-down 7up 9-down 6down 6up 1raffic-cone 7Cone 3sh 5can 3y 2easure-chest 3nding-down 9up 2iangle-small-down fleft fright fup 1wig 0unfold-dashed 2lock 2mute 2verified 0vault 1erified 3sions 1ideo-camera 1m 1r 2-headset a-head 0wallet 2nd 2rning 2tch 2veform 1hole-word 1indow 6-pointer-arrow 6s 1rench 0x 1-circle 0yarn 0zap 1ipper 1oom-in 5out 1zz",F3="1ajd -8p 1wz t 1 1 -w ah -273 18 1wb a9 3 -6 -ke 1 iy 2 2 2 -j3 1 3s 1 a -1f5 -1 -1 1f6 -1 -1 -1ok 8a 1 1 1 -5k -4d 9c 1ww 1 1 -269 1m4 1 -1m4 1m5 -zs 10y 2q -1 -1ra 8u 1ft 7 -1 0 -7 6 -114 0 -k 145 -1r8 1r7 -2k -1ez c9 13u -1od -8 1m9 1x -1v 1w -1v -1na 1nb k4 -i9 -1u -1dw -4p il -a2 1jz 1 5n -5m 1 1 1 -1xc a0 1nd -1w8 6w 32 -80 3k 1qr -1sb 1r8 -1v4 1 6v 1ue -1yb 5y 1 -5z 5y 1 -9o l9 1bp 1 1 1 -1w3 2 39 i8 -lg bu 1k7 1 -1mx 1my -1w2 1ut -1tn 1ux 1 1 1 -1tv 67 2 1md -1me c2 -9q 1ed -1l6 ht 1k2 1 -oa 7o 5w -1an 14n -1l6 1dm 7o -1pa lk 108 -1ep 1p2 1 1 8d 2 2 2 -24o 1lr -1lq 1lr -1lq 1lr -1lq 1lr -1k3 2 kf zn 1y -11z -k2 k7 -c2 1kx -1np -e es -mc bb bf -9 -dw c6 -d4 -6g 1 -1 25i -25h 1vr -1xc 1xd -1ub 1lz c -1np 1le -1nx bn 1fm -1fq -8z 7i 2 -1 1h6 70 -1mk -1w -3j -1 1hq ab -1e 1 1 -1uc 1vp 1 6n -6m -1ac 1ad -1ah 103 af 1 1 -1a3 10r 9d 1 1 -1vt 1vu -70 -1oq 1oo -1it 1pw -1w7 o -1 -2n 2p 1tv -1tp -5 1 1 91 -90 1 8y -n 1 ae -lk 73 1 1b -1a 1zf 1 -26j 44 1yc -4a -1yf 21u -21l 4g -1 hx -m1 mt -nk 1wk 1 -1t7 -3a 1qg -1n5 1tb 1 -5n -1qp lu -in -37 32 -32 8 -3 2y a1 -9l -g 1 iq 1ce 41 -2 28 -p 5 -16 46 -18 1a -5x 1 j 4 2x 2e -7a 58 -2m 1y -2j x r -3o 1 3v -s -32 4j 1e -y o -b -2z -2c 1 1 1 3e -3d 1 34 1f k -1x c r 1k -2t u 21 -1u -1m 4o -2y m -2m -24 4u -s -41 1 2q 24 -3m 3q -12 -x -2y 1 1 1 3f -3e 3c -3b 14 -13 1 3f p -24d 39 1v0 1 -1v0 9a -7z -1a -3d a0 -46 ij 3 -o6 37 -9 9 23b -1wu -6g -38 -3 30 1tf -1ta 42 1qz 1 -1w2 17 28 -27 jf -jc 1l3 -1l2 80 -ca 4b 1u -64 ae -u 3u -2z -4a -59 3f 2 w -u 67 1 1od 1 1 -1um 1un -1bs 1dm -1t 1 1 -1up 1xy -21l 3o jt -jt -42 de 1ae -1jn hx -m2 9p -5h j2 -dd df 1bf -1ug -43 44 1 ij -a8 ba -e8 1x9 1 1 -1w0 20 -2f 1d7 -1cs 1 20 -20 -f 18n -18a 23 -23 -c 18n -15r -1 1be 1 -1in 1sh 1 -1ql -8r bz be -id k1 -1t -ky 5s -31 je 191 -1uu ln -j4 -4l 0 73 2s g 1mq ad -26z 1wn 54 -53 -7n -1ci 1p9 -53 -1kk 1po -53 -1l1 1 -54 1rs -1p7 -x -8x bk -3v -1 -1f 76 -df 7p -1 -1f -1e 6h -6j -46 49 1u6 1 -1lx -89 8n -5d n 2v -bd 5e 1ib b3 -1w2 1l0 b3 1 -1yr bj -6v h5 -lp 1yo -1u2 1ru -1wi 0 24k -1zt 1us -s 1 -1lq -1x 1ci -10n 142 -3e b5 -b4 -1o0 oa 1ds -21r 1yu -1mp -cs 9y -1j 3 1g 0 25 -1i -2v -2a 1r4 85 -gc b5 -7v -1jd l 1ob 1 -l -1m9 -4v -2l -34 1jm 5s -1bf 1sd -20j 1tx -b5 -1ir 1 1tw -1tv 1lp 0 -1lm 0 1 21d -21a g7 15b 0 -1lb 4o 1dp -1c7 -64 1tg -1td -4x 1vi -56 7z -1uv 1jq -1gx -1 -7d 69 5d 1og -1tr 2 -2i 1vm -1n9 -5u 32 2 -1 1q1 1 1 1 -1ny 0 -9f 45 1hz -51 gb -ga -1ds 1dq gd 1 -bb 1 -113 -bo 0 1o2 -1sd -29 iu 19h -1jn -79 1qn -1x0 270 -a3 -1uw a 5s -5w 7l -a0 0 6n gx 1 1 13z -1iu 1o3 2z -ba bb -1z5 -c 1zi -1qm 1dz -1nc 26w 2 2 2 -1vw 1sm -22x 18 3h -3v 20b -2 -1xb 1yi -12 2b 1 -fr -19 -1g8 1va -54 1 1 -r 1 -1ph fg 1 1l8 -1l9 1 14m 0 -1qk 0 3s 1vh 1 1 -1sq 1 1 1 1w2 -1ej -hg 1 1 1sj -1si 1 -4f -2n 1zk 60 1 -60 -1ob -bo 7k 1sg -1se 1 2a 1da -1g2 et -l7 230 -1s3 1od -1sc 1 1sc",B3="01070e0f0g0h0i0j0k0l0r0w0x0y0z11161718191a1b1c1h1i1j1k1l1m1n1o1t1x2c2d2q2t2v2w2y2z323c3d3f3n3r3u3x3y3z444547484a4b4c4d4e4j4k4l4m4n4o4p4q4r4s4t4u5556585b5c5d5e5m5n5o5p5q5r5u5x606162636b6e6g6i6j6l6m6n6s6u6w6x7071727375767778797a7b7c7f7g7m7p7s7u7x7y828388898c8e8f8n8o8p8q8r8s8t8u8v8w8x8y8z909192939495969798999a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9za0a1a2a3a4a5a6a7a8a9aaabacadaeafagahaiajakalamanaoapaqarasatauavawaxazb1b6b7b9bgbpbqbsbtbubvbxbybzc0c1c2c3c4c5c8cdcecjcncoctcucvcyd0d1d3d5dadbdcdgdkdldndqdsdvdze3e4e5e7ecegeheiejf5f7f8fbfcfdfffhfjfofrftfufwfxg1g2gagbgcgeggghgigjgkgpgth0h2h4h5h7h9hehghhhjhkhohxhyhzi5ibieifihijiminioiqirisitiyizj0j1j3j5j7jcjdjejgjhjkjljnjqjrjsjtjujvjwjyk0k1k2k5k7kakbkckdkekfkgkjkkknkokqkrkukvkxl4l5l7l8lblclllnlolrlsltlulzm2m4m6m8m9mambmcmdme",U3="1c6d br -fj 1 ep 2 2 2 -eu 1 ap -ao 1 1 1 1 3 -2 1 4 -2 1 2 3 -2 1 0 4 -2 1 0 2 1 1 93 4a -dc 1 1 aj 2q 0 -d8 1 1 1 8p -8o 4 -3 1 1 2 -1 -2 1 2 3 -2 1 dv 2 2 2 -dy -1 3 -1 3 -1 3 -1 3 -1 2 1 8 34 -3b 8f -8e 2 -1 2 1 -l m -m ac -76 -2j 1 bp -bm -2 1 8a -g -7s 1 -1qm 2j 1qq -3m 3t -2l 1e -1f -7 1 1 1 1 1 1 2r -2p dc -43 -v -8d 2n -2m 1 1 -19 1a 0 0 5 7f 1c -2 28 -p 5 -16 46 -18 1a -3q 1 -1o 4 2x 2e -6p 4n -2m 1y -2j x r -33 50 -1p -s -2i 3z 1e -y o -b -2z -1s 28 2m -4t 2w -28 -n 2n 1f k -1x c r 1k -2t 2e h -1u -1m 4o -2y m -2m -1n 4d -s -3k 1 29 24 -3m 3q -12 -x 29 -4q 1 4o -1o -2z 2x -2w p -o 1 30 p -b0 1 7d -7c 1 1 1 0 -v w 1 2 -1 2 1 1 6 -1 -4 1 1 1 3 1 d8 1 -61 -77 7u -7t 2 -1 -1 3 -1v 13 bv -b2 2 1f -1e 0 1 0 1 0 1 1 8v -7t -11 -u v 6 -5 0 1 3 -2 1 1 -2 1 -17 19 av -dk 2q 2 -1 2 1 1 q 99 -2p 34 -4a -63 6e -8w -1pu 1sd 74 -73 -2q 2r 9d -9c -1px 1py 1 2 -1 2 an -am bn -c1 1c -x -1q4 1q6 -1 -k 8 j -2l 86 -5n -3 1 1 7 0 -5 1 1 1 1 -1r 1s 0 1 1 -15 1 15 4 -3 1 1 2 1 0 -3e 13 -17o 1a0 1 -25 7d 6d -bk an 2 2 2 -as 9l -3v -2 17 -12 -2 -5q 66 3k 1 -1 1 -9q 0 75 -8i z -c r 1 -2l 24 5s -5a 1 2 -1 7g -80 9q -am -1",xE=2;function H3(e){const t=[];let n="";for(const r of e.split(" "))n=n.slice(0,Number.parseInt(r[0],36))+r.slice(1),t.push(n);return t}function NA(e){const t=[];let n=0;for(const r of e.split(" "))n+=Number.parseInt(r,36),t.push(String.fromCharCode(n));return t}const Ip=H3($3);function q3(){const e=NA(F3),t={};for(let n=0;n<Ip.length;n++)t[Ip[n]]=e[n];return t}function V3(){const e=NA(U3),t={};for(let n=0;n<e.length;n++){const r=Number.parseInt(B3.slice(n*xE,(n+1)*xE),36);t[Ip[r]]=e[n]}return t}const OA=q3(),G3=V3(),W3={...OA,...G3};function K3(e,t="outline"){return t==="filled"?W3[e]:OA[e]}const Y3={root:{km0Bbg:"ui-ngwomw",$$css:!0}},X3=new Set(["ui-progress-spin","cursor-icon-spin"]);function Z3(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&X3.has(t.animationName)&&(t.startTime=0)}const Wy=v.createContext(void 0);function Ms({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:f,buttonVariant:d,buttonTone:h,buttonPrimaryTone:m,buttonIconSize:b,buttonRounded:y,buttonFullWidth:S,menuSize:k,disabled:T,children:C}){const E=v.useContext(Wy),R=v.useMemo(()=>({iconSize:e??E?.iconSize,iconButtonSize:t??E?.iconButtonSize,iconButtonVariant:n??E?.iconButtonVariant,iconButtonTone:r??E?.iconButtonTone,iconButtonRootStyle:s??E?.iconButtonRootStyle,iconButtonIconStyle:a??E?.iconButtonIconStyle,iconButtonIconSize:l??E?.iconButtonIconSize,buttonSize:c??E?.buttonSize,buttonRootStyle:f??E?.buttonRootStyle,buttonVariant:d??E?.buttonVariant,buttonTone:h??E?.buttonTone,buttonPrimaryTone:m??E?.buttonPrimaryTone,buttonIconSize:b??E?.buttonIconSize,buttonRounded:y??E?.buttonRounded,buttonFullWidth:S??E?.buttonFullWidth,menuSize:k??E?.menuSize,disabled:T??E?.disabled}),[S,m,h,b,f,y,c,d,T,l,a,r,s,t,n,e,k,E]);return g.jsx(Wy.Provider,{value:R,children:C})}function ha(){return v.useContext(Wy)}const Q3="sm",J3=/(^|-)(left|right)(-|$)/,e$=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),t$=new Set(Ip.filter(e=>J3.test(e)||e$.has(e))),Vt={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",keTefX:"ui-jb5y04",k71WvV:"ui-1bxnb1t",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-i75md2",$$css:!0},colorDanger:{kMwMTN:"ui-3pdtkl",$$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-13zi6q3",$$css:!0}};function n$(e,t,n){return[Vt.base,IA(e),r$(t),i$(n)]}function w0(e){return typeof e=="string"&&!e.startsWith("var(")}function IA(e){if(!w0(e))return Vt.noPresetSize;switch(e){case"xs":return Vt.sizeXs;case"sm":return Vt.sizeSm;case"base":return Vt.sizeBase;case"lg":return Vt.sizeLg;case"xl":return Vt.sizeXl;case"2xl":return Vt.size2xl}}function r$(e){switch(e){case"primary":return Vt.colorPrimary;case"secondary":return Vt.colorSecondary;case"tertiary":return Vt.colorTertiary;case"quaternary":return Vt.colorQuaternary;case"git-added":return Vt.colorGitAdded;case"git-modified":return Vt.colorGitModified;case"git-removed":return Vt.colorGitRemoved;case"git-untracked":return Vt.colorGitUntracked;case"cyan":return Vt.colorCyan;case"blue":return Vt.colorBlue;case"red":return Vt.colorRed;case"green":return Vt.colorGreen;case"success":return Vt.colorSuccess;case"danger":return Vt.colorDanger;case"yellow":return Vt.colorYellow;case"magenta":return Vt.colorMagenta;case"orange":return Vt.colorOrange;case"purple":return Vt.colorPurple;case"accent":return Vt.colorAccent;case"brand":return Vt.colorBrand;case void 0:return Vt.noColor}}function i$(e){switch(e){case"spin":return Vt.modifierSpin;case"disabled":return Vt.modifierDisabled;case"hidden":return Vt.modifierHidden;case void 0:return Vt.noModifier}}function s$(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function Pt({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:f,style:d,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const S=ha(),k=v.useCallback(A=>{typeof y=="function"?y(A):y&&(y.current=A),A&&t==="spin"&&n&&Z3(A)},[y,t,n]),T=s??S?.iconSize??Q3,C=w0(T),E=Mi()==="rtl"&&t$.has(e),R=s$(K3(e,r)),_={...R?{"--cursor-icon-content":R}:{},...C?{}:{"--icon-size":typeof T=="number"?`${T}px`:T},...d},D=qt({rootClass:"ui-icon",stylexStyles:[n$(T,a,t),E&&Y3.root,l&&Vt.capTrim,f],className:Qt("cursor-icon",c),style:_});return g.jsx("i",{ref:k,className:D.className,"data-icon-name":e,"data-size":C?T:void 0,"data-color":a,style:D.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const o$=v.createContext({root:null});function ma(){return v.useContext(o$).root}const a$={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"},l$={},u$=3e3,c$=10;let kE=u$;function f$(){const e=kE;return kE+=c$,{zIndex:e,release:()=>{}}}const d$=v.createContext(null);function p$(){return v.useContext(d$)}function Fl(e,t){const n=p$(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??f$();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?l$:{[a$[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const E0=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{getButtonProps:h,buttonRef:m}=jl({disabled:a,focusableWhenDisabled:l,native:c});return dn("button",t,{state:{disabled:a},ref:[n,m],props:[d,h]})}),h$=["secondary","tertiary","accent","monochrome","success","warning","danger"],m$=["accent","monochrome","success","danger","warning"],MA={plan:"warning","git-added":"success","git-modified":"warning","git-removed":"danger"},g$=["accent","success","warning","danger"];new Set(h$);new Set(m$);const b$=new Set(g$);function y$(e){return e!==void 0&&Object.hasOwn(MA,e)}function v$(e){return e!==void 0&&b$.has(e)}function DA(e){if(e!==void 0)return y$(e)?MA[e]:e}const LA="accent",x$=["primary","secondary","media"],k$=["outline","ghost","text"],S$=new Set(x$),w$=new Set(k$);function E$(e){return S$.has(e)}function T$(e){return w$.has(e)}function T0(e,t){const n=e==="secondary"&&t!==void 0&&!v$(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:E$(e)&&!n,applyNonFilledBackground:T$(e)||n}}const C0={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-1e1xjh9 ui-1eont2s ui-qygd40 ui-1ucl2ju ui-111ni6s ui-3id928 ui-wqjwyh 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}},jA={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-1sd9hjt",$$css:!0},monochrome:{"--ui-button-fg":"ui-4zyimg","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},success:{"--ui-button-fg":"ui-1091cms","--ui-button-fg-hover":"ui-qejad5",$$css:!0},warning:{"--ui-button-fg":"ui-90x234","--ui-button-fg-hover":"ui-v3sia6",$$css:!0},danger:{"--ui-button-fg":"ui-1jtauhq","--ui-button-fg-hover":"ui-1iqdewe",$$css:!0}},C$={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}},Ri={appearance:{"--ui-button-bg-disabled":"ui-t2ps8i ui-1siydi6 ui-9mchb4 ui-b3sabi","--ui-button-fg-disabled":"ui-lxpv47 ui-1wzq4de",kWkggS:"ui-elcf9h ui-g74ub2 ui-4vc931 ui-1twq3x9 ui-mzrycd",kMwMTN:"ui-gl2jp8 ui-qfdz8i ui-zik83n ui-7mi40u",kKMj4B:"ui-e1kniv ui-fq1cfh",kSiTet:"ui-1x77wit",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 ui-mzrycd",kMwMTN:"ui-8ech78 ui-7mi40u",$$css:!0},media:{kSiTet:"ui-1szrgyu",k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-afdq1a ui-125v35v ui-1olvpfz ui-oa62de ui-1chhnie ui-302ab4 ui-18o3eha ui-1qs2zoo ui-1g9fn2x ui-10rfvjz ui-18ab9qp","--ui-button-bg-hover":"ui-13v2mu8 ui-yt64w ui-e9ir63 ui-onvtd7 ui-1k8s92z ui-1kvkcw9 ui-43o616 ui-cs87t5 ui-197nqx8 ui-uudzfn ui-uontnf","--ui-button-bg-active":"ui-1f1zgjn ui-1nsurhp ui-11xudch ui-1f8rfv1 ui-ggai1r","--ui-button-fg":"ui-18rr0f6 ui-cdmvwo ui-1oum4wa ui-1yrx47c ui-1s3xcaz ui-2424zi ui-rwu1v7 ui-9sccad ui-hcepst ui-wvzk2y ui-gftpnt ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38 ui-lidx4s ui-f1csfx ui-10swf5o ui-2fu0p3","--ui-button-label-shadow":"ui-107xv6h ui-1fgkyrd ui-uxtdke ui-1lpoe4m ui-1mh6czn",$$css:!0}},Tl={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 ui-wm9d6",$$css:!0}},R$=["accent","success","warning","danger"],_$=new Set(R$);function Mp(e){return e!==void 0&&_$.has(e)}const zA={accent:{"--ui-button-bg-hover":"ui-2qxk4j",$$css:!0},success:{"--ui-button-bg-hover":"ui-11h7f69",$$css:!0},warning:{"--ui-button-bg-hover":"ui-1donwlf",$$css:!0},danger:{"--ui-button-bg-hover":"ui-x6ealz",$$css:!0}},PA={accent:{kVAM5u:"ui-5r2jki ui-wm9d6",$$css:!0},success:{kVAM5u:"ui-1gvt79p ui-wm9d6",$$css:!0},warning:{kVAM5u:"ui-1cucnr7 ui-wm9d6",$$css:!0},danger:{kVAM5u:"ui-105evjg ui-wm9d6",$$css:!0}},$A={sm:"sm",md:"sm",lg:"base",xl:"lg"};function A$(e){const t=e.currentTarget;e.key===" "&&t instanceof HTMLAnchorElement&&t.href!==""&&e.preventBaseUIHandler()}function Dp(e){return t=>{e?.(t),A$(t)}}const FA={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Ds={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},_s={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},BA={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},N$={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},O$={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},I$={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Bl={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Th={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},SE={content:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-pkkfsy",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kfSwDN:"ui-87ps6o",k9WMMc:"ui-2b8uid",$$css:!0},pill:{kaIpWk:"ui-1i4c3av",kOIVth:"ui-11twubx",$$css:!0}},M$={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-19bzwdx",kGO01o:"ui-18d9i69",kZCmMZ:"ui-v853mj",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0}},D$={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}},Ei={content:SE.content,pill:SE.pill,size:M$,pillSize:D$,typography:{sm:_s.root,md:_s.root,lg:_s.root,xl:BA.root}},UA={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}},L$={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}},R0={root:[L$.root,UA.root]},Es={sm:{kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kaIpWk:"ui-1043rbw",$$css:!0},lg:{kaIpWk:"ui-1m7fhj7",$$css:!0},xl:{kaIpWk:"ui-1q4ynmn",$$css:!0}},Vi={sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},Uu={markdownHover:{"--ui-md-state-color":"ui-1w18epr",$$css:!0},primaryWeight:{k63SB2:"ui-20ajya ui-1uv0z76",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},frameContent:{kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",$$css:!0}},wE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-pkkfsy",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},kbs:{kmuXW:"ui-2lah0s",kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",k33iCy:"ui-1go34h7",$$css:!0}},wi={root:[R0.root,Ei.content,Uu.markdownHover,Uu.primaryWeight],fontSmoothing:Th.root,align:{center:null,left:Uu.alignLeft},fullWidth:Uu.fullWidth,frame:{container:null,content:Uu.frameContent},shape:{pill:Ei.pill},size:{sm:[Vi.sm,Es.sm,Ei.size.sm],md:[Vi.md,Es.md,Ei.size.md],lg:[Vi.lg,Es.lg,Ei.size.lg],xl:[Vi.xl,Es.xl,Ei.size.xl]},pillSize:Ei.pillSize,typography:Ei.typography,labelGroup:wE.labelGroup,kbs:[Ds.root,wE.kbs]};function j$({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const z$="md",P$="secondary",$$={"ui--default-marker":"ui--default-marker",$$css:!0};function EE(e,t){if(e==null)return null;const n=typeof e=="string"?{name:e}:e;return g.jsx(Pt,{"aria-hidden":"true",modifier:n.modifier,name:n.name,size:t,variant:n.variant})}function hn({variant:e,tone:t,size:n,rounded:r,frame:s="container",align:a,fullWidth:l,disabled:c,children:f,leadingIcon:d,trailingIcon:h,kbs:m,pressed:b,className:y,style:S,rootStyle:k,"aria-expanded":T,"aria-pressed":C,"aria-busy":E,onKeyDown:R,onKeyUp:_,...D}){const A=ha(),N=e??A?.buttonVariant??P$,P=n??A?.buttonSize??z$,$=j$({enforcedRounded:A?.buttonRounded,rounded:r,variant:N}),I=l??A?.buttonFullWidth??!1,V=c??A?.disabled,B=t??(N==="primary"?A?.buttonPrimaryTone??A?.buttonTone:N==="ghost"?A?.buttonTone:void 0),z=DA(B??(N==="primary"?LA:void 0)),j=A?.buttonIconSize??$A[P],H=D["data-pressed"],q=T0(N,z),K=Dt(wi.root,wi.fontSmoothing,Ri.appearance,q.applyControlTone&&C0.foreground,q.applyControlTone&&z!==void 0&&jA[z],q.applyFilledColors&&Ri.colors,q.applyNonFilledBackground&&Tl.background,(N==="outline"||N==="ghost")&&Mp(z)&&zA[z],N==="outline"&&Tl.outline,N==="outline"&&Mp(z)&&PA[z],N==="media"&&Ri.media,b===!0&&Ri.engaged,wi.size[P],wi.typography[P],wi.align[a??"center"],I&&wi.fullWidth,$&&wi.shape.pill,$&&wi.pillSize[P],wi.frame[s],A?.buttonRootStyle,k,$$),U=EE(d,j),Y=EE(h,j);let O=f;if(m!=null){const F=Dt(wi.labelGroup),G=Dt(wi.kbs);O=g.jsxs("span",{className:Qt("ui-button__label-group",F.className),style:F.style,children:[U,f,Y,g.jsx("span",{className:Qt("ui-button__kbs",G.className),style:G.style,children:m})]})}else(U!=null||Y!=null)&&(O=g.jsxs(g.Fragment,{children:[U,f,Y]}));return g.jsx(E0,{...D,onKeyDown:Dp(R),onKeyUp:Dp(_),"aria-busy":E,"aria-expanded":T,"aria-pressed":T===void 0&&b!==void 0?b:C,className:Qt("ui-button",K.className,y),style:{...K.style,...S},"data-variant":N,"data-size":P,"data-rounded":$||void 0,"data-frame":s!=="container"?s:void 0,"data-tone":z,"data-align":a==="left"?a:void 0,"data-full-width":I||void 0,"data-pressed":b!==void 0?String(b):H,"data-busy":E===!0||E==="true"?"":void 0,"data-padded-label":s==="container"?"":void 0,disabled:V,children:g.jsx(Ms,{iconSize:j,children:O})})}function qc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Cl({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!==void 0?e:a,f=v.useCallback(d=>{s||l(d)},[]);return[c,f]}const F$="data-valid",B$="data-invalid",U$={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},H$={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},q$={disabled:!1,...H$},Ch={valid(e){return e===null?null:e?{[F$]:""}:{[B$]:""}}},V$="data-checked",G$="data-unchecked";function W$(e){return{checked(t){return e.indeterminate?{}:t?{[V$]:""}:{[G$]:""}},...Ch}}const K$={invalid:void 0,name:void 0,validityData:{state:U$,errors:[],error:"",value:"",initialValue:null},setValidityData:Cn,disabled:void 0,setTouched:Cn,setDirty:Cn,setFilled:Cn,setFocused:Cn,validationMode:"onSubmit",shouldValidateOnChange:()=>!1,state:q$,registerFieldControl:Cn,validation:{getValidationProps:(e,t=In)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Cn,getInputControl:()=>null,commit:async()=>{},change:Cn}},Y$=v.createContext(K$);function Rh(e=!0){const t=v.useContext(Y$);if(t.setValidityData===Cn&&!e)throw new Error(Mn(28));return t}function HA(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Rh(),c=gr(()=>Symbol());qe(()=>{const f=c.current;if(!s){l(f,void 0);return}l(f,{controlRef:e,getValue:r,id:t,name:a,value:n})},[e,s,r,t,a,l,c,n]),qe(()=>{const f=c.current;return()=>{l(f,void 0)}},[l,c])}const X$=v.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Cn,validationMode:"onSubmit",submitCountRef:{current:0}});function qA(){return v.useContext(X$)}const Z$=v.createContext({controlId:void 0,registerControlId:Cn,resetControlId:Cn,labelId:void 0,setLabelId:Cn,messageIds:[],setMessageIds:Cn,getDescriptionProps:e=>e});function _h(){return v.useContext(Z$)}function _0(e={}){const{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:s,resetControlId:a}=_h(),l=Pl(),c=gr(()=>Symbol()),f=v.useRef(!1),d=v.useRef(!1),h=Ve(()=>{!f.current||s===Cn||(f.current=!1,s(c.current,void 0))});return qe(()=>{if(!n||s===Cn){h();return}let m;if(t!==void 0)d.current=!0,m=t;else if(d.current)m=l;else{a();return}if(m===void 0){h();return}f.current=!0,s(c.current,m)},[t,n,s,a,l,c,h]),qe(()=>h,[h]),(n?r:void 0)??t??l}const Q$=v.createContext(void 0);function J$(){const e=v.useContext(Q$);if(e===void 0)throw new Error(Mn(14));return e}const e4=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,f=J$(),d=f.checked||f.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Hc(d),y=v.useRef(null),S={...f,transitionStatus:m};Ro({batch:!0,enabled:!d,open:d,ref:y,onComplete(){d||b(!1)}});const T={...W$(f),...da},C=l||h,E=dn("span",t,{ref:[n,y],state:S,stateAttributesMapping:T,props:c});return C?E:null}),t4="md",TE={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",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-1e1y6u3",kMwMTN:"ui-1lriclw ui-m9a9xk",kWkggS:"ui-i07v4r ui-1yow1yk ui-ff598k",kVAM5u:"ui-1tjqsyf ui-1b3ufqo ui-1ch3k2o",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}},n4={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}},r4={sm:9,md:10,lg:11},CE={"--icon-weight":"700"};function i4({indeterminate:e,interactive:t,size:n,variant:r}){const s=Dt(TE.root,TE[n],n4[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=r4[n];return g.jsx("span",{"aria-hidden":"true",className:Qt("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(e4,{className:Qt("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,f)=>g.jsx("span",{...c,children:g.jsx(Pt,{capTrim:!0,name:f.indeterminate?"minus":"check",size:l,style:CE})}),style:a.style}):g.jsx("span",{className:Qt("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(Pt,{capTrim:!0,name:e?"minus":"check",size:l,style:CE})})})}function VA({checked:e,disabled:t,indeterminate:n=!1,size:r=t4,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:Qt("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(i4,{indeterminate:n,interactive:!1,size:r,variant:s})})}function s4(e,t,n=Object.is){const{length:r}=e;if(r!==t.length)return!1;for(let s=0;s<r;s+=1)if(!n(e[s],t[s]))return!1;return!0}function o4(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:s}=e,[a,l]=Cl({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:d}=Hc(a,!0,!0),h=Pl(),[m,b]=v.useState(),y=m===null?void 0:m??h,S=Ve(k=>{const T=!a,C=wt(zl,k.nativeEvent);r(T,C),!C.isCanceled&&l(T)});return v.useMemo(()=>({defaultPanelId:h,disabled:s,handleTrigger:S,mounted:c,open:a,panelId:y,setMounted:f,setOpen:l,setPanelIdState:b,transitionStatus:d}),[h,s,S,c,a,y,f,l,b,d])}const GA=v.createContext(void 0);function WA(){const e=v.useContext(GA);if(e===void 0)throw new Error(Mn(15));return e}const a4="data-open",l4="data-closed",u4=Yv,c4="data-panel-open",f4={[a4]:""},d4={[l4]:""},p4={open(e){return e?{[c4]:""}:null}},h4={open(e){return e?f4:d4}},KA={...h4,...da},m4=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:f,style:d,...h}=t,m=Ve(c),b=o4({open:f,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),S=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),k=dn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:KA});return g.jsx(GA.Provider,{value:S,children:k})}),g4={...p4,...da},RE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=WA(),{className:f,disabled:d=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:S,buttonRef:k}=jl({disabled:d,focusableWhenDisabled:!0,native:m});return dn("button",t,{state:l,ref:[n,k],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,S],stateAttributesMapping:g4})}),Hu={height:void 0,width:void 0};function b4(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:f,setOpen:d,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,S]=v.useState(Hu),k=v.useRef(Hu),T=v.useRef(!1),C=v.useRef(c),E=v.useRef(!1),[R,_]=v.useState(!1),D=v.useRef(null),A=So(t,m),N=An(c),P=dA(m),$=!c&&!a,I=R?"idle":h,V=c&&(C.current||E.current),B=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?k.current:y,z=n&&$&&b.current!=="css-animation",j=Ve((Y,O=!0)=>{O&&(k.current=Y),S(Y)}),H=Ve(()=>{D.current?.(),D.current=null}),q=Ve(Y=>{H(),D.current=()=>{D.current=null,Y()}}),K=Ve(()=>{c&&a&&b.current==="css-animation"&&(E.current=!0)});qe(()=>{!R||h==="starting"||_(!1)},[R,h]),v.useEffect(()=>()=>{K(),H()},[K,H]),qe(()=>{const Y=m.current;if(!Y)return;!c&&D.current&&H();const O=y4(Y,V);if(b.current=O,c&&h==="idle"&&C.current&&O==="css-animation"){k.current=el(Y);return}if(c&&h==="starting"){const L=T.current;if(T.current=!1,O==="none"){j(el(Y)),_(!0);return}if(O==="css-transition"){const J=v4(Y);if(j(el(Y)),!L)return J;const le=Od(Y,"transition-duration","0s");return q(le),_(!0),J}j(el(Y));const X=Od(Y,"animation-name","none");if(!L){X();return}const te=Od(Y,"animation-duration","0s");X(),q(te),_(!0);return}if(!c&&a&&(h==="idle"||h==="starting")){if(C.current=!1,E.current=!1,O==="none"){j(Hu,!1),f(!1);return}j(el(Y));return}if(h!=="ending")return;if(O==="none"){f(!1);return}const F=el(Y);if(!(F.height>0||F.width>0)){f(!1);return}j(F),O==="css-animation"&&Od(Y,"animation-name","none")()},[a,c,H,j,f,q,V,h]),Ro({enabled:c&&a&&I==="idle",open:!0,ref:m,onComplete(){c&&j(Hu,!1)}}),v.useEffect(()=>{if(c||!a||I!=="ending"||!m.current)return;const O=new AbortController;let F=-1;function G(){N.current||(f(!1),j(Hu,!1))}return F=jr.request(()=>{P(G,O.signal)}),()=>{jr.cancel(F),O.abort()}},[N,a,c,I,P,j,f]),qe(()=>{const Y=m.current;!Y||!n||!$||Y.setAttribute("hidden","until-found")},[$,n]),v.useEffect(function(){const O=m.current;if(!O)return;function F(G){const L=wt(Ni,G);l(!0,L),!L.isCanceled&&(T.current=!0,d(!0))}return Ot(O,"beforematch",F)},[l,d]);const U=s||n||a||c;return{height:B.height,props:{...z?{[u4]:""}:void 0,hidden:$,id:r},ref:A,shouldPreventOpenAnimation:V,shouldRender:U,transitionStatus:I,width:B.width}}function el(e){return{height:e.scrollHeight,width:e.scrollWidth}}function y4(e,t){const n=rn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&_E(n.animationDuration),s=_E(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function _E(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Od(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 v4(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=jr.request(n);return()=>{jr.cancel(r),n()}}const x4="--collapsible-panel-height",k4="--collapsible-panel-width",S4=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:f,...d}=t,{defaultPanelId:h,mounted:m,onOpenChange:b,open:y,setMounted:S,setPanelIdState:k,setOpen:T,state:C,transitionStatus:E}=WA(),R=s??!1,_=a??!1,D=c||void 0,A=D??h;qe(()=>(k(K=>D??(K===null?void 0:K)),()=>{k(K=>K===D?null:K)}),[D,k]);const{height:N,props:P,ref:$,shouldPreventOpenAnimation:I,shouldRender:V,transitionStatus:B,width:z}=b4({externalRef:n,hiddenUntilFound:R,id:A,keepMounted:_,mounted:m,onOpenChange:b,open:y,setMounted:S,setOpen:T,transitionStatus:E}),j={...C,transitionStatus:B},H=p_(f,j),q=dn("div",{...t,style:void 0},{state:j,ref:$,props:[P,{style:{[x4]:N===void 0?"auto":`${N}px`,[k4]:z===void 0?"auto":`${z}px`}},d,H?{style:H}:void 0,I?{style:{animationName:"none"}}:void 0],stateAttributesMapping:KA});return V?q:null}),w4={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}},E4={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 YA(e){return[w4.root,E4[e]]}const T4={"ui--default-marker":"ui--default-marker",$$css:!0};function XA(e){return e==="default"?"secondary":"tertiary"}const co={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:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",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},detailsButtonShimmer:{kMnn75:"ui-krqix3 ui-1sur9pj ui-1f2jko9",$$css:!0}},_b={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 C4({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:f,tone:d}){const h=Dt(_b.base,(d==="muted"||d==="tertiary")&&_b.muted,f&&_b.tabularNums,a&&!l&&YA(XA(d))),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"}}[(d==="muted")<<1|!!f<<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:Qt("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:Qt("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:Qt("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(Pt,{ref:t,name:"chevron-right",className:Qt("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function bi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:f=!1,shimmerDetails:d=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:S,chevronRef:k,className:T,contentClassName:C,open:E,defaultOpen:R,onOpenChange:_,...D}){const A=n!==void 0,N=c&&A,P=E!==void 0,[$,I]=v.useState(()=>R??!1),V=P?!!E:$,B=(X,te)=>{P||I(X),_?.(X,te)},z=A?g.jsx("button",{type:"button",...Dt(co.buttonReset,co.detailsButton,f&&d&&co.detailsButtonShimmer,r),disabled:l,onClick:X=>{X.stopPropagation(),n(X)},children:t}):t,j=c&&b!=null&&typeof b!="boolean",H={className:"ui-78zum5 ui-dt5ytf"},q=Dt(co.base,c&&!A?co.buttonReset:co.presentational,c&&!l&&co.clickable,l&&co.disabled,f&&d&&YA(XA(m)),T4,s),K={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],U={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-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"},F={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},G={"data-component":"collapsible-header",className:Qt("ui-collapsible-header",q.className),style:q.style},L=g.jsx(C4,{action:e,chevronRef:k,details:z,detailsRef:S,leadingIcon:a,loading:f,shimmerDetails:d,showChevron:c&&!A,tabularNums:h,tone:m});return g.jsxs(m4,{...D,open:N?V:E,defaultOpen:N?void 0:R,onOpenChange:N?B:_,disabled:l,"data-expandable":c?"":void 0,"data-loading":f?"":void 0,"data-tone":m,className:Qt("ui-collapsible",H.className,T),style:H.style,children:[N?g.jsxs("div",{...G,ref:y,onClick:()=>{l||B(!V)},children:[L,g.jsx(RE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:K.className,style:K.style,...j?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:g.jsx(Pt,{ref:k,name:"chevron-right",className:Qt("ui-collapsible-chevron",U.className),style:U.style,size:"sm"})})]}):c?g.jsx(RE,{...G,ref:y,...j?null:{"aria-controls":void 0},onClick:X=>{l||X.stopPropagation()},children:L}):g.jsx("div",{...G,ref:y,children:L}),j&&g.jsx(S4,{keepMounted:!0,className:Qt("ui-collapsible-content-view",Y.className),style:Y.style,children:g.jsx("div",{className:O.className,style:O.style,children:g.jsx("div",{className:Qt("ui-collapsible-content",F.className,C),style:F.style,children:b})})})]})}function R4(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const ZA=(e,t)=>Object.is(e,t);function sa(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function _4(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!s4(e,t,(r,s)=>sa(r,s,n)):e!==t}function Ky(e,t,n){return e?e.some(r=>r===void 0?!1:sa(t,r,n)):!1}function hp(e,t,n){return e?e.findIndex(r=>r===void 0?!1:sa(r,t,n)):-1}function A4(e,t){if(t!==ZA)return r=>Ky(e,r,t);const n=new Set(e);return n.delete(void 0),r=>n.has(r)&&(r!==0||e.some(s=>Object.is(r,s)))}function QA(e,t,n,r){const s=r&&Array.isArray(t)?e.findIndex(A4(t,n)):hp(e,t,n);return s===-1?null:s}function N4(e,t,n,r,s,a){return Ky(r,t,s)?a!=null&&e>a&&Ky(r,n[a],s)?a:e:e===a?QA(n,r,s,!0):a}function O4(e,t,n){return e.filter(r=>!sa(t,r,n))}function Yy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function I4(e){return typeof e=="object"&&e!=null&&Array.isArray(e.items)}function JA(e){return I4(e?.[0])}function M4(e){return JA(e)?e.flatMap(t=>t.items):e}function D4(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(JA(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 eN(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 Yy(e)}function al(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?Yy(e.value):Yy(e)}function tN(e,t,n){function r(){return eN(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(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){const a=M4(t);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 L4(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:tN(s,t,n)},a)),r),[])}function j4(e,t){return e??t}const Id=5;function z4(e,t){const n=P4(t);return e.clientX>=n.left-Id&&e.clientX<=n.right+Id&&e.clientY>=n.top-Id&&e.clientY<=n.bottom+Id}function P4(e){const t=e.getBoundingClientRect(),n=rn(e);if(n0)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,f=parseFloat(s.width)||0,d=parseFloat(s.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),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:()=>()=>{},nextIndexRef:{current:0}});function $4(){return v.useContext(nN)}function A0(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ve(s),[,l]=v.useState(!1),c=gr(B4).current,f=gr(F4).current,d=v.useRef(0),h=v.useRef(!0),m=v.useRef(null),b=v.useRef(null),y=Ve(()=>{h.current||(h.current=!0,l(D=>!D))}),S=Ve((D,A)=>{f.set(D,A),y()}),k=Ve(D=>{f.delete(D),y()}),T=Ve(D=>{const A=new Map;return n.current.length=0,r&&(r.current.length=0),D.forEach(N=>{A.set(N.element,{...N.registration.metadata??{},index:N.index}),n.current[N.index]=N.element,r&&(r.current[N.index]=N.registration.label!==void 0?N.registration.label:N.registration.textRef?.current?.textContent??N.element.textContent)}),d.current=n.current.length,A});function C(D){if(b.current?.disconnect(),b.current=null,typeof MutationObserver!="function"||D.length<2)return;const A=new MutationObserver(P=>{if(!q4(P))return;let $=null;for(const I of D)if(I.isConnected){if($&&rN($,I)>0){A.disconnect(),y();return}$=I}});b.current=A;const N=new Set;for(let P=1;P<D.length;P+=1){const $=H4(D[P-1],D[P]);$&&N.add($)}N.forEach(P=>A.observe(P,{childList:!0}))}const E=Ve(()=>{const[D,A]=U4(f),N=T(D),P=m.current,$=!P||P.length!==D.length||D.some((I,V)=>{const B=P[V];return I.index!==B.index||I.element!==B.element||I.registration.index!==B.registration.index||I.registration.metadata!==B.registration.metadata});C(A),m.current=D,h.current=!1,$&&(c.forEach(I=>I(N)),a(N))});qe(()=>(!h.current&&m.current&&T(m.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,T]),qe(()=>{h.current&&E()}),qe(()=>()=>{b.current?.disconnect(),h.current=!0},[]);const R=Ve(D=>(c.add(D),()=>{c.delete(D)})),_=v.useMemo(()=>({register:S,unregister:k,subscribeMapChange:R,nextIndexRef:d}),[S,k,R,d]);return g.jsx(nN.Provider,{value:_,children:t})}function F4(){return new Map}function B4(){return new Set}function U4(e){const t=new Set,n=[],r=[];e.forEach((a,l)=>{if(!l.isConnected)return;const c=a.index,f={index:c??-1,element:l,registration:a};c===null?r.push(f):c>=0&&(t.add(c),n.push(f))});let s=0;return r.sort((a,l)=>rN(a.element,l.element)),r.forEach(a=>{for(;t.has(s);)s+=1;a.index=s,n.push(a),s+=1}),t.size>0&&n.sort((a,l)=>a.index-l.index),[n,r.map(a=>a.element)]}function H4(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function q4(e){for(const t of e)for(let n=0;n<t.removedNodes.length;n+=1)if(t.removedNodes[n].isConnected)return!0;return!1}function rN(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}const V4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:h=0,offsetParent:m="real"}=Eo(e,t)||{};if(d==null)return{};const b=I_(h),y={x:n,y:r},S=a0(s),k=o0(S),T=await l.getDimensions(d),C=S==="y",E=C?"top":"left",R=C?"bottom":"right",_=C?"clientHeight":"clientWidth",D=a.reference[k]+a.reference[S]-y[S]-a.floating[k],A=y[S]-a.reference[S],N=m==="real"?await l.getOffsetParent?.(d):c.floating;let P=c.floating[_]||a.floating[k];(!P||!await l.isElement?.(N))&&(P=c.floating[_]||a.floating[k]);const $=D/2-A/2,I=P/2-T[k]/2-1,V=Math.min(b[E],I),B=Math.min(b[R],I),z=V,j=P-T[k]-B,H=P/2-T[k]/2+$,q=O_(z,H,j),K=!f.arrow&&As(s)!=null&&H!==q&&a.reference[k]/2-(H<z?V:B)-T[k]/2<0,U=K?H<z?H-z:H-j:0;return{[S]:y[S]+U,data:{[S]:q,centerOffset:H-q-U,...K&&{alignmentOffset:U}},reset:K}}}),G4=(e,t)=>{const{name:n,fn:r}=V4(e);return{name:n,fn:r,options:[e,t]}},W4={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,l=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:l.top-n>=0||l.right-t>=0||l.bottom-n>=0||l.left-t>=0||a}}}},K4={sideX:"left",sideY:"top"},Y4="--available-width",X4="--available-height",Z4="--anchor-width",Q4="--anchor-height",J4="--transform-origin",AE=Y4,NE=X4;function iN(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 OE(e,t,n){const{rects:r,placement:s}=e;return{side:iN(t,gi(s),n),align:As(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function N0(e){return eF(e,d3)}function eF(e,t){const{anchor:n,positionMethod:r="absolute",side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:c=0,collisionBoundary:f,collisionPadding:d=5,sticky:h=!1,arrowPadding:m=5,disableAnchorTracking:b=!1,inline:y,keepMounted:S=!1,floatingRootContext:k,mounted:T,collisionAvoidance:C,shift:E,nodeId:R,adaptiveOrigin:_,lazyFlip:D=!1,externalTree:A}=e,[N,P]=v.useState(null);!T&&N!==null&&P(null);const $=C.side||"flip",I=C.align||"flip",V=C.fallbackAxisSide||"end",B=E?.crossAxis??!1,z=E?.rootBoundary,j=typeof n=="function"?n:void 0,H=Ve(j),q=j?H:n,K=An(n),U=An(T),O=Mi()==="rtl",F=N||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":O?"left":"right","inline-start":O?"right":"left"}[s],G=l==="center"?F:`${F}-${l}`;let L=d;typeof L=="number"?L={top:L,right:L,bottom:L,left:L}:L&&(L={top:L.top||0,right:L.right||0,bottom:L.bottom||0,left:L.left||0});const X=1,te=s==="bottom"?X:0,J=s==="top"?X:0,le=s==="right"?X:0,oe=s==="left"?X:0,ue={boundary:f==="clipping-ancestors"?"clippingAncestors":f,padding:L},xe=v.useRef(null),ye=An(a),pe=An(c),me=typeof a!="function"?a:0,ke=typeof c!="function"?c:0,Se=[];y&&Se.push(y),Se.push(d0(Ge=>{const Ze=OE(Ge,s,O),Z=typeof ye.current=="function"?ye.current(Ze):ye.current,de=typeof pe.current=="function"?pe.current(Ze):pe.current;return{mainAxis:Z,crossAxis:de,alignmentAxis:de}},[me,ke,O,s]));const Te=I==="none"&&$!=="shift",ve=!Te&&(h||B||$==="shift"),Ie=$==="none"?null:h0({...ue,padding:{top:L.top+X+te,right:L.right+X+oe,bottom:L.bottom+X+J,left:L.left+X+le},mainAxis:!B&&$==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:V}),_e=Te?null:p0({...ue,rootBoundary:z,mainAxis:I!=="none",crossAxis:ve,limiter:h||B?void 0:j6(Ge=>{if(!xe.current)return{};const{width:Ze,height:Z}=xe.current.getBoundingClientRect(),de=pi(gi(Ge.placement)),Oe=de==="y"?Ze:Z,Xe=de==="y"?L.left+L.right:L.top+L.bottom;return{offset:Oe/2+Xe/2}})},[ue,h,B,z,L,I]);$==="shift"||I==="shift"||l==="center"?Se.push(_e,Ie):Se.push(Ie,_e),Se.push(m0({...ue,apply({elements:{floating:Ge},availableWidth:Ze,availableHeight:Z,rects:de}){if(!U.current)return;const Oe=Ge.style;Oe.setProperty(AE,`${Ze}px`),Oe.setProperty(NE,`${Z}px`);const Xe=rn(Ge).devicePixelRatio||1,{x:Ct,y:kt,width:He,height:Fe}=de.reference,Le=(Math.round((Ct+He)*Xe)-Math.round(Ct*Xe))/Xe,Me=(Math.round((kt+Fe)*Xe)-Math.round(kt*Xe))/Xe;Oe.setProperty(Z4,`${Le}px`),Oe.setProperty(Q4,`${Me}px`)}}),G4(Ge=>({element:xe.current||Gt(Ge.elements.floating).createElement("div"),padding:xe.current?m:0,offsetParent:"floating"}),[m]),{name:"transformOrigin",fn(Ge){const{elements:{floating:Ze},middlewareData:Z,placement:de,platform:Oe,rects:Xe,y:Ct}=Ge,kt=gi(de),He=As(de),Fe=pi(kt)==="y",Le=xe.current,Me=typeof a=="function"?a(OE(Ge,s,O)):a;let st;if(!Le&&He&&Math.abs(Fe?Z.shift?.x||0:Z.shift?.y||0)<=1)st=He==="start"===(Fe&&Oe.isRTL?.(Ze)===!0)?"100%":"0%";else{const gn=Fe?Z.arrow?.x||0:Z.arrow?.y||0,bn=Fe?Le?.clientWidth||0:Le?.clientHeight||0;st=`${gn+bn/2}px`}let _t=kt==="top"||kt==="left"?`calc(100% + ${Me}px)`:`${-Me}px`;return ve&&Fe&&Math.abs(Z.shift?.y||0)>Me&&(_t=`${Xe.reference.y+Xe.reference.height/2-Ct}px`),Ze.style.setProperty(J4,Fe?`${st} ${_t}`:`${_t} ${st}`),{}}},W4,_),qe(()=>{!T&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[T,k]);const je=v.useMemo(()=>({ancestorScroll:!b,elementResize:!b&&typeof ResizeObserver<"u",layoutShift:!b&&typeof IntersectionObserver<"u"}),[b]),{refs:We,elements:Ce,x:$e,y:se,middlewareData:Ee,update:Q,placement:ee,context:be,isPositioned:Ne,floatingStyles:Ye}=t({rootContext:k,open:S?T:void 0,placement:G,middleware:Se,strategy:r,whileElementsMounted:S?void 0:(...Ge)=>Rp(...Ge,je),nodeId:R,externalTree:A}),{sideX:at,sideY:ft}=Ee.adaptiveOrigin||K4,nt=Ne?r:"fixed",vt=v.useMemo(()=>{let Ge;return Ne?_?Ge={position:nt,[at]:$e,[ft]:se}:Ge={...Ye,position:nt}:Ge={position:nt,top:0,left:0},Ge[AE]="100vw",Ge[NE]="100vh",Ne||(Ge.opacity=0),Ge},[_,nt,at,$e,ft,se,Ye,Ne]),St=v.useRef(null);qe(()=>{if(!T)return;const Ge=K.current,Ze=typeof Ge=="function"?Ge():Ge,de=(IE(Ze)?Ze.current:Ze)||null||null;de!==St.current&&(We.setPositionReference(de),St.current=de)},[T,We,q,K]),v.useEffect(()=>{if(!T)return;const Ge=K.current;typeof Ge!="function"&&IE(Ge)&&Ge.current!==St.current&&(We.setPositionReference(Ge.current),St.current=Ge.current)},[T,We,q,K]),v.useEffect(()=>{if(S&&T&&Ce.reference&&Ce.floating)return Rp(Ce.reference,Ce.floating,Q,je)},[S,T,Ce,Q,je]);const et=gi(ee),Qe=iN(s,et,O),Pe=As(ee)||"center",pt=!!Ee.hide?.referenceHidden;qe(()=>{D&&T&&Ne&&et!==F&&P(et)},[D,T,Ne,et,F]);const lt=v.useMemo(()=>({position:"absolute",top:Ee.arrow?.y,left:Ee.arrow?.x}),[Ee.arrow]),ut=Ee.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:vt,arrowStyles:lt,arrowRef:xe,arrowUncentered:ut,side:Qe,align:Pe,physicalSide:et,anchorHidden:pt,refs:We,context:be,isPositioned:Ne,update:Q}),[vt,lt,xe,ut,Qe,Pe,et,pt,We,be,Ne,Q])}function IE(e){return e!=null&&"current"in e}function Ah(e){return e==="starting"?FP:In}function O0(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const f={...n};return c&&(f.pointerEvents="none"),dn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:f},Ah(r),s],stateAttributesMapping:sh})}const tF=20;function nF(e,t,n,r){const[s,a]=v.useState(!1);qe(()=>{if(!e||!t||n==null){a(!1);return}const l=Gt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-tF)},[e,t,n]),M3(e&&(!t||s),r)}function sN(e={}){const{guess:t,label:n,metadata:r,textRef:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:f,nextIndexRef:d}=$4(),h=v.useRef(-1),[m,b]=v.useState(a==null&&t?()=>{if(h.current===-1){const T=d.current;d.current+=1,h.current=T}return h.current}:-1),y=a??m,S=v.useRef(null),k=v.useCallback(T=>{const C=S.current;C&&c(C),S.current=T,T&&l(T,{metadata:r??null,index:a??null,label:n,textRef:s})},[a,l,c,r,n,s]);return qe(()=>{if(a==null)return f(T=>{const C=S.current?T.get(S.current)?.index:null;C!=null&&b(C)})},[a,f]),{ref:k,index:y}}const oN={popup:{"--ui-floating-anchor-offset-x":"ui-1j6m33m ui-ionq63 ui-l7rd01","--ui-floating-anchor-offset-y":"ui-14hk5xf ui-wyo6tf ui-17dzj2r",k6sLGO:"ui-1so62im",k3nNDw:"ui-ctpfpq",kKVMdj:"ui-1yjmni4",kyAemX:"ui-1hr7t8a",k44tkh:"ui-ykr0s4 ui-p0ivey ui-1s1fvk8",k1ekBW:"ui-11xpdln",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",k3aq6I:"ui-1c071of ui-dv15d5",$$css:!0},positioner:{"--ui-floating-anchor-fade-duration":"ui-1kwwprx ui-5ece57 ui-4rr00i",kSiTet:"ui-1hc1fzr ui-4itv7f ui-fwszop",$$css:!0}},Nh=oN.popup,rF=oN.positioner,iF={transition:`opacity var(--ui-floating-anchor-fade-duration) ${dz["--cursor-easing-out-quint"]}`};function Oh(...e){const t=Dt(rF,...e);return{...t,style:{...t.style,...iF}}}const Ih={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}},or={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}},aN=or.positioner,I0=[or.surface,Ih.border],lN=[aN,or.popupShadow,or.popupRadius],sF=[aN,or.tooltipShadow,or.tooltipRadius],oF=[or.tooltipRadius,or.tooltipSurface],aF=or.popupLayout,lF=or.popupInset,uN=or.previewCardInset,cN=[aF,lF],uF=or.popupInteractive,fN=[or.surface,Ih.border],cF=or.popupSurfaceMd,fF=or.popupPositioner,dF=[fF,or.popupShadow,or.popupRadius],Di={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},menuPopupHideWhenAnchorHidden:{kV4ckA:"ui-2f5yyy",kYLTpN:"ui-1hyz5x3",$$css:!0},anchorReset:{"--available-width":"ui-1wd9z7n","--available-height":"ui-1px786n","--anchor-width":"ui-4m06ot","--anchor-height":"ui-1x9mm2a","--transform-origin":"ui-pmnpdm",$$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:{kOEVvA:"ui-i4tjbf",k5uj8I:"ui-66jpid",kq4gsV:"ui-1kn4tos",k4ymXE:"ui-1h1qzfg",kF4oUt:"ui-15ommkv",kPsB8K:"ui-6o5ikd",keQWX6:"ui-vv2yia",kqNwI3:"ui-1prubpf",kSJm4H:"ui-1hezt85",kVBs6H:"ui-1isuopv",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0},popupBackdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0},popupBackdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}]},pF=Di.list,hF=Di.row,mF=Di.popupFrame,gF=Di.rowFrame,bF=Di.rowInsetHighlight,yF=Di.rowSectionTrailing,vF=Di.rowSectionDescription,xF=Di.menuPopupHideWhenAnchorHidden,kF=Di.popupBackdrop,SF=Di.popupBackdropZIndex,wF=Di.anchorReset,Pr={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}},EF=[fN,mF,Pr.popup],TF={sm:null,md:cF},CF=Pr.popupWidth,RF=Pr.popupDefaultWidth,_F=[pF,Pr.list],AF=[hF,gF,Pr.row,bF,_s.root],NF=Pr.rowText,OF=Pr.rowLabel,IF=Pr.itemTextWithMeta,MF=Pr.rowTextWithDescription,DF=Pr.rowDescription,LF=Pr.rowMeta,Ab=Pr.rowSection,jF=Pr.rowSectionLeading,ME=yF,zF=Pr.rowSectionEnd,Nb=vF;function tl(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,f,d;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((S,k)=>r[k]!==S)))return s;r=m;let y;if(n.key&&((f=n.debug)!=null&&f.call(n))&&(y=Date.now()),s=t(...m),n.key&&((d=n.debug)!=null&&d.call(n))){const S=Math.round((Date.now()-h)*100)/100,k=Math.round((Date.now()-y)*100)/100,T=k/16,C=(E,R)=>{for(E=String(E);E.length<R;)E=" "+E;return E};console.info(`%c⏱ ${C(k,5)} /${C(S,5)} ms`,`
|
|
10
|
+
font-size: .6rem;
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
color: hsl(${Math.max(0,Math.min(120-120*T,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 DE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const PF=(e,t)=>Math.abs(e-t)<1.01,$F=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},LE=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},FF=e=>e,BF=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},UF=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:f}=l;t({width:Math.round(c),height:Math.round(f)})};if(s(LE(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const f=l[0];if(f?.borderBoxSize){const d=f.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(LE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},jE={passive:!0},zE=typeof window>"u"?!0:"onscrollend"in window,HF=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&zE?()=>{}:$F(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),f=l(!1);n.addEventListener("scroll",c,jE);const d=e.options.useScrollendEvent&&zE;return d&&n.addEventListener("scrollend",f,jE),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",f)}},qF=(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"]},VF=(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 GF{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,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,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:FF,rangeExtractor:BF,onChange:()=>{},measureElement:qF,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=tl(()=>(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 f=a.get(c.lane);if(f==null||c.end>f.end?a.set(c.lane,c):c.end<f.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=tl(()=>[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=tl(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},f)=>{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 d=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,d),m=new Array(c).fill(void 0);for(let b=0;b<d;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=d;b<n;b++){const y=a(b),S=this.laneAssignments.get(b);let k,T;if(S!==void 0&&this.options.lanes>1){k=S;const _=m[k],D=_!==void 0?h[_]:void 0;T=D?D.end+this.options.gap:r+s}else{const _=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);T=_?_.end+this.options.gap:r+s,k=_?_.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,k)}const C=f.get(y),E=typeof C=="number"?C:this.options.estimateSize(b),R=T+E;h[b]={index:b,start:T,size:E,end:R,key:y,lane:k},m[k]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=tl(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?WF({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=tl(()=>{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.options.debug&&console.info("correction",c),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=tl(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],f=r[c];s.push(f)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return DE(r[dN(0,r.length-1,s=>DE(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,f=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:f,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.invalidateMeasurements=()=>{this.itemSizeCache=new Map(this.itemSizeCache),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&&PF(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 dN=(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 WF({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=f=>e[f].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=dN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const f=Array(r).fill(0);for(;c<s&&f.some(h=>h<n+t);){const h=e[c];f[h.lane]=h.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(h=>h>=n);){const h=e[l];d[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}}const PE=typeof document<"u"?v.useLayoutEffect:v.useEffect;function KF({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?vi.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new GF(r));return s.setOptions(r),PE(()=>s._didMount(),[]),PE(()=>s._willUpdate()),s}function pN(e){return KF({observeElementRect:UF,observeElementOffset:HF,scrollToFn:VF,...e})}function YF(){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 hN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Xy({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 XF="hover",ZF=4,Md=24,$E=5;function mN(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function QF(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 JF=["mask-image","-webkit-mask-image","mask-size","mask-repeat","mask-composite","-webkit-mask-composite"];function Ob(e,t,n){const r=e.style,s=[];if(t.top||t.bottom||t.start||t.end){if(n.block){const l=t.top?"var(--scroll-fade-top-size)":"0px",c=t.bottom?"var(--scroll-fade-bottom-size)":"0px";s.push(`linear-gradient(to bottom, rgba(0, 0, 0, var(--scroll-fade-top-start-opacity)) 0px, black ${l}, black calc(100% - ${c}), rgba(0, 0, 0, var(--scroll-fade-bottom-start-opacity)) 100%)`)}if(n.inline){const l=t.start?"var(--scroll-fade-start-size)":"0px",c=t.end?"var(--scroll-fade-end-size)":"0px";s.push(`linear-gradient(to right, transparent 0px, black ${l}, black calc(100% - ${c}), transparent 100%)`)}}if(s.length===0){for(const l of JF)r.removeProperty(l);return}const a=s.join(", ");r.setProperty("mask-image",a),r.setProperty("-webkit-mask-image",a),r.setProperty("mask-size",s.map(()=>"100% 100%").join(", ")),r.setProperty("mask-repeat","no-repeat"),s.length>1&&(r.setProperty("mask-composite","intersect"),r.setProperty("-webkit-mask-composite","source-in"))}function e5({block:e,inline:t}){return{...e&&{"--scroll-fade-top-size":`${e.topPx}px`,"--scroll-fade-bottom-size":`${e.bottomPx}px`,"--scroll-fade-top-start-opacity":String(e.topStartOpacity),"--scroll-fade-bottom-start-opacity":String(e.bottomStartOpacity)},...t&&{"--scroll-fade-start-size":`${t.startPx}px`,"--scroll-fade-end-size":`${t.endPx}px`}}}const t5=20;class n5{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),f=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===f?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=f,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(t5,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}getScrollMetrics(){return{viewportSize:this._viewportSize,scrollSize:this._scrollSize,scrollPosition:this._scrollPosition}}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 Kn=class Kn{constructor(t){this.fadeEdges=[!1,!1],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.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new n5,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1,this.onFadeEdgesChange=t.onFadeEdgesChange}static flushThumbSyncs(){Kn.thumbSyncFrame=null;const t=[...Kn.pendingThumbSyncs];Kn.pendingThumbSyncs.clear();const n=t.filter(r=>r.measureThumb());for(const r of n)r.applyThumbStyle(),r.applyFadeEdges()}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();const t=Kn.pendingThumbSyncs;t.delete(this),t.size===0&&Kn.thumbSyncFrame!==null&&(cancelAnimationFrame(Kn.thumbSyncFrame),Kn.thumbSyncFrame=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),this.applyFadeEdges()}}attachResizeObserver(){this.resizeObserver=hN(()=>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(){Kn.pendingThumbSyncs.add(this),Kn.thumbSyncFrame===null&&(Kn.thumbSyncFrame=requestAnimationFrame(Kn.flushThumbSyncs))}measureThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();return this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)}applyFadeEdges(){if(!this.onFadeEdgesChange)return;const{viewportSize:t,scrollSize:n,scrollPosition:r}=this.state.getScrollMetrics();let s,a;if(this.horizontal){const{isAtStart:l,isAtEnd:c}=QF({scrollLeft:r,scrollWidth:n,clientWidth:t,threshold:$E});s=!l,a=!c}else{const{isAtTop:l,isAtBottom:c}=mN({scrollTop:r,scrollHeight:n,clientHeight:t,threshold:$E});s=!l,a=!c}s===this.fadeEdges[0]&&a===this.fadeEdges[1]||(this.fadeEdges=[s,a],this.onFadeEdgesChange(s,a))}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 f=(this.horizontal?c.clientX:c.clientY)-n,d=this.state.getScrollPositionFromThumbDelta(f,r);this.horizontal?this.viewport.scrollLeft=d:this.viewport.scrollTop=d},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=Xy({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},Kn.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Xy({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(Kn.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};Kn.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",Kn.WHEEL_GESTURE_RESET_MS=150,Kn.pendingThumbSyncs=new Set,Kn.thumbSyncFrame=null;let Lp=Kn;const r5={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}},Ib={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}},Mb={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}},qu={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}},Db={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 i5(){return r5.base}function s5({direction:e}){return[Ib.base,e==="horizontal"?Ib.horizontal:null,e==="both"?Ib.both:null]}function o5(e){return[Mb.base,e==="horizontal"?Mb.horizontal:null,e==="both"?Mb.both:null]}function FE({direction:e,orientation:t,visibility:n}){return[qu.base,t==="horizontal"?qu.horizontal:null,e==="both"&&t==="vertical"?qu.bothVertical:null,e==="both"&&t==="horizontal"?qu.bothHorizontal:null,n==="never"?qu.visibilityNever:null]}function BE(e,t){return[Db.base,e==="horizontal"?Db.horizontal:null,t?Db.hoverHidden:null]}const a5=1e4,Dd=5,Rl=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:f,allowScrollChaining:d=!1,contentStyle:h,scrollbarStyle:m,overlay:b,style:y,scrollbarVisibility:S=XF,isScrollbarRevealed:k=!1,direction:T="vertical",topFadeSize:C,bottomFadeSize:E,topFadeStartOpacity:R=0,bottomFadeStartOpacity:_=0,startFadeSize:D,endFadeSize:A,autoScrollToBottom:N=!1,scrollTrigger:P,autoScrollPauseTimeout:$=a5,onScrollStateChange:I,mapVerticalWheelToHorizontal:V=!1,scrollPadding:B=ZF,scrollbarInset:z,onPointerEnter:j,onPointerLeave:H,...q},K){const U=v.useRef(null),Y=v.useRef(null),O=v.useRef(null),F=v.useRef(null),G=v.useRef(null),L=v.useRef(null),X=v.useRef(null),te=T!=="horizontal",J=T!=="vertical",le=V&&!te,oe=C!==void 0||E!==void 0,ue=D!==void 0||A!==void 0,xe=oe||ue,ye=v.useRef(!1),pe=v.useRef(0),me=v.useRef(0),ke=v.useRef(null),Se=v.useRef(null);v.useLayoutEffect(()=>{const Pe=Y.current,pt=O.current;if(!Pe||!pt)return;const lt=[],ut={top:!1,bottom:!1,start:!1,end:!1},Ge={block:oe,inline:ue};if(te){const Ze=F.current,Z=G.current;Ze&&Z&<.push(new Lp({viewport:Pe,content:pt,scrollbar:Ze,thumb:Z,direction:"vertical",mapVerticalWheelToHorizontal:le,onFadeEdgesChange:oe?(de,Oe)=>{ut.top=de,ut.bottom=Oe,Ob(Pe,ut,Ge)}:void 0}))}if(J){const Ze=L.current,Z=X.current;Ze&&Z&<.push(new Lp({viewport:Pe,content:pt,scrollbar:Ze,thumb:Z,direction:"horizontal",mapVerticalWheelToHorizontal:le,onFadeEdgesChange:ue?(de,Oe)=>{ut.start=de,ut.end=Oe,Ob(Pe,ut,Ge)}:void 0}))}if(lt.length!==0){for(const Ze of lt)Ze.attach();return()=>{for(const Ze of lt)Ze.detach();Ob(Pe,{top:!1,bottom:!1,start:!1,end:!1},Ge)}}},[te,J,le,oe,ue]);const Te=v.useCallback(()=>{const Pe=Y.current;return Pe?{scrollTop:Pe.scrollTop,scrollHeight:Pe.scrollHeight,clientHeight:Pe.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ve=v.useCallback((Pe=!1)=>{const pt=Y.current;pt&&pt.scrollTo({top:pt.scrollHeight,behavior:Pe?"smooth":"instant"})},[]),Ie=v.useCallback((Pe=!1)=>{const pt=Y.current;pt&&pt.scrollTo({top:0,behavior:Pe?"smooth":"instant"})},[]),_e=v.useCallback(()=>{Se.current===null&&(Se.current=requestAnimationFrame(()=>{Se.current=null,!ye.current&&ve(!1)}))},[ve]),je=v.useCallback(()=>{N&&(ye.current||_e())},[N,_e]);v.useImperativeHandle(K,()=>({scrollToBottom:ve,scrollToTop:Ie,requestAutoScroll:je,getScrollPosition:Te,get rootElement(){return U.current},get viewportElement(){return Y.current}}),[ve,Ie,je,Te]);const We=N||I!==void 0,Ce=v.useEffectEvent(()=>{const Pe=Y.current;if(!Pe)return;const{scrollTop:pt,scrollHeight:lt,clientHeight:ut}=Pe,{isAtTop:Ge,isAtBottom:Ze}=mN({scrollTop:pt,scrollHeight:lt,clientHeight:ut,threshold:Dd});I?.({isAtBottom:Ze,isAtTop:Ge}),Ze&&ye.current&&(ye.current=!1,ke.current&&(clearTimeout(ke.current),ke.current=null));const Z=lt<me.current-Dd,de=lt>me.current+Dd,Oe=pt<pe.current-Dd;Oe&&!Z&&!Ze&&N&&!ye.current&&(ye.current=!0,ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>{ye.current=!1,ke.current=null},$)),de&&N&&!ye.current&&!Ze&&!Oe&&_e(),Z&&N&&!ye.current&&!Ze&&_e(),pe.current=pt,me.current=lt}),$e=YF();v.useEffect(()=>{if(!We)return;const Pe=Y.current,pt=O.current;if(!Pe)return;const lt=()=>{$e.request(()=>Ce())};Pe.addEventListener("scroll",lt,{passive:!0});const ut=hN(()=>Ce());return ut!==null&&(ut.observe(Pe),pt&&ut.observe(pt)),()=>{Pe.removeEventListener("scroll",lt),ut?.disconnect(),$e.dispose()}},[We,$e]),v.useEffect(()=>{P!==void 0&&N&&(ye.current||_e())},[P,N,_e]),v.useEffect(()=>{if(!te)return;const Pe=Y.current;if(!Pe)return;const pt=lt=>{const ut=lt.deltaY;if(ut===0)return;const Ge=Pe.scrollHeight-Pe.clientHeight;if(Ge<=0)return;const Ze=Pe.scrollTop,Z=Ze<=0&&ut<0,de=Ze>=Ge-.5&&ut>0;Z||de||lt.stopPropagation()};return Pe.addEventListener("wheel",pt,{passive:!0}),()=>Pe.removeEventListener("wheel",pt)},[te]),v.useEffect(()=>{if(!J)return;const Pe=Y.current;if(!Pe)return;const pt=ut=>{const Ge=Xy({deltaX:ut.deltaX,deltaY:ut.deltaY,mapVerticalWheelToHorizontal:le});if(Ge===null)return;const Ze=Pe.scrollWidth-Pe.clientWidth;if(Ze<=0)return;const Z=Pe.scrollLeft;if(!(Ge<0&&Z<=0)&&!(Ge>0&&Z>=Ze-.5)){if(!le){ut.stopPropagation();return}ut.preventDefault(),Pe.scrollLeft=Z+Ge}},lt=le?{passive:!1,capture:!0}:{passive:!0,capture:!0};return Pe.addEventListener("wheel",pt,lt),()=>Pe.removeEventListener("wheel",pt,lt)},[J,le]);const se=S==="hover",[Ee,Q]=v.useState(!1);v.useLayoutEffect(()=>{se&&Q(U.current?.matches(":hover")??!1)},[se]);const ee=v.useCallback(Pe=>{Q(!0),j?.(Pe)},[j]),be=v.useCallback(Pe=>{Q(!1),H?.(Pe)},[H]),Ne=se&&!Ee&&!k;v.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current),Se.current!==null&&(cancelAnimationFrame(Se.current),Se.current=null)},[]);const Ye={"--scroll-area-scroll-padding":`${B}px`,...z!==void 0?{"--scrollbar-inset":`${z}px`}:void 0},at=qt({rootClass:"ui-scroll-area",stylexStyles:[i5(),c],className:Qt(xe&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...Ye,...y}}),ft=qt({rootClass:"ui-scroll-area__viewport",stylexStyles:[s5({direction:T}),f],className:l,style:{...e5({block:oe?{topPx:C??Md,bottomPx:E??Md,topStartOpacity:R,bottomStartOpacity:_}:void 0,inline:ue?{startPx:D??Md,endPx:A??Md}:void 0}),...d?{overscrollBehavior:"auto"}:void 0}}),nt=qt({rootClass:"ui-scroll-area__content",stylexStyles:[o5(T),h]}),vt=qt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[FE({direction:T,orientation:"vertical",visibility:S}),m]}),St=Dt(BE("vertical",Ne)),et=qt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[FE({direction:T,orientation:"horizontal",visibility:S}),m]}),Qe=Dt(BE("horizontal",Ne));return g.jsxs("div",{ref:U,className:at.className,style:at.style,"data-scroll-padding":B,"data-visibility":S,"data-direction":T,...q,onPointerEnter:se?ee:j,onPointerLeave:se?be:H,children:[g.jsx("div",{ref:Y,className:ft.className,style:ft.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:O,className:nt.className,style:nt.style,children:t})}),b,te&&g.jsx("div",{ref:F,className:vt.className,style:vt.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:G,className:St.className,style:St.style,"data-orientation":"vertical"})}),J&&g.jsx("div",{ref:L,className:et.className,style:et.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:X,className:Qe.className,style:Qe.style,"data-orientation":"horizontal"})})]})}),Lb={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 l5({children:e,hidden:t=!1,ref:n}){return g.jsx(Rl,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[wF,Lb.root,t&&Lb.rootHidden],viewportStyle:Lb.viewport,children:e})}const Mh="top",u5=300,Dh=100;function c5(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function f5(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function d5(e,t){return{side:t,align:"shift",fallbackAxisSide:e?"none":"start"}}function Lh(e,t,n,r="flip"){const{side:s,align:a}=v.useMemo(()=>c5(e),[e]),{sideOffset:l,alignOffset:c}=v.useMemo(()=>f5(t),[t]),f=v.useMemo(()=>d5(n,r),[n,r]);return{side:s,align:a,sideOffset:l,alignOffset:c,collisionAvoidance:f,positionMethod:"fixed"}}const p5=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:f=!1,onValueChange:d,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:S,name:k,disabled:T,setTouched:C,setDirty:E,validityData:R,setFocused:_,setFilled:D,validationMode:A,validation:N}=Rh(),{clearErrors:P,elementRef:$,submitCountRef:I}=qA(),V=T||f,B=k??l,z={...S,disabled:V},{labelId:j}=_h(),H=_0({id:a}),[q]=Cl({controlled:c,default:h,name:"FieldControl",state:"value"}),K=c!==void 0,U=K?q:void 0,Y=U==null?void 0:String(U),O=Ve(()=>N.inputRef.current?.value);HA(N.inputRef,H,Y,O,!V,l),qe(()=>{const X=Y??N.inputRef.current?.value;X!==void 0&&D(X!=="")},[Y,N.inputRef,D]),S0(Y,()=>{Y!==void 0&&(P(B),E(Y!==(R.initialValue??"")),N.change(Y))});const F=v.useRef(null),G=ei();return qe(()=>{m&&F.current===dr(Gt(F.current))&&_(!0)},[m,_]),dn("input",t,{ref:[n,F],state:z,props:[{id:H,disabled:V,name:B,ref:N.inputRef,"aria-labelledby":j,autoFocus:m,...K?{value:U}:{defaultValue:h},onChange(X){const te=X.currentTarget.value,J=wt(Ni,X.nativeEvent);d?.(te,J),!K&&(E(te!==(R.initialValue??"")),D(te!==""),!X.nativeEvent.defaultPrevented&&!J.isCanceled&&(P(B),N.change(te)))},onFocus(){_(!0)},onBlur(X){if(C(!0),_(!1),A==="onBlur"){const te=X.currentTarget.value;N.commit(te),K&&queueMicrotask(()=>{const J=N.inputRef.current?.value;J!==void 0&&J!==te&&J!==(R.initialValue??"")&&N.commit(J)})}},onKeyDown(X){if(X.currentTarget.tagName==="INPUT"&&X.key==="Enter"){C(!0);const te=X.currentTarget.value,J=X.currentTarget.form;if(J&&J===$.current&&!X.defaultPrevented){const le=X.currentTarget,oe=I.current;G.start(0,()=>{I.current===oe&&N.commit(le.value)})}else N.commit(te)}}},y,X=>N.getValidationProps(V,X)],stateAttributesMapping:Ch})}),h5=v.forwardRef(function(t,n){return g.jsx(p5,{ref:n,...t})});var m5=["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] *)"],jp=m5.join(","),gN=typeof Element>"u",_l=gN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zp=!gN&&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},Pp=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]"):Pp(t.parentNode));return l},g5=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},bN=function(t,n,r){if(Pp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(jp));return n&&_l.call(t,jp)&&s.unshift(t),s=s.filter(r),s},$p=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Pp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),f=c.length?c:l.children,d=$p(f,!0,r);r.flatten?s.push.apply(s,d):s.push({scopeParent:l,candidates:d})}else{var h=_l.call(l,jp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!Pp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=$p(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},yN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||g5(t))&&!yN(t)?0:t.tabIndex},b5=function(t,n){var r=vN(t);return r<0&&n&&!yN(t)?0:r},y5=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},xN=function(t){return t.tagName==="INPUT"},v5=function(t){return xN(t)&&t.type==="hidden"},x5=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},k5=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},S5=function(t){if(!t.name)return!0;var n=t.form||zp(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=k5(s,t.form);return!a||a===t},w5=function(t){return xN(t)&&t.type==="radio"},E5=function(t){return w5(t)&&!S5(t)},T5=function(t){var n,r=t&&zp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,f;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&s;){var d,h,m;r=zp(s),s=(d=r)===null||d===void 0?void 0:d.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},UE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},C5=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=_l.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(_l.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var f=t;t;){var d=t.parentElement,h=zp(t);if(d&&!d.shadowRoot&&s(d)===!0)return UE(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=f}if(T5(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return UE(t);return!1},R5=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 _l.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Zy=function(t,n){return!(n.disabled||v5(n)||C5(n,t)||x5(n)||R5(n))},Qy=function(t,n){return!(E5(n)||vN(n)<0||!Zy(t,n))},_5=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},kN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,f=b5(c,l),d=l?kN(s.candidates):c;f===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:a,tabIndex:f,item:s,isScope:l,content:d})}),r.sort(y5).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},jh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$p([t],n.includeContainer,{filter:Qy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_5}):r=bN(t,n.includeContainer,Qy.bind(null,n)),kN(r)},A5=function(t,n){n=n||{};var r;return n.getShadowRoot?r=$p([t],n.includeContainer,{filter:Zy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=bN(t,n.includeContainer,Zy.bind(null,n)),r},SN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return _l.call(t,jp)===!1?!1:Qy(n,t)};function N5(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function wN(){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 O5(){return/apple/i.test(navigator.vendor)}function Jy(){const e=/android/i;return e.test(N5())||e.test(wN())}function I5(){return wN().includes("jsdom/")}const HE="data-floating-ui-focusable",M5="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",jb="ArrowLeft",zb="ArrowRight",D5="ArrowUp",L5="ArrowDown";function ho(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 kr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function mo(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Pb(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 j5(e){return e.matches("html,body")}function pr(e){return e?.ownerDocument||document}function EN(e){return It(e)&&e.matches(M5)}function ev(e){return e?e.getAttribute("role")==="combobox"&&EN(e):!1}function Fp(e){return e?e.hasAttribute(HE)?e:e.querySelector("["+HE+"]")||e:null}function ea(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,...ea(e,s.id,n)])}function z5(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),ea(e,a).forEach(f=>{s(f.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function qE(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 sr(e){e.preventDefault(),e.stopPropagation()}function P5(e){return"nativeEvent"in e}function TN(e){return e.mozInputSource===0&&e.isTrusted?!0:Jy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function CN(e){return I5()?!1:!Jy()&&e.width===0&&e.height===0||Jy()&&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 xc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var $5=typeof document<"u",F5=function(){},cn=$5?v.useLayoutEffect:F5;const B5={...Vv};function Qn(e){const t=v.useRef(e);return cn(()=>{t.current=e}),t}const U5=B5.useInsertionEffect,H5=U5||(e=>e());function Pn(e){const t=v.useRef(()=>{});return H5(()=>{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 Ld(e,t,n){return Math.floor(e/t)!==n}function lc(e,t){return t<0||t>=e.current.length}function $b(e,t){return fr(e,{disabledIndices:t})}function VE(e,t){return fr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function fr(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&&mp(e,l,s));return l}function q5(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===D5){if(m&&sr(n),h===-1)b=d;else if(b=fr(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<f||b<0)){const y=h%l,S=d%l,k=d-(S-y);S===y?b=d:b=S>y?k:k-l}lc(e,b)&&(b=h)}if(n.key===L5&&(m&&sr(n),h===-1?b=f:(b=fr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>d&&(b=fr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),lc(e,b)&&(b=h)),r==="both"){const y=dl(h/l);n.key===(a?jb:zb)&&(m&&sr(n),h%l!==l-1?(b=fr(e,{startingIndex:h,disabledIndices:c}),s&&Ld(b,l,y)&&(b=fr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=fr(e,{startingIndex:h-h%l-1,disabledIndices:c})),Ld(b,l,y)&&(b=h)),n.key===(a?zb:jb)&&(m&&sr(n),h%l!==0?(b=fr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&Ld(b,l,y)&&(b=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=fr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),Ld(b,l,y)&&(b=h));const S=dl(d/l)===y;lc(e,b)&&(s&&S?b=n.key===(a?zb:jb)?d:fr(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function V5(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:f}=a,d=!1;for(n&&(s=0);!d;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<f;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),d=!0):s++}}),[...r]}function G5(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 W5(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function mp(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 Vc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function RN(e,t){const n=jh(e,Vc()),r=n.length;if(r===0)return;const s=ho(pr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function _N(e){return RN(pr(e).body,1)||e}function AN(e){return RN(pr(e).body,-1)||e}function uc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kr(n,r)}function K5(e){jh(e,Vc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function GE(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 Gc(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 Y5(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 NN=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function ON(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(d=>{a(h=>new Set(h).add(d))},[]),c=v.useCallback(d=>{a(h=>{const m=new Set(h);return m.delete(d),m})},[]),f=v.useMemo(()=>{const d=new Map;return Array.from(s.keys()).sort(Y5).forEach((m,b)=>{d.set(m,b)}),d},[s]);return g.jsx(NN.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:f,elementsRef:n,labelsRef:r}),[l,c,f,n,r]),children:t})}function zh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(NN),[c,f]=v.useState(null),d=v.useRef(null),h=v.useCallback(m=>{if(d.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 cn(()=>{const m=d.current;if(m)return n(m),()=>{r(m)}},[n,r]),cn(()=>{const m=d.current?s.get(d.current):null;m!=null&&f(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const X5="data-floating-ui-focusable",WE="active",KE="selected",Wc="ArrowLeft",Kc="ArrowRight",IN="ArrowUp",Ph="ArrowDown",Z5={...Vv};let YE=!1,Q5=0;const XE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Q5++;function J5(){const[e,t]=v.useState(()=>YE?XE():void 0);return cn(()=>{e==null&&t(XE())},[]),v.useEffect(()=>{YE=!0},[]),e}const eB=Z5.useId,$h=eB||J5;function MN(){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 DN=v.createContext(null),LN=v.createContext(null),_o=()=>{var e;return((e=v.useContext(DN))==null?void 0:e.id)||null},Ao=()=>v.useContext(LN);function M0(e){const t=$h(),n=Ao(),s=_o();return cn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function D0(e){const{children:t,id:n}=e,r=_o();return g.jsx(DN.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function tB(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(()=>MN());return g.jsx(LN.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function Al(e){return"data-floating-ui-"+e}function cr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const ZE=Al("safe-polygon");function Fb(e,t,n){if(n&&!xc(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 Bb(e){return typeof e=="function"?e():e}function jN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:d=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=Ao(),S=_o(),k=Qn(d),T=Qn(f),C=Qn(n),E=Qn(m),R=v.useRef(),_=v.useRef(-1),D=v.useRef(),A=v.useRef(-1),N=v.useRef(!0),P=v.useRef(!1),$=v.useRef(()=>{}),I=v.useRef(!1),V=Pn(()=>{var K;const U=(K=s.current.openEvent)==null?void 0:K.type;return U?.includes("mouse")&&U!=="mousedown"});v.useEffect(()=>{if(!c)return;function K(U){let{open:Y}=U;Y||(cr(_),cr(A),N.current=!0,I.current=!1)}return a.on("openchange",K),()=>{a.off("openchange",K)}},[c,a]),v.useEffect(()=>{if(!c||!k.current||!n)return;function K(Y){V()&&r(!1,Y,"hover")}const U=pr(l.floating).documentElement;return U.addEventListener("mouseleave",K),()=>{U.removeEventListener("mouseleave",K)}},[l.floating,n,r,c,k,V]);const B=v.useCallback(function(K,U,Y){U===void 0&&(U=!0),Y===void 0&&(Y="hover");const O=Fb(T.current,"close",R.current);O&&!D.current?(cr(_),_.current=window.setTimeout(()=>r(!1,K,Y),O)):U&&(cr(_),r(!1,K,Y))},[T,r]),z=Pn(()=>{$.current(),D.current=void 0}),j=Pn(()=>{if(P.current){const K=pr(l.floating).body;K.style.pointerEvents="",K.removeAttribute(ZE),P.current=!1}}),H=Pn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function K(G){if(cr(_),N.current=!1,h&&!xc(R.current)||Bb(E.current)>0&&!Fb(T.current,"open"))return;const L=Fb(T.current,"open",R.current);L?_.current=window.setTimeout(()=>{C.current||r(!0,G,"hover")},L):n||r(!0,G,"hover")}function U(G){if(H()){j();return}$.current();const L=pr(l.floating);if(cr(A),I.current=!1,k.current&&s.current.floatingContext){n||cr(_),D.current=k.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){j(),z(),H()||B(G,!0,"safe-polygon")}});const te=D.current;L.addEventListener("mousemove",te),$.current=()=>{L.removeEventListener("mousemove",te)};return}(R.current!=="touch"||!kr(l.floating,G.relatedTarget))&&B(G)}function Y(G){H()||s.current.floatingContext&&(k.current==null||k.current({...s.current.floatingContext,tree:y,x:G.clientX,y:G.clientY,onClose(){j(),z(),H()||B(G)}})(G))}function O(){cr(_)}function F(G){H()||B(G,!1)}if(bt(l.domReference)){const G=l.domReference,L=l.floating;return n&&G.addEventListener("mouseleave",Y),b&&G.addEventListener("mousemove",K,{once:!0}),G.addEventListener("mouseenter",K),G.addEventListener("mouseleave",U),L&&(L.addEventListener("mouseleave",Y),L.addEventListener("mouseenter",O),L.addEventListener("mouseleave",F)),()=>{n&&G.removeEventListener("mouseleave",Y),b&&G.removeEventListener("mousemove",K),G.removeEventListener("mouseenter",K),G.removeEventListener("mouseleave",U),L&&(L.removeEventListener("mouseleave",Y),L.removeEventListener("mouseenter",O),L.removeEventListener("mouseleave",F))}}},[l,c,e,h,b,B,z,j,r,n,C,y,T,k,s,H,E]),cn(()=>{var K;if(c&&n&&(K=k.current)!=null&&(K=K.__options)!=null&&K.blockPointerEvents&&V()){P.current=!0;const Y=l.floating;if(bt(l.domReference)&&Y){var U;const O=pr(l.floating).body;O.setAttribute(ZE,"");const F=l.domReference,G=y==null||(U=y.nodesRef.current.find(L=>L.id===S))==null||(U=U.context)==null?void 0:U.elements.floating;return G&&(G.style.pointerEvents=""),O.style.pointerEvents="none",F.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{O.style.pointerEvents="",F.style.pointerEvents="",Y.style.pointerEvents=""}}}},[c,n,S,l,y,k,V]),cn(()=>{n||(R.current=void 0,I.current=!1,z(),j())},[n,z,j]),v.useEffect(()=>()=>{z(),cr(_),cr(A),j()},[c,l.domReference,z,j]);const q=v.useMemo(()=>{function K(U){R.current=U.pointerType}return{onPointerDown:K,onPointerEnter:K,onMouseMove(U){const{nativeEvent:Y}=U;function O(){!N.current&&!C.current&&r(!0,Y,"hover")}h&&!xc(R.current)||n||Bb(E.current)===0||I.current&&U.movementX**2+U.movementY**2<2||(cr(A),R.current==="touch"?O():(I.current=!0,A.current=window.setTimeout(O,Bb(E.current))))}}},[h,r,n,C,E]);return v.useMemo(()=>c?{reference:q}:{},[c,q])}let QE=0;function Qo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(QE);const a=()=>e?.focus({preventScroll:n});s?a():QE=requestAnimationFrame(a)}function Ub(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function nB(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rB(e){return e?.ownerDocument||document}const bl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function JE(e){return e==="inert"?bl.inert:e==="aria-hidden"?bl["aria-hidden"]:bl.none}let jd=new WeakSet,zd={},Hb=0;const iB=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,zN=e=>e&&(e.host||zN(e.parentNode)),sB=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=zN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function oB(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=sB(t,e),c=new Set,f=new Set(l),d=[];zd[s]||(zd[s]=new WeakMap);const h=zd[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||f.has(y)||[].forEach.call(y.children,S=>{if(Yn(S)!=="script")if(c.has(S))b(S);else{const k=a?S.getAttribute(a):null,T=k!==null&&k!=="false",C=JE(a),E=(C.get(S)||0)+1,R=(h.get(S)||0)+1;C.set(S,E),h.set(S,R),d.push(S),E===1&&T&&jd.add(S),R===1&&S.setAttribute(s,""),!T&&a&&S.setAttribute(a,a==="inert"?"":"true")}})}return Hb++,()=>{d.forEach(y=>{const S=JE(a),T=(S.get(y)||0)-1,C=(h.get(y)||0)-1;S.set(y,T),h.set(y,C),T||(!jd.has(y)&&a&&y.removeAttribute(a),jd.delete(y)),C||y.removeAttribute(s)}),Hb--,Hb||(bl.inert=new WeakMap,bl["aria-hidden"]=new WeakMap,bl.none=new WeakMap,jd=new WeakSet,zd={})}}function eT(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=rB(e[0]).body;return oB(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Fh={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},Bp=v.forwardRef(function(t,n){const[r,s]=v.useState();cn(()=>{O5()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Al("focus-guard")]:"",style:Fh};return g.jsx("span",{...t,...a})}),PN=v.createContext(null),tT=Al("portal");function aB(e){e===void 0&&(e={});const{id:t,root:n}=e,r=$h(),s=$N(),[a,l]=v.useState(null),c=v.useRef(null);return cn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),cn(()=>{if(!r||c.current)return;const f=t?document.getElementById(t):null;if(!f)return;const d=document.createElement("div");d.id=r,d.setAttribute(tT,""),f.appendChild(d),c.current=d,l(d)},[t,r]),cn(()=>{if(n===null||!r||c.current)return;let f=n||s?.portalNode;f&&!ah(f)&&(f=f.current),f=f||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,f.appendChild(d));const h=document.createElement("div");h.id=r,h.setAttribute(tT,""),f=d||f,f.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function L0(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=aB({id:n,root:r}),[l,c]=v.useState(null),f=v.useRef(null),d=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,S=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function k(T){a&&uc(T)&&(T.type==="focusin"?GE:K5)(a)}return a.addEventListener("focusin",k,!0),a.addEventListener("focusout",k,!0),()=>{a.removeEventListener("focusin",k,!0),a.removeEventListener("focusout",k,!0)}},[a,s,b]),v.useEffect(()=>{a&&(y||GE(a))},[y,a]),g.jsxs(PN.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[S&&a&&g.jsx(Bp,{"data-type":"outside",ref:f,onFocus:k=>{if(uc(k,a)){var T;(T=h.current)==null||T.focus()}else{const C=l?l.domReference:null,E=AN(C);E?.focus()}}}),S&&a&&g.jsx("span",{"aria-owns":a.id,style:Fh}),a&&vi.createPortal(t,a),S&&a&&g.jsx(Bp,{"data-type":"outside",ref:d,onFocus:k=>{if(uc(k,a)){var T;(T=m.current)==null||T.focus()}else{const C=l?l.domReference:null,E=_N(C);E?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,k.nativeEvent,"focus-out")}}})]})}const $N=()=>v.useContext(PN);function nT(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const lB=20;let bo=[];function j0(){bo=bo.filter(e=>e.isConnected)}function uB(e){j0(),e&&Yn(e)!=="body"&&(bo.push(e),bo.length>lB&&(bo=bo.slice(-20)))}function rT(){return j0(),bo[bo.length-1]}function cB(e){const t=Vc();return SN(e,t)?e:jh(e,t)[0]||e}function iT(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Vc(),a=A5(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return SN(c,r)||c.hasAttribute("data-tabindex")&&!f.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 fB=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Fh})});function z0(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:f=!1,modal:d=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:S,onOpenChange:k,events:T,dataRef:C,elements:{domReference:E,floating:R}}=t,_=Pn(()=>{var pe;return(pe=C.current.floatingContext)==null?void 0:pe.nodeId}),D=Pn(y),A=typeof l=="number"&&l<0,N=ev(E)&&A,P=iB(),$=P?a:!0,I=!$||P&&b,V=Qn(s),B=Qn(l),z=Qn(c),j=Ao(),H=$N(),q=v.useRef(null),K=v.useRef(null),U=v.useRef(!1),Y=v.useRef(!1),O=v.useRef(-1),F=v.useRef(-1),G=H!=null,L=Fp(R),X=Pn(function(pe){return pe===void 0&&(pe=L),pe?jh(pe,Vc()):[]}),te=Pn(pe=>{const me=X(pe);return V.current.map(ke=>E&&ke==="reference"?E:L&&ke==="floating"?L:me).filter(Boolean).flat()});v.useEffect(()=>{if(r||!d)return;function pe(ke){if(ke.key==="Tab"){kr(L,ho(pr(L)))&&X().length===0&&!N&&sr(ke);const Se=te(),Te=mo(ke);V.current[0]==="reference"&&Te===E&&(sr(ke),ke.shiftKey?Qo(Se[Se.length-1]):Qo(Se[1])),V.current[1]==="floating"&&Te===L&&ke.shiftKey&&(sr(ke),Qo(Se[0]))}}const me=pr(L);return me.addEventListener("keydown",pe),()=>{me.removeEventListener("keydown",pe)}},[r,E,L,d,V,N,X,te]),v.useEffect(()=>{if(r||!R)return;function pe(me){const ke=mo(me),Te=X().indexOf(ke);Te!==-1&&(O.current=Te)}return R.addEventListener("focusin",pe),()=>{R.removeEventListener("focusin",pe)}},[r,R,X]),v.useEffect(()=>{if(r||!m)return;function pe(){Y.current=!0,setTimeout(()=>{Y.current=!1})}function me(Te){const ve=Te.relatedTarget,Ie=Te.currentTarget,_e=mo(Te);queueMicrotask(()=>{const je=_(),We=!(kr(E,ve)||kr(R,ve)||kr(ve,R)||kr(H?.portalNode,ve)||ve!=null&&ve.hasAttribute(Al("focus-guard"))||j&&(ea(j.nodesRef.current,je).find(Ce=>{var $e,se;return kr(($e=Ce.context)==null?void 0:$e.elements.floating,ve)||kr((se=Ce.context)==null?void 0:se.elements.domReference,ve)})||qE(j.nodesRef.current,je).find(Ce=>{var $e,se,Ee;return[($e=Ce.context)==null?void 0:$e.elements.floating,Fp((se=Ce.context)==null?void 0:se.elements.floating)].includes(ve)||((Ee=Ce.context)==null?void 0:Ee.elements.domReference)===ve})));if(Ie===E&&L&&iT(L,V),f&&Ie!==E&&!(_e!=null&&_e.isConnected)&&ho(pr(L))===pr(L).body){It(L)&&L.focus();const Ce=O.current,$e=X(),se=$e[Ce]||$e[$e.length-1]||L;It(se)&&se.focus()}if(C.current.insideReactTree){C.current.insideReactTree=!1;return}(N||!d)&&ve&&We&&!Y.current&&ve!==rT()&&(U.current=!0,k(!1,Te,"focus-out"))})}const ke=!!(!j&&H);function Se(){cr(F),C.current.insideReactTree=!0,F.current=window.setTimeout(()=>{C.current.insideReactTree=!1})}if(R&&It(E))return E.addEventListener("focusout",me),E.addEventListener("pointerdown",pe),R.addEventListener("focusout",me),ke&&R.addEventListener("focusout",Se,!0),()=>{E.removeEventListener("focusout",me),E.removeEventListener("pointerdown",pe),R.removeEventListener("focusout",me),ke&&R.removeEventListener("focusout",Se,!0)}},[r,E,R,L,d,j,H,k,m,f,X,N,_,V,C]);const J=v.useRef(null),le=v.useRef(null),oe=nT([J,H?.beforeInsideRef]),ue=nT([le,H?.afterInsideRef]);v.useEffect(()=>{var pe,me;if(r||!R)return;const ke=Array.from((H==null||(pe=H.portalNode)==null?void 0:pe.querySelectorAll("["+Al("portal")+"]"))||[]),Te=(me=(j?qE(j.nodesRef.current,_()):[]).find(_e=>{var je;return ev(((je=_e.context)==null?void 0:je.elements.domReference)||null)}))==null||(me=me.context)==null?void 0:me.elements.domReference,ve=[R,Te,...ke,...D(),q.current,K.current,J.current,le.current,H?.beforeOutsideRef.current,H?.afterOutsideRef.current,V.current.includes("reference")||N?E:null].filter(_e=>_e!=null),Ie=d||N?eT(ve,!I,I):eT(ve);return()=>{Ie()}},[r,E,R,d,V,H,N,$,I,j,_,D]),cn(()=>{if(r||!It(L))return;const pe=pr(L),me=ho(pe);queueMicrotask(()=>{const ke=te(L),Se=B.current,Te=(typeof Se=="number"?ke[Se]:Se.current)||L,ve=kr(L,me);!A&&!ve&&S&&Qo(Te,{preventScroll:Te===L})})},[r,S,L,A,te,B]),cn(()=>{if(r||!L)return;const pe=pr(L),me=ho(pe);uB(me);function ke(ve){let{reason:Ie,event:_e,nested:je}=ve;if(["hover","safe-polygon"].includes(Ie)&&_e.type==="mouseleave"&&(U.current=!0),Ie==="outside-press")if(je)U.current=!1;else if(TN(_e)||CN(_e))U.current=!1;else{let We=!1;document.createElement("div").focus({get preventScroll(){return We=!0,!1}}),We?U.current=!1:U.current=!0}}T.on("openchange",ke);const Se=pe.createElement("span");Se.setAttribute("tabindex","-1"),Se.setAttribute("aria-hidden","true"),Object.assign(Se.style,Fh),G&&E&&E.insertAdjacentElement("afterend",Se);function Te(){if(typeof z.current=="boolean"){const ve=E||rT();return ve&&ve.isConnected?ve:Se}return z.current.current||Se}return()=>{T.off("openchange",ke);const ve=ho(pe),Ie=kr(R,ve)||j&&ea(j.nodesRef.current,_(),!1).some(je=>{var We;return kr((We=je.context)==null?void 0:We.elements.floating,ve)}),_e=Te();queueMicrotask(()=>{const je=cB(_e);z.current&&!U.current&&It(je)&&(!(je!==ve&&ve!==pe.body)||Ie)&&je.focus({preventScroll:!0}),Se.remove()})}},[r,R,L,z,C,T,j,G,E,_]),v.useEffect(()=>(queueMicrotask(()=>{U.current=!1}),()=>{queueMicrotask(j0)}),[r]),cn(()=>{if(!r&&H)return H.setFocusManagerState({modal:d,closeOnFocusOut:m,open:S,onOpenChange:k,domReference:E}),()=>{H.setFocusManagerState(null)}},[r,H,d,S,k,m,E]),cn(()=>{r||L&&iT(L,V)},[r,L,V]);function xe(pe){return r||!h||!d?null:g.jsx(fB,{ref:pe==="start"?q:K,onClick:me=>k(!1,me.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const ye=!r&&$&&(d?!N:!0)&&(G||d);return g.jsxs(g.Fragment,{children:[ye&&g.jsx(Bp,{"data-type":"inside",ref:oe,onFocus:pe=>{if(d){const ke=te();Qo(s[0]==="reference"?ke[0]:ke[ke.length-1])}else if(H!=null&&H.preserveTabOrder&&H.portalNode)if(U.current=!1,uc(pe,H.portalNode)){const ke=_N(E);ke?.focus()}else{var me;(me=H.beforeOutsideRef.current)==null||me.focus()}}}),!N&&xe("start"),n,xe("end"),ye&&g.jsx(Bp,{"data-type":"inside",ref:ue,onFocus:pe=>{if(d)Qo(te()[0]);else if(H!=null&&H.preserveTabOrder&&H.portalNode)if(m&&(U.current=!0),uc(pe,H.portalNode)){const ke=AN(E);ke?.focus()}else{var me;(me=H.afterOutsideRef.current)==null||me.focus()}}})]})}function sT(e){return It(e.target)&&e.target.tagName==="BUTTON"}function dB(e){return It(e.target)&&e.target.tagName==="A"}function oT(e){return EN(e)}function FN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),S=v.useMemo(()=>({onPointerDown(k){b.current=k.pointerType},onMouseDown(k){const T=b.current;k.button===0&&c!=="click"&&(xc(T,!0)&&d||(n&&f&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,k.nativeEvent,"click"):(k.preventDefault(),r(!0,k.nativeEvent,"click"))))},onClick(k){const T=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}xc(T,!0)&&d||(n&&f&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,k.nativeEvent,"click"):r(!0,k.nativeEvent,"click"))},onKeyDown(k){b.current=void 0,!(k.defaultPrevented||!h||sT(k))&&(k.key===" "&&!oT(a)&&(k.preventDefault(),y.current=!0),!dB(k)&&k.key==="Enter"&&r(!(n&&f),k.nativeEvent,"click"))},onKeyUp(k){k.defaultPrevented||!h||sT(k)||oT(a)||k.key===" "&&y.current&&(y.current=!1,r(!(n&&f),k.nativeEvent,"click"))}}),[s,a,c,d,h,r,n,m,f]);return v.useMemo(()=>l?{reference:S}:{},[l,S])}const pB={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},hB={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},aT=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 BN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:S}=t,k=Ao(),T=Pn(typeof f=="function"?f:()=>!1),C=typeof f=="function"?T:f,E=v.useRef(!1),{escapeKey:R,outsidePress:_}=aT(y),{escapeKey:D,outsidePress:A}=aT(S),N=v.useRef(!1),P=Pn(j=>{var H;if(!n||!l||!c||j.key!=="Escape"||N.current)return;const q=(H=a.current.floatingContext)==null?void 0:H.nodeId,K=k?ea(k.nodesRef.current,q):[];if(!R&&(j.stopPropagation(),K.length>0)){let U=!0;if(K.forEach(Y=>{var O;if((O=Y.context)!=null&&O.open&&!Y.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,P5(j)?j.nativeEvent:j,"escape-key")}),$=Pn(j=>{var H;const q=()=>{var K;P(j),(K=mo(j))==null||K.removeEventListener("keydown",q)};(H=mo(j))==null||H.addEventListener("keydown",q)}),I=Pn(j=>{var H;const q=a.current.insideReactTree;a.current.insideReactTree=!1;const K=E.current;if(E.current=!1,d==="click"&&K||q||typeof C=="function"&&!C(j))return;const U=mo(j),Y="["+Al("inert")+"]",O=pr(s.floating).querySelectorAll(Y);let F=bt(U)?U:null;for(;F&&!mi(F);){const te=Ai(F);if(mi(te)||!bt(te))break;F=te}if(O.length&&bt(U)&&!j5(U)&&!kr(U,s.floating)&&Array.from(O).every(te=>!kr(F,te)))return;if(It(U)&&z){const te=mi(U),J=Cr(U),le=/auto|scroll/,oe=te||le.test(J.overflowX),ue=te||le.test(J.overflowY),xe=oe&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,ye=ue&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,pe=J.direction==="rtl",me=ye&&(pe?j.offsetX<=U.offsetWidth-U.clientWidth:j.offsetX>U.clientWidth),ke=xe&&j.offsetY>U.clientHeight;if(me||ke)return}const G=(H=a.current.floatingContext)==null?void 0:H.nodeId,L=k&&ea(k.nodesRef.current,G).some(te=>{var J;return Pb(j,(J=te.context)==null?void 0:J.elements.floating)});if(Pb(j,s.floating)||Pb(j,s.domReference)||L)return;const X=k?ea(k.nodesRef.current,G):[];if(X.length>0){let te=!0;if(X.forEach(J=>{var le;if((le=J.context)!=null&&le.open&&!J.context.dataRef.current.__outsidePressBubbles){te=!1;return}}),!te)return}r(!1,j,"outside-press")}),V=Pn(j=>{var H;const q=()=>{var K;I(j),(K=mo(j))==null||K.removeEventListener(d,q)};(H=mo(j))==null||H.addEventListener(d,q)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=R,a.current.__outsidePressBubbles=_;let j=-1;function H(O){r(!1,O,"ancestor-scroll")}function q(){window.clearTimeout(j),N.current=!0}function K(){j=window.setTimeout(()=>{N.current=!1},uh()?5:0)}const U=pr(s.floating);c&&(U.addEventListener("keydown",D?$:P,D),U.addEventListener("compositionstart",q),U.addEventListener("compositionend",K)),C&&U.addEventListener(d,A?V:I,A);let Y=[];return b&&(bt(s.domReference)&&(Y=yo(s.domReference)),bt(s.floating)&&(Y=Y.concat(yo(s.floating))),!bt(s.reference)&&s.reference&&s.reference.contextElement&&(Y=Y.concat(yo(s.reference.contextElement)))),Y=Y.filter(O=>{var F;return O!==((F=U.defaultView)==null?void 0:F.visualViewport)}),Y.forEach(O=>{O.addEventListener("scroll",H,{passive:!0})}),()=>{c&&(U.removeEventListener("keydown",D?$:P,D),U.removeEventListener("compositionstart",q),U.removeEventListener("compositionend",K)),C&&U.removeEventListener(d,A?V:I,A),Y.forEach(O=>{O.removeEventListener("scroll",H)}),window.clearTimeout(j)}},[a,s,c,C,d,n,r,b,l,R,_,P,D,$,I,A,V]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,C,d]);const B=v.useMemo(()=>({onKeyDown:P,...h&&{[pB[m]]:j=>{r(!1,j.nativeEvent,"reference-press")},...m!=="click"&&{onClick(j){r(!1,j.nativeEvent,"reference-press")}}}}),[P,r,h,m]),z=v.useMemo(()=>({onKeyDown:P,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[hB[d]]:()=>{a.current.insideReactTree=!0}}),[P,d,a]);return v.useMemo(()=>l?{reference:B,floating:z}:{},[l,B,z])}function mB(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=$h(),a=v.useRef({}),[l]=v.useState(()=>MN()),c=_o()!=null,[f,d]=v.useState(r.reference),h=Pn((y,S,k)=>{a.current.openEvent=y?S:void 0,l.emit("openchange",{open:y,event:S,reason:k,nested:c}),n?.(y,S,k)}),m=v.useMemo(()=>({setPositionReference:d}),[]),b=v.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,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 P0(e){e===void 0&&(e={});const{nodeId:t}=e,n=mB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,f]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=Ao();cn(()=>{h&&(m.current=h)},[h]);const y=sA({...e,elements:{...s,...c&&{reference:c}}}),S=v.useCallback(R=>{const _=bt(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;f(_),y.refs.setReference(_)},[y.refs]),k=v.useCallback(R=>{(bt(R)||R===null)&&(m.current=R,l(R)),(bt(y.refs.reference.current)||y.refs.reference.current===null||R!==null&&!bt(R))&&y.refs.setReference(R)},[y.refs]),T=v.useMemo(()=>({...y.refs,setReference:k,setPositionReference:S,domReference:m}),[y.refs,k,S]),C=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),E=v.useMemo(()=>({...y,...r,refs:T,elements:C,nodeId:t}),[y,T,C,t,r]);return cn(()=>{r.dataRef.current.floatingContext=E;const R=b?.nodesRef.current.find(_=>_.id===t);R&&(R.context=E)}),v.useMemo(()=>({...y,context:E,refs:T,elements:C}),[y,T,C,E])}function qb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[WE]:l,[KE]:c,...f}=e;a=f}return{...n==="floating"&&{tabIndex:-1,[X5]:""},...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(f=>{let[d,h]=f;if(!(s&&[WE,KE].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var m;(m=r.get(d))==null||m.push(h),l[d]=function(){for(var b,y=arguments.length,S=new Array(y),k=0;k<y;k++)S[k]=arguments[k];return(b=r.get(d))==null?void 0:b.map(T=>T(...S)).find(T=>T!==void 0)}}}else l[d]=h}),l),{})}}function UN(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=>qb(c,e,"reference"),t),a=v.useCallback(c=>qb(c,e,"floating"),n),l=v.useCallback(c=>qb(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const gB="Escape";function Bh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Pd(e,t){return Bh(t,e===IN||e===Ph,e===Wc||e===Kc)}function Vb(e,t,n){return Bh(t,e===Ph,n?e===Wc:e===Kc)||e==="Enter"||e===" "||e===""}function lT(e,t,n){return Bh(t,n?e===Wc:e===Kc,e===Ph)}function uT(e,t,n,r){const s=n?e===Kc:e===Wc,a=e===IN;return t==="both"||t==="horizontal"&&r&&r>1?e===gB:Bh(t,s,a)}function HN(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:f=()=>{},enabled:d=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:S=!1,virtual:k=!1,focusItemOnOpen:T="auto",focusItemOnHover:C=!0,openOnArrowKeyDown:E=!0,disabledIndices:R=void 0,orientation:_="vertical",parentOrientation:D,cols:A=1,scrollItemIntoView:N=!0,virtualItemRef:P,itemSizes:$,dense:I=!1}=t,V=Fp(s.floating),B=Qn(V),z=_o(),j=Ao();cn(()=>{e.dataRef.current.orientation=_},[e,_]);const H=Pn(()=>{f(U.current===-1?null:U.current)}),q=ev(s.domReference),K=v.useRef(T),U=v.useRef(h??-1),Y=v.useRef(null),O=v.useRef(!0),F=v.useRef(H),G=v.useRef(!!s.floating),L=v.useRef(n),X=v.useRef(!1),te=v.useRef(!1),J=Qn(R),le=Qn(n),oe=Qn(N),ue=Qn(h),[xe,ye]=v.useState(),[pe,me]=v.useState(),ke=Pn(()=>{function Ce(Q){if(k){var ee;(ee=Q.id)!=null&&ee.endsWith("-fui-option")&&(Q.id=a+"-"+Math.random().toString(16).slice(2,10)),ye(Q.id),j?.events.emit("virtualfocus",Q),P&&(P.current=Q)}else Qo(Q,{sync:X.current,preventScroll:!0})}const $e=l.current[U.current],se=te.current;$e&&Ce($e),(X.current?Q=>Q():requestAnimationFrame)(()=>{const Q=l.current[U.current]||$e;if(!Q)return;$e||Ce(Q);const ee=oe.current;ee&&Te&&(se||!O.current)&&(Q.scrollIntoView==null||Q.scrollIntoView(typeof ee=="boolean"?{block:"nearest",inline:"nearest"}:ee))})});cn(()=>{d&&(n&&s.floating?K.current&&h!=null&&(te.current=!0,U.current=h,H()):G.current&&(U.current=-1,F.current()))},[d,n,s.floating,h,H]),cn(()=>{if(d&&n&&s.floating)if(c==null){if(X.current=!1,ue.current!=null)return;if(G.current&&(U.current=-1,ke()),(!L.current||!G.current)&&K.current&&(Y.current!=null||K.current===!0&&Y.current==null)){let Ce=0;const $e=()=>{l.current[0]==null?(Ce<2&&(Ce?requestAnimationFrame:queueMicrotask)($e),Ce++):(U.current=Y.current==null||Vb(Y.current,_,S)||y?$b(l,J.current):VE(l,J.current),Y.current=null,H())};$e()}}else lc(l,c)||(U.current=c,ke(),te.current=!1)},[d,n,s.floating,c,ue,y,l,_,S,H,ke,J]),cn(()=>{var Ce;if(!d||s.floating||!j||k||!G.current)return;const $e=j.nodesRef.current,se=(Ce=$e.find(ee=>ee.id===z))==null||(Ce=Ce.context)==null?void 0:Ce.elements.floating,Ee=ho(pr(s.floating)),Q=$e.some(ee=>ee.context&&kr(ee.context.elements.floating,Ee));se&&!Q&&O.current&&se.focus({preventScroll:!0})},[d,s.floating,j,z,k]),cn(()=>{if(!d||!j||!k||z)return;function Ce($e){me($e.id),P&&(P.current=$e)}return j.events.on("virtualfocus",Ce),()=>{j.events.off("virtualfocus",Ce)}},[d,j,k,z,P]),cn(()=>{F.current=H,L.current=n,G.current=!!s.floating}),cn(()=>{n||(Y.current=null,K.current=T)},[n,T]);const Se=c!=null,Te=v.useMemo(()=>{function Ce(se){if(!le.current)return;const Ee=l.current.indexOf(se);Ee!==-1&&U.current!==Ee&&(U.current=Ee,H())}return{onFocus(se){let{currentTarget:Ee}=se;X.current=!0,Ce(Ee)},onClick:se=>{let{currentTarget:Ee}=se;return Ee.focus({preventScroll:!0})},onMouseMove(se){let{currentTarget:Ee}=se;X.current=!0,te.current=!1,C&&Ce(Ee)},onPointerLeave(se){let{pointerType:Ee}=se;if(!(!O.current||Ee==="touch")&&(X.current=!0,!!C&&(U.current=-1,H(),!k))){var Q;(Q=B.current)==null||Q.focus({preventScroll:!0})}}}},[le,B,C,l,H,k]),ve=v.useCallback(()=>{var Ce;return D??(j==null||(Ce=j.nodesRef.current.find($e=>$e.id===z))==null||(Ce=Ce.context)==null||(Ce=Ce.dataRef)==null?void 0:Ce.current.orientation)},[z,j,D]),Ie=Pn(Ce=>{if(O.current=!1,X.current=!0,Ce.which===229||!le.current&&Ce.currentTarget===B.current)return;if(y&&uT(Ce.key,_,S,A)){Pd(Ce.key,ve())||sr(Ce),r(!1,Ce.nativeEvent,"list-navigation"),It(s.domReference)&&(k?j?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const $e=U.current,se=$b(l,R),Ee=VE(l,R);if(q||(Ce.key==="Home"&&(sr(Ce),U.current=se,H()),Ce.key==="End"&&(sr(Ce),U.current=Ee,H())),A>1){const Q=$||Array.from({length:l.current.length},()=>({width:1,height:1})),ee=V5(Q,A,I),be=ee.findIndex(at=>at!=null&&!mp(l,at,R)),Ne=ee.reduce((at,ft,nt)=>ft!=null&&!mp(l,ft,R)?nt:at,-1),Ye=ee[q5({current:ee.map(at=>at!=null?l.current[at]:null)},{event:Ce,orientation:_,loop:b,rtl:S,cols:A,disabledIndices:W5([...(typeof R!="function"?R:null)||l.current.map((at,ft)=>mp(l,ft,R)?ft:void 0),void 0],ee),minIndex:be,maxIndex:Ne,prevIndex:G5(U.current>Ee?se:U.current,Q,ee,A,Ce.key===Ph?"bl":Ce.key===(S?Wc:Kc)?"tr":"tl"),stopEvent:!0})];if(Ye!=null&&(U.current=Ye,H()),_==="both")return}if(Pd(Ce.key,_)){if(sr(Ce),n&&!k&&ho(Ce.currentTarget.ownerDocument)===Ce.currentTarget){U.current=Vb(Ce.key,_,S)?se:Ee,H();return}Vb(Ce.key,_,S)?b?U.current=$e>=Ee?m&&$e!==l.current.length?-1:se:fr(l,{startingIndex:$e,disabledIndices:R}):U.current=Math.min(Ee,fr(l,{startingIndex:$e,disabledIndices:R})):b?U.current=$e<=se?m&&$e!==-1?l.current.length:Ee:fr(l,{startingIndex:$e,decrement:!0,disabledIndices:R}):U.current=Math.max(se,fr(l,{startingIndex:$e,decrement:!0,disabledIndices:R})),lc(l,U.current)&&(U.current=-1),H()}}),_e=v.useMemo(()=>k&&n&&Se&&{"aria-activedescendant":pe||xe},[k,n,Se,pe,xe]),je=v.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...q?{}:_e,onKeyDown:Ie,onPointerMove(){O.current=!0}}),[_e,Ie,_,q]),We=v.useMemo(()=>{function Ce(se){T==="auto"&&TN(se.nativeEvent)&&(K.current=!0)}function $e(se){K.current=T,T==="auto"&&CN(se.nativeEvent)&&(K.current=!0)}return{..._e,onKeyDown(se){O.current=!1;const Ee=se.key.startsWith("Arrow"),Q=["Home","End"].includes(se.key),ee=Ee||Q,be=lT(se.key,_,S),Ne=uT(se.key,_,S,A),Ye=lT(se.key,ve(),S),at=Pd(se.key,_),ft=(y?Ye:at)||se.key==="Enter"||se.key.trim()==="";if(k&&n){const et=j?.nodesRef.current.find(Pe=>Pe.parentId==null),Qe=j&&et?z5(j.nodesRef.current,et.id):null;if(ee&&Qe&&P){const Pe=new KeyboardEvent("keydown",{key:se.key,bubbles:!0});if(be||Ne){var nt,vt;const pt=((nt=Qe.context)==null?void 0:nt.elements.domReference)===se.currentTarget,lt=Ne&&!pt?(vt=Qe.context)==null?void 0:vt.elements.domReference:be?l.current.find(ut=>ut?.id===xe):null;lt&&(sr(se),lt.dispatchEvent(Pe),me(void 0))}if((at||Q)&&Qe.context&&Qe.context.open&&Qe.parentId&&se.currentTarget!==Qe.context.elements.domReference){var St;sr(se),(St=Qe.context.elements.domReference)==null||St.dispatchEvent(Pe);return}}return Ie(se)}if(!(!n&&!E&&Ee)){if(ft){const et=Pd(se.key,ve());Y.current=y&&et?null:se.key}if(y){Ye&&(sr(se),n?(U.current=$b(l,J.current),H()):r(!0,se.nativeEvent,"list-navigation"));return}at&&(h!=null&&(U.current=h),sr(se),!n&&E?r(!0,se.nativeEvent,"list-navigation"):Ie(se),n&&H())}},onFocus(){n&&!k&&(U.current=-1,H())},onPointerDown:$e,onPointerEnter:$e,onMouseDown:Ce,onClick:Ce}},[xe,_e,A,Ie,J,T,l,y,H,r,n,E,_,ve,S,h,j,k,P]);return v.useMemo(()=>d?{reference:We,floating:je,item:Te}:{},[d,We,je,Te])}const bB=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qN(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:f="dialog"}=t,d=$h(),h=((n=a.domReference)==null?void 0:n.id)||d,m=v.useMemo(()=>{var E;return((E=Fp(a.floating))==null?void 0:E.id)||l},[a.floating,l]),b=(r=bB.get(f))!=null?r:f,S=_o()!=null,k=v.useMemo(()=>b==="tooltip"||f==="label"?{["aria-"+(f==="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"&&S&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[b,m,S,s,h,f]),T=v.useMemo(()=>{const E={id:m,...b&&{role:b}};return b==="tooltip"||f==="label"?E:{...E,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,f]),C=v.useCallback(E=>{let{active:R,selected:_}=E;const D={role:"option",...R&&{id:m+"-fui-option"}};switch(f){case"select":case"combobox":return{...D,"aria-selected":_}}return{}},[m,f]);return v.useMemo(()=>c?{reference:k,floating:T,item:C}:{},[c,k,T,C])}const cT=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function nl(e,t){return typeof e=="function"?e(t):e}function yB(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 vB(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,f]=v.useState("unmounted"),d=yB(n,l);return!d&&c==="close"&&f("unmounted"),cn(()=>{if(r){if(n){f("initial");const h=requestAnimationFrame(()=>{vi.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(h)}}f("close")}},[n,r]),{isMounted:d,status:c}}function VN(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,f=c.split("-")[0],d=v.useMemo(()=>({side:f,placement:c}),[f,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,S]=v.useState(()=>({...nl(a,d),...nl(n,d)})),{isMounted:k,status:T}=vB(e,{duration:l}),C=Qn(n),E=Qn(r),R=Qn(s),_=Qn(a);return cn(()=>{const D=nl(C.current,d),A=nl(R.current,d),N=nl(_.current,d),P=nl(E.current,d)||Object.keys(D).reduce(($,I)=>($[I]="",$),{});if(T==="initial"&&S($=>({transitionProperty:$.transitionProperty,...N,...D})),T==="open"&&S({transitionProperty:Object.keys(P).map(cT).join(","),transitionDuration:m+"ms",...N,...P}),T==="close"){const $=A||D;S({transitionProperty:Object.keys($).map(cT).join(","),transitionDuration:b+"ms",...N,...$})}},[b,R,C,E,_,m,T,d]),{isMounted:k,styles:y}}function GN(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:f,enabled:d=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,S=v.useRef(-1),k=v.useRef(""),T=v.useRef((n=y??l)!=null?n:-1),C=v.useRef(null),E=Pn(c),R=Pn(f),_=Qn(h),D=Qn(b);cn(()=>{r&&(cr(S),C.current=null,k.current="")},[r]),cn(()=>{if(r&&k.current===""){var I;T.current=(I=y??l)!=null?I:-1}},[r,y,l]);const A=Pn(I=>{I?s.current.typing||(s.current.typing=I,R(I)):s.current.typing&&(s.current.typing=I,R(I))}),N=Pn(I=>{function V(q,K,U){const Y=_.current?_.current(K,U):K.find(O=>O?.toLocaleLowerCase().indexOf(U.toLocaleLowerCase())===0);return Y?q.indexOf(Y):-1}const B=a.current;if(k.current.length>0&&k.current[0]!==" "&&(V(B,B,k.current)===-1?A(!1):I.key===" "&&sr(I)),B==null||D.current.includes(I.key)||I.key.length!==1||I.ctrlKey||I.metaKey||I.altKey)return;r&&I.key!==" "&&(sr(I),A(!0)),B.every(q=>{var K,U;return q?((K=q[0])==null?void 0:K.toLocaleLowerCase())!==((U=q[1])==null?void 0:U.toLocaleLowerCase()):!0})&&k.current===I.key&&(k.current="",T.current=C.current),k.current+=I.key,cr(S),S.current=window.setTimeout(()=>{k.current="",T.current=C.current,A(!1)},m);const j=T.current,H=V(B,[...B.slice((j||0)+1),...B.slice(0,(j||0)+1)],k.current);H!==-1?(E(H),C.current=H):I.key!==" "&&(k.current="",A(!1))}),P=v.useMemo(()=>({onKeyDown:N}),[N]),$=v.useMemo(()=>({onKeyDown:N,onKeyUp(I){I.key===" "&&A(!1)}}),[N,A]);return v.useMemo(()=>d?{reference:P,floating:$}:{},[d,P,$])}function WN(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,...WN(e,s.id,n)])}function fT(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[f,d]=t[l]||[0,0],[h,m]=t[c]||[0,0];d>=r!=m>=r&&n<=(h-f)*(r-d)/(m-d)+f&&(s=!s)}return s}function xB(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function KN(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,f=typeof performance<"u"?performance.now():0;function d(m,b){const y=performance.now(),S=y-f;if(l===null||c===null||S===0)return l=m,c=b,f=y,null;const k=m-l,T=b-c,E=Math.sqrt(k*k+T*T)/S;return l=m,c=b,f=y,E}const h=m=>{let{x:b,y,placement:S,elements:k,onClose:T,nodeId:C,tree:E}=m;return function(_){function D(){cr(s),T()}if(cr(s),!k.domReference||!k.floating||S==null||b==null||y==null)return;const{clientX:A,clientY:N}=_,P=[A,N],$=nB(_),I=_.type==="mouseleave",V=Ub(k.floating,$),B=Ub(k.domReference,$),z=k.domReference.getBoundingClientRect(),j=k.floating.getBoundingClientRect(),H=S.split("-")[0],q=b>j.right-j.width/2,K=y>j.bottom-j.height/2,U=xB(P,z),Y=j.width>z.width,O=j.height>z.height,F=(Y?z:j).left,G=(Y?z:j).right,L=(O?z:j).top,X=(O?z:j).bottom;if(V&&(a=!0,!I))return;if(B&&(a=!1),B&&!I){a=!0;return}if(I&&bt(_.relatedTarget)&&Ub(k.floating,_.relatedTarget)||E&&WN(E.nodesRef.current,C).length)return;if(H==="top"&&y>=z.bottom-1||H==="bottom"&&y<=z.top+1||H==="left"&&b>=z.right-1||H==="right"&&b<=z.left+1)return D();let te=[];switch(H){case"top":te=[[F,z.top+1],[F,j.bottom-1],[G,j.bottom-1],[G,z.top+1]];break;case"bottom":te=[[F,j.top+1],[F,z.bottom-1],[G,z.bottom-1],[G,j.top+1]];break;case"left":te=[[j.right-1,X],[j.right-1,L],[z.left+1,L],[z.left+1,X]];break;case"right":te=[[z.right-1,X],[z.right-1,L],[j.left+1,L],[j.left+1,X]];break}function J(le){let[oe,ue]=le;switch(H){case"top":{const xe=[Y?oe+t/2:q?oe+t*4:oe-t*4,ue+t+1],ye=[Y?oe-t/2:q?oe+t*4:oe-t*4,ue+t+1],pe=[[j.left,q||Y?j.bottom-t:j.top],[j.right,q?Y?j.bottom-t:j.top:j.bottom-t]];return[xe,ye,...pe]}case"bottom":{const xe=[Y?oe+t/2:q?oe+t*4:oe-t*4,ue-t],ye=[Y?oe-t/2:q?oe+t*4:oe-t*4,ue-t],pe=[[j.left,q||Y?j.top+t:j.bottom],[j.right,q?Y?j.top+t:j.bottom:j.top+t]];return[xe,ye,...pe]}case"left":{const xe=[oe+t+1,O?ue+t/2:K?ue+t*4:ue-t*4],ye=[oe+t+1,O?ue-t/2:K?ue+t*4:ue-t*4];return[...[[K||O?j.right-t:j.left,j.top],[K?O?j.right-t:j.left:j.right-t,j.bottom]],xe,ye]}case"right":{const xe=[oe-t,O?ue+t/2:K?ue+t*4:ue-t*4],ye=[oe-t,O?ue-t/2:K?ue+t*4:ue-t*4],pe=[[K||O?j.left+t:j.right,j.top],[K?O?j.left+t:j.right:j.left+t,j.bottom]];return[xe,ye,...pe]}}}if(!fT([A,N],te)){if(a&&!U)return D();if(!I&&r){const le=d(_.clientX,_.clientY);if(le!==null&&le<.1)return D()}fT([A,N],J([b,y]))?!a&&r&&(s.current=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}function YN(e){return dn(e.defaultTagName??"div",e,e)}const kB=v.createContext(void 0);function SB(){return v.useContext(kB)}const Gb={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 wB(e){return[Gb.base,e==="green"?Gb.colorGreen:Gb.colorBlue]}function EB({color:e="blue",className:t}){const n=qt({rootClass:"ui-indicator-dot",stylexStyles:wB(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const TB={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",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}},$d={sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},CB={rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},RB={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}},Fd={root:[TB.root,UA.root],size:{sm:[Vi.sm,Es.sm,$d.sm],md:[Vi.md,Es.md,$d.md],lg:[Vi.lg,Es.lg,$d.lg],xl:[Vi.xl,Es.xl,$d.xl]},contentFrame:RB,rounded:CB.rounded},_B="md",AB="ghost",NB={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 XN(e){if(e!==void 0&&w0(e))return Dt(NB.root,IA(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return e===void 0?t:{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function OB({variant:e,rounded:t,frame:n,size:r,tone:s,indicatorDot:a}){return{"data-variant":e,"data-rounded":t||void 0,"data-frame":n,"data-size":r,"data-tone":s,"data-fg-channel":"icon","data-indicator-dot":a||void 0}}function ZN({enforcedRootStyle:e,frame:t,indicatorDot:n,rootStyle:r,rounded:s,size:a,tone:l,variant:c}){const f=T0(c,l);return{dataAttrs:OB({frame:t,indicatorDot:n,rounded:s,size:a,tone:l,variant:c}),rootAttrs:Dt(Fd.root,Ri.appearance,f.applyControlTone&&C0.foreground,f.applyControlTone&&l!==void 0&&jA[l],c==="ghost"&&(l==="secondary"||l==="tertiary")&&C$[l],f.applyFilledColors&&Ri.colors,f.applyNonFilledBackground&&Tl.background,(c==="outline"||c==="ghost")&&Mp(l)&&zA[l],c==="outline"&&Tl.outline,c==="outline"&&Mp(l)&&PA[l],c==="media"&&Ri.media,Ri.press,a!=="xs"&&Fd.size[a],s&&Fd.rounded,t==="content"&&a!=="xs"&&Fd.contentFrame[a],e,r)}}function QN({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??_B,c=r??a?.iconButtonVariant??AB,f=l==="xs"?void 0:$A[l];return{size:l,innerIconSize:t??a?.iconButtonIconSize??f,disabled:n??a?.disabled,variant:c,tone:DA(s??a?.iconButtonTone??(c==="primary"?LA:void 0))}}function br({icon:e,iconVariant:t="outline",variant:n,rounded:r,frame:s="container",size:a,iconSize:l,tone:c,className:f,style:d,rootStyle:h,iconStyle:m,disabled:b,indicatorDot:y=!1,indicatorDotColor:S="blue","aria-label":k,"aria-labelledby":T,onKeyDown:C,onKeyUp:E,...R}){const _=ha(),{size:D,innerIconSize:A,disabled:N,variant:P,tone:$}=QN({disabled:b,enforced:_,iconSize:l,size:a,tone:c,variant:n}),I=ZN({enforcedRootStyle:_?.iconButtonRootStyle,frame:s,indicatorDot:y,rootStyle:h,rounded:r,size:D,tone:$,variant:P});return g.jsxs(E0,{...R,onKeyDown:Dp(C),onKeyUp:Dp(E),className:Qt("ui-icon-button",I.rootAttrs.className,f),style:{...I.rootAttrs.style,...d},...I.dataAttrs,disabled:N,"aria-label":k,"aria-labelledby":T,children:[typeof e=="string"?g.jsx(Pt,{name:e,rootStyle:[_?.iconButtonIconStyle,m],variant:t,size:A,"aria-hidden":"true"}):g.jsx("span",{...XN(A),"aria-hidden":"true",children:e}),y?g.jsx(EB,{color:S}):null]})}function IB(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function $0(e){if(!(IB()?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 Bd={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 MB({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const f=qt({rootClass:"ui-input-group__input",stylexStyles:[Bd.base,t?Bd.disabled:null,n?Bd.mono:null,n?Bd.monoInput:null,s],className:e,style:a}),d=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&$0(h)},[l]);return g.jsx("input",{ref:r,className:f.className,style:f.style,disabled:t,onKeyDown:d,...c})}const Tr={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","--ui-input-group-stroke-rest":"ui-ja7v4d",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-or0oem ui-9afaxg ui-4vz0kq",ke9TFa:"ui-1lun4ml",k8ry5P:"ui-18b5jzi",kBCPoo:"ui-2an0dy ui-jsivns ui-1n6ytmu",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-snjbj6 ui-illscj ui-1rfq9xa",k2ei4v:"ui-pilrb4",kVhnKS:"ui-1t7ytsu",kGJrpR:"ui-iui3t5 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},sizeMd:{"--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},layoutTextareaMd:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantDefault:{"--ui-input-group-stroke-rest":"ui-l27skc",$$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}},Xo={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},autoSizeContent:{kOwNse:"ui-i3vqlg",kAzted:"ui-10fesj9 ui-1mcog50",kORKVm:"ui-10wlt62 ui-n0h0yx",$$css:!0},autoSizeContentMaxRows:{kskxy:"ui-17r4vdi",$$css:!0},autoSizeRows:(e,t)=>[{"--ui-input-group-textarea-min-rows":String(e)!=null?"ui-so4lmt":String(e),"--ui-input-group-textarea-max-rows":String(t)!=null?"ui-1554sew":String(t),$$css:!0},{"--x---ui-input-group-textarea-min-rows":String(e)!=null?String(e):void 0,"--x---ui-input-group-textarea-max-rows":String(t)!=null?String(t):void 0}],collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Nl={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}},dT={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}},DB={md:Tr.sizeMd,lg:Tr.sizeLg,xl:Tr.sizeXl},LB={md:Tr.layoutTextareaMd,lg:Tr.layoutTextareaLg,xl:null},jB={container:null,content:Tr.frameContent},zB={default:Tr.variantDefault,elevated:Tr.variantElevated,ghost:Tr.variantGhost,unfilled:Tr.variantUnfilled},PB={rounded:null,pill:Tr.shapePill},JN=v.createContext(null);function ga(e){const t=v.useContext(JN);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function $B(){return ga("InputGroup.useContext")}const FB={md:"sm",lg:"base",xl:"lg"},BB={md:"sm",lg:"sm",xl:"sm"},UB={md:"sm",lg:"sm",xl:"md"};function HB(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("field-sizing","content")}function pT({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:f,children:d}){const h=SB(),m=l||h?.disabled===!0,b=qt({rootClass:"ui-input-group",stylexStyles:[Tr.base,DB[n],s==="textarea"?Tr.layoutTextarea:null,s==="textarea"?LB[n]:null,jB[t],zB[e],e==="unfilled"?Tr.variantUnfilledSize:null,PB[r],m?Tr.disabled:null,c],className:f});return g.jsx(JN.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Ms,{iconSize:FB[n],iconButtonSize:BB[n],buttonSize:UB[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:d})})})}function qB({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=ga("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(h5,{...a,className:e,disabled:c,ref:n,render:g.jsx(MB,{mono:l.mono,rootStyle:r}),style:s})}function VB({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:f,minRows:d=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:S,placeholder:k,focusedPlaceholder:T,...C}){const E=ga("InputGroup.Textarea"),R=E.disabled||t===!0,_=d<1?1:d,D=h===void 0?void 0:h<_?_:h,A=m&&!b,N=Math.min(Math.max(y??_,_),D??Number.POSITIVE_INFINITY),P=qt({rootClass:"ui-input-group__textarea",stylexStyles:[Xo.field,R?Xo.disabled:null,E.mono?Xo.mono:null,b?Xo.collapseBlur:null,A?Xo.autoSizeContent:null,A&&D!==void 0?Xo.autoSizeContentMaxRows:null,A?Xo.autoSizeRows(N,D??N):null,r],className:e,style:s}),$=v.useRef(null),I=Gc([$,n]),[V,B]=v.useState(!1),z=v.useCallback(()=>{if(!m)return;const O=$.current;if(!O||A&&O.style.height===""&&HB())return;if(D===_&&(y===void 0||y===_)){O.style.height="",O.style.overflowY="auto";return}O.style.height="auto";const F=window.getComputedStyle(O),G=Number.parseFloat(F.lineHeight),L=Number.parseFloat(F.paddingTop)||0,X=Number.parseFloat(F.paddingBottom)||0,te=Number.parseFloat(F.borderTopWidth)||0,J=Number.parseFloat(F.borderBottomWidth)||0,le=L+X+te+J,oe=Number.isFinite(G)&&G>0?le+G*_:0,ue=D!==void 0&&Number.isFinite(G)&&G>0?le+G*D:void 0,xe=Math.max(O.scrollHeight,oe),ye=ue!==void 0?Math.min(xe,ue):xe;O.style.height=`${ye}px`,O.style.overflowY=ue!==void 0&&O.scrollHeight>ue?"auto":"hidden"},[m,D,_,y,A]);v.useLayoutEffect(()=>{z()},[S,z]);const j=v.useCallback(O=>{a?.(O),!O.defaultPrevented&&$0(O)},[a]),H=v.useCallback(O=>{l?.(O),O.defaultPrevented||z()},[l,z]),q=v.useCallback(O=>{B(!0),c?.(O)},[c]),K=v.useCallback(O=>{B(!1),f?.(O)},[f]),U=y??_,Y=V&&T!==void 0?T:k;return g.jsx("textarea",{ref:I,className:P.className,style:P.style,disabled:R,onKeyDown:j,rows:U,value:S,placeholder:Y,...C,"data-textarea-collapse-blur":b?"":void 0,onInput:H,onFocus:q,onBlur:K})}function GB({addonStyle:e,className:t,ref:n,...r}){const s=ga("InputGroup.Icon"),a=qt({rootClass:"ui-input-group__addon",stylexStyles:[Nl.base,s.layout==="textarea"?Nl.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(Pt,{ref:n,...r})})}function WB({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ga("InputGroup.IconButton"),l=a.disabled?!0:n,c=qt({rootClass:"ui-input-group__addon",stylexStyles:[Nl.base,a.layout==="textarea"?Nl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(br,{ref:r,disabled:l,...s})})}function KB({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=ga("InputGroup.Button"),l=a.disabled?!0:n,c=qt({rootClass:"ui-input-group__addon",stylexStyles:[Nl.base,a.layout==="textarea"?Nl.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(hn,{ref:r,disabled:l,...s})})}function YB({className:e,children:t}){const n=ga("InputGroup.Span"),r=qt({rootClass:"ui-input-group__span",stylexStyles:[dT.base,n.mono?dT.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const Ud=Object.assign(pT,{Root:pT,Input:qB,Textarea:VB,Icon:GB,IconButton:WB,Button:KB,Span:YB,useContext:$B}),XB=v.createContext(void 0);function ZB(e){return v.useContext(XB)}function eO(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Qv(),{ref:s,index:a}=sN(e),l=n===a,c=v.useRef(null),f=So(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:f,index:a}}function QB(e){const{render:t,className:n,style:r,state:s=In,props:a=Yi,refs:l=Yi,metadata:c,stateAttributesMapping:f,tag:d="div",...h}=e,{compositeProps:m,compositeRef:b}=eO({metadata:c});return dn(d,e,{state:s,ref:[b,...l],props:[m,...a,h],stateAttributesMapping:f})}function JB(e){const[t,n]=v.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function hT(e){const t=Cr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=It(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(El(n)!==a||El(r)!==l)&&(n=a,r=l),{width:n,height:r}}function tO(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const nO=v.createContext(void 0);function Yc(e){const t=v.useContext(nO);if(t===void 0&&!e)throw new Error(Mn(50));return t}const e9=600,rO=300,iO={...SA,instantType:e=>e.instantType,adaptiveOrigin:e=>e.adaptiveOrigin,closeDelay:e=>e.closeDelay};class t9 extends Uc{constructor(t,n,r){const s=new Sh;super(sO(t,s,n,r),oO(s),iO)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;mA(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===wr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&lA(r,n.trigger,s.clientX,s.clientY)}})}}function n9(){const e=new Sh;return new D3(Object.freeze(sO(void 0,e)),Object.freeze(oO(e)),iO)}function sO(e,t,n,r=!1){return{...xA(t,n,r),instantType:void 0,adaptiveOrigin:void 0,closeDelay:rO,...e}}function oO(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e,inlineRectCoordsRef:{current:void 0}}}function mT(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:f=null,children:d}=e,h=pA((C,E)=>new t9({open:n,openProp:t,activeTriggerId:f,triggerIdProp:c},C,E));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"),S=h.useState("payload");bA(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:k}=yA(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});qe(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]),v.useImperativeHandle(a,()=>({unmount:k,close:()=>h.setOpen(!1,wt(Sp))}),[k,h]);const T=m||y;return g.jsxs(nO.Provider,{value:h,children:[l&&g.jsx(hA,{handle:l,store:h}),T&&g.jsx(r9,{store:h}),typeof d=="function"?d({payload:S}):d]})}function r9({store:e}){const t=e.useState("floatingRootContext"),n=c0(t);return vA(e,{activeTriggerProps:n.reference,inactiveTriggerProps:n.trigger,popupProps:n.floating}),null}const aO=g0(function(t){return Yc(!0)?g.jsx(mT,{...t}):g.jsx(YP,{children:g.jsx(mT,{...t})})}),lO=v.createContext(void 0);function i9(){const e=v.useContext(lO);if(e===void 0)throw new Error(Mn(48));return e}const uO=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...f}=t,{node:d,subtree:h}=W_({container:s,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:g.jsxs(v.Fragment,{children:[h,d&&vi.createPortal(r,d)]})}),cO=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Yc().useState("mounted")||r?g.jsx(lO.Provider,{value:r,children:g.jsx(uO,{ref:n,...s})}):null}),fO=cA(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:f,handle:d,style:h,...m}=t,b=Yc(!0),S=wA(d)??b;if(!S)throw new Error(Mn(89));const k=Pl(c),T=S.useState("isTriggerActive",k),C=S.useState("isOpenedByTrigger",k),E=S.useState("floatingRootContext"),R=S.context.inlineRectCoordsRef,_=v.useRef(null),D=a??e9,A=l??rO,{registerTrigger:N,isMountedByThisTrigger:P}=gA(k,_,S,{payload:f,closeDelay:A}),$=RA(E,{mouseOnly:!0,move:!1,handleClose:_A(),delay:()=>({open:D,close:A}),triggerElementRef:_,isActiveTrigger:T,isClosing:()=>S.select("transitionStatus")==="ending"}),I=EA(E,{delay:D}),V={open:C},B=S.useState("triggerProps",P),z=B6(R,C);return dn("a",t,{state:V,ref:[n,N,_],props:[$,I.reference,B,z,{id:k},m],stateAttributesMapping:x_})}),dO=v.createContext(void 0);function s9(){const e=v.useContext(dO);if(e===void 0)throw new Error(Mn(49));return e}const pO=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:S=!1,disableAnchorTracking:k=!1,collisionAvoidance:T=q_,style:C,...E}=t,R=Yc(),_=i9(),D=WP(),A=R.useState("open"),N=R.useState("mounted"),P=R.useState("floatingRootContext"),$=R.useState("instantType"),I=R.useState("transitionStatus"),V=R.useState("adaptiveOrigin"),B=R.context.inlineRectCoordsRef,z=N0({anchor:a,floatingRootContext:P,positionMethod:l,mounted:N,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:S,disableAnchorTracking:k,keepMounted:_,nodeId:D,collisionAvoidance:T,adaptiveOrigin:V,inline:U6(B)}),j=z.update;qe(()=>{A&&N&&j()},[A,N,j]);const H={open:A,side:z.side,align:z.align,anchorHidden:z.anchorHidden,instant:$},q=O0(t,H,{styles:z.positionerStyles,transitionStatus:I,props:E,refs:[n,R.useStateSetter("positionerElement")],hidden:!N,inert:!A});return g.jsx(dO.Provider,{value:z,children:g.jsx(KP,{id:D,children:q})})}),hO=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=Yc(),{side:f,align:d}=s9(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),S=c.useState("floatingRootContext"),k=c.useState("closeDelay");return Ro({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),CA(S,{closeDelay:k}),dn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y0,y,Ah(b),l],stateAttributesMapping:k_})});class o9 extends H6{constructor(){super(n9(),"PreviewCard")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}}function a9(){return new o9}function Ol(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),f=e!==void 0,d=v.useRef(f);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{d.current,d.current=f},[r,f]);const h=f?e:s,m=v.useCallback(b=>{if(!f){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,f]);return[h,m]}const mO="never",gO=250,Wb={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)}]},l9={base:{kB7OPa:"ui-9f619",$$css:!0}};function u9({ariaLabel:e,labelledBy:t,close:n,content:r,contentStyle:s,isOpen:a,maxHeight:l,maxWidth:c,offset:f,placement:d,sameAxisOnly:h,scrollbarVisibility:m,surfaceClassName:b,surfaceStyle:y,width:S}){const{portalLayerStyles:k}=Fl("tooltip",!0),{side:T,align:C,sideOffset:E,alignOffset:R,collisionAvoidance:_,positionMethod:D}=Lh(d??Mh,f,h),A=Oh(lN),N=Dt(I0,Wb.base,Nh,Wb.width(S),c!==void 0&&Wb.maxWidth(c),y),P=Dt(uN,l9.base,s);return g.jsx(pO,{align:C,alignOffset:R,className:A.className,collisionAvoidance:_,collisionPadding:8,positionMethod:D,side:T,sideOffset:E,style:{...A.style,...k},children:g.jsx(hO,{"aria-label":e,"aria-labelledby":t,className:Qt("ui-preview-card",b,N.className),"data-block-global-shortcuts":a?"Escape":void 0,role:"dialog",style:N.style,children:g.jsx(Rl,{maxHeight:l,scrollbarVisibility:m,children:g.jsx("div",{className:Qt("ui-preview-card__content",P.className),style:P.style,children:typeof r=="function"?r(n):r})})})})}function bO({children:e,content:t,placement:n=Mh,sameAxisOnly:r=!1,offset:s=8,openDelay:a=gO,closeDelay:l=Dh,disabled:c=!1,maxHeight:f=300,maxWidth:d,scrollbarVisibility:h=mO,width:m=280,className:b,surfaceStyle:y,contentStyle:S,"aria-label":k,ref:T,defaultOpen:C=!1,open:E,onOpenChange:R,onOpenChangeComplete:_,...D}){const A=v.useRef(null),[N,P]=Ol(E,C,void 0,"PreviewCard"),$=v.useId(),I=v.Children.only(e),V=v.isValidElement(I),B=V?I.props.id:void 0,z=typeof B=="string"?B:$,j=v.useCallback(Y=>{Y!==null&&(A.current?.close(),E===void 0&&A.current?.unmount())},[E]),H=YN({defaultTagName:"span",props:D,ref:[T,j],render:V?I:void 0}),q=ma(),K=v.useCallback((Y,O)=>{if(c){Y&&O.cancel();return}if(O.reason==="outside-press"||O.reason==="trigger-press"){O.cancel();return}R?.(Y,O),O.isCanceled||P(Y)},[c,R,P]),U=v.useCallback(()=>A.current?.close(),[]);return V?g.jsxs(aO,{actionsRef:A,defaultOpen:C,onOpenChange:K,onOpenChangeComplete:_,open:E,children:[c?H:g.jsx(fO,{...D,closeDelay:l,delay:a,id:z,ref:T,render:I}),c?null:g.jsx(cO,{container:q??void 0,children:g.jsx(u9,{ariaLabel:k,labelledBy:k===void 0?z:void 0,close:U,content:t,contentStyle:S,isOpen:N,maxHeight:f,maxWidth:d,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function gT(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function yO(e,t){const n=gT(e),r=gT(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const f=c.target,d=a.defaultView?.Element;if(d===void 0||!(f instanceof d))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&f.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Up=v.createContext(!1);function vO({children:e,dismiss:t}){const n=v.use(Up);return g.jsx(Up.Provider,{value:n||t,children:e})}const F0="data-preview-card-layer-trigger-pressed";function c9(e){e.button===0&&e.currentTarget.setAttribute(F0,"")}function f9(e){e.currentTarget.removeAttribute(F0)}const xO=v.createContext(null),kO=v.createContext(null),SO=v.createContext(null);function wO(e){const t=v.use(xO);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function d9(){const e=v.use(kO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function p9(){const e=v.use(SO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function h9({children:e}){const t=M0();return P0({nodeId:t,open:!0}),g.jsx(D0,{id:t,children:e})}function kc({children:e,placement:t=Mh,offset:n=8,sameAxisOnly:r=!1,openDelay:s=gO,closeDelay:a=Dh,controlledTargetId:l}){const c=v.useMemo(()=>a9(),[]),f=v.useRef(null),d=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[S,k]=v.useState(!1),T=v.useRef(null),C=v.use(Up),E=Lh(t,n,r);v.useLayoutEffect(()=>{S||T.current?.unmount()},[S]);const R=v.useCallback($=>{f.current===$&&(f.current=null,c.close())},[c]),_=v.useCallback(()=>{const $=y.current;if($===void 0)return;const I=$===null?void 0:b.current.get($);if($===null||I===void 0||I.suppressed){f.current=null,c.close();return}f.current=I.triggerId,c.open(I.triggerId)},[c]),D=v.useCallback(()=>{const $=m.current;m.current=!1;const I=d.current;if(I===null)return;const V=h.current;V===null||V.id!==I||!V.isConnected||V.hasAttribute("data-preview-card-layer-trigger-suppressed")||!$&&V!==V.ownerDocument.activeElement&&!V.matches(":hover")||(f.current=I,c.open(I))},[c]),A=v.useCallback(($,I)=>(b.current.set($,I),_(),()=>{b.current.get($)===I&&(b.current.delete($),_())}),[_]);v.useLayoutEffect(()=>{const $=y.current;if($===void 0&&l!==void 0&&(d.current=f.current),y.current=l,l===void 0){$!==void 0&&D();return}$!==l&&(m.current=!1),_()},[l,_,D]);const N=v.useCallback(($,I)=>{if(y.current!==void 0&&I.reason!=="imperative-action"){$&&I.trigger!==void 0&&!I.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(d.current=I.trigger.id,h.current=I.trigger,m.current=!0):!$&&I.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),I.cancel(),_();return}if($&&I.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if(I.cancel(),y.current!==void 0){_();return}f.current=null,d.current=null,c.close();return}if(!$&&I.reason==="trigger-focus"&&I.event instanceof FocusEvent&&I.event.relatedTarget===null&&I.event.target instanceof Element&&I.event.target.matches(":hover")){I.cancel();return}if(!$&&I.reason==="trigger-focus"&&I.event instanceof FocusEvent&&I.event.target instanceof Element&&I.event.target.closest(`[${F0}]`)!==null){I.cancel();return}!$&&I.reason!=="imperative-action"&&I.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),f.current=$?I.trigger?.id??f.current:null,y.current===void 0&&(d.current=f.current),k($),y.current===void 0&&I.trigger!==void 0&&(h.current=$?I.trigger:null)},[c,_]),P=v.useMemo(()=>({handle:c,instantDismiss:C,openDelay:s,closeDelay:a,positioner:E,closeIfActive:R,registerTarget:A}),[a,R,c,C,s,E,A]);return g.jsxs(xO.Provider,{value:P,children:[e,g.jsx(aO,{actionsRef:T,handle:c,onOpenChange:N,children:({payload:$})=>!C&&S&&$!==void 0?g.jsx(kO.Provider,{value:$.triggerId,children:g.jsx(SO.Provider,{value:$.contentKey,children:g.jsx(h9,{children:$.content})})}):null})]})}function m9({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l,keepOpenOnPress:c=!1}){const{handle:f,instantDismiss:d,openDelay:h,closeDelay:m,closeIfActive:b,registerTarget:y}=wO("PreviewCardLayer.Trigger"),S=v.useId(),k=e.props.id,T=typeof k=="string"?k:S,C=s||d,E=v.useMemo(()=>({content:t,contentKey:r??T,triggerId:T}),[t,r,T]);return v.useLayoutEffect(()=>{const R=n===void 0?void 0:y(n,{triggerId:T,suppressed:C});return C&&b(T),()=>{R?.(),b(T)}},[b,y,C,n,T]),g.jsx(fO,{closeDelay:l??m,delay:a??h,handle:f,id:T,payload:E,"data-preview-card-layer-trigger-suppressed":C?"":void 0,onPointerDown:c?c9:void 0,onPointerLeave:c?f9:void 0,render:e})}function g9({ariaLabel:e,children:t,maxHeight:n,surfaceClassName:r,surfaceStyle:s}){const{handle:a,positioner:l}=wO("PreviewCardLayer.Popup"),c=d9(),f=p9(),d=ma(),h=yO(a,c),{portalLayerStyles:m}=Fl("tooltip",!0),b=Oh(lN),y=Dt(I0,cN,uN,Nh,uF,s);return g.jsx(cO,{container:d??void 0,children:g.jsx(pO,{align:l.align,alignOffset:l.alignOffset,className:b.className,collisionAvoidance:l.collisionAvoidance,collisionPadding:8,positionMethod:l.positionMethod,side:l.side,sideOffset:l.sideOffset,style:{...b.style,...m},children:g.jsx(hO,{"aria-label":e,"aria-labelledby":e===void 0?c:void 0,"data-component":"preview-card-layer-popup",className:Qt("ui-preview-card-layer",r,y.className),ref:h,role:"dialog",style:y.style,children:n===void 0?t:g.jsx(Rl,{maxHeight:`min(${typeof n=="number"?`${n}px`:n}, var(--available-height, 100vh))`,scrollbarVisibility:mO,children:t})},f)})})}(function(e){e.Trigger=m9,e.Popup=g9})(kc||(kc={}));const B0="data-composite-item-active";function b9(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:d=!1,stopEventPropagation:h,disabledIndices:m,modifierKeys:b=Yi}=e,[y,S]=v.useState(0),k=r!=null,T=v.useRef(null),C=So(T,f),E=v.useRef([]),R=v.useRef(!1),_=v.useRef(null),D=l??y,A=Ve((V,B=!1)=>{if(_.current=E.current[V]??null,(c??S)(V),B){const z=E.current[V];hE(T.current,z,a,n)}}),N=Ve(V=>{if(V.size===0)return;if(R.current){const H=E.current,q=H.indexOf(_.current);if(q===-1){const K=H[D];!K||ml(H,D,m)?A(y9(H,m)):_.current=K}else q!==D&&A(q);return}R.current=!0;const B=Array.from(V.keys()),z=B.find(H=>H?.hasAttribute(B0))??null,j=z?V.get(z)?.index??-1:-1;if(j!==-1)A(j);else if(ml(B,D,m)){const H=ws(B,{disabledIndices:m});sc(B,H)||A(H)}hE(T.current,z,a,n)});qe(()=>{if(m==null||l!=null||!R.current)return;const V=E.current;if(ml(V,D,m)){const B=ws(V,{disabledIndices:m});sc(V,B)||A(B)}},[m,l,D,E,A]);const P=Ve((V,B,z)=>s?s(V,B,z,E):z),$=Ve(V=>{const B=V.key===Vy||V.key===Gy;if(!AA.has(V.key)||!d&&B||v9(V,b)||!T.current)return;const j=a==="rtl",H=j?Hy:qy,q=j?qy:Hy,K=n==="vertical"?Uy:H,U=n==="vertical"?By:q,Y=mr(V.nativeEvent);if(Y!=null&&pE(Y)&&!tO(Y)){const te=Y.selectionStart,J=Y.selectionEnd,le=Y.value;if(te==null||V.shiftKey||te!==J||V.key!==U&&te<le.length||V.key!==K&&te>0)return}let O=D;const F=fp(E,m),G=jy(E,m);r!=null&&(O=r({disabledIndices:m,elementsRef:E,event:V,highlightedIndex:D,loopFocus:t,maxIndex:G,minIndex:F,onLoop:P,orientation:n,rtl:j}));const L=n!=="vertical"&&V.key===H||n!=="horizontal"&&V.key===Uy,X=n!=="vertical"&&V.key===q||n!=="horizontal"&&V.key===By;d&&(V.key===Vy?O=F:V.key===Gy&&(O=G)),O===D&&(L||X)&&(t&&O===G&&L?(O=F,s&&(O=s(V,D,O,E))):t&&O===F&&X?(O=G,s&&(O=s(V,D,O,E))):O=ws(E.current,{startingIndex:O,decrement:X,disabledIndices:m})),O!==D&&!sc(E.current,O)&&(h&&V.stopPropagation(),(k||B||L||X)&&V.preventDefault(),A(O,!0),queueMicrotask(()=>{E.current[O]?.focus()}))});return{props:{ref:C,onFocus(V){const B=T.current,z=mr(V.nativeEvent);!B||z==null||!pE(z)||z.setSelectionRange(0,z.value.length)},onKeyDown:$},highlightedIndex:D,onHighlightedIndexChange:A,elementsRef:E,onMapChange:N,relayKeyboardEvent:$}}function y9(e,t){let n=-1;for(let r=0;r<e.length;r+=1){const s=e[r];if(!(!s||ml(e,r,t))){if(s.hasAttribute(B0))return r;n===-1&&(n=r)}}return Math.max(n,0)}function v9(e,t){for(const n of w3)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function x9(e){const{render:t,className:n,style:r,refs:s=Yi,props:a=Yi,state:l=In,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:S,onMapChange:k,stopEventPropagation:T=!0,rootRef:C,disabledIndices:E,modifierKeys:R,highlightItemOnHover:_=!1,tag:D="div",...A}=e,N=Mi(),{props:P,highlightedIndex:$,onHighlightedIndexChange:I,elementsRef:V,onMapChange:B,relayKeyboardEvent:z}=b9({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:C,stopEventPropagation:T,enableHomeAndEndKeys:S,direction:N,disabledIndices:E,modifierKeys:R}),j=dn(D,e,{state:l,ref:s,props:[P,...a,A],stateAttributesMapping:c}),H=v.useMemo(()=>({highlightedIndex:$,onHighlightedIndexChange:I,highlightItemOnHover:_,relayKeyboardEvent:z}),[$,I,_,z]);return g.jsx(w_.Provider,{value:H,children:g.jsx(A0,{elementsRef:V,onMapChange:q=>{k?.(q),B(q)},children:j})})}const k9=v.createContext(void 0);function S9(){const e=v.useContext(k9);if(e===void 0)throw new Error(Mn(63));return e}const w9="data-checked",E9="data-unchecked",T9={...Ch,checked(e){return e?{[w9]:""}:{[E9]:""}}},C9=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=S9();return dn("span",t,{state:c,ref:n,stateAttributesMapping:T9,props:l})}),R9="md",bT={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",kWkggS:"ui-59yu97 ui-fewc5l ui-dc3jbj",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-fewc5l ui-dc3jbj",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}},_9={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-1bbrhsv",$$css:!0}};function A9({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10mbuw1 ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(C9,{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",...Dt(bT.root,bT[t],_9[n]),children:s})}function N9({checked:e,disabled:t,size:n=R9,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(A9,{interactive:!1,size:n,variant:r})})}function rc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const xn={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}},O9={xs:FA.root,sm:Ds.root,md:_s.root,lg:BA.root,xl:N$.root,"2xl":O$.root,"3xl":I$.root,inherit:xn.sizeInherit},I9={regular:xn.weightRegular,medium:xn.weightMedium,semibold:xn.weightSemibold,bold:xn.weightBold},M9={primary:xn.colorPrimary,secondary:xn.colorSecondary,tertiary:xn.colorTertiary,quaternary:xn.colorQuaternary,active:xn.colorActive,focused:xn.colorFocused,red:xn.colorRed,"red-secondary":xn.colorRedSecondary,yellow:xn.colorYellow,"yellow-secondary":xn.colorYellowSecondary,green:xn.colorGreen,"green-secondary":xn.colorGreenSecondary,magenta:xn.colorMagenta,"magenta-secondary":xn.colorMagentaSecondary,cyan:xn.colorCyan,"cyan-secondary":xn.colorCyanSecondary,orange:xn.colorOrange,"orange-secondary":xn.colorOrangeSecondary};function D9({color:e,size:t,truncate:n,variant:r,weight:s}){return[xn.base,Th.root,O9[t],I9[s],r==="code"?xn.variantCode:null,e?M9[e]:null,n==="start"?xn.truncateStart:null,n==="end"?Bl.root:null]}function Hp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:f,className:d,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:S,style:k}=Dt(D9({color:s,size:n,truncate:y,variant:t,weight:r}),f);return g.jsx(e,{ref:m,className:Qt("ui-text",S,d),style:{...k,...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 EO={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function TO({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 CO({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 RO({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 _O({children:e}){return g.jsx(Hp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:EO.text,size:"md",weight:"medium",children:e})}function AO({children:e}){return g.jsx(Hp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:EO.text,size:"md",weight:"regular",children:e})}function NO({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 L9({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(Pt,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(TO,{children:[l===void 0?null:g.jsx(CO,{variant:r,children:l}),g.jsxs(RO,{children:[s===void 0?null:g.jsx(_O,{children:s}),g.jsx(AO,{children:e})]}),t===void 0?null:g.jsx(NO,{children:g.jsx(hn,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const Ci=Object.assign(L9,{Root:TO,Icon:CO,Header:RO,Title:_O,Description:AO,Content:NO});function Xc({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...f}){return g.jsxs(Ud.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(Ud.Icon,{name:a}),g.jsx(Ud.Input,{ref:r,...f}),l!=null&&g.jsx(Ud.Icon,{name:l})]})}const vs=class vs{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return vs.instance||(vs.instance=new vs),vs.instance}static subscribe(t){return vs.getInstance().subscribeToChanges(t)}static isDragActive(){return vs.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}};vs.instance=null;let hi=vs;const Kb={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)"}},j9={1:1,2:2},tv={instant:50,fast:100,normal:150,slow:200,slower:300},OO={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)"},z9={"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},P9={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},$9={xs:20,sm:24,base:28,lg:32},F9={xs:11,sm:12,base:13,lg:14},B9={xs:14,sm:16,base:18,lg:22},U9={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},H9=.98,q9=2,yT={open:tv.fast,close:tv.fast},V9=OO.outQuint;function IO(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 G9(e){const{side:t,alignment:n}=IO(e);switch(t){case"top":return`${vT(n)} bottom`;case"right":return`left ${xT(n)}`;case"bottom":return`${vT(n)} top`;case"left":return`right ${xT(n)}`}}function W9(e,t={}){const{side:n}=IO(e),r=t.offset??q9,s=t.scale??H9;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 K9(e,t){return{opacity:0,transform:W9(e,t)}}function Y9(e){return{transformOrigin:G9(e),transitionTimingFunction:V9}}function X9({closeDuration:e=yT.close,transform:t}={}){return{duration:{open:yT.open,close:e},initial:({placement:n})=>K9(n,t),common:({placement:n})=>Y9(n)}}function vT(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function xT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}const Ul="data-ui-menu-item-region",MO=v.createContext("body");function Ts({value:e,children:t}){return g.jsx(MO.Provider,{value:e,children:t})}function Zc(){return v.useContext(MO)}const Z9='[role="menuitem"]',kT=["pointermove","mousemove"];function DO(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 LO(e,t){if(!(e===void 0||t===null||t<0))return`${e}-item-${t}`}function Qc(e,t){const n=LO(e,t);return n===void 0?{}:{id:n}}function jO(e){const{"aria-activedescendant":t,...n}=e;return n}function Q9(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function J9(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Ul)===t)return r;return null}function zO(e,t,n){queueMicrotask(()=>{const r=J9(e,t);n(r??null)})}function PO(e,t){if(!(e instanceof Element))return null;const n=e.closest(Z9);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function e8(e,t){if(!e)return()=>{};for(const n of kT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of kT)e.removeEventListener(n,t)}}function t8({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=Q9(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 $O(e,t){return v.useCallback(n=>{const r=e(n);if(t)return r;const{onPointerLeave:s,...a}=r;return a},[e,t])}function FO(){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 n8=360,BO="--ui-menu-available-width",U0="--ui-menu-available-height",r8=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function UO(e){const t=`var(${U0}, 100vh)`;return e==null||i8(e)?t:`min(${ll(e)}, ${t})`}function i8(e){return typeof e=="string"&&r8.has(e.trim().toLowerCase())}const s8="320px";function ll(e){return typeof e=="number"?`${e}px`:e}function Yb(e){return`min(${e}, var(${BO}, 100vw))`}function H0(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":ll(t??"200px");return s?{width:l==="max-content"?l:Yb(l),...n!=null&&{minWidth:Yb(ll(n))},maxWidth:Yb(r!=null?ll(r):s8)}:{width:l,...n!=null&&{minWidth:ll(n)},...r!=null&&{maxWidth:ll(r)}}}const o8=50;function q0({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function a8(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 l8(){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 Uh(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 u8={open:0,close:0},c8={opacity:1,transform:"none"},V0=v.createContext(null);function ba(e){const t=v.useContext(V0);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function HO(){return ba("LegacyMenu.useContext")}function f8({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:f=!0,closeOnSelect:d,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:S=!1,virtualFocus:k=!1,shouldKeepOpenDuringDrag:T=!1,lockPositionWhileOpen:C=!1,dismissOnReferenceScroll:E=!1,enableClick:R=!0,strategy:_,shouldDismissOutsidePress:D}){const A=M0(),[N,P]=Ol(t,n,r,"LegacyMenu.Root (open)"),[$,I]=v.useState(""),V=v.useRef(null),[B,z]=v.useState(!1),[j,H]=v.useState(!1),[q,K]=Ol(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:U,markKeyboardNavigation:Y,markPointerNavigation:O,resetFocusItemOnHover:F}=FO(),G=v.useRef([]),L=v.useRef([]),X=v.useRef(null),te=v.useCallback(Ne=>{P(Ne),Ne?(I(""),X.current=null):K(null),F()},[F,P,K]),J=v.useRef(!1);v.useLayoutEffect(()=>{const Ne=J.current;J.current=N,!Ne&&N&&I(""),Ne!==N&&F()},[N,F]);const{refs:le,floatingStyles:oe,middlewareData:ue,context:xe,update:ye}=P0({nodeId:A,open:N,onOpenChange:te,placement:l,strategy:_,middleware:[d0(c),...f?[h0()]:[],p0(),m0({padding:8,apply({availableHeight:Ne,elements:Ye}){Ye.floating.style.setProperty(U0,`${Math.max(0,Math.floor(Ne))}px`)}}),l8()],whileElementsMounted:C?void 0:Rp,transform:!1}),pe=jN(xe,{enabled:j,delay:{open:75},handleClose:KN({blockPointerEvents:!0,requireIntent:!1})}),me=FN(xe,{enabled:R&&!j}),ke=Uh(),Se=v.useCallback(Ne=>D!==void 0&&!D(Ne)||T&&hi.getInstance().hasData()?!1:ke(Ne),[D,T,ke]),Te=BN(xe,{ancestorScroll:E,outsidePressEvent:"click",outsidePress:Se}),ve=qN(xe,{role:"menu"}),Ie=HN(xe,{listRef:G,activeIndex:q,onNavigate:K,loop:!1,virtual:k||B,focusItemOnOpen:S,focusItemOnHover:U}),_e=GN(xe,{listRef:L,activeIndex:q,onMatch:B?void 0:K,enabled:!B}),{getReferenceProps:je,getFloatingProps:We,getItemProps:Ce}=UN([pe,me,Te,ve,Ie,_e]),$e=$O(Ce,N),se=v.useCallback(Ne=>({...jO(je(Ne)),ref:le.setReference,"aria-haspopup":"menu","aria-expanded":N}),[je,le.setReference,N]),Ee=m?{duration:u8,initial:c8}:X9(h?{closeDuration:0}:void 0),{isMounted:Q,styles:ee}=VN(xe,Ee),be=v.useMemo(()=>({isOpen:N,isMounted:Q,setIsOpen:P,activeIndex:q,setActiveIndex:K,markKeyboardNavigation:Y,markPointerNavigation:O,virtualFocus:k,searchValue:$,setSearchValue:I,hasSearchInput:B,setHasSearchInput:z,enableHover:j,setHasHoverTrigger:H,closeOnSelect:d,returnFocusOnSelect:b,returnFocus:y,nodeId:A,activeDescendantIdPrefix:B?A:void 0,listRef:G,labelsRef:L,searchInputRef:V,refs:le,floatingStyles:oe,middlewareData:ue,transitionStyles:ee,context:xe,updateFloating:ye,getReferenceProps:je,getFloatingProps:We,getItemProps:$e,getTriggerProps:se,dismissCauseRef:X,shouldAllowPointerInteraction:Se}),[N,Q,P,q,K,Y,O,k,$,B,j,d,b,y,A,le,oe,ue,ee,xe,ye,je,We,$e,se,Se]);return g.jsx(D0,{id:A,children:g.jsx(V0.Provider,{value:be,children:e})})}function Vu(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function Hl(e,t){switch(e){case"ArrowLeft":return t==="rtl"?"end":"start";case"ArrowRight":return t==="rtl"?"start":"end";default:return null}}const d8=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),p8={_zod:{output:{}},safeParse:e=>d8(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function qO(e,t=()=>p8){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 h8=v.createContext(null);function m8(){return v.useContext(h8)}const g8=v.createContext("copy-with-plain-text");function b8(){return v.useContext(g8)}const y8="application/x-cursor-draggable",Hd=x8("ui-i9pz9s"),v8="data-no-drag";let Jo=!1,ST=!1,wT=null;function ET(){return wT??=Object.assign(new Image(1,1),{src:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}),wT}function x8(e){return e?.split(/\s+/).filter(Boolean)??[]}function qd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function k8(){if(ST||typeof document>"u")return;ST=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){Jo=!1;return}Jo=t.target.closest(`[${v8}]`)!==null},{capture:!0});const e=()=>{Jo=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function S8({id:e,data:t,disabled:n=!1,dragImageOffset:r,hideNativeDragImage:s=!1,onDragStart:a,onDragEnd:l}){const c=m8(),f=b8(),d=v.useRef(null),h=v.useRef({onDragStart:a,onDragEnd:l});h.current={onDragStart:a,onDragEnd:l};const m=v.useRef(t);m.current=t;const b=v.useRef(r);b.current=r;const y=v.useRef(s);y.current=s,v.useEffect(()=>{s&&ET()},[s]);const S=v.useRef(c);S.current=c;const k=c?.activeDragId===e,T=v.useRef(k);return T.current=k,v.useEffect(()=>{const E=d.current;if(E)return qd(E,Hd,!n&&k),()=>{qd(E,Hd,!1)}},[n,k]),v.useEffect(()=>{const E=d.current;if(!E)return;if(n){E.removeAttribute("aria-grabbed");return}const R=k?"true":"false";E.getAttribute("aria-grabbed")!==R&&E.setAttribute("aria-grabbed",R)},[n,k]),{ref:v.useCallback(E=>{if(d.current=E,!E)return;qd(E,Hd,!n&&T.current);const R=!n;if(E.draggable!==R&&(E.draggable=R),n)return;k8();const _=hi.getInstance(),D=N=>{if(Jo){Jo=!1,N.preventDefault(),N.stopPropagation();return}const P=m.current;_.setData(P);const $=E.ownerDocument,I=()=>{$.removeEventListener("dragend",I,!0),$.removeEventListener("drop",I,!0),$.removeEventListener("mousemove",I,!0),setTimeout(()=>{_.getData()===P&&(_.clearData(),Jo=!1,S.current?.setDragging(null,null))},0)};if($.addEventListener("dragend",I,!0),$.addEventListener("drop",I,!0),$.addEventListener("mousemove",I,!0),N.dataTransfer){const V=f==="copy-with-plain-text";N.dataTransfer.effectAllowed=V?"copyMove":"move",N.dataTransfer.setData(y8,P.type),V&&N.dataTransfer.setData("text/plain",P.type);const B=b.current;y.current?N.dataTransfer.setDragImage(ET(),0,0):B&&N.dataTransfer.setDragImage(E,B.x,B.y)}S.current?.setDragging(e,P,{x:N.clientX,y:N.clientY}),h.current.onDragStart?.(N)},A=N=>{_.clearData(),Jo=!1,S.current?.setDragging(null,null),h.current.onDragEnd?.(N)};return E.addEventListener("dragstart",D),E.addEventListener("dragend",A),()=>{E.removeEventListener("dragstart",D),E.removeEventListener("dragend",A),qd(E,Hd,!1)}},[e,n,f]),isDragging:k}}const gp={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-s7jddj","--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",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}},w8={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}},yi={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}},Fi={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}},Ki={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",k7Eaqz:"ui-euugli",$$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}},ta={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}},qp={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}},E8={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}},T8={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},nv={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}},Vp={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 C8(e,t=!1){return[fN,gp.base,_s.root,e==="md"&&gp.sizeMd,t&&gp.hasAttachment]}function R8(e=!1){return e&&gp.dropIndicator}function _8(){return w8.base}function A8(){return yi.inner}function N8(){return yi.dropIndicatorSlot}function O8(e=!1){return[yi.layout,e&&yi.layoutCard,e&&Ih.border]}function I8(){return[yi.attachment,Ih.border]}function VO(){return yi.bodyScroll}function M8(){return yi.header}function D8(){return yi.footer}function L8(e=!1){return[yi.list,e&&yi.virtualizedList]}function j8(){return yi.virtualizedRow}function z8(){return yi.virtualizedScroller}function G0(e={}){return[Fi.base,e.selected&&Fi.selected,e.inSubmenu&&!e.disabled&&Fi.submenuHover,e.focused&&Fi.focused,e.expanded&&Fi.expanded,e.disabled&&Fi.disabled,e.disabled&&e.focused&&Fi.disabledFocused,e.variant==="muted"&&Fi.muted,e.variant==="muted"&&e.focused&&Fi.mutedFocused,e.indent&&Fi.indent]}const P8={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function $8(){return P8.disabled}function F8(e={}){return[Ki.left,e.wideLeft&&Ki.leftWide]}function B8(){return Ki.content}function U8(e={}){return[Ki.right,e.disabled&&Ki.rightDisabled,e.trailingHidden&&Ki.rightHidden]}function H8(){return Ki.submenuRight}function q8(){return Ki.wrapper}function V8(){return[Bl.root,Ki.title]}function G8(){return[Ds.root,Bl.root,Ki.description]}function W8(e){return[ta.wrapper,e&&ta.wrapperInline]}function K8(e){return[Bl.root,ta.title,e&&ta.titleInline]}function Y8({inline:e,wrap:t}){return[Ds.root,Bl.root,ta.subtitle,e&&ta.subtitleInline,t&&ta.subtitleWrap]}function X8(){return T8.row}function Z8(){return qp.wrapper}function Q8(e){return[Ds.root,qp.title,e&&qp.titleAction]}function J8(){return qp.textAction}function e7(){return E8.divider}function W0(){return nv.surface}function GO(e){switch(e){case"default":return;case"medium":return nv.surfaceMedium;case"wide":return nv.surfaceWide;default:return e}}function t7(e){return[Ds.root,Vp.empty,e&&Vp.emptyIndent]}function n7(){return[_s.root,Vp.loading]}function r7(){return Vp.loadingSpinner}function i7(e){let t=e;const n=new Set;return{get:()=>t,set:r=>{if(r!==t){t=r;for(const s of n)s()}},subscribe:r=>(n.add(r),()=>{n.delete(r)})}}const WO=v.createContext(null);function Jc(e){const t=v.useContext(WO);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function Hh(e,t){const n=()=>e.get()===t;return v.useSyncExternalStore(e.subscribe,n,n)}function KO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1,activeDescendantIdPrefix:c,shouldAllowPointerInteraction:f,closeMenuLayersOnSelect:d}){const[h]=v.useState(()=>i7(t));v.useLayoutEffect(()=>{h.set(t)},[h,t]);const m=v.useMemo(()=>({activeIndexStore:h,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l,activeDescendantIdPrefix:c,shouldAllowPointerInteraction:f,closeMenuLayersOnSelect:d}),[h,n,r,s,a,l,c,f,d]);return g.jsx(WO.Provider,{value:m,children:e})}const YO=v.createContext(void 0);function qh(e){const t=v.useContext(YO);if(t===void 0&&!e)throw new Error(Mn(72));return t}const s7={...SA,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class o7 extends Uc{constructor(t,n,r){const s=new Sh;super(a7(t,s,n,r),l7(s),s7)}setOpen=(t,n)=>{mA(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,wt(zl,t))}}function a7(e,t,n,r=!1){return{...xA(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function l7(e){return{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}const u7=g0(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,S=pA((V,B)=>new o7({open:r,openProp:s,activeTriggerId:b,triggerIdProp:m},V,B));S.useControlledProp("openProp",s),S.useControlledProp("triggerIdProp",m),S.useContextCallback("onOpenChange",f),S.useContextCallback("onOpenChangeComplete",d);const k=S.useState("open"),T=!n&&k,C=S.useState("activeTriggerId"),E=S.useState("mounted"),R=S.useState("payload");S.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a,disabled:n}),bA(S,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:_,transitionStatus:D}=yA(T,S),A=S.useState("isInstantPhase"),N=S.useState("instantType"),P=S.useState("lastOpenChangeReason"),$=v.useRef(null);qe(()=>{k&&n&&S.setOpen(!1,wt(E_))},[k,n,S]),qe(()=>{D==="ending"&&P===Ni||D!=="ending"&&A?(N!=="delay"&&($.current=N),S.set("instantType","delay")):$.current!==null&&(S.set("instantType",$.current),$.current=null)},[D,A,P,N,S]),qe(()=>{T&&C==null&&S.set("payload",void 0)},[S,C,T]),v.useImperativeHandle(c,()=>({unmount:_,close:()=>S.setOpen(!1,wt(Sp))}),[_,S]);const I=T||E||!n&&l!=="none";return g.jsxs(YO.Provider,{value:S,children:[h&&g.jsx(hA,{handle:h,store:S}),I&&g.jsx(c7,{store:S,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:R}):y]})});function c7({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=c0(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=t6(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>ra(a.reference,s.reference),[a.reference,s.reference]);return vA(e,{activeTriggerProps:l,inactiveTriggerProps:l,popupProps:s.floating??In}),null}const f7=v.createContext(void 0);function d7(){return v.useContext(f7)}const p7=600,XO="data-base-ui-tooltip-trigger";function TT(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(bt(s))return s}}const t=e.target;return bt(t)?t:null}function h7(e){let t=e;for(;t;){const n=t.closest(`[${XO}]`);if(n)return n;const r=t.getRootNode();t="host"in r&&bt(r.host)?r.host:null}return null}const m7=cA(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:f,delay:d,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,S=qh(!0),T=wA(l)??S;if(!T)throw new Error(Mn(82));const C=Pl(b),E=T.useState("isTriggerActive",C),R=T.useState("isOpenedByTrigger",C),_=T.useState("floatingRootContext"),D=v.useRef(null),A=m??0,{registerTrigger:N,isMountedByThisTrigger:P}=gA(C,D,T,{payload:c,closeOnClick:h,closeDelay:A}),$=d7(),{activeIdRef:I,delayRef:V,isInstantPhase:B,hasProvider:z}=vP(_,{open:R}),j=k0(_);T.useSyncedValue("isInstantPhase",B);const H=T.useState("disabled"),q=f??H,K=An(q),U=T.useState("trackCursorAxis"),Y=T.useState("disableHoverablePopup"),O=v.useRef(!1),F=ei(),G=v.useRef(void 0);function L(){return z&&I.current!=null?0:d??$??p7}function X(me){const ke=D.current;if(!ke||!me)return!1;const Se=h7(me);return Se!==null&&Se!==ke&&ht(ke,Se)}function te(me){const ke=X(me);return O.current=ke,ke&&(j.openChangeTimeout.clear(),j.restTimeout.clear(),j.restTimeoutPending=!1,F.clear()),ke}const J=RA(_,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!Y&&U!=="both"?_A():null,restMs:L,delay(){return m==null&&z?{close:bc(V.current,"close")}:{close:A}},triggerElementRef:D,isActiveTrigger:E,isClosing:()=>T.select("transitionStatus")==="ending",shouldOpen(){return!O.current}}),le=EA(_,{enabled:!q}).reference,oe=me=>{const ke=O.current,Se=TT(me),Te=te(Se),ve=D.current,Ie=ve&&Se&&ht(ve,Se);if(Te&&T.select("open")&&T.select("lastOpenChangeReason")===wr){T.setOpen(!1,wt(wr,me));return}if(ke&&!Te&&Ie&&!K.current&&!T.select("open")&&ve&&vo(G.current)){const _e=()=>{!O.current&&!K.current&&!T.select("open")&&T.setOpen(!0,wt(wr,me,ve))},je=L();je===0?(F.clear(),_e()):F.start(je,_e)}},ue=T.useState("triggerProps",P);return dn("button",t,{state:{open:R},ref:[n,N,D],props:[J,le,P||U!=="none"?ue:void 0,{onMouseOver(me){oe(me.nativeEvent)},onFocus(me){X(TT(me.nativeEvent))&&me.preventBaseUIHandler()},onMouseLeave(){O.current=!1,F.clear(),G.current=void 0},onPointerEnter(me){G.current=me.pointerType},onPointerDown(me){G.current=me.pointerType,T.set("closeOnClick",h),h&&!T.select("open")&&T.cancelPendingOpen(me.nativeEvent)},onClick(me){h&&!T.select("open")&&T.cancelPendingOpen(me.nativeEvent)},id:C,[My]:q?"":void 0,[XO]:q?void 0:""},y],stateAttributesMapping:x_})}),ZO=v.createContext(void 0);function g7(){const e=v.useContext(ZO);if(e===void 0)throw new Error(Mn(70));return e}const b7=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return qh().useState("mounted")||r?g.jsx(ZO.Provider,{value:r,children:g.jsx(uO,{ref:n,...s})}):null}),QO=v.createContext(void 0);function y7(){const e=v.useContext(QO);if(e===void 0)throw new Error(Mn(71));return e}const v7=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:S=!1,disableAnchorTracking:k=!1,collisionAvoidance:T=q_,style:C,...E}=t,R=qh(),_=g7(),D=R.useState("open"),A=R.useState("mounted"),N=R.useState("trackCursorAxis"),P=R.useState("disableHoverablePopup"),$=R.useState("floatingRootContext"),I=R.useState("instantType"),V=R.useState("transitionStatus"),B=R.useState("adaptiveOrigin"),z=N0({anchor:a,positionMethod:l,floatingRootContext:$,mounted:A,side:c,sideOffset:d,align:f,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:S,arrowPadding:y,disableAnchorTracking:k,keepMounted:_,collisionAvoidance:T,adaptiveOrigin:B}),j=v.useMemo(()=>({open:D,side:z.side,align:z.align,anchorHidden:z.anchorHidden,instant:N!=="none"?"tracking-cursor":I}),[D,z.side,z.align,z.anchorHidden,N,I]),H=O0(t,j,{styles:z.positionerStyles,transitionStatus:V,props:E,refs:[n,R.useStateSetter("positionerElement")],hidden:!A,inert:!D||N==="both"||P});return g.jsx(QO.Provider,{value:z,children:H})}),x7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=qh(),{side:f,align:d}=y7(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),S=c.useState("floatingRootContext"),k=c.useState("disabled"),T=c.useState("closeDelay");Ro({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),CA(S,{enabled:!k,closeDelay:T});const C=c.useStateSetter("popupElement");return dn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,C],props:[y0,y,Ah(b),l],stateAttributesMapping:k_})}),k7=v.createContext(null),S7={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},JO=v.createContext(null);function eI(e){const t=v.use(JO);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function tI({children:e,placement:t=Mh,offset:n=8,openDelay:r=u5,closeDelay:s=Dh,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:f=!1,onOpenChange:d,onOpenChangeComplete:h}){const m=v.use(k7),b=v.use(Up),y=a||b,S=m?.open??r,k=m?.close??s,T=v.useRef(null),C=v.useMemo(()=>({close:()=>{T.current?.close()}}),[]),[E,R]=v.useState(),_=(A,N)=>{d?.(A,N),N.isCanceled||R(A?N.trigger?.id:void 0)},D=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,openTriggerId:E,placement:t,sameAxisOnly:f,scrollDismissHandle:C,triggerCloseDelay:k,triggerDelay:S}),[y,b,n,E,t,f,C,k,S]);return g.jsx(JO.Provider,{value:D,children:g.jsx(u7,{actionsRef:T,defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:_,onOpenChangeComplete:h,open:c,children:e})})}function nI({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=eI("Tooltip.Trigger");return g.jsx(m7,{...n,closeDelay:s,delay:a,disabled:r,ref:t,render:e})}function rI({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,openTriggerId:f,placement:d,sameAxisOnly:h,scrollDismissHandle:m}=eI("Tooltip.Popup"),b=ma(),y=yO(m,f),{side:S,align:k,sideOffset:T,alignOffset:C,collisionAvoidance:E,positionMethod:R}=Lh(d,c,h),_=Oh(sF),D=Dt(I0,cN,oF,S7.base,Nh);return l?null:g.jsx(b7,{container:b??void 0,children:g.jsx(v7,{align:k,alignOffset:C,anchor:t,className:_.className,collisionAvoidance:E,collisionPadding:8,positionMethod:R,side:S,sideOffset:T,style:_.style,children:g.jsx(x7,{"aria-label":n,className:D.className,"data-component":"tooltip-popup",ref:y,role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?D.style:{...D.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function w7({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(rI,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function rv({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:f,"aria-label":d,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:S,onOpenChangeComplete:k,ref:T,...C}){const E=v.Children.only(e);return v.isValidElement(E)?g.jsxs(tI,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:S,onOpenChangeComplete:k,open:f,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(nI,{...C,ref:T,children:E}),g.jsx(rI,{ariaLabel:d,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=tI,e.Trigger=nI,e.Popup=w7})(rv||(rv={}));const E7="ui-menu",K0="ui-menu__backdrop",T7="ui-menu__list",C7="ui-menu__content",R7="ui-menu__drop-indicator-slot",_7="ui-menu__layout",iI="ui-menu__body-scroll",A7="ui-menu__header",N7="ui-menu__footer",O7="ui-menu__attachment",I7="ui-menu__row",M7="ui-menu__item-left",D7="ui-menu__item-content",L7="ui-menu__item-right",j7="ui-menu__item-wrapper",z7="ui-menu__item-title",P7="ui-menu__item-description",$7="ui-menu__text-wrapper",F7="ui-menu__title",B7="ui-menu__subtitle",U7="ui-menu__search-row",H7="ui-menu__section",q7="ui-menu__section-title",V7="ui-menu__section-text-action",G7="ui-menu__virtualized-section-divider",W7="ui-menu__submenu-trigger",K7="ui-menu__submenu-right-section",Y7="ui-menu__toggle-row",X7="ui-menu__tooltip",Z7="ui-menu__empty",Q7="ui-menu__loading",J7="ui-menu__loading-spinner",eU="ui-menu__virtualized-row",tU="ui-menu__virtualized-scroller";function Xt(e,t,n={}){return qt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function Y0({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[R8(t),a],Xt(E7,[C8(n,s),a],{className:e,style:r})}function sI(e){return Xt(K0,_8(),{style:e})}function X0(e=!1,t){return Xt(T7,[L8(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function Z0(e){return Xt(C7,[A8(),e])}function nU(){return Xt(R7,N8())}function Q0(e,t=!1,n){return Xt(_7,[O8(t),n],{style:e})}function rU(){return Xt(O7,I8())}function J0(){return Xt(A7,M8())}function ex(){return Xt(N7,D8())}function tx(e={},t){return Xt(I7,[{"ui--default-marker":"ui--default-marker",$$css:!0},G0(e),t],{className:e.className})}function iU(e={},t){return Xt(Y7,[G0(e),e.disabled&&$8(),t],{className:e.className})}function sU(e={}){return Xt(W7,G0(e),{className:e.className})}function oU(e={},t){return Xt(M7,[F8(e),t])}function aU(e){return Xt(D7,[B8(),e])}function lU(e={},t){return Xt(L7,[U8(e),t])}function nx(){return Xt(j7,q8())}function rx(){return Xt(z7,V8())}function ix(){return Xt(P7,G8())}function uU(e){return Xt($7,W8(e))}function cU(e){return Xt(F7,K8(e))}function fU({inline:e,wrap:t}){return Xt(B7,Y8({inline:e,wrap:t}))}function dU(e,t){return Xt(U7,[X8(),t],{className:e})}function pU(e){return Xt(H7,[Z8(),e])}function oI(e,t){return Xt(q7,[Q8(e),t])}function hU(){return Xt(V7,J8())}function mU(){return Xt(G7,e7())}function gU(){return Xt(K7,H8())}function bU(e,t){return Xt(Z7,[t7(e),t])}function yU(){return Xt(Q7,n7())}function vU(){return Xt(eU,j8())}function xU(){return Xt(tU,z8())}const kU=Xt(J7,r7()).className,Gp="submenuOpenChange",sx=v.createContext(null);function ox(e){return Math.max(e,Dh)}function ax(){return v.use(sx)}function lx({children:e,layerNodeId:t,placement:n="right-start"}){const r=Ao(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const f=d=>{d.parentId===t&&a(h=>{const m=new Set(h);return d.isOpen?m.add(d.nodeId):m.delete(d.nodeId),m})};return r.events.on(Gp,f),()=>{r.events.off(Gp,f)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(sx.Provider,{value:c,children:g.jsx(kc,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function SU({content:e,surfaceStyle:t}){return g.jsx(kc.Popup,{surfaceClassName:X7,surfaceStyle:[W0(),t],children:typeof e=="function"?e():e})}function aI({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(sx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(kc.Trigger,{closeDelay:ox(a),content:g.jsx(SU,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function wU(e,t){const n=Ao(),r=_o();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(Gp,s),()=>{t&&n.events.emit(Gp,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function ef({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return ax()!=null?g.jsx(aI,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx(bO,{closeDelay:ox(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[W0(),c],children:e}):g.jsx(rv,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Il({children:e,disabled:t=!1,leading:n,trailing:r,rightFallback:s,trailingAccessory:a,trailingHidden:l=!1,wideLeft:c=!1,leadingStyle:f,contentStyle:d,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=oU({wideLeft:c},f),S=aU(d),k=lU({disabled:t,trailingHidden:l},h);return g.jsxs(Ms,{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:S.className,style:S.style,"data-component":"menu-item-content",children:e}),b?g.jsxs("span",{className:k.className,style:k.style,"data-component":"menu-item-right",children:[m,a]}):null]})}const lI=v.createContext(!1);function tf(){return v.useContext(lI)}function ux(e,t,n){const{searchValue:r}=Jc(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const EU=qO("@@menu-item-noop"),TU=new EU({}),uI=v.createContext(null);function CU(){return v.useContext(uI)}function cI({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return ux(s,n,"LegacyMenu.Item")?g.jsx(fI,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function fI({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:f,onKeyDown:d,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:S=0,tooltipCloseDelay:k=0,tooltipSurface:T="default",closeOnSelect:C,description:E,rootStyle:R,leadingStyle:_,contentStyle:D,trailingStyle:A,variant:N="default",trailingVisibility:P="always",selected:$=!1,radioChecked:I,indent:V=!1,wideLeftSection:B=!1,draggable:z,ref:j,itemLabel:H,referenceRef:q,itemPropsTransform:K,trailingAccessory:U,contextPart:Y}){const{activeIndexStore:O,shouldAllowPointerInteraction:F,closeMenuLayersOnSelect:G,setIsOpen:L,getItemProps:X,closeOnSelect:te,virtualFocus:J,activeDescendantIdPrefix:le}=Jc(Y),oe=tf(),ue=Zc(),xe=Mi(),ye=ue==="body",pe=C??te??!0,{ref:me,index:ke}=zh({label:H||null}),Se=Hh(O,ke),[Te,ve]=v.useState(!1);ax();const Ie=v.useRef(null),_e=v.useId(),je=z!=null,We=z?.mode==="pointer",Ce=v.useSyncExternalStore(hi.subscribe,hi.isDragActive,hi.isDragActive),$e=v.useRef(null),se=v.useRef(null),Ee=v.useRef(null),Q=v.useRef(null),ee=v.useRef(!1),[be,Ne]=v.useState(null),{ref:Ye,isDragging:at}=S8({id:z?.id??`menu-item-${_e}`,data:z?.data??TU,disabled:!je||We||(z?.disabled??!1),dragImageOffset:z?.dragImageOffset,onDragStart:z?.onDragStart,onDragEnd:z?.onDragEnd}),ft=Gc([me,q,j,je&&!We?Ye:null]),nt=v.useCallback(tt=>{Ie.current=tt},[]),vt=v.useMemo(()=>({setSubMenuOpen:ve,isSubMenuOpen:Te,registerSubMenuOpener:nt}),[Te,nt]),St=GO(T);v.useEffect(()=>()=>{$e.current?.(),Ee.current!=null&&cancelAnimationFrame(Ee.current)},[]);const et=v.useCallback(()=>{Ee.current=null;const tt=se.current,Ut=Q.current;!tt||!Ut||(tt.style.transform=`translate3d(${Ut.x+8}px, ${Ut.y+8}px, 0)`)},[]),Qe=v.useCallback(tt=>{Q.current=tt,Ee.current==null&&(Ee.current=requestAnimationFrame(et))},[et]),Pe=v.useCallback(tt=>{se.current=tt,et()},[et]),pt=()=>{if(a)return;const tt={defaultPrevented:!1,preventDefault:()=>{tt.defaultPrevented=!0}};f?.(tt),pe&&!tt.defaultPrevented&&G(L)},lt=tt=>{if(ee.current){ee.current=!1,tt.preventDefault(),tt.stopPropagation();return}if(!F(tt.nativeEvent)){tt.preventDefault(),tt.stopPropagation();return}pt()},ut=v.useCallback(tt=>{if(!F(tt.nativeEvent)){tt.preventDefault(),tt.stopPropagation();return}if(l?.(tt),!tt.defaultPrevented){if(We&&z!=null&&!z.disabled&&tt.button===0){$e.current?.();const Ut=hi.getInstance(),ot=tt.currentTarget,Sn={clientX:tt.clientX,clientY:tt.clientY,isDragging:!1},Jn=()=>{document.removeEventListener("mousemove",ar,!0),document.removeEventListener("mouseup",Xn,!0),Ee.current!=null&&(cancelAnimationFrame(Ee.current),Ee.current=null),Q.current=null,$e.current=null,Ut.clearData(),setTimeout(()=>{ee.current=!1},0)},ar=yn=>{const Fr=yn.clientX-Sn.clientX,Li=yn.clientY-Sn.clientY;if(!(!Sn.isDragging&&Math.hypot(Fr,Li)<4)){if(!Sn.isDragging){Sn.isDragging=!0,ee.current=!0,Ut.setData(z.data);const $n=ot.getBoundingClientRect().width;Qe({x:yn.clientX,y:yn.clientY}),Ne($n),z.onPointerDragStart?.(yn)}yn.preventDefault(),Qe({x:yn.clientX,y:yn.clientY}),z.onPointerDragMove?.(yn)}},Xn=yn=>{if(!Sn.isDragging){Jn();return}yn.preventDefault(),Ne(null),z.onPointerDragEnd?.(yn),Jn()};$e.current=Jn,document.addEventListener("mousemove",ar,!0),document.addEventListener("mouseup",Xn,!0)}J&&!je&&tt.preventDefault()}},[z,je,We,l,Qe,F,J]),Ge=v.useCallback(tt=>{if(!F(tt.nativeEvent)){tt.preventDefault(),tt.stopPropagation();return}c?.(tt)},[c,F]),Ze=tt=>{a||(d?.(tt),!tt.defaultPrevented&&((tt.key==="Enter"||tt.key===" ")&&(tt.preventDefault(),tt.stopPropagation(),pt()),Hl(tt.key,xe)==="end"&&Ie.current&&(tt.preventDefault(),tt.stopPropagation(),Ie.current())))},Z=X({...Qc(le,ke),onClick:lt,onKeyDown:Ze,onMouseDown:ut,onAuxClick:Ge}),de=K?.(Z)??Z,Oe=m!=null?g.jsx(uI.Provider,{value:vt,children:m}):void 0,Xe=nx(),Ct=rx(),kt=ix(),He=E!=null?g.jsxs("div",{className:Xe.className,style:Xe.style,children:[g.jsx("div",{className:Ct.className,style:Ct.style,children:e}),g.jsx("div",{className:kt.className,style:kt.style,"data-component":"menu-item-description",children:E})]}):e,Fe=y||Ce||Te,Le=P==="focused"&&(Ce||!Se),Me=tx({disabled:a,expanded:r===!0,focused:!Ce&&Se,indent:V,inSubmenu:oe,selected:$,variant:N},R),st={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:We?!1:void 0,"data-disabled":a||void 0,"data-focused":!Ce&&Se?!0:void 0,"data-menu-draggable":je||void 0,"data-selected":$||void 0,"data-has-description":E!=null||void 0,"data-variant":N!=="default"?N:void 0,"data-indent":V||void 0,"data-wide-left":B||void 0,"data-dragging":at||be!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Ul]:ue,className:Me.className,style:Me.style,...de},_t={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},gn=be!=null&&z?.preview!=null?vi.createPortal(g.jsx("div",{"aria-hidden":"true",ref:Pe,className:_t.className,style:{..._t.style,width:be},children:z.preview}),document.body):null,bn=ye?g.jsxs("li",{ref:ft,...st,children:[g.jsx(Il,{disabled:a,leading:h,trailing:Oe,trailingAccessory:U,trailingHidden:Le,wideLeft:B,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),gn]}):g.jsxs("div",{ref:ft,...st,children:[g.jsx(Il,{disabled:a,leading:h,trailing:Oe,trailingAccessory:U,trailingHidden:Le,wideLeft:B,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),gn]});return b!=null?g.jsx(ef,{closeDelay:k,content:Fe?null:b,disabled:Fe,openDelay:S,surfaceStyle:St,children:bn}):bn}const dI=v.createContext(null);function pI(e){const t=v.useContext(dI);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function RU({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,f=h=>{l||a(h),r?.(h)},d=()=>f(!c);return g.jsx(dI.Provider,{value:{expanded:c,setExpanded:f,toggle:d},children:e})}function _U({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:f,setExpanded:d,toggle:h}=pI("LegacyMenu.ExpandableSectionTrigger"),m=Mi(),b=typeof n=="function"?n(f):n,y=S=>{const k=Hl(S.key,m);if(k==="end"&&!f){S.preventDefault(),S.stopPropagation(),d(!0);return}k==="start"&&f&&(S.preventDefault(),S.stopPropagation(),d(!1))};return g.jsx(cI,{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 AU({children:e}){const{expanded:t}=pI("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function NU({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return ux(s,n,"LegacyMenu.CheckboxItem")?g.jsx(OU,{...r,itemLabel:s,children:e}):null}function OU({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:f,tooltipOpenDelay:d=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:S,contentStyle:k,trailingStyle:T}){const{activeIndexStore:C,shouldAllowPointerInteraction:E,closeMenuLayersOnSelect:R,getItemProps:_,setIsOpen:D,closeOnSelect:A,activeDescendantIdPrefix:N}=Jc("LegacyMenu.CheckboxItem"),P=tf(),$=Zc(),I=$==="body",V=b??A??!1,[B,z]=v.useState(r),j=n!==void 0,H=j?n:B,{ref:q,index:K}=zh({label:y||null}),U=Hh(C,K),Y=ax(),O=GO(m),F=v.useCallback(()=>{if(a)return;const Te=!H;j||z(Te);const ve={defaultPrevented:!1,preventDefault:()=>{ve.defaultPrevented=!0}};s?.(Te,ve),V&&!ve.defaultPrevented&&R(D)},[a,H,j,s,V,D,R]),G=v.useCallback(Te=>{if(!E(Te.nativeEvent)){Te.preventDefault(),Te.stopPropagation();return}Te.preventDefault(),Te.stopPropagation(),F()},[F,E]),L=v.useCallback(Te=>{a||(Te.key==="Enter"||Te.key===" ")&&(Te.preventDefault(),Te.stopPropagation(),F())},[a,F]),X=_({...Qc(N,K),onClick:G,onKeyDown:L}),te=c!=null,J=tx({disabled:a,focused:U,inSubmenu:P},S),le={role:"menuitemcheckbox","aria-checked":H,tabIndex:U?0:-1,"aria-disabled":a||void 0,"data-checked":H||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":U||void 0,"data-has-description":te||void 0,...t?{"data-testid":t}:{},[Ul]:$,className:J.className,style:J.style,...X},oe=g.jsx(VA,{checked:H,disabled:a}),ue=nx(),xe=rx(),ye=ix(),pe=te?g.jsxs("div",{className:ue.className,style:ue.style,children:[g.jsx("div",{className:xe.className,style:xe.style,children:e}),g.jsx("div",{className:ye.className,style:ye.style,"data-component":"menu-item-description",children:c})]}):e,me=g.jsx(Il,{disabled:a,leading:oe,trailing:l,contentStyle:k,trailingStyle:T,children:pe}),ke=f!=null&&Y!=null,Se=I?g.jsx("li",{ref:q,...le,children:me}):g.jsx("div",{ref:q,...le,children:me});return ke?g.jsx(aI,{closeDelay:h,content:f,openDelay:d,surfaceStyle:O,children:Se}):f!=null?g.jsx(bO,{content:f,placement:"right",offset:6,openDelay:d,closeDelay:ox(h),sameAxisOnly:!0,surfaceStyle:[W0(),O],children:Se}):Se}function Xb(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 IU(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 MU(e){const{accept:t,disabled:n=!1,acceptData:r,acceptNativeTypes:s,onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f}=e,d=v.useRef(null),h=v.useRef(null),m=v.useRef(0),b=v.useRef(null),[y,S]=v.useState(!1),[k,T]=v.useState(!1),C=v.useRef(y);C.current=y;const E=v.useCallback(()=>{m.current=0,S(!1),T(!1)},[]),R=v.useCallback(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)},[]);v.useEffect(()=>{if(!y)return;const $=h.current?.ownerDocument??document,I=()=>{R(),E()};return $.addEventListener("mousemove",I,!0),()=>{$.removeEventListener("mousemove",I,!0)}},[y,R,E]);const _=v.useRef({onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f});_.current={onDragEnter:a,onDragOver:l,onDragLeave:c,onDrop:f};const D=v.useRef(s);D.current=s;const A=v.useRef(Array.isArray(t)?t:[t]);A.current=Array.isArray(t)?t:[t];const N=v.useRef(r);N.current=r;const P=v.useCallback($=>{if(h.current=$,d.current&&(d.current(),d.current=null),m.current=0,$!==null&&(S(!1),T(!1)),!$||n)return;const I=hi.getInstance(),V=()=>{if(n)return null;const F=I.getValidatedData(A.current);return F&&(N.current?.(F)??!0)?F:null},B=F=>{if(m.current++,m.current===1){S(!0);const G=V();T(G!==null||!n&&Xb(F,D.current)),_.current.onDragEnter?.(F,G)}},z=F=>{m.current=Math.max(0,m.current-1),m.current===0&&(R(),E(),_.current.onDragLeave?.(F))},j=F=>{const G=V(),L=G!==null,X=!L&&!n&&Xb(F,D.current);(L||X)&&(F.preventDefault(),F.dataTransfer&&(F.dataTransfer.dropEffect=L?"move":"copy"),m.current===0&&(m.current=1,S(!0),T(!0),_.current.onDragEnter?.(F,G)),_.current.onDragOver&&b.current===null&&(b.current=requestAnimationFrame(()=>{b.current=null,_.current.onDragOver?.(F,G)})))},H=F=>{F.preventDefault(),R(),E();const G=V();if(G){const{onDrop:L}=_.current;L&&(L(F,G),F.stopPropagation())}else if(Xb(F,D.current)){const{onDrop:L}=_.current;L&&(L(F,null),F.stopPropagation())}};$.addEventListener("dragenter",B),$.addEventListener("dragleave",z),$.addEventListener("dragover",j),$.addEventListener("drop",H);const q=$.ownerDocument,K=()=>{(m.current!==0||C.current)&&(R(),E())},U=()=>K(),Y=()=>K(),O=F=>{IU(F,q)&&K()};q.addEventListener("drop",U,!0),q.addEventListener("dragend",Y,!0),q.addEventListener("dragleave",O,!0),d.current=()=>{$.removeEventListener("dragenter",B),$.removeEventListener("dragleave",z),$.removeEventListener("dragover",j),$.removeEventListener("drop",H),q.removeEventListener("drop",U,!0),q.removeEventListener("dragend",Y,!0),q.removeEventListener("dragleave",O,!0),b.current!==null&&(cancelAnimationFrame(b.current),b.current=null)}},[n,E,R]);return v.useEffect(()=>()=>{d.current&&(d.current(),d.current=null)},[]),{ref:P,isOver:y,canDrop:k,isDropBlocked:y&&!k}}function DU(){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 LU=300,hI=v.createContext(null);function Wp({children:e}){const[t,n]=v.useState(null),r=DU(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(f=>f===c?null:f)},LU)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(hI.Provider,{value:l,children:e})}function jU(e,t){const n=v.useContext(hI),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 Vh=v.createContext(null);function Gh(e){const t=v.useContext(Vh);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function zU(){return Gh("LegacyMenu.SubMenu.useContext")}function mI(){const e=v.useContext(Vh)!=null,{setIsOpen:t,dismissCauseRef:n}=HO();return v.useCallback(r=>{n.current="selection",r(!1),e&&t(!1)},[e,t,n])}const PU=qO("@@menu-content-noop");function $U({children:e,header:t,footer:n,attachment:r,"aria-label":s,popupRole:a="menu","data-testid":l,className:c,surfaceStyle:f,contentStyle:d,layoutStyle:h,listStyle:m,scrollAreaStyles:b,style:y,dropIndicatorTop:S,maxHeight:k,width:T,minWidth:C,maxWidth:E,tooltipPlacement:R,size:_,backdrop:D,adaptiveHeight:A=!0,returnFocus:N,onKeyDownCapture:P,onBodyPointerEnter:$,droppable:I,ref:V}){const B=ha(),{isOpen:z,isMounted:j,activeIndex:H,setActiveIndex:q,setIsOpen:K,markKeyboardNavigation:U,markPointerNavigation:Y,virtualFocus:O,searchValue:F,setSearchValue:G,hasSearchInput:L,searchInputRef:X,enableHover:te,closeOnSelect:J,nodeId:le,activeDescendantIdPrefix:oe,listRef:ue,labelsRef:xe,refs:ye,floatingStyles:pe,middlewareData:me,transitionStyles:ke,context:Se,getFloatingProps:Te,getItemProps:ve,dismissCauseRef:Ie,returnFocusOnSelect:_e,returnFocus:je,shouldAllowPointerInteraction:We}=ba("LegacyMenu.Content"),Ce=mI(),$e=D??!te,[se,Ee]=v.useState(null),Q=O&&!L,ee=Uh(),be=v.useSyncExternalStore(hi.subscribe,hi.isDragActive,hi.isDragActive),Ne=Se.placement.startsWith("top"),Ye=Ne&&j?me.bottomAnchor?.bottom??null:null,at=v.useRef(null),ft=v.useRef(H),nt=v.useRef(!1);v.useLayoutEffect(()=>{ft.current=H},[H]),v.useLayoutEffect(()=>{if(!z){nt.current=!1;return}const ot=Xn=>{DO(Xn)&&(nt.current=!0,U())},Sn=Xn=>{const yn=PO(Xn,ue);yn==null||yn===ft.current||q(yn)},Jn=Xn=>{const yn=nt.current;nt.current=!1,Y(),yn&&Sn(Xn.target)};document.addEventListener("keydown",ot,!0);const ar=e8(se,Jn);return()=>{document.removeEventListener("keydown",ot,!0),ar()}},[z,ue,U,Y,se,q]),v.useLayoutEffect(()=>{if(!z){at.current=null;return}if(!O||H==null||at.current===H||(at.current=H,!nt.current))return;const ot=ue.current[H]??null;if(!ot)return;const Sn=requestAnimationFrame(()=>{ot.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(Sn)},[z,O,H,ue]);const vt=v.useCallback(ot=>{if(ot.key==="Escape"){Ie.current="escape";return}if(ot.ctrlKey&&!ot.metaKey){const Jn=ot.key.toLowerCase(),ar=Jn==="n"||Jn==="j";if(ar||(Jn==="p"||Jn==="k")){ot.preventDefault();const yn=ue.current,Fr=yn.length;if(Fr===0)return;const Li=ft.current,$n=ar?1:-1;let vr=Li==null?ar?0:Fr-1:Li+$n;for(;vr>=0&&vr<Fr;){if(yn[vr]!=null){q(vr);return}vr+=$n}return}}if(!L)return;if(ot.key.length===1&&!ot.ctrlKey&&!ot.metaKey&&!ot.altKey){if(document.activeElement===X.current)return;ot.preventDefault(),ot.stopPropagation(),X.current?.focus(),G(F+ot.key),zO(ue,"body",q)}},[Ie,L,ue,X,F,q,G]),St=v.useCallback(ot=>{ee(ot.nativeEvent)&&(Ie.current="backdrop",K(!1))},[Ie,K,ee]),et=v.useCallback(ot=>{if(ot.stopPropagation(),!ee(ot.nativeEvent))return;ot.preventDefault(),Ie.current="backdrop",K(!1);const ar=document.elementsFromPoint(ot.clientX,ot.clientY).find(Xn=>!Xn.classList.contains(K0));ar&&ar.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:ot.clientX,clientY:ot.clientY,screenX:ot.screenX,screenY:ot.screenY,button:ot.button,buttons:ot.buttons,ctrlKey:ot.ctrlKey,shiftKey:ot.shiftKey,altKey:ot.altKey,metaKey:ot.metaKey}))},[Ie,K,ee]),Qe=I!=null,{ref:Pe,isOver:pt,isDropBlocked:lt}=MU({accept:I?.accept??PU,disabled:!Qe||(I?.disabled??!1),onDragEnter:I?.onDragEnter,onDragOver:I?.onDragOver,onDragLeave:I?.onDragLeave,onDrop:I?.onDrop}),ut=Gc([ye.setFloating,Ee,V,Qe?Pe:null]),Ge=ma(),{zIndex:Ze,portalLayerStyles:Z}=Fl("popover",j);if(!j)return null;const de=_??B?.menuSize??"sm",Oe={...pe,...ke,...Z,...Ze!==null?{zIndex:Ze}:{},...y,...S!==void 0?{"--ui-menu-drop-indicator-top":`${S}px`}:{},...H0({width:T,minWidth:C,maxWidth:E}),...Ne&&Ye!==null?{top:"auto",bottom:Ye}:{},...q0({isOpen:z,isPositioned:Se.isPositioned})},Xe={...Z,...Ze!==null?{zIndex:Ze-1}:{},pointerEvents:Qe&&be?"none":void 0},Ct=A?UO(k):k,kt=r!=null,He=a==="dialog",Fe=sI(Xe),Le=Y0({className:c,hasDropIndicator:S!==void 0,size:de,surfaceStyle:f,style:kt&&Ct!==void 0?{...Oe,maxHeight:Ct}:Oe,hasAttachment:kt}),Me=Q0(kt||Ct===void 0?void 0:{maxHeight:Ct},kt,h),st=J0(),_t=Z0(d),gn=X0(!1,m),bn=ex(),tt=rU(),Ut=nU();return g.jsxs(L0,{...Ge?{root:Ge}:{},children:[$e&&g.jsx("div",{className:Fe.className,style:Fe.style,"data-component":"menu-backdrop",onClick:St,onContextMenu:et,role:"none"}),g.jsx(z0,{context:Se,initialFocus:Q?-1:X,returnFocus:N??je??(Ie.current!=="backdrop"&&(Ie.current!=="selection"||_e)),modal:!Q,children:g.jsxs("div",{ref:ut,className:Le.className,style:Le.style,tabIndex:-1,"data-component":"menu-popup","data-size":de,"data-drop-active":Qe&&pt&&!lt?"":void 0,"data-drop-blocked":Qe&<?"":void 0,...l?{"data-testid":l}:{},...kt?{"aria-label":s??"Menu"}:{},...Te({...He?{role:"dialog","aria-label":s??"Menu","aria-labelledby":void 0,"aria-orientation":void 0}:{},onKeyDown:vt,onKeyDownCapture:P,onMouseDown:O?ot=>{ot.stopPropagation()}:void 0}),children:[Qe&&I?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Ut.className,style:Ut.style,children:I.indicator}):null,g.jsx(Ms,{menuSize:de,children:g.jsx(vO,{dismiss:!z,children:g.jsx(lx,{layerNodeId:le,placement:R,children:g.jsx(KO,{activeIndex:H,setIsOpen:K,getItemProps:ve,searchValue:F,closeOnSelect:J,virtualFocus:O,activeDescendantIdPrefix:oe,shouldAllowPointerInteraction:We,closeMenuLayersOnSelect:Ce,children:g.jsx(Wp,{children:g.jsxs(ON,{elementsRef:ue,labelsRef:xe,children:[g.jsxs("div",{className:Me.className,style:Me.style,"data-component":"menu-layout",...kt||He?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:st.className,style:st.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:t})}):null,g.jsx(Rl,{className:iI,rootStyle:[VO(),b?.root],viewportStyle:b?.viewport,contentStyle:b?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:_t.className,style:_t.style,"data-component":"menu-content",onPointerEnter:$,children:g.jsx("ul",{role:"presentation",className:gn.className,style:gn.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:bn.className,style:bn.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:tt.className,style:tt.style,"data-component":"menu-attachment",children:g.jsx("div",{className:_t.className,style:_t.style,"data-component":"menu-content",children:g.jsx(Ts,{value:"footer",children:r})})}):null]})})})})})})]})})]})}function FU({children:e,indent:t=!1,rootStyle:n}){const r=bU(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function gI(e){const t=v.useContext(Vh),n=v.useContext(V0),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function BU(){return gI("LegacyMenu.useLayerContext")}function UU({children:e}){const t=yU();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(Pt,{name:"loading",size:"base",modifier:"spin",className:kU}),g.jsx("span",{children:e??"Loading..."})]})}function HU({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const d=Zc()==="body",h=tf(),m=Mi(),{searchValue:b,setSearchValue:y,searchInputRef:S,activeIndex:k,setActiveIndex:T,listRef:C,setHasSearchInput:E,activeDescendantIdPrefix:R}=gI("LegacyMenu.SearchInput"),_=v.useRef(null),D=a!==void 0&&l!==void 0,N=!D||c||h?S:_,P=D?a:b;v.useEffect(()=>{if(!D)return E(!0),()=>E(!1)},[D,E]),v.useLayoutEffect(()=>{if(D&&!c)return;const z=S.current;if(!z)return;z.focus({preventScroll:!0});const j=requestAnimationFrame(()=>{document.activeElement!==z&&z.focus({preventScroll:!0})});return()=>cancelAnimationFrame(j)},[D,c,S]);const $=z=>{D?l(z.target.value):(y(z.target.value),zO(C,"body",T),l?.(z.target.value))},I=z=>{if($0(z))return;if(z.ctrlKey&&!z.metaKey){const U=z.key.toLowerCase();if(U==="n"||U==="p"||U==="j"||U==="k"){z.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(z.key)&&!z.metaKey&&!z.ctrlKey&&!z.altKey&&z.stopPropagation(),D&&z.key==="Enter"){z.preventDefault(),z.stopPropagation();return}if(!D&&z.key==="Enter"&&k!=null){z.preventDefault();const U=C.current[k];U&&(U.click(),S.current?.focus())}if(z.key!=="ArrowLeft"&&z.key!=="ArrowRight")return;const H=z.currentTarget,q=Hl(z.key,m)==="end"?H.value.length:0;if(!(H.selectionStart===q&&H.selectionEnd===q)){z.stopPropagation();return}t8({event:z,direction:z.key,activeIndex:k,listRef:C,restoreFocus:()=>S.current?.focus()})},V=dU(n,r),B=g.jsx(Xc,{ref:N,type:"text",variant:"unfilled",size:"md",inputGroupRootStyle:s,value:P,onChange:$,onKeyDown:I,placeholder:e,"aria-label":t??"Search menu items","aria-activedescendant":LO(R,k)});return d?g.jsx("li",{className:V.className,style:V.style,"data-component":"menu-search-row",role:"none",children:B}):g.jsx("div",{className:V.className,style:V.style,"data-component":"menu-search-row",role:"none",children:B})}function qU(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 VU({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:f,titleStyle:d}){const h=v.useRef(null),m=qU(h),b=pU(f),y=s!=null||a!=null,S=oI(y,d),k=hU(),T=t!=null&&t!==!1?g.jsxs("div",{role:"presentation",className:S.className,style:S.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:k.className,style:k.style,onClick:s.onClick,children:s.label}):null]}):null,C=T!=null&&l!=null?g.jsx(ef,{content:l,openDelay:0,closeDelay:0,children:T}):T;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:[C,e]})}function bI({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:f=!1,onOpenChange:d,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:S=!1,focusItemOnOpen:k}){const T=M0(),C=Mi(),[E,R]=Ol(c,f,d,"LegacyMenu.SubMenu"),_=c!==void 0,D=t==="hover"&&(!_||r==null),[A,N]=v.useState(null),{focusItemOnHoverEnabled:P,markKeyboardNavigation:$,markPointerNavigation:I,resetFocusItemOnHover:V}=FO(),[B,z]=v.useState(""),[j,H]=v.useState(!1),q=v.useRef([]),K=v.useRef([]),U=v.useRef(null),Y=v.useId(),O=v.useRef(null),F=v.useRef(new Set);wU(T,E);const G=CU();v.useEffect(()=>{G&&G.setSubMenuOpen(E)},[E,G]);const L=v.useRef(E);v.useEffect(()=>{const Qe=L.current;L.current=E,Qe!==E&&(z(""),E||N(null),V())},[E,V]);const X=v.useCallback(Qe=>{R(Qe)},[R]);v.useEffect(()=>{if(G)return G.registerSubMenuOpener(()=>X(!0)),()=>{G.registerSubMenuOpener(null)}},[G,X]);const te=v.useCallback((Qe,Pe,pt)=>{const lt=U.current;!Qe&&t==="hover"&&(pt==="hover"||pt==="safe-polygon")&&(m||lt?.value&<.ownerDocument.activeElement===lt)||X(Qe)},[m,X,t]),J=v.useCallback(()=>{X(!1)},[X]),oe=n??(t==="hover"?C==="rtl"?"left-start":"right-start":"bottom-start"),ue={mainAxis:-2,alignmentAxis:-2},pe=s??(a?ue:t==="hover"?ue:4),{refs:me,floatingStyles:ke,context:Se}=P0({nodeId:T,open:E,onOpenChange:te,placement:oe,middleware:[d0(pe),h0(),p0({crossAxis:oe.startsWith("left")||oe.startsWith("right")}),m0({padding:8,apply({availableWidth:Qe,availableHeight:Pe,elements:pt}){pt.floating.style.setProperty(BO,`${Math.max(0,Math.floor(Qe))}px`),pt.floating.style.setProperty(U0,`${Math.max(0,Math.floor(Pe))}px`)}})],whileElementsMounted:Rp,transform:!1});v.useLayoutEffect(()=>{const Qe=r?.current;Qe&&me.setReference(Qe)}),a8(D&&E&&!y,me.domReference);const{activeId:Te}=jU(T,E),ve=Te!=null?0:h??75,Ie=jN(Se,{enabled:D,delay:{open:ve},handleClose:KN({blockPointerEvents:!1,requireIntent:!1})}),_e=FN(Se,{enabled:t==="click"&&!_}),je=Uh(),We=BN(Se,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:je}),Ce=qN(Se,{role:"menu"}),$e=HN(Se,{listRef:q,activeIndex:A,onNavigate:N,nested:!0,rtl:C==="rtl",loop:!0,focusItemOnOpen:S?!1:k??!0,virtual:j||S,focusItemOnHover:P&&!S}),se=GN(Se,{listRef:K,activeIndex:A,onMatch:j?void 0:N,enabled:!j&&!S}),{getReferenceProps:Ee,getFloatingProps:Q,getItemProps:ee}=UN([Ie,_e,We,Ce,$e,se]),be=$O(ee,E),Ne=v.useCallback(Qe=>{const{role:Pe,...pt}=jO(Ee(Qe));return pt},[Ee]),Ye=v.useCallback(Qe=>{const Pe=F.current;return Pe.add(Qe),()=>{Pe.delete(Qe)}},[]),at=v.useCallback(()=>O.current!==null,[]),ft=v.useCallback(Qe=>{O.current=Qe;for(const Pe of F.current)Pe();r||me.setReference(Qe)},[r,me.setReference]),nt=v.useCallback(()=>({...Ne(),id:Y,ref:ft,"aria-haspopup":"menu","aria-expanded":E}),[Ne,ft,Y,E]),{isMounted:vt,styles:St}=VN(Se,{duration:{open:0,close:o8},initial:{opacity:0,transform:"scale(1)"}}),et=v.useMemo(()=>({isOpen:E,isMounted:vt,setIsOpen:X,closeFromKeyboard:J,activeIndex:A,setActiveIndex:N,markKeyboardNavigation:$,markPointerNavigation:I,trigger:t,closeOnSelect:l,nodeId:T,activeDescendantIdPrefix:j?T:void 0,listRef:q,labelsRef:K,searchInputRef:U,searchValue:B,setSearchValue:z,hasSearchInput:j,setHasSearchInput:H,triggerId:Y,subscribeTriggerElement:Ye,hasTriggerElement:at,refs:me,floatingStyles:ke,transitionStyles:St,context:Se,getReferenceProps:Ne,getFloatingProps:Q,getItemProps:be,getTriggerProps:nt,virtualFocus:S}),[E,vt,X,J,A,t,$,I,l,T,B,j,Y,Ye,at,S,me,ke,St,Se,Ne,Q,be,nt]);return g.jsx(D0,{id:T,children:g.jsx(Vh.Provider,{value:et,children:e})})}function GU({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndexStore:f,getItemProps:d,activeDescendantIdPrefix:h,shouldAllowPointerInteraction:m}=Jc("LegacyMenu.SubMenuTrigger"),b=Gh("LegacyMenu.SubMenuTrigger"),y=Zc(),S=Mi(),k=y==="body",T=n??(typeof e=="string"?e:""),{ref:C,index:E}=zh({label:T||null}),R=Hh(f,E),_=Gc([C,b.refs.setReference]),D=g.jsx(Pt,{name:"chevron-right",color:"tertiary"}),A=sU({disabled:t,expanded:b.isOpen,focused:R}),N={role:"menuitem","aria-haspopup":"menu","aria-expanded":b.isOpen,"data-component":"menu-submenu-trigger","data-expanded":b.isOpen||void 0,tabIndex:R?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":R||void 0,[Ul]:y,className:A.className,style:A.style,...b.getReferenceProps(d({...Qc(h,E),onMouseDown(I){m(I.nativeEvent)||(I.preventDefault(),I.stopPropagation())},onClick(I){if(!m(I.nativeEvent)){I.preventDefault(),I.stopPropagation();return}!t&&b.trigger==="hover"&&b.setIsOpen(!0)},onKeyDown(I){(Hl(I.key,S)==="end"||I.key==="Enter"||I.key===" ")&&!t&&(I.preventDefault(),I.stopPropagation(),b.setIsOpen(!0))}}))},P=gU(),$=g.jsx(Il,{disabled:t,leading:r,leadingStyle:s,contentStyle:l,trailing:a!=null?g.jsx("div",{className:P.className,style:P.style,"data-component":"menu-submenu-right-section",children:a}):void 0,rightFallback:D,trailingStyle:c,children:e});return k?g.jsx("li",{ref:_,...N,children:$}):g.jsx("div",{ref:_,...N,children:$})}function WU({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Gh("LegacyMenu.SubMenuItem"),c=Mi(),f=t??(typeof e=="string"?e:""),d=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&Hl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(Pt,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(fI,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:f,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:h,children:e})}function KU({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:f,contentStyle:d,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:S,size:k,contentPadding:T}){const C=ha(),E=Gh("LegacyMenu.SubMenuContent"),{shouldAllowPointerInteraction:R}=ba("LegacyMenu.SubMenuContent"),_=mI(),D=Mi(),A=ma(),{portalLayerStyles:N}=Fl("popover",E.isMounted),P=k??C?.menuSize??"sm",{virtualFocus:$}=E,I=v.useSyncExternalStore(E.subscribeTriggerElement,E.hasTriggerElement,()=>!1);if(!E.isMounted)return null;const V={...E.floatingStyles,...E.transitionStyles,...N,...H0({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...q0({isOpen:E.isOpen,isPositioned:E.context.isPositioned})},B=Y0({className:c,size:P,surfaceStyle:f,style:V}),z=Z0(d),j=X0(!1,h),H=UO(S),q=t!=null||n!=null,K=Q0(q?{maxHeight:H}:void 0),U=J0(),Y=ex(),O=T===void 0?z.style:{...z.style,padding:T,scrollPaddingBlock:T},F=X=>{X.stopPropagation()},G=I?E.triggerId:void 0,L=X=>{E.markPointerNavigation();const te=PO(X,E.listRef);if(te!=null&&te!==E.activeIndex&&E.setActiveIndex(te),!l||te==null)return;const J=E.searchInputRef.current;if(J==null)return;const le=J.ownerDocument.activeElement;le!==J&&(le instanceof HTMLInputElement||le instanceof HTMLTextAreaElement||J.focus({preventScroll:!0}))};return g.jsx(L0,{...A?{root:A}:{},children:g.jsx(z0,{context:E.context,disabled:$,initialFocus:E.hasSearchInput?E.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:E.trigger==="click",children:g.jsx("div",{ref:E.refs.setFloating,className:B.className,style:B.style,"data-component":"menu-popup","data-submenu":"","data-size":P,...s?{"data-testid":s}:{},...E.getFloatingProps({...G===void 0?{}:{"aria-labelledby":G},onClick:F,onPointerEnter:a,onMouseMove(X){L(X.target)},onPointerMove(X){L(X.target)},onKeyDown(X){if(DO(X)&&E.markKeyboardNavigation(),Hl(X.key,D)==="start"||X.key==="Escape"){X.preventDefault(),X.stopPropagation(),E.closeFromKeyboard();const te=E.refs.domReference.current;te instanceof HTMLElement&&te.focus()}}}),children:g.jsx(lI.Provider,{value:!0,children:g.jsx(Ms,{menuSize:P,children:g.jsx(lx,{layerNodeId:E.nodeId,children:g.jsx(KO,{activeIndex:E.activeIndex,setIsOpen:E.setIsOpen,getItemProps:E.getItemProps,searchValue:E.searchValue,closeOnSelect:E.closeOnSelect,virtualFocus:$,activeDescendantIdPrefix:E.activeDescendantIdPrefix,shouldAllowPointerInteraction:R,closeMenuLayersOnSelect:_,children:g.jsx(ON,{elementsRef:E.listRef,labelsRef:E.labelsRef,children:q?g.jsxs("div",{className:K.className,style:K.style,role:"menu","aria-label":r??"Submenu","data-component":"menu-layout",children:[t!=null?g.jsx("div",{className:U.className,style:U.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:t})}):null,g.jsx(Rl,{className:iI,rootStyle:VO(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:z.className,style:O,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:j.className,style:j.style,"data-component":"menu-list",children:g.jsx(Ts,{value:"body",children:g.jsx(Wp,{children:e})})})})}),n!=null?g.jsx("div",{className:Y.className,style:Y.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:n})}):null]}):g.jsx(Rl,{maxHeight:H,children:g.jsx("div",{className:z.className,style:O,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:j.className,style:j.style,"data-component":"menu-list",children:g.jsx(Ts,{value:"body",children:g.jsx(Wp,{children:e})})})})})})})})})})})})})}function YU({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return ux(s,n,"LegacyMenu.SwitchItem")?g.jsx(XU,{...r,itemLabel:s,children:e}):null}function XU({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:f,trailing:d,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:S,itemLabel:k}){const{activeIndexStore:T,shouldAllowPointerInteraction:C,closeMenuLayersOnSelect:E,getItemProps:R,setIsOpen:_,closeOnSelect:D,activeDescendantIdPrefix:A}=Jc("LegacyMenu.SwitchItem"),N=tf(),P=Zc(),$=P==="body",I=S??D??!1,[V,B]=v.useState(r),z=n!==void 0,j=z?n:V,{ref:H,index:q}=zh({label:k||null}),K=Hh(T,q),U=v.useCallback(()=>{if(a)return;const J=!j;z||B(J);const le={defaultPrevented:!1,preventDefault:()=>{le.defaultPrevented=!0}};s?.(J,le),I&&!le.defaultPrevented&&E(_)},[a,j,z,s,I,_,E]),Y=v.useCallback(J=>{if(!C(J.nativeEvent)){J.preventDefault(),J.stopPropagation();return}J.preventDefault(),J.stopPropagation(),U()},[U,C]),O=v.useCallback(J=>{a||(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.stopPropagation(),U())},[a,U]),F=R({...Qc(A,q),onClick:Y,onKeyDown:O}),G=iU({disabled:a,focused:K,inSubmenu:N},b),L={role:"menuitemcheckbox","aria-checked":j,tabIndex:K?0:-1,"aria-disabled":a||void 0,"data-checked":j||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":K||void 0,...t?{"data-testid":t}:{},[Ul]:P,className:G.className,style:G.style,...F},X=g.jsx(Il,{disabled:a,leading:c,leadingStyle:f,contentStyle:h,trailing:d,trailingStyle:m,trailingAccessory:g.jsx(N9,{checked:j,disabled:a,size:"sm",variant:l}),children:e}),te=$?g.jsx("li",{ref:H,...L,children:X}):g.jsx("div",{ref:H,...L,children:X});return y!=null?g.jsx(ef,{content:y,openDelay:0,closeDelay:0,children:te}):te}function ZU({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=uU(n),a=cU(n),l=fU({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Hp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Hp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const QU={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function JU({title:e,divider:t}){const n=oI(!1,QU.title),r=mU();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 Sc=typeof window<"u"?v.useLayoutEffect:v.useEffect;function CT(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function eH({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:f}=v.useMemo(()=>({styleHeight:CT(l?.height),styleWidth:CT(l?.width)}),[l?.height,l?.width]),[d,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&f!==void 0;return Sc(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const S of y){const{contentRect:k,target:T}=S;s===T&&h(C=>C.height===k.height&&C.width===k.width?C:{height:k.height,width:k.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,f]),v.useMemo(()=>({height:c??d.height,width:f??d.width}),[d,c,f])}function tH(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return Sc(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function Zb({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function xo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function cc(e,t){if(e===t)return!0;if(!!e!=!!t||(xo(e!==void 0),xo(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 yI({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);xo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function nH({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=yI({cachedBounds:t,itemCount:r,itemSize:s}),f=t.get(n),d=Math.max(0,Math.min(c-l,f.scrollOffset)),h=Math.max(0,f.scrollOffset-l+f.size);switch(e==="smart"&&(a>=h&&a<=d?e="auto":e="center"),e){case"start":return d;case"end":return h;case"center":return f.scrollOffset<=l/2?0:f.scrollOffset+f.size/2>=c-l/2?c-l:f.scrollOffset+f.size/2-l/2;default:return a>=h&&a<=d?a:a<h?h:d}}function RT({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,f=0,d=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,f=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),d=Math.min(r-1,c+s),l<0&&(l=0,c=-1,f=0,d=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:f,stopIndexOverscan:d}}function rH({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(xo(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 f=r.get(l-1);xo(f!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:f.scrollOffset+f.size,size:c})}}const a=r.get(s);return xo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function iH({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>rH({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function sH({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(xo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),xo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function oH({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:f,overscanCount:d}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:S,stopIndexOverscan:k}={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:T=n,width:C=n}=eH({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),E=v.useRef({height:0,width:0}),R=T,_=sH({containerSize:R,itemSize:c});v.useLayoutEffect(()=>{if(typeof f=="function"){const I=E.current;(I.height!==T||I.width!==C)&&(f({height:T,width:C},{...I}),I.height=T,I.width=C)}},[T,f,C]);const D=iH({itemCount:a,itemProps:l,itemSize:_}),A=v.useCallback(I=>D.get(I),[D]),N=v.useCallback(()=>yI({cachedBounds:D,itemCount:a,itemSize:_}),[D,a,_]),P=v.useCallback(I=>{const V=Zb({containerElement:e,direction:r,isRtl:s,scrollOffset:I});return RT({cachedBounds:D,containerScrollOffset:V,containerSize:R,itemCount:a,overscanCount:d})},[D,e,R,r,s,a,d]);Sc(()=>{const I=e?.scrollTop??0;m(P(I))},[e,r,P]),Sc(()=>{if(!e)return;const I=()=>{m(V=>{const{scrollLeft:B,scrollTop:z}=e,j=Zb({containerElement:e,direction:r,isRtl:s,scrollOffset:z}),H=RT({cachedBounds:D,containerScrollOffset:j,containerSize:R,itemCount:a,overscanCount:d});return cc(H,V)?V:H})};return e.addEventListener("scroll",I),()=>{e.removeEventListener("scroll",I)}},[D,e,R,r,a,d]);const $=tH(({align:I="auto",containerScrollOffset:V,index:B})=>{let z=nH({align:I,cachedBounds:D,containerScrollOffset:V,containerSize:R,index:B,itemCount:a,itemSize:_});if(e){if(z=Zb({containerElement:e,direction:r,isRtl:s,scrollOffset:z}),typeof e.scrollTo!="function"){const j=P(z);cc(h,j)||m(j)}return z}});return{getCellBounds:A,getEstimatedSize:N,scrollToIndex:$,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:k,stopIndexVisible:S}}function aH(e){return v.useMemo(()=>e,Object.values(e))}function lH(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return cc(n,a)&&cc(r,l)&&cc(s,c)}function uH(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const cH="data-react-window-index";function fH({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:f,rowHeight:d,rowProps:h,tagName:m="div",style:b,...y}){const S=aH(h),k=v.useMemo(()=>v.memo(c,lH),[c]),[T,C]=v.useState(null),E=uH(d),R=v.useMemo(()=>E?z=>d.getRowHeight(z)??d.getAverageRowHeight():d,[E,d]),{getCellBounds:_,getEstimatedSize:D,scrollToIndex:A,startIndexOverscan:N,startIndexVisible:P,stopIndexOverscan:$,stopIndexVisible:I}=oH({containerElement:T,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:f,itemProps:S,itemSize:R,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return T},scrollToRow({align:z="auto",behavior:j="auto",index:H}){const q=A({align:z,containerScrollOffset:T?.scrollTop??0,index:H});typeof T?.scrollTo=="function"&&T.scrollTo({behavior:j,top:q})}}),[T,A]),Sc(()=>{if(!T)return;const z=Array.from(T.children).filter((j,H)=>{if(j.hasAttribute("aria-hidden"))return!1;const q=`${N+H}`;return j.setAttribute(cH,q),!0});if(E)return d.observeRowElements(z)},[T,E,d,N,$]),v.useEffect(()=>{N>=0&&$>=0&&a&&a({startIndex:P,stopIndex:I},{startIndex:N,stopIndex:$})},[a,N,P,$,I]);const V=v.useMemo(()=>{const z=[];if(f>0)for(let j=N;j<=$;j++){const H=_(j);z.push(v.createElement(k,{...S,ariaAttributes:{"aria-posinset":j+1,"aria-setsize":f,role:"listitem"},key:j,index:j,style:{position:"absolute",left:0,transform:`translateY(${H.scrollOffset}px)`,height:E?void 0:H.size,width:"100%"}}))}return z},[k,_,E,f,S,N,$]),B=g.jsx("div",{"aria-hidden":!0,style:{height:D(),width:"100%",zIndex:-1}});return v.createElement(m,{role:"list",...y,className:t,ref:C,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},V,e,B)}const vI=v.createContext(null);function dH(e){const t=v.useContext(vI);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function pH({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(vI.Provider,{value:c,children:e})}const hH=4,_T="ui-menu--virtualized";function mH({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,f=vU();return g.jsx("div",{className:f.className,style:{...t,...f.style},onMouseMove:d=>a(e,d),children:s(l,e,c)})}function gH({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:f,style:d,surfaceStyle:h,maxHeight:m,width:b="200px",size:y,backdrop:S,closeOnSelect:k=!0,overscanCount:T=5,getItemKey:C,onPreserveActiveIndex:E,renderActivePreview:R,ref:_}){const D=ha(),{isOpen:A,isMounted:N,activeIndex:P,setActiveIndex:$,setIsOpen:I,virtualFocus:V,enableHover:B,nodeId:z,listRef:j,labelsRef:H,searchValue:q,refs:K,floatingStyles:U,middlewareData:Y,transitionStyles:O,context:F,getFloatingProps:G,getItemProps:L,dismissCauseRef:X,returnFocusOnSelect:te,returnFocus:J}=ba("LegacyMenu.VirtualizedContent"),le=v.useRef(null),oe=v.useRef(null),ue=v.useRef(P);ue.current=P;const xe=v.useRef(null),[ye,pe]=v.useState(null),[me,ke]=v.useState(null),Se=S??!B,Te=Uh(),{portalLayerStyles:ve}=Fl("popover",N),Ie=v.useRef(null),_e=v.useRef(void 0),je=v.useRef(e),We=v.useRef(P),Ce=v.useRef(null);v.useEffect(()=>{r?H.current=e.map(Me=>r(Me)):H.current=e.map(()=>null),j.current.length!==e.length&&(j.current.length=e.length)},[e,r,H,j]),v.useLayoutEffect(()=>{const Me=je.current!==e,st=We.current!==P;if(je.current=e,We.current=P,C===void 0||P==null){_e.current=void 0;return}const _t=_e.current;if(Me&&!st&&_t!==void 0){const bn=e.findIndex(tt=>C(tt)===_t);if(bn>=0&&bn!==P){Ce.current=bn,E===void 0?$(bn):E(bn);return}}const gn=e[P];_e.current=gn===void 0?void 0:C(gn)},[P,C,e,E,$]);const $e=F.placement.startsWith("top"),se=$e&&N?Y.bottomAnchor?.bottom??null:null,Ee=v.useRef(null);v.useLayoutEffect(()=>{if(!A){Ee.current=null,Ie.current=null;return}if(P==null||Ee.current===P)return;Ee.current=P;const Me=Ce.current===P;if(Ce.current=null,Me)return;const st=Ie.current===P;Ie.current=null,!st&&(P<0||P>=e.length||oe.current?.scrollToRow({index:P,align:"smart",behavior:"instant"}))},[A,P,e.length]);const Q=v.useRef(q),ee=v.useRef(A);v.useEffect(()=>{const Me=Q.current,st=ee.current;Q.current=q,ee.current=A,!(!A||!st||Me===q)&&(e.length>0&&oe.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),$(e.length>0?0:null))},[A,e.length,q,$]);const be=v.useCallback((Me,st)=>{xe.current=Me,pe(_t=>_t===Me?_t:Me),ke(_t=>_t===st?_t:st)},[]);v.useLayoutEffect(()=>{if(!A||P==null||P<0||P>=e.length){be(null,null);return}const Me=j.current[P];Me!=null&&be(Me,P)},[P,A,e.length,j,be]);const Ne=v.useCallback((Me,st)=>{Me===ue.current&&st!=null&&be(st,Me)},[be]),Ye=v.useRef(null),at=v.useCallback((Me,st)=>{const _t=Ye.current;Ye.current={x:st.clientX,y:st.clientY},!(_t!==null&&_t.x===st.clientX&&_t.y===st.clientY)&&P!==Me&&(Ie.current=Me,$(Me))},[P,$]),ft=v.useCallback(Me=>{Me.key==="Escape"&&(X.current="escape")},[X]),nt=v.useCallback(Me=>{Te(Me.nativeEvent)&&(X.current="backdrop",I(!1))},[X,I,Te]),vt=v.useCallback(Me=>{if(!Te(Me.nativeEvent))return;Me.preventDefault(),X.current="backdrop",I(!1);const gn=document.elementsFromPoint(Me.clientX,Me.clientY).find(bn=>!bn.classList.contains(K0));gn&&gn.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Me.clientX,clientY:Me.clientY,screenX:Me.screenX,screenY:Me.screenY,button:Me.button,buttons:Me.buttons,ctrlKey:Me.ctrlKey,shiftKey:Me.shiftKey,altKey:Me.altKey,metaKey:Me.metaKey}))},[X,I,Te]),St=Gc([K.setFloating,le,_]),et=ma();if(!N)return null;const Qe=m??n8,Pe=typeof t=="number"?e.length*t:e.reduce((Me,st,_t)=>Me+t(_t),0),pt=Math.min(Pe,Math.max(0,Qe-hH*2)),lt=y??D?.menuSize??"sm",ut={...U,...O,...d,...H0({width:b}),...ve,...$e&&se!==null?{top:"auto",bottom:se}:{},...q0({isOpen:A,isPositioned:F.isPositioned})},Ge=sI(ve),Ze=Y0({className:f?`${_T} ${f}`:_T,size:lt,style:ut,surfaceStyle:h}),Z=Q0(),de=J0(),Oe=Z0(),Xe=X0(!0),Ct=xU(),kt=ex(),He=A&&me!=null&&me>=0&&me<e.length&&ye!=null&&R!=null?R(me,{rowElement:ye,menuContentElement:le.current}):null,Fe=He!=null&&ye!=null,Le={items:e,activeIndex:P,renderItem:n,onMouseMove:at};return g.jsxs(L0,{...et?{root:et}:{},children:[Se&&g.jsx("div",{className:Ge.className,style:Ge.style,"data-component":"menu-backdrop",onClick:nt,onContextMenu:vt,role:"none"}),g.jsx(z0,{context:F,initialFocus:-1,returnFocus:J??(X.current!=="backdrop"&&(X.current!=="selection"||te)),modal:!V&&A,children:g.jsx("div",{ref:St,className:Ze.className,style:Ze.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":lt,...G({"aria-label":c??"Menu","aria-labelledby":void 0,onKeyDown:ft,onMouseDown:V?Me=>{Me.stopPropagation()}:void 0}),children:g.jsx(Ms,{menuSize:lt,children:g.jsx("div",{className:Z.className,style:Z.style,"data-component":"menu-layout",role:"none",children:g.jsx(vO,{dismiss:!A,children:g.jsx(lx,{layerNodeId:z,children:g.jsx(pH,{activeIndex:P,setIsOpen:I,getItemProps:L,listRef:j,closeOnSelect:k,onRowElementChange:Ne,children:g.jsxs(Wp,{children:[s!=null?g.jsx("div",{className:de.className,style:de.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:Oe.className,style:Oe.style,"data-component":"menu-content",children:g.jsx("div",{className:Xe.className,style:Xe.style,"data-component":"menu-list",role:"presentation",children:g.jsx(fH,{listRef:oe,className:Ct.className,role:"none",rowComponent:mH,rowProps:Le,rowCount:e.length,rowHeight:t,overscanCount:T,"data-native-scrollbar":"none",style:{height:pt}})})}):l,a!=null?g.jsx("div",{className:kt.className,style:kt.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:a})}):null,R!=null?g.jsx(bI,{open:Fe,placement:"right-start",anchorRef:xe,offset:6,closeOnSelect:!1,virtualFocus:!0,children:Fe?He:null}):null]})})})})})})})})]})}function bH({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:S,variant:k="default",checked:T,ref:C}){const{shouldAllowPointerInteraction:E,virtualFocus:R,activeDescendantIdPrefix:_}=ba("LegacyMenu.VirtualizedItem"),D=tf(),{activeIndex:A,setIsOpen:N,getItemProps:P,listRef:$,closeOnSelect:I,onRowElementChange:V}=dH("LegacyMenu.VirtualizedItem"),B=y??I??!0,z=A===e,j=v.useCallback(ye=>{$.current[e]=ye,V?.(e,ye),typeof C=="function"?C(ye):C&&(C.current=ye)},[e,$,V,C]),H=()=>{if(n)return;const ye={defaultPrevented:!1,preventDefault:()=>{ye.defaultPrevented=!0}};r?.(ye),B&&!ye.defaultPrevented&&N(!1)},q=ye=>{if(!E(ye.nativeEvent)){ye.preventDefault(),ye.stopPropagation();return}H()},K=ye=>{n||(ye.key==="Enter"||ye.key===" ")&&(ye.preventDefault(),H())},U=ye=>{if(!E(ye.nativeEvent)){ye.preventDefault(),ye.stopPropagation();return}s?.(ye),!ye.defaultPrevented&&R&&ye.preventDefault()},{onMouseMove:Y,onPointerLeave:O,...F}=P({...Qc(_,e),onClick:q,onKeyDown:K,onMouseDown:U}),G=nx(),L=rx(),X=ix(),te=S!=null?g.jsxs("div",{className:G.className,style:G.style,children:[g.jsx("div",{className:L.className,style:L.style,children:t}),g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-item-description",children:S})]}):t,J=tx({disabled:n,focused:z,inSubmenu:D,variant:k}),le=T!==void 0,oe=le&&a==null?g.jsx(VA,{checked:T,disabled:n}):a,ue=le?{role:"menuitemcheckbox","aria-checked":T,"data-checked":T||void 0}:{role:"menuitem"},xe=g.jsx("li",{ref:j,...ue,tabIndex:z?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":z||void 0,"data-has-description":S!=null||void 0,"data-variant":k!=="default"?k:void 0,"data-wide-left":h||void 0,[Ul]:"body",className:J.className,style:J.style,...F,children:g.jsx(Il,{disabled:n,leading:oe,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeft:h,children:te})});return m!=null?g.jsx(ef,{content:m,contentKey:b,children:xe}):xe}function AT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:S,virtualFocus:k,shouldKeepOpenDuringDrag:T,lockPositionWhileOpen:C,dismissOnReferenceScroll:E}){return g.jsx(f8,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:S,virtualFocus:k,shouldKeepOpenDuringDrag:T,lockPositionWhileOpen:C,dismissOnReferenceScroll:E,children:e})}function yH(e){return _o()===null?g.jsx(tB,{children:g.jsx(AT,{...e})}):g.jsx(AT,{...e})}function xI(e,t,n){const{ref:r,...s}=n,a=YN({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function vH({children:e,disabled:t=!1}){const{getTriggerProps:n}=ba("LegacyMenu.Trigger");return xI(e,t,n())}function xH({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=ba("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return xI(e,n,{...l,onPointerDown:Vu(void 0,Vu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Vu(void 0,Vu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Vu(t,c=>{l.onClick?.(c)})})}const kH=Object.assign(bI,{useContext:zU}),Jr=Object.assign(yH,{useContext:HO,useLayerContext:BU,Trigger:vH,HoverTrigger:xH,Content:$U,Item:cI,CheckboxItem:NU,TextItem:ZU,SwitchItem:YU,Section:VU,SearchInput:HU,EmptyState:FU,LoadingState:UU,ExpandableSection:RU,ExpandableSectionTrigger:_U,ExpandableSectionContent:AU,SubMenu:kH,SubMenuItem:WU,SubMenuTrigger:GU,SubMenuContent:KU,VirtualizedContent:gH,VirtualizedItem:bH,VirtualizedSectionHeader:JU}),kI=v.createContext(void 0);function cx(){const e=v.useContext(kI);if(e===void 0)throw new Error(Mn(64));return e}const SH="data-activation-direction",Wh={tabActivationDirection:e=>({[SH]:e})},SI=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:f,style:d,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,S]=v.useState(()=>new Map),[k,T]=Cl({controlled:f,default:s,name:"Tabs",state:"value"}),C=f!==void 0,[E,R]=v.useState(()=>new Map),_=v.useRef(void 0),D=v.useCallback(oe=>iv(E,oe),[E]),[A,N]=v.useState(()=>({previousValue:k,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:$}=A;let I=$,V=!1;P!==k&&(I=NT(P,k,l,E),V=P!=null&&k!=null&&D(k)==null);const B=V?P:k,z=P!==B||$!==I;qe(()=>{z&&N({previousValue:B,tabActivationDirection:I})},[B,z,I]);const j=Ve((oe,ue)=>{const xe=NT(k,oe,l,E);ue.activationDirection=xe,a?.(oe,ue),!ue.isCanceled&&T(oe)}),H=Ve((oe,ue)=>{a?.(oe,wt(ue,void 0,void 0,{activationDirection:"none"}))}),q=Ve((oe,ue)=>(S(xe=>{const ye=new Map(xe);return ye.set(oe,ue),ye}),()=>{S(xe=>{if(xe.get(oe)!==ue)return xe;const ye=new Map(xe);return ye.delete(oe),ye})})),K=v.useCallback(oe=>y.get(oe),[y]),U=v.useCallback(oe=>{for(const ue of E.values())if(oe===ue.value)return ue.id},[E]),Y=v.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:U,getTabPanelIdByValue:K,onValueChange:j,orientation:l,registerMountedTabPanel:q,setTabMap:R,tabActivationDirection:I,value:k}),[D,U,K,j,l,q,R,I,k]),O=v.useMemo(()=>{for(const oe of E.values())if(oe.value===k)return oe},[E,k]),F=v.useMemo(()=>{for(const oe of E.values())if(!oe.disabled)return oe.value},[E]),G=v.useRef(!m),L=v.useRef(s),X=v.useRef(m),te=v.useRef(!1);qe(()=>{if(C)return;function oe(pe,me){T(pe),N({previousValue:pe,tabActivationDirection:"none"}),H(pe,me),G.current=!1}if(E.size===0){te.current&&k!==null&&!_.current?.isConnected&&oe(null,Dw);return}te.current=!0,_.current=E.keys().next().value;const ue=O?.disabled,xe=O==null&&k!==null;if(!ue&&k===L.current&&(X.current=!1),X.current&&ue&&k===L.current)return;const ye=G.current;if(ue||xe){const pe=F??null;if(k===pe){G.current=!1;return}let me=Dw;ye?me=Lw:ue&&(me=E_),oe(pe,me);return}ye&&O!=null&&(H(k,Lw),G.current=!1)},[F,C,H,O,T,E,k]);const le=dn("div",t,{state:{orientation:l,tabActivationDirection:I},ref:n,props:h,stateAttributesMapping:Wh});return g.jsx(kI.Provider,{value:Y,children:g.jsx(A0,{elementsRef:b,children:le})})});function iv(e,t){for(const[n,r]of e.entries())if(t===r.value)return n;return null}function NT(e,t,n,r){if(e==null||t==null)return"none";const[s,a,l]=n==="horizontal"?["left","left","right"]:["top","up","down"],c=iv(r,e),f=iv(r,t);if(c==null||f==null)return c!==f&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?t>e?l:a:"none";const d=c.getBoundingClientRect()[s],h=f.getBoundingClientRect()[s];return h<d?a:h>d?l:"none"}const wI=v.createContext(void 0);function EI(){const e=v.useContext(wI);if(e===void 0)throw new Error(Mn(65));return e}const TI=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:f=!0,style:d,...h}=t,{value:m,getTabPanelIdByValue:b,onValueChange:y,orientation:S,tabActivationDirection:k}=cx(),{activateOnFocus:T,registerTabResizeObserverElement:C,tabsListElement:E}=EI(),{highlightedIndex:R,onHighlightedIndexChange:_}=Qv(),D=Pl(c),A=v.useMemo(()=>({disabled:s,id:D,value:l}),[s,D,l]),{compositeProps:N,compositeRef:P,index:$}=eO({metadata:A}),I=l===m,V=v.useRef(!1),B=v.useRef(null),z=Ve(te=>{B.current?.(),B.current=te?C(te):null});qe(()=>{if(V.current){V.current=!1;return}if(!(I&&$>-1&&R!==$))return;const te=E;if(te!=null){const J=dr(Gt(te));if(J&&ht(te,J))return}s||_($)},[I,$,R,_,s,E]);const{getButtonProps:j,buttonRef:H}=jl({disabled:s,native:f,focusableWhenDisabled:!0}),q=b(l),K=v.useRef(!1),U=v.useRef(!1);function Y(te){y(l,wt(Ni,te.nativeEvent,void 0,{activationDirection:"none"}))}function O(te){I||s||Y(te)}function F(te){I||s||T&&(!K.current||U.current)&&Y(te)}function G(te){if(I||s)return;K.current=!0,U.current=te.button===0;const J=Gt(te.currentTarget);function le(){K.current=!1,U.current=!1,J.removeEventListener("pointerup",le),J.removeEventListener("pointercancel",le)}J.addEventListener("pointerup",le),J.addEventListener("pointercancel",le)}return dn("button",t,{state:{disabled:s,active:I,orientation:S,tabActivationDirection:k},ref:[n,H,P,z],props:[N,{role:"tab","aria-controls":q,"aria-selected":I,id:D,onClick:O,onFocus:F,onPointerDown:G,[B0]:I?"":void 0,onKeyDownCapture(){V.current=!0}},h,j],stateAttributesMapping:Wh})}),wH="";function EH(){return Cn}function TH(){return!1}function CH(){return!0}function RH(){return kh.useSyncExternalStore(EH,TH,CH)}const _H=v.createContext(void 0),AH={disableStyleElements:!1};function CI(){return v.useContext(_H)??AH}function NH(e){const{script:t}=e,{nonce:n}=CI();return RH()?g.jsx("script",{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}function OH(e,t){const n=(t??rn(e).getComputedStyle(e)).transform;let r=0,s=0,a=1;if(n&&n!=="none"){const l=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(l){const c=l[1].split(", ").map(parseFloat);c.length===6?(r=c[4],s=c[5],a=Math.sqrt(c[0]*c[0]+c[1]*c[1])):c.length===16&&(r=c[12],s=c[13],a=c[0])}}return{x:r,y:s,scale:a}}const IH="--active-tab-left",MH="--active-tab-right",DH="--active-tab-top",LH="--active-tab-bottom",jH="--active-tab-width",zH="--active-tab-height";var OT;const PH={...Wh,activeTabPosition:()=>null,activeTabSize:()=>null},IT=2,RI=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{getTabElementBySelectedValue:f,orientation:d,tabActivationDirection:h,value:m}=cx(),{tabsListElement:b,registerIndicatorUpdateListener:y}=EI(),S=r3();v.useEffect(()=>y(S),[y,S]);let k=0,T=0,C=0,E=0,R=0,_=0,D=!1;if(m!=null&&b!=null){const B=f(m);if(B!=null){D=!0;const{width:z,height:j}=hT(B),{width:H,height:q}=hT(b),K=B.getBoundingClientRect(),U=b.getBoundingClientRect(),Y=H>0?U.width/H:1,O=q>0?U.height/q:1,F=$H(B,b);k=F.left,C=F.top;const G=(K.left-U.left)/Y+b.scrollLeft-b.clientLeft,L=(K.top-U.top)/O+b.scrollTop-b.clientTop,X=FH(B);Math.abs(G-X.x-k)<=IT&&Math.abs(L-X.y-C)<=IT&&(k=G,C=L),R=z,_=j,T=b.scrollWidth-k-R,E=b.scrollHeight-C-_}}const A=D?{left:k,right:T,top:C,bottom:E}:null,N=D?{width:R,height:_}:null,P=D?{[IH]:`${k}px`,[MH]:`${T}px`,[DH]:`${C}px`,[LH]:`${E}px`,[jH]:`${R}px`,[zH]:`${_}px`}:void 0,$=D&&R>0&&_>0,V=dn("span",t,{state:{orientation:d,activeTabPosition:A,activeTabSize:N,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:P,hidden:!$},c,{suppressHydrationWarning:!0}],stateAttributesMapping:PH});return m==null?null:g.jsxs(v.Fragment,{children:[V,a&&(OT||(OT=g.jsx(NH,{script:wH})))]})});function $H(e,t){const n=MT(e),r=MT(t);let s=n.left-r.left-t.clientLeft,a=n.top-r.top-t.clientTop,l=Ai(e);for(;It(l)&&l!==t&&!mi(l);)s-=l.scrollLeft,a-=l.scrollTop,l=Ai(l);return{left:s,top:a}}function MT(e){let t=0,n=0,r=e;for(;r!=null;){t+=r.offsetLeft,n+=r.offsetTop;const s=r.offsetParent;s!=null&&(t+=s.clientLeft,n+=s.clientTop),r=s}return{left:t,top:n}}function FH(e){const t=rn(e).getComputedStyle(e),{x:n,y:r}=OH(e,t);let s=n,a=r;const{translate:l}=t;if(l&&l!=="none"){const c=l.split(" ");s+=DT(c[0],e.offsetWidth),a+=DT(c[1],e.offsetHeight)}return{x:s,y:a}}function DT(e,t){if(!e)return 0;const n=parseFloat(e);return Number.isFinite(n)?e.endsWith("%")?n/100*t:n:0}const _I=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...f}=t,{orientation:d,setTabMap:h,tabActivationDirection:m}=cx(),[b,y]=v.useState(0),[S,k]=v.useState(null),T=v.useRef(new Set),C=v.useRef(new Set),E=v.useRef(null);qe(()=>{if(typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>{T.current.forEach($=>{$()})});return E.current=P,S&&P.observe(S),C.current.forEach($=>{P.observe($)}),()=>{P.disconnect(),E.current=null}},[S]);const R=Ve(P=>(T.current.add(P),()=>{T.current.delete(P)})),_=Ve(P=>(C.current.add(P),E.current?.observe(P),()=>{C.current.delete(P),E.current?.unobserve(P)})),D={orientation:d,tabActivationDirection:m},A={"aria-orientation":d==="vertical"?"vertical":void 0,role:"tablist"},N=v.useMemo(()=>({activateOnFocus:r,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:_,tabsListElement:S}),[r,R,_,S]);return g.jsx(wI.Provider,{value:N,children:g.jsx(x9,{render:l,className:s,style:c,state:D,refs:[n,k],props:[A,f],stateAttributesMapping:Wh,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:a,orientation:d,onHighlightedIndexChange:y,onMapChange:h,disabledIndices:Yi})})}),Gu={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},padded:{kLKAdn:"ui-493x5y",kpe85a:"ui-14ndyrl",kGO01o:"ui-b6dno7",kE3dHu:"ui-1e7ydrk",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0},outline:{kGVxlE:"ui-1u01kyz ui-1824fay",kLKAdn:"ui-1gv78wz",kpe85a:"ui-1jg1sa",kGO01o:"ui-1cea8gx",kE3dHu:"ui-1rplcre",$$css:!0}},BH={sm:{kZKoxP:"ui-1e94bgo",$$css:!0},md:{kZKoxP:"ui-170hpbr",$$css:!0},lg:{kZKoxP:"ui-t8t6p",$$css:!0},xl:{kZKoxP:"ui-12tj2o0",$$css:!0}},UH={sm:{kZKoxP:"ui-jmh96e",$$css:!0},md:{kZKoxP:"ui-17n66dt",$$css:!0},lg:{kZKoxP:"ui-y8quj6",$$css:!0},xl:{kZKoxP:"ui-1wl7iu6",$$css:!0}},HH={sm:{kaIpWk:"ui-1yjdzib",$$css:!0},md:{kaIpWk:"ui-17dxljr",$$css:!0},lg:{kaIpWk:"ui-172nrg4",$$css:!0},xl:{kaIpWk:"ui-1y34t1",$$css:!0}},qH={sm:{kaIpWk:"ui-13mijux",$$css:!0},md:{kaIpWk:"ui-1k9pyrz",$$css:!0},lg:{kaIpWk:"ui-1fkry76",$$css:!0},xl:{kaIpWk:"ui-126z3em",$$css:!0}},LT={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},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},Vd={base:{kysU6D:"ui-jyslct",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}};function AI(e,t){return e==="outline"?qH[t]:HH[t]}function VH(e,t){return e==="outline"?UH[t]:Vi[t]}const NI=v.createContext(null);function GH(){const e=v.use(NI);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function WH({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",rounded:a=!1,disabled:l=!1,fullWidth:c=!1,children:f,"aria-label":d,"aria-labelledby":h,...m}){const b=v.useMemo(()=>({variant:r,size:s,rounded:a,disabled:l,fullWidth:c}),[l,c,a,s,r]);return g.jsx(NI.Provider,{value:b,children:g.jsx(SI,{...m,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,"data-rounded":a||void 0,...{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"}}[!!c<<0],children:g.jsxs(_I,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":h,"data-component":"segmented-control-list","data-disabled":l||void 0,...Dt(Gu.base,Gu.padded,BH[s],r==="default"&&Gu.default,r==="outline"&&Gu.outline,a?Gu.rounded:Es[s]),children:[f,g.jsx(RI,{"data-component":"segmented-control-indicator",...Dt(LT.base,a?LT.rounded:AI(r,s))})]})})})}function KH({value:e,disabled:t=!1,children:n,...r}){const s=GH();return g.jsx(TI,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,"data-rounded":s.rounded||void 0,...Dt(R0.root,Ei.content,Th.root,s.rounded?Vd.rounded:AI(s.variant,s.size),VH(s.variant,s.size),Ei.size[s.size],s.size==="sm"?Ds.root:Ei.typography[s.size],Vd.base,s.variant==="compact"&&Vd.compact,s.fullWidth&&Vd.fullWidth),children:n})}const fc=Object.assign(WH,{Item:KH}),OI=v.createContext(void 0),II=v.createContext(void 0),MI=v.createContext(void 0);function Ls(){const e=v.useContext(OI);if(e===void 0)throw new Error(Mn(60));return e}function Kh(){const e=v.useContext(II);if(e===void 0)throw new Error(Mn(101));return e}function DI(){const e=v.useContext(MI);if(e===void 0)throw new Error(Mn(61));return e}const YH={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:al(t,r)!==""},hasNullItemLabel:(e,t)=>t?D4(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>sa(t,s,n)):sa(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows},ys=1;function LI(e,t){return Math.max(0,e-t)}function XH(e,t){if(t<=0)return 0;const n=rc(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 ZH(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:f,form:d,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:S=!0,actionsRef:k,inputRef:T,onOpenChangeComplete:C,items:E,multiple:R=!1,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A=ZA,highlightItemOnHover:N=!0,children:P}=e,{clearErrors:$}=qA(),{setDirty:I,setTouched:V,setFocused:B,validityData:z,setFilled:j,name:H,disabled:q,validation:K,validationMode:U}=Rh(),Y=_0({id:t}),O=q||m,F=H??f,[G,L]=Cl({controlled:n,default:R?r??Yi:r,name:"Select",state:"value"}),[X,te]=Cl({controlled:a,default:l,name:"Select",state:"open"}),J=v.useRef([]),le=v.useRef([]),oe=v.useRef(null),ue=v.useRef(null),xe=v.useRef(0),ye=v.useRef(null),pe=v.useRef([]),me=v.useRef(!1),ke=v.useRef(null),Se=v.useRef(null),Te=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ve=v.useRef(!1),Ie=v.useRef(G),{mounted:_e,setMounted:je,transitionStatus:We}=Hc(X),{openMethod:Ce,triggerProps:$e}=z3(X),se=gr(()=>new Uc({id:Y,labelId:void 0,modal:S,multiple:R,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,value:G,open:X,mounted:_e,transitionStatus:We,items:E,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:In,triggerProps:In,triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Cn,setOpen:Cn,handleScrollArrowVisibility:Cn,onOpenChangeComplete:Cn,listRef:J,popupRef:oe,scrollHandlerRef:ue,scrollArrowsMountedCountRef:xe,valueRef:ye,valuesRef:pe,labelsRef:le,typingRef:me,selectionRef:Te,firstItemTextRef:ke,selectedItemTextRef:Se,alignItemWithTriggerActiveRef:ve,initialValueRef:Ie},YH)).current,Ee=se.useState("activeIndex"),Q=se.useState("selectedIndex"),ee=se.useState("triggerElement"),be=se.useState("positionerElement"),Ne=JB(Ce),Ye=Ce??Ne,at=v.useMemo(()=>R?"":al(G,D),[R,G,D]),ft=v.useMemo(()=>R&&Array.isArray(G)?G.map(Le=>al(Le,D)):al(G,D),[R,G,D]),nt=An(ee),vt=Ve(()=>ft);HA(nt,Y,G,vt,!O,f);const St=R?Array.isArray(G)&&G.length>0:G!=null&&at!=="";qe(()=>{j(St)},[St,j]),qe(function(){const Me=QA(pe.current,G,A,R);Me===null&&(Se.current=null),!X&&se.set("selectedIndex",Me)},[R,X,G,A,se]),S0(G,()=>{$(F),I(_4(G,z.initialValue,A)),K.change(G)});const et=Ve((Le,Me)=>{c?.(Le,Me),!Me.isCanceled&&(te(Le),!Le&&(Me.reason===fh||Me.reason===Jv)&&(V(!0),B(!1),U==="onBlur"&&K.commit(G)))}),Qe=Ve(()=>{je(!1),se.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),C?.(!1)});Ro({enabled:!k,open:X,ref:oe,onComplete(){X||Qe()}}),v.useImperativeHandle(k,()=>({unmount:Qe}),[Qe]);const Pe=Ve((Le,Me)=>{s?.(Le,Me),!Me.isCanceled&&L(Le)}),pt=Ve(Le=>{const Me=LI(Le.scrollHeight,Le.clientHeight),st=XH(Le.scrollTop,Me),_t=st>0,gn=st<Me;se.set("scrollUpArrowVisible",_t),se.set("scrollDownArrowVisible",gn)}),lt=f3({open:X,onOpenChange:et,elements:{reference:ee,floating:be}}),ut=JP(lt,{enabled:!O,event:"mousedown"}),Ge=c0(lt),Ze=y3(lt,{enabled:!O,listRef:J,activeIndex:Ee,selectedIndex:Q,disabledIndices:Yi,onNavigate(Le){Le===null&&!X||se.set("activeIndex",Le)},focusItemOnHover:N}),Z=v3(lt,{enabled:!O&&(X||!b&&!R),listRef:le,activeIndex:Ee,selectedIndex:Q,disabledIndices:Le=>tO(J.current[Le]),onMatch(Le){X?se.set("activeIndex",Le):Pe(pe.current[Le],wt(Ni))},onTyping(Le){me.current=Le}}),de=v.useMemo(()=>ra(Z.reference,Ze.reference,Ge.reference,ut.reference,$e),[ut.reference,Z.reference,Ze.reference,Ge.reference,$e]),Oe=v.useMemo(()=>ra(y0,Z.floating,Ze.floating,Ge.floating),[Z.floating,Ze.floating,Ge.floating]),Xe=Ze.item??In;se.useContextCallback("setValue",Pe),se.useContextCallback("setOpen",et),se.useContextCallback("handleScrollArrowVisibility",pt),se.useContextCallback("onOpenChangeComplete",C),R4(()=>{se.update({popupProps:Oe,triggerProps:de})}),se.useSyncedValues({id:Y,modal:S,multiple:R,value:G,open:X,mounted:_e,transitionStatus:We,popupProps:Oe,triggerProps:de,items:E,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,openMethod:Ye});const Ct=v.useMemo(()=>({disabled:O,readOnly:b,required:y,multiple:R,highlightItemOnHover:N,itemProps:Xe}),[O,b,y,R,N,Xe]),kt=So(T,K.inputRef),He=R?void 0:F,Fe=v.useMemo(()=>!R||!Array.isArray(G)||!F?null:G.map(Le=>{const Me=al(Le,D);return g.jsx("input",{type:"hidden",form:d,name:F,value:Me,disabled:O},Me)}),[R,G,d,F,D,O]);return g.jsxs(OI.Provider,{value:se,children:[g.jsx(II.Provider,{value:Ct,children:g.jsx(MI.Provider,{value:lt,children:P})}),g.jsx("input",{...K.getValidationProps(O,{onFocus(){se.state.triggerElement?.focus({focusVisible:!0})},onChange(Le){if(Le.nativeEvent.defaultPrevented||O||b)return;const Me=Le.currentTarget.value,st=wt(Ni,Le.nativeEvent);function _t(){if(R)return;const gn=Me.toLowerCase();let bn=pe.current.findIndex(Ut=>al(Ut,D).toLowerCase()===gn||eN(Ut,_).toLowerCase()===gn);bn===-1&&(bn=pe.current.findIndex((Ut,ot)=>{const Sn=le.current[ot];return Sn!=null&&Sn.toLowerCase()===gn}));const tt=pe.current[bn];tt!=null&&Pe(tt,st)}se.set("forceMount",!0),queueMicrotask(_t)}}),id:Y&&He==null?`${Y}-hidden-input`:void 0,form:d,name:He,autoComplete:h,value:at,disabled:O,required:y&&!(R&&St),readOnly:b,ref:kt,style:F?SP:N_,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Fe]})}const QH="data-popup-side",JH=400,eq={...qz,...Ch,popupSide:e=>e?{[QH]:e}:null,value:()=>null},tq=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{setTouched:h,setFocused:m,validationMode:b,validation:y,state:S,disabled:k}=Rh(),{labelId:T}=_h(),C=Ls(),{readOnly:E,required:R,disabled:_}=Kh(),D=k||_||l,A=C.useState("open"),N=C.useState("mounted"),P=C.useState("value"),$=C.useState("triggerProps"),I=C.useState("positionerElement"),V=C.useState("listElement"),B=C.useState("popupSide"),z=C.useState("id"),j=C.useState("labelId"),H=C.useState("hasSelectedValue"),q=N&&I?B:null,K=a??z,U=j4(T,j);_0({id:a});const Y=An(I),O=v.useRef(null),{getButtonProps:F,buttonRef:G}=jl({disabled:D,native:c}),L=C.useStateSetter("triggerElement"),X=ei(),te=ei(),J=ei();v.useEffect(()=>{if(A)return J.start(JH,()=>{C.context.selectionRef.current.allowUnselectedMouseUp=!0,C.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{J.clear()};C.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},te.clear()},[A,C,te,J]);const le=ra($,{id:K,role:"combobox","aria-expanded":A,"aria-haspopup":"listbox","aria-controls":A?V?.id??Ep(I)?.id:void 0,"aria-labelledby":U,"aria-readonly":E||void 0,"aria-required":R||void 0,tabIndex:D?-1:0,onFocus(xe){m(!0),A&&C.context.alignItemWithTriggerActiveRef.current&&C.context.setOpen(!1,wt(Ni,xe.nativeEvent)),X.start(0,()=>{C.set("forceMount",!0)})},onBlur(xe){ht(I,xe.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&y.commit(P))},onMouseDown(xe){if(A)return;const ye=Gt(xe.currentTarget);function pe(me){if(!O.current)return;const ke=me.target;ht(O.current,ke)||ht(Y.current,ke)||z4(me,O.current)||C.context.setOpen(!1,wt(tP,me))}te.start(0,()=>{ye.addEventListener("mouseup",pe,{once:!0})})}},d,F),oe=y.getValidationProps(D,le);oe.role="combobox";const ue={...S,open:A,disabled:D,value:P,readOnly:E,popupSide:q,placeholder:!H};return dn("button",t,{ref:[n,O,G,L],state:ue,stateAttributesMapping:eq,props:oe})}),nq={value:()=>null},rq=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...f}=t,d=Ls(),h=d.useState("value"),m=d.useState("items"),b=d.useState("itemToStringLabel"),y=d.useState("hasSelectedValue"),S=!y&&l!=null&&a==null,k=d.useState("hasNullItemLabel",S),T={value:h,placeholder:!y};let C=null;return typeof a=="function"?C=a(h):a!=null?C=a:S&&!k?C=l:Array.isArray(h)?C=L4(h,m,b):C=tN(h,m,b),dn("span",t,{state:T,ref:[n,d.context.valueRef],props:[{children:C},f],stateAttributesMapping:nq})}),iq=v.forwardRef(function(t,n){const r=Ls(),s=r.useState("mounted"),a=r.useState("forceMount");return s||a?g.jsx(VP,{ref:n,...t}):null}),sq={...sh,...da},oq=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Ls(),f=c.useState("open"),d=c.useState("mounted"),h=c.useState("transitionStatus");return dn("div",t,{state:{open:f,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:sq})}),jI=v.createContext(void 0);function zI(){const e=v.useContext(jI);if(!e)throw new Error(Mn(59));return e}function Kp(e,t){e&&Object.assign(e.style,t)}const PI={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},aq={position:"fixed"},lq=v.forwardRef(function(t,n){const{anchor:r,className:s,render:a,positionMethod:l,side:c,align:f,sideOffset:d,alignOffset:h,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y,sticky:S,disableAnchorTracking:k,alignItemWithTrigger:T=!0,collisionAvoidance:C=UP,style:E,...R}=t,_=Ls(),D=DI(),A=_.useState("open"),N=_.useState("mounted"),P=_.useState("modal"),$=_.useState("value"),I=_.useState("openMethod"),V=_.useState("positionerElement"),B=_.useState("triggerElement"),z=_.useState("isItemEqualToValue"),j=_.useState("transitionStatus"),H=v.useRef(null),q=v.useRef(null),[K,U]=v.useState(T),Y=N&&K&&I!=="touch";!N&&K!==T&&U(T),v.useImperativeHandle(_.context.alignItemWithTriggerActiveRef,()=>Y),nF((Y||P)&&A,I==="touch",V,B);const O=N0({anchor:r,floatingRootContext:D,positionMethod:l,mounted:N,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:S,disableAnchorTracking:k??Y,collisionAvoidance:C,keepMounted:!0}),F=Y?"none":O.side,G=Y?aq:O.positionerStyles,L={open:A,side:F,align:O.align,anchorHidden:O.anchorHidden};qe(()=>{_.set("popupSide",O.side)},[_,O.side]);const X=_.useStateSetter("positionerElement"),te=O0(t,L,{styles:G,transitionStatus:j,props:R,refs:[n,X],hidden:!N,inert:!A}),J=v.useRef(0),le=Ve(ue=>{if(_.context.valuesRef.current.length===0)return;const xe=J.current;J.current=ue.size;const ye=wt(Ni);if(xe!==0&&!_.state.multiple&&$!==null&&hp(_.context.valuesRef.current,$,z)===-1){const me=_.context.initialValueRef.current,Se=me!=null&&hp(_.context.valuesRef.current,me,z)!==-1?me:null;_.context.setValue(Se,ye),Se===null&&(_.set("selectedIndex",null),_.context.selectedItemTextRef.current=null)}if(xe!==0&&_.state.multiple&&Array.isArray($)){const pe=$.filter(me=>hp(_.context.valuesRef.current,me,z)!==-1);pe.length!==$.length&&(_.context.setValue(pe,ye),pe.length===0&&(_.set("selectedIndex",null),_.context.selectedItemTextRef.current=null))}if(A&&Y){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const pe={height:""};Kp(V,pe),Kp(_.context.popupRef.current,pe)}}),oe=v.useMemo(()=>({...O,side:F,alignItemWithTriggerActive:Y,setControlledAlignItemWithTrigger:U,scrollUpArrowRef:H,scrollDownArrowRef:q}),[O,F,Y,U]);return g.jsx(A0,{elementsRef:_.context.listRef,labelsRef:_.context.labelsRef,onMapChange:le,children:g.jsxs(jI.Provider,{value:oe,children:[N&&P&&g.jsx(C3,{inert:T3(!A),cutout:B}),te]})})}),Gd="base-ui-disable-scrollbar",sv={className:Gd,getElement(e){return g.jsx("style",{nonce:e,href:Gd,precedence:"base-ui:low",children:`.${Gd}{scrollbar-width:none}.${Gd}::-webkit-scrollbar{display:none}`})}},jT="--transform-origin",uq={...sh,...da},cq=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,f=Ls(),{multiple:d,readOnly:h,highlightItemOnHover:m}=Kh(),b=DI(),{side:y,align:S,alignItemWithTriggerActive:k,isPositioned:T,setControlledAlignItemWithTrigger:C}=zI(),E=ZB()!=null,R=Mi(),{nonce:_,disableStyleElements:D}=CI(),A=f.useState("id"),N=f.useState("open"),P=f.useState("openMethod"),$=f.useState("mounted"),I=f.useState("popupProps"),V=f.useState("transitionStatus"),B=f.useState("triggerElement"),z=f.useState("positionerElement"),j=f.useState("listElement"),H=v.useRef(!1),q=v.useRef(!1),K=v.useRef({}),U=Sl(),Y=Ve(L=>{if(!z||!f.context.popupRef.current||!q.current)return;const X=z.style.top==="0px",te=z.style.bottom==="0px";if(H.current||!k||!X&&!te){f.context.handleScrollArrowVisibility(L);return}const J=PT(z),le=ic(z.getBoundingClientRect().height,"y",J),oe=Gt(z),ue=rn(z),xe=ue.getComputedStyle(z),ye=parseFloat(xe.marginTop),pe=parseFloat(xe.marginBottom),me=zT(ue.getComputedStyle(f.context.popupRef.current)),ke=Math.min(oe.documentElement.clientHeight-ye-pe,me),Se=L.scrollTop,Te=Wd(L);let ve=null;const Ie=Ce=>{z.style.height=`${Ce}px`},_e=X?Te-Se:Se,je=Math.min(le+_e,ke);if(_e<=ys){const Ce=rc(_e,0,ke-le);Ce>0&&Ie(le+Ce),L.scrollTop=X?Te:0,ke-(le+Ce)<=ys&&(H.current=!0),f.context.handleScrollArrowVisibility(L);return}if(ke-je>ys)ve=X?1/0:0;else if(te&&Se<Te){const Ce=le+_e-ke;ve=Se-(_e-Ce)}const We=Math.ceil(je);if(We!==0&&Ie(We),ve!=null){const Ce=rc(ve,0,Wd(L));Math.abs(L.scrollTop-Ce)>ys&&(L.scrollTop=Ce)}We>=ke-ys&&(H.current=!0),f.context.handleScrollArrowVisibility(L)});v.useImperativeHandle(f.context.scrollHandlerRef,()=>Y,[Y]),Ro({open:N,ref:f.context.popupRef,onComplete(){N&&f.context.onOpenChangeComplete(!0)}});const O={open:N,transitionStatus:V,side:y,align:S};qe(()=>{!z||!f.context.popupRef.current||Object.keys(K.current).length||(K.current={top:z.style.top||"0",left:z.style.left||"0",right:z.style.right,height:z.style.height,bottom:z.style.bottom,minHeight:z.style.minHeight,maxHeight:z.style.maxHeight,marginTop:z.style.marginTop,marginBottom:z.style.marginBottom})},[f,z]),qe(()=>{N||k||(q.current=!1,H.current=!1,Kp(z,K.current))},[N,k,z]),qe(()=>{const L=f.context.popupRef.current;if(!N||!B||!z||!L||k&&!T||f.state.transitionStatus==="ending")return;if(q.current=!0,L.style.removeProperty(jT),!k){U.request(()=>f.context.handleScrollArrowVisibility(j||L));return}const X=fq(L);try{let te=f.context.selectedItemTextRef.current;te?.isConnected||(te=!f.select("hasSelectedValue")&&f.context.firstItemTextRef.current?.isConnected?f.context.firstItemTextRef.current:null);const J=f.context.valueRef.current,le=rn(z),oe=le.getComputedStyle(z),ue=le.getComputedStyle(L),xe=Gt(B),ye=PT(B),pe=Kd(B.getBoundingClientRect(),ye),me=Kd(z.getBoundingClientRect(),ye),ke=pe.height,Se=j||L,Te=Se.scrollHeight,ve=parseFloat(ue.borderBottomWidth),Ie=parseFloat(oe.marginTop)||10,_e=parseFloat(oe.marginBottom)||10,je=parseFloat(oe.minHeight)||100,We=zT(ue),Ce=5,$e=5,se=20,Ee=xe.documentElement.clientHeight-Ie-_e,Q=xe.documentElement.clientWidth,ee=Ee-pe.bottom+ke;let be,Ne=R==="rtl"?pe.right-me.width:pe.left,Ye=0;if(te&&J){const ut=Kd(J.getBoundingClientRect(),ye);be=Kd(te.getBoundingClientRect(),ye),Ne=me.left+(R==="rtl"?ut.right-be.right:ut.left-be.left);const Ge=ut.top-pe.top+ut.height/2;Ye=be.top-me.top+be.height/2-Ge}const at=ee+Ye+_e+ve;let ft=Math.min(Ee,at);const nt=Ee-Ie-_e,vt=at-ft,St=Q-$e;z.style.left=`${rc(Ne,Ce,St-me.width)}px`,z.style.height=`${ft}px`,z.style.maxHeight="none",z.style.marginTop=`${Ie}px`,z.style.marginBottom=`${_e}px`,L.style.height="100%";const et=Wd(Se),Qe=vt>=et-ys;Qe&&(ft=Math.min(Ee,me.height)-(vt-et));const Pe=pe.top<se||pe.bottom>Ee-se||Math.ceil(ft)+ys<Math.min(Te,je),pt=(le.visualViewport?.scale??1)!==1&&Is;if(Pe||pt){Kp(z,K.current),C(!1);return}const lt=Math.max(je,ft);if(Qe){const ut=Math.max(0,Ee-at);z.style.top=me.height>=nt?"0":`${ut}px`,z.style.height=`${ft}px`,Se.scrollTop=Wd(Se)}else z.style.bottom="0",Se.scrollTop=vt;if(be){const ut=me.top,Ge=me.height,Ze=be.top+be.height/2,Z=rc(Ge>0?(Ze-ut)/Ge*100:50,0,100);L.style.setProperty(jT,`50% ${Z}%`)}(lt===Ee||ft>=We)&&(H.current=!0),f.context.handleScrollArrowVisibility(Se),m&&f.state.selectedIndex===null&&f.state.activeIndex===null&&f.context.listRef.current[0]!=null&&f.set("activeIndex",0)}finally{X()}},[f,N,z,B,k,C,U,j,m,R,T]),v.useEffect(()=>{if(!k||!z||!N)return;const L=rn(z);function X(te){f.context.setOpen(!1,wt(nP,te))}return Ot(L,"resize",X)},[f,k,z,N]);const F={...j?{role:"presentation"}:{role:"listbox","aria-multiselectable":d||void 0,"aria-readonly":h||void 0,id:`${A}-list`},onKeyDown(L){E&&AA.has(L.key)&&L.stopPropagation()},onScroll(L){j||Y(L.currentTarget)},...k&&{style:j?{height:"100%"}:PI},className:!j&&k?sv.className:void 0},G=dn("div",t,{ref:[n,f.context.popupRef],state:O,stateAttributesMapping:uq,props:[I,F,Ah(V),c]});return g.jsxs(v.Fragment,{children:[!D&&sv.getElement(_),g.jsx(QP,{context:b,modal:!1,disabled:!$,openInteractionType:P,returnFocus:l,restoreFocus:!0,children:G})]})});function zT(e){const t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function Wd(e){return LI(e.scrollHeight,e.clientHeight)}function PT(e){return nA.getScale(e)}function ic(e,t,n){return e/n[t]}function Kd(e,t){return yc({x:ic(e.x,"x",t),y:ic(e.y,"y",t),width:ic(e.width,"x",t),height:ic(e.height,"y",t)})}const $T=[["transform","none"],["scale","1"],["translate","0 0"]];function fq(e){const{style:t}=e,n={};for(const[r,s]of $T)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of $T){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const dq=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Ls(),{multiple:f,readOnly:d}=Kh(),{alignItemWithTriggerActive:h}=zI(),m=c.useState("hasScrollArrows"),b=c.useState("openMethod"),S={id:`${c.useState("id")}-list`,role:"listbox","aria-multiselectable":f||void 0,"aria-readonly":d||void 0,onScroll(T){c.context.scrollHandlerRef.current?.(T.currentTarget)},...h&&{style:PI},className:m&&b!=="touch"?sv.className:void 0},k=c.useStateSetter("listElement");return dn("div",t,{ref:[n,k],props:[S,l]})}),$I=v.createContext(void 0);function fx(){const e=v.useContext($I);if(!e)throw new Error(Mn(57));return e}const pq=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=v.useRef(null),b=sN({guess:!0,label:c,textRef:m}),y=Ls(),{itemProps:S,multiple:k,disabled:T,readOnly:C}=Kh(),E=T||f,R=y.useState("isActive",b.index),_=y.useState("open"),D=y.useState("isSelected",l),A=y.useState("isSelectedByFocus",b.index),N=y.useState("isItemEqualToValue"),P=b.index,$=v.useRef(null);qe(()=>{const O=y.context.valuesRef.current;return O[P]=l,()=>{delete O[P]}},[P,l,y]),qe(()=>{const O=y.state.value,F=y.state.selectedIndex;let G=F,L;k&&Array.isArray(O)?(G=N4(P,l,y.context.valuesRef.current,O,N,F),L=G===P,P===F&&!L&&(y.context.selectedItemTextRef.current=null)):(L=O!==void 0&&sa(l,O,N),L&&(G=P)),y.set("selectedIndex",G),L&&m.current&&(y.context.selectedItemTextRef.current=m.current)},[P,k,N,y,l]);const I=v.useRef("mouse"),V=v.useRef(!1),{getButtonProps:B,buttonRef:z}=jl({disabled:E,focusableWhenDisabled:!0,native:d,composite:!0}),j={disabled:E,selected:D,highlighted:R};function H(O){if(T||C)return;const F=y.state.value;if(k){const G=Array.isArray(F)?F:[],L=D?O4(G,l,N):[...G,l];y.context.setValue(L,wt(mb,O))}else y.context.setValue(l,wt(mb,O)),y.context.setOpen(!1,wt(mb,O))}function q(){y.context.selectionRef.current.dragY=0}const K={role:"option","aria-selected":D,tabIndex:_&&R?0:-1,onKeyDown(O){y.set("activeIndex",P),O.key===" "&&y.context.typingRef.current&&O.preventDefault()},onClick(O){const F=I.current!=="touch",G=O.nativeEvent.pointerType,L=F&&hh(O.nativeEvent)&&(G!==void 0||R),X=F&&!L&&!V.current;V.current=!1,!(E||X)&&H(O.nativeEvent)},onPointerEnter(O){I.current=O.pointerType},onPointerMove(O){if(O.pointerType==="mouse"&&O.buttons===1){const F=y.context.selectionRef.current;F.dragY+=O.movementY,F.dragY**2>=64&&(F.allowUnselectedMouseUp=!0)}},onPointerDown(O){I.current=O.pointerType,V.current=!0,q()},onMouseUp(){if(q(),E||I.current==="touch"||V.current)return;const O=!y.context.selectionRef.current.allowSelectedMouseUp&&D,F=!y.context.selectionRef.current.allowUnselectedMouseUp&&!D;O||F||(V.current=!0,$.current?.click(),V.current=!1)}},U=dn("div",t,{ref:[z,n,b.ref,$],state:j,props:[S,K,h,B]}),Y=v.useMemo(()=>({selected:D,index:P,textRef:m,selectedByFocus:A}),[D,P,m,A]);return g.jsx($I.Provider,{value:Y,children:U})})),FT=v.forwardRef(function(t,n){const{selected:r}=fx();return t.keepMounted||r?g.jsx(hq,{...t,ref:n}):null}),hq=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=fx(),f=v.useRef(null),{transitionStatus:d,setMounted:h}=Hc(c),b=dn("span",e,{ref:[t,f],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:da});return Ro({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||h(!1)}}),b})),mq=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a}=fx(),l=Ls(),{render:c,className:f,style:d,...h}=t,m=v.useCallback(y=>{y&&(r===0&&(l.context.firstItemTextRef.current=y),a&&(l.context.selectedItemTextRef.current=y))},[l,r,a]);return dn("div",t,{ref:[m,n,s],props:h})})),FI="lg",BI="outline",gq={"ui--default-marker":"ui--default-marker",$$css:!0},Gi={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}},BT={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj ui-1s8h5yg",$$css:!0}},bq="sm",yq={md:Gi.sizeMd,lg:Gi.sizeLg},vq={md:Gi.frameContentMd,lg:Gi.frameContentLg},xq={md:Gi.frameContentHugFalseMd,lg:Gi.frameContentHugFalseLg};function kq({children:e,variant:t=BI,frame:n="container",shape:r="rounded",size:s=FI,hug:a=!0,className:l,style:c,rootStyle:f,labelStyle:d,disabled:h=!1,id:m,leading:b,trailing:y,open:S,placeholder:k,hideChevron:T=!1,ref:C,"data-popup-open":E,...R}){const _=e==null&&k!=null,D=S??(E!==void 0&&E!==!1),A=S===void 0?E:S||void 0,N=T0(t,void 0),P=Dt(R0.root,Gi.base,_s.root,Vi[s],yq[s],Ri.appearance,N.applyControlTone&&C0.foreground,N.applyFilledColors&&Ri.colors,N.applyNonFilledBackground&&Tl.background,t==="outline"&&Tl.outline,D&&Ri.engaged,!a&&Gi.hugFalse,r==="pill"?Gi.shapePill:Gi.shapeRounded,n==="content"&&vq[s],n==="content"&&!a&&xq[s],f,gq),$=Dt(Bl.root,Th.root,BT.base,_&&BT.placeholder,d),I={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},V={0:{className:"ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!D<<0];return g.jsxs(E0,{...R,ref:C,id:m,className:Qt("ui-select-trigger",P.className,l),style:{...P.style,...c},"data-popup-open":A,"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:Qt("ui-select-label",$.className),style:$.style,children:_?k:e}),y!=null&&g.jsx("span",{className:I.className,style:I.style,children:y}),T?null:g.jsx(Pt,{name:"chevron-down",size:10,className:Qt("ui-select-icon",V.className),style:V.style})]})}const UI=v.createContext(null);function dx(){const e=v.useContext(UI);if(!e)throw new Error("Select internals must be used within Select");return e}function Sq(){const e=dx(),t=e.hasValue?g.jsx(rq,{}):void 0;return g.jsx(tq,{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(kq,{...n,className:Qt(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 wq({children:e}){const t=dx(),{labelId:n}=_h(),r=t.ariaLabelledBy??n,s=ma(),{zIndex:a,portalLayerStyles:l}=Fl("popover",t.open),c=Lh(t.placement,t.offset,!1,t.collisionSide),f=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(iq,{container:s??void 0,style:l,children:[g.jsx(oq,{"data-component":"select-backdrop",...Dt(kF,a!==null&&SF(a-1))}),g.jsx(lq,{align:c.align,alignItemWithTrigger:!1,alignOffset:c.alignOffset,collisionAvoidance:c.collisionAvoidance,"data-component":"select-positioner",positionMethod:c.positionMethod,side:c.side,sideOffset:c.sideOffset,...Oh(dF,xF),children:g.jsx(cq,{"data-block-global-shortcuts":t.open?"Escape":void 0,"data-component":"select-popup","data-size":t.menuSize,...Dt(EF,Nh,TF[t.menuSize],f!==void 0?CF(f):RF,t.contentStyle),children:g.jsx(Ms,{menuSize:t.menuSize,children:g.jsx(l5,{children:g.jsx(dq,{"aria-label":t.ariaLabel??(r===void 0?"Select an option":void 0),"aria-labelledby":r,...Dt(_F),children:e})})})})})]})}function Eq({option:e}){dx();const t=e.description!==void 0,n=g.jsxs(pq,{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,...Dt(AF),children:[e.leading!=null?g.jsx("span",{...Dt(Ab,jF,t&&Nb),children:e.leading}):null,g.jsxs("span",{...Dt(NF,t&&MF),children:[g.jsxs(mq,{...Dt(e.labelMeta!=null&&IF),children:[g.jsx("span",{...Dt(OF),children:e.label}),e.labelMeta!=null?g.jsx("span",{...Dt(LF),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...Dt(DF,Ds.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...Dt(Ab,ME,zF,t&&Nb),children:[e.trailing,g.jsx(FT,{"data-component":"select-item-indicator",children:g.jsx(Pt,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(FT,{"data-component":"select-item-indicator",...Dt(Ab,ME,t&&Nb),children:g.jsx(Pt,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(ef,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function Tq({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:f=BI,frame:d="container",shape:h="rounded",size:m=FI,menuSize:b,contentWidth:y,matchAnchorWidth:S=!1,hug:k=!0,disabled:T=!1,className:C,renderTrigger:E,placement:R="bottom-start",offset:_=4,collisionSide:D="flip","aria-label":A,"aria-labelledby":N,id:P,leading:$,trailing:I,labelStyle:V,rootStyle:B,hideChevron:z=!1,contentStyle:j,...H}){const[q,K]=Ol(e,t,void 0,"Select.Root (value)"),U=q!=null&&l.some(J=>J.value===q),[Y,O]=Ol(r,s??!1,void 0,"Select.Root (open)"),F=b??"sm",G=v.useCallback((J,le)=>{n?.(J,le),!le.isCanceled&&K(J)},[n,K]),L=v.useCallback((J,le)=>{a?.(J,le),!le.isCanceled&&O(J)},[a,O]),X=v.useMemo(()=>({hasValue:U,variant:f,frame:d,shape:h,size:m,menuSize:F,hug:k,disabled:T,open:Y,placement:R,offset:_,collisionSide:D,id:P,ariaLabel:A,ariaLabelledBy:N,placeholder:c,leading:$,trailing:I,labelStyle:V,rootStyle:B,hideChevron:z,contentStyle:j,className:C,renderTrigger:E,contentWidth:y,matchAnchorWidth:S}),[A,N,C,D,j,y,T,d,k,U,z,P,Y,V,$,S,_,R,c,F,B,I,E,h,m,f]),te=l.map(J=>({label:J.label,value:J.value}));return g.jsx(UI.Provider,{value:X,children:g.jsx(Ms,{iconSize:bq,children:g.jsxs(ZH,{...H,defaultOpen:s,defaultValue:t,disabled:T,id:P,items:te,onOpenChange:L,onValueChange:G,open:r,value:e,children:[g.jsx(Sq,{}),g.jsx(wq,{children:l.map((J,le)=>g.jsx(Eq,{option:J},typeof J.value=="string"||typeof J.value=="number"?String(J.value):le))})]})})})}const Cq=v.createContext(void 0);function Rq(){return v.useContext(Cq)}const _q=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:f,render:d,type:h,value:m,nativeButton:b=!0,style:y,...S}=t,k=Pl(m||void 0),T=Rq(),C=T?.value??[],E=(a||T?.disabled)??!1,[R,_]=Cl({controlled:T?k!==void 0&&C.indexOf(k)>-1:f,default:s,name:"Toggle",state:"pressed"}),{getButtonProps:D,buttonRef:A}=jl({disabled:E,native:b}),N={disabled:E,pressed:R},P=[A,n],$=[{"aria-pressed":R,onClick(B){const z=!R,j=wt(Ni,B.nativeEvent);c?.(z,j),!j.isCanceled&&(k&&T?.setGroupValue?.(k,z,j),!j.isCanceled&&_(z))}},S,D],I=dn("button",t,{enabled:!T,state:N,ref:P,props:$}),V=v.useMemo(()=>({disabled:E,focusableWhenDisabled:!1}),[E]);return T?g.jsx(QB,{tag:"button",render:d,className:r,style:y,metadata:V,state:N,refs:P,props:$}):I});function UT(e,t,n,r){return typeof e=="string"?g.jsx(Pt,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...XN(n),"aria-hidden":"true",children:e})}function Aq({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:UT(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:UT(t,r,s,a)})]})}function Nq({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,rounded:s,frame:a="container",size:l,iconSize:c,tone:f,rootStyle:d,iconStyle:h,disabled:m,"aria-label":b,"aria-labelledby":y,...S}){const k=ha(),{size:T,innerIconSize:C,disabled:E,variant:R,tone:_}=QN({disabled:m,enforced:k,iconSize:c,size:l,tone:f,variant:r}),D=ZN({enforcedRootStyle:k?.iconButtonRootStyle,frame:a,rootStyle:d,rounded:s,size:T,tone:_,variant:R});return g.jsx(_q,{...S,className:Qt("ui-icon-button",D.rootAttrs.className),style:D.rootAttrs.style,...D.dataAttrs,"aria-label":b,"aria-labelledby":y,"data-component":"toggle-icon-button",disabled:E,render:(A,N)=>g.jsx("button",{...A,"data-pressed":void 0,children:g.jsx(Aq,{icon:e,iconSize:C,iconStyle:[k?.iconButtonIconStyle,h],iconVariant:n,pressed:N.pressed,pressedIcon:t})})})}function Oq({pressed:e,...t}){return g.jsx(Nq,{...t,pressed:e,variant:e?"secondary":"ghost"})}const HT=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;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:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},Iq=(e=>e?HT(e):HT),Mq=e=>e;function Dq(e,t=Mq){const n=tc.useSyncExternalStore(e.subscribe,tc.useCallback(()=>t(e.getState()),[e,t]),tc.useCallback(()=>t(e.getInitialState()),[e,t]));return tc.useDebugValue(n),n}const Lq=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,jq=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function zq(e=window.location.pathname,t=window.location.hostname){const n=jq.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=Lq.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function Pq(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function HI(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 $q(e,t=window){const n=()=>{const r=HI(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}function qI(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 VI(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:qI(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 Fq(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 Bq(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function Uq(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 Hq(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 qq(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function Vq(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function qT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function GI(e){return[...e].sort((t,n)=>qT(n)-qT(t))}function Gq(e,t){return t===null?e:e.filter(n=>n.kind===t)}function Wq(e){const t=new Map,n=[];for(const s of GI(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 Kq=["home","runs","evals","logs"],av="section",Yq="home",Xq={agent:"home"};function Zq(e){const t=e?.trim()??"";return t===""?null:Kq.includes(t)?t:Xq[t]??null}function Qq(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=Zq(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 WI(e){try{const t=new URL(window.location.href);e===Yq?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 Jq="cursor-playground",eV=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function tV(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return eV.includes(n)?n:null}function nV(e,t,n=tV(),r){if(n===null)return;const s={source:Jq,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}const VT=e=>Number.isFinite(e)?e:0;function rV(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(VT(e*1e3)%1e3),nanoseconds:Math.trunc(VT(e*1e6)%1e3)}}function iV(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 sV(e){switch(typeof e){case"number":{if(Number.isFinite(e))return rV(e);break}case"bigint":return iV(e)}throw new TypeError("Expected a finite number or bigint")}const oV=e=>e===0||e===0n,aV=(e,t)=>t===1||t===1n?e:`${e}s`,lV=1e-7,uV=24n*60n*60n*1000n;function cV(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+lV);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&oV(h)&&!(t.colonNotation&&b==="m"))){if(y??=String(h),t.colonNotation){const S=y.includes(".")?y.split(".")[0].length:y.length,k=s.length>0?2:1;y="0".repeat(Math.max(0,k-S))+y}else y+=t.verbose?" "+aV(m,h):b;s.push(y)}},c=sV(e),f=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(f)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(f,"day","d"):(l(f/365n,"year","y"),l(f%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 S=m+b/1e3+y/1e6,k=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,T=S>=1?Math.round(S):Math.ceil(S),C=k?S.toFixed(k):T;l(Number.parseFloat(C),"millisecond","ms",C)}}else{const h=(n?Number(e%uV):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 d=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(d)}var KI="en",px={},lv={};function YI(){return KI}function XI(e){KI=e}function fV(e){return px[e]}function ZI(e){if(!e)throw new Error("No locale data passed");px[e.locale]=e,lv[e.locale.toLowerCase()]=e.locale}function GT(e){if(px[e])return e;if(lv[e.toLowerCase()])return lv[e.toLowerCase()]}function QI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return WT(e);case"best fit":return WT(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function WT(e){var t=GT(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=GT(e);if(r)return r}}var re={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),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||f>=2&&f<=4&&(d<12||d>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),f=r.slice(-2),d=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&f>=11&&f<=19?"zero":l==1&&c!=11||s==2&&d==1&&f!=11||s!=2&&d==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),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=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"}};re.as=re.am;re.az=re.af;re.bal=re.af;re.bg=re.af;re.bn=re.am;re.brx=re.af;re.ce=re.af;re.chr=re.af;re.csw=re.ak;re.cv=re.blo;re.de=re.ast;re.doi=re.am;re.ee=re.af;re.el=re.af;re.en=re.ast;re.eo=re.af;re.et=re.ast;re.eu=re.af;re.fa=re.am;re.fi=re.ast;re.fil=re.ceb;re.fo=re.af;re.fur=re.af;re.fy=re.ast;re.gl=re.ast;re.gu=re.am;re.ha=re.af;re.hi=re.am;re.hr=re.bs;re.hsb=re.dsb;re.hu=re.af;re.hy=re.ff;re.ia=re.ast;re.id=re.dz;re.ie=re.ast;re.ig=re.dz;re.ii=re.dz;re.it=re.ca;re.ja=re.dz;re.jgo=re.af;re.jv=re.dz;re.ka=re.af;re.kea=re.dz;re.kk=re.af;re.kl=re.af;re.km=re.dz;re.kn=re.am;re.ko=re.dz;re.kok=re.am;re.ks=re.af;re.ksh=re.blo;re.ku=re.af;re.ky=re.af;re.lb=re.af;re.lkt=re.dz;re.lld=re.ca;re.lo=re.dz;re.ml=re.af;re.mn=re.af;re.mr=re.af;re.ms=re.dz;re.my=re.dz;re.nb=re.af;re.ne=re.af;re.nl=re.ast;re.nn=re.af;re.no=re.af;re.nqo=re.dz;re.nso=re.ak;re.om=re.af;re.or=re.af;re.pa=re.ak;re.pcm=re.am;re.ps=re.af;re.rm=re.af;re.sah=re.dz;re.sc=re.ast;re.scn=re.ca;re.sd=re.af;re.sk=re.cs;re.so=re.af;re.sq=re.af;re.sr=re.bs;re.su=re.dz;re.sv=re.ast;re.sw=re.ast;re.syr=re.af;re.ta=re.af;re.te=re.af;re.th=re.dz;re.ti=re.ak;re.tk=re.af;re.tn=re.af;re.to=re.dz;re.tr=re.af;re.ug=re.af;re.uk=re.ru;re.ur=re.ast;re.uz=re.af;re.vec=re.ca;re.vi=re.dz;re.wae=re.af;re.wo=re.dz;re.xh=re.af;re.yi=re.ast;re.yo=re.dz;re.yue=re.dz;re.zh=re.dz;re.zu=re.am;function KT(e){return e==="pt-PT"?e:pV(e)}var dV=/^([a-z0-9]+)/i;function pV(e){var t=e.match(dV);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function wc(e){"@babel/helpers - typeof";return wc=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},wc(e)}function hV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YT(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,gV(r.key),r)}}function mV(e,t,n){return t&&YT(e.prototype,t),n&&YT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gV(e){var t=bV(e,"string");return wc(t)=="symbol"?t:t+""}function bV(e,t){if(wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uv=(function(){function e(t,n){hV(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.$=re[KT(r[0])]}return mV(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 re[KT(r)]})}}]),e})();function Ml(e){"@babel/helpers - typeof";return Ml=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},Ml(e)}function XT(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?XT(Object(n),!0).forEach(function(r){yV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yV(e,t,n){return(t=JI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QT(e,t){return SV(e)||kV(e,t)||xV(e,t)||vV()}function vV(){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 xV(e,t){if(e){if(typeof e=="string")return JT(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)?JT(e,t):void 0}}function JT(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 kV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function SV(e){if(Array.isArray(e))return e}function wV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EV(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,JI(r.key),r)}}function TV(e,t,n){return t&&EV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JI(e){var t=CV(e,"string");return Ml(t)=="symbol"?t:t+""}function CV(e,t){if(Ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var RV=["second","minute","hour","day","week","month","quarter","year"],_V=["auto","always"],AV=["long","short","narrow"],NV=["lookup","best fit"],Ns=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};wV(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(_V.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(AV.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(NV.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(YI()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");uv.supportedLocalesOf(this.locale).length>0?this.pluralRules=new uv(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=QI(this.locale,{localeMatcher:this.localeMatcher})}return TV(e,[{key:"format",value:function(){var n=eC(arguments),r=QT(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=eC(arguments),r=QT(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 f=[];return c>0&&f.push({type:"literal",value:l.slice(0,c)}),f=f.concat(this.formatNumberToParts(Math.abs(s)).map(function(d){return ZT(ZT({},d),{},{unit:a})})),c+3<l.length-1&&f.push({type:"literal",value:l.slice(c+3)}),f}},{key:"getRule",value:function(n,r){var s=fV(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[LV(n)?"past":"future"];if(typeof c=="string")return c;var f=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[f]||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})();Ns.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 QI(n,t)})};Ns.addLocale=ZI;Ns.addDefaultLocale=function(e){ZI(e),XI(e.locale)};Ns.setDefaultLocale=XI;Ns.getDefaultLocale=YI;Ns.PluralRules=uv;var Qb='Invalid "unit" argument';function OV(e){if(Ml(e)==="symbol")throw new TypeError(Qb);if(typeof e!="string")throw new RangeError("".concat(Qb,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),RV.indexOf(e)<0)throw new RangeError("".concat(Qb,": ").concat(e));return e}var IV='Invalid "number" argument';function MV(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(IV,": ").concat(e));return e}function DV(e){return 1/e===-1/0}function LV(e){return e<0||e===0&&DV(e)}function eC(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[MV(e[0]),OV(e[1])]}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 jV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zV(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,$V(r.key),r)}}function PV(e,t,n){return t&&zV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $V(e){var t=FV(e,"string");return oa(t)=="symbol"?t:t+""}function FV(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 tC=(function(){function e(){jV(this,e),this.cache={}}return PV(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 f=c[l];if(oa(n)!=="object")return;n=n[f]}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,f=0,d=r;f<d.length;f++){var h=d[f];oa(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function cv(e){"@babel/helpers - typeof";return cv=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},cv(e)}function BV(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=UV(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 UV(e,t){if(e){if(typeof e=="string")return nC(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)?nC(e,t):void 0}}function nC(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 HV(e,t){for(var n=BV(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 qV(){var e=(typeof Intl>"u"?"undefined":cv(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function fv(e){"@babel/helpers - typeof";return fv=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},fv(e)}function VV(e){return WV(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 GV={}.constructor;function WV(e){return fv(e)!==void 0&&e!==null&&e.constructor===GV}var xs=60,Yp=60*xs,na=24*Yp,dv=7*na,pv=30.44*na,eM=146097/400*na;function yl(e){switch(e){case"second":return 1;case"minute":return xs;case"hour":return Yp;case"day":return na;case"week":return dv;case"month":return pv;case"year":return eM}}function tM(e){return e.factor!==void 0?e.factor:yl(e.unit||e.formatAs)||1}function Ec(e){return e==="floor"?Math.floor:Math.round}function hx(e){return e==="floor"?1:.5}function hv(e){"@babel/helpers - typeof";return hv=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},hv(e)}function nM(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),hv(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(d,h){return rC(d,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=rC(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 rC(e,t,n){var r=n.round,s=yl(e),a=yl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-hx(r))}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 iC(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 KV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iC(Object(n),!0).forEach(function(r){YV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YV(e,t,n){return(t=XV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XV(e){var t=ZV(e,"string");return Tc(t)=="symbol"?t:t+""}function ZV(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(t==="string"?String:Number)(e)}function QV(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=eG(e,l);var c=JV(e,t,{now:r,future:s,round:a});{if(c){var f=e[e.indexOf(c)-1],d=e[e.indexOf(c)+1];return[f,c,d]}return[void 0,void 0,e[0]]}}function JV(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=rM(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var f=Ec(a)(Math.abs(t)/tM(c)/c.granularity)*c.granularity;if(f===0&&l>0)return e[l-1]}return c}}}function rM(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=nM(e[r],KV({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:rM(e,t,n,r+1)}function eG(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 tG(e,t,n){var r=n.now,s=n.round;if(yl(e)){var a=yl(e)*1e3,l=t>r,c=Math.abs(t-r),f=Ec(s)(c/a)*a;return l?f>0?c-f+rG(s,a):c-f+1:-(c-f)+nG(s,a)}}function nG(e,t){return hx(e)*t}function rG(e,t){return(1-hx(e))*t+1}var iG=365*24*60*60*1e3,iM=1e3*iG;function sG(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,f=e.getTime?e.getTime():e,d=function(S){return tG(S,f,{now:a,round:c})},h=aG(l?t:s,f,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(f,{getTimeToNextUpdateForUnit:d,getRoundFunction:Ec,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=d(b))}return m===void 0?h:Math.min(m,h)}}function oG(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=nM(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?iM:t+c*1e3}function aG(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=oG(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:iM}var sM={};function pl(e){return sM[e]}function oM(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");sM[e.locale]=e}const lG=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],mv={steps:lG,labels:"long"};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 sC(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 oC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(n),!0).forEach(function(r){uG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uG(e,t,n){return(t=cG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cG(e){var t=fG(e,"string");return Cc(t)=="symbol"?t:t+""}function fG(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)}const gv=oC(oC({},mv),{},{steps:mv.steps.filter(function(e){return e.formatAs!=="second"})}),aM=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:xs,unit:"minute"},{threshold:2.5*xs,granularity:5,factor:xs,unit:"minute"},{threshold:22.5*xs,factor:.5*Yp,unit:"half-hour"},{threshold:42.5*xs,threshold_for_minute:52.5*xs,factor:Yp,unit:"hour"},{threshold:20.5/24*na,factor:na,unit:"day"},{threshold:5.5*na,factor:dv,unit:"week"},{threshold:3.5*dv,factor:pv,unit:"month"},{threshold:10.5*pv,factor:eM,unit:"year"}],aC={gradation:aM,flavour:"long",units:["now","minute","hour","day","week","month","year"]},dG={gradation:aM,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function lM(e){return e instanceof Date?e:new Date(e)}var bv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],qi={},pG={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return qi[n]||(qi[n]={}),qi[n].dayMonth||(qi[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),qi[n].dayMonth.format(lM(t))}},hG={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 qi[n]||(qi[n]={}),qi[n].dayMonthYear||(qi[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),qi[n].dayMonthYear.format(lM(t))}};qV()?bv.push(pG,hG):bv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const aa={steps:bv,labels:["mini","short-time","narrow","short"]};function Rc(e){"@babel/helpers - typeof";return Rc=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},Rc(e)}function lC(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 uC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(n),!0).forEach(function(r){mG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mG(e,t,n){return(t=gG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gG(e){var t=bG(e,"string");return Rc(t)=="symbol"?t:t+""}function bG(e,t){if(Rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const yG=uC(uC({},aa),{},{steps:[{formatAs:"now"}].concat(aa.steps)});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 cC(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 fC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cC(Object(n),!0).forEach(function(r){vG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vG(e,t,n){return(t=xG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xG(e){var t=kG(e,"string");return _c(t)=="symbol"?t:t+""}function kG(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 yv=fC(fC({},aa),{},{steps:aa.steps.filter(function(e){return e.formatAs!=="second"})});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 dC(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 pC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(n),!0).forEach(function(r){SG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SG(e,t,n){return(t=wG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wG(e){var t=EG(e,"string");return Ac(t)=="symbol"?t:t+""}function EG(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 TG=pC(pC({},yv),{},{steps:[{formatAs:"now"}].concat(yv.steps)});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 hC(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 Yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(n),!0).forEach(function(r){CG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CG(e,t,n){return(t=RG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RG(e){var t=_G(e,"string");return Nc(t)=="symbol"?t:t+""}function _G(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 AG=Yd(Yd({},aa),{},{steps:aa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Yd(Yd({},e),{},{minTime:xs}):e})}),Oc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function Ic(e){"@babel/helpers - typeof";return Ic=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},Ic(e)}function mC(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 gC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mC(Object(n),!0).forEach(function(r){NG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NG(e,t,n){return(t=OG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OG(e){var t=IG(e,"string");return Ic(t)=="symbol"?t:t+""}function IG(e,t){if(Ic(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ic(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const MG=gC(gC({},Oc),{},{steps:[{formatAs:"now"}].concat(Oc.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 bC(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 yC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(n),!0).forEach(function(r){DG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DG(e,t,n){return(t=LG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LG(e){var t=jG(e,"string");return Mc(t)=="symbol"?t:t+""}function jG(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 vv=yC(yC({},Oc),{},{steps:Oc.steps.filter(function(e){return e.formatAs!=="second"})});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 vC(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 xC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(n),!0).forEach(function(r){zG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zG(e,t,n){return(t=PG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PG(e){var t=$G(e,"string");return Dc(t)=="symbol"?t:t+""}function $G(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 FG=xC(xC({},vv),{},{steps:[{formatAs:"now"}].concat(vv.steps)});function BG(e){switch(e){case"default":case"round":return mv;case"round-minute":return gv;case"approximate":return aC;case"time":case"approximate-time":return dG;case"mini":return Oc;case"mini-now":return MG;case"mini-minute":return vv;case"mini-minute-now":return FG;case"twitter":return aa;case"twitter-now":return yG;case"twitter-minute":return yv;case"twitter-minute-now":return TG;case"twitter-first-minute":return AG;default:return aC}}function la(e){"@babel/helpers - typeof";return la=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},la(e)}function UG(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=uM(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 HG(e,t){return GG(e)||VG(e,t)||uM(e,t)||qG()}function qG(){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 uM(e,t){if(e){if(typeof e=="string")return kC(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)?kC(e,t):void 0}}function kC(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 VG(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function GG(e){if(Array.isArray(e))return e}function WG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KG(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,XG(r.key),r)}}function YG(e,t,n){return t&&KG(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XG(e){var t=ZG(e,"string");return la(t)=="symbol"?t:t+""}function ZG(e,t){if(la(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(la(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zr=(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;WG(this,e),typeof t=="string"&&(t=[t]),this.locale=HV(t.concat(e.getDefaultLocale()),pl),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Ns,this.IntlPluralRules=Ns.PluralRules),this.relativeTimeFormatCache=new tC,this.pluralRulesCache=new tC}return YG(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!nW(r)?(s=r,r=void 0):s={}),r||(r=gv),typeof r=="string"&&(r=BG(r));var l=QG(n),c=this.getLabels(r.flavour||r.labels),f=c.labels,d=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(A){var N=A.now,P=(N-l)/1e3,$=s.future||P<0,I=tW(f,pl(a.locale).now,pl(a.locale).long,$);if(r.custom){var V=r.custom({now:N,date:new Date(l),time:l,elapsed:P,locale:a.locale});if(V!==void 0)return{getText:function(){return V},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var B=eW(r.units,f,I),z=QV(r.gradation||r.steps||gv.steps,P,{now:N,units:B,round:h,future:$}),j=HG(z,3),H=j[0],q=j[1],K=j[2],U=function(){return a.formatDateForStep(l,q,P,{labels:f,labelsType:d,nowLabel:I,now:N,future:$,round:h})||""},Y=function(){var F=sG(l,q,{nextStep:K,prevStep:H,now:N,future:$,round:h});if(typeof F=="number")return s.getTimeToNextUpdateUncapped?F:fM(F)};return{getText:U,getTextRefreshDelay:Y}},S=y({now:m}),k=S.getText,T=S.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[k(),T()];if(s.refresh){var C=6e4,E,R=function D(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C;E=rW(function(){var N=y({now:m+(Date.now()-b)}),P=N.getText,$=N.getTextRefreshDelay;s.refresh(P()),D($())},A)};R(T());var _=function(){clearTimeout(E)};return[k(),_]}return k()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,f=a.labelsType,d=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(C,E){return l.formatValue(E,C,{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 d;var S=Math.abs(s)/tM(r);r.granularity&&(S=Ec(b)(S/r.granularity)*r.granularity);var k=-1*Math.sign(s)*Ec(b)(S);switch(k===0&&(m?k=0:k=-0),f){case"long":case"short":case"narrow":return this.getFormatter(f).format(k,y);default:return this.formatValue(k,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",f=n[c]||n;if(typeof f=="string")return f;var d=this.getPluralRules().select(Math.abs(s));return f[d]||f.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=pl(this.locale),s=UG(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),cM="en";zr.getDefaultLocale=function(){return cM};zr.setDefaultLocale=function(e){xv=!0,cM=e};zr.addDefaultLocale=function(e){xv&&zr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(zr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),xv=!0,zr.addLocale(e),zr.setDefaultLocale(e.locale)};var xv=!1;zr.addLocale=function(e){oM(e),Ns.addLocale(e)};zr.locale=zr.addLocale;zr.addLabels=function(e,t,n){var r=pl(e);r||(oM({locale:e}),r=pl(e)),r[t]=n};function QG(e){if(e.constructor===Date||JG(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(la(e),", ").concat(e))}function JG(e){return la(e)==="object"&&typeof e.getTime=="function"}function eW(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 tW(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 nW(e){return typeof e=="string"||VV(e)}function rW(e,t){return setTimeout(e,fM(t))}function fM(e){return Math.min(e,iW)}var iW=2147483647;const dM={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"}}};zr.addLocale(dM);zr.addDefaultLocale(dM);const sW=new zr("en-US");function zn(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 Qr(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function oW(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 vl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Ii(e){return e==null||!Number.isFinite(e)?"—":cV(e)}function mx(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 aW=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function SC(e){return e==null||!Number.isFinite(e)?"—":aW.format(e)}function kv(e,t=Date.now()){const n=vl(e);return n===null?null:sW.format(Math.min(n,t),"mini",{now:t})}function Co(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 lW=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function Xp(e){return e==null||!Number.isFinite(e)?"0":lW.format(e)}function uW(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function pM(e){if(e?.redacted===!0)return null;const t=e?.text;return typeof t=="string"&&t!==""?t:null}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}const cW=new Set(["review.cursor.com"]);function hM(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==="cursor.com"&&n[0]==="codebase"&&n.length>=5&&n[3]==="pull"||cW.has(t.hostname)&&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 fW(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}function mM(e){return e!=="http"}const dW=new Set(["chat","trace","raw","artifacts"]);function pW(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&mM(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&dW.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function hW(e){return e.filter(t=>mM(t.channelId)&&t.running===!0).length}function wC(e,t){return typeof t.text=="string"?t.text:typeof t.delta=="string"?e+t.delta:e}const mW=new Set(["github","slack"]);function gW(e){return/^\s*\//.test(e)}function Yh(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&mW.has(n.kind)))for(const r of n.routes??[]){const s=kW(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:Zp(n.method)-Zp(r.method)}),t}function gM(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 bW(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 yW(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(d=>d.method).join("|"),l=s.find(d=>d.description)?.description??"",c=gx(s[0]),f=bM(c);t.push(f?`- \`${r}\` (${a}) — ${l}${l?" ":""}${f}`:`- \`${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 vW(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=gM(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=xW(l,a),f=gx(c),d=EW(a,f);if(!d.ok)return{ok:!1,error:d.error,commandName:s};const h=SW(f,d.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${bM(f)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:RW(d.value)}:{ok:!0,command:c,body:d.value,query:c.querySchema!==void 0?_W(d.value,c.querySchema):void 0}}function xW(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>Zp(a.method)-Zp(l.method)),r=yM(t);if(r!==null){let a=null,l=-1;for(const c of n){const f=gx(c),d=wW(f,r);d>l&&(l=d,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 kW(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 Zp(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 gx(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function bM(e){if(e===void 0)return"";const t=Xh(e);if(t===void 0)return"";const n=Zh(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 Xh(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 Zh(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function SW(e,t){const n=Zh(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function wW(e,t){const n=Xh(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 Zh(e))s in t&&(r+=3);return r}function yM(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 EW(e,t){if(e==="")return{ok:!0,value:{}};const n=yM(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=Xh(t),s={},a=[];for(const l of TW(e)){const c=l.indexOf("=");if(c>0){const f=l.slice(0,c),d=l.slice(c+1);s[f]=CW(d,r?.[f])}else a.push(l)}if(a.length>0){const l=[...Zh(t)],c=(l.length>0?l:Object.keys(r??{})).filter(d=>{const h=r?.[d];return h===void 0||h.type==="string"||h.type===void 0}),f=c.find(d=>s[d]===void 0)??c[0];if(f===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[f]=a[0]:s[f]=a.join(" ")}return{ok:!0,value:s}}function TW(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 CW(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 RW(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function _W(e,t){const n=Xh(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 mt={infoRead:"info.read",sessionRead:"session.read",sessionStart:"session.start",sessionFollowUp:"session.followUp",sessionStop:"session.stop",sessionStream:"session.stream",eventRead:"event.read",sessionCost:"session.cost",approvalResolve:"approval.resolve",authResolve:"auth.resolve",logRead:"log.read",artifactRead:"artifact.read",artifactContent:"artifact.content",scheduleDispatch:"schedule.dispatch",evalRead:"eval.read",evalRun:"eval.run",evalCancel:"eval.cancel",channelInvoke:"channel.invoke"},AW=new Set(Object.values(mt));class NW{constructor(t){this.client=t,this.capabilities=AW,this.health=()=>this.client.health(),this.info=()=>this.client.info(),this.meta=()=>this.client.meta(),this.logs=n=>this.client.logs(n),this.sessions=()=>this.client.sessions(),this.createSession=n=>this.client.createSession(n),this.followUp=(n,r,s)=>this.client.followUp(n,r,s),this.stopSession=n=>this.client.stopSession(n),this.subscribeEvents=(n,r,s)=>this.client.streamFetch(n,r,s),this.eventsText=n=>this.client.eventsText(n),this.sessionCost=n=>this.client.sessionCost(n),this.resolveApproval=(n,r,s)=>this.client.resolveApproval(n,r,s),this.resolveAuth=(n,r,s)=>this.client.resolveAuth(n,r,s),this.artifacts=n=>this.client.artifacts(n),this.artifactContent=(n,r)=>this.client.artifactContent(n,r),this.dispatchSchedule=n=>this.client.dispatchSchedule(n),this.evalsList=()=>this.client.evalsList(),this.evalsListRuns=()=>this.client.evalsListRuns(),this.evalsStartRun=n=>this.client.evalsStartRun(n),this.evalsRunStatus=n=>this.client.evalsRunStatus(n),this.evalsCancelRun=n=>this.client.evalsCancelRun(n),this.channelRequest=(n,r,s)=>this.client.channelRequest(n,r,s),this.url=n=>this.client.url(n)}}class OW{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")}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,f=!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,f=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const d=new Uint8Array(c);let h=0;for(const m of l)d.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:d,truncated:f}}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[f,d]of Object.entries(r.query))d!==""&&l.set(f,d);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`)}}const IW="agent-sdk-playground-boot";function MW(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function DW(e){const t=e.getElementById(IW);if(t===null)return{kind:"local"};let n;try{n=JSON.parse(t.textContent??"")}catch{throw new Error("Playground boot document is not valid JSON.")}if(!MW(n)||n.transport!=="hosted")throw new Error("Playground boot document has an unknown transport.");if(typeof n.teamId!="number"||!Number.isSafeInteger(n.teamId)||n.teamId<=0||typeof n.deploymentSlug!="string"||n.deploymentSlug.length===0||n.evals!==void 0&&typeof n.evals!="boolean")throw new Error("Playground hosted transport configuration is invalid.");return{kind:"hosted",teamId:n.teamId,deploymentSlug:n.deploymentSlug,evals:n.evals===!0}}const vM=new Set([mt.infoRead,mt.sessionRead,mt.sessionStart,mt.sessionFollowUp,mt.sessionStream,mt.eventRead,mt.logRead]),LW=new Set([...vM,mt.evalRead,mt.evalRun]),EC=18e4,jW=1e3,TC=500;function zW(e){return Math.min(100*2**e,jW)}const PW=2e4,$W=5e3,FW=100,BW=e=>new Promise(t=>globalThis.setTimeout(t,e));function fn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function UW(e){return!fn(e)||typeof e.slug!="string"?null:{slug:e.slug,cliVersion:typeof e.manifestCliVersion=="string"?e.manifestCliVersion:void 0}}function HW(e){if(!fn(e)||!Array.isArray(e.components))return null;const t=e.components.filter(n=>fn(n)&&typeof n.componentKey=="string"&&fn(n.info));return(t.find(n=>n.componentKey==="default")??t[0])?.info??null}function qW(e){return!fn(e)||typeof e.deliveryId!="string"||e.deliveryId===""||e.sessionId!==void 0&&(typeof e.sessionId!="string"||e.sessionId==="")?null:{deliveryId:e.deliveryId,sessionId:e.sessionId}}function VW(e){return fn(e)?e.status==="pending"?{status:"pending"}:e.status==="allocated"&&typeof e.sessionId=="string"&&e.sessionId!==""?{status:"allocated",sessionId:e.sessionId}:e.status==="skipped"||e.status==="failed"?{status:e.status}:null:null}function GW(e){switch(e){case"unbound":case"creating":case"active":case"hibernated":case"failed":case"deleting":return e;default:return null}}function WW(e){if(!fn(e))return null;const t=GW(e.phase);return t===null||typeof e.sessionId!="string"||typeof e.channelId!="string"||typeof e.mode!="string"||typeof e.createdAt!="string"||typeof e.lastActivityAt!="string"||e.lastError!==null&&typeof e.lastError!="string"||e.customer!==void 0&&typeof e.customer!="boolean"?null:{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,phase:t,createdAt:e.createdAt,lastActivityAt:e.lastActivityAt,lastError:e.lastError,customer:e.customer===!0}}function KW(e){if(!fn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){const r=WW(n);if(r===null)return null;t.push(r)}return e.nextCursor===null?{sessions:t,nextCursor:null}:!fn(e.nextCursor)||typeof e.nextCursor.lastActivityAt!="string"||typeof e.nextCursor.id!="string"?null:{sessions:t,nextCursor:{lastActivityAt:e.nextCursor.lastActivityAt,id:e.nextCursor.id}}}function xM(e){return!fn(e)||typeof e.type!="string"||e.index!==void 0&&typeof e.index!="number"||e.at!==void 0&&typeof e.at!="string"||e.turnId!==void 0&&typeof e.turnId!="string"||e.sessionId!==void 0&&typeof e.sessionId!="string"||e.data!==void 0&&!fn(e.data)?null:{index:e.index,type:e.type,at:e.at,turnId:e.turnId,sessionId:e.sessionId,data:e.data,liveTruncated:e.liveTruncated===!0?!0:void 0}}function YW(e){if(!fn(e)||!Array.isArray(e.events))return null;const t=[];for(const n of e.events){const r=xM(n);if(r===null)return null;t.push(r)}return t}function XW(e){if(!fn(e)||!Array.isArray(e.events)||typeof e.unreadableChunks!="number")return null;const t=[];for(const r of e.events){const s=xM(r);if(s===null)return null;t.push(s)}let n=null;if(e.execution!==null){if(!fn(e.execution)||typeof e.execution.executionId!="string"||typeof e.execution.turnStatus!="string")return null;n={executionId:e.execution.executionId,turnStatus:e.execution.turnStatus}}return{events:t,execution:n,unreadableChunks:e.unreadableChunks}}function ZW(e){if(!fn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){if(!fn(n)||typeof n.sessionId!="string"||!Array.isArray(n.lines)||!n.lines.every(r=>typeof r=="string"))return null;t.push({sessionId:n.sessionId,channelId:typeof n.channelId=="string"?n.channelId:void 0,lines:n.lines})}return t}function QW(e,t){for(let n=Math.min(e.length,t.length);n>0;n--){const r=e.length-n;let s=0;for(;s<n&&t[s]===e[r+s];)s++;if(s===n)return t.slice(n)}return[...t]}function JW(e,t,n){e.delete(t),e.set(t,n);for(const r of e.keys()){if(e.size<=FW)return;e.delete(r)}}function eK(e){if(e.lastError!==null||e.phase==="failed")return"Failed";switch(e.phase){case"unbound":case"creating":return"Creating";case"active":return"Active";case"hibernated":return"Hibernated";case"deleting":return"Deleting"}}const tK=100;function nK(e){if(!fn(e)||!fn(e.session))return null;const t=e.session;if(typeof t.sessionId!="string"||t.sessionId==="")return null;const n=typeof t.channelId=="string"?t.channelId:"http",r=typeof t.mode=="string"?t.mode:"chat";return{sessionId:t.sessionId,channelId:n,mode:r,followUpAllowed:!1,title:`${t.sessionId} · History`,running:t.running===!0,turnCount:typeof t.turnCount=="number"?t.turnCount:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:void 0}}const kM=new Set(["creating","active"]);function rK(e,t){return{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,followUpAllowed:e.channelId==="http"&&!e.customer,title:`${e.sessionId} · ${eK(e)}`,running:kM.has(e.phase),turnCount:t,createdAt:e.createdAt,updatedAt:e.lastActivityAt}}function CC(e){return`${e.lastActivityAt}|${e.phase}`}const iK=3e4;function sK(e){if(!fn(e)||!fn(e.turnCounts))return null;const t=new Map;for(const[n,r]of Object.entries(e.turnCounts)){if(typeof r!="number")return null;t.set(n,r)}return t}const oK=new Set(["running","completed","failed","cancelled"]),aK=new Set(["pending","running","done"]);function lK(e){return!fn(e)||typeof e.id!="string"||typeof e.fileId!="string"?null:{id:e.id,fileId:e.fileId,description:typeof e.description=="string"?e.description:void 0,tags:Array.isArray(e.tags)?e.tags.filter(t=>typeof t=="string"):void 0}}function uK(e){if(!fn(e)||!Array.isArray(e.evals)||!fn(e.config))return null;const t=[];for(const n of e.evals){const r=lK(n);if(r===null)return null;t.push(r)}return{evals:t,config:e.config}}function wv(e){if(!fn(e)||typeof e.runId!="string"||!oK.has(e.status)||typeof e.startedAt!="string"||!fn(e.summary)||typeof e.summary.passed!="number"||typeof e.summary.failed!="number"||typeof e.summary.total!="number"||typeof e.summary.done!="number"||!Array.isArray(e.cases)||!fn(e.config))return null;for(const t of e.cases)if(!fn(t)||typeof t.id!="string"||typeof t.fileId!="string"||!aK.has(t.status))return null;return e}function cK(e){if(!fn(e)||!Array.isArray(e.runs)||e.activeRunId!==void 0&&typeof e.activeRunId!="string")return null;const t=[];for(const n of e.runs){const r=wv(n);if(r===null)return null;t.push(r)}return e.activeRunId===void 0?{runs:t}:{runs:t,activeRunId:e.activeRunId}}function fo(){return Promise.resolve({status:501,ok:!1,body:null})}class fK{constructor(t,n,r={}){this.teamId=t,this.bootstrapRequest=null,this.composedSessionIds=new Set,this.writableSessionIds=new Set,this.logTails=new Map,this.logIndex=-1,this.logsReadAt=Number.NEGATIVE_INFINITY,this.logsReading=!1,this.turnCounts=new Map,this.turnCountsReading=!1,this.health=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.ok?{ok:!0}:null}},this.meta=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.body===null?null:{name:s.body.slug,dev:!1,basePath:"",version:s.body.cliVersion,readonly:!1}}},this.info=async()=>{const[s,a]=await Promise.all([this.bootstrap(),this.request("/info",HW).catch(()=>null)]);return{status:s.status,ok:s.ok,body:s.body===null?null:{...a?.body,name:s.body.slug,runtime:"cloud"}}},this.sessions=async()=>{const s=new URLSearchParams({limit:String(tK)}),a=await this.request(`/sessions?${s.toString()}`,KW);if(!a.ok||a.body===null)return{status:a.status,ok:!1,body:null};const l=a.body.sessions,c=l.map(f=>rK(f,this.turnCounts.get(f.sessionId)?.count));return this.writableSessionIds=new Set([...this.composedSessionIds,...c.filter(f=>f.followUpAllowed===!0).map(f=>f.sessionId)]),this.readTurnCounts(l),{status:200,ok:!0,body:{sessions:c}}},this.sessionById=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,nK);return a.ok?{status:a.status,ok:!0,body:{session:a.body}}:{status:a.status,ok:!1,body:null}},this.eventsText=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,YW);if(!a.ok||a.body===null)return new Response(null,{status:a.status});const l=a.body.map(c=>JSON.stringify(c)).join(`
|
|
18
|
+
`);return new Response(l===""?"":`${l}
|
|
19
|
+
`,{status:a.status,headers:{"content-type":"application/x-ndjson"}})},this.subscribeEvents=async(s,a,l)=>{const c=await this.request(`/sessions/${encodeURIComponent(s)}/events?afterEventIndex=${a-1}&waitMs=${PW}`,XW,{signal:l});if(!c.ok||c.body===null)return new Response(null,{status:c.status});const f=c.body.events.map(d=>JSON.stringify(d)).join(`
|
|
20
|
+
`);return new Response(f===""?"":`${f}
|
|
21
|
+
`,{status:c.status,headers:{"content-type":"application/x-ndjson"}})},this.logs=async(s=-1)=>{const a=this.logsFailure===void 0?{status:200,ok:!0,body:{entries:[],nextAfter:this.logIndex}}:{status:this.logsFailure,ok:!1,body:null};if(this.logsReading)return a;if(s<this.logIndex)this.logTails.clear(),this.logSessionId=void 0,this.logIndex=s;else if(Date.now()-this.logsReadAt<$W)return a;this.logsReadAt=Date.now(),this.logsReading=!0;const l=await this.request("/logs",ZW).finally(()=>{this.logsReading=!1});if(!l.ok||l.body===null)return this.logsFailure=l.status===404?501:l.status,{status:this.logsFailure,ok:!1,body:null};this.logsFailure=void 0;const c=[];for(const f of l.body){if(f.lines.length===0)continue;const d=QW(this.logTails.get(f.sessionId)??[],f.lines);if(JW(this.logTails,f.sessionId,f.lines),d.length!==0){if(this.logSessionId!==f.sessionId){this.logSessionId=f.sessionId;const h=f.channelId===void 0?"":` (${f.channelId})`;c.push({index:++this.logIndex,at:"",line:`==> ${f.sessionId}${h} <==`})}for(const h of d)c.push({index:++this.logIndex,at:"",line:h})}}return{status:200,ok:!0,body:{entries:c,nextAfter:this.logIndex}}},this.createSession=s=>this.startSession(s),this.followUp=(s,a)=>this.writableSessionIds.has(s)?this.startSession(a,s):Promise.resolve({status:409,ok:!1,body:{error:"session_not_writable"}}),this.stopSession=()=>fo(),this.sessionCost=()=>fo(),this.resolveApproval=()=>fo(),this.resolveAuth=()=>fo(),this.artifacts=()=>fo(),this.artifactContent=()=>Promise.resolve({status:501,ok:!1,bytes:new Uint8Array(0),truncated:!1}),this.dispatchSchedule=()=>fo(),this.evalsList=()=>this.evalRequest("/evals",uK),this.evalsListRuns=()=>this.evalRequest("/evals/runs",cK),this.evalsStartRun=(s={})=>this.evalRequest("/evals/runs",wv,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,...s})}),this.evalsRunStatus=s=>this.evalRequest(`/evals/runs/${encodeURIComponent(s)}`,wv),this.evalsCancelRun=()=>fo(),this.channelRequest=()=>fo(),this.url=s=>s,this.basePath=`/api/v2/agentsdk/deployments/${encodeURIComponent(n)}`,this.capabilities=r.evals===!0?LW:vM,this.waitForRetry=r.waitForRetry??BW}async fetchJson(t,n){const r=t.includes("?")?"&":"?",s=await fetch(`${this.basePath}${t}${r}teamId=${this.teamId}`,n);return{response:s,value:await s.json().catch(()=>null)}}async request(t,n,r={}){const{response:s,value:a}=await this.fetchJson(t,r),l=n(a);return{status:l===null&&s.ok?502:s.status,ok:s.ok&&l!==null,body:l}}async evalRequest(t,n,r={}){const{response:s,value:a}=await this.fetchJson(t,r);if(!s.ok)return{status:s.status,ok:!1,body:a};const l=n(a);return{status:l===null?502:s.status,ok:l!==null,body:l}}async bootstrap(){this.bootstrapRequest??=this.request("",UW);const t=this.bootstrapRequest;try{const n=await t;return!n.ok&&this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}catch(n){throw this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}}async readTurnCounts(t){if(this.turnCountsReading)return;const n=new Set(t.map(a=>a.sessionId));for(const a of this.turnCounts.keys())n.has(a)||this.turnCounts.delete(a);const r=Date.now(),s=t.filter(a=>!a.customer&&this.turnCountStale(a,r));if(s.length!==0){this.turnCountsReading=!0;try{const a=new URLSearchParams({sessionIds:s.map(c=>c.sessionId).join(",")}),l=await this.request(`/session-turn-counts?${a.toString()}`,sK).catch(()=>null);if(!l?.ok||l.body===null)return;for(const c of s){const f=this.turnCounts.get(c.sessionId)?.count,d=l.body.get(c.sessionId);this.turnCounts.set(c.sessionId,{activity:CC(c),count:d===void 0?f:Math.max(d,f??0),readAt:r})}}finally{this.turnCountsReading=!1}}}turnCountStale(t,n){const r=this.turnCounts.get(t.sessionId);return r===void 0||r.activity!==CC(t)?!0:kM.has(t.phase)&&n-r.readAt>=iK}async startSession(t,n){const r=await this.request("/sessions",qW,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,message:t,sessionId:n})});if(!r.ok||r.body===null)return{status:r.status,ok:!1,body:null};const s=r.body.sessionId??await this.waitForDeliveryBinding(r.body.deliveryId);return typeof s!="string"?s:(this.composedSessionIds.add(s),this.writableSessionIds.add(s),{status:r.status,ok:!0,body:{sessionId:s}})}async waitForDeliveryBinding(t){const n=Date.now();for(let r=0;r<TC;r++){const s=await this.request(`/session-deliveries/${encodeURIComponent(t)}`,VW);if(s.ok&&s.body?.status==="allocated")return s.body.sessionId;if(s.ok&&(s.body?.status==="skipped"||s.body?.status==="failed"))return{status:409,ok:!1,body:null};if(!(s.ok&&s.body?.status==="pending")&&s.status!==404)return{status:s.status,ok:!1,body:null};const a=Date.now()-n;if(a>=EC||r+1>=TC)break;await this.waitForRetry(Math.min(zW(r),EC-a))}return{status:504,ok:!1,body:null}}}function dK(e,t){const n=DW(document);switch(n.kind){case"local":return new NW(new OW(e,()=>t().authToken,()=>t().aliasToken));case"hosted":return new fK(n.teamId,n.deploymentSlug,{evals:n.evals})}}function rl(e,t,n){return e.has(t)?n.some(r=>e.has(r))?"enabled":"read-only":"disabled"}function SM(e){const t=n=>rl(e,mt.eventRead,[n]);return{composer:rl(e,mt.sessionRead,[mt.sessionStart,mt.sessionFollowUp]),stop:t(mt.sessionStop),approvals:t(mt.approvalResolve),auth:t(mt.authResolve),logs:e.has(mt.logRead)?"enabled":"disabled",evals:rl(e,mt.evalRead,[mt.evalRun]),artifacts:rl(e,mt.artifactRead,[mt.artifactContent]),schedules:rl(e,mt.infoRead,[mt.scheduleDispatch]),channelRoutes:rl(e,mt.infoRead,[mt.channelInvoke])}}const pK=new Set(["actions.requested","actions.completed","action.result","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","subagent.called","subagent.completed","artifact.tagged"]),hK=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","actions.completed","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"]),mK=12e4,RC=1e3;function gK(e){return e===404||e>=500&&e<600}function wM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function bK(){const e=zq()!==null,t=e?HI():"";return{meta:{name:"agent",dev:!1,basePath:wM()},capabilities:SM(new Set),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&&Pq(),transcript:[],traceEvents:[],historyLoading:!1,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}}class yK{constructor(t,n){this.api=t,this.stateStore=n,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.streamRetry=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.turnClockStartedAt=null,this.pendingUserEchoes=[],this.pendingCreate=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=this.stateStore.subscribe,this.getState=()=>this.stateStore.getState(),this.getInitialState=()=>this.stateStore.getInitialState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return this.stateStore.getState()}hasCapability(t){return this.api.capabilities.has(t)}set(t){this.stateStore.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})}itemText(t){const n=this.itemIndex.get(t),r=n===void 0?void 0:this.items[n];return r!==void 0&&"text"in r?r.text:""}appendItemText(t,n){this.update(t,{text:wC(this.itemText(t),n)})}appendNestedText(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(f=>f.id===n),l=a<0?void 0:s[a];if(l===void 0||!("text"in l))return s;const c=s.slice();return c[a]={...l,text:wC(l.text,r)},c})}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.turnClockStartedAt=null,this.queueHeld=!1,this.pendingUserEchoes=[],this.pendingCreate=null}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(f=>f.kind==="tool"&&f.callId===n);if(c>=0){const f=l[c];if(f?.kind!=="tool")return l;const d=l.slice();return d[c]={...f,name:r||f.name,args:s??f.args},d}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 f=c.findIndex(b=>b.kind==="tool"&&b.callId===n),d=s==null?"(no output)":zn(s,4e3);if(f<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:d,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[f];if(h?.kind!=="tool")return c;const m=c.slice();return m[f]={...h,name:r||h.name,status:a?"error":"done",output:d,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(f=>f.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;const n=this.nextId("user");return this.push(t===null?{kind:"user",id:n,text:"",hidden:!0}:{kind:"user",id:n,text:t}),n}pushUserEcho(t){const n=this.pushUser(t);return this.pendingUserEchoes.push({id:n,text:t}),this.commitTranscript(),n}consumeUserEcho(t){const n=this.pendingUserEchoes[0];return n===void 0||t!==null&&n.text!==t?!1:(this.pendingUserEchoes.shift(),this.assistantId=null,this.reasoningId=null,!0)}rollbackUserEcho(t){const n=this.pendingUserEchoes.some(s=>s.id===t);if(this.pendingUserEchoes=this.pendingUserEchoes.filter(s=>s.id!==t),!n)return;const r=this.itemIndex.get(t);r!==void 0&&(this.items.splice(r,1),this.itemIndex.clear(),this.items.forEach((s,a)=>this.itemIndex.set(s.id,a))),this.commitTranscript()}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)":zn(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&&!pK.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=vl(t.at)||Date.now();switch(t.type){case"message.received":{const s=pM(n);this.consumeUserEcho(s)||this.pushUser(s);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=vl(t.at),this.turnClockStartedAt??=this.activeTurnStartedAt,this.setRunning(!0);break;case"reasoning.appended":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.appendNestedText(n.parentCallId,this.ensureNestedReasoning(n.parentCallId),n):this.appendItemText(this.ensureReasoning(),n);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":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.appendNestedText(n.parentCallId,this.ensureNestedAssistant(n.parentCallId),n):this.appendItemText(this.ensureAssistant(),n);break;case"message.completed":{const s=t.liveTruncated===!0,a=l=>s&&l!==""?l:String(n.text??"");if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const l=n.parentCallId,c=this.ensureNestedAssistant(l);this.updateSubagentChildren(l,f=>{const d=f.findIndex(b=>b.id===c),h=d<0?void 0:f[d];if(h===void 0||!("text"in h))return f;const m=f.slice();return m[d]={...h,text:a(h.text),streaming:!1},m}),this.nestedAssistantIds.delete(l)}else{const l=this.ensureAssistant();this.update(l,{text:a(this.itemText(l)),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=VI(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.turnClockStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&vl(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}),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.turnClockStartedAt=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(),this.refreshCurrentSessionCost();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(),this.refreshCurrentSessionCost();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()})}beginLocalTurn(){this.activeTurnStartedAt=Date.now(),this.turnClockStartedAt=this.activeTurnStartedAt,this.setRunning(!0)}abandonLocalTurn(){this.turnClockStartedAt=null,this.setRunning(!1)}setRunning(t){this.set({running:t,turnStartedAt:t?this.turnClockStartedAt: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{}WI("logs");return}const n=t==="overview"||t==="chat"||t==="trace"||t==="raw"||t==="evals"||t==="artifacts"?t:"overview",r=this.state.view==="evals"&&(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.hasCapability(mt.sessionStart)||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){if(!this.hasCapability(mt.sessionRead))return;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=pW({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||!this.hasCapability(mt.sessionStream))return;this.stopStream();const r=new AbortController;this.streamAbort=r;const s=Date.now(),a=this.lastIndex;this.api.subscribeEvents(t,n,r.signal).then(async l=>{if(!l.ok||!l.body){this.handleStreamPollFailure(t,r,l.status);return}this.streamRetry=null;const c=l.body.getReader(),f=new TextDecoder;let d="";for(;;){const h=await c.read();if(h.done){const y=this.lastIndex>a,S=Date.now()-s;this.scheduleReconnect(t,r,y?0:Math.max(0,RC-S));return}d+=f.decode(h.value,{stream:!0});const m=d.split(`
|
|
22
|
+
`);d=m.pop()||"";const b=[];for(const y of m){if(r.signal.aborted)return;if(!y||!y.trim())continue;let S=null;try{S=JSON.parse(y)}catch{continue}S!==null&&b.push(S)}if(r.signal.aborted)return;for(const y of b)this.ingestStreamEvent(y);b.length>0&&this.flushStreamPaint()}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}handleStreamPollFailure(t,n,r){if(gK(r)&&this.claimStreamRetryBudget(t)){this.scheduleReconnect(t,n);return}this.streamRetry=null,this.streamAbort===n&&(this.streamAbort=null),this.toast(`Stream failed (${r})`)}claimStreamRetryBudget(t){const n=Date.now();return this.streamRetry===null||this.streamRetry.sessionId!==t||this.listedRunning(t)?(this.streamRetry={sessionId:t,startedAt:n},!0):n-this.streamRetry.startedAt<mK}listedRunning(t){return this.state.sessions.some(n=>n.sessionId===t&&n.running===!0)}scheduleReconnect(t,n,r=RC){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},r)}refreshCurrentSessionCost(){const t=this.state.current?.sessionId;t&&this.refreshSessionCost(t)}async refreshSessionCost(t){if(this.hasCapability(mt.sessionCost))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){if(this.isCurrent(t.sessionId)&&(this.streamAbort!==null||this.snapshotOpen)){this.set({chatPanelOpen:!0,evalNavReturn:!1}),this.showSelectedSession(t.sessionId);return}this.stopStream(),this.streamRetry=null,this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,followUpAllowed:t.followUpAllowed,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.showSelectedSession(t.sessionId),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.loadEventsSnapshot(t.sessionId,!!t.running)}showSelectedSession(t){this.syncSessionUrl(t),(this.state.view==="evals"||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1}))}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){if(!this.hasCapability(mt.eventRead))return;const r=++this.snapshotToken;this.snapshotOpen=!0,this.set({historyLoading:!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(d=>d.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(Sv(a),c);const f=this.hasOpenTools()||c;this.setRunning(f),f&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${Jb(s)}`),this.historyOnly||this.startStream(t,0)}finally{r===this.snapshotToken&&(this.snapshotOpen=!1,this.set({historyLoading:!1}))}}ingestEventsCompact(t,n=!1){this.resetTranscript(),this.lastIndex=-1;for(const r of t){const s=hK.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.streamRetry=null,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 Yh(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(gW(r))return this.hasCapability(mt.channelInvoke)?this.invokeSlashCommand(r):(this.toast("Channel commands are not available in this playground"),!1);if(s!==null&&(!this.hasCapability(mt.sessionFollowUp)||s.followUpAllowed===!1||s.channelId!=="http"||s.mode==="task"))return this.toast("This session is read-only in this playground"),!1;if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null&&this.pendingCreate!==null)return this.queueMessage(r),!0;if(s===null){if(!this.hasCapability(mt.sessionStart))return this.toast("Starting new chats is not available in this playground"),!1;this.resetTranscript(),this.lastIndex=-1,this.beginLocalTurn();const l=this.pushUserEcho(r);this.set({localTrace:!1,barTitle:"Session",barId:"starting…",externalUrl:null,traceEvents:[]});const c={};this.pendingCreate=c;let f=!1,d=null,h=null;try{d=await this.api.createSession(r)}catch(m){h=m}finally{f=this.pendingCreate!==c,f||(this.pendingCreate=null)}return d===null?(f||(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""})),this.toast(`Create failed: ${Jb(h)}`),f):f?(d.ok?this.refreshSessions():this.toast(`Create failed: ${zn(d.body,160)}`),!0):!d.ok||!d.body?(this.abandonLocalTurn(),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""}),this.toast(`Create failed: ${zn(d.body,160)}`),!1):(this.set({current:{sessionId:d.body.sessionId,channelId:"http",mode:"chat",followUpAllowed:!0,continuationToken:d.body.continuationToken},barId:d.body.sessionId}),this.syncSessionUrl(d.body.sessionId),this.startStream(d.body.sessionId,0),this.refreshSessions(),!0)}this.beginLocalTurn();const a=this.pushUserEcho(r);return this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0,a)}async postFollowUp(t,n,r,s){let a;try{a=await this.api.followUp(t.sessionId,n,t.continuationToken)}catch(l){return this.abandonLocalTurn(),this.rollbackUserEcho(s),this.toast(`Send failed: ${Jb(l)}`),!1}if(a.ok&&a.body)return this.set({current:{...t,continuationToken:a.body.continuationToken}}),!0;if(a.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const l=this.state.current??t;return this.postFollowUp(l,n,!1,s)}return this.abandonLocalTurn(),this.rollbackUserEcho(s),this.toast(`Send failed: ${zn(a.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;if(this.pendingCreate!==null){this.toast("The session is still starting. Queued messages send once it is ready.");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;if(a===void 0)return;this.flushingQueue=!0,this.set({queued:l}),this.beginLocalTurn();const c=this.pushUserEcho(a.text);this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0,c).then(f=>{f||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1})}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.hasCapability(mt.sessionStop)||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.abandonLocalTurn(),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: ${zn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(mt.approvalResolve))return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${zn(s.body,160)}`)}async submitAuth(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(mt.authResolve))return;const s=await this.api.resolveAuth(r,t,n);s.ok||this.toast(`Connect failed: ${zn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly||!this.hasCapability(mt.scheduleDispatch))return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${zn(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(){if(!this.hasCapability(mt.evalRead))return;const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${zn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){if(!this.hasCapability(mt.evalRead))return;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(){if(this.hasCapability(mt.evalRead))return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=kK();if(n!==null){const d=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.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 d=s.activeRunId,h=a.find(m=>m.runId===d)??await this.fetchEvalRunIfCurrent(t,d);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=xK(this.state.meta.basePath);if(c!==null){const d=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.body);return}}if(a===null)return;const f=a[0];f!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(f)}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),Xd(this.state.meta.basePath,t.runId),SK(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||!this.hasCapability(mt.evalRun))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: ${zn(n.body,160)}`);return}this.set({evalRun:n.body}),Xd(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){if(this.historyOnly||!this.hasCapability(mt.evalCancel))return;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: ${zn(r.body,160)}`);return}this.set({evalRun:r.body}),Xd(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}),Xd(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:f,total:d}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${f} failed, ${d} 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,f=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:f,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){if(!this.hasCapability(mt.channelInvoke))return!1;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:yW(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=vW(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"+vK(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${zn(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.url(""),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);if(n){this.selectSession(n);return}this.selectSessionOutsideList(t)}async selectSessionOutsideList(t){if(this.api.sessionById!==void 0)try{const n=await this.api.sessionById(t);if(n.ok&&n.body?.session){this.state.current===null&&this.selectSession(n.body.session);return}}catch{}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=Qq(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 fW(this.state.info?.model)}}function Jb(e){return e instanceof Error?e.message:String(e)}function vK(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function EM(e){return`agent-serve:evalRunId:${e||"/"}`}function xK(e){try{const t=sessionStorage.getItem(EM(e));return t!==null&&t!==""?t:null}catch{return null}}function kK(){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 SK(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 Xd(e,t){try{sessionStorage.setItem(EM(e),t)}catch{}}function wK(e){const t=Iq(()=>bK()),n=e(t.getState);return t.setState({capabilities:SM(n.capabilities)}),new yK(n,t)}const Ke=wK(e=>dK(wM(),e));Ke.getState().aliasHosted&&$q(e=>Ke.acceptAliasTokenHandoff(e));let _C=Ke.getState().overviewSection;Ke.subscribe(e=>{e.overviewSection!==_C&&(_C=e.overviewSection,WI(e.overviewSection))});if(Ke.getState().embedded){let e=Ke.getState().view,t=Ke.getState().current?.sessionId??null,n=Ke.getState().overviewSection,r=t!==null;Ke.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,nV(s.view,r?a:void 0,void 0,s.overviewSection))})}function Be(e){return Dq(Ke,e)}function EK(){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 f=await Ke.signInWithAliasToken(e);a(!1),f.ok||r(f.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(Xc,{type:"password",size:"md","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),g.jsx(hn,{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:"bdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function TK(){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 CK=["noopener","noreferrer"];function bx(e){return e.trim()===""}function TM(e){const t=e.trim();if(bx(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 RK(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!TM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of CK)n.add(r);e.rel=[...n].join(" ")}function AC(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;RK(n);const r=n.getAttribute("href");r!==null&&bx(r)&&!n.hasAttribute("download")&&e.preventDefault()}function _K(e=document){return e.addEventListener("click",AC,!0),()=>e.removeEventListener("click",AC,!0)}function ua({href:e,onClick:t,...n}){const s=e!==void 0&&bx(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!TM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const CM=512*1024,AK=64*1024*1024,NK=240;async function RM(e){if(!Ke.hasCapability(mt.artifactContent))return{phase:"absent"};try{const t=await Ke.api.artifactContent(e,CM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if(Fq(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=Bq(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&Uq(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 _M(e,t){if(Ke.hasCapability(mt.artifactContent))try{const n=await Ke.api.artifactContent(e,AK);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=IK(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const OK={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function IK(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=OK[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function MK({text:e,isDiff:t}){const n=v.useMemo(()=>t?e.split(`
|
|
23
|
+
`):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-${Hq(r)}`,children:r},s))})}function AM({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(Pt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{_M(e,t)},children:"Download"})]}),n.text!==null?g.jsx(MK,{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(CM)," — Download has the full payload."]}):null]})}function DK({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>Co(e),[e]);if(r===""||r==="null")return null;const s=r.length>NK;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 LK=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[f,d]=v.useState({phase:"idle"}),h=Be(b=>b.capabilities.artifacts==="enabled"),m=b=>{c(b),!(!b||!h||s===void 0||f.phase!=="idle")&&(d({phase:"loading"}),RM(s).then(d))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(bi,{action:"Artifact",details:g.jsxs("span",{className:"pg-artifact-head",children:[g.jsx(ko,{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(Pt,{name:"bookmark",size:"sm",color:"secondary"}),open:l,onOpenChange:m,tone:"tertiary",children:g.jsxs("div",{className:"pg-artifact-body",children:[r!==void 0?g.jsx(ua,{className:"pg-artifact-link",href:r,children:r}):null,a!==void 0?g.jsx(DK,{data:a}):null,s!==void 0?h?g.jsx(AM,{artifactId:s,title:n,state:f}):g.jsx("div",{className:"pg-artifact-file-note",children:"File contents are not available in this playground"}):null]})})})}),NC=280,jK=8,ey=1e3;function zK({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=qI(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:Co(e.data),short:zn(e.data,NC)}},[e.data]);if(r.url!==null)return g.jsx(ua,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>NC||r.json.split(`
|
|
24
|
+
`).length>jK;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 PK({record:e,contentAvailable:t}){const[n,r]=v.useState({phase:"idle"}),s=e.content;if(s===void 0)return null;if(!t)return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Pt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:"File contents are not available in this playground"})]});if(n.phase==="idle"){const a=[s.contentType,ov(s.size)].filter(l=>l!==void 0&&l!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(Pt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:a||"file payload"}),g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{r({phase:"loading"}),RM(e.id).then(r)},children:"View"}),g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{_M(e.id,e.title)},children:"Download"})]})}return g.jsx(AM,{artifactId:e.id,title:e.title,state:n})}const OC=v.memo(function({record:t,contentAvailable:n}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:qq(t)}),g.jsx(ko,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(ko,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:kv(t.updatedAt)??t.updatedAt})]}),g.jsx(zK,{record:t}),g.jsx(PK,{record:t,contentAvailable:n})]})});function $K({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:()=>{Ke.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 NM(){const e=Be($=>$.current),t=Be($=>$.sessions),n=Be($=>$.capabilities.artifacts),r=n!=="disabled",s=n==="enabled",[a,l]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState(null),[m,b]=v.useState("all"),[y,S]=v.useState(0);e===null&&m==="session"&&b("all");const k=m==="session"&&e!==null?e.sessionId:null,T=a!==null&&a.scope===k?a.rows:null;v.useEffect(()=>{if(!r)return;let $=!1,I=!1;f(null);const V=async()=>{if(!I){I=!0;try{const z=await Ke.api.artifacts({sessionId:k??void 0,limit:ey});if($)return;if(!z.ok||z.body===null){f(`Failed to load artifacts (${z.status})`);return}f(null),l({scope:k,rows:z.body.artifacts??[]})}catch(z){$||f(z instanceof Error?z.message:String(z))}finally{I=!1}}};V();const B=setInterval(()=>{V()},4e3);return()=>{$=!0,clearInterval(B)}},[r,k,y]);const C=()=>S($=>$+1),E=k!==null;if(!r)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ci,{body:"Artifacts are not available in this playground."})});if(T===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:c!==null?g.jsx(Ci,{body:c,cta:{label:"Retry",onClick:C}}):g.jsx(Ci,{body:"Loading artifacts…"})});const R=GI(T);if(R.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ci,{body:E?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const _=Vq(R),D=d!==null&&_.includes(d)?d:null,A=Gq(R,D),N=E?[]:Wq(A),P=new Map(t.map($=>[$.sessionId,$.title]));return g.jsxs("div",{className:"pg-artifacts",children:[g.jsxs("div",{className:"pg-artifacts-toolbar",children:[g.jsx("span",{className:"pg-artifacts-toolbar-title",children:"Artifacts"}),g.jsxs("span",{className:"pg-artifacts-toolbar-meta",children:[A.length," of ",R.length,R.length>=ey?` (newest ${ey})`:""]}),c!==null?g.jsx("span",{className:"pg-artifacts-toolbar-error",children:c}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(fc,{size:"sm",variant:"compact",value:m,onValueChange:$=>b($==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(fc.Item,{value:"all",children:"All sessions"}),g.jsx(fc.Item,{value:"session",children:"This session"})]}):null,g.jsx(hn,{variant:"secondary",size:"sm",onClick:C,children:"Refresh"})]}),_.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${D===null?" active":""}`,onClick:()=>h(null),children:"All"}),_.map($=>g.jsx("button",{type:"button",className:`artifact-kind-chip${D===$?" active":""}`,onClick:()=>h(D===$?null:$),children:$},$))]}):null,A.length===0?g.jsx(Ci,{body:"No artifacts match this kind filter."}):E?g.jsx("div",{className:"artifact-list",children:A.map($=>g.jsx(OC,{record:$,contentAvailable:s},$.id))}):g.jsx("div",{className:"artifact-group-list",children:N.map($=>g.jsxs("section",{className:"artifact-group",children:[g.jsx($K,{sessionId:$.sessionId,count:$.artifacts.length,title:$.sessionId===null?void 0:P.get($.sessionId)}),g.jsx("div",{className:"artifact-list",children:$.artifacts.map(I=>g.jsx(OC,{record:I,contentAvailable:s},I.id))})]},$.sessionId??"(none)"))})]})}function FK(e){const{localTrace:t,historyOnly:n,canStart:r,canFollowUp:s,current:a,running:l,slashNames:c}=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(a===null)return r?{disabled:!1,hint:c.length>0?`Slash commands: ${c.slice(0,4).join(", ")}${c.length>4?", …":""}, /help.`:""}:{disabled:!0,hint:"Starting new chats is not available in this playground."};if(!s)return{disabled:!0,hint:"This session is read-only in this playground."};if(a.followUpAllowed===!1||a.mode==="task"||a.channelId!=="http")return a.followUpAllowed===!1&&a.channelId==="http"?{disabled:!0,hint:"Customer sessions are read-only in this playground."}:a.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:a.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${a.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${a.channelId}” channel take follow-ups through that channel; watch only here.`};if(!a.continuationToken&&a.followUpAllowed!==!0)return{disabled:!0,hint:"This session has no continuation token; watch only."};const d=c.length>0?` Channel commands (${c.slice(0,3).join(", ")}${c.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:l?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${d}`}}function BK(){const e=Be(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:()=>Ke.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(br,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{Ke.sendQueuedNow(t.id)}}),g.jsx(br,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>Ke.removeQueued(t.id)})]})]},t.id))})}function OM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=Be(B=>B.localTrace),l=Be(B=>B.meta.readonly===!0),c=Be(B=>B.current),f=Be(B=>B.running),d=Be(B=>B.composerDraft),h=Be(B=>B.info),m=Be(B=>B.capabilities.composer),b=Be(B=>B.capabilities.stop),y=m==="enabled"&&Ke.hasCapability(mt.sessionStart),S=m==="enabled"&&Ke.hasCapability(mt.sessionFollowUp),k=b==="enabled",T=Ke.hasCapability(mt.channelInvoke);v.useEffect(()=>{d!==null&&(t(B=>B.trim()?`${B} ${d}`:d),Ke.consumeComposerDraft(),s.current?.focus())},[d]);const C=v.useMemo(()=>T?Yh(h?.channels):[],[h,T]),E=v.useMemo(()=>gM(C),[C]),R=v.useMemo(()=>{if(a||l)return null;const B=e.replace(/^\s+/,"");return!B.startsWith("/")||/\s/.test(B)?null:B},[e,a,l]),_=v.useMemo(()=>R===null?[]:bW(R,C),[R,C]),D=R!==null&&_.length>0,{disabled:A,hint:N}=FK({localTrace:a,historyOnly:l,canStart:y,canFollowUp:S,current:c,running:f,slashNames:E}),P=k&&f&&c!==null&&!a&&!l,$=async(B=e,z=!1)=>{if(!B.trim())return;t(""),r(0),await Ke.sendMessage(B,{force:z})||t(H=>H.trim()?H:B)},I=B=>{t(`${B} `),r(0)},V=B=>{if(D){if(B.key==="ArrowDown"){B.preventDefault(),r(z=>(z+1)%_.length);return}if(B.key==="ArrowUp"){B.preventDefault(),r(z=>(z-1+_.length)%_.length);return}if(B.key==="Tab"||B.key==="Enter"&&!B.shiftKey){const z=_[n]??_[0];if(z!==void 0&&R!==z.name){B.preventDefault(),I(z.name);return}}if(B.key==="Escape"){B.preventDefault(),t(""),r(0);return}}B.key==="Enter"&&!B.shiftKey&&(B.preventDefault(),$(e,B.metaKey||B.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[D?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[_.map((B,z)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":z===n,className:z===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:j=>{j.preventDefault(),I(B.name)},onMouseEnter:()=>r(z),children:[g.jsx("code",{className:"pg-slash-name",children:B.name}),g.jsx("span",{className:"pg-slash-method",children:B.method}),B.description?g.jsx("span",{className:"pg-slash-desc",children:B.description}):null]})},`${B.name}:${B.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(BK,{}),g.jsxs("div",{className:A&&!P?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:E.length>0?`Message the agent, or ${E[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":D?"list":void 0,"aria-expanded":D,value:e,onChange:B=>{t(B.target.value),r(0)},onKeyDown:V,disabled:A,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:N,children:N}),P&&!e.trim()?g.jsx(br,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{Ke.stopTurn()}}):g.jsx(br,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":f?"Queue message (⌘Enter sends now)":"Send message",disabled:A,onClick:()=>{$()}})]})]})]})]})}function UK(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
|
|
25
|
+
`}}function HK(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 fi(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 IM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let f=null,d=1,h=0,m=0;function b(k){return n&&n.endedAt===null||(n={turnId:k?.turnId||`turn_${t.length+1}`,startedAt:k?.at?vl(k.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(k){b({turnId:k.turnId,at:null}).rows.push(k),k.ms&&k.ms>d&&(d=k.ms)}function S(k){if(a===null)return;const T=b(),C=k!==null&&a!==null?Math.max(0,k-a):null,E=l.trim()||void 0;T.rows.push(fi({kind:"think",label:E?Qr(E,80):"thinking",body:E,ms:C,at:k,startAt:a})),C&&C>d&&(d=C),a=null,l=""}for(const k of e){const T=k.data||{},C=vl(k.at);switch(k.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=k.turnId||n.turnId,n.startedAt=C,n.provisional=!1):(n={turnId:k.turnId||`turn_${t.length+1}`,startedAt:C,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",f=null;break;case"message.received":{const E=pM(T);y(fi({kind:"user",label:E===null?"Prompt hidden":Qr(E,140),body:E??void 0,at:C,startAt:C,ms:0,turnId:k.turnId}));break}case"reasoning.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const E=c.get(T.parentCallId)??{start:C,text:""};E.start===null&&(E.start=C),typeof T.text=="string"&&(E.text=T.text),c.set(T.parentCallId,E);break}a===null&&(a=C),typeof T.text=="string"&&(l=T.text);break;case"reasoning.completed":if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const E=T.parentCallId,R=c.get(E);c.delete(E);const _=R?.text.trim()||void 0;if(_!==void 0){const D=R?.start??C,A=D!==null&&C!==null?Math.max(0,C-D):null;y(fi({kind:"think",label:Qr(_,80),body:_,ms:A,at:C,startAt:D,turnId:k.turnId,depth:1,parentCallId:E}))}break}S(C);break;case"message.appended":if(typeof T.parentCallId=="string"&&T.parentCallId!=="")break;f===null&&(f=C);break;case"message.completed":{if(typeof T.parentCallId=="string"&&T.parentCallId!==""){const _=T.parentCallId;y(fi({kind:"agent",label:Qr(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:C,startAt:C,ms:0,turnId:k.turnId,depth:1,parentCallId:_}));break}const E=f??C,R=E!==null&&C!==null?Math.max(0,C-E):null;y(fi({kind:"agent",label:Qr(T.text,160)||"(empty reply)",body:typeof T.text=="string"?T.text:void 0,at:C,startAt:E,ms:R,turnId:k.turnId})),R&&R>d&&(d=R),f=null;break}case"actions.requested":for(const E of T.calls||[]){const R=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(R===void 0&&E.toolName==="task")continue;const _=R===void 0?E.callId:`${R}:${E.callId}`;r[_]={name:E.toolName,args:E.args,start:C,turnId:k.turnId,parentCallId:R}}break;case"action.result":{const E=T.callId;if(E==null)break;const R=typeof T.parentCallId=="string"&&T.parentCallId!==""?T.parentCallId:void 0;if(R===void 0&&T.toolName==="task"){delete r[E];break}const _=R===void 0?E:`${R}:${E}`,D=r[_];delete r[_];const A=D&&D.start!==null&&C!==null?C-D.start:null;h+=1,T.isError&&(m+=1);{const N=T.toolName||D?.name||"tool",P=D?.args;y(fi({kind:"tool",label:N+(P?` ${Qr(zn(P,60),60)}`:""),toolName:N,callId:typeof E=="string"?E:String(E),toolArgs:P,toolOutput:T.output,body:typeof T.output=="string"?T.output:T.output!=null?zn(T.output,4e3):void 0,ms:A,error:!!T.isError,at:C,startAt:D?.start??null,turnId:k.turnId,depth:R===void 0?0:1,parentCallId:R}))}A&&A>d&&(d=A);break}case"subagent.called":{const E=`task:${T.name||"subagent"}`,R=typeof T.callId=="string"?T.callId:String(T.callId);r[`sub:${R}`]={name:E,args:T.description,start:C,turnId:k.turnId};const _=b(k);_.rows.push(fi({kind:"tool",label:E,toolName:E,callId:R,toolArgs:T.description,ms:null,at:C,startAt:C,turnId:k.turnId,depth:0})),s.set(R,{turn:_,index:_.rows.length-1});break}case"subagent.completed":{const E=typeof T.callId=="string"?T.callId:String(T.callId),R=`sub:${E}`,_=r[R];delete r[R];const D=_&&_.start!==null&&C!==null?C-_.start:null;h+=1;const A=s.get(E);s.delete(E);const N=A!==void 0?A.turn.rows[A.index]:void 0;N!==void 0&&N.kind==="tool"?(N.ms=D,N.at=C,D&&D>d&&(d=D)):y(fi({kind:"tool",label:_?.name||"subagent",toolName:_?.name||"subagent",callId:E,toolArgs:_?.args,ms:D,at:C,startAt:_?.start??null,turnId:k.turnId}));break}case"artifact.tagged":{const E=VI(T);y(fi({kind:"artifact",label:Qr(E.title===void 0?E.kind:`${E.kind} · ${E.title}`,120),body:T.data!=null?zn(T.data,4e3):void 0,url:E.url,at:C,startAt:C,ms:0,turnId:k.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(k.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const E=b(k);if((k.type==="turn.completed"||k.type==="turn.failed")&&(E.endedAt=C,E.usage=T.usage||null,E.failed=k.type==="turn.failed",E.error=T.message,E.startedAt!==null&&E.endedAt!==null)){const R=E.endedAt-E.startedAt;R>d&&(d=R),E.wallMs=R}if(S(C),f!==null&&C!==null){const R=Math.max(0,C-f);E.rows.push(fi({kind:"agent",label:"(streaming…)",ms:R,at:C,startAt:f})),f=null}for(const R of Object.keys(r)){const _=r[R],D=_.start!==null&&C!==null?C-_.start:null;E.rows.push(fi({kind:"tool",label:`${_.name||"tool"} (no result)`,ms:D,error:!0,at:C,startAt:_.start,turnId:_.turnId})),D&&D>d&&(d=D)}r={},(k.type==="turn.completed"||k.type==="turn.failed")&&(n=null);break}}}for(const k of Object.keys(r)){const T=r[k];y(fi({kind:"tool",label:`${T.name||"tool"} (running…)`,ms:null,at:T.start,startAt:T.start,turnId:T.turnId}))}return{turns:t,maxWallMs:d,totalTools:h,failedTools:m,eventCount:e.length}}function qK(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 VK({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 GK={},WK={};function KK(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const MM=new Map;for(const[e,t]of Object.entries(WK)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=KK(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)MM.set(a,t.default)}function YK(e){if(!(e===void 0||e.trim()===""))return MM.get(e.trim())}const XK={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},ZK={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function QK(e){return e.verdict??(e.ok===!0?"passed":"failed")}function JK(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 eY({a:e}){return e.passed?g.jsx(Pt,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(Pt,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(Pt,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function DM(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 tY={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},nY={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},rY={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function iY({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=DM(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(Pt,{name:tY[e.kind],size:"sm",color:e.error?"red":rY[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:nY[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:Ii(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(Pt,{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:Co(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:Co(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 sY({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[f,d]=v.useState(!1),h=v.useRef(null),m=Ke.hasCapability(mt.sessionStream),b=t&&m;v.useEffect(()=>{let S=!1;const k=new AbortController;return c(!0),a(null),r([]),d(!1),(async()=>{let T=-1;try{const C=await Ke.api.eventsText(e);if(S)return;if(C.ok){const E=await C.text();if(S)return;const R=Sv(E);for(const _ of R)typeof _.index=="number"&&_.index>T&&(T=_.index);r(R)}}catch(C){S||a(C instanceof Error?C.message:String(C))}finally{S||c(!1)}if(!(!b||S)){d(!0);try{const C=await Ke.api.subscribeEvents(e,T+1,k.signal);if(!C.ok||!C.body){S||(a(`Stream failed (${C.status})`),d(!1));return}const E=C.body.getReader(),R=new TextDecoder;let _="";for(;;){const{done:D,value:A}=await E.read();if(D||S)break;_+=R.decode(A,{stream:!0});const N=_.split(`
|
|
26
|
+
`);_=N.pop()??"";const P=[];for(const $ of N){const I=$.trim();if(I)try{const V=JSON.parse(I);P.push(V),typeof V.index=="number"&&V.index>T&&(T=V.index)}catch{}}P.length>0&&!S&&r($=>[...$,...P])}}catch(C){!S&&!(C instanceof DOMException&&C.name==="AbortError")&&a(C instanceof Error?C.message:String(C))}finally{S||d(!1)}}})(),()=>{S=!0,k.abort()}},[e,b]),v.useEffect(()=>{b&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,b]);const y=v.useMemo(()=>IM(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}):y.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:b?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:[y.eventCount," events · ",y.totalTools," tool",y.totalTools===1?"":"s",y.failedTools>0?` · ${y.failedTools} failed`:"",b||f?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,y.turns.map((S,k)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",k+1,S.failed?" · failed":"",S.wallMs!=null&&S.wallMs>0?` · ${Ii(S.wallMs)}`:""]}),S.rows.map((T,C)=>g.jsx(iY,{row:T},`${S.turnId}-${C}-${T.kind}`))]},S.turnId)),g.jsx("div",{ref:h})]})}function oY({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(Pt,{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:Co(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:Co(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 aY({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,f=DM(c),d=v.useRef({io:!1,expanded:!1});c&&(d.current={io:a,expanded:r});const h=c?a:d.current.io,m=c?r:d.current.expanded,b=QK(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":XK[b],S=e.status==="done"?ZK[b]:e.status==="running"?"accent":"neutral",k=e.sessionId!==void 0||e.status==="done"||e.status==="running",T=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,C=n?.CaseMetrics,E=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:!k,"aria-expanded":r,title:k?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(R=>!R),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(Pt,{name:"chevron-right",size:10})}),g.jsx(ko,{variant:S,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,T?g.jsx(hn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(R=>!R),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{Ke.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{Ke.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,C!==void 0?g.jsx(C,{case:e,batchRunning:t}):g.jsx(VK,{case:e}),E!==void 0?g.jsx(E,{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(R=>{const _=JK(R);return g.jsxs("div",{className:R.passed||R.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(eY,{a:R})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:R.name}),_!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:_}):null]})]},`${R.name}-${R.passed}-${R.detail??""}`)})}):null,e.logs!==void 0&&e.logs.length>0?g.jsx("div",{className:"eval-logs",children:e.logs.map((R,_)=>g.jsx("div",{className:"eval-log-line",children:R},`${_}:${R}`))}):null,f?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(oY,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(sY,{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"})," ",IC(e)?"Aggregating sibling cases…":"Waiting for session…"]}):IC(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 IC(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function LM(){const e=Be(k=>k.evalRun),t=Be(k=>k.evalCases),n=Be(k=>k.evalConfig),r=Be(k=>k.meta.name),s=Be(k=>k.meta.readonly===!0),a=Be(k=>k.capabilities.evals),l=v.useMemo(()=>YK(r),[r]),c=e?.status==="running",f=!s&&a==="enabled"&&t.length>0,d=!s&&Ke.hasCapability(mt.evalCancel),h=l?.RunSummary;if(a==="disabled")return g.jsx("div",{className:"pg-evals",children:g.jsx("div",{className:"eval-empty",children:g.jsx("p",{children:"Evaluations are not available in this playground."})})});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}.`:""]}),f?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,f?g.jsx(hn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Ke.startEvalRun()},children:"Run all"}):null]})});const{summary:m,status:b}=e,y=b==="failed"||b==="cancelled"?"danger":c?"accent":"success",S=b==="failed"?"Failed":b==="cancelled"?"Cancelled":c?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(ko,{variant:y,size:"sm",children:S}),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:[m.done,"/",m.total," done · ",m.passed," passed"]})," · ",m.failed," failed",m.scored!==void 0&&m.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.scored," scored"]}):null,m.skipped!==void 0&&m.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.skipped," skipped"]}):null]}),h!==void 0?g.jsx(h,{run:e}):null,c?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(hn,{variant:"ghost",size:"sm",onClick:()=>{const k=UK(e);HK(k.filename,k.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),c&&d?g.jsx(hn,{variant:"secondary",size:"sm",onClick:()=>{Ke.cancelEvalRun(e.runId)},children:"Cancel"}):null,f?g.jsx(hn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Ke.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(k=>g.jsx(aY,{c:k,batchRunning:c,customization:l},k.id))})]})}const jM=48;function lY(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function uY(e,t=jM){return lY(e)<=t}function ty(e){e.scrollTop=e.scrollHeight}function zM(e){const{contentKey:t,latchKey:n,thresholdPx:r=jM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=uY(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&&ty(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&ty(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&ty(l)};c();const f=new Set,d=new ResizeObserver(c),h=y=>{f.has(y)||(f.add(y),d.observe(y))},m=y=>{h(y);for(const S of y.children)m(S)};m(l);const b=new MutationObserver(y=>{for(const S of y)S.addedNodes.forEach(k=>{k instanceof Element&&m(k)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{d.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function yx({idle:e,empty:t}){const n=Be(s=>s.current),r=Be(s=>s.historyLoading);return n===null?g.jsx(Ci,{body:e}):r?g.jsx(Ci,{icon:g.jsx("span",{className:"spin"}),body:"Loading session…"}):g.jsx(Ci,{body:t})}function PM(){const e=Be(a=>a.traceEvents),t=Be(a=>a.current),n=e.length,{scrollRef:r}=zM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=pN({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(yx,{idle:"Select a session to see the raw event stream.",empty:"No events recorded for this session yet."})}):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:` ${zn(l.data,240)}`})]},a.key)})})})]})}const cY={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},fY={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},dY={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function pY(e,t){return t?"red":dY[e]}function $M({kind:e,error:t,showLabel:n=!0}){const r=pY(e,t),s=`${fY[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(Pt,{name:cY[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function hY(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 mY(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 gY(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,f=c===null||c===0,d=s*.012,h=f?d:Math.max(c,d),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:f}}function FM(e){return e===null?"—":e===0?"instant":Ii(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 bY({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,f=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",d=n.body?.trim()||"",h=n.toolArgs!=null?Co(n.toolArgs):"",m=n.toolOutput!=null?Co(n.toolOutput):n.kind==="tool"&&d?d:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx($M,{kind:n.kind,error:n.error}),g.jsx(br,{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(ua,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&d?g.jsx("pre",{className:"trace-detail-body",children:d}):null,n.kind!=="tool"&&!d&&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:Ii(s)}),g.jsx(ms,{label:"End +",value:Ii(c)}),g.jsx(ms,{label:"Duration",value:FM(a)}),g.jsx(ms,{label:"% of turn",value:f}),g.jsx(ms,{label:"Started",value:SC(n.startAt)}),g.jsx(ms,{label:"Ended",value:SC(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 yY({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=FM(e.trueDurMs),c=e.widthPct>=8,f=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${f>0?" nested":""}`,onClick:r,"aria-pressed":t,style:f>0?{paddingLeft:`${8+f*14}px`}:void 0,children:[g.jsx($M,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:f>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 vY({turn:e,index:t,selectedId:n,onSelect:r}){const s=hY(e),a=mY(e,s),l=v.useMemo(()=>e.rows.map((d,h)=>gY(d,h,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>qK(a),[a]),f=[];return e.wallMs!==void 0&&f.push(`Worked for ${mx(e.wallMs)}`),e.usage&&f.push(`in ${Xp(e.usage.inputTokens)} · out ${Xp(e.usage.outputTokens)}`),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(Pt,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:f.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(d=>g.jsxs("span",{className:"wf-tick",style:{left:`${d/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:Ii(d)})]},d))}),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(d=>g.jsx(yY,{span:d,selected:n===d.id,detailOpen:n!=null,onSelect:()=>r(n===d.id?null:d)},d.id))]})]})}function BM(){const e=Be(l=>l.traceEvents),t=Be(l=>l.sessionCostUsd),n=v.useMemo(()=>IM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(yx,{idle:"Select a session to see the timeline.",empty:"No events recorded for this session yet."})});const a=[`${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,t!==null?`cost ${uW(t)}`: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:a}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((l,c)=>g.jsx(vY,{turn:l,index:c,selectedId:r?.id??null,onSelect:s},`${l.turnId||"turn"}-${c}`))}),r?g.jsx(bY,{span:r,onClose:()=>s(null)}):null]})]})})}function xY(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kY=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SY=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wY={};function MC(e,t){return(wY.jsx?SY:kY).test(e)}const EY=/[ \t\n\f\r]/g;function TY(e){return typeof e=="object"?e.type==="text"?DC(e.value):!1:DC(e)}function DC(e){return e.replace(EY,"")===""}class nf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}nf.prototype.normal={};nf.prototype.property={};nf.prototype.space=void 0;function UM(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new nf(n,r,t)}function Ev(e){return e.toLowerCase()}class $r{constructor(t,n){this.attribute=n,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let CY=0;const Nt=ya(),Gn=ya(),Tv=ya(),ze=ya(),kn=ya(),xl=ya(),Xr=ya();function ya(){return 2**++CY}const Cv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nt,booleanish:Gn,commaOrSpaceSeparated:Xr,commaSeparated:xl,number:ze,overloadedBoolean:Tv,spaceSeparated:kn},Symbol.toStringTag,{value:"Module"})),ny=Object.keys(Cv);class vx extends $r{constructor(t,n,r,s){let a=-1;if(super(t,n),LC(this,"space",s),typeof r=="number")for(;++a<ny.length;){const l=ny[a];LC(this,ny[a],(r&Cv[l])===Cv[l])}}}vx.prototype.defined=!0;function LC(e,t,n){n&&(e[t]=n)}function ql(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new vx(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ev(r)]=r,n[Ev(a.attribute)]=r}return new nf(t,n,e.space)}const HM=ql({properties:{ariaActiveDescendant:null,ariaAtomic:Gn,ariaAutoComplete:null,ariaBusy:Gn,ariaChecked:Gn,ariaColCount:ze,ariaColIndex:ze,ariaColSpan:ze,ariaControls:kn,ariaCurrent:null,ariaDescribedBy:kn,ariaDetails:null,ariaDisabled:Gn,ariaDropEffect:kn,ariaErrorMessage:null,ariaExpanded:Gn,ariaFlowTo:kn,ariaGrabbed:Gn,ariaHasPopup:null,ariaHidden:Gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kn,ariaLevel:ze,ariaLive:null,ariaModal:Gn,ariaMultiLine:Gn,ariaMultiSelectable:Gn,ariaOrientation:null,ariaOwns:kn,ariaPlaceholder:null,ariaPosInSet:ze,ariaPressed:Gn,ariaReadOnly:Gn,ariaRelevant:null,ariaRequired:Gn,ariaRoleDescription:kn,ariaRowCount:ze,ariaRowIndex:ze,ariaRowSpan:ze,ariaSelected:Gn,ariaSetSize:ze,ariaSort:null,ariaValueMax:ze,ariaValueMin:ze,ariaValueNow:ze,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function qM(e,t){return t in e?e[t]:t}function VM(e,t){return qM(e,t.toLowerCase())}const RY=ql({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xl,acceptCharset:kn,accessKey:kn,action:null,allow:null,allowFullScreen:Nt,allowPaymentRequest:Nt,allowUserMedia:Nt,alt:null,as:null,async:Nt,autoCapitalize:null,autoComplete:kn,autoFocus:Nt,autoPlay:Nt,blocking:kn,capture:null,charSet:null,checked:Nt,cite:null,className:kn,cols:ze,colSpan:null,content:null,contentEditable:Gn,controls:Nt,controlsList:kn,coords:ze|xl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nt,defer:Nt,dir:null,dirName:null,disabled:Nt,download:Tv,draggable:Gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nt,formTarget:null,headers:kn,height:ze,hidden:Tv,high:ze,href:null,hrefLang:null,htmlFor:kn,httpEquiv:kn,id:null,imageSizes:null,imageSrcSet:null,inert:Nt,inputMode:null,integrity:null,is:null,isMap:Nt,itemId:null,itemProp:kn,itemRef:kn,itemScope:Nt,itemType:kn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nt,low:ze,manifest:null,max:null,maxLength:ze,media:null,method:null,min:null,minLength:ze,multiple:Nt,muted:Nt,name:null,nonce:null,noModule:Nt,noValidate:Nt,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:Nt,optimum:ze,pattern:null,ping:kn,placeholder:null,playsInline:Nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nt,referrerPolicy:null,rel:kn,required:Nt,reversed:Nt,rows:ze,rowSpan:ze,sandbox:kn,scope:null,scoped:Nt,seamless:Nt,selected:Nt,shadowRootClonable:Nt,shadowRootDelegatesFocus:Nt,shadowRootMode:null,shape:null,size:ze,sizes:null,slot:null,span:ze,spellCheck:Gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ze,step:null,style:null,tabIndex:ze,target:null,title:null,translate:null,type:null,typeMustMatch:Nt,useMap:null,value:Gn,width:ze,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kn,axis:null,background:null,bgColor:null,border:ze,borderColor:null,bottomMargin:ze,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nt,declare:Nt,event:null,face:null,frame:null,frameBorder:null,hSpace:ze,leftMargin:ze,link:null,longDesc:null,lowSrc:null,marginHeight:ze,marginWidth:ze,noResize:Nt,noHref:Nt,noShade:Nt,noWrap:Nt,object:null,profile:null,prompt:null,rev:null,rightMargin:ze,rules:null,scheme:null,scrolling:Gn,standby:null,summary:null,text:null,topMargin:ze,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ze,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nt,disableRemotePlayback:Nt,prefix:null,property:null,results:ze,security:null,unselectable:null},space:"html",transform:VM}),_Y=ql({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:Xr,accentHeight:ze,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ze,amplitude:ze,arabicForm:null,ascent:ze,attributeName:null,attributeType:null,azimuth:ze,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ze,by:null,calcMode:null,capHeight:ze,className:kn,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:ze,diffuseConstant:ze,direction:null,display:null,dur:null,divisor:ze,dominantBaseline:null,download:Nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ze,enableBackground:null,end:null,event:null,exponent:ze,externalResourcesRequired:null,fill:null,fillOpacity:ze,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:xl,g2:xl,glyphName:xl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ze,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ze,horizOriginX:ze,horizOriginY:ze,id:null,ideographic:ze,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ze,k:ze,k1:ze,k2:ze,k3:ze,k4:ze,kernelMatrix:Xr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ze,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:ze,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:ze,overlineThickness:ze,paintOrder:null,panose1:null,path:null,pathLength:ze,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ze,pointsAtY:ze,pointsAtZ:ze,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Xr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Xr,rev:Xr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Xr,requiredFeatures:Xr,requiredFonts:Xr,requiredFormats:Xr,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:ze,specularExponent:ze,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ze,strikethroughThickness:ze,string:null,stroke:null,strokeDashArray:Xr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ze,strokeOpacity:ze,strokeWidth:null,style:null,surfaceScale:ze,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Xr,tabIndex:ze,tableValues:null,target:null,targetX:ze,targetY:ze,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Xr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ze,underlineThickness:ze,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ze,values:null,vAlphabetic:ze,vMathematical:ze,vectorEffect:null,vHanging:ze,vIdeographic:ze,version:null,vertAdvY:ze,vertOriginX:ze,vertOriginY:ze,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ze,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qM}),GM=ql({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()}}),WM=ql({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:VM}),KM=ql({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),AY={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"},NY=/[A-Z]/g,jC=/-[a-z]/g,OY=/^data[-\w.:]+$/i;function IY(e,t){const n=Ev(t);let r=t,s=$r;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&OY.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(jC,DY);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!jC.test(a)){let l=a.replace(NY,MY);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=vx}return new s(r,t)}function MY(e){return"-"+e.toLowerCase()}function DY(e){return e.charAt(1).toUpperCase()}const LY=UM([HM,RY,GM,WM,KM],"html"),xx=UM([HM,_Y,GM,WM,KM],"svg");function jY(e){return e.join(" ").trim()}var il={},ry,zC;function zY(){if(zC)return ry;zC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
27
|
+
`,d="/",h="*",m="",b="comment",y="declaration";ry=function(k,T){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];T=T||{};var C=1,E=1;function R(z){var j=z.match(t);j&&(C+=j.length);var H=z.lastIndexOf(f);E=~H?z.length-H:E+z.length}function _(){var z={line:C,column:E};return function(j){return j.position=new D(z),P(),j}}function D(z){this.start=z,this.end={line:C,column:E},this.source=T.source}D.prototype.content=k;function A(z){var j=new Error(T.source+":"+C+":"+E+": "+z);if(j.reason=z,j.filename=T.source,j.line=C,j.column=E,j.source=k,!T.silent)throw j}function N(z){var j=z.exec(k);if(j){var H=j[0];return R(H),k=k.slice(H.length),j}}function P(){N(n)}function $(z){var j;for(z=z||[];j=I();)j!==!1&&z.push(j);return z}function I(){var z=_();if(!(d!=k.charAt(0)||h!=k.charAt(1))){for(var j=2;m!=k.charAt(j)&&(h!=k.charAt(j)||d!=k.charAt(j+1));)++j;if(j+=2,m===k.charAt(j-1))return A("End of comment missing");var H=k.slice(2,j-2);return E+=2,R(H),k=k.slice(j),E+=2,z({type:b,comment:H})}}function V(){var z=_(),j=N(r);if(j){if(I(),!N(s))return A("property missing ':'");var H=N(a),q=z({type:y,property:S(j[0].replace(e,m)),value:H?S(H[0].replace(e,m)):m});return N(l),q}}function B(){var z=[];$(z);for(var j;j=V();)j!==!1&&(z.push(j),$(z));return z}return P(),B()};function S(k){return k?k.replace(c,m):m}return ry}var PC;function PY(){if(PC)return il;PC=1;var e=il&&il.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(il,"__esModule",{value:!0}),il.default=n;var t=e(zY());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(f){if(f.type==="declaration"){var d=f.property,h=f.value;c?s(d,h,f):h&&(a=a||{},a[d]=h)}}),a}return il}var $Y=PY();const $C=Pc($Y),FY=$C.default||$C,BY=Object.freeze(Object.defineProperty({__proto__:null,default:FY},Symbol.toStringTag,{value:"Module"})),UY=Jj(BY);var Wu={},FC;function HY(){if(FC)return Wu;FC=1,Object.defineProperty(Wu,"__esModule",{value:!0}),Wu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},l=function(d,h){return h.toUpperCase()},c=function(d,h){return"".concat(h,"-")},f=function(d,h){return h===void 0&&(h={}),a(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return Wu.camelCase=f,Wu}var Ku,BC;function qY(){if(BC)return Ku;BC=1;var e=Ku&&Ku.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(UY),n=HY();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(l[(0,n.camelCase)(c,a)]=f)}),l}return r.default=r,Ku=r,Ku}var VY=qY();const GY=Pc(VY),YM=XM("end"),kx=XM("start");function XM(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 WY(e){const t=kx(e),n=YM(e);if(t&&n)return{start:t,end:n}}function dc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?UC(e.position):"start"in e||"end"in e?UC(e):"line"in e||"column"in e?Rv(e):""}function Rv(e){return HC(e&&e.line)+":"+HC(e&&e.column)}function UC(e){return Rv(e&&e.start)+"-"+Rv(e&&e.end)}function HC(e){return e&&typeof e=="number"?e:1}class yr 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 f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.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=dc(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}}yr.prototype.file="";yr.prototype.name="";yr.prototype.reason="";yr.prototype.message="";yr.prototype.stack="";yr.prototype.column=void 0;yr.prototype.line=void 0;yr.prototype.ancestors=void 0;yr.prototype.cause=void 0;yr.prototype.fatal=void 0;yr.prototype.place=void 0;yr.prototype.ruleId=void 0;yr.prototype.source=void 0;const Sx={}.hasOwnProperty,KY=new Map,YY=/[A-Z]/g,XY=new Set(["table","tbody","thead","tfoot","tr"]),ZY=new Set(["td","th"]),ZM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function QY(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=oX(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=sX(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"?xx:LY,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=QM(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function QM(e,t,n){if(t.type==="element")return JY(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return eX(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nX(e,t,n);if(t.type==="mdxjsEsm")return tX(e,t);if(t.type==="root")return rX(e,t,n);if(t.type==="text")return iX(e,t)}function JY(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=xx,e.schema=s),e.ancestors.push(t);const a=e2(e,t.tagName,!1),l=aX(e,t);let c=Ex(e,t);return XY.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!TY(f):!0})),JM(e,l,a,t),wx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function eX(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)}Lc(e,t.position)}function tX(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lc(e,t.position)}function nX(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=xx,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:e2(e,t.name,!0),l=lX(e,t),c=Ex(e,t);return JM(e,l,a,t),wx(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function rX(e,t,n){const r={};return wx(r,Ex(e,t)),e.create(t,e.Fragment,r,n)}function iX(e,t){return t.value}function JM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function wx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function sX(e,t,n){return r;function r(s,a,l,c){const d=Array.isArray(l.children)?n:t;return c?d(a,l,c):d(a,l)}}function oX(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),f=kx(r);return t(s,a,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function aX(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Sx.call(t.properties,s)){const a=uX(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&ZY.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 lX(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 Lc(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 Lc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Ex(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:KY;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const d=s.get(f)||0;l=f+"-"+d,s.set(f,d+1)}}const c=QM(e,a,l);c!==void 0&&n.push(c)}return n}function uX(e,t,n){const r=IY(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?xY(n):jY(n)),r.property==="style"){let s=typeof n=="object"?n:cX(e,String(n));return e.stylePropertyNameCase==="css"&&(s=fX(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?AY[r.property]||r.property:r.attribute,n]}}function cX(e,t){try{return GY(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new yr("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=ZM+"#cannot-parse-style-attribute",s}}function e2(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=MC(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=MC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Sx.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Lc(e)}function Lc(e,t){const n=new yr("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=ZM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fX(e){const t={};let n;for(n in e)Sx.call(e,n)&&(t[dX(n)]=e[n]);return t}function dX(e){let t=e.replace(YY,pX);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pX(e){return"-"+e.toLowerCase()}const iy={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"]},hX={};function Tx(e,t){const n=hX,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return t2(e,r,s)}function t2(e,t,n){if(mX(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 qC(e.children,t,n)}return Array.isArray(e)?qC(e,t,n):""}function qC(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=t2(e[s],t,n);return r.join("")}function mX(e){return!!(e&&typeof e=="object")}const VC=document.createElement("i");function Cx(e){const t="&"+e+";";VC.innerHTML=t;const n=VC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ti(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 di(e,t){return e.length>0?(ti(e,e.length,0,t),e):t}const GC={}.hasOwnProperty;function n2(e){const t={};let n=-1;for(;++n<e.length;)gX(t,e[n]);return t}function gX(e,t){let n;for(n in t){const s=(GC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){GC.call(s,l)||(s[l]=[]);const c=a[l];bX(s[l],Array.isArray(c)?c:c?[c]:[])}}}function bX(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ti(e,0,0,r)}function r2(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 _i(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Er=No(/[A-Za-z]/),hr=No(/[\dA-Za-z]/),yX=No(/[#-'*+\--9=?A-Z^-~]/);function Qp(e){return e!==null&&(e<32||e===127)}const _v=No(/\d/),vX=No(/[\dA-Fa-f]/),xX=No(/[!-/:-@[-`{-~]/);function gt(e){return e!==null&&e<-2}function mn(e){return e!==null&&(e<0||e===32)}function zt(e){return e===-2||e===-1||e===32}const Qh=No(new RegExp("\\p{P}|\\p{S}","u")),ca=No(/\s/);function No(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Vl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&hr(e.charCodeAt(n+1))&&hr(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 Wt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return zt(f)?(e.enter(n),c(f)):t(f)}function c(f){return zt(f)&&a++<s?(e.consume(f),c):(e.exit(n),t(f))}}const kX={tokenize:SX};function SX(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"),Wt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return gt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const wX={tokenize:EX},WC={tokenize:TX};function EX(e){const t=this,n=[];let r=0,s,a,l;return c;function c(R){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,f,d)(R)}return d(R)}function f(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&E();const _=t.events.length;let D=_,A;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){A=t.events[D][1].end;break}C(r);let N=_;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return ti(t.events,D+1,0,t.events.slice(_)),t.events.length=N,d(R)}return c(R)}function d(R){if(r===n.length){if(!s)return b(R);if(s.currentConstruct&&s.currentConstruct.concrete)return S(R);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(WC,h,m)(R)}function h(R){return s&&E(),C(r),b(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,S(R)}function b(R){return t.containerState={},e.attempt(WC,y,S)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),b(R)}function S(R){if(R===null){s&&E(),C(0),e.consume(R);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),k(R)}function k(R){if(R===null){T(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return gt(R)?(e.consume(R),T(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),k)}function T(R,_){const D=t.sliceStream(R);if(_&&D.push(null),R.previous=a,a&&(a.next=R),a=R,s.defineSkip(R.start),s.write(D),t.parser.lazy[R.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<l&&(!s.events[A][1].end||s.events[A][1].end.offset>l))return;const N=t.events.length;let P=N,$,I;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if($){I=t.events[P][1].end;break}$=!0}for(C(r),A=N;A<t.events.length;)t.events[A][1].end={...I},A++;ti(t.events,P+1,0,t.events.slice(N)),t.events.length=A}}function C(R){let _=n.length;for(;_-- >R;){const D=n[_];t.containerState=D[1],D[0].exit.call(t,e)}n.length=R}function E(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function TX(e,t,n){return Wt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dl(e){if(e===null||mn(e)||ca(e))return 1;if(Qh(e))return 2}function Jh(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 Av={name:"attention",resolveAll:CX,tokenize:RX};function CX(e,t){let n=-1,r,s,a,l,c,f,d,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;f=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};KC(m,-f),KC(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=di(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=di(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),d=di(d,Jh(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=di(d,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=di(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ti(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function RX(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Dl(r);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const d=e.exit("attentionSequence"),h=Dl(f),m=!h||h===2&&s||n.includes(f),b=!s||s===2&&h||n.includes(r);return d._open=!!(a===42?m:m&&(s||!b)),d._close=!!(a===42?b:b&&(h||!m)),t(f)}}function KC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _X={name:"autolink",tokenize:AX};function AX(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 Er(y)?(e.consume(y),l):y===64?n(y):d(y)}function l(y){return y===43||y===45||y===46||hr(y)?(r=1,c(y)):d(y)}function c(y){return y===58?(e.consume(y),r=0,f):(y===43||y===45||y===46||hr(y))&&r++<32?(e.consume(y),c):(r=0,d(y))}function f(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||Qp(y)?n(y):(e.consume(y),f)}function d(y){return y===64?(e.consume(y),h):yX(y)?(e.consume(y),d):n(y)}function h(y){return hr(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||hr(y))&&r++<63){const S=y===45?b:m;return e.consume(y),S}return n(y)}}const rf={partial:!0,tokenize:NX};function NX(e,t,n){return r;function r(a){return zt(a)?Wt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||gt(a)?t(a):n(a)}}const i2={continuation:{tokenize:IX},exit:MX,name:"blockQuote",tokenize:OX};function OX(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 zt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function IX(e,t,n){const r=this;return s;function s(l){return zt(l)?Wt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(i2,t,n)(l)}}function MX(e){e.exit("blockQuote")}const s2={name:"characterEscape",tokenize:DX};function DX(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 xX(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const o2={name:"characterReference",tokenize:LX};function LX(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"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,l=hr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=vX,h):(e.enter("characterReferenceValue"),a=7,l=_v,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===hr&&!Cx(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 YC={partial:!0,tokenize:zX},XC={concrete:!0,name:"codeFenced",tokenize:jX};function jX(e,t,n){const r=this,s={partial:!0,tokenize:D};let a=0,l=0,c;return f;function f(A){return d(A)}function d(A){const N=r.events[r.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===c?(l++,e.consume(A),h):l<3?n(A):(e.exit("codeFencedFenceSequence"),zt(A)?Wt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||gt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(YC,k,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||gt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):zt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Wt(e,y,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),b)}function y(A){return A===null||gt(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(A))}function S(A){return A===null||gt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===c?n(A):(e.consume(A),S)}function k(A){return e.attempt(s,_,T)(A)}function T(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),C}function C(A){return a>0&&zt(A)?Wt(e,E,"linePrefix",a+1)(A):E(A)}function E(A){return A===null||gt(A)?e.check(YC,k,_)(A):(e.enter("codeFlowValue"),R(A))}function R(A){return A===null||gt(A)?(e.exit("codeFlowValue"),E(A)):(e.consume(A),R)}function _(A){return e.exit("codeFenced"),t(A)}function D(A,N,P){let $=0;return I;function I(H){return A.enter("lineEnding"),A.consume(H),A.exit("lineEnding"),V}function V(H){return A.enter("codeFencedFence"),zt(H)?Wt(A,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):B(H)}function B(H){return H===c?(A.enter("codeFencedFenceSequence"),z(H)):P(H)}function z(H){return H===c?($++,A.consume(H),z):$>=l?(A.exit("codeFencedFenceSequence"),zt(H)?Wt(A,j,"whitespace")(H):j(H)):P(H)}function j(H){return H===null||gt(H)?(A.exit("codeFencedFence"),N(H)):P(H)}}}function zX(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 sy={name:"codeIndented",tokenize:$X},PX={partial:!0,tokenize:FX};function $X(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),Wt(e,a,"linePrefix",5)(d)}function a(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):gt(d)?e.attempt(PX,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||gt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function FX(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):gt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Wt(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):gt(l)?s(l):n(l)}}const BX={name:"codeText",previous:HX,resolve:UX,tokenize:qX};function UX(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 HX(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qX(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"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):gt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||gt(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}class VX{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&&Yu(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),Yu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yu(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);Yu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yu(this.left,n.reverse())}}}function Yu(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 a2(e){const t={};let n=-1,r,s,a,l,c,f,d;const h=new VX(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"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,GX(h,n)),n=t[n],d=!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 ti(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function GX(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,f=[],d={};let h,m,b=-1,y=n,S=0,k=0;const T=[k];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&&(k=b+1,T.push(k),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):T.pop(),b=T.length;b--;){const C=c.slice(T[b],T[b+1]),E=a.pop();f.push([E,E+C.length-1]),e.splice(E,2,C)}for(f.reverse(),b=-1;++b<f.length;)d[S+f[b][0]]=S+f[b][1],S+=f[b][1]-f[b][0]-1;return d}const WX={resolve:YX,tokenize:XX},KX={partial:!0,tokenize:ZX};function YX(e){return a2(e),e}function XX(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):gt(c)?e.check(KX,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 ZX(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Wt(e,a,"linePrefix")}function a(l){if(l===null||gt(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 l2(e,t,n,r,s,a,l,c,f){const d=f||Number.POSITIVE_INFINITY;let h=0;return m;function m(C){return C===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(C),e.exit(a),b):C===null||C===32||C===41||Qp(C)?n(C):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),k(C))}function b(C){return C===62?(e.enter(a),e.consume(C),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(C))}function y(C){return C===62?(e.exit("chunkString"),e.exit(c),b(C)):C===null||C===60||gt(C)?n(C):(e.consume(C),C===92?S:y)}function S(C){return C===60||C===62||C===92?(e.consume(C),y):y(C)}function k(C){return!h&&(C===null||C===41||mn(C))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(C)):h<d&&C===40?(e.consume(C),h++,k):C===41?(e.consume(C),h--,k):C===null||C===32||C===40||Qp(C)?n(C):(e.consume(C),C===92?T:k)}function T(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function u2(e,t,n,r,s,a){const l=this;let c=0,f;return d;function d(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&&!f||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):gt(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||gt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),f||(f=!zt(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function c2(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,f):n(b)}function f(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),d(b))}function d(b){return b===l?(e.exit(a),f(l)):b===null?n(b):gt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Wt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||gt(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function pc(e,t){let n;return r;function r(s){return gt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):zt(s)?Wt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const QX={name:"definition",tokenize:eZ},JX={partial:!0,tokenize:tZ};function eZ(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return u2.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return mn(y)?pc(e,d)(y):d(y)}function d(y){return l2(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(JX,m,m)(y)}function m(y){return zt(y)?Wt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||gt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function tZ(e,t,n){return r;function r(c){return mn(c)?pc(e,s)(c):n(c)}function s(c){return c2(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return zt(c)?Wt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||gt(c)?t(c):n(c)}}const nZ={name:"hardBreakEscape",tokenize:rZ};function rZ(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return gt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const iZ={name:"headingAtx",resolve:sZ,tokenize:oZ};function sZ(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"},ti(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function oZ(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||mn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||gt(h)?(e.exit("atxHeading"),t(h)):zt(h)?Wt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),c(h))}function d(h){return h===null||h===35||mn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),d)}}const aZ=["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"],ZC=["pre","script","style","textarea"],lZ={concrete:!0,name:"htmlFlow",resolveTo:fZ,tokenize:dZ},uZ={partial:!0,tokenize:hZ},cZ={partial:!0,tokenize:pZ};function fZ(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 dZ(e,t,n){const r=this;let s,a,l,c,f;return d;function d(L){return h(L)}function h(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),b):L===47?(e.consume(L),a=!0,k):L===63?(e.consume(L),s=3,r.interrupt?t:O):Er(L)?(e.consume(L),l=String.fromCharCode(L),T):n(L)}function b(L){return L===45?(e.consume(L),s=2,y):L===91?(e.consume(L),s=5,c=0,S):Er(L)?(e.consume(L),s=4,r.interrupt?t:O):n(L)}function y(L){return L===45?(e.consume(L),r.interrupt?t:O):n(L)}function S(L){const X="CDATA[";return L===X.charCodeAt(c++)?(e.consume(L),c===X.length?r.interrupt?t:B:S):n(L)}function k(L){return Er(L)?(e.consume(L),l=String.fromCharCode(L),T):n(L)}function T(L){if(L===null||L===47||L===62||mn(L)){const X=L===47,te=l.toLowerCase();return!X&&!a&&ZC.includes(te)?(s=1,r.interrupt?t(L):B(L)):aZ.includes(l.toLowerCase())?(s=6,X?(e.consume(L),C):r.interrupt?t(L):B(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?E(L):R(L))}return L===45||hr(L)?(e.consume(L),l+=String.fromCharCode(L),T):n(L)}function C(L){return L===62?(e.consume(L),r.interrupt?t:B):n(L)}function E(L){return zt(L)?(e.consume(L),E):I(L)}function R(L){return L===47?(e.consume(L),I):L===58||L===95||Er(L)?(e.consume(L),_):zt(L)?(e.consume(L),R):I(L)}function _(L){return L===45||L===46||L===58||L===95||hr(L)?(e.consume(L),_):D(L)}function D(L){return L===61?(e.consume(L),A):zt(L)?(e.consume(L),D):R(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),f=L,N):zt(L)?(e.consume(L),A):P(L)}function N(L){return L===f?(e.consume(L),f=null,$):L===null||gt(L)?n(L):(e.consume(L),N)}function P(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||mn(L)?D(L):(e.consume(L),P)}function $(L){return L===47||L===62||zt(L)?R(L):n(L)}function I(L){return L===62?(e.consume(L),V):n(L)}function V(L){return L===null||gt(L)?B(L):zt(L)?(e.consume(L),V):n(L)}function B(L){return L===45&&s===2?(e.consume(L),q):L===60&&s===1?(e.consume(L),K):L===62&&s===4?(e.consume(L),F):L===63&&s===3?(e.consume(L),O):L===93&&s===5?(e.consume(L),Y):gt(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(uZ,G,z)(L)):L===null||gt(L)?(e.exit("htmlFlowData"),z(L)):(e.consume(L),B)}function z(L){return e.check(cZ,j,G)(L)}function j(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),H}function H(L){return L===null||gt(L)?z(L):(e.enter("htmlFlowData"),B(L))}function q(L){return L===45?(e.consume(L),O):B(L)}function K(L){return L===47?(e.consume(L),l="",U):B(L)}function U(L){if(L===62){const X=l.toLowerCase();return ZC.includes(X)?(e.consume(L),F):B(L)}return Er(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),U):B(L)}function Y(L){return L===93?(e.consume(L),O):B(L)}function O(L){return L===62?(e.consume(L),F):L===45&&s===2?(e.consume(L),O):B(L)}function F(L){return L===null||gt(L)?(e.exit("htmlFlowData"),G(L)):(e.consume(L),F)}function G(L){return e.exit("htmlFlow"),t(L)}}function pZ(e,t,n){const r=this;return s;function s(l){return gt(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 hZ(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(rf,t,n)}}const mZ={name:"htmlText",tokenize:gZ};function gZ(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),f}function f(O){return O===33?(e.consume(O),d):O===47?(e.consume(O),D):O===63?(e.consume(O),R):Er(O)?(e.consume(O),P):n(O)}function d(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),a=0,S):Er(O)?(e.consume(O),E):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):gt(O)?(l=m,K(O)):(e.consume(O),m)}function b(O){return O===45?(e.consume(O),y):m(O)}function y(O){return O===62?q(O):O===45?b(O):m(O)}function S(O){const F="CDATA[";return O===F.charCodeAt(a++)?(e.consume(O),a===F.length?k:S):n(O)}function k(O){return O===null?n(O):O===93?(e.consume(O),T):gt(O)?(l=k,K(O)):(e.consume(O),k)}function T(O){return O===93?(e.consume(O),C):k(O)}function C(O){return O===62?q(O):O===93?(e.consume(O),C):k(O)}function E(O){return O===null||O===62?q(O):gt(O)?(l=E,K(O)):(e.consume(O),E)}function R(O){return O===null?n(O):O===63?(e.consume(O),_):gt(O)?(l=R,K(O)):(e.consume(O),R)}function _(O){return O===62?q(O):R(O)}function D(O){return Er(O)?(e.consume(O),A):n(O)}function A(O){return O===45||hr(O)?(e.consume(O),A):N(O)}function N(O){return gt(O)?(l=N,K(O)):zt(O)?(e.consume(O),N):q(O)}function P(O){return O===45||hr(O)?(e.consume(O),P):O===47||O===62||mn(O)?$(O):n(O)}function $(O){return O===47?(e.consume(O),q):O===58||O===95||Er(O)?(e.consume(O),I):gt(O)?(l=$,K(O)):zt(O)?(e.consume(O),$):q(O)}function I(O){return O===45||O===46||O===58||O===95||hr(O)?(e.consume(O),I):V(O)}function V(O){return O===61?(e.consume(O),B):gt(O)?(l=V,K(O)):zt(O)?(e.consume(O),V):$(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,z):gt(O)?(l=B,K(O)):zt(O)?(e.consume(O),B):(e.consume(O),j)}function z(O){return O===s?(e.consume(O),s=void 0,H):O===null?n(O):gt(O)?(l=z,K(O)):(e.consume(O),z)}function j(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||mn(O)?$(O):(e.consume(O),j)}function H(O){return O===47||O===62||mn(O)?$(O):n(O)}function q(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function K(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),U}function U(O){return zt(O)?Wt(e,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):Y(O)}function Y(O){return e.enter("htmlTextData"),l(O)}}const Rx={name:"labelEnd",resolveAll:xZ,resolveTo:kZ,tokenize:SZ},bZ={tokenize:wZ},yZ={tokenize:EZ},vZ={tokenize:TZ};function xZ(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&&ti(e,0,e.length,n),e}function kZ(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 f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={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",f,t],["enter",d,t]],c=di(c,e.slice(a+1,a+r+3)),c=di(c,[["enter",h,t]]),c=di(c,Jh(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=di(c,[["exit",h,t],e[l-2],e[l-1],["exit",d,t]]),c=di(c,e.slice(l+1)),c=di(c,[["exit",f,t]]),ti(e,a,e.length,c),e}function SZ(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(_i(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(bZ,h,l?h:m)(b):b===91?e.attempt(yZ,h,l?d:m)(b):l?h(b):m(b)}function d(b){return e.attempt(vZ,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function wZ(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 mn(m)?pc(e,a)(m):a(m)}function a(m){return m===41?h(m):l2(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return mn(m)?pc(e,f)(m):h(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?c2(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return mn(m)?pc(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 EZ(e,t,n){const r=this;return s;function s(c){return u2.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(_i(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function TZ(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 CZ={name:"labelStartImage",resolveAll:Rx.resolveAll,tokenize:RZ};function RZ(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 _Z={name:"labelStartLink",resolveAll:Rx.resolveAll,tokenize:AZ};function AZ(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 oy={name:"lineEnding",tokenize:NZ};function NZ(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Wt(e,t,"linePrefix")}}const bp={name:"thematicBreak",tokenize:OZ};function OZ(e,t,n){let r=0,s;return a;function a(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||gt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===s?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),zt(d)?Wt(e,c,"whitespace")(d):c(d))}}const Lr={continuation:{tokenize:LZ},exit:zZ,name:"list",tokenize:DZ},IZ={partial:!0,tokenize:PZ},MZ={partial:!0,tokenize:jZ};function DZ(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 S=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:_v(y)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(bp,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return _v(y)&&++l<10?(e.consume(y),f):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(rf,r.interrupt?n:h,e.attempt(IZ,b,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return zt(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 LZ(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rf,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Wt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!zt(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(MZ,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Wt(e,e.attempt(Lr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function jZ(e,t,n){const r=this;return Wt(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 zZ(e){e.exit(this.containerState.type)}function PZ(e,t,n){const r=this;return Wt(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!zt(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const QC={name:"setextUnderline",resolveTo:$Z,tokenize:FZ};function $Z(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 FZ(e,t,n){const r=this;let s;return a;function a(d){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=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),zt(d)?Wt(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||gt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const BZ={tokenize:UZ};function UZ(e){const t=this,n=e.attempt(rf,r,e.attempt(this.parser.constructs.flowInitial,s,Wt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(WX,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 HZ={resolveAll:d2()},qZ=f2("string"),VZ=f2("text");function f2(e){return{resolveAll:d2(e==="text"?GZ: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 d(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return d(h)?(n.exit("data"),a(h)):(n.consume(h),f)}function d(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 d2(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 GZ(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,f;for(;a--;){const d=s[a];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||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={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const WZ={42:Lr,43:Lr,45:Lr,48:Lr,49:Lr,50:Lr,51:Lr,52:Lr,53:Lr,54:Lr,55:Lr,56:Lr,57:Lr,62:i2},KZ={91:QX},YZ={[-2]:sy,[-1]:sy,32:sy},XZ={35:iZ,42:bp,45:[QC,bp],60:lZ,61:QC,95:bp,96:XC,126:XC},ZZ={38:o2,92:s2},QZ={[-5]:oy,[-4]:oy,[-3]:oy,33:CZ,38:o2,42:Av,60:[_X,mZ],91:_Z,92:[nZ,s2],93:Rx,95:Av,96:BX},JZ={null:[Av,HZ]},eQ={null:[42,95]},tQ={null:[]},nQ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eQ,contentInitial:KZ,disable:tQ,document:WZ,flow:XZ,flowInitial:YZ,insideSpan:JZ,string:ZZ,text:QZ},Symbol.toStringTag,{value:"Module"}));function rQ(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 f={attempt:N(D),check:N(A),consume:E,enter:R,exit:_,interrupt:N(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(d,f);return t.resolveAll&&a.push(t),d;function m(V){return l=di(l,V),T(),l[l.length-1]!==null?[]:(P(t,0),d.events=Jh(a,d.events,d),d.events)}function b(V,B){return sQ(y(V),B)}function y(V){return iQ(l,V)}function S(){const{_bufferIndex:V,_index:B,line:z,column:j,offset:H}=r;return{_bufferIndex:V,_index:B,line:z,column:j,offset:H}}function k(V){s[V.line]=V.column,I()}function T(){let V;for(;r._index<l.length;){const B=l[r._index];if(typeof B=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<B.length;)C(B.charCodeAt(r._bufferIndex));else C(B)}}function C(V){h=h(V)}function E(V){gt(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,I()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=V}function R(V,B){const z=B||{};return z.type=V,z.start=S(),d.events.push(["enter",z,d]),c.push(z),z}function _(V){const B=c.pop();return B.end=S(),d.events.push(["exit",B,d]),B}function D(V,B){P(V,B.from)}function A(V,B){B.restore()}function N(V,B){return z;function z(j,H,q){let K,U,Y,O;return Array.isArray(j)?G(j):"tokenize"in j?G([j]):F(j);function F(J){return le;function le(oe){const ue=oe!==null&&J[oe],xe=oe!==null&&J.null,ye=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(xe)?xe:xe?[xe]:[]];return G(ye)(oe)}}function G(J){return K=J,U=0,J.length===0?q:L(J[U])}function L(J){return le;function le(oe){return O=$(),Y=J,J.partial||(d.currentConstruct=J),J.name&&d.parser.constructs.disable.null.includes(J.name)?te():J.tokenize.call(B?Object.assign(Object.create(d),B):d,f,X,te)(oe)}}function X(J){return V(Y,O),H}function te(J){return O.restore(),++U<K.length?L(K[U]):q}}}function P(V,B){V.resolveAll&&!a.includes(V)&&a.push(V),V.resolve&&ti(d.events,B,d.events.length-B,V.resolve(d.events.slice(B),d)),V.resolveTo&&(d.events=V.resolveTo(d.events,d))}function $(){const V=S(),B=d.previous,z=d.currentConstruct,j=d.events.length,H=Array.from(c);return{from:j,restore:q};function q(){r=V,d.previous=B,d.currentConstruct=z,d.events.length=j,c=H,I()}}function I(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function iQ(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 sQ(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=`
|
|
28
|
+
`;break}case-3:{l=`\r
|
|
29
|
+
`;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 oQ(e){const r={constructs:n2([nQ,...(e||{}).extensions||[]]),content:s(kX),defined:[],document:s(wX),flow:s(BZ),lazy:{},string:s(qZ),text:s(VZ)};return r;function s(a){return l;function l(c){return rQ(r,a,c)}}}function aQ(e){for(;!a2(e););return e}const JC=/[\0\t\n\r]/g;function lQ(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const f=[];let d,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(JC.lastIndex=m,d=JC.exec(a),b=d&&d.index!==void 0?d.index:a.length,y=a.charCodeAt(b),!d){t=a.slice(m);break}if(y===10&&m===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<b&&(f.push(a.slice(m,b)),e+=b-m),y){case 0:{f.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,f.push(-2);e++<h;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const uQ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cQ(e){return e.replace(uQ,fQ)}function fQ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return r2(n.slice(a?2:1),a?16:10)}return Cx(n)||e}const p2={}.hasOwnProperty;function dQ(e,t,n){return typeof t!="string"&&(n=t,t=void 0),pQ(n)(aQ(oQ(n).document().write(lQ()(e,t,!0))))}function pQ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(_e),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(Se),blockQuote:a(xe),characterEscape:$,characterReference:$,codeFenced:a(ye),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(ye,l),codeText:a(pe,l),codeTextData:$,data:$,codeFlowValue:$,definition:a(me),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(ke),hardBreakEscape:a(Te),hardBreakTrailing:a(Te),htmlFlow:a(ve,l),htmlFlowData:$,htmlText:a(ve,l),htmlTextData:$,image:a(Ie),label:l,link:a(_e),listItem:a(We),listItemValue:b,listOrdered:a(je,m),listUnordered:a(je),paragraph:a(Ce),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Se),strong:a($e),thematicBreak:a(Ee)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:ue,autolinkProtocol:oe,blockQuote:f(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:J,characterReference:le,codeFenced:f(T),codeFencedFence:k,codeFencedFenceInfo:y,codeFencedFenceMeta:S,codeFlowValue:I,codeIndented:f(C),codeText:f(H),codeTextData:I,data:I,definition:f(),definitionDestinationString:_,definitionLabelString:E,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(B),hardBreakTrailing:f(B),htmlFlow:f(z),htmlFlowData:I,htmlText:f(j),htmlTextData:I,image:f(K),label:Y,labelText:U,lineEnding:V,link:f(q),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:X,resourceDestinationString:O,resourceTitleString:F,resource:G,setextHeading:f(P),setextHeadingLineSequence:N,setextHeadingText:A,strong:f(),thematicBreak:f()}};h2(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let ee={type:"root",children:[]};const be={stack:[ee],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:h,data:n},Ne=[];let Ye=-1;for(;++Ye<Q.length;)if(Q[Ye][1].type==="listOrdered"||Q[Ye][1].type==="listUnordered")if(Q[Ye][0]==="enter")Ne.push(Ye);else{const at=Ne.pop();Ye=s(Q,at,Ye)}for(Ye=-1;++Ye<Q.length;){const at=t[Q[Ye][0]];p2.call(at,Q[Ye][1].type)&&at[Q[Ye][1].type].call(Object.assign({sliceSerialize:Q[Ye][2].sliceSerialize},be),Q[Ye][1])}if(be.tokenStack.length>0){const at=be.tokenStack[be.tokenStack.length-1];(at[1]||eR).call(be,void 0,at[0])}for(ee.position={start:po(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:po(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)ee=t.transforms[Ye](ee)||ee;return ee}function s(Q,ee,be){let Ne=ee-1,Ye=-1,at=!1,ft,nt,vt,St;for(;++Ne<=be;){const et=Q[Ne];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?Ye++:Ye--,St=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(ft&&!St&&!Ye&&!vt&&(vt=Ne),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!Ye&&et[0]==="enter"&&et[1].type==="listItemPrefix"||Ye===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(ft){let Qe=Ne;for(nt=void 0;Qe--;){const Pe=Q[Qe];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;nt&&(Q[nt][1].type="lineEndingBlank",at=!0),Pe[1].type="lineEnding",nt=Qe}else if(!(Pe[1].type==="linePrefix"||Pe[1].type==="blockQuotePrefix"||Pe[1].type==="blockQuotePrefixWhitespace"||Pe[1].type==="blockQuoteMarker"||Pe[1].type==="listItemIndent"))break}vt&&(!nt||vt<nt)&&(ft._spread=!0),ft.end=Object.assign({},nt?Q[nt][1].start:et[1].end),Q.splice(nt||Ne,0,["exit",ft,et[2]]),Ne++,be++}if(et[1].type==="listItemPrefix"){const Qe={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};ft=Qe,Q.splice(Ne,0,["enter",Qe,et[2]]),Ne++,be++,vt=void 0,St=!0}}}return Q[ee][1]._spread=at,be}function a(Q,ee){return be;function be(Ne){c.call(this,Q(Ne),Ne),ee&&ee.call(this,Ne)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(Q,ee,be){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ee,be||void 0]),Q.position={start:po(ee.start),end:void 0}}function f(Q){return ee;function ee(be){Q&&Q.call(this,be),d.call(this,be)}}function d(Q,ee){const be=this.stack.pop(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==Q.type&&(ee?ee.call(this,Q,Ne[0]):(Ne[1]||eR).call(this,Q,Ne[0]));else throw new Error("Cannot close `"+Q.type+"` ("+dc({start:Q.start,end:Q.end})+"): it’s not open");be.position.end=po(Q.end)}function h(){return Tx(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=Q}function S(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=Q}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.value=Q.replace(/(\r?\n|\r)$/g,"")}function E(Q){const ee=this.resume(),be=this.stack[this.stack.length-1];be.label=ee,be.identifier=_i(this.sliceSerialize(Q)).toLowerCase()}function R(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.title=Q}function _(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.url=Q}function D(Q){const ee=this.stack[this.stack.length-1];if(!ee.depth){const be=this.sliceSerialize(Q).length;ee.depth=be}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(Q){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function $(Q){const be=this.stack[this.stack.length-1].children;let Ne=be[be.length-1];(!Ne||Ne.type!=="text")&&(Ne=se(),Ne.position={start:po(Q.start),end:void 0},be.push(Ne)),this.stack.push(Ne)}function I(Q){const ee=this.stack.pop();ee.value+=this.sliceSerialize(Q),ee.position.end=po(Q.end)}function V(Q){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ee.children[ee.children.length-1];be.position.end=po(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&($.call(this,Q),I.call(this,Q))}function B(){this.data.atHardBreak=!0}function z(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.value=Q}function j(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.value=Q}function H(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.value=Q}function q(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ee,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function K(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ee,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function U(Q){const ee=this.sliceSerialize(Q),be=this.stack[this.stack.length-2];be.label=cQ(ee),be.identifier=_i(ee).toLowerCase()}function Y(){const Q=this.stack[this.stack.length-1],ee=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const Ne=Q.children;be.children=Ne}else be.alt=ee}function O(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.url=Q}function F(){const Q=this.resume(),ee=this.stack[this.stack.length-1];ee.title=Q}function G(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function X(Q){const ee=this.resume(),be=this.stack[this.stack.length-1];be.label=ee,be.identifier=_i(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function te(Q){this.data.characterReferenceType=Q.type}function J(Q){const ee=this.sliceSerialize(Q),be=this.data.characterReferenceType;let Ne;be?(Ne=r2(ee,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=Cx(ee);const Ye=this.stack[this.stack.length-1];Ye.value+=Ne}function le(Q){const ee=this.stack.pop();ee.position.end=po(Q.end)}function oe(Q){I.call(this,Q);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(Q)}function ue(Q){I.call(this,Q);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(Q)}function xe(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function pe(){return{type:"inlineCode",value:""}}function me(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function Te(){return{type:"break"}}function ve(){return{type:"html",value:""}}function Ie(){return{type:"image",title:null,url:"",alt:null}}function _e(){return{type:"link",title:null,url:"",children:[]}}function je(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function We(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Ce(){return{type:"paragraph",children:[]}}function $e(){return{type:"strong",children:[]}}function se(){return{type:"text",value:""}}function Ee(){return{type:"thematicBreak"}}}function po(e){return{line:e.line,column:e.column,offset:e.offset}}function h2(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?h2(e,r):hQ(e,r)}}function hQ(e,t){let n;for(n in t)if(p2.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+"` ("+dc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dc({start:t.start,end:t.end})+") is still open")}function mQ(e){const t=this;t.parser=n;function n(r){return dQ(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gQ(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 bQ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
30
|
+
`}]}function yQ(e,t){const n=t.value?t.value+`
|
|
31
|
+
`:"",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 vQ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xQ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kQ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Vl(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 f={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,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function SQ(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 wQ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function m2(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 EQ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return m2(e,t);const s={src:Vl(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 TQ(e,t){const n={src:Vl(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 CQ(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 RQ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return m2(e,t);const s={href:Vl(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 _Q(e,t){const n={href:Vl(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 AQ(e,t,n){const r=e.all(t),s=n?NQ(n):g2(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:`
|
|
32
|
+
`}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const f=r[r.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
33
|
+
`});const d={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,d),e.applyData(t,d)}function NQ(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=g2(n[r])}return t}function g2(e){const t=e.spread;return t??e.children.length>1}function OQ(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 IQ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MQ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function DQ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LQ(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=kx(t.children[1]),f=YM(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),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 jQ(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 f=-1;const d=[];for(;++f<c;){const m=t.children[f],b={},y=l?l[f]:void 0;y&&(b.align=y);let S={type:"element",tagName:a,properties:b,children:[]};m&&(S.children=e.all(m),e.patch(m,S),S=e.applyData(m,S)),d.push(S)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function zQ(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,nR=32;function PQ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(rR(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(rR(t.slice(s),s>0,!1)),a.join("")}function rR(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===tR||a===nR;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===tR||a===nR;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function $Q(e,t){const n={type:"text",value:PQ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FQ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const BQ={blockquote:gQ,break:bQ,code:yQ,delete:vQ,emphasis:xQ,footnoteReference:kQ,heading:SQ,html:wQ,imageReference:EQ,image:TQ,inlineCode:CQ,linkReference:RQ,link:_Q,listItem:AQ,list:OQ,paragraph:IQ,root:MQ,strong:DQ,table:LQ,tableCell:zQ,tableRow:jQ,text:$Q,thematicBreak:FQ,toml:Zd,yaml:Zd,definition:Zd,footnoteDefinition:Zd};function Zd(){}const b2=-1,em=0,hc=1,Jp=2,_x=3,Ax=4,Nx=5,Ox=6,y2=7,v2=8,iR=typeof self=="object"?self:globalThis,UQ=(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 em:case b2:return n(l,s);case hc:{const c=n([],s);for(const f of l)c.push(r(f));return c}case Jp:{const c=n({},s);for(const[f,d]of l)c[r(f)]=r(d);return c}case _x:return n(new Date(l),s);case Ax:{const{source:c,flags:f}=l;return n(new RegExp(c,f),s)}case Nx:{const c=n(new Map,s);for(const[f,d]of l)c.set(r(f),r(d));return c}case Ox:{const c=n(new Set,s);for(const f of l)c.add(r(f));return c}case y2:{const{name:c,message:f}=l;return n(new iR[c](f),s)}case v2: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 iR[a](l),s)};return r},sR=e=>UQ(new Map,e)(0),sl="",{toString:HQ}={},{keys:qQ}=Object,Xu=e=>{const t=typeof e;if(t!=="object"||!e)return[em,t];const n=HQ.call(e).slice(8,-1);switch(n){case"Array":return[hc,sl];case"Object":return[Jp,sl];case"Date":return[_x,sl];case"RegExp":return[Ax,sl];case"Map":return[Nx,sl];case"Set":return[Ox,sl];case"DataView":return[hc,n]}return n.includes("Array")?[hc,n]:n.includes("Error")?[y2,n]:[Jp,n]},Qd=([e,t])=>e===em&&(t==="function"||t==="symbol"),VQ=(e,t,n,r)=>{const s=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},a=l=>{if(n.has(l))return n.get(l);let[c,f]=Xu(l);switch(c){case em:{let h=l;switch(f){case"bigint":c=v2,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return s([b2],l)}return s([c,h],l)}case hc:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),s([f,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case Jp:{if(f)switch(f){case"BigInt":return s([f,l.toString()],l);case"Boolean":case"Number":case"String":return s([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of qQ(l))(e||!Qd(Xu(l[b])))&&h.push([a(b),a(l[b])]);return m}case _x:return s([c,l.toISOString()],l);case Ax:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case Nx:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(Qd(Xu(b))||Qd(Xu(y))))&&h.push([a(b),a(y)]);return m}case Ox:{const h=[],m=s([c,h],l);for(const b of l)(e||!Qd(Xu(b)))&&h.push(a(b));return m}}const{message:d}=l;return s([c,{name:f,message:d}],l)};return a},oR=(e,{json:t,lossy:n}={})=>{const r=[];return VQ(!(t||n),!!t,new Map,r)(e),r},eh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?sR(oR(e,t)):structuredClone(e):(e,t)=>sR(oR(e,t));function GQ(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 WQ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function KQ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||GQ,r=e.options.footnoteBackLabel||WQ,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),b=Vl(m.toLowerCase());let y=0;const S=[],k=e.footnoteCounts.get(m);for(;k!==void 0&&++y<=k;){S.length>0&&S.push({type:"text",value:" "});let E=typeof n=="string"?n:n(f,y);typeof E=="string"&&(E={type:"text",value:E}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,y),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const T=h[h.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const E=T.children[T.children.length-1];E&&E.type==="text"?E.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...S)}else h.push(...S);const C={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(d,C),c.push(C)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...eh(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
34
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
35
|
+
`}]}}const sf=(function(e){if(e==null)return QQ;if(typeof e=="function")return tm(e);if(typeof e=="object")return Array.isArray(e)?YQ(e):XQ(e);if(typeof e=="string")return ZQ(e);throw new Error("Expected function, string, or object as test")});function YQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sf(e[n]);return tm(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function XQ(e){const t=e;return tm(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function ZQ(e){return tm(t);function t(n){return n&&n.type===e}}function tm(e){return t;function t(n,r,s){return!!(JQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function QQ(){return!0}function JQ(e){return e!==null&&typeof e=="object"&&"type"in e}const x2=[],eJ=!0,Nv=!1,tJ="skip";function k2(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=sf(s),l=r?-1:1;c(e,void 0,[])();function c(f,d,h){const m=f&&typeof f=="object"?f:{};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 ("+(f.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=x2,S,k,T;if((!t||a(f,d,h[h.length-1]||void 0))&&(y=nJ(n(f,h)),y[0]===Nv))return y;if("children"in f&&f.children){const C=f;if(C.children&&y[0]!==tJ)for(k=(r?C.children.length:-1)+l,T=h.concat(C);k>-1&&k<C.children.length;){const E=C.children[k];if(S=c(E,k,T)(),S[0]===Nv)return S;k=typeof S[1]=="number"?S[1]:k+l}}return y}}}function nJ(e){return Array.isArray(e)?e:typeof e=="number"?[eJ,e]:e==null?x2:[e]}function nm(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),k2(e,a,c,s);function c(f,d){const h=d[d.length-1],m=h?h.children.indexOf(f):void 0;return l(f,m,h)}}const Ov={}.hasOwnProperty,rJ={};function iJ(e,t){const n=t||rJ,r=new Map,s=new Map,a=new Map,l={...BQ,...n.handlers},c={all:d,applyData:oJ,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:n,patch:sJ,wrap:lJ};return nm(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 f(h,m){const b=h.type,y=c.handlers[b];if(Ov.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:k,...T}=h,C=eh(T);return C.children=c.all(h),C}return eh(h)}return(c.options.unknownHandler||aJ)(c,h,m)}function d(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const S=c.one(b[y],h);if(S){if(y&&b[y-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=aR(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=aR(k.value))}Array.isArray(S)?m.push(...S):m.push(S)}}}return m}}function sJ(e,t){e.position&&(t.position=WY(e))}function oJ(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,eh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function aJ(e,t){const n=t.data||{},r="value"in t&&!(Ov.call(n,"hProperties")||Ov.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 lJ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
36
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
37
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
38
|
+
`}),n}function aR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function lR(e,t){const n=iJ(e,t),r=n.one(e,void 0),s=KQ(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
39
|
+
`},s),a}function uJ(e,t){return e&&"run"in e?async function(n,r){const s=lR(n,{file:r,...t});await e.run(s,r)}:function(n,r){return lR(n,{file:r,...e||t})}}function uR(e){if(e)throw e}var ay,cR;function cJ(){if(cR)return ay;cR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},l=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},c=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return ay=function f(){var d,h,m,b,y,S,k=arguments[0],T=1,C=arguments.length,E=!1;for(typeof k=="boolean"&&(E=k,k=arguments[1]||{},T=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});T<C;++T)if(d=arguments[T],d!=null)for(h in d)m=c(k,h),b=c(d,h),k!==b&&(E&&b&&(a(b)||(y=s(b)))?(y?(y=!1,S=m&&s(m)?m:[]):S=m&&a(m)?m:{},l(k,{name:h,newValue:f(E,S,b)})):typeof b<"u"&&l(k,{name:h,newValue:b}));return k},ay}var fJ=cJ();const ly=Pc(fJ);function Iv(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 dJ(){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(f,...d){const h=e[++a];let m=-1;if(f){l(f);return}for(;++m<s.length;)(d[m]===null||d[m]===void 0)&&(d[m]=s[m]);s=d,h?pJ(h,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function pJ(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(s);try{f=e.apply(this,l)}catch(d){const h=d;if(c&&n)throw h;return s(h)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,s):f instanceof Error?s(f):a(f))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Ui={basename:hJ,dirname:mJ,extname:gJ,join:bJ,sep:"/"};function hJ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');of(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 mJ(e){if(of(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 gJ(e){of(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 bJ(...e){let t=-1,n;for(;++t<e.length;)of(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":yJ(n)}function yJ(e){of(e);const t=e.codePointAt(0)===47;let n=vJ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vJ(e,t){let n="",r=0,s=-1,a=0,l=-1,c,f;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(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),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 of(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xJ={cwd:kJ};function kJ(){return"/"}function Mv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function SJ(e){if(typeof e=="string")e=new URL(e);else if(!Mv(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 wJ(e)}function wJ(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 uy=["history","path","basename","stem","extname","dirname"];class S2{constructor(t){let n;t?Mv(t)?n={path:t}:typeof t=="string"||EJ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":xJ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<uy.length;){const a=uy[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)uy.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ui.basename(this.path):void 0}set basename(t){fy(t,"basename"),cy(t,"basename"),this.path=Ui.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ui.dirname(this.path):void 0}set dirname(t){fR(this.basename,"dirname"),this.path=Ui.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ui.extname(this.path):void 0}set extname(t){if(cy(t,"extname"),fR(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=Ui.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mv(t)&&(t=SJ(t)),fy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ui.basename(this.path,this.extname):void 0}set stem(t){fy(t,"stem"),cy(t,"stem"),this.path=Ui.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 yr(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 cy(e,t){if(e&&e.includes(Ui.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ui.sep+"`")}function fy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fR(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function EJ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const TJ=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),CJ={}.hasOwnProperty;class Ix extends TJ{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=dJ()}copy(){const t=new Ix;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ly(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hy("data",this.frozen),this.namespace[t]=n,this):CJ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hy("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=Jd(t),r=this.parser||this.Parser;return dy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),dy("process",this.parser||this.Parser),py("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=Jd(t),f=r.parse(c);r.run(f,c,function(h,m,b){if(h||!m||!b)return d(h);const y=m,S=r.stringify(y,b);AJ(S)?b.value=S:b.result=S,d(h,b)});function d(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),dy("processSync",this.parser||this.Parser),py("processSync",this.compiler||this.Compiler),this.process(t,s),pR("processSync","process",n),r;function s(a,l){n=!0,uR(a),r=l}}run(t,n,r){dR(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 f=Jd(n);s.run(t,f,d);function d(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),pR("runSync","run",r),s;function a(l,c){uR(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=Jd(n),s=this.compiler||this.Compiler;return py("stringify",s),dR(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(hy("use",this.frozen),t!=null)if(typeof t=="function")f(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(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;f(h,m)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))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(d.plugins),d.settings&&(s.settings=ly(!0,s.settings,d.settings))}function c(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===d){b=m;break}if(b===-1)r.push([d,...h]);else if(h.length>0){let[y,...S]=h;const k=r[b][1];Iv(k)&&Iv(y)&&(y=ly(!0,k,y)),r[b]=[d,y,...S]}}}}const RJ=new Ix().freeze();function dy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function py(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hy(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 dR(e){if(!Iv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function pR(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jd(e){return _J(e)?e:new S2(e)}function _J(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AJ(e){return typeof e=="string"||NJ(e)}function NJ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const OJ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hR=[],mR={allowDangerousHtml:!0},IJ=/^(https?|ircs?|mailto|xmpp)$/i,MJ=[{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 DJ(e){const t=LJ(e),n=jJ(e);return zJ(t.runSync(t.parse(n),n),e)}function LJ(e){const t=e.rehypePlugins||hR,n=e.remarkPlugins||hR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mR}:mR;return RJ().use(mQ).use(n).use(uJ,r).use(t)}function jJ(e){const t=e.children||"",n=new S2;return typeof t=="string"&&(n.value=t),n}function zJ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||PJ;for(const h of MJ)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+OJ+h.id,void 0);return nm(e,d),QY(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(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 iy)if(Object.hasOwn(iy,y)&&Object.hasOwn(h.properties,y)){const S=h.properties[y],k=iy[y];(k===null||k.includes(h.tagName))&&(h.properties[y]=f(String(S||""),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 PJ(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||IJ.test(e.slice(0,t))?e:""}const gR=(function(e,t,n){const r=sf(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]}),va=(function(e){if(e==null)return BJ;if(typeof e=="string")return FJ(e);if(typeof e=="object")return $J(e);if(typeof e=="function")return Mx(e);throw new Error("Expected function, string, or array as `test`")});function $J(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=va(e[n]);return Mx(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function FJ(e){return Mx(t);function t(n){return n.tagName===e}}function Mx(e){return t;function t(n,r,s){return!!(UJ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function BJ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function UJ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const bR=/\n/g,yR=/[\t ]+/g,Dv=va("br"),vR=va(XJ),HJ=va("p"),xR=va("tr"),qJ=va(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",YJ,ZJ]),w2=va(["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 VJ(e,t){const n=t||{},r="children"in e?e.children:[],s=w2(e),a=C2(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...T2(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...E2(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?Dv(r[c+1]):s}));const f=[];let d;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?d!==void 0&&h>d&&(d=h):h&&(d!==void 0&&d>-1&&f.push(`
|
|
40
|
+
`.repeat(d)||" "),d=-1,f.push(h))}return f.join("")}function E2(e,t,n){return e.type==="element"?GJ(e,t,n):e.type==="text"?n.whitespace==="normal"?T2(e,n):WJ(e):[]}function GJ(e,t,n){const r=C2(e,n),s=e.children||[];let a=-1,l=[];if(qJ(e))return l;let c,f;for(Dv(e)||xR(e)&&gR(t,e,xR)?f=`
|
|
41
|
+
`:HJ(e)?(c=2,f=2):w2(e)&&(c=1,f=1);++a<s.length;)l=l.concat(E2(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?Dv(s[a+1]):f}));return vR(e)&&gR(t,e,vR)&&l.push(" "),c&&l.unshift(c),f&&l.push(f),l}function T2(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){bR.lastIndex=a;const f=bR.exec(n),d=f&&"index"in f?f.index:n.length;r.push(KJ(n.slice(a,d).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,d===n.length?t.breakAfter:!0)),a=d+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 WJ(e){return[String(e.value)]}function KJ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){yR.lastIndex=s;const l=yR.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 C2(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 YJ(e){return!!(e.properties||{}).hidden}function XJ(e){return e.tagName==="td"||e.tagName==="th"}function ZJ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function QJ(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"},d={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(d,{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*\\(",S=["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"],k=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["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"],C=["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:k,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},D={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={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:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,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(N,P,D,A,[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 JJ(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=QJ(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 eee(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 f={match:/\\"/},d={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}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},k=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],T=["true","false"],C={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["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"],D=["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:k,literal:T,built_in:[...E,...R,"set","shopt",..._,...D]},contains:[y,e.SHEBANG(),S,m,a,l,C,c,f,d,h,n]}}function tee(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/}]},d={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(d,{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*\\(",T={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"},C=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],E={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:T,contains:C.concat([{begin:/\(/,end:/\)/,keywords:T,contains:C.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:T,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:T,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:T,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:T,disableAutodetect:!0,illegal:"</",contains:[].concat(E,R,C,[m,{begin:e.IDENT_RE+"::",keywords:T},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:d,keywords:T}}}function nee(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"},d={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(d,{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*\\(",S=["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"],k=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],T=["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"],C=["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:k,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:T},D={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={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:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,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(N,P,D,A,[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 ree(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)*"}),f={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},d={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/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},k={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},T=e.inherit(k,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[k,S,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],y.contains=[T,S,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const C={variants:[d,k,S,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},R=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"}},C,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,E,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,E,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:"("+R+"\\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,E],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[C,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const iee=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_-]*/}}),see=["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"],oee=["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"],aee=[...see,...oee],lee=["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(),uee=["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(),cee=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),fee=["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 dee(e){const t=e.regex,n=iee(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:":("+uee.join("|")+")"},{begin:":(:)?("+cee.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+fee.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:lee.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+aee.join("|")+")\\b"}]}}function pee(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 hee(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 mee(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 gee(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},f=/[A-Za-z0-9_-]+/,d=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(f,d,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 ul="[0-9](_*[0-9])*",ep=`\\.(${ul})`,tp="[0-9a-fA-F](_*[0-9a-fA-F])*",kR={className:"number",variants:[{begin:`(\\b(${ul})((${ep})|\\.)?|(${ep}))[eE][+-]?(${ul})[fFdD]?\\b`},{begin:`\\b(${ul})((${ep})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ep})[fFdD]?\\b`},{begin:`\\b(${ul})[fFdD]\\b`},{begin:`\\b0[xX]((${tp})\\.?|(${tp})?\\.(${tp}))[pP][+-]?(${ul})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${tp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function R2(e,t,n){return n===-1?"":e.replace(t,r=>R2(e,t,n-1))}function bee(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+R2("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={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"]},d={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,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:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,kR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},kR,d]}}const SR="[A-Za-z$_][0-9A-Za-z$_]*",yee=["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"],vee=["true","false","null","undefined","NaN","Infinity"],_2=["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"],A2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],N2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],xee=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],kee=[].concat(N2,_2,A2);function See(e){const t=e.regex,n=(U,{after:Y})=>{const O="</"+U[0].slice(1);return U.input.indexOf(O,Y)!==-1},r=SR,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(U,Y)=>{const O=U[0].length+U.index,F=U.input[O];if(F==="<"||F===","){Y.ignoreMatch();return}F===">"&&(n(U,{after:O})||Y.ignoreMatch());let G;const L=U.input.substring(O);if(G=L.match(/^\s*=/)){Y.ignoreMatch();return}if((G=L.match(/^\s+extends\s+/))&&G.index===0){Y.ignoreMatch();return}}},c={$pattern:SR,keyword:yee,literal:vee,built_in:kee,"variable.language":xee},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},E={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]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,S,k,T,{match:/\$\d+/},m];b.contains=R.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(R)});const _=[].concat(E,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},N={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"}}]},P={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:{_:[..._2,...A2]}},$={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:[A],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(U){return t.concat("(?!",U.join("|"),")")}const z={match:t.concat(/\b/,B([...N2,"super","import"].map(U=>`${U}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,S,k,T,E,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:q,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:D}]}]},{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:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},z,V,N,H,{match:/\$[(.]/}]}}function wee(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 cl="[0-9](_*[0-9])*",np=`\\.(${cl})`,rp="[0-9a-fA-F](_*[0-9a-fA-F])*",Eee={className:"number",variants:[{begin:`(\\b(${cl})((${np})|\\.)?|(${np}))[eE][+-]?(${cl})[fFdD]?\\b`},{begin:`\\b(${cl})((${np})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${np})[fFdD]?\\b`},{begin:`\\b(${cl})[fFdD]\\b`},{begin:`\\b0[xX]((${rp})\\.?|(${rp})?\\.(${rp}))[pP][+-]?(${cl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${rp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Tee(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+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},d=Eee,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,f,{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,f,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,f]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
42
|
+
`},d]}}const Cee=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_-]*/}}),Ree=["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"],_ee=["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"],Aee=[...Ree,..._ee],Nee=["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(),O2=["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(),I2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Oee=["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(),Iee=O2.concat(I2).sort().reverse();function Mee(e){const t=Cee(e),n=Iee,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],f=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},d=function(R,_,D){return{className:R,begin:_,relevance:D}},h={$pattern:/[a-z-]+/,keyword:r,attribute:Nee.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,d("variable","@@?"+s,10),d("variable","@\\{"+s+"\\}"),d("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)},S={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Oee.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},k={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}},T={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},C={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,d("keyword","all\\b"),d("variable","@\\{"+s+"\\}"),{begin:"\\b("+Aee.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,d("selector-tag",a,0),d("selector-id","#"+a),d("selector-class","\\."+a,0),d("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+O2.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+I2.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},E={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[C]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,k,T,E,S,C,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function Dee(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 Lee(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 jee(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+.-]*/,f={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}]},d={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(d,{contains:[]}),b=e.inherit(h,{contains:[]});d.contains.push(b),h.contains.push(m);let y=[n,f];return[d,h,m,b].forEach(C=>{C.contains=C.contains.concat(y)}),y=y.concat(d,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,d,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,f,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function zee(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"]},f={$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:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function Pee(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*\(.*?\))?/},f={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]},d={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,f],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(k,T,C="\\1")=>{const E=C==="\\1"?C:t.concat(C,T);return t.concat(t.concat("(?:",k,")"),T,/(?:\\.|[^\\\/])*?/,E,/(?:\\.|[^\\\/])*?/,C,r)},y=(k,T,C)=>t.concat(t.concat("(?:",k,")"),T,/(?:\\.|[^\\\/])*?/,C,r),S=[f,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}]},d,{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,d]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=S,l.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:S}}function $ee(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:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},d=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(j,H)=>{H.data._beginMatch=j[1]||j[2]},"on:end":(j,H)=>{H.data._beginMatch!==j[1]&&H.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
|
|
43
|
+
]`,S={scope:"string",variants:[h,d,m,b]},k={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},T=["false","null","true"],C=["__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"],E=["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:C,literal:(j=>{const H=[];return j.forEach(q=>{H.push(q),q.toLowerCase()===q?H.push(q.toUpperCase()):H.push(q.toLowerCase())}),H})(T),built_in:E},D=j=>j.map(H=>H.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",D(E).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},N=t.concat(r,"\\b(?!\\()"),P={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),N],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),N],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"}}]},$={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},I={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[$,l,P,e.C_BLOCK_COMMENT_MODE,S,k,A]},V={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(C).join("\\b|"),"|",D(E).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[I]};I.contains.push(V);const B=[$,P,e.C_BLOCK_COMMENT_MODE,S,k,A],z={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:T,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:T,keyword:["new","array"]},contains:["self",...B]},...B,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:_,contains:[z,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,V,P,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{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",z,l,P,e.C_BLOCK_COMMENT_MODE,S,k]}]},{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]},S,k]}}function Fee(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 Bee(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Uee(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"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},d={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,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,h,d]},{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,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,d]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,S=`\\b|${r.join("|")}`,k={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${S})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${b})[jJ](?=${S})`}]},T={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",f,k,m,e.HASH_COMMENT_MODE]}]};return d.contains=[m,k,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[f,k,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,T,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{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:[k,C,m]}]}}function Hee(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function qee(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 Vee(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]+"},f={begin:"#<",end:">"},d=[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])*",S={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"}]},k={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},A=[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:[k]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},S,{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(f,d),relevance:0}].concat(f,d);h.contains=A,k.contains=A;const I=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:A}}];return d.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(I).concat(d).concat(A)}}function Gee(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"],f=["true","false","Some","None","Ok","Err"],d=["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:f,built_in:d},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:d,type:h}},{className:"punctuation",begin:"->"},a]}}const Wee=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_-]*/}}),Kee=["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"],Yee=["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"],Xee=[...Kee,...Yee],Zee=["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(),Qee=["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(),Jee=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ete=["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 tte(e){const t=Wee(e),n=Jee,r=Qee,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("+Xee.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("+ete.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:Zee.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 nte(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function rte(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"],f=["add","asc","collation","desc","final","first","last","view"],d=["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,S=[...d,...f].filter(D=>!h.includes(D)),k={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},T={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},C={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function E(D){return t.concat(/\b/,t.either(...D.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:E(b),relevance:0};function _(D,{exceptions:A,when:N}={}){const P=N;return A=A||[],D.map($=>$.match(/\|\d+$/)||A.includes($)?$:P($)?`${$}|0`:$)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(S,{when:D=>D.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:E(l)},R,C,k,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,T]}}function M2(e){return e?typeof e=="string"?e:e.source:null}function Zu(e){return un("(?=",e,")")}function un(...e){return e.map(n=>M2(n)).join("")}function ite(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Sr(...e){return"("+(ite(e).capture?"":"?:")+e.map(r=>M2(r)).join("|")+")"}const Dx=e=>un(/\b/,e,/\w$/.test(e)?/\b/:/\B/),ste=["Protocol","Type"].map(Dx),wR=["init","self"].map(Dx),ote=["Any","Self"],my=["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"],ER=["false","nil","true"],ate=["assignment","associativity","higherThan","left","lowerThan","none","right"],lte=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],TR=["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"],D2=Sr(/[/=\-+!*%<>&|^~?]/,/[\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]/),L2=Sr(D2,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),gy=un(D2,L2,"*"),j2=Sr(/[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]/),th=Sr(j2,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Bi=un(j2,th,"*"),ip=un(/[A-Z]/,th,"*"),ute=["attached","autoclosure",un(/convention\(/,Sr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",un(/objc\(/,Bi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],cte=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function fte(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,Sr(...ste,...wR)],className:{2:"keyword"}},a={match:un(/\./,Sr(...my)),relevance:0},l=my.filter(Te=>typeof Te=="string").concat(["_|0"]),c=my.filter(Te=>typeof Te!="string").concat(ote).map(Dx),f={variants:[{className:"keyword",match:Sr(...c,...wR)}]},d={$pattern:Sr(/\b\w+/,/#\w+/),keyword:l.concat(lte),literal:ER},h=[s,a,f],m={match:un(/\./,Sr(...TR)),relevance:0},b={className:"built_in",match:un(/\b/,Sr(...TR),/(?=\()/)},y=[m,b],S={match:/->/,relevance:0},k={className:"operator",relevance:0,variants:[{match:gy},{match:`\\.(\\.|${L2})+`}]},T=[S,k],C="([0-9]_*)+",E="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${C})(\\.(${C}))?([eE][+-]?(${C}))?\\b`},{match:`\\b0x(${E})(\\.(${E}))?([pP][+-]?(${C}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(Te="")=>({className:"subst",variants:[{match:un(/\\/,Te,/[0\\tnr"']/)},{match:un(/\\/,Te,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(Te="")=>({className:"subst",match:un(/\\/,Te,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(Te="")=>({className:"subst",label:"interpol",begin:un(/\\/,Te,/\(/),end:/\)/}),N=(Te="")=>({begin:un(Te,/"""/),end:un(/"""/,Te),contains:[_(Te),D(Te),A(Te)]}),P=(Te="")=>({begin:un(Te,/"/),end:un(/"/,Te),contains:[_(Te),A(Te)]}),$={className:"string",variants:[N(),N("#"),N("##"),N("###"),P(),P("#"),P("##"),P("###")]},I=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],V={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:I},B=Te=>{const ve=un(Te,/\//),Ie=un(/\//,Te);return{begin:ve,end:Ie,contains:[...I,{scope:"comment",begin:`#(?!.*${Ie})`,end:/$/}]}},z={scope:"regexp",variants:[B("###"),B("##"),B("#"),V]},j={match:un(/`/,Bi,/`/)},H={className:"variable",match:/\$\d+/},q={className:"variable",match:`\\$${th}+`},K=[j,H,q],U={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:cte,contains:[...T,R,$]}]}},Y={scope:"keyword",match:un(/@/,Sr(...ute),Zu(Sr(/\(/,/\s+/)))},O={scope:"meta",match:un(/@/,Bi)},F=[U,Y,O],G={match:Zu(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:un(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,th,"+")},{className:"type",match:ip,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:un(/\s+&\s+/,Zu(ip)),relevance:0}]},L={begin:/</,end:/>/,keywords:d,contains:[...r,...h,...F,S,G]};G.contains.push(L);const X={match:un(Bi,/\s*:/),keywords:"_|0",relevance:0},te={begin:/\(/,end:/\)/,relevance:0,keywords:d,contains:["self",X,...r,z,...h,...y,...T,R,$,...K,...F,G]},J={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,G]},le={begin:Sr(Zu(un(Bi,/\s*:/)),Zu(un(Bi,/\s+/,Bi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Bi}]},oe={begin:/\(/,end:/\)/,keywords:d,contains:[le,...r,...h,...T,R,$,...F,G,te],endsParent:!0,illegal:/["']/},ue={match:[/(func|macro)/,/\s+/,Sr(j.match,Bi,gy)],className:{1:"keyword",3:"title.function"},contains:[J,oe,t],illegal:[/\[/,/%/]},xe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[J,oe,t],illegal:/\[|%/},ye={match:[/operator/,/\s+/,gy],className:{1:"keyword",3:"title"}},pe={begin:[/precedencegroup/,/\s+/,ip],className:{1:"keyword",3:"title"},contains:[G],keywords:[...ate,...ER],end:/}/},me={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},ke={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Se={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Bi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:d,contains:[J,...h,{begin:/:/,end:/\{/,keywords:d,contains:[{scope:"title.class.inherited",match:ip},...h],relevance:0}]};for(const Te of $.variants){const ve=Te.contains.find(_e=>_e.label==="interpol");ve.keywords=d;const Ie=[...h,...y,...T,R,$,...K];ve.contains=[...Ie,{begin:/\(/,end:/\)/,contains:["self",...Ie]}]}return{name:"Swift",keywords:d,contains:[...r,ue,xe,me,ke,Se,ye,pe,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},z,...h,...y,...T,R,$,...K,...F,G,te]}}const nh="[A-Za-z$_][0-9A-Za-z$_]*",z2=["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"],P2=["true","false","null","undefined","NaN","Infinity"],$2=["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"],F2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],B2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],U2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],H2=[].concat(B2,$2,F2);function dte(e){const t=e.regex,n=(U,{after:Y})=>{const O="</"+U[0].slice(1);return U.input.indexOf(O,Y)!==-1},r=nh,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(U,Y)=>{const O=U[0].length+U.index,F=U.input[O];if(F==="<"||F===","){Y.ignoreMatch();return}F===">"&&(n(U,{after:O})||Y.ignoreMatch());let G;const L=U.input.substring(O);if(G=L.match(/^\s*=/)){Y.ignoreMatch();return}if((G=L.match(/^\s+extends\s+/))&&G.index===0){Y.ignoreMatch();return}}},c={$pattern:nh,keyword:z2,literal:P2,built_in:H2,"variable.language":U2},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},T={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},E={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]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,S,k,T,{match:/\$\d+/},m];b.contains=R.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(R)});const _=[].concat(E,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},N={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"}}]},P={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:{_:[...$2,...F2]}},$={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:[A],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function B(U){return t.concat("(?!",U.join("|"),")")}const z={match:t.concat(/\b/,B([...B2,"super","import"].map(U=>`${U}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},H={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",K={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,S,k,T,E,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},K,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[E,e.REGEXP_MODE,{className:"function",begin:q,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:D}]}]},{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:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},z,V,N,H,{match:/\$[(.]/}]}}function pte(e){const t=e.regex,n=dte(e),r=nh,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['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:nh,keyword:z2.concat(f),literal:P2,built_in:H2.concat(s),"variable.language":U2},h={className:"meta",begin:"@"+r},m=(k,T,C)=>{const E=k.contains.findIndex(R=>R.label===T);if(E===-1)throw new Error("can not find mode to replace");k.contains.splice(E,1,C)};Object.assign(n.keywords,d),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(k=>k.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 S=n.contains.find(k=>k.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function hte(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}/,f={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),/ *#/)}]},d={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,f,d,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 mte(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/},f={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={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,f,d,c]}}function gte(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"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={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,f,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,f,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],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:d}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function bte(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},S={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},k={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},T=[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},S,k,a,l],C=[...T];return C.pop(),C.push(c),y.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:T}}const yte={arduino:JJ,bash:eee,c:tee,cpp:nee,csharp:ree,css:dee,diff:pee,go:hee,graphql:mee,ini:gee,java:bee,javascript:See,json:wee,kotlin:Tee,less:Mee,lua:Dee,makefile:Lee,markdown:jee,objectivec:zee,perl:Pee,php:$ee,"php-template":Fee,plaintext:Bee,python:Uee,"python-repl":Hee,r:qee,ruby:Vee,rust:Gee,scss:tte,shell:nte,sql:rte,swift:fte,typescript:pte,vbnet:hte,wasm:mte,xml:gte,yaml:bte};var by,CR;function vte(){if(CR)return by;CR=1;function e(Z){return Z instanceof Map?Z.clear=Z.delete=Z.set=function(){throw new Error("map is read-only")}:Z instanceof Set&&(Z.add=Z.clear=Z.delete=function(){throw new Error("set is read-only")}),Object.freeze(Z),Object.getOwnPropertyNames(Z).forEach(de=>{const Oe=Z[de],Xe=typeof Oe;(Xe==="object"||Xe==="function")&&!Object.isFrozen(Oe)&&e(Oe)}),Z}class t{constructor(de){de.data===void 0&&(de.data={}),this.data=de.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Z){return Z.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(Z,...de){const Oe=Object.create(null);for(const Xe in Z)Oe[Xe]=Z[Xe];return de.forEach(function(Xe){for(const Ct in Xe)Oe[Ct]=Xe[Ct]}),Oe}const s="</span>",a=Z=>!!Z.scope,l=(Z,{prefix:de})=>{if(Z.startsWith("language:"))return Z.replace("language:","language-");if(Z.includes(".")){const Oe=Z.split(".");return[`${de}${Oe.shift()}`,...Oe.map((Xe,Ct)=>`${Xe}${"_".repeat(Ct+1)}`)].join(" ")}return`${de}${Z}`};class c{constructor(de,Oe){this.buffer="",this.classPrefix=Oe.classPrefix,de.walk(this)}addText(de){this.buffer+=n(de)}openNode(de){if(!a(de))return;const Oe=l(de.scope,{prefix:this.classPrefix});this.span(Oe)}closeNode(de){a(de)&&(this.buffer+=s)}value(){return this.buffer}span(de){this.buffer+=`<span class="${de}">`}}const f=(Z={})=>{const de={children:[]};return Object.assign(de,Z),de};class d{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(de){this.top.children.push(de)}openNode(de){const Oe=f({scope:de});this.add(Oe),this.stack.push(Oe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(de){return this.constructor._walk(de,this.rootNode)}static _walk(de,Oe){return typeof Oe=="string"?de.addText(Oe):Oe.children&&(de.openNode(Oe),Oe.children.forEach(Xe=>this._walk(de,Xe)),de.closeNode(Oe)),de}static _collapse(de){typeof de!="string"&&de.children&&(de.children.every(Oe=>typeof Oe=="string")?de.children=[de.children.join("")]:de.children.forEach(Oe=>{d._collapse(Oe)}))}}class h extends d{constructor(de){super(),this.options=de}addText(de){de!==""&&this.add(de)}startScope(de){this.openNode(de)}endScope(){this.closeNode()}__addSublanguage(de,Oe){const Xe=de.root;Oe&&(Xe.scope=`language:${Oe}`),this.add(Xe)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Z){return Z?typeof Z=="string"?Z:Z.source:null}function b(Z){return k("(?=",Z,")")}function y(Z){return k("(?:",Z,")*")}function S(Z){return k("(?:",Z,")?")}function k(...Z){return Z.map(Oe=>m(Oe)).join("")}function T(Z){const de=Z[Z.length-1];return typeof de=="object"&&de.constructor===Object?(Z.splice(Z.length-1,1),de):{}}function C(...Z){return"("+(T(Z).capture?"":"?:")+Z.map(Xe=>m(Xe)).join("|")+")"}function E(Z){return new RegExp(Z.toString()+"|").exec("").length-1}function R(Z,de){const Oe=Z&&Z.exec(de);return Oe&&Oe.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(Z,{joinWith:de}){let Oe=0;return Z.map(Xe=>{Oe+=1;const Ct=Oe;let kt=m(Xe),He="";for(;kt.length>0;){const Fe=_.exec(kt);if(!Fe){He+=kt;break}He+=kt.substring(0,Fe.index),kt=kt.substring(Fe.index+Fe[0].length),Fe[0][0]==="\\"&&Fe[1]?He+="\\"+String(Number(Fe[1])+Ct):(He+=Fe[0],Fe[0]==="("&&Oe++)}return He}).map(Xe=>`(${Xe})`).join(de)}const A=/\b\B/,N="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",I="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V="\\b(0b[01]+)",B="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",z=(Z={})=>{const de=/^#![ ]*\//;return Z.binary&&(Z.begin=k(de,/.*\b/,Z.binary,/\b.*/)),r({scope:"meta",begin:de,end:/$/,relevance:0,"on:begin":(Oe,Xe)=>{Oe.index!==0&&Xe.ignoreMatch()}},Z)},j={begin:"\\\\[\\s\\S]",relevance:0},H={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[j]},q={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[j]},K={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/},U=function(Z,de,Oe={}){const Xe=r({scope:"comment",begin:Z,end:de,contains:[]},Oe);Xe.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 Ct=C("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 Xe.contains.push({begin:k(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Xe},Y=U("//","$"),O=U("/\\*","\\*/"),F=U("#","$"),G={scope:"number",begin:$,relevance:0},L={scope:"number",begin:I,relevance:0},X={scope:"number",begin:V,relevance:0},te={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},J={scope:"title",begin:N,relevance:0},le={scope:"title",begin:P,relevance:0},oe={begin:"\\.\\s*"+P,relevance:0};var xe=Object.freeze({__proto__:null,APOS_STRING_MODE:H,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:X,BINARY_NUMBER_RE:V,COMMENT:U,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:Y,C_NUMBER_MODE:L,C_NUMBER_RE:I,END_SAME_AS_BEGIN:function(Z){return Object.assign(Z,{"on:begin":(de,Oe)=>{Oe.data._beginMatch=de[1]},"on:end":(de,Oe)=>{Oe.data._beginMatch!==de[1]&&Oe.ignoreMatch()}})},HASH_COMMENT_MODE:F,IDENT_RE:N,MATCH_NOTHING_RE:A,METHOD_GUARD:oe,NUMBER_MODE:G,NUMBER_RE:$,PHRASAL_WORDS_MODE:K,QUOTE_STRING_MODE:q,REGEXP_MODE:te,RE_STARTERS_RE:B,SHEBANG:z,TITLE_MODE:J,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:le});function ye(Z,de){Z.input[Z.index-1]==="."&&de.ignoreMatch()}function pe(Z,de){Z.className!==void 0&&(Z.scope=Z.className,delete Z.className)}function me(Z,de){de&&Z.beginKeywords&&(Z.begin="\\b("+Z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Z.__beforeBegin=ye,Z.keywords=Z.keywords||Z.beginKeywords,delete Z.beginKeywords,Z.relevance===void 0&&(Z.relevance=0))}function ke(Z,de){Array.isArray(Z.illegal)&&(Z.illegal=C(...Z.illegal))}function Se(Z,de){if(Z.match){if(Z.begin||Z.end)throw new Error("begin & end are not supported with match");Z.begin=Z.match,delete Z.match}}function Te(Z,de){Z.relevance===void 0&&(Z.relevance=1)}const ve=(Z,de)=>{if(!Z.beforeMatch)return;if(Z.starts)throw new Error("beforeMatch cannot be used with starts");const Oe=Object.assign({},Z);Object.keys(Z).forEach(Xe=>{delete Z[Xe]}),Z.keywords=Oe.keywords,Z.begin=k(Oe.beforeMatch,b(Oe.begin)),Z.starts={relevance:0,contains:[Object.assign(Oe,{endsParent:!0})]},Z.relevance=0,delete Oe.beforeMatch},Ie=["of","and","for","in","not","or","if","then","parent","list","value"],_e="keyword";function je(Z,de,Oe=_e){const Xe=Object.create(null);return typeof Z=="string"?Ct(Oe,Z.split(" ")):Array.isArray(Z)?Ct(Oe,Z):Object.keys(Z).forEach(function(kt){Object.assign(Xe,je(Z[kt],de,kt))}),Xe;function Ct(kt,He){de&&(He=He.map(Fe=>Fe.toLowerCase())),He.forEach(function(Fe){const Le=Fe.split("|");Xe[Le[0]]=[kt,We(Le[0],Le[1])]})}}function We(Z,de){return de?Number(de):Ce(Z)?0:1}function Ce(Z){return Ie.includes(Z.toLowerCase())}const $e={},se=Z=>{console.error(Z)},Ee=(Z,...de)=>{console.log(`WARN: ${Z}`,...de)},Q=(Z,de)=>{$e[`${Z}/${de}`]||(console.log(`Deprecated as of ${Z}. ${de}`),$e[`${Z}/${de}`]=!0)},ee=new Error;function be(Z,de,{key:Oe}){let Xe=0;const Ct=Z[Oe],kt={},He={};for(let Fe=1;Fe<=de.length;Fe++)He[Fe+Xe]=Ct[Fe],kt[Fe+Xe]=!0,Xe+=E(de[Fe-1]);Z[Oe]=He,Z[Oe]._emit=kt,Z[Oe]._multi=!0}function Ne(Z){if(Array.isArray(Z.begin)){if(Z.skip||Z.excludeBegin||Z.returnBegin)throw se("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ee;if(typeof Z.beginScope!="object"||Z.beginScope===null)throw se("beginScope must be object"),ee;be(Z,Z.begin,{key:"beginScope"}),Z.begin=D(Z.begin,{joinWith:""})}}function Ye(Z){if(Array.isArray(Z.end)){if(Z.skip||Z.excludeEnd||Z.returnEnd)throw se("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ee;if(typeof Z.endScope!="object"||Z.endScope===null)throw se("endScope must be object"),ee;be(Z,Z.end,{key:"endScope"}),Z.end=D(Z.end,{joinWith:""})}}function at(Z){Z.scope&&typeof Z.scope=="object"&&Z.scope!==null&&(Z.beginScope=Z.scope,delete Z.scope)}function ft(Z){at(Z),typeof Z.beginScope=="string"&&(Z.beginScope={_wrap:Z.beginScope}),typeof Z.endScope=="string"&&(Z.endScope={_wrap:Z.endScope}),Ne(Z),Ye(Z)}function nt(Z){function de(He,Fe){return new RegExp(m(He),"m"+(Z.case_insensitive?"i":"")+(Z.unicodeRegex?"u":"")+(Fe?"g":""))}class Oe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Fe,Le){Le.position=this.position++,this.matchIndexes[this.matchAt]=Le,this.regexes.push([Le,Fe]),this.matchAt+=E(Fe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Fe=this.regexes.map(Le=>Le[1]);this.matcherRe=de(D(Fe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Fe){this.matcherRe.lastIndex=this.lastIndex;const Le=this.matcherRe.exec(Fe);if(!Le)return null;const Me=Le.findIndex((_t,gn)=>gn>0&&_t!==void 0),st=this.matchIndexes[Me];return Le.splice(0,Me),Object.assign(Le,st)}}class Xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Fe){if(this.multiRegexes[Fe])return this.multiRegexes[Fe];const Le=new Oe;return this.rules.slice(Fe).forEach(([Me,st])=>Le.addRule(Me,st)),Le.compile(),this.multiRegexes[Fe]=Le,Le}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Fe,Le){this.rules.push([Fe,Le]),Le.type==="begin"&&this.count++}exec(Fe){const Le=this.getMatcher(this.regexIndex);Le.lastIndex=this.lastIndex;let Me=Le.exec(Fe);if(this.resumingScanAtSamePosition()&&!(Me&&Me.index===this.lastIndex)){const st=this.getMatcher(0);st.lastIndex=this.lastIndex+1,Me=st.exec(Fe)}return Me&&(this.regexIndex+=Me.position+1,this.regexIndex===this.count&&this.considerAll()),Me}}function Ct(He){const Fe=new Xe;return He.contains.forEach(Le=>Fe.addRule(Le.begin,{rule:Le,type:"begin"})),He.terminatorEnd&&Fe.addRule(He.terminatorEnd,{type:"end"}),He.illegal&&Fe.addRule(He.illegal,{type:"illegal"}),Fe}function kt(He,Fe){const Le=He;if(He.isCompiled)return Le;[pe,Se,ft,ve].forEach(st=>st(He,Fe)),Z.compilerExtensions.forEach(st=>st(He,Fe)),He.__beforeBegin=null,[me,ke,Te].forEach(st=>st(He,Fe)),He.isCompiled=!0;let Me=null;return typeof He.keywords=="object"&&He.keywords.$pattern&&(He.keywords=Object.assign({},He.keywords),Me=He.keywords.$pattern,delete He.keywords.$pattern),Me=Me||/\w+/,He.keywords&&(He.keywords=je(He.keywords,Z.case_insensitive)),Le.keywordPatternRe=de(Me,!0),Fe&&(He.begin||(He.begin=/\B|\b/),Le.beginRe=de(Le.begin),!He.end&&!He.endsWithParent&&(He.end=/\B|\b/),He.end&&(Le.endRe=de(Le.end)),Le.terminatorEnd=m(Le.end)||"",He.endsWithParent&&Fe.terminatorEnd&&(Le.terminatorEnd+=(He.end?"|":"")+Fe.terminatorEnd)),He.illegal&&(Le.illegalRe=de(He.illegal)),He.contains||(He.contains=[]),He.contains=[].concat(...He.contains.map(function(st){return St(st==="self"?He:st)})),He.contains.forEach(function(st){kt(st,Le)}),He.starts&&kt(He.starts,Fe),Le.matcher=Ct(Le),Le}if(Z.compilerExtensions||(Z.compilerExtensions=[]),Z.contains&&Z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Z.classNameAliases=r(Z.classNameAliases||{}),kt(Z)}function vt(Z){return Z?Z.endsWithParent||vt(Z.starts):!1}function St(Z){return Z.variants&&!Z.cachedVariants&&(Z.cachedVariants=Z.variants.map(function(de){return r(Z,{variants:null},de)})),Z.cachedVariants?Z.cachedVariants:vt(Z)?r(Z,{starts:Z.starts?r(Z.starts):null}):Object.isFrozen(Z)?r(Z):Z}var et="11.11.1";class Qe extends Error{constructor(de,Oe){super(de),this.name="HTMLInjectionError",this.html=Oe}}const Pe=n,pt=r,lt=Symbol("nomatch"),ut=7,Ge=function(Z){const de=Object.create(null),Oe=Object.create(null),Xe=[];let Ct=!0;const kt="Could not find the language '{}', did you forget to load/include a language module?",He={disableAutodetect:!0,name:"Plain text",contains:[]};let Fe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function Le(De){return Fe.noHighlightRe.test(De)}function Me(De){let ct=De.className+" ";ct+=De.parentNode?De.parentNode.className:"";const Mt=Fe.languageDetectRe.exec(ct);if(Mt){const Jt=$n(Mt[1]);return Jt||(Ee(kt.replace("{}",Mt[1])),Ee("Falling back to no-highlight mode for this block.",De)),Jt?Mt[1]:"no-highlight"}return ct.split(/\s+/).find(Jt=>Le(Jt)||$n(Jt))}function st(De,ct,Mt){let Jt="",Dn="";typeof ct=="object"?(Jt=De,Mt=ct.ignoreIllegals,Dn=ct.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0",`Please use highlight(code, options) instead.
|
|
44
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Dn=De,Jt=ct),Mt===void 0&&(Mt=!0);const lr={code:Jt,language:Dn};Oo("before:highlight",lr);const Br=lr.result?lr.result:_t(lr.language,lr.code,Mt);return Br.code=lr.code,Oo("after:highlight",Br),Br}function _t(De,ct,Mt,Jt){const Dn=Object.create(null);function lr(Ue,rt){return Ue.keywords[rt]}function Br(){if(!xt.keywords){Bn.addText(en);return}let Ue=0;xt.keywordPatternRe.lastIndex=0;let rt=xt.keywordPatternRe.exec(en),Tt="";for(;rt;){Tt+=en.substring(Ue,rt.index);const $t=er.case_insensitive?rt[0].toLowerCase():rt[0],Rn=lr(xt,$t);if(Rn){const[ni,Yl]=Rn;if(Bn.addText(Tt),Tt="",Dn[$t]=(Dn[$t]||0)+1,Dn[$t]<=ut&&($s+=Yl),ni.startsWith("_"))Tt+=rt[0];else{const pf=er.classNameAliases[ni]||ni;Ur(rt[0],pf)}}else Tt+=rt[0];Ue=xt.keywordPatternRe.lastIndex,rt=xt.keywordPatternRe.exec(en)}Tt+=en.substring(Ue),Bn.addText(Tt)}function Rr(){if(en==="")return;let Ue=null;if(typeof xt.subLanguage=="string"){if(!de[xt.subLanguage]){Bn.addText(en);return}Ue=_t(xt.subLanguage,en,!0,df[xt.subLanguage]),df[xt.subLanguage]=Ue._top}else Ue=bn(en,xt.subLanguage.length?xt.subLanguage:null);xt.relevance>0&&($s+=Ue.relevance),Bn.__addSublanguage(Ue._emitter,Ue.language)}function vn(){xt.subLanguage!=null?Rr():Br(),en=""}function Ur(Ue,rt){Ue!==""&&(Bn.startScope(rt),Bn.addText(Ue),Bn.endScope())}function cf(Ue,rt){let Tt=1;const $t=rt.length-1;for(;Tt<=$t;){if(!Ue._emit[Tt]){Tt++;continue}const Rn=er.classNameAliases[Ue[Tt]]||Ue[Tt],ni=rt[Tt];Rn?Ur(ni,Rn):(en=ni,Br(),en=""),Tt++}}function ka(Ue,rt){return Ue.scope&&typeof Ue.scope=="string"&&Bn.openNode(er.classNameAliases[Ue.scope]||Ue.scope),Ue.beginScope&&(Ue.beginScope._wrap?(Ur(en,er.classNameAliases[Ue.beginScope._wrap]||Ue.beginScope._wrap),en=""):Ue.beginScope._multi&&(cf(Ue.beginScope,rt),en="")),xt=Object.create(Ue,{parent:{value:xt}}),xt}function Gl(Ue,rt,Tt){let $t=R(Ue.endRe,Tt);if($t){if(Ue["on:end"]){const Rn=new t(Ue);Ue["on:end"](rt,Rn),Rn.isMatchIgnored&&($t=!1)}if($t){for(;Ue.endsParent&&Ue.parent;)Ue=Ue.parent;return Ue}}if(Ue.endsWithParent)return Gl(Ue.parent,rt,Tt)}function Sa(Ue){return xt.matcher.regexIndex===0?(en+=Ue[0],1):(Fs=!0,0)}function im(Ue){const rt=Ue[0],Tt=Ue.rule,$t=new t(Tt),Rn=[Tt.__beforeBegin,Tt["on:begin"]];for(const ni of Rn)if(ni&&(ni(Ue,$t),$t.isMatchIgnored))return Sa(rt);return Tt.skip?en+=rt:(Tt.excludeBegin&&(en+=rt),vn(),!Tt.returnBegin&&!Tt.excludeBegin&&(en=rt)),ka(Tt,Ue),Tt.returnBegin?0:rt.length}function _r(Ue){const rt=Ue[0],Tt=ct.substring(Ue.index),$t=Gl(xt,Ue,Tt);if(!$t)return lt;const Rn=xt;xt.endScope&&xt.endScope._wrap?(vn(),Ur(rt,xt.endScope._wrap)):xt.endScope&&xt.endScope._multi?(vn(),cf(xt.endScope,Ue)):Rn.skip?en+=rt:(Rn.returnEnd||Rn.excludeEnd||(en+=rt),vn(),Rn.excludeEnd&&(en=rt));do xt.scope&&Bn.closeNode(),!xt.skip&&!xt.subLanguage&&($s+=xt.relevance),xt=xt.parent;while(xt!==$t.parent);return $t.starts&&ka($t.starts,Ue),Rn.returnEnd?0:rt.length}function Wl(){const Ue=[];for(let rt=xt;rt!==er;rt=rt.parent)rt.scope&&Ue.unshift(rt.scope);Ue.forEach(rt=>Bn.openNode(rt))}let Io={};function wa(Ue,rt){const Tt=rt&&rt[0];if(en+=Ue,Tt==null)return vn(),0;if(Io.type==="begin"&&rt.type==="end"&&Io.index===rt.index&&Tt===""){if(en+=ct.slice(rt.index,rt.index+1),!Ct){const $t=new Error(`0 width match regex (${De})`);throw $t.languageName=De,$t.badRule=Io.rule,$t}return 1}if(Io=rt,rt.type==="begin")return im(rt);if(rt.type==="illegal"&&!Mt){const $t=new Error('Illegal lexeme "'+Tt+'" for mode "'+(xt.scope||"<unnamed>")+'"');throw $t.mode=xt,$t}else if(rt.type==="end"){const $t=_r(rt);if($t!==lt)return $t}if(rt.type==="illegal"&&Tt==="")return en+=`
|
|
45
|
+
`,1;if(Kl>1e5&&Kl>rt.index*3)throw new Error("potential infinite loop, way more iterations than matches");return en+=Tt,Tt.length}const er=$n(De);if(!er)throw se(kt.replace("{}",De)),new Error('Unknown language: "'+De+'"');const ff=nt(er);let Ea="",xt=Jt||ff;const df={},Bn=new Fe.__emitter(Fe);Wl();let en="",$s=0,Qi=0,Kl=0,Fs=!1;try{if(er.__emitTokens)er.__emitTokens(ct,Bn);else{for(xt.matcher.considerAll();;){Kl++,Fs?Fs=!1:xt.matcher.considerAll(),xt.matcher.lastIndex=Qi;const Ue=xt.matcher.exec(ct);if(!Ue)break;const rt=ct.substring(Qi,Ue.index),Tt=wa(rt,Ue);Qi=Ue.index+Tt}wa(ct.substring(Qi))}return Bn.finalize(),Ea=Bn.toHTML(),{language:De,value:Ea,relevance:$s,illegal:!1,_emitter:Bn,_top:xt}}catch(Ue){if(Ue.message&&Ue.message.includes("Illegal"))return{language:De,value:Pe(ct),illegal:!0,relevance:0,_illegalBy:{message:Ue.message,index:Qi,context:ct.slice(Qi-100,Qi+100),mode:Ue.mode,resultSoFar:Ea},_emitter:Bn};if(Ct)return{language:De,value:Pe(ct),illegal:!1,relevance:0,errorRaised:Ue,_emitter:Bn,_top:xt};throw Ue}}function gn(De){const ct={value:Pe(De),illegal:!1,relevance:0,_top:He,_emitter:new Fe.__emitter(Fe)};return ct._emitter.addText(De),ct}function bn(De,ct){ct=ct||Fe.languages||Object.keys(de);const Mt=gn(De),Jt=ct.filter($n).filter(zs).map(vn=>_t(vn,De,!1));Jt.unshift(Mt);const Dn=Jt.sort((vn,Ur)=>{if(vn.relevance!==Ur.relevance)return Ur.relevance-vn.relevance;if(vn.language&&Ur.language){if($n(vn.language).supersetOf===Ur.language)return 1;if($n(Ur.language).supersetOf===vn.language)return-1}return 0}),[lr,Br]=Dn,Rr=lr;return Rr.secondBest=Br,Rr}function tt(De,ct,Mt){const Jt=ct&&Oe[ct]||Mt;De.classList.add("hljs"),De.classList.add(`language-${Jt}`)}function Ut(De){let ct=null;const Mt=Me(De);if(Le(Mt))return;if(Oo("before:highlightElement",{el:De,language:Mt}),De.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",De);return}if(De.children.length>0&&(Fe.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(De)),Fe.throwUnescapedHTML))throw new Qe("One of your code blocks includes unescaped HTML.",De.innerHTML);ct=De;const Jt=ct.textContent,Dn=Mt?st(Jt,{language:Mt,ignoreIllegals:!0}):bn(Jt);De.innerHTML=Dn.value,De.dataset.highlighted="yes",tt(De,Mt,Dn.language),De.result={language:Dn.language,re:Dn.relevance,relevance:Dn.relevance},Dn.secondBest&&(De.secondBest={language:Dn.secondBest.language,relevance:Dn.secondBest.relevance}),Oo("after:highlightElement",{el:De,result:Dn,text:Jt})}function ot(De){Fe=pt(Fe,De)}const Sn=()=>{Xn(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Jn(){Xn(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let ar=!1;function Xn(){function De(){Xn()}if(document.readyState==="loading"){ar||window.addEventListener("DOMContentLoaded",De,!1),ar=!0;return}document.querySelectorAll(Fe.cssSelector).forEach(Ut)}function yn(De,ct){let Mt=null;try{Mt=ct(Z)}catch(Jt){if(se("Language definition for '{}' could not be registered.".replace("{}",De)),Ct)se(Jt);else throw Jt;Mt=He}Mt.name||(Mt.name=De),de[De]=Mt,Mt.rawDefinition=ct.bind(null,Z),Mt.aliases&&vr(Mt.aliases,{languageName:De})}function Fr(De){delete de[De];for(const ct of Object.keys(Oe))Oe[ct]===De&&delete Oe[ct]}function Li(){return Object.keys(de)}function $n(De){return De=(De||"").toLowerCase(),de[De]||de[Oe[De]]}function vr(De,{languageName:ct}){typeof De=="string"&&(De=[De]),De.forEach(Mt=>{Oe[Mt.toLowerCase()]=ct})}function zs(De){const ct=$n(De);return ct&&!ct.disableAutodetect}function Ps(De){De["before:highlightBlock"]&&!De["before:highlightElement"]&&(De["before:highlightElement"]=ct=>{De["before:highlightBlock"](Object.assign({block:ct.el},ct))}),De["after:highlightBlock"]&&!De["after:highlightElement"]&&(De["after:highlightElement"]=ct=>{De["after:highlightBlock"](Object.assign({block:ct.el},ct))})}function Fn(De){Ps(De),Xe.push(De)}function uf(De){const ct=Xe.indexOf(De);ct!==-1&&Xe.splice(ct,1)}function Oo(De,ct){const Mt=De;Xe.forEach(function(Jt){Jt[Mt]&&Jt[Mt](ct)})}function Zi(De){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),Ut(De)}Object.assign(Z,{highlight:st,highlightAuto:bn,highlightAll:Xn,highlightElement:Ut,highlightBlock:Zi,configure:ot,initHighlighting:Sn,initHighlightingOnLoad:Jn,registerLanguage:yn,unregisterLanguage:Fr,listLanguages:Li,getLanguage:$n,registerAliases:vr,autoDetection:zs,inherit:pt,addPlugin:Fn,removePlugin:uf}),Z.debugMode=function(){Ct=!1},Z.safeMode=function(){Ct=!0},Z.versionString=et,Z.regex={concat:k,lookahead:b,either:C,optional:S,anyNumberOfTimes:y};for(const De in xe)typeof xe[De]=="object"&&e(xe[De]);return Object.assign(Z,xe),Z},Ze=Ge({});return Ze.newInstance=()=>Ge({}),by=Ze,Ze.HighlightJS=Ze,Ze.default=Ze,by}var xte=vte();const kte=Pc(xte),RR={},Ste="hljs-";function wte(e){const t=kte.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(f,d,h){const m=h||RR,b=typeof m.prefix=="string"?m.prefix:Ste;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:Ete,classPrefix:b});const y=t.highlight(d,{ignoreIllegals:!0,language:f});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const S=y._emitter.root,k=S.data;return k.language=y.language,k.relevance=y.relevance,S}function r(f,d){const m=(d||RR).subset||s();let b=-1,y=0,S;for(;++b<m.length;){const k=m[b];if(!t.getLanguage(k))continue;const T=n(k,f,d);T.data&&T.data.relevance!==void 0&&T.data.relevance>y&&(y=T.data.relevance,S=T)}return S||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(f,d){if(typeof f=="string")t.registerLanguage(f,d);else{let h;for(h in f)Object.hasOwn(f,h)&&t.registerLanguage(h,f[h])}}function l(f,d){if(typeof f=="string")t.registerAliases(typeof d=="string"?d:[...d],{languageName:f});else{let h;for(h in f)if(Object.hasOwn(f,h)){const m=f[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(f){return!!t.getLanguage(f)}}class Ete{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 Tte={};function Cte(e){const t=e||Tte,n=t.aliases,r=t.detect||!1,s=t.languages||yte,a=t.plainText,l=t.prefix,c=t.subset;let f="hljs";const d=wte(s);if(n&&d.registerAlias(n),l){const h=l.indexOf("-");f=h===-1?l:l.slice(0,h)}return function(h,m){nm(h,"element",function(b,y,S){if(b.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const k=Rte(b);if(k===!1||!k&&!r||k&&a&&a.includes(k))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(f)||b.properties.className.unshift(f);const T=VJ(b,{whitespace:"pre"});let C;try{C=k?d.highlight(k,T,{prefix:l}):d.highlightAuto(T,{prefix:l,subset:c})}catch(E){const R=E;if(k&&/Unknown language/.test(R.message)){m.message("Cannot highlight as `"+k+"`, it’s not registered",{ancestors:[S,b],cause:R,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!k&&C.data&&C.data.language&&b.properties.className.push("language-"+C.data.language),C.children.length>0&&(b.children=C.children)})}}function Rte(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 _R(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 _te(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ate(e,t,n){const s=sf((n||{}).ignore||[]),a=Nte(t);let l=-1;for(;++l<a.length;)k2(e,"text",c);function c(d,h){let m=-1,b;for(;++m<h.length;){const y=h[m],S=b?b.children:void 0;if(s(y,S?S.indexOf(y):void 0,b))return;b=y}if(b)return f(d,h)}function f(d,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let S=0;const T=m.children.indexOf(d);let C=!1,E=[];b.lastIndex=0;let R=b.exec(d.value);for(;R;){const _=R.index,D={index:R.index,input:R.input,stack:[...h,d]};let A=y(...R,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(S!==_&&E.push({type:"text",value:d.value.slice(S,_)}),Array.isArray(A)?E.push(...A):A&&E.push(A),S=_+R[0].length,C=!0),!b.global)break;R=b.exec(d.value)}return C?(S<d.value.length&&E.push({type:"text",value:d.value.slice(S)}),m.children.splice(T,1,...E)):E=[d],T+E.length}}function Nte(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([Ote(s[0]),Ite(s[1])])}return t}function Ote(e){return typeof e=="string"?new RegExp(_te(e),"g"):e}function Ite(e){return typeof e=="function"?e:function(){return e}}const yy="phrasing",vy=["autolink","link","image","label"];function Mte(){return{transforms:[Fte],enter:{literalAutolink:Lte,literalAutolinkEmail:xy,literalAutolinkHttp:xy,literalAutolinkWww:xy},exit:{literalAutolink:$te,literalAutolinkEmail:Pte,literalAutolinkHttp:jte,literalAutolinkWww:zte}}}function Dte(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:yy,notInConstruct:vy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:yy,notInConstruct:vy},{character:":",before:"[ps]",after:"\\/",inConstruct:yy,notInConstruct:vy}]}}function Lte(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xy(e){this.config.enter.autolinkProtocol.call(this,e)}function jte(e){this.config.exit.autolinkProtocol.call(this,e)}function zte(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 Pte(e){this.config.exit.autolinkEmail.call(this,e)}function $te(e){this.exit(e)}function Fte(e){Ate(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Bte],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ute]],{ignore:["link","linkReference"]})}function Bte(e,t,n,r,s){let a="";if(!q2(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Hte(n)))return!1;const l=qte(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 Ute(e,t,n,r){return!q2(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Hte(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 qte(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=_R(e,"(");let a=_R(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 q2(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ca(n)||Qh(n))&&(!t||n!==47)}V2.peek=Jte;function Vte(){this.buffer()}function Gte(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wte(){this.buffer()}function Kte(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Yte(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Xte(e){this.exit(e)}function Zte(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_i(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Qte(e){this.exit(e)}function Jte(){return"["}function V2(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 ene(){return{enter:{gfmFootnoteCallString:Vte,gfmFootnoteCall:Gte,gfmFootnoteDefinitionLabelString:Wte,gfmFootnoteDefinition:Kte},exit:{gfmFootnoteCallString:Yte,gfmFootnoteCall:Xte,gfmFootnoteDefinitionLabelString:Zte,gfmFootnoteDefinition:Qte}}}function tne(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:V2},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let f=c.move("[^");const d=a.enter("footnoteDefinition"),h=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),h(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
46
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?G2:nne))),d(),f}}function nne(e,t,n){return t===0?e:G2(e,t,n)}function G2(e,t,n){return(n?"":" ")+e}const rne=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];W2.peek=lne;function ine(){return{canContainEols:["delete"],enter:{strikethrough:one},exit:{strikethrough:ane}}}function sne(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rne}],handlers:{delete:W2}}}function one(e){this.enter({type:"delete",children:[]},e)}function ane(e){this.exit(e)}function W2(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 lne(){return"~"}function une(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||fne,s=[],a=[],l=[],c=[];let f=0,d=-1;for(;++d<e.length;){const S=[],k=[];let T=-1;for(e[d].length>f&&(f=e[d].length);++T<e[d].length;){const C=cne(e[d][T]);if(t.alignDelimiters!==!1){const E=r(C);k[T]=E,(c[T]===void 0||E>c[T])&&(c[T]=E)}S.push(C)}a[d]=S,l[d]=k}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<f;)s[h]=AR(n[h]);else{const S=AR(n);for(;++h<f;)s[h]=S}h=-1;const m=[],b=[];for(;++h<f;){const S=s[h];let k="",T="";S===99?(k=":",T=":"):S===108?k=":":S===114&&(T=":");let C=t.alignDelimiters===!1?1:Math.max(1,c[h]-k.length-T.length);const E=k+"-".repeat(C)+T;t.alignDelimiters!==!1&&(C=k.length+C+T.length,C>c[h]&&(c[h]=C),b[h]=C),m[h]=E}a.splice(1,0,m),l.splice(1,0,b),d=-1;const y=[];for(;++d<a.length;){const S=a[d],k=l[d];h=-1;const T=[];for(;++h<f;){const C=S[h]||"";let E="",R="";if(t.alignDelimiters!==!1){const _=c[h]-(k[h]||0),D=s[h];D===114?E=" ".repeat(_):D===99?_%2?(E=" ".repeat(_/2+.5),R=" ".repeat(_/2-.5)):(E=" ".repeat(_/2),R=E):R=" ".repeat(_)}t.delimiterStart!==!1&&!h&&T.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&C==="")&&(t.delimiterStart!==!1||h)&&T.push(" "),t.alignDelimiters!==!1&&T.push(E),T.push(C),t.alignDelimiters!==!1&&T.push(R),t.padding!==!1&&T.push(" "),(t.delimiterEnd!==!1||h!==f-1)&&T.push("|")}y.push(t.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return y.join(`
|
|
47
|
+
`)}function cne(e){return e==null?"":String(e)}function fne(e){return e.length}function AR(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 dne(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()),pne);return s(),l}function pne(e,t,n){return">"+(n?"":" ")+e}function hne(e,t){return NR(e,t.inConstruct,!0)&&!NR(e,t.notInConstruct,!1)}function NR(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 OR(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
48
|
+
`&&hne(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
49
|
+
`}function mne(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 gne(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 bne(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 yne(e,t,n,r){const s=bne(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(gne(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,vne);return m(),b}const c=n.createTracker(r),f=s.repeat(Math.max(mne(a,s)+1,3)),d=n.enter("codeFenced");let h=c.move(f);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:`
|
|
50
|
+
`,encode:["`"],...c.current()})),m()}return h+=c.move(`
|
|
51
|
+
`),a&&(h+=c.move(a+`
|
|
52
|
+
`)),h+=c.move(f),d(),h}function vne(e,t,n){return(n?"":" ")+e}function Lx(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 xne(e,t,n,r){const s=Lx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
|
|
53
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),l(),d}function kne(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 jc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function rh(e,t,n){const r=Dl(e),s=Dl(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}}K2.peek=Sne;function K2(e,t,n,r){const s=kne(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=rh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=jc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=rh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+jc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function Sne(e,t,n){return n.options.emphasis||"*"}function wne(e,t){let n=!1;return nm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Nv}),!!((!e.depth||e.depth<3)&&Tx(e)&&(t.options.setext||n))}function Ene(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(wne(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
|
|
54
|
+
`,after:`
|
|
55
|
+
`});return m(),h(),b+`
|
|
56
|
+
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
57
|
+
`))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");a.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
|
|
58
|
+
`,...a.current()});return/^[\t ]/.test(d)&&(d=jc(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}Y2.peek=Tne;function Y2(e){return e.value||""}function Tne(){return"<"}X2.peek=Cne;function X2(e,t,n,r){const s=Lx(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),d+=f.move(")"),l(),d}function Cne(){return"!"}Z2.peek=Rne;function Z2(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Rne(){return"!"}Q2.peek=_ne;function Q2(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 f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return s+r+s}function _ne(){return"`"}function J2(e,t){const n=Tx(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))}eD.peek=Ane;function eD(e,t,n,r){const s=Lx(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(J2(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"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),f()),d+=l.move(")"),c(),d}function Ane(e,t,n){return J2(e,n)?"<":"["}tD.peek=Nne;function tD(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Nne(){return"["}function jx(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 One(e){const t=jx(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 Ine(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 nD(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 Mne(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?Ine(n):jx(n);const c=e.ordered?l==="."?")":".":One(n);let f=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&&(f=!0),nD(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"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),d}function Dne(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 Lne(e,t,n,r){const s=Dne(n);let a=n.bulletCurrent||jx(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 f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),h);return f(),d;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function jne(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const zne=sf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Pne(e,t,n,r){return(e.children.some(function(l){return zne(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $ne(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}rD.peek=Fne;function rD(e,t,n,r){const s=$ne(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=rh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=jc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=rh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+jc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function Fne(e,t,n){return n.options.strong||"*"}function Bne(e,t,n,r){return n.safe(e.value,r)}function Une(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 Hne(e,t,n){const r=(nD(n)+(n.options.ruleSpaces?" ":"")).repeat(Une(n));return n.options.ruleSpaces?r.slice(0,-1):r}const iD={blockquote:dne,break:OR,code:yne,definition:xne,emphasis:K2,hardBreak:OR,heading:Ene,html:Y2,image:X2,imageReference:Z2,inlineCode:Q2,link:eD,linkReference:tD,list:Mne,listItem:Lne,paragraph:jne,root:Pne,strong:rD,text:Bne,thematicBreak:Hne};function qne(){return{enter:{table:Vne,tableData:IR,tableHeader:IR,tableRow:Wne},exit:{codeText:Kne,table:Gne,tableData:ky,tableHeader:ky,tableRow:ky}}}function Vne(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 Gne(e){this.exit(e),this.data.inTable=void 0}function Wne(e){this.enter({type:"tableRow",children:[]},e)}function ky(e){this.exit(e)}function IR(e){this.enter({type:"tableCell",children:[]},e)}function Kne(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Yne));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Yne(e,t){return t==="|"?t:e}function Xne(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
59
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(y,S,k,T){return d(h(y,k,T),y.align)}function c(y,S,k,T){const C=m(y,k,T),E=d([C]);return E.slice(0,E.indexOf(`
|
|
60
|
+
`))}function f(y,S,k,T){const C=k.enter("tableCell"),E=k.enter("phrasing"),R=k.containerPhrasing(y,{...T,before:a,after:a});return E(),C(),R}function d(y,S){return une(y,{align:S,alignDelimiters:r,padding:n,stringLength:s})}function h(y,S,k){const T=y.children;let C=-1;const E=[],R=S.enter("table");for(;++C<T.length;)E[C]=m(T[C],S,k);return R(),E}function m(y,S,k){const T=y.children;let C=-1;const E=[],R=S.enter("tableRow");for(;++C<T.length;)E[C]=f(T[C],y,S,k);return R(),E}function b(y,S,k){let T=iD.inlineCode(y,S,k);return k.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function Zne(){return{exit:{taskListCheckValueChecked:MR,taskListCheckValueUnchecked:MR,paragraph:Jne}}}function Qne(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ere}}}function MR(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Jne(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 ere(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 f=iD.listItem(e,t,n,{...r,...c.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(h){return h+l}}function tre(){return[Mte(),ene(),ine(),qne(),Zne()]}function nre(e){return{extensions:[Dte(),tne(e),sne(),Xne(e),Qne()]}}const rre={tokenize:ure,partial:!0},sD={tokenize:cre,partial:!0},oD={tokenize:fre,partial:!0},aD={tokenize:dre,partial:!0},ire={tokenize:pre,partial:!0},lD={name:"wwwAutolink",tokenize:are,previous:cD},uD={name:"protocolAutolink",tokenize:lre,previous:fD},js={name:"emailAutolink",tokenize:ore,previous:dD},Xi={};function sre(){return{text:Xi}}let Zo=48;for(;Zo<123;)Xi[Zo]=js,Zo++,Zo===58?Zo=65:Zo===91&&(Zo=97);Xi[43]=js;Xi[45]=js;Xi[46]=js;Xi[95]=js;Xi[72]=[js,uD];Xi[104]=[js,uD];Xi[87]=[js,lD];Xi[119]=[js,lD];function ore(e,t,n){const r=this;let s,a;return l;function l(m){return!Lv(m)||!dD.call(r,r.previous)||zx(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Lv(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(ire,h,d)(m):m===45||m===95||hr(m)?(a=!0,e.consume(m),f):h(m)}function d(m){return e.consume(m),s=!0,f}function h(m){return a&&s&&Er(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function are(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!cD.call(r,r.previous)||zx(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rre,e.attempt(sD,e.attempt(oD,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function lre(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&fD.call(r,r.previous)&&!zx(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Er(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),f}return n(m)}function f(m){return m===47?(e.consume(m),a?d:(a=!0,f)):n(m)}function d(m){return m===null||Qp(m)||mn(m)||ca(m)||Qh(m)?n(m):e.attempt(sD,e.attempt(oD,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function ure(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 cre(e,t,n){let r,s,a;return l;function l(d){return d===46||d===95?e.check(aD,f,c)(d):d===null||mn(d)||ca(d)||d!==45&&Qh(d)?f(d):(a=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function f(d){return s||r||!a?n(d):t(d)}}function fre(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(aD,t,a)(l):l===null||mn(l)||ca(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function dre(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||mn(c)||ca(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||mn(c)||ca(c)?t(c):r(c)}function a(c){return Er(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):Er(c)?(e.consume(c),l):n(c)}}function pre(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return hr(a)?n(a):t(a)}}function cD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mn(e)}function fD(e){return!Er(e)}function dD(e){return!(e===47||Lv(e))}function Lv(e){return e===43||e===45||e===46||e===95||hr(e)}function zx(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 hre={tokenize:Sre,partial:!0};function mre(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vre,continuation:{tokenize:xre},exit:kre}},text:{91:{name:"gfmFootnoteCall",tokenize:yre},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:gre,resolveTo:bre}}}}function gre(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const f=r.events[s][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=_i(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function bre(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 yre(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"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!l||m===null||m===91||mn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(_i(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return mn(m)||(l=!0),a++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function vre(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(S)}function h(S){if(l>999||S===93&&!c||S===null||S===91||mn(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=_i(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return mn(S)||(c=!0),l++,e.consume(S),S===92?m:h}function m(S){return S===91||S===92||S===93?(e.consume(S),l++,h):h(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),Wt(e,y,"gfmFootnoteDefinitionWhitespace")):n(S)}function y(S){return t(S)}}function xre(e,t,n){return e.check(rf,t,e.attempt(hre,t,n))}function kre(e){e.exit("gfmFootnoteDefinition")}function Sre(e,t,n){const r=this;return Wt(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 wre(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 f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",h,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&ti(b,b.length,0,Jh(y,l.slice(d+1,f),c)),ti(b,b.length,0,[["exit",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",h,c]]),ti(l,d-1,f-d+3,b),f=d+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function a(l,c,f){const d=this.previous,h=this.events;let m=0;return b;function b(S){return d===126&&h[h.length-1][1].type!=="characterEscape"?f(S):(l.enter("strikethroughSequenceTemporary"),y(S))}function y(S){const k=Dl(d);if(S===126)return m>1?f(S):(l.consume(S),m++,y);if(m<2&&!n)return f(S);const T=l.exit("strikethroughSequenceTemporary"),C=Dl(S);return T._open=!C||C===2&&!!k,T._close=!k||k===2&&!!C,c(S)}}}class Ere{constructor(){this.map=[]}add(t,n,r){Tre(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 Tre(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 Cre(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 Rre(){return{flow:{null:{name:"table",tokenize:_re,resolveAll:Are}}}}function _re(e,t,n){const r=this;let s=0,a=0,l;return c;function c(I){let V=r.events.length-1;for(;V>-1;){const j=r.events[V][1].type;if(j==="lineEnding"||j==="linePrefix")V--;else break}const B=V>-1?r.events[V][1].type:null,z=B==="tableHead"||B==="tableRow"?A:f;return z===A&&r.parser.lazy[r.now().line]?n(I):z(I)}function f(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(l=!0,a+=1),h(I)}function h(I){return I===null?n(I):gt(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),y):n(I):zt(I)?Wt(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||mn(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,zt(I)?Wt(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):S(I))}function S(I){return I===45||I===58?T(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):D(I)}function k(I){return zt(I)?Wt(e,T,"whitespace")(I):T(I)}function T(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),C):I===45?(a+=1,C(I)):I===null||gt(I)?_(I):D(I)}function C(I){return I===45?(e.enter("tableDelimiterFiller"),E(I)):D(I)}function E(I){return I===45?(e.consume(I),E):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(I))}function R(I){return zt(I)?Wt(e,_,"whitespace")(I):_(I)}function _(I){return I===124?S(I):I===null||gt(I)?!l||s!==a?D(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):D(I)}function D(I){return n(I)}function A(I){return e.enter("tableRow"),N(I)}function N(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),N):I===null||gt(I)?(e.exit("tableRow"),t(I)):zt(I)?Wt(e,N,"whitespace")(I):(e.enter("data"),P(I))}function P(I){return I===null||I===124||mn(I)?(e.exit("data"),N(I)):(e.consume(I),I===92?$:P)}function $(I){return I===92||I===124?(e.consume(I),P):P(I)}}function Are(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,h,m;const b=new Ere;for(;++n<e.length;){const y=e[n],S=y[1];y[0]==="enter"?S.type==="tableHead"?(c=!1,f!==0&&(DR(b,t,f,d,h),h=void 0,f=0),d={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",d,t]])):S.type==="tableRow"||S.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({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",h,t]])),s=S.type==="tableDelimiterRow"?2:h?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=sp(b,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):S.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=sp(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):S.type==="tableHead"?(c=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,a[1]!==0?(l[0]=l[1],m=sp(b,t,a,s,n,m)):l[1]!==0&&(m=sp(b,t,l,s,n,m)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&DR(b,t,f,d,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=Cre(t.events,n))}return e}function sp(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},fl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=fl(t.events,n[1]);if(a={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=fl(t.events,n[2]),h=fl(t.events,n[3]),m={type:c,start:Object.assign({},d),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 S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},fl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function DR(e,t,n,r,s){const a=[],l=fl(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 fl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Nre={name:"tasklistCheck",tokenize:Ire};function Ore(){return{text:{91:Nre}}}function Ire(e,t,n){const r=this;return s;function s(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return mn(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return gt(f)?t(f):zt(f)?e.check({tokenize:Mre},t,n)(f):n(f)}}function Mre(e,t,n){return Wt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function Dre(e){return n2([sre(),mre(),wre(e),Rre(),Ore()])}const Lre={};function jre(e){const t=this,n=e||Lre,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Dre(n)),a.push(tre()),l.push(nre(n))}function zre(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function pD(e){return g.jsx("span",{className:"md-cell",children:e})}function Pre({children:e,...t}){return g.jsx("th",{...t,children:pD(e)})}function $re({children:e,...t}){return g.jsx("td",{...t,children:pD(e)})}function jv(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(jv).join(""):v.isValidElement(e)?jv(e.props.children):""}function Fre({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(jv(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(br,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const Bre={table:zre,th:Pre,td:$re,pre:Fre,a:ua},Ll=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(DJ,{remarkPlugins:[jre],rehypePlugins:[[Cte,{detect:!1}]],components:Bre,children:t??""})})});function Ure(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 af(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 xa({status:e}){const t=Ure(e);return g.jsx(Pt,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Hre({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(hn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{Ke.submitApproval(e,"approve")},children:"Approve"}),g.jsx(hn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Ke.submitApproval(e,"deny")},children:"Deny"})]})}function qre({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(hn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(hn,{variant:"secondary",size:"sm",onClick:()=>{Ke.submitAuth(e,"approve")},children:"Connected"}),g.jsx(hn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Ke.submitAuth(e,"deny")},children:"Cancel"})]})}function lf({item:e}){const t=Be(r=>r.capabilities.approvals),n=Be(r=>r.capabilities.auth);return e.status!=="awaiting"?null:e.gate!=="auth"?t!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting approval outside this playground"})}):g.jsx(Hre,{callId:e.callId}):n!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting connection outside this playground"})}):e.authUrl===void 0||e.connection===void 0?null:g.jsx(qre,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function Px(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function kl(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const hD=new Map;for(const[e,t]of Object.entries(GK)){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&&hD.set(s,t.default)}function Vre(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function LR(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 Gre(e){const t=LR(e.outputRaw);if(t)return t;if(e.output)try{return LR(JSON.parse(e.output))}catch{}return null}function jR(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Wre=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=af(t),a=Vre(t.args),l=Gre(t),c=jR(l?.stdout??""),f=jR(l?.stderr??""),d=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&d?"error":t.status,m=[a?Qr(a,80):"shell"];return d&&m.push(`exit ${l?.exitCode}`),m.push(Ii(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(bi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(xa,{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,f?g.jsx("pre",{className:"shell-std shell-err",children:f}):null,!c&&!f?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(lf,{item:t})]})}),Kre=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=af(t),a=kl(Px(t.args),"path"),l=Yre(t),c=[a?oW(a,80):"read",Ii(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(bi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(xa,{status:t.status}),open:n,onOpenChange:f=>r(f),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(lf,{item:t})]})});function Yre(e){const t=zR(e.outputRaw);if(t!=null)return t;if(e.output)try{return zR(JSON.parse(e.output))}catch{}return null}function zR(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 Xre=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=af(t),a=Px(t.args),l=kl(a,"glob_pattern","globPattern"),c=kl(a,"target_directory","targetDirectory"),f=Zre(t),d=[l?Qr(l,80):"glob",Ii(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(bi,{action:"glob",details:d.join(" · "),leadingIcon:g.jsx(xa,{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,f!=null?f.length>0?g.jsx("pre",{className:"tool-body",children:f.join(`
|
|
61
|
+
`)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(lf,{item:t})]})});function Zre(e){const t=PR(e.outputRaw);if(t!=null)return t;if(e.output)try{return PR(JSON.parse(e.output))}catch{}return null}function PR(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 Qre=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=af(t),a=Px(t.args),l=kl(a,"pattern"),c=kl(a,"path"),f=kl(a,"glob"),d=[l?Qr(l,80):"grep",Ii(s)],h=[c,f?`glob ${f}`:""].filter(Boolean).join(`
|
|
62
|
+
`);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(bi,{action:"grep",details:d.join(" · "),leadingIcon:g.jsx(xa,{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(lf,{item:t})]})}),Jre=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(bi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Ll,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(bi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Ll,{text:t,className:"body"})})})}),eie=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(Ll,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(Jre,{text:t.text,open:t.open});const n=t.args==null?"":zn(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(xa,{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 tie(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 nie=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?"":zn(t.args,100),f=t.status==="running",d=c?Qr(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(xa,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:f?"pg-subagent-title shimmer":"pg-subagent-title",children:d}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[tie(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(Pt,{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(eie,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function rie(e){if(e==null)return"";if(typeof e=="string")return Qr(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 Qr(n,80)}}return zn(e,120)}const iie=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=af(t),a=rie(t.args),l=Ii(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(bi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(xa,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(lf,{item:t})]})}),sie={shell:e=>g.jsx(Wre,{item:e}),read:e=>g.jsx(Kre,{item:e}),glob:e=>g.jsx(Xre,{item:e}),grep:e=>g.jsx(Qre,{item:e})};function oie(e){return e.name.startsWith("subagent:")}const aie=v.memo(function({item:t}){if(oie(t))return g.jsx(nie,{item:t});const n=hD.get(t.name);if(n)return g.jsx(n,{item:t});const r=sie[t.name];return r?r(t):g.jsx(iie,{item:t})}),$R=120,lie=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>$R)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,f=()=>{s&&r(h=>!h)},d=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:$R}: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?f:void 0,onKeyDown:s?d:void 0,children:t})})});function uie(){return g.jsx("div",{className:"msg user",children:g.jsx("div",{className:"bubble withheld",children:"Prompt hidden"})})}const cie=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(Ll,{text:t,className:n?"bubble streaming":"bubble"})})}),fie=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(bi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(Ll,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(bi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(Ll,{text:t,className:"body"})})})}),die=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(ua,{href:r,children:r})]}):null]})});function mc(e){switch(e.kind){case"user":return e.hidden===!0?g.jsx(uie,{},e.id):g.jsx(lie,{text:e.text},e.id);case"assistant":return g.jsx(cie,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(fie,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(aie,{item:e},e.id);case"divider":return g.jsx(die,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(LK,{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 FR(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function pie({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,f=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&f.push(`${Xp(r.inTokens)} in · ${Xp(r.outTokens)} out tokens`);const d=f.length>0?f.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:d,children:g.jsx(bi,{action:"Worked",details:r.ms!==null?`for ${mx(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(mc)})})}):null,t.map(mc),n?mc(n):null]})}function hie({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(bi,{action:"Working",details:`for ${mx(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function mie(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(mc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(mc(l));break;case"turn-end":{const c=s[s.length-1],f=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,d=f===null?s:s.slice(0,-1),h=d.filter(b=>!FR(b)),m=d.filter(FR);r.push(g.jsx(pie,{steps:h,cards:m,final:f,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(hie,{startMs:t},"working")),a(),r}function mD(){const e=Be(h=>h.transcript),t=Be(h=>h.current),n=Be(h=>h.localTrace),r=Be(h=>h.running),s=Be(h=>h.turnStartedAt),a=e.length===0&&(r?s:null)===null&&(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??"",f=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:d}=zM({contentKey:l,latchKey:f});return g.jsx("div",{ref:d,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(yx,{idle:"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.",empty:"No messages in this session yet."}):mie(e,r?s:null)})}const BR=["accent","blue","magenta","orange","purple"];function gD(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return BR[t%BR.length]}function UR(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 gie(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(UR(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const f=[...n.slice(0,c),s];if(UR(f,t,r)<=a)return c}return 0}const bie="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",yie="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",HR="... More";function vie({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 k=Array.from(m.querySelectorAll(":scope > [data-measure]"));if(k.length!==e.length)return;const T=getComputedStyle(m);s.current={key:a,widths:k.map(C=>C.offsetWidth),gap:parseFloat(T.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const k=s.current;if(!k)return;const T=gie({availableWidth:m.clientWidth,itemWidths:k.widths,gap:k.gap,triggerWidth:k.triggerWidth});c(C=>C.visibleCount===T?C:{...C,visibleCount:T})};b();let y;const S=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return S.observe(m),()=>{S.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const f=Math.min(l.visibleCount,e.length),d=e.slice(0,f),h=e.slice(f);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[d.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{Ke.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:HR}),h.length>0?g.jsxs(Jr,{placement:"bottom",children:[g.jsx(Jr.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:HR})}),g.jsx(Jr.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(Jr.Item,{disabled:t,onSelect:()=>{Ke.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function xie(){const e=Be(f=>f.meta),t=Be(f=>f.info),n=Be(f=>f.evalCases),r=Be(f=>f.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=gD(s),c=a?yie:t?.description||bie;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(Pt,{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(vie,{cases:n,disabled:r}):null]})}const op={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},wrap:{kwnvtZ:"ui-1a02dak",$$css:!0},scroll:{k1xSpc:"ui-78zum5",kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-1t1x2f9",k7Eaqz:"ui-euugli",kzqmXN:"ui-h8yej3",kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kLKAdn:"ui-f6zju3",kpe85a:"ui-g31tg3",kGO01o:"ui-cnij5n",kE3dHu:"ui-43mhey",keoZOQ:"ui-1f5salc",km5ZXQ:"ui-9s89bp",k1K539:"ui-xp2yxc",koQZXg:"ui-1l8xd8c",katHQp:"ui-1ulo7a8",kOuLrU:"ui-fk6m8",$$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}},kie={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},Sie={sm:{kOIVth:"ui-1oot3zn",$$css:!0},md:{kOIVth:"ui-1jlwbde",$$css:!0}};function wie(e,t){return e==="filter"||e==="underline"&&t==="lg"?"md":"sm"}const qR={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}},Eie={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}},Tie={sm:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},md:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},lg:{kLKAdn:"ui-oyc9vk",kpe85a:"ui-14ndyrl",kGO01o:"ui-2lprc",kE3dHu:"ui-1e7ydrk",$$css:!0}},bD=v.createContext(null);function yD(e){const t=v.use(bD);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function Cie({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(bD.Provider,{value:c,children:g.jsx(SI,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function Rie({activateOnFocus:e,spacing:t,wrap:n=!1,overflow:r,rootStyle:s,children:a,...l}){const c=yD("Tabs.List"),f=t??wie(c.variant,c.size),d=r??(n?"wrap":void 0),h=d==="wrap"&&c.variant!=="underline",m=d==="scroll";return g.jsxs(_I,{...l,activateOnFocus:e,"data-component":"tabs-list","data-variant":c.variant,"data-wrap":h?"true":void 0,"data-overflow":m?"scroll":h?"wrap":void 0,"data-native-scrollbar":m?"none":void 0,...Dt(op.base,c.variant==="underline"&&op.underline,c.variant==="underline"?Sie[f]:kie[f],h&&op.wrap,m&&op.scroll,s),children:[a,c.variant==="underline"?g.jsx(RI,{"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 _ie({value:e,secondaryLabel:t,href:n,rootStyle:r,children:s,...a}){const l=yD("Tabs.Item");return g.jsxs(TI,{...a,value:e,render:n===void 0?void 0:c=>g.jsx("a",{...c,href:n}),nativeButton:n===void 0,"data-component":"tabs-item","data-size":l.size,"data-variant":l.variant,...Dt(qR.base,l.size==="sm"?Ds.root:_s.root,l.variant==="underline"?Tie[l.size]:Eie[l.size],qR[l.variant],l.variant==="filter"&&FA.root,r),children:[s,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const Sy={Root:Cie,List:Rie,Item:_ie};function Aie(e,t){return t===null?!0:e!=="artifacts"||t.artifacts!==void 0}function vD(e,t,n){return e.filter(r=>r.value===n||Aie(r.value,t))}const Nie=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}];function $x(e){return e==="overview"?"chat":e}function Oie({size:e="lg"}){const t=Be(f=>f.view),n=Be(f=>f.evalNavReturn),r=Be(f=>f.info),s=Be(f=>f.capabilities),a=Nie.filter(f=>(f.value!=="evals"||s.evals!=="disabled")&&(f.value!=="artifacts"||s.artifacts!=="disabled")),l=n||t==="evals"?a:a.filter(f=>f.value!=="evals"),c=vD(l,r,t);return g.jsx(Sy.Root,{value:$x(t),onValueChange:f=>Ke.setView(f),size:e,children:g.jsx(Sy.List,{"aria-label":"Visualization mode",wrap:!0,children:c.map(f=>g.jsx(Sy.Item,{value:f.value,children:f.label},f.value))})})}function xD(){const e=Be(s=>s.view),t=Be(s=>s.current),n=Be(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[$x(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(xie,{}):g.jsx(mD,{}),g.jsx(OM,{})]}):null,e==="trace"?g.jsx(BM,{}):null,e==="raw"?g.jsx(PM,{}):null,e==="evals"?g.jsx(LM,{}):null,e==="artifacts"?g.jsx(NM,{}):null]})}function Iie({className:e,labeled:t=!1}){const n=Be(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(Xc,{id:t?"pg-auth-token":void 0,type:"password",size:"md","aria-label":"Bearer token",placeholder:t?"Optional":"Bearer token (optional)",value:n,onChange:r=>Ke.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function Mie(){return Be(t=>t.aliasHosted)?null:g.jsxs(Jr,{placement:"bottom-end",children:[g.jsx(Jr.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(Jr.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(Iie,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function kD({variant:e}){const t=Be(l=>l.barTitle),n=Be(l=>l.barId),r=Be(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(br,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>Ke.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(Oie,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(Mie,{}),s?g.jsx(br,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>Ke.setChatPanelOpen(!1)}):null]})]})}function Die(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(kD,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(xD,{})})]})}const Lie="agent-serve.playground.try.";function SD(e,t){return`${Lie}${e}:${t}`}function VR(e,t){try{const n=localStorage.getItem(SD(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 jie(e,t,n){try{localStorage.setItem(SD(e,t),JSON.stringify(n))}catch{}}function GR(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 WR({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 wD(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 ap(e){return`'${e.replace(/'/g,"'\\''")}'`}function zie(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",ap(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",ap("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",ap(r))}return t.push(ap(e.absoluteUrl)),t.join(" ")}function Pie(e,t,n){let r=Ke.api.url(e);if(n){const s=wD(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,f]of Object.entries(s.value)){if(f==null)continue;const d=typeof f=="string"?f:String(f);d!==""&&a.set(c,d)}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 ED({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=Be(N=>N.authToken),[c,f]=v.useState(()=>{const N=VR(r,t.url);return N?.query!==void 0&&N.query.trim()!==""?N.query:GR(t.querySchema)}),[d,h]=v.useState(()=>{const N=VR(r,t.url);return N?.body!==void 0&&N.body.trim()!==""?N.body:GR(t.bodySchema)}),[m,b]=v.useState(!1),[y,S]=v.useState(!1),[k,T]=v.useState(null),[C,E]=v.useState(null);v.useEffect(()=>{const N=P=>{P.key==="Escape"&&n()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[n]);const R=N=>{const P={};s&&(P.body=N.body??d),a&&(P.query=N.query??c),jie(r,t.url,P)},_=()=>{R({body:d,query:c}),n()},D=async()=>{if(T(null),S(!1),s&&d.trim()!=="")try{JSON.parse(d)}catch($){T(`Body: ${$ instanceof Error?$.message:String($)}`);return}const N=Pie(t.url,c,a);if(!N.ok){T(N.error);return}const P=zie({method:r,absoluteUrl:N.url,token:l,hasBody:s,bodyText:d});try{await navigator.clipboard.writeText(P),S(!0),Ke.toast("Copied curl to clipboard"),window.setTimeout(()=>S(!1),1500)}catch($){T(`Copy failed: ${$ instanceof Error?$.message:String($)}`)}},A=async()=>{T(null),E(null);let N;if(a){const $=wD(c,"Query");if(!$.ok){T($.error);return}N={};for(const[I,V]of Object.entries($.value))V!=null&&(N[I]=typeof V=="string"?V:String(V))}let P;if(s){const $=d.trim();if($==="")P={};else try{P=JSON.parse($)}catch(I){T(`Body: ${I instanceof Error?I.message:String(I)}`);return}}R({body:d,query:c}),b(!0);try{const $=await Ke.api.channelRequest(r,t.url,{body:s?P:void 0,query:N});if($.ok&&$.body&&await Ke.openSessionFromChannelResponse(e,$.body)){n();return}E({status:$.status,body:$.body})}catch($){T($ instanceof Error?$.message:String($))}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:N=>N.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(WR,{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:N=>f(N.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(WR,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:d,onChange:N=>h(N.target.value),spellCheck:!1,rows:10})]})]}):null,k?g.jsx("div",{className:"pg-try-error",children:k}):null,C?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:C.status})]}),g.jsx("pre",{children:JSON.stringify(C.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(hn,{variant:"secondary",size:"sm",onClick:()=>{D()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(hn,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),g.jsx(hn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{A()},children:m?"Sending…":"Send"})]})]})})}const TD="agent-serve.playground.drawerWidth",wy=340,zv=280,Pv=720;function yp(e){return Math.min(Pv,Math.max(zv,e))}function $ie(){try{const e=localStorage.getItem(TD);if(e===null)return wy;const t=Number.parseInt(e,10);return Number.isFinite(t)?yp(t):wy}catch{return wy}}function ol({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function Qu({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 Fie(){const e=Be(E=>E.drawerOpen),t=Be(E=>E.info),[n,r]=v.useState(null),[s,a]=v.useState($ie),[l,c]=v.useState(!1),f=v.useRef(s);f.current=s,v.useEffect(()=>{try{localStorage.setItem(TD,String(s))}catch{}},[s]);const d=v.useCallback(E=>{E.preventDefault();const R=E.currentTarget,_=E.clientX,D=f.current;R.setPointerCapture(E.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const A=P=>{a(yp(D+(P.clientX-_)))},N=P=>{R.releasePointerCapture(P.pointerId),R.removeEventListener("pointermove",A),R.removeEventListener("pointerup",N),R.removeEventListener("pointercancel",N),c(!1),document.body.classList.remove("pg-resizing-drawer")};R.addEventListener("pointermove",A),R.addEventListener("pointerup",N),R.addEventListener("pointercancel",N)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],S=t?.channels??[],k=t?.hooks??[],T=v.useMemo(()=>{const E=new Map;for(const R of Yh(S))E.set(`${R.method}:${R.url}`,R.name);return E},[S]),C=t!==null&&h.length===0&&m.length===0&&b.length===0&&y.length===0&&S.length===0&&k.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":zv,"aria-valuemax":Pv,tabIndex:0,onPointerDown:d,onKeyDown:E=>{E.key==="ArrowLeft"?(E.preventDefault(),a(R=>yp(R-16))):E.key==="ArrowRight"?(E.preventDefault(),a(R=>yp(R+16))):E.key==="Home"?(E.preventDefault(),a(zv)):E.key==="End"&&(E.preventDefault(),a(Pv))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>Ke.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,C?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(ol,{title:"Tools",children:h.map(E=>g.jsx(Qu,{name:E.name,detail:E.description},E.name))}):null,m.length?g.jsx(ol,{title:"Skills",children:m.map(E=>g.jsx(Qu,{name:E.name,detail:E.description},E.name))}):null,b.length?g.jsx(ol,{title:"Subagents",children:b.map(E=>g.jsx(Qu,{name:E.name,detail:E.description},E.name))}):null,y.length?g.jsx(ol,{title:"MCP Connections",children:y.map(E=>g.jsx(Qu,{name:E.name,detail:E.transport},E.name))}):null,S.length?g.jsx(ol,{title:"Channels",children:S.map(E=>g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:E.id}),(E.routes??[]).length===0?g.jsx("div",{className:"d",children:"(events only)"}):g.jsx("div",{className:"channel-routes",children:(E.routes??[]).map(R=>{const _=E.id!=="http",D=`${R.method} ${R.url}`,A=T.get(`${R.method.toUpperCase()}:${R.url}`);return _?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:D}),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:E.id,route:R}),children:"Try"})]},D):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:D})},D)})})]},E.id))}):null,k.length?g.jsx(ol,{title:"Hooks",children:k.map(E=>g.jsx(Qu,{name:E},E))}):null]})]}),n?g.jsx(ED,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}const Bie=/^turn_(\d+)$/;function Uie(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n?.type!=="turn.started")continue;const r=Number(Bie.exec(n.turnId??"")?.[1]);if(Number.isSafeInteger(r))return r}}function Hie(e,t,n){return t===null||n===void 0?e:e.map(r=>r.sessionId===t&&n>(r.turnCount??0)?{...r,turnCount:n}:r)}const KR="Logs are not available in this playground.";function qie(){const e=Be(h=>h.meta.readonly===!0),t=Be(h=>h.capabilities.logs!=="disabled"),[n,r]=v.useState([]),[s,a]=v.useState(null),l=v.useRef(-1),c=v.useRef(null),f=n.length,d=pN({count:f,getScrollElement:()=>c.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{if(!t)return;let h=!1;const m=async()=>{const y=await Ke.api.logs(l.current);if(h)return;if(!y.ok||y.body===null){a(y.status===501?KR:`logs failed (${y.status})`);return}a(null);const S=y.body.entries??[];S.length>0&&(l.current=y.body.nextAfter,r(k=>{const T=k.concat(S);return T.length>2e3?T.slice(T.length-2e3):T}))};if(m(),e)return()=>{h=!0};const b=window.setInterval(()=>{m()},1e3);return()=>{h=!0,window.clearInterval(b)}},[t,e]),v.useEffect(()=>{f>0&&d.scrollToIndex(f-1,{align:"end"})},[f,d]),t?s!==null&&f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ci,{body:s})}):f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ci,{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:c,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(h=>{const m=n[h.index];if(m===void 0)return null;const b=m.at.slice(11,19);return g.jsxs("div",{"data-index":h.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${h.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[b," "]}),g.jsx("span",{children:m.line})]},h.key)})})})]}):g.jsx("div",{className:"pg-raw",children:g.jsx(Ci,{body:KR})})}const Fx={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 Vie(){return Fx.root}function Gie(){return Fx.controls}function Wie(){return Fx.status}function Kie({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:f}){const d=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(d-1)*r+1),m=Math.min(n,d*r),b=T=>{T<1||T>t||T===d||a||s(T)},y=qt({rootClass:"ui-pagination-footer",stylexStyles:[Vie(),c],className:["pagination-footer",f].filter(Boolean).join(" ")}),S=qt({rootClass:"ui-pagination-footer__controls",stylexStyles:Gie(),className:"pagination-footer__controls"}),k=qt({rootClass:"ui-pagination-footer__status",stylexStyles:Wie(),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:k.className,style:k.style,children:[h.toLocaleString(),"–",m.toLocaleString()," of ",n.toLocaleString()]})]}),g.jsxs("div",{className:S.className,style:S.style,children:[g.jsx(br,{"aria-label":"Previous page",disabled:d<=1||a,icon:"chevron-left",onClick:()=>b(d-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:k.className,style:k.style,children:[d.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(br,{"aria-label":"Next page",disabled:d>=t||a,icon:"chevron-right",onClick:()=>b(d+1),size:"sm",variant:"ghost"})]})]})}const Yie={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}},CD={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}},Xie={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Zie={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},Qie={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}},Jie={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},ese={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}},tse={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}},nse={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},rse={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}},YR={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},ise={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},sse={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},ose={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},ase={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},lse={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}},use={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},cse={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},fse={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},XR={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}},dse={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}},pse={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},hse={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},mse={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},gse={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},bse={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},ZR=[{identityClass:"automations-run-history-table__skeleton--wide",style:mse.base},{identityClass:"automations-run-history-table__skeleton--medium",style:pse.base},{identityClass:"automations-run-history-table__skeleton--short",style:hse.base}];function yse(e){return typeof e=="number"?`${e}px`:e}function vse(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${yse(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 Bx(e){const t=vse(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const Ux={identityClass:"",style:null};function RD(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:Xie.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:ise.base};default:return Ux}}function xse(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:Jie.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:fse.base};default:return Ux}}function kse(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:Zie.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:ose.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:ase.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:sse.base};default:return Ux}}function Sse(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function zc(...e){return e.filter(Boolean).join(" ")}function _D(e){return Qt(qt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[tse.base,e&&nse.base],className:zc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function AD(){return g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:rse.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function wse({columns:e}){return g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:ese.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=xse(t.align);return g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[Qie.base,n.style],className:zc("automations-run-history-table__header",n.identityClass)}).className,style:Bx(t),children:t.header},`header-${t.key}`)})})}function QR({row:e,column:t}){const n=RD(t.align),r=kse(t.tintColor);return g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[CD.base,n.style,r.style],className:zc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:Bx(t),children:t.render(e)})}function Ese({columns:e,rowIndex:t}){const n=ZR[t%ZR.length];return g.jsxs("div",{className:_D(!1),"data-run-history-row":"",children:[g.jsx(AD,{}),e.map(r=>{const s=RD(r.align);return g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[CD.base,s.style],className:zc("automations-run-history-table__cell",s.identityClass)}).className,style:Bx(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:qt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[dse.base,n.style],className:zc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function ND({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:f="Run history"}){const{linkColumns:d,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const k=[],T=[];for(const C of t)C.excludeFromRowLink===!0?T.push(C):k.push(C);return{linkColumns:k,excludedColumns:T,hasExcludedColumns:T.length>0}},[t]),b=n&&e.length===0,y=!n&&e.length===0,S=c!==void 0&&c.totalPages>1&&!n;return g.jsxs("div",{className:qt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:gse.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":f,className:qt({rootClass:"ui-automations-run-history-table",stylexStyles:Yie.base,className:"automations-run-history-table"}).className,children:[g.jsx(wse,{columns:t}),b?g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:YR.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(k,T)=>g.jsx(Ese,{columns:t,rowIndex:T},`skeleton-row-${T.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:qt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:lse.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:qt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:cse.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:qt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:use.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:qt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:YR.base,className:"automations-run-history-table__rows"}).className,children:e.map(k=>{const T=l?.(k),C=T!==void 0&&T!==""&&d.length>0,E=C||a!==void 0&&d.length>0,R=()=>d.map(_=>g.jsx(QR,{column:_,row:k},`cell-${k.id}-${_.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:_D(E),"data-run-history-row":"",children:[g.jsx(AD,{}),C?g.jsx("a",{className:qt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:XR.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:T,onClick:_=>{a!==void 0&&Sse(_)&&(_.preventDefault(),a(k))},children:R()}):a!==void 0&&d.length>0?g.jsx("button",{className:qt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:XR.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(k),type:"button",children:R()}):R(),m&&h.map(_=>g.jsx(QR,{column:_,row:k},`cell-${k.id}-${_.key}`))]})},k.id)})})]}),S&&c!==void 0&&g.jsx(Kie,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:bse.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function rm(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function OD({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:f}){const d=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," ",d]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(Xc,{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]})]}),f]})}function Tse(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function Cse(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function Rse(e,t){return rm(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function _se(e,t){return rm(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=>Rse(n,t))}function Ase(e,t){return rm(t,e.title,e.sessionId,e.channelId,e.mode)}function JR({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 Nse({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,f]=v.useState(""),d=v.useMemo(()=>[...e.map(k=>({kind:"session",at:k.updatedAt??k.createdAt??"",session:k})),...t.map(k=>({kind:"evalRun",at:k.finishedAt??k.startedAt,run:k}))].sort((k,T)=>T.at.localeCompare(k.at)),[e,t]),h=v.useMemo(()=>d.filter(S=>S.kind==="session"?Ase(S.session,c):_se(S.run,c)),[d,c]),m=v.useMemo(()=>h.map(S=>S.kind==="session"?{id:`session:${S.session.sessionId}`,kind:"session",session:S.session,active:S.session.sessionId===n}:{id:`eval:${S.run.runId}`,kind:"evalRun",run:S.run,active:S.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:S=>S.kind==="session"?g.jsx(JR,{running:S.session.running,active:S.active,children:S.session.title||S.session.sessionId}):g.jsx(JR,{running:S.run.status==="running",active:S.active,children:S.run.runId})},{key:"type",header:"Type",flexWidth:{minWidth:140,grow:1},render:S=>{if(S.kind==="session")return S.session.channelId||"—";const{status:k,summary:T}=S.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(ko,{variant:Cse(k),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[Tse(k),k==="running"?` · ${T.done}/${T.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:S=>{if(S.kind==="session"){const T=S.session.turnCount;return T===void 0?"—":`${T} ${T===1?"turn":"turns"}`}const{summary:k}=S.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(Pt,{name:"check-circle",size:12,variant:"filled","aria-hidden":!0}),k.passed," passed"]}),g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--danger",children:[g.jsx(Pt,{name:"x-circle",size:12,variant:"filled","aria-hidden":!0}),k.failed," failed"]})]})}},{key:"activity",header:"Last activity",fixedWidth:96,align:"right",render:S=>S.kind==="session"?S.session.updatedAt?kv(S.session.updatedAt)??"—":"—":kv(S.run.finishedAt??S.run.startedAt)??"—"}],[]),y=d.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(OD,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:f,children:g.jsx(ND,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:S=>{if(S.kind==="session"){a(S.session);return}l(S.run.runId)}})})}function Ose(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 Ise({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),f=v.useMemo(()=>e.filter(b=>rm(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),d=v.useMemo(()=>f.map(b=>{const y=Ose(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)}}),[f,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(Pt,{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(br,{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(OD,{count:f.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(hn,{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(ND,{data:d,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function Ju({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 Ey(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function Mse(e,t){return t?"History":e?"Development":"Production"}function Dse(e,t){return t?"neutral":e?"warn":"neutral"}function Lse(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function jse(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function zse(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function Pse({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=zse(r,s),f=n&&n.trim()!==""?n:null,d=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(Ju,{label:"Mode",children:g.jsxs(ko,{variant:Dse(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,Mse(e,l)]})}),g.jsx(Ju,{label:"Status",children:g.jsxs(ko,{variant:jse(t,l),size:"sm",pill:!0,children:[g.jsx(Pt,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),Lse(t,l)]})}),g.jsx(Ju,{label:"Model",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(Ey,{})}),g.jsx(Ju,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(Ey,{})}),g.jsx(Ju,{label:"BDK",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(Ey,{})})]})]})}function $se({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(hn,{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 lp(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 up(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 Fse({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(Pt,{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 Bse({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],f=e?.skills??[],d=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=v.useMemo(()=>{const C=new Map;for(const E of Yh(m))C.set(`${E.method}:${E.url}`,E.name);return C},[m]),S=(C,E)=>{if(t){t(C,E);return}s({channelId:C,route:E})},k=m.map(C=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:C.id}),(C.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(C.routes??[]).map(E=>{const R=!n&&C.id!=="http",_=`${E.method} ${E.url}`,D=y.get(`${E.method.toUpperCase()}:${E.url}`);return g.jsxs("div",{className:"pg-surface-channel__route",children:[g.jsx("code",{children:_}),D?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:D}):null,R?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>S(C.id,E),children:"Try"}):null]},_)})})]},C.id)),T=[{id:"tools",label:"Tools",empty:c.length===0,summary:lp(c),details:up(c.map(C=>({name:C.name,detail:C.description})))},{id:"skills",label:"Skills",empty:f.length===0,summary:lp(f),details:up(f.map(C=>({name:C.name,detail:C.description})))},{id:"subagents",label:"Subagents",empty:d.length===0,summary:lp(d),details:up(d.map(C=>({name:C.name,detail:C.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:lp(h),details:up(h.map(C=>({name:C.name,detail:C.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(C=>C.id).join(", ")}),details:k},{id:"hooks",label:"Hooks",empty:b.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:b.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:T.map(C=>g.jsx(Fse,{field:C,expanded:a.has(C.id),onToggle:()=>{l(E=>{const R=new Set(E);return R.has(C.id)?R.delete(C.id):R.add(C.id),R})}},C.id))}),r?g.jsx(ED,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function e_(){const e=Be(B=>B.meta),t=Be(B=>B.capabilities),n=Be(B=>B.info),r=Be(B=>B.health),s=Be(B=>B.sessions),a=Be(B=>B.current),l=Be(B=>Uie(B.traceEvents)),c=Be(B=>B.view),f=Be(B=>B.evalCases),d=Be(B=>B.evalRuns),h=Be(B=>B.evalRun),m=Be(B=>B.evalNavReturn),b=Be(B=>B.overviewSection),y=Be(B=>B.surfaceFocusNonce),S=v.useRef(null);v.useEffect(()=>{y!==0&&S.current?.scrollIntoView({behavior:"smooth",block:"start"})},[y]);const k=e.name||n?.name||"Agent",T=gD(k),C=h??d?.[0]??null,E=h?.status==="running",R=Ke.modelLabel(),_=a?.sessionId??null,D=v.useMemo(()=>{const B=h===null?d:[h,...d],z=new Set(B.flatMap(j=>j.cases.flatMap(H=>H.sessionId===void 0?[]:[H.sessionId])));return Hie(s.filter(j=>!z.has(j.sessionId)),_,l)},[s,d,h,_,l]),A=hW(D),N=$x(c),P=m||N==="evals",$=P?null:a?.sessionId??null,I=P?h?.runId??null:null,V=[{id:"home",label:"Agent"},{id:"runs",label:A>0?`Runs (${A})`:"Runs"},...t.evals==="disabled"?[]:[{id:"evals",label:"Evaluations"}],...t.logs==="disabled"?[]:[{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":T,"aria-hidden":"true",children:g.jsx(Pt,{name:"robot",variant:"filled",size:24,color:T})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:k}),n?.description?g.jsx("p",{className:"pg-overview-identity__description",children:n.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:V.map(B=>g.jsx("button",{type:"button",role:"tab","aria-selected":b===B.id,className:b===B.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>Ke.setOverviewSection(B.id),children:B.label},B.id))}),b==="home"?g.jsxs(g.Fragment,{children:[g.jsx(Pse,{dev:e.dev,health:r,model:R||void 0,runtime:n?.runtime,sourcePath:n?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx($se,{schedules:n?.schedules??[],dev:e.dev&&e.readonly!==!0&&t.schedules==="enabled",onDispatch:B=>Ke.dispatchSchedule(B)}),g.jsx("div",{ref:S,children:g.jsx(Bse,{info:n,readOnly:e.readonly===!0||t.channelRoutes!=="enabled"})})]}):null,b==="runs"?g.jsx(Nse,{sessions:D,runs:d,currentSessionId:$,currentEvalRunId:I,readOnly:e.readonly===!0,onSelectSession:B=>Ke.selectSession(B),onOpenEvalRun:B=>{Ke.selectEvalRun(B)}}):null,b==="evals"?g.jsx(Ise,{cases:f,latestRun:C,running:E,readOnly:e.readonly===!0||t.evals!=="enabled",onRun:B=>{Ke.startEvalRun([B])},onRunAll:()=>{Ke.startEvalRun()}}):null,b==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(qie,{})}):null]})}const ID="agent-serve.playground.chatPanelWidth.v2",ih=320,Use=.5,Hse=.8;function ec(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function $v(e){return Math.max(ih,Math.floor(e*Hse))}function hl(e,t){return Math.min($v(t),Math.max(ih,Math.round(e)))}function Ty(e){return hl(e*Use,e)}function t_(e){try{const t=localStorage.getItem(ID);if(t===null)return Ty(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?hl(n,e):Ty(e)}catch{return Ty(e)}}function qse(){const e=Be(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>t_(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(t_(ec(t.current)));const m=()=>{const y=ec(t.current);r(S=>hl(S,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(ID,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 S=T=>{const C=ec(t.current);r(hl(y-(T.clientX-b),C))},k=T=>{m.releasePointerCapture(T.pointerId),m.removeEventListener("pointermove",S),m.removeEventListener("pointerup",k),m.removeEventListener("pointercancel",k),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",S),m.addEventListener("pointerup",k),m.addEventListener("pointercancel",k)},[]);if(!e)return null;const f=ec(t.current),d=$v(f);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":ih,"aria-valuemax":d,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=ec(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>hl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>hl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(ih)):h.key==="End"&&(h.preventDefault(),r($v(m)))}}),g.jsx(kD,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(xD,{})})]})}const Fv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Bv(e){const t=e.replace("#","").trim();if(!/^[\da-f]+$/i.test(t))throw new Error(`Invalid hex: ${e}`);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 MD(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 Vse(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${MD(e)}${t}`.toUpperCase()}const Gse=/^([a-z]+)\(([^()]*)\)$/i,DD=/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i,n_={"":1,deg:1,grad:.9,rad:180/Math.PI,turn:360},Wse=.5/255;function Ss(e,t,n){return Math.min(n,Math.max(t,e))}function Cy(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function Ry(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function LD(e){return e<1-Wse}function Kse(e){const t=Cy(e.r/255),n=Cy(e.g/255),r=Cy(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),f=Math.cbrt(a),d=Math.cbrt(l);return{l:.2104542553*c+.793617785*f-.0040720468*d,a:1.9779984951*c-2.428592205*f+.4505937099*d,b:.0259040371*c+.7827717662*f-.808675766*d}}function Yse(e){const{l:t,a:n,b:r}=Kse(e),s=Math.sqrt(n*n+r*r);let a=Math.atan2(r,n)*180/Math.PI;return a<0&&(a+=360),{l:t,c:s,h:s<5e-4?0:a,a:e.a}}function Xse(e){const t=e.h*Math.PI/180;return jD(e.l,e.c*Math.cos(t),e.c*Math.sin(t),e.a)}function jD(e,t,n,r){const s=e+.3963377774*t+.2158037573*n,a=e-.1055613458*t-.0638541728*n,l=e-.0894841775*t-1.291485548*n,c=s*s*s,f=a*a*a,d=l*l*l,h=4.0767416621*c-3.3077115913*f+.2309699292*d,m=-1.2684380046*c+2.6097574011*f-.3413193965*d,b=-.0041960863*c-.7034186147*f+1.707614701*d;return{r:Math.round(Ss(Ry(h),0,1)*255),g:Math.round(Ss(Ry(m),0,1)*255),b:Math.round(Ss(Ry(b),0,1)*255),a:Ss(r,0,1)}}function vp(e,t){const n=5e-4*10**(1-t);if(!Number.isFinite(e)||Object.is(e,-0)||Math.abs(e)<n)return"0";const r=e.toFixed(t).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"");return r==="-0"?"0":r}function zD(e,t=3){const n=vp(e.l,t),r=vp(e.c,t),s=r==="0"?"0":vp(e.h,3);return`oklch(${n} ${r} ${s}${eoe(e.a)})`}const r_={rgb:"rgb",rgba:"rgb",hsl:"hsl",hsla:"hsl",oklab:"oklab",oklch:"oklch"};function ks(e,t){const n=e.endsWith("%"),r=n?e.slice(0,-1):e;return DD.test(r)?n?Number(r)/100*t:Number(r):Number.NaN}function PD(e){const t=/[a-z]*$/i.exec(e)?.[0]??"",n=e.slice(0,e.length-t.length),r=t.toLowerCase();return Object.hasOwn(n_,r)&&DD.test(n)?Number(n)*n_[r]:Number.NaN}function $D(e){const t=Gse.exec(e.trim());if(t===null)return null;const n=t[1].toLowerCase();if(!Object.hasOwn(r_,n))return null;const r=t[2].trim();let s,a;if(r.includes(","))s=r.split(",").map(d=>d.trim()),a=s.length===4?s.pop():void 0;else{const[d="",h,...m]=r.split("/");if(m.length>0)return null;s=d.trim().split(/\s+/),a=h?.trim()}const[l,c,f]=s;return s.length!==3||l===void 0||c===void 0||f===void 0?null:{name:r_[n],channels:[l,c,f],alpha:a===void 0?1:ks(a,1)}}function FD({channels:e,alpha:t}){const n=ks(e[0],1),r=ks(e[1],.4),s=PD(e[2]);return[n,r,s,t].every(Number.isFinite)?{l:n,c:r,h:s,a:t}:null}function Zse(e){const t=$D(e),n=t?.name==="oklch"?FD(t):null;if(n===null)throw new Error(`Invalid oklch: ${e}`);return n}function Qse(e){const{channels:t,alpha:n}=e;switch(e.name){case"rgb":{const[r,s,a]=t.map(l=>Math.round(Ss(ks(l,255),0,255)));return[r,s,a,n].every(Number.isFinite)?{r,g:s,b:a,a:Ss(n,0,1)}:null}case"hsl":{const r=PD(t[0]),s=Ss(ks(t[1],100)/100,0,1),a=Ss(ks(t[2],100)/100,0,1);return[r,s,a,n].every(Number.isFinite)?{...Bv(roe({h:(r%360+360)%360,s,l:a})),a:Ss(n,0,1)}:null}case"oklab":{const r=ks(t[0],1),s=ks(t[1],.4),a=ks(t[2],.4);return[r,s,a,n].every(Number.isFinite)?jD(r,s,a,n):null}case"oklch":{const r=FD(e);return r===null?null:Xse(r)}default:{const r=e.name;throw new Error(`Unknown color function: ${String(r)}`)}}}function BD(e){const t=e.trim(),n=t.toLowerCase();if(t.startsWith("#"))return Bv(t);if(n==="transparent")return{r:0,g:0,b:0,a:0};if(Object.hasOwn(Fv,n))return Bv(Fv[n]);const r=$D(t),s=r===null?null:Qse(r);if(s===null)throw new Error(`Unsupported CSS color: ${e}`);return s}function Jse(e){return zD(Yse(e))}function eoe(e){return LD(e)?` / ${vp(e,3)}`:""}new Map(Object.entries(Fv).reverse().map(([e,t])=>[t,e]));function toe(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?zD(Zse(t)):Jse(BD(t))}function noe(e){const t=BD(e);return LD(t.a)?Vse(t):MD(t)}function roe(e){const{h:t,s:n,l:r}=e,s=(m,b,y)=>(y<0&&(y+=1),y>1&&(y-=1),y<1/6?m+(b-m)*6*y:y<1/2?b:y<2/3?m+(b-m)*(2/3-y)*6:m);if(n===0)return`#${Math.round(r*255).toString(16).padStart(2,"0").repeat(3)}`;const a=r<.5?r*(1+n):r+n-r*n,l=2*r-a,c=t/360,f=Math.round(s(l,a,c+1/3)*255),d=Math.round(s(l,a,c)*255),h=Math.round(s(l,a,c-1/3)*255);return`#${f.toString(16).padStart(2,"0")}${d.toString(16).padStart(2,"0")}${h.toString(16).padStart(2,"0")}`}function ioe(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${noe(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${toe(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const soe={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)",accentForegroundBright:"oklch(0.681 0.131 252.629)",onPrimary:"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)",successFill:"oklch(0.638 0.129 153.739)",successFillHover:"oklch(0.638 0.129 153.739)",successFillPressed:"oklch(0.638 0.129 153.739)",successFillBright:"oklch(0.638 0.129 153.739)",successForeground:"oklch(0.638 0.129 153.739)",successForegroundHover:"oklch(0.638 0.129 153.739)",successForegroundBright:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",warnFill:"oklch(0.811 0.118 71.255)",warnFillHover:"oklch(0.811 0.118 71.255)",warnFillPressed:"oklch(0.811 0.118 71.255)",warnFillBright:"oklch(0.811 0.118 71.255)",warnForeground:"oklch(0.811 0.118 71.255)",warnForegroundHover:"oklch(0.811 0.118 71.255)",warnForegroundBright:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",dangerFill:"oklch(0.628 0.194 8.387)",dangerFillHover:"oklch(0.628 0.194 8.387)",dangerFillPressed:"oklch(0.628 0.194 8.387)",dangerFillBright:"oklch(0.628 0.194 8.387)",dangerForeground:"oklch(0.628 0.194 8.387)",dangerForegroundHover:"oklch(0.628 0.194 8.387)",dangerForegroundBright:"oklch(0.628 0.194 8.387)",added:"oklch(0.713 0.094 155.438)",addedForegroundBright:"oklch(0.713 0.094 155.438)",modified:"oklch(0.811 0.118 71.255)",modifiedForegroundBright:"oklch(0.811 0.118 71.255)",removed:"oklch(0.712 0.177 12.651)",removedForegroundBright:"oklch(0.712 0.177 12.651)",untracked:"oklch(0.775 0.062 217.469)",untrackedForegroundBright:"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)",redFill:"oklch(0.712 0.177 12.651)",redFillHover:"oklch(0.712 0.177 12.651)",redFillPressed:"oklch(0.712 0.177 12.651)",redFillBright:"oklch(0.712 0.177 12.651)",redForeground:"oklch(0.712 0.177 12.651)",redForegroundHover:"oklch(0.712 0.177 12.651)",redForegroundBright:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",orangeFill:"oklch(0.693 0.096 38.241)",orangeFillHover:"oklch(0.693 0.096 38.241)",orangeFillPressed:"oklch(0.693 0.096 38.241)",orangeFillBright:"oklch(0.693 0.096 38.241)",orangeForeground:"oklch(0.693 0.096 38.241)",orangeForegroundHover:"oklch(0.693 0.096 38.241)",orangeForegroundBright:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",yellowFill:"oklch(0.811 0.118 71.255)",yellowFillHover:"oklch(0.811 0.118 71.255)",yellowFillPressed:"oklch(0.811 0.118 71.255)",yellowFillBright:"oklch(0.811 0.118 71.255)",yellowForeground:"oklch(0.811 0.118 71.255)",yellowForegroundHover:"oklch(0.811 0.118 71.255)",yellowForegroundBright:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",greenFill:"oklch(0.638 0.129 153.739)",greenFillHover:"oklch(0.638 0.129 153.739)",greenFillPressed:"oklch(0.638 0.129 153.739)",greenFillBright:"oklch(0.638 0.129 153.739)",greenForeground:"oklch(0.638 0.129 153.739)",greenForegroundHover:"oklch(0.638 0.129 153.739)",greenForegroundBright:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",cyanFill:"oklch(0.697 0.059 248.687)",cyanFillHover:"oklch(0.697 0.059 248.687)",cyanFillPressed:"oklch(0.697 0.059 248.687)",cyanFillBright:"oklch(0.697 0.059 248.687)",cyanForeground:"oklch(0.697 0.059 248.687)",cyanForegroundHover:"oklch(0.697 0.059 248.687)",cyanForegroundBright:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",blueFill:"oklch(0.74 0.101 251.884)",blueFillHover:"oklch(0.74 0.101 251.884)",blueFillPressed:"oklch(0.74 0.101 251.884)",blueFillBright:"oklch(0.74 0.101 251.884)",blueForeground:"oklch(0.74 0.101 251.884)",blueForegroundHover:"oklch(0.74 0.101 251.884)",blueForegroundBright:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",magentaFill:"oklch(0.692 0.062 332.665)",magentaFillHover:"oklch(0.692 0.062 332.665)",magentaFillPressed:"oklch(0.692 0.062 332.665)",magentaFillBright:"oklch(0.692 0.062 332.665)",magentaForeground:"oklch(0.692 0.062 332.665)",magentaForegroundHover:"oklch(0.692 0.062 332.665)",magentaForegroundBright:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",purpleFill:"oklch(0.679 0.156 286.998)",purpleFillHover:"oklch(0.679 0.156 286.998)",purpleFillPressed:"oklch(0.679 0.156 286.998)",purpleFillBright:"oklch(0.679 0.156 286.998)",purpleForeground:"oklch(0.679 0.156 286.998)",purpleForegroundHover:"oklch(0.679 0.156 286.998)",purpleForegroundBright:"oklch(0.679 0.156 286.998)",brown:"oklch(0.657 0.065 63.061)",brownFill:"oklch(0.657 0.065 63.061)",brownFillHover:"oklch(0.657 0.065 63.061)",brownFillPressed:"oklch(0.657 0.065 63.061)",brownFillBright:"oklch(0.657 0.065 63.061)",brownForeground:"oklch(0.657 0.065 63.061)",brownForegroundHover:"oklch(0.657 0.065 63.061)",brownForegroundBright:"oklch(0.657 0.065 63.061)",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)"},ooe={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)",accentForegroundBright:"oklch(0.561 0.137 249.943)",onPrimary:"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)",successFill:"oklch(0.479 0.116 156.327)",successFillHover:"oklch(0.479 0.116 156.327)",successFillPressed:"oklch(0.479 0.116 156.327)",successFillBright:"oklch(0.479 0.116 156.327)",successForeground:"oklch(0.479 0.116 156.327)",successForegroundHover:"oklch(0.479 0.116 156.327)",successForegroundBright:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",warnFill:"oklch(0.567 0.123 69.543)",warnFillHover:"oklch(0.567 0.123 69.543)",warnFillPressed:"oklch(0.567 0.123 69.543)",warnFillBright:"oklch(0.567 0.123 69.543)",warnForeground:"oklch(0.567 0.123 69.543)",warnForegroundHover:"oklch(0.567 0.123 69.543)",warnForegroundBright:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",dangerFill:"oklch(0.518 0.196 14.313)",dangerFillHover:"oklch(0.518 0.196 14.313)",dangerFillPressed:"oklch(0.518 0.196 14.313)",dangerFillBright:"oklch(0.518 0.196 14.313)",dangerForeground:"oklch(0.518 0.196 14.313)",dangerForegroundHover:"oklch(0.518 0.196 14.313)",dangerForegroundBright:"oklch(0.518 0.196 14.313)",added:"oklch(0.479 0.116 156.327)",addedForegroundBright:"oklch(0.479 0.116 156.327)",modified:"oklch(0.567 0.123 69.543)",modifiedForegroundBright:"oklch(0.567 0.123 69.543)",removed:"oklch(0.518 0.196 14.313)",removedForegroundBright:"oklch(0.518 0.196 14.313)",untracked:"oklch(0.487 0.077 204.607)",untrackedForegroundBright:"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)",redFill:"oklch(0.518 0.196 14.313)",redFillHover:"oklch(0.518 0.196 14.313)",redFillPressed:"oklch(0.518 0.196 14.313)",redFillBright:"oklch(0.518 0.196 14.313)",redForeground:"oklch(0.518 0.196 14.313)",redForegroundHover:"oklch(0.518 0.196 14.313)",redForegroundBright:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",orangeFill:"oklch(0.576 0.183 39.534)",orangeFillHover:"oklch(0.576 0.183 39.534)",orangeFillPressed:"oklch(0.576 0.183 39.534)",orangeFillBright:"oklch(0.576 0.183 39.534)",orangeForeground:"oklch(0.576 0.183 39.534)",orangeForegroundHover:"oklch(0.576 0.183 39.534)",orangeForegroundBright:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",yellowFill:"oklch(0.567 0.123 69.543)",yellowFillHover:"oklch(0.567 0.123 69.543)",yellowFillPressed:"oklch(0.567 0.123 69.543)",yellowFillBright:"oklch(0.567 0.123 69.543)",yellowForeground:"oklch(0.567 0.123 69.543)",yellowForegroundHover:"oklch(0.567 0.123 69.543)",yellowForegroundBright:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",greenFill:"oklch(0.479 0.116 156.327)",greenFillHover:"oklch(0.479 0.116 156.327)",greenFillPressed:"oklch(0.479 0.116 156.327)",greenFillBright:"oklch(0.479 0.116 156.327)",greenForeground:"oklch(0.479 0.116 156.327)",greenForegroundHover:"oklch(0.479 0.116 156.327)",greenForegroundBright:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",cyanFill:"oklch(0.487 0.077 204.607)",cyanFillHover:"oklch(0.487 0.077 204.607)",cyanFillPressed:"oklch(0.487 0.077 204.607)",cyanFillBright:"oklch(0.487 0.077 204.607)",cyanForeground:"oklch(0.487 0.077 204.607)",cyanForegroundHover:"oklch(0.487 0.077 204.607)",cyanForegroundBright:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",blueFill:"oklch(0.561 0.137 249.943)",blueFillHover:"oklch(0.561 0.137 249.943)",blueFillPressed:"oklch(0.561 0.137 249.943)",blueFillBright:"oklch(0.561 0.137 249.943)",blueForeground:"oklch(0.561 0.137 249.943)",blueForegroundHover:"oklch(0.561 0.137 249.943)",blueForegroundBright:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",magentaFill:"oklch(0.449 0.176 345.345)",magentaFillHover:"oklch(0.449 0.176 345.345)",magentaFillPressed:"oklch(0.449 0.176 345.345)",magentaFillBright:"oklch(0.449 0.176 345.345)",magentaForeground:"oklch(0.449 0.176 345.345)",magentaForegroundHover:"oklch(0.449 0.176 345.345)",magentaForegroundBright:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",purpleFill:"oklch(0.572 0.154 287.656)",purpleFillHover:"oklch(0.572 0.154 287.656)",purpleFillPressed:"oklch(0.572 0.154 287.656)",purpleFillBright:"oklch(0.572 0.154 287.656)",purpleForeground:"oklch(0.572 0.154 287.656)",purpleForegroundHover:"oklch(0.572 0.154 287.656)",purpleForegroundBright:"oklch(0.572 0.154 287.656)",brown:"oklch(0.459 0.068 62.329)",brownFill:"oklch(0.459 0.068 62.329)",brownFillHover:"oklch(0.459 0.068 62.329)",brownFillPressed:"oklch(0.459 0.068 62.329)",brownFillBright:"oklch(0.459 0.068 62.329)",brownForeground:"oklch(0.459 0.068 62.329)",brownForegroundHover:"oklch(0.459 0.068 62.329)",brownForegroundBright:"oklch(0.459 0.068 62.329)",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)"},UD=["sidebar","chrome","editor","base","accent","accentForegroundBright","onPrimary","brand","focus","success","successFill","successFillHover","successFillPressed","successFillBright","successForeground","successForegroundHover","successForegroundBright","warn","warnFill","warnFillHover","warnFillPressed","warnFillBright","warnForeground","warnForegroundHover","warnForegroundBright","danger","dangerFill","dangerFillHover","dangerFillPressed","dangerFillBright","dangerForeground","dangerForegroundHover","dangerForegroundBright","added","addedForegroundBright","modified","modifiedForegroundBright","removed","removedForegroundBright","untracked","untrackedForegroundBright","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","redFill","redFillHover","redFillPressed","redFillBright","redForeground","redForegroundHover","redForegroundBright","orange","orangeFill","orangeFillHover","orangeFillPressed","orangeFillBright","orangeForeground","orangeForegroundHover","orangeForegroundBright","yellow","yellowFill","yellowFillHover","yellowFillPressed","yellowFillBright","yellowForeground","yellowForegroundHover","yellowForegroundBright","green","greenFill","greenFillHover","greenFillPressed","greenFillBright","greenForeground","greenForegroundHover","greenForegroundBright","cyan","cyanFill","cyanFillHover","cyanFillPressed","cyanFillBright","cyanForeground","cyanForegroundHover","cyanForegroundBright","blue","blueFill","blueFillHover","blueFillPressed","blueFillBright","blueForeground","blueForegroundHover","blueForegroundBright","magenta","magentaFill","magentaFillHover","magentaFillPressed","magentaFillBright","magentaForeground","magentaForegroundHover","magentaForegroundBright","purple","purpleFill","purpleFillHover","purpleFillPressed","purpleFillBright","purpleForeground","purpleForegroundHover","purpleForegroundBright","brown","brownFill","brownFillHover","brownFillPressed","brownFillBright","brownForeground","brownForegroundHover","brownForegroundBright","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"];function aoe(e){const t={};for(const n of UD){const r=e[n],s=qc(n);t[s]=r}return t}function loe(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}const uoe={light:{text:{primary:100,secondary:84,tertiary:72,quaternary:52},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:12}},dark:{text:{primary:100,secondary:78,tertiary:60,quaternary:40},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:16,quaternary:8,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:28}}};function coe(e,t,n){const r=uoe[n];if(e==="bg")return r.bg[t];if(t==="quinary")throw new Error("mixOpacityPercent: quinary is a bg-only level");return r[e][t]}const HD={red:"red",orange:"orange",yellow:"yellow",green:"green",cyan:"cyan",blue:"blue",magenta:"magenta",purple:"violet"};function foe(e){return Object.keys(e)}const doe=foe(HD),poe=["added","modified","removed","untracked"],hoe=["danger","success","warning"],moe={danger:"danger",success:"success",warning:"warn"},Hx=["primary","secondary","tertiary","quaternary"];function fa(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _n(e,t,n,r){return{key:e,hue:t,role:n,level:r}}function goe(){return doe.flatMap(e=>{const t=fa(e);return[...Hx.flatMap(n=>{const r=fa(n);return[_n(`text${t}${r}`,e,"text",n),_n(`icon${t}${r}`,e,"icon",n),_n(`bg${t}${r}`,e,"bg",n),_n(`stroke${t}${r}`,e,"border",n)]}),_n(`bg${t}Quinary`,e,"bg","quinary")]})}function boe(){return poe.flatMap(e=>{const t=fa(e);return[...Hx.flatMap(n=>{const r=fa(n);return[_n(`textGit${t}${r}`,e,"text",n),_n(`iconGit${t}${r}`,e,"icon",n),_n(`bgGit${t}${r}`,e,"bg",n)]}),_n(`strokeGit${t}`,e,"border","primary"),_n(`strokeGit${t}Secondary`,e,"border","secondary")]})}function yoe(){return[...["secondary","tertiary","quaternary"].flatMap(t=>{const n=fa(t);return[_n(`textAccent${n}`,"accent","text",t),_n(`iconAccent${n}`,"accent","icon",t),_n(`bgAccent${n}`,"accent","bg",t),_n(`strokeAccent${n}`,"accent","border",t)]}),_n("bgAccentQuinary","accent","bg","quinary"),_n("strokeAccent","accent","border","primary")]}function voe(){return hoe.flatMap(e=>{const t=fa(e);return[...Hx.flatMap(n=>{const r=fa(n);return[_n(`text${t}${r}`,e,"text",n),_n(`icon${t}${r}`,e,"icon",n)]}),_n(`bg${t}Primary`,e,"bg","primary"),_n(`bg${t}Secondary`,e,"bg","secondary"),_n(`bg${t}Tertiary`,e,"bg","tertiary"),_n(`bg${t}Quaternary`,e,"bg","quaternary"),_n(`bg${t}Quinary`,e,"bg","quinary")]})}const qD=[...goe(),...boe(),...yoe(),...voe()];function xoe(e){switch(e){case"accent":return"accent";case"added":case"modified":case"removed":case"untracked":return"git";case"danger":case"success":case"warning":return"status";default:return"hue"}}const i_={all:{border:{primary:56,secondary:32,tertiary:20,quaternary:12}},hue:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:12,tertiary:8,quaternary:6,quinary:4}},git:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:24,tertiary:12,quaternary:8}},accent:{text:{secondary:78,tertiary:64,quaternary:40},icon:{secondary:70,tertiary:56,quaternary:32},bg:{secondary:24,tertiary:12,quaternary:8,quinary:4}},status:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8}}},koe={added:{border:{primary:92}},removed:{border:{primary:92}}};function Soe(e,t,n,r){return koe[e]?.[t]?.[n]??i_[xoe(e)][t]?.[n]??i_.all[t]?.[n]??coe(t,n,r)}function woe(e,t){switch(e){case"text":return"Foreground";case"icon":return"ForegroundBright";case"border":return"Fill";case"bg":return t==="primary"?"Fill":"FillBright"}}function Eoe(e){return Object.hasOwn(HD,e)}function Toe(e,t,n){const r=woe(t,n);return e==="danger"||e==="success"||e==="warning"?`${moe[e]}${r}`:Eoe(e)?`${e}${r}`:r==="ForegroundBright"?`${e}ForegroundBright`:e}function Coe(e,t,n,r){const s=Soe(e,t,n,r),a=Toe(e,t,n);return s>=100?{op:"ref",ref:a}:{op:"mixTransparent",ref:a,percent:s}}function Roe(e){return e==="dark"||e==="darkHighContrast"?"dark":"light"}function _oe(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Uv(e){const t=Roe(e);return Object.fromEntries(qD.map(n=>[n.key,Coe(n.hue,n.role,n.level,t)]))}function Aoe(e){return Uv(e)}function _y(e){const t=Uv("light"),n=Uv(e);return Object.fromEntries(qD.flatMap(r=>{const s=n[r.key];return s===void 0||_oe(t[r.key]??s,s)?[]:[[r.key,s]]}))}new Set(UD);const Noe=Aoe("light"),Ooe={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"},textOnPrimary:{op:"ref",ref:"onPrimary"},textOnPrimarySecondary:{op:"mixTransparent",ref:"onPrimary",percent:74},...Noe,textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},bgLinkHover:{op:"ref",ref:"bgBlueSecondary"},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},iconAccentPrimary:{op:"ref",ref:"accentForegroundBright"},iconOnPrimary:{op:"ref",ref:"onPrimary"},iconOnPrimarySecondary:{op:"mixTransparent",ref:"onPrimary",percent:66},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"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},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},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"}]},buttonDangerBackground:{op:"ref",ref:"bgDangerPrimary"},buttonDangerForeground:{op:"ref",ref:"textInvert"},buttonDangerHoverBackground:{op:"mixBlackRef",ref:"dangerFill",colorPercent:85},buttonDangerActiveBackground:{op:"ref",ref:"buttonDangerHoverBackground"},buttonDangerSoftBackground:{op:"ref",ref:"bgDangerQuaternary"},buttonDangerSoftHoverBackground:{op:"ref",ref:"bgDangerTertiary"},controlDisabledBackground:{op:"ref",ref:"bgQuinary"},controlDisabledBorder:{op:"ref",ref:"strokeTertiary"},controlDisabledForeground:{op:"ref",ref:"textQuaternary"},buttonPrimaryBackground:{op:"ref",ref:"bgAccent"},buttonPrimaryForeground:{op:"ref",ref:"textOnPrimary"},buttonPrimaryHoverBackground:{op:"ref",ref:"bgAccentHover"},buttonPrimaryActiveBackground:{op:"ref",ref:"buttonPrimaryHoverBackground"},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},buttonSuccessBackground:{op:"ref",ref:"bgSuccessPrimary"},buttonSuccessForeground:{op:"ref",ref:"textInvert"},buttonSuccessHoverBackground:{op:"mixWhiteRef",ref:"successFill",colorPercent:85},buttonSuccessActiveBackground:{op:"ref",ref:"buttonSuccessHoverBackground"},buttonSuccessSoftBackground:{op:"ref",ref:"bgSuccessQuaternary"},buttonSuccessSoftHoverBackground:{op:"ref",ref:"bgSuccessTertiary"},buttonWarningBackground:{op:"ref",ref:"bgWarningPrimary"},buttonWarningForeground:{op:"ref",ref:"textInvert"},buttonWarningHoverBackground:{op:"mixTwoOklab",k1:"base",p1:10,k2:"warnFill"},buttonWarningActiveBackground:{op:"ref",ref:"buttonWarningHoverBackground"},buttonWarningSoftBackground:{op:"ref",ref:"bgWarningQuaternary"},buttonWarningSoftHoverBackground:{op:"ref",ref:"bgWarningTertiary"},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},bgSearchMatch:{op:"mixTransparentOverlay",ref:"yellow",percent:22},bgSearchMatchCurrent:{op:"mixTransparentOverlay",ref:"yellow",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},s_={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:"redForeground",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellowForeground",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"greenForeground",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magentaForeground",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purpleForeground",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyanForeground",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blueForeground",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orangeForeground",percent:88},textAccentSecondary:{op:"mixTransparent",ref:"accent",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"addedForegroundBright",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"addedForegroundBright",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"addedForegroundBright",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modifiedForegroundBright",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modifiedForegroundBright",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modifiedForegroundBright",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removedForegroundBright",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removedForegroundBright",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removedForegroundBright",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untrackedForegroundBright",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untrackedForegroundBright",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untrackedForegroundBright",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"redForegroundBright",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellowForegroundBright",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"greenForegroundBright",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magentaForegroundBright",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purpleForegroundBright",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyanForegroundBright",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blueForegroundBright",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orangeForegroundBright",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accentForegroundBright",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:"yellowFillBright",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"redFillBright",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"greenFillBright",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magentaFillBright",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyanFillBright",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blueFillBright",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},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:56},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},strokeAccentSecondary:{op:"mixTransparent",ref:"accent",percent:56},strokeRedPrimary:{op:"mixTransparent",ref:"redFill",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"redFill",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellowFill",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellowFill",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"greenFill",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"greenFill",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magentaFill",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magentaFill",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyanFill",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyanFill",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blueFill",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blueFill",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36},textRedTertiary:{op:"mixTransparent",ref:"redForeground",percent:76},textOrangeTertiary:{op:"mixTransparent",ref:"orangeForeground",percent:76},textYellowTertiary:{op:"mixTransparent",ref:"yellowForeground",percent:76},textGreenTertiary:{op:"mixTransparent",ref:"greenForeground",percent:76},textCyanTertiary:{op:"mixTransparent",ref:"cyanForeground",percent:76},textBlueTertiary:{op:"mixTransparent",ref:"blueForeground",percent:76},textMagentaTertiary:{op:"mixTransparent",ref:"magentaForeground",percent:76},textPurpleTertiary:{op:"mixTransparent",ref:"purpleForeground",percent:76},textAccentTertiary:{op:"mixTransparent",ref:"accent",percent:76},textRedQuaternary:{op:"mixTransparent",ref:"redForeground",percent:64},textOrangeQuaternary:{op:"mixTransparent",ref:"orangeForeground",percent:64},textYellowQuaternary:{op:"mixTransparent",ref:"yellowForeground",percent:64},textGreenQuaternary:{op:"mixTransparent",ref:"greenForeground",percent:64},textCyanQuaternary:{op:"mixTransparent",ref:"cyanForeground",percent:64},textBlueQuaternary:{op:"mixTransparent",ref:"blueForeground",percent:64},textMagentaQuaternary:{op:"mixTransparent",ref:"magentaForeground",percent:64},textPurpleQuaternary:{op:"mixTransparent",ref:"purpleForeground",percent:64},textAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:64},iconRedTertiary:{op:"mixTransparent",ref:"redForegroundBright",percent:68},iconOrangeTertiary:{op:"mixTransparent",ref:"orangeForegroundBright",percent:68},iconYellowTertiary:{op:"mixTransparent",ref:"yellowForegroundBright",percent:68},iconGreenTertiary:{op:"mixTransparent",ref:"greenForegroundBright",percent:68},iconCyanTertiary:{op:"mixTransparent",ref:"cyanForegroundBright",percent:68},iconBlueTertiary:{op:"mixTransparent",ref:"blueForegroundBright",percent:68},iconMagentaTertiary:{op:"mixTransparent",ref:"magentaForegroundBright",percent:68},iconPurpleTertiary:{op:"mixTransparent",ref:"purpleForegroundBright",percent:68},iconAccentTertiary:{op:"mixTransparent",ref:"accentForegroundBright",percent:68},iconRedQuaternary:{op:"mixTransparent",ref:"redForegroundBright",percent:56},iconOrangeQuaternary:{op:"mixTransparent",ref:"orangeForegroundBright",percent:56},iconYellowQuaternary:{op:"mixTransparent",ref:"yellowForegroundBright",percent:56},iconGreenQuaternary:{op:"mixTransparent",ref:"greenForegroundBright",percent:56},iconCyanQuaternary:{op:"mixTransparent",ref:"cyanForegroundBright",percent:56},iconBlueQuaternary:{op:"mixTransparent",ref:"blueForegroundBright",percent:56},iconMagentaQuaternary:{op:"mixTransparent",ref:"magentaForegroundBright",percent:56},iconPurpleQuaternary:{op:"mixTransparent",ref:"purpleForegroundBright",percent:56},iconAccentQuaternary:{op:"mixTransparent",ref:"accentForegroundBright",percent:56},strokePurplePrimary:{op:"mixTransparent",ref:"purpleFill",percent:80},strokePurpleSecondary:{op:"mixTransparent",ref:"purpleFill",percent:56},strokeRedTertiary:{op:"mixTransparent",ref:"redFill",percent:40},strokeOrangeTertiary:{op:"mixTransparent",ref:"orangeFill",percent:40},strokeYellowTertiary:{op:"mixTransparent",ref:"yellowFill",percent:40},strokeGreenTertiary:{op:"mixTransparent",ref:"greenFill",percent:40},strokeCyanTertiary:{op:"mixTransparent",ref:"cyanFill",percent:40},strokeBlueTertiary:{op:"mixTransparent",ref:"blueFill",percent:40},strokeMagentaTertiary:{op:"mixTransparent",ref:"magentaFill",percent:40},strokePurpleTertiary:{op:"mixTransparent",ref:"purpleFill",percent:40},strokeAccentTertiary:{op:"mixTransparent",ref:"accent",percent:40},strokeRedQuaternary:{op:"mixTransparent",ref:"redFill",percent:28},strokeOrangeQuaternary:{op:"mixTransparent",ref:"orangeFill",percent:28},strokeYellowQuaternary:{op:"mixTransparent",ref:"yellowFill",percent:28},strokeGreenQuaternary:{op:"mixTransparent",ref:"greenFill",percent:28},strokeCyanQuaternary:{op:"mixTransparent",ref:"cyanFill",percent:28},strokeBlueQuaternary:{op:"mixTransparent",ref:"blueFill",percent:28},strokeMagentaQuaternary:{op:"mixTransparent",ref:"magentaFill",percent:28},strokePurpleQuaternary:{op:"mixTransparent",ref:"purpleFill",percent:28},strokeAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:28}},Ioe={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:{..._y("dark")},lightHighContrast:{..._y("lightHighContrast"),...s_},darkHighContrast:{..._y("darkHighContrast"),...s_}};function Zr(e){return`var(--cursor-${qc(e)})`}function Moe(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} ${Zr(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${Zr("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function Doe(e){return e.map(t=>Moe(t)).join(", ")}function Loe(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${Zr(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${Zr(e.k1)} ${e.p1}%, ${Zr(e.k2)})`;case"mixTwoOklab":return`color-mix(in oklab, ${Zr(e.k1)} ${e.p1}%, ${Zr(e.k2)})`;case"mixWhiteRef":return`color-mix(in srgb, ${Zr(e.ref)} ${e.colorPercent}%, white)`;case"mixBlackRef":return`color-mix(in srgb, ${Zr(e.ref)} ${e.colorPercent}%, black)`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${Zr("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, ${Zr(e.ref)} ${e.fadePercent}%, transparent)`:Zr(e.ref);case"shadow":return Doe(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${Zr(e.key)} ${e.percent}%, transparent)`;default:return e}}function joe(e){const t=Ioe[e];return Object.entries(Ooe).map(([n,r])=>({name:qc(n),expr:t[n]??r}))}function zoe(e){const t=joe(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${Loe(s)};`);return n}function Poe(e){const t=aoe(e),n=ioe(t," "),r=loe(e),s=zoe(r).join(`
|
|
63
|
+
`);return`:root {
|
|
64
|
+
${n.join(`
|
|
65
|
+
`)}
|
|
66
|
+
}
|
|
67
|
+
:root {
|
|
68
|
+
${s}
|
|
69
|
+
}`}const Hv={fontFamily:Kb.fontFamily,scrollbar:Kb.scrollbar,syntax:Kb.syntax},$oe=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function Foe(e,t){const n=qc(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(` ${Foe(e,s)}: ${l};`)}}function Boe(e={}){const t=e.selector??":root",n=e.theme??Hv,r=[`${t} {`];for(const{key:s,cssMid:a}of $oe)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${qc(l)}: ${c};`);return gs("duration",tv,r,"ms"),gs("easing",OO,r),gs("spacing",z9,r,"px"),gs("radius",P9,r,"px"),gs("height",$9,r,"px"),gs("font-size",F9,r,"px"),gs("line-height",B9,r,"px"),gs("letter-spacing",U9,r,"px"),gs("elevation",j9,r),r.push("}"),r.join(`
|
|
70
|
+
`)}function Uoe(e){const t=Poe(e.core),n=Boe(e.nonColor);return`${t}
|
|
71
|
+
${n}`}function Hoe(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 qoe(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 Voe(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function Goe(e){return qoe(e.platform,Hoe(e.locale))}function Woe(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 o_="agent-serve-cursor-theme",VD="agent-serve.playground.theme";function GD(){try{return localStorage.getItem(VD)}catch{return null}}function Koe(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Yoe(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:GD();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Koe())?"dark":"light"}function qv(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Voe(navigator.userAgent,navigator.platform),r=Uoe({core:e==="light"?ooe:soe,nonColor:{theme:{...Hv,fontFamily:{...Hv.fontFamily,sans:Goe({platform:n,locale:navigator.language}),mono:Woe(n)}}}});let s=document.getElementById(o_);s==null&&(s=document.createElement("style"),s.id=o_,document.head.appendChild(s)),s.textContent=r}function Xoe(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function Zoe(e){try{localStorage.setItem(VD,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}qv(e)}function Qoe(e=window.location.search){if(qv(Yoe(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=GD();s==="light"||s==="dark"||qv(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Joe(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function eae(){return v.useSyncExternalStore(Joe,Xoe,()=>"dark")}function a_({title:e="Playground",onNewChat:t}){const n=eae(),r=Be(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(br,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>Zoe(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(hn,{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(Oq,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>Ke.setChatPanelOpen(s)})})]})]})}function tae(){const e=Be(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const nae=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,rae=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function iae(e){const t=oae(e.externalUrl),n=l_(e.prUrl)??l_(e.externalUrl)??sae(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function sae(e){const n=e.match(rae)??e.match(nae);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function oae(e){if(!(e===null||e===""||!lae(e)||hM(e)))return aae(e)?e:void 0}function l_(e){if(!(e==null||e===""))return hM(e)?e:void 0}function aae(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function lae(e){return e.startsWith("https://")||e.startsWith("http://")}const uae=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}],WD="(max-width: 640px)";function cae(e){const t=window.matchMedia(WD);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function fae(){return v.useSyncExternalStore(cae,()=>window.matchMedia(WD).matches)}function dae(){const e=Be(_=>_.barTitle),t=Be(_=>_.barId),n=Be(_=>_.externalUrl),r=Be(_=>_.current),s=Be(_=>_.view),a=Be(_=>_.authToken),l=Be(_=>_.aliasHosted),c=Be(_=>_.embedded),f=Be(_=>_.evalNavReturn),d=Be(_=>_.evalRun),h=Be(_=>_.info),m=fae(),b=vD(uae,h,s),y=r?.sessionId??null,S=f&&s!=="evals"&&d!==null,k=iae({title:e,externalUrl:n,prUrl:r?.prUrl}),T=k.slack,C=k.github,E=async()=>{if(y)try{const _=await Ke.api.eventsText(y);if(!_.ok){Ke.toast(`Download failed (${_.status})`);return}const D=await _.blob(),A=URL.createObjectURL(D),N=document.createElement("a");N.href=A,N.download=`${y}.events.ndjson`,N.target="_self",document.body.appendChild(N),N.click(),N.remove(),URL.revokeObjectURL(A)}catch(_){Ke.toast(`Download failed: ${_ instanceof Error?_.message:String(_)}`)}},R=m?g.jsx(Tq,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:_=>Ke.setView(_??"overview"),options:b}):g.jsx(fc,{size:"sm",variant:"compact",value:s,onValueChange:_=>Ke.setView(_),"aria-label":"Visualization mode",children:b.map(_=>g.jsx(fc.Item,{value:_.value,children:_.label},_.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(br,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>Ke.backToOverview()}),S?g.jsx(hn,{variant:"secondary",size:"sm",onClick:()=>Ke.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:[T!==void 0?g.jsx(ua,{className:"tlink",href:T,title:"Open the Slack thread",children:"Open in Slack"}):null,C!==void 0?g.jsx(ua,{className:"tlink",href:C,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(hn,{variant:"ghost",size:"sm",onClick:()=>{E()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),R,c&&(y!==null||T!==void 0||C!==void 0)?g.jsxs(Jr,{children:[g.jsx(Jr.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(Jr.Content,{"aria-label":"Session actions",size:"sm",children:[T!==void 0?g.jsx(Jr.Item,{onSelect:()=>window.open(T,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,C!==void 0?g.jsx(Jr.Item,{onSelect:()=>window.open(C,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(Jr.Item,{onSelect:()=>{E()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(Xc,{type:"password",size:"md","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:_=>Ke.setAuthToken(_.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const KD="(min-width: 1201px)";function pae(e){const t=window.matchMedia(KD);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function hae(){return window.matchMedia(KD).matches}function mae(){return!0}function gae(){return v.useSyncExternalStore(pae,hae,mae)}function bae(){const e=Be(h=>h.view),t=Be(h=>h.drawerOpen),n=Be(h=>h.aliasHosted),r=Be(h=>h.aliasToken),s=Be(h=>h.embedded),a=Be(h=>h.meta.readonly===!0),c=Be(h=>h.capabilities.composer)==="enabled"&&Ke.hasCapability(mt.sessionStart),f=gae();if(v.useEffect(()=>{Ke.boot()},[]),n&&r.trim()==="")return s?g.jsx(TK,{}):g.jsx(EK,{});const d=f||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:d?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(a_,{onNewChat:a||!c?void 0:()=>Ke.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(e_,{})})]}),g.jsx(qse,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(a_,{onNewChat:a||!c?void 0:()=>Ke.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(e_,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(dae,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(mD,{}),g.jsx(OM,{})]}):null,e==="trace"?g.jsx(BM,{}):null,e==="raw"?g.jsx(PM,{}):null,e==="evals"?g.jsx(LM,{}):null,e==="artifacts"?g.jsx(NM,{}):null]})]}):g.jsx(Die,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>Ke.setDrawerOpen(!1)}):null,g.jsx(Fie,{}),g.jsx(tae,{})]})}Qoe();_K();const YD=document.getElementById("root");if(YD===null)throw new Error("Playground bootstrap failed: #root element is missing.");lz.createRoot(YD).render(g.jsx(v.StrictMode,{children:g.jsx(Ms,{menuSize:"md",children:g.jsx(bae,{})})}));
|