syntaur 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +3 -1
- package/README.md +21 -0
- package/dashboard/dist/assets/{_basePickBy-XOV2F7dX.js → _basePickBy-qEDLAY_J.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-Dccfk3fK.js → _baseUniq-7tDs18Gn.js} +1 -1
- package/dashboard/dist/assets/{arc-TwJ5RF-H.js → arc-Brdw0dYW.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-CpkVJudw.js → architectureDiagram-2XIMDMQ5-BiEdLT9m.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-Ck6VQ4Fh.js → blockDiagram-WCTKOSBZ-HC-j_hPZ.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-B5V7YG03.js → c4Diagram-IC4MRINW-DA_rWbl7.js} +1 -1
- package/dashboard/dist/assets/channel-D2-caOn6.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-rBdyOxAe.js → chunk-4BX2VUAB-CF3hguyj.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-DKlNXjYt.js → chunk-55IACEB6-BTeCeIc_.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-Cqm0PtUI.js → chunk-FMBD7UC4-8qVvxmks.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-CQyXQcG3.js → chunk-JSJVCQXG-DCf8n7EO.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-DmqjHPpJ.js → chunk-KX2RTZJC-CcpjTmME.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-CHXoBcYa.js → chunk-NQ4KR5QH-BnFPKo4-.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-Dd4sChBS.js → chunk-QZHKN3VN-IPMVLLv2.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-D-QLnkY8.js → chunk-WL4C6EOR-D1pQmHqX.js} +1 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-HFOb_XEt.js +1 -0
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-HFOb_XEt.js +1 -0
- package/dashboard/dist/assets/clone-BrYOwgIq.js +1 -0
- package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-VZi6uV56.js → cose-bilkent-S5V4N54A-tvJjvBQr.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-CtT97Qhx.js → dagre-KLK3FWXG-qp1vt6LY.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-BjYTNNHb.js → diagram-E7M64L7V-VF5eizNr.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2-qj8_r6fb.js → diagram-IFDJBPK2-C3pCbJ1e.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-DlfWo7Vt.js → diagram-P4PSJMXO-D-taXZwH.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-Ch_nApTv.js → erDiagram-INFDFZHY-QjY-NHVs.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-EOVsqNyi.js → flowDiagram-PKNHOUZH-FjO8P5Tq.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-CS-lx0B-.js → ganttDiagram-A5KZAMGK-Bsn7CyK3.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-Ba6RDzPy.js → gitGraphDiagram-K3NZZRJ6-BZ8DjhnF.js} +1 -1
- package/dashboard/dist/assets/{graph-BKaAyLk-.js → graph-AdliIYqX.js} +1 -1
- package/dashboard/dist/assets/{index-BTWPZaIA.css → index-BoR_oyUZ.css} +1 -1
- package/dashboard/dist/assets/index-RCBI4aX2.js +525 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-Cr20xEsd.js → infoDiagram-LFFYTUFH-BfZjLA86.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-CuILV9ph.js → ishikawaDiagram-PHBUUO56-BSgSGMp5.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-CO-l7Mpm.js → journeyDiagram-4ABVD52K-BlQ7qeMC.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-CcirPw_S.js → kanban-definition-K7BYSVSG-CifO0AUu.js} +1 -1
- package/dashboard/dist/assets/{layout-BXvr8dMw.js → layout-B9r-gpD9.js} +1 -1
- package/dashboard/dist/assets/{linear-B85hgYnX.js → linear-CaaIRxVZ.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-DcZN9Xp2.js → mermaid.core-C8wCWYw-.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-Bxi6p5_3.js → mindmap-definition-YRQLILUH-BpX5T7iT.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-DOSvU0UD.js → pieDiagram-SKSYHLDU-BNGYtWrc.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-Cmo-5tW9.js → quadrantDiagram-337W2JSQ-CR4GeM9D.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-Dw8alwuI.js → requirementDiagram-Z7DCOOCP-CXrPkMLl.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-ZPB-rzOg.js → sankeyDiagram-WA2Y5GQK-CIzof7Dm.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-Ct8bkK2h.js → sequenceDiagram-2WXFIKYE-BJZLt0O2.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-DnGOXlmx.js → stateDiagram-RAJIS63D-x9gC6zy6.js} +1 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-CN5Dcv7u.js +1 -0
- package/dashboard/dist/assets/{timeline-definition-YZTLITO2-AUFmbJjr.js → timeline-definition-YZTLITO2-D_ZSQn1K.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-Dw5FDFAV.js → treemap-KZPCXAKY-LPpMEco4.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-DfxicU4N.js → vennDiagram-LZ73GAT5-CRFZQpr7.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW--9N0V1r_.js → xychartDiagram-JWTSCODW-Bivutynw.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/dashboard/server.js +355 -81
- package/dist/dashboard/server.js.map +1 -1
- package/dist/db/leases-db.d.ts +178 -0
- package/dist/db/leases-db.js +557 -0
- package/dist/db/leases-db.js.map +1 -0
- package/dist/index.js +1219 -357
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/claude-code/.claude-plugin/plugin.json +3 -1
- package/platforms/claude-code/skills/claim-resource/SKILL.md +89 -0
- package/platforms/claude-code/skills/release-resource/SKILL.md +65 -0
- package/platforms/claude-code/skills/syntaur-protocol/SKILL.md +1 -0
- package/platforms/codex/skills/claim-resource/SKILL.md +89 -0
- package/platforms/codex/skills/release-resource/SKILL.md +65 -0
- package/platforms/codex/skills/syntaur-protocol/SKILL.md +1 -0
- package/skills/claim-resource/SKILL.md +89 -0
- package/skills/release-resource/SKILL.md +65 -0
- package/skills/syntaur-protocol/SKILL.md +1 -0
- package/dashboard/dist/assets/channel-AEMTX70R.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-LzuOAGzu.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-LzuOAGzu.js +0 -1
- package/dashboard/dist/assets/clone-Cw63QGUJ.js +0 -1
- package/dashboard/dist/assets/index-Dk9PBm5B.js +0 -510
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-COGzlZxn.js +0 -1
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
function jS(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(s,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>s[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(a){if(a.ep)return;a.ep=!0;const l=n(a);fetch(a.href,l)}})();function Dc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function q5(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof 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(s){var a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,a.get?a:{enumerable:!0,get:function(){return e[s]}})}),n}var qd={exports:{}},Vi={},Kd={exports:{}},Ke={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Cx;function kS(){if(Cx)return Ke;Cx=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=x&&M[x]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function j(M,Q,I){this.props=M,this.context=Q,this.refs=k,this.updater=I||b}j.prototype.isReactComponent={},j.prototype.setState=function(M,Q){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Q,"setState")},j.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=j.prototype;function T(M,Q,I){this.props=M,this.context=Q,this.refs=k,this.updater=I||b}var N=T.prototype=new S;N.constructor=T,C(N,j.prototype),N.isPureReactComponent=!0;var A=Array.isArray,L=Object.prototype.hasOwnProperty,R={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function O(M,Q,I){var ge,Ne={},te=null,fe=null;if(Q!=null)for(ge in Q.ref!==void 0&&(fe=Q.ref),Q.key!==void 0&&(te=""+Q.key),Q)L.call(Q,ge)&&!D.hasOwnProperty(ge)&&(Ne[ge]=Q[ge]);var be=arguments.length-2;if(be===1)Ne.children=I;else if(1<be){for(var ke=Array(be),we=0;we<be;we++)ke[we]=arguments[we+2];Ne.children=ke}if(M&&M.defaultProps)for(ge in be=M.defaultProps,be)Ne[ge]===void 0&&(Ne[ge]=be[ge]);return{$$typeof:e,type:M,key:te,ref:fe,props:Ne,_owner:R.current}}function G(M,Q){return{$$typeof:e,type:M.type,key:Q,ref:M.ref,props:M.props,_owner:M._owner}}function re(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function z(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return Q[I]})}var K=/\/+/g;function q(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?z(""+M.key):Q.toString(36)}function J(M,Q,I,ge,Ne){var te=typeof M;(te==="undefined"||te==="boolean")&&(M=null);var fe=!1;if(M===null)fe=!0;else switch(te){case"string":case"number":fe=!0;break;case"object":switch(M.$$typeof){case e:case t:fe=!0}}if(fe)return fe=M,Ne=Ne(fe),M=ge===""?"."+q(fe,0):ge,A(Ne)?(I="",M!=null&&(I=M.replace(K,"$&/")+"/"),J(Ne,Q,I,"",function(we){return we})):Ne!=null&&(re(Ne)&&(Ne=G(Ne,I+(!Ne.key||fe&&fe.key===Ne.key?"":(""+Ne.key).replace(K,"$&/")+"/")+M)),Q.push(Ne)),1;if(fe=0,ge=ge===""?".":ge+":",A(M))for(var be=0;be<M.length;be++){te=M[be];var ke=ge+q(te,be);fe+=J(te,Q,I,ke,Ne)}else if(ke=y(M),typeof ke=="function")for(M=ke.call(M),be=0;!(te=M.next()).done;)te=te.value,ke=ge+q(te,be++),fe+=J(te,Q,I,ke,Ne);else if(te==="object")throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return fe}function _(M,Q,I){if(M==null)return M;var ge=[],Ne=0;return J(M,ge,"","",function(te){return Q.call(I,te,Ne++)}),ge}function F(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(I){(M._status===0||M._status===-1)&&(M._status=1,M._result=I)},function(I){(M._status===0||M._status===-1)&&(M._status=2,M._result=I)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var B={current:null},U={transition:null},Z={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:U,ReactCurrentOwner:R};function P(){throw Error("act(...) is not supported in production builds of React.")}return Ke.Children={map:_,forEach:function(M,Q,I){_(M,function(){Q.apply(this,arguments)},I)},count:function(M){var Q=0;return _(M,function(){Q++}),Q},toArray:function(M){return _(M,function(Q){return Q})||[]},only:function(M){if(!re(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},Ke.Component=j,Ke.Fragment=n,Ke.Profiler=a,Ke.PureComponent=T,Ke.StrictMode=s,Ke.Suspense=f,Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z,Ke.act=P,Ke.cloneElement=function(M,Q,I){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ge=C({},M.props),Ne=M.key,te=M.ref,fe=M._owner;if(Q!=null){if(Q.ref!==void 0&&(te=Q.ref,fe=R.current),Q.key!==void 0&&(Ne=""+Q.key),M.type&&M.type.defaultProps)var be=M.type.defaultProps;for(ke in Q)L.call(Q,ke)&&!D.hasOwnProperty(ke)&&(ge[ke]=Q[ke]===void 0&&be!==void 0?be[ke]:Q[ke])}var ke=arguments.length-2;if(ke===1)ge.children=I;else if(1<ke){be=Array(ke);for(var we=0;we<ke;we++)be[we]=arguments[we+2];ge.children=be}return{$$typeof:e,type:M.type,key:Ne,ref:te,props:ge,_owner:fe}},Ke.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:l,_context:M},M.Consumer=M},Ke.createElement=O,Ke.createFactory=function(M){var Q=O.bind(null,M);return Q.type=M,Q},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function(M){return{$$typeof:d,render:M}},Ke.isValidElement=re,Ke.lazy=function(M){return{$$typeof:h,_payload:{_status:-1,_result:M},_init:F}},Ke.memo=function(M,Q){return{$$typeof:m,type:M,compare:Q===void 0?null:Q}},Ke.startTransition=function(M){var Q=U.transition;U.transition={};try{M()}finally{U.transition=Q}},Ke.unstable_act=P,Ke.useCallback=function(M,Q){return B.current.useCallback(M,Q)},Ke.useContext=function(M){return B.current.useContext(M)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function(M){return B.current.useDeferredValue(M)},Ke.useEffect=function(M,Q){return B.current.useEffect(M,Q)},Ke.useId=function(){return B.current.useId()},Ke.useImperativeHandle=function(M,Q,I){return B.current.useImperativeHandle(M,Q,I)},Ke.useInsertionEffect=function(M,Q){return B.current.useInsertionEffect(M,Q)},Ke.useLayoutEffect=function(M,Q){return B.current.useLayoutEffect(M,Q)},Ke.useMemo=function(M,Q){return B.current.useMemo(M,Q)},Ke.useReducer=function(M,Q,I){return B.current.useReducer(M,Q,I)},Ke.useRef=function(M){return B.current.useRef(M)},Ke.useState=function(M){return B.current.useState(M)},Ke.useSyncExternalStore=function(M,Q,I){return B.current.useSyncExternalStore(M,Q,I)},Ke.useTransition=function(){return B.current.useTransition()},Ke.version="18.3.1",Ke}var Ex;function Cp(){return Ex||(Ex=1,Kd.exports=kS()),Kd.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Px;function SS(){if(Px)return Vi;Px=1;var e=Cp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,f,m){var h,x={},y=null,b=null;m!==void 0&&(y=""+m),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(b=f.ref);for(h in f)s.call(f,h)&&!l.hasOwnProperty(h)&&(x[h]=f[h]);if(d&&d.defaultProps)for(h in f=d.defaultProps,f)x[h]===void 0&&(x[h]=f[h]);return{$$typeof:t,type:d,key:y,ref:b,props:x,_owner:a.current}}return Vi.Fragment=n,Vi.jsx=c,Vi.jsxs=c,Vi}var Tx;function NS(){return Tx||(Tx=1,qd.exports=SS()),qd.exports}var o=NS(),g=Cp();const Pt=Dc(g),Xv=jS({__proto__:null,default:Pt},[g]);var Hl={},Gd={exports:{}},Cn={},Yd={exports:{}},Xd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Rx;function CS(){return Rx||(Rx=1,(function(e){function t(U,Z){var P=U.length;U.push(Z);e:for(;0<P;){var M=P-1>>>1,Q=U[M];if(0<a(Q,Z))U[M]=Z,U[P]=Q,P=M;else break e}}function n(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var Z=U[0],P=U.pop();if(P!==Z){U[0]=P;e:for(var M=0,Q=U.length,I=Q>>>1;M<I;){var ge=2*(M+1)-1,Ne=U[ge],te=ge+1,fe=U[te];if(0>a(Ne,P))te<Q&&0>a(fe,Ne)?(U[M]=fe,U[te]=P,M=te):(U[M]=Ne,U[ge]=P,M=ge);else if(te<Q&&0>a(fe,P))U[M]=fe,U[te]=P,M=te;else break e}}return Z}function a(U,Z){var P=U.sortIndex-Z.sortIndex;return P!==0?P:U.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],m=[],h=1,x=null,y=3,b=!1,C=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(U){for(var Z=n(m);Z!==null;){if(Z.callback===null)s(m);else if(Z.startTime<=U)s(m),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=n(m)}}function A(U){if(k=!1,N(U),!C)if(n(f)!==null)C=!0,F(L);else{var Z=n(m);Z!==null&&B(A,Z.startTime-U)}}function L(U,Z){C=!1,k&&(k=!1,S(O),O=-1),b=!0;var P=y;try{for(N(Z),x=n(f);x!==null&&(!(x.expirationTime>Z)||U&&!z());){var M=x.callback;if(typeof M=="function"){x.callback=null,y=x.priorityLevel;var Q=M(x.expirationTime<=Z);Z=e.unstable_now(),typeof Q=="function"?x.callback=Q:x===n(f)&&s(f),N(Z)}else s(f);x=n(f)}if(x!==null)var I=!0;else{var ge=n(m);ge!==null&&B(A,ge.startTime-Z),I=!1}return I}finally{x=null,y=P,b=!1}}var R=!1,D=null,O=-1,G=5,re=-1;function z(){return!(e.unstable_now()-re<G)}function K(){if(D!==null){var U=e.unstable_now();re=U;var Z=!0;try{Z=D(!0,U)}finally{Z?q():(R=!1,D=null)}}else R=!1}var q;if(typeof T=="function")q=function(){T(K)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,_=J.port2;J.port1.onmessage=K,q=function(){_.postMessage(null)}}else q=function(){j(K,0)};function F(U){D=U,R||(R=!0,q())}function B(U,Z){O=j(function(){U(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_continueExecution=function(){C||b||(C=!0,F(L))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(U){switch(y){case 1:case 2:case 3:var Z=3;break;default:Z=y}var P=y;y=Z;try{return U()}finally{y=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var P=y;y=U;try{return Z()}finally{y=P}},e.unstable_scheduleCallback=function(U,Z,P){var M=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?M+P:M):P=M,U){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=P+Q,U={id:h++,callback:Z,priorityLevel:U,startTime:P,expirationTime:Q,sortIndex:-1},P>M?(U.sortIndex=P,t(m,U),n(f)===null&&U===n(m)&&(k?(S(O),O=-1):k=!0,B(A,P-M))):(U.sortIndex=Q,t(f,U),C||b||(C=!0,F(L))),U},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(U){var Z=y;return function(){var P=y;y=Z;try{return U.apply(this,arguments)}finally{y=P}}}})(Xd)),Xd}var Ax;function ES(){return Ax||(Ax=1,Yd.exports=CS()),Yd.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Dx;function PS(){if(Dx)return Cn;Dx=1;var e=Cp(),t=ES();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(r,i){c(r,i),c(r+"Capture",i)}function c(r,i){for(a[r]=i,r=0;r<i.length;r++)s.add(i[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,m=/^[: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]*$/,h={},x={};function y(r){return f.call(x,r)?!0:f.call(h,r)?!1:m.test(r)?x[r]=!0:(h[r]=!0,!1)}function b(r,i,u,p){if(u!==null&&u.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return p?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function C(r,i,u,p){if(i===null||typeof i>"u"||b(r,i,u,p))return!0;if(p)return!1;if(u!==null)switch(u.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function k(r,i,u,p,v,w,E){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=p,this.attributeNamespace=v,this.mustUseProperty=u,this.propertyName=r,this.type=i,this.sanitizeURL=w,this.removeEmptyString=E}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new k(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];j[i]=new k(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new k(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new k(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){j[r]=new k(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new k(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new k(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new k(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new k(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function T(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(S,T);j[i]=new k(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(S,T);j[i]=new k(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(S,T);j[i]=new k(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new k(r,1,!1,r.toLowerCase(),null,!0,!0)});function N(r,i,u,p){var v=j.hasOwnProperty(i)?j[i]:null;(v!==null?v.type!==0:p||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(C(i,u,v,p)&&(u=null),p||v===null?y(i)&&(u===null?r.removeAttribute(i):r.setAttribute(i,""+u)):v.mustUseProperty?r[v.propertyName]=u===null?v.type===3?!1:"":u:(i=v.attributeName,p=v.attributeNamespace,u===null?r.removeAttribute(i):(v=v.type,u=v===3||v===4&&u===!0?"":""+u,p?r.setAttributeNS(p,i,u):r.setAttribute(i,u))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),R=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),re=Symbol.for("react.provider"),z=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),U=Symbol.iterator;function Z(r){return r===null||typeof r!="object"?null:(r=U&&r[U]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,M;function Q(r){if(M===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);M=i&&i[1]||""}return`
|
|
34
|
+
`+M+r}var I=!1;function ge(r,i){if(!r||I)return"";I=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(se){var p=se}Reflect.construct(r,[],i)}else{try{i.call()}catch(se){p=se}r.call(i.prototype)}else{try{throw Error()}catch(se){p=se}r()}}catch(se){if(se&&p&&typeof se.stack=="string"){for(var v=se.stack.split(`
|
|
35
|
+
`),w=p.stack.split(`
|
|
36
|
+
`),E=v.length-1,$=w.length-1;1<=E&&0<=$&&v[E]!==w[$];)$--;for(;1<=E&&0<=$;E--,$--)if(v[E]!==w[$]){if(E!==1||$!==1)do if(E--,$--,0>$||v[E]!==w[$]){var H=`
|
|
37
|
+
`+v[E].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=E&&0<=$);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function Ne(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function te(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case D:return"Fragment";case R:return"Portal";case G:return"Profiler";case O:return"StrictMode";case q:return"Suspense";case J:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case z:return(r.displayName||"Context")+".Consumer";case re:return(r._context.displayName||"Context")+".Provider";case K:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case _:return i=r.displayName||null,i!==null?i:te(r.type)||"Memo";case F:i=r._payload,r=r._init;try{return te(r(i))}catch{}}return null}function fe(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(i);case 8:return i===O?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function be(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ke(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function we(r){var i=ke(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),p=""+r[i];if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var v=u.get,w=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return v.call(this)},set:function(E){p=""+E,w.call(this,E)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return p},setValue:function(E){p=""+E},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Ye(r){r._valueTracker||(r._valueTracker=we(r))}function Xe(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var u=i.getValue(),p="";return r&&(p=ke(r)?r.checked?"true":"false":r.value),r=p,r!==u?(i.setValue(r),!0):!1}function ne(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Y(r,i){var u=i.checked;return P({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ae(r,i){var u=i.defaultValue==null?"":i.defaultValue,p=i.checked!=null?i.checked:i.defaultChecked;u=be(i.value!=null?i.value:u),r._wrapperState={initialChecked:p,initialValue:u,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function xe(r,i){i=i.checked,i!=null&&N(r,"checked",i,!1)}function qe(r,i){xe(r,i);var u=be(i.value),p=i.type;if(u!=null)p==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(p==="submit"||p==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?Ue(r,i.type,u):i.hasOwnProperty("defaultValue")&&Ue(r,i.type,be(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function Oe(r,i,u){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var p=i.type;if(!(p!=="submit"&&p!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,u||i===r.value||(r.value=i),r.defaultValue=i}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Ue(r,i,u){(i!=="number"||ne(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Ge=Array.isArray;function Nt(r,i,u,p){if(r=r.options,i){i={};for(var v=0;v<u.length;v++)i["$"+u[v]]=!0;for(u=0;u<r.length;u++)v=i.hasOwnProperty("$"+r[u].value),r[u].selected!==v&&(r[u].selected=v),v&&p&&(r[u].defaultSelected=!0)}else{for(u=""+be(u),i=null,v=0;v<r.length;v++){if(r[v].value===u){r[v].selected=!0,p&&(r[v].defaultSelected=!0);return}i!==null||r[v].disabled||(i=r[v])}i!==null&&(i.selected=!0)}}function Ct(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function It(r,i){var u=i.value;if(u==null){if(u=i.children,i=i.defaultValue,u!=null){if(i!=null)throw Error(n(92));if(Ge(u)){if(1<u.length)throw Error(n(93));u=u[0]}i=u}i==null&&(i=""),u=i}r._wrapperState={initialValue:be(u)}}function en(r,i){var u=be(i.value),p=be(i.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),i.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),p!=null&&(r.defaultValue=""+p)}function Tt(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function ie(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?ie(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var ve,oe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,u,p,v){MSApp.execUnsafeLocalFunction(function(){return r(i,u,p,v)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(ve=ve||document.createElement("div"),ve.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=ve.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Ce(r,i){if(i){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=i;return}}r.textContent=i}var Ae={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qt=["Webkit","ms","Moz","O"];Object.keys(Ae).forEach(function(r){qt.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Ae[i]=Ae[r]})});function an(r,i,u){return i==null||typeof i=="boolean"||i===""?"":u||typeof i!="number"||i===0||Ae.hasOwnProperty(r)&&Ae[r]?(""+i).trim():i+"px"}function tn(r,i){r=r.style;for(var u in i)if(i.hasOwnProperty(u)){var p=u.indexOf("--")===0,v=an(u,i[u],p);u==="float"&&(u="cssFloat"),p?r.setProperty(u,v):r[u]=v}}var V=P({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pe(r,i){if(i){if(V[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function Ee(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){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 ze=null;function Wn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ln=null,vt=null,Ve=null;function it(r){if(r=Ri(r)){if(typeof ln!="function")throw Error(n(280));var i=r.stateNode;i&&(i=sl(i),ln(r.stateNode,r.type,i))}}function Rt(r){vt?Ve?Ve.push(r):Ve=[r]:vt=r}function Kt(){if(vt){var r=vt,i=Ve;if(Ve=vt=null,it(r),i)for(r=0;r<i.length;r++)it(i[r])}}function nn(r,i){return r(i)}function cn(){}var bn=!1;function $r(r,i,u){if(bn)return r(i,u);bn=!0;try{return nn(r,i,u)}finally{bn=!1,(vt!==null||Ve!==null)&&(cn(),Kt())}}function bt(r,i){var u=r.stateNode;if(u===null)return null;var p=sl(u);if(p===null)return null;u=p[i];e:switch(i){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)||(r=r.type,p=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!p;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var Vn=!1;if(d)try{var un={};Object.defineProperty(un,"passive",{get:function(){Vn=!0}}),window.addEventListener("test",un,un),window.removeEventListener("test",un,un)}catch{Vn=!1}function nr(r,i,u,p,v,w,E,$,H){var se=Array.prototype.slice.call(arguments,3);try{i.apply(u,se)}catch(ue){this.onError(ue)}}var rr=!1,yr=null,Ln=!1,Fr=null,di={onError:function(r){rr=!0,yr=r}};function R1(r,i,u,p,v,w,E,$,H){rr=!1,yr=null,nr.apply(di,arguments)}function A1(r,i,u,p,v,w,E,$,H){if(R1.apply(this,arguments),rr){if(rr){var se=yr;rr=!1,yr=null}else throw Error(n(198));Ln||(Ln=!0,Fr=se)}}function Is(r){var i=r,u=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(u=i.return),r=i.return;while(r)}return i.tag===3?u:null}function Yh(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Xh(r){if(Is(r)!==r)throw Error(n(188))}function D1(r){var i=r.alternate;if(!i){if(i=Is(r),i===null)throw Error(n(188));return i!==r?null:r}for(var u=r,p=i;;){var v=u.return;if(v===null)break;var w=v.alternate;if(w===null){if(p=v.return,p!==null){u=p;continue}break}if(v.child===w.child){for(w=v.child;w;){if(w===u)return Xh(v),r;if(w===p)return Xh(v),i;w=w.sibling}throw Error(n(188))}if(u.return!==p.return)u=v,p=w;else{for(var E=!1,$=v.child;$;){if($===u){E=!0,u=v,p=w;break}if($===p){E=!0,p=v,u=w;break}$=$.sibling}if(!E){for($=w.child;$;){if($===u){E=!0,u=w,p=v;break}if($===p){E=!0,p=w,u=v;break}$=$.sibling}if(!E)throw Error(n(189))}}if(u.alternate!==p)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:i}function Qh(r){return r=D1(r),r!==null?Jh(r):null}function Jh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Jh(r);if(i!==null)return i;r=r.sibling}return null}var Zh=t.unstable_scheduleCallback,em=t.unstable_cancelCallback,I1=t.unstable_shouldYield,L1=t.unstable_requestPaint,At=t.unstable_now,O1=t.unstable_getCurrentPriorityLevel,fu=t.unstable_ImmediatePriority,tm=t.unstable_UserBlockingPriority,$a=t.unstable_NormalPriority,M1=t.unstable_LowPriority,nm=t.unstable_IdlePriority,Fa=null,vr=null;function _1(r){if(vr&&typeof vr.onCommitFiberRoot=="function")try{vr.onCommitFiberRoot(Fa,r,void 0,(r.current.flags&128)===128)}catch{}}var sr=Math.clz32?Math.clz32:z1,$1=Math.log,F1=Math.LN2;function z1(r){return r>>>=0,r===0?32:31-($1(r)/F1|0)|0}var za=64,Ba=4194304;function fi(r){switch(r&-r){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: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ua(r,i){var u=r.pendingLanes;if(u===0)return 0;var p=0,v=r.suspendedLanes,w=r.pingedLanes,E=u&268435455;if(E!==0){var $=E&~v;$!==0?p=fi($):(w&=E,w!==0&&(p=fi(w)))}else E=u&~v,E!==0?p=fi(E):w!==0&&(p=fi(w));if(p===0)return 0;if(i!==0&&i!==p&&(i&v)===0&&(v=p&-p,w=i&-i,v>=w||v===16&&(w&4194240)!==0))return i;if((p&4)!==0&&(p|=u&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=p;0<i;)u=31-sr(i),v=1<<u,p|=r[u],i&=~v;return p}function B1(r,i){switch(r){case 1:case 2:case 4:return i+250;case 8:case 16:case 32:case 64: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 i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U1(r,i){for(var u=r.suspendedLanes,p=r.pingedLanes,v=r.expirationTimes,w=r.pendingLanes;0<w;){var E=31-sr(w),$=1<<E,H=v[E];H===-1?(($&u)===0||($&p)!==0)&&(v[E]=B1($,i)):H<=i&&(r.expiredLanes|=$),w&=~$}}function pu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function rm(){var r=za;return za<<=1,(za&4194240)===0&&(za=64),r}function hu(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function pi(r,i,u){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-sr(i),r[i]=u}function H1(r,i){var u=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var p=r.eventTimes;for(r=r.expirationTimes;0<u;){var v=31-sr(u),w=1<<v;i[v]=0,p[v]=-1,r[v]=-1,u&=~w}}function mu(r,i){var u=r.entangledLanes|=i;for(r=r.entanglements;u;){var p=31-sr(u),v=1<<p;v&i|r[p]&i&&(r[p]|=i),u&=~v}}var st=0;function sm(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var om,gu,im,am,lm,xu=!1,Ha=[],ts=null,ns=null,rs=null,hi=new Map,mi=new Map,ss=[],W1="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 submit".split(" ");function cm(r,i){switch(r){case"focusin":case"focusout":ts=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":hi.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":mi.delete(i.pointerId)}}function gi(r,i,u,p,v,w){return r===null||r.nativeEvent!==w?(r={blockedOn:i,domEventName:u,eventSystemFlags:p,nativeEvent:w,targetContainers:[v]},i!==null&&(i=Ri(i),i!==null&&gu(i)),r):(r.eventSystemFlags|=p,i=r.targetContainers,v!==null&&i.indexOf(v)===-1&&i.push(v),r)}function V1(r,i,u,p,v){switch(i){case"focusin":return ts=gi(ts,r,i,u,p,v),!0;case"dragenter":return ns=gi(ns,r,i,u,p,v),!0;case"mouseover":return rs=gi(rs,r,i,u,p,v),!0;case"pointerover":var w=v.pointerId;return hi.set(w,gi(hi.get(w)||null,r,i,u,p,v)),!0;case"gotpointercapture":return w=v.pointerId,mi.set(w,gi(mi.get(w)||null,r,i,u,p,v)),!0}return!1}function um(r){var i=Ls(r.target);if(i!==null){var u=Is(i);if(u!==null){if(i=u.tag,i===13){if(i=Yh(u),i!==null){r.blockedOn=i,lm(r.priority,function(){im(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Wa(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=vu(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var p=new u.constructor(u.type,u);ze=p,u.target.dispatchEvent(p),ze=null}else return i=Ri(u),i!==null&&gu(i),r.blockedOn=u,!1;i.shift()}return!0}function dm(r,i,u){Wa(r)&&u.delete(i)}function q1(){xu=!1,ts!==null&&Wa(ts)&&(ts=null),ns!==null&&Wa(ns)&&(ns=null),rs!==null&&Wa(rs)&&(rs=null),hi.forEach(dm),mi.forEach(dm)}function xi(r,i){r.blockedOn===i&&(r.blockedOn=null,xu||(xu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,q1)))}function yi(r){function i(v){return xi(v,r)}if(0<Ha.length){xi(Ha[0],r);for(var u=1;u<Ha.length;u++){var p=Ha[u];p.blockedOn===r&&(p.blockedOn=null)}}for(ts!==null&&xi(ts,r),ns!==null&&xi(ns,r),rs!==null&&xi(rs,r),hi.forEach(i),mi.forEach(i),u=0;u<ss.length;u++)p=ss[u],p.blockedOn===r&&(p.blockedOn=null);for(;0<ss.length&&(u=ss[0],u.blockedOn===null);)um(u),u.blockedOn===null&&ss.shift()}var oo=A.ReactCurrentBatchConfig,Va=!0;function K1(r,i,u,p){var v=st,w=oo.transition;oo.transition=null;try{st=1,yu(r,i,u,p)}finally{st=v,oo.transition=w}}function G1(r,i,u,p){var v=st,w=oo.transition;oo.transition=null;try{st=4,yu(r,i,u,p)}finally{st=v,oo.transition=w}}function yu(r,i,u,p){if(Va){var v=vu(r,i,u,p);if(v===null)Mu(r,i,p,qa,u),cm(r,p);else if(V1(v,r,i,u,p))p.stopPropagation();else if(cm(r,p),i&4&&-1<W1.indexOf(r)){for(;v!==null;){var w=Ri(v);if(w!==null&&om(w),w=vu(r,i,u,p),w===null&&Mu(r,i,p,qa,u),w===v)break;v=w}v!==null&&p.stopPropagation()}else Mu(r,i,p,null,u)}}var qa=null;function vu(r,i,u,p){if(qa=null,r=Wn(p),r=Ls(r),r!==null)if(i=Is(r),i===null)r=null;else if(u=i.tag,u===13){if(r=Yh(i),r!==null)return r;r=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return qa=r,null}function fm(r){switch(r){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(O1()){case fu:return 1;case tm:return 4;case $a:case M1:return 16;case nm:return 536870912;default:return 16}default:return 16}}var os=null,bu=null,Ka=null;function pm(){if(Ka)return Ka;var r,i=bu,u=i.length,p,v="value"in os?os.value:os.textContent,w=v.length;for(r=0;r<u&&i[r]===v[r];r++);var E=u-r;for(p=1;p<=E&&i[u-p]===v[w-p];p++);return Ka=v.slice(r,1<p?1-p:void 0)}function Ga(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Ya(){return!0}function hm(){return!1}function On(r){function i(u,p,v,w,E){this._reactName=u,this._targetInst=v,this.type=p,this.nativeEvent=w,this.target=E,this.currentTarget=null;for(var $ in r)r.hasOwnProperty($)&&(u=r[$],this[$]=u?u(w):w[$]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Ya:hm,this.isPropagationStopped=hm,this}return P(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ya)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ya)},persist:function(){},isPersistent:Ya}),i}var io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wu=On(io),vi=P({},io,{view:0,detail:0}),Y1=On(vi),ju,ku,bi,Xa=P({},vi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nu,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==bi&&(bi&&r.type==="mousemove"?(ju=r.screenX-bi.screenX,ku=r.screenY-bi.screenY):ku=ju=0,bi=r),ju)},movementY:function(r){return"movementY"in r?r.movementY:ku}}),mm=On(Xa),X1=P({},Xa,{dataTransfer:0}),Q1=On(X1),J1=P({},vi,{relatedTarget:0}),Su=On(J1),Z1=P({},io,{animationName:0,elapsedTime:0,pseudoElement:0}),ek=On(Z1),tk=P({},io,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),nk=On(tk),rk=P({},io,{data:0}),gm=On(rk),sk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ok={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"},ik={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ak(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=ik[r])?!!i[r]:!1}function Nu(){return ak}var lk=P({},vi,{key:function(r){if(r.key){var i=sk[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Ga(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?ok[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nu,charCode:function(r){return r.type==="keypress"?Ga(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ga(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),ck=On(lk),uk=P({},Xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xm=On(uk),dk=P({},vi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nu}),fk=On(dk),pk=P({},io,{propertyName:0,elapsedTime:0,pseudoElement:0}),hk=On(pk),mk=P({},Xa,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),gk=On(mk),xk=[9,13,27,32],Cu=d&&"CompositionEvent"in window,wi=null;d&&"documentMode"in document&&(wi=document.documentMode);var yk=d&&"TextEvent"in window&&!wi,ym=d&&(!Cu||wi&&8<wi&&11>=wi),vm=" ",bm=!1;function wm(r,i){switch(r){case"keyup":return xk.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jm(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ao=!1;function vk(r,i){switch(r){case"compositionend":return jm(i);case"keypress":return i.which!==32?null:(bm=!0,vm);case"textInput":return r=i.data,r===vm&&bm?null:r;default:return null}}function bk(r,i){if(ao)return r==="compositionend"||!Cu&&wm(r,i)?(r=pm(),Ka=bu=os=null,ao=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return ym&&i.locale!=="ko"?null:i.data;default:return null}}var wk={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 km(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!wk[r.type]:i==="textarea"}function Sm(r,i,u,p){Rt(p),i=tl(i,"onChange"),0<i.length&&(u=new wu("onChange","change",null,u,p),r.push({event:u,listeners:i}))}var ji=null,ki=null;function jk(r){Um(r,0)}function Qa(r){var i=po(r);if(Xe(i))return r}function kk(r,i){if(r==="change")return i}var Nm=!1;if(d){var Eu;if(d){var Pu="oninput"in document;if(!Pu){var Cm=document.createElement("div");Cm.setAttribute("oninput","return;"),Pu=typeof Cm.oninput=="function"}Eu=Pu}else Eu=!1;Nm=Eu&&(!document.documentMode||9<document.documentMode)}function Em(){ji&&(ji.detachEvent("onpropertychange",Pm),ki=ji=null)}function Pm(r){if(r.propertyName==="value"&&Qa(ki)){var i=[];Sm(i,ki,r,Wn(r)),$r(jk,i)}}function Sk(r,i,u){r==="focusin"?(Em(),ji=i,ki=u,ji.attachEvent("onpropertychange",Pm)):r==="focusout"&&Em()}function Nk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Qa(ki)}function Ck(r,i){if(r==="click")return Qa(i)}function Ek(r,i){if(r==="input"||r==="change")return Qa(i)}function Pk(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var or=typeof Object.is=="function"?Object.is:Pk;function Si(r,i){if(or(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var u=Object.keys(r),p=Object.keys(i);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var v=u[p];if(!f.call(i,v)||!or(r[v],i[v]))return!1}return!0}function Tm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Rm(r,i){var u=Tm(r);r=0;for(var p;u;){if(u.nodeType===3){if(p=r+u.textContent.length,r<=i&&p>=i)return{node:u,offset:i-r};r=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Tm(u)}}function Am(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Am(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Dm(){for(var r=window,i=ne();i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=ne(r.document)}return i}function Tu(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function Tk(r){var i=Dm(),u=r.focusedElem,p=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&Am(u.ownerDocument.documentElement,u)){if(p!==null&&Tu(u)){if(i=p.start,r=p.end,r===void 0&&(r=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(r,u.value.length);else if(r=(i=u.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var v=u.textContent.length,w=Math.min(p.start,v);p=p.end===void 0?w:Math.min(p.end,v),!r.extend&&w>p&&(v=p,p=w,w=v),v=Rm(u,w);var E=Rm(u,p);v&&E&&(r.rangeCount!==1||r.anchorNode!==v.node||r.anchorOffset!==v.offset||r.focusNode!==E.node||r.focusOffset!==E.offset)&&(i=i.createRange(),i.setStart(v.node,v.offset),r.removeAllRanges(),w>p?(r.addRange(i),r.extend(E.node,E.offset)):(i.setEnd(E.node,E.offset),r.addRange(i)))}}for(i=[],r=u;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<i.length;u++)r=i[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Rk=d&&"documentMode"in document&&11>=document.documentMode,lo=null,Ru=null,Ni=null,Au=!1;function Im(r,i,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Au||lo==null||lo!==ne(p)||(p=lo,"selectionStart"in p&&Tu(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}),Ni&&Si(Ni,p)||(Ni=p,p=tl(Ru,"onSelect"),0<p.length&&(i=new wu("onSelect","select",null,i,u),r.push({event:i,listeners:p}),i.target=lo)))}function Ja(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var co={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionend:Ja("Transition","TransitionEnd")},Du={},Lm={};d&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function Za(r){if(Du[r])return Du[r];if(!co[r])return r;var i=co[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in Lm)return Du[r]=i[u];return r}var Om=Za("animationend"),Mm=Za("animationiteration"),_m=Za("animationstart"),$m=Za("transitionend"),Fm=new Map,zm="abort auxClick 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(" ");function is(r,i){Fm.set(r,i),l(i,[r])}for(var Iu=0;Iu<zm.length;Iu++){var Lu=zm[Iu],Ak=Lu.toLowerCase(),Dk=Lu[0].toUpperCase()+Lu.slice(1);is(Ak,"on"+Dk)}is(Om,"onAnimationEnd"),is(Mm,"onAnimationIteration"),is(_m,"onAnimationStart"),is("dblclick","onDoubleClick"),is("focusin","onFocus"),is("focusout","onBlur"),is($m,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),Ik=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ci));function Bm(r,i,u){var p=r.type||"unknown-event";r.currentTarget=u,A1(p,i,void 0,r),r.currentTarget=null}function Um(r,i){i=(i&4)!==0;for(var u=0;u<r.length;u++){var p=r[u],v=p.event;p=p.listeners;e:{var w=void 0;if(i)for(var E=p.length-1;0<=E;E--){var $=p[E],H=$.instance,se=$.currentTarget;if($=$.listener,H!==w&&v.isPropagationStopped())break e;Bm(v,$,se),w=H}else for(E=0;E<p.length;E++){if($=p[E],H=$.instance,se=$.currentTarget,$=$.listener,H!==w&&v.isPropagationStopped())break e;Bm(v,$,se),w=H}}}if(Ln)throw r=Fr,Ln=!1,Fr=null,r}function dt(r,i){var u=i[Uu];u===void 0&&(u=i[Uu]=new Set);var p=r+"__bubble";u.has(p)||(Hm(i,r,2,!1),u.add(p))}function Ou(r,i,u){var p=0;i&&(p|=4),Hm(u,r,p,i)}var el="_reactListening"+Math.random().toString(36).slice(2);function Ei(r){if(!r[el]){r[el]=!0,s.forEach(function(u){u!=="selectionchange"&&(Ik.has(u)||Ou(u,!1,r),Ou(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[el]||(i[el]=!0,Ou("selectionchange",!1,i))}}function Hm(r,i,u,p){switch(fm(i)){case 1:var v=K1;break;case 4:v=G1;break;default:v=yu}u=v.bind(null,i,u,r),v=void 0,!Vn||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(v=!0),p?v!==void 0?r.addEventListener(i,u,{capture:!0,passive:v}):r.addEventListener(i,u,!0):v!==void 0?r.addEventListener(i,u,{passive:v}):r.addEventListener(i,u,!1)}function Mu(r,i,u,p,v){var w=p;if((i&1)===0&&(i&2)===0&&p!==null)e:for(;;){if(p===null)return;var E=p.tag;if(E===3||E===4){var $=p.stateNode.containerInfo;if($===v||$.nodeType===8&&$.parentNode===v)break;if(E===4)for(E=p.return;E!==null;){var H=E.tag;if((H===3||H===4)&&(H=E.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;E=E.return}for(;$!==null;){if(E=Ls($),E===null)return;if(H=E.tag,H===5||H===6){p=w=E;continue e}$=$.parentNode}}p=p.return}$r(function(){var se=w,ue=Wn(u),de=[];e:{var le=Fm.get(r);if(le!==void 0){var Se=wu,Te=r;switch(r){case"keypress":if(Ga(u)===0)break e;case"keydown":case"keyup":Se=ck;break;case"focusin":Te="focus",Se=Su;break;case"focusout":Te="blur",Se=Su;break;case"beforeblur":case"afterblur":Se=Su;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":Se=mm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=Q1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=fk;break;case Om:case Mm:case _m:Se=ek;break;case $m:Se=hk;break;case"scroll":Se=Y1;break;case"wheel":Se=gk;break;case"copy":case"cut":case"paste":Se=nk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=xm}var Re=(i&4)!==0,Dt=!Re&&r==="scroll",X=Re?le!==null?le+"Capture":null:le;Re=[];for(var W=se,ee;W!==null;){ee=W;var me=ee.stateNode;if(ee.tag===5&&me!==null&&(ee=me,X!==null&&(me=bt(W,X),me!=null&&Re.push(Pi(W,me,ee)))),Dt)break;W=W.return}0<Re.length&&(le=new Se(le,Te,null,u,ue),de.push({event:le,listeners:Re}))}}if((i&7)===0){e:{if(le=r==="mouseover"||r==="pointerover",Se=r==="mouseout"||r==="pointerout",le&&u!==ze&&(Te=u.relatedTarget||u.fromElement)&&(Ls(Te)||Te[zr]))break e;if((Se||le)&&(le=ue.window===ue?ue:(le=ue.ownerDocument)?le.defaultView||le.parentWindow:window,Se?(Te=u.relatedTarget||u.toElement,Se=se,Te=Te?Ls(Te):null,Te!==null&&(Dt=Is(Te),Te!==Dt||Te.tag!==5&&Te.tag!==6)&&(Te=null)):(Se=null,Te=se),Se!==Te)){if(Re=mm,me="onMouseLeave",X="onMouseEnter",W="mouse",(r==="pointerout"||r==="pointerover")&&(Re=xm,me="onPointerLeave",X="onPointerEnter",W="pointer"),Dt=Se==null?le:po(Se),ee=Te==null?le:po(Te),le=new Re(me,W+"leave",Se,u,ue),le.target=Dt,le.relatedTarget=ee,me=null,Ls(ue)===se&&(Re=new Re(X,W+"enter",Te,u,ue),Re.target=ee,Re.relatedTarget=Dt,me=Re),Dt=me,Se&&Te)t:{for(Re=Se,X=Te,W=0,ee=Re;ee;ee=uo(ee))W++;for(ee=0,me=X;me;me=uo(me))ee++;for(;0<W-ee;)Re=uo(Re),W--;for(;0<ee-W;)X=uo(X),ee--;for(;W--;){if(Re===X||X!==null&&Re===X.alternate)break t;Re=uo(Re),X=uo(X)}Re=null}else Re=null;Se!==null&&Wm(de,le,Se,Re,!1),Te!==null&&Dt!==null&&Wm(de,Dt,Te,Re,!0)}}e:{if(le=se?po(se):window,Se=le.nodeName&&le.nodeName.toLowerCase(),Se==="select"||Se==="input"&&le.type==="file")var De=kk;else if(km(le))if(Nm)De=Ek;else{De=Nk;var Me=Sk}else(Se=le.nodeName)&&Se.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(De=Ck);if(De&&(De=De(r,se))){Sm(de,De,u,ue);break e}Me&&Me(r,le,se),r==="focusout"&&(Me=le._wrapperState)&&Me.controlled&&le.type==="number"&&Ue(le,"number",le.value)}switch(Me=se?po(se):window,r){case"focusin":(km(Me)||Me.contentEditable==="true")&&(lo=Me,Ru=se,Ni=null);break;case"focusout":Ni=Ru=lo=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,Im(de,u,ue);break;case"selectionchange":if(Rk)break;case"keydown":case"keyup":Im(de,u,ue)}var _e;if(Cu)e:{switch(r){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else ao?wm(r,u)&&($e="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&($e="onCompositionStart");$e&&(ym&&u.locale!=="ko"&&(ao||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&ao&&(_e=pm()):(os=ue,bu="value"in os?os.value:os.textContent,ao=!0)),Me=tl(se,$e),0<Me.length&&($e=new gm($e,r,null,u,ue),de.push({event:$e,listeners:Me}),_e?$e.data=_e:(_e=jm(u),_e!==null&&($e.data=_e)))),(_e=yk?vk(r,u):bk(r,u))&&(se=tl(se,"onBeforeInput"),0<se.length&&(ue=new gm("onBeforeInput","beforeinput",null,u,ue),de.push({event:ue,listeners:se}),ue.data=_e))}Um(de,i)})}function Pi(r,i,u){return{instance:r,listener:i,currentTarget:u}}function tl(r,i){for(var u=i+"Capture",p=[];r!==null;){var v=r,w=v.stateNode;v.tag===5&&w!==null&&(v=w,w=bt(r,u),w!=null&&p.unshift(Pi(r,w,v)),w=bt(r,i),w!=null&&p.push(Pi(r,w,v))),r=r.return}return p}function uo(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Wm(r,i,u,p,v){for(var w=i._reactName,E=[];u!==null&&u!==p;){var $=u,H=$.alternate,se=$.stateNode;if(H!==null&&H===p)break;$.tag===5&&se!==null&&($=se,v?(H=bt(u,w),H!=null&&E.unshift(Pi(u,H,$))):v||(H=bt(u,w),H!=null&&E.push(Pi(u,H,$)))),u=u.return}E.length!==0&&r.push({event:i,listeners:E})}var Lk=/\r\n?/g,Ok=/\u0000|\uFFFD/g;function Vm(r){return(typeof r=="string"?r:""+r).replace(Lk,`
|
|
38
|
+
`).replace(Ok,"")}function nl(r,i,u){if(i=Vm(i),Vm(r)!==i&&u)throw Error(n(425))}function rl(){}var _u=null,$u=null;function Fu(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var zu=typeof setTimeout=="function"?setTimeout:void 0,Mk=typeof clearTimeout=="function"?clearTimeout:void 0,qm=typeof Promise=="function"?Promise:void 0,_k=typeof queueMicrotask=="function"?queueMicrotask:typeof qm<"u"?function(r){return qm.resolve(null).then(r).catch($k)}:zu;function $k(r){setTimeout(function(){throw r})}function Bu(r,i){var u=i,p=0;do{var v=u.nextSibling;if(r.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"){if(p===0){r.removeChild(v),yi(i);return}p--}else u!=="$"&&u!=="$?"&&u!=="$!"||p++;u=v}while(u);yi(i)}function as(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Km(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return r;i--}else u==="/$"&&i++}r=r.previousSibling}return null}var fo=Math.random().toString(36).slice(2),br="__reactFiber$"+fo,Ti="__reactProps$"+fo,zr="__reactContainer$"+fo,Uu="__reactEvents$"+fo,Fk="__reactListeners$"+fo,zk="__reactHandles$"+fo;function Ls(r){var i=r[br];if(i)return i;for(var u=r.parentNode;u;){if(i=u[zr]||u[br]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=Km(r);r!==null;){if(u=r[br])return u;r=Km(r)}return i}r=u,u=r.parentNode}return null}function Ri(r){return r=r[br]||r[zr],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function po(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function sl(r){return r[Ti]||null}var Hu=[],ho=-1;function ls(r){return{current:r}}function ft(r){0>ho||(r.current=Hu[ho],Hu[ho]=null,ho--)}function lt(r,i){ho++,Hu[ho]=r.current,r.current=i}var cs={},dn=ls(cs),wn=ls(!1),Os=cs;function mo(r,i){var u=r.type.contextTypes;if(!u)return cs;var p=r.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===i)return p.__reactInternalMemoizedMaskedChildContext;var v={},w;for(w in u)v[w]=i[w];return p&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=v),v}function jn(r){return r=r.childContextTypes,r!=null}function ol(){ft(wn),ft(dn)}function Gm(r,i,u){if(dn.current!==cs)throw Error(n(168));lt(dn,i),lt(wn,u)}function Ym(r,i,u){var p=r.stateNode;if(i=i.childContextTypes,typeof p.getChildContext!="function")return u;p=p.getChildContext();for(var v in p)if(!(v in i))throw Error(n(108,fe(r)||"Unknown",v));return P({},u,p)}function il(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||cs,Os=dn.current,lt(dn,r),lt(wn,wn.current),!0}function Xm(r,i,u){var p=r.stateNode;if(!p)throw Error(n(169));u?(r=Ym(r,i,Os),p.__reactInternalMemoizedMergedChildContext=r,ft(wn),ft(dn),lt(dn,r)):ft(wn),lt(wn,u)}var Br=null,al=!1,Wu=!1;function Qm(r){Br===null?Br=[r]:Br.push(r)}function Bk(r){al=!0,Qm(r)}function us(){if(!Wu&&Br!==null){Wu=!0;var r=0,i=st;try{var u=Br;for(st=1;r<u.length;r++){var p=u[r];do p=p(!0);while(p!==null)}Br=null,al=!1}catch(v){throw Br!==null&&(Br=Br.slice(r+1)),Zh(fu,us),v}finally{st=i,Wu=!1}}return null}var go=[],xo=0,ll=null,cl=0,qn=[],Kn=0,Ms=null,Ur=1,Hr="";function _s(r,i){go[xo++]=cl,go[xo++]=ll,ll=r,cl=i}function Jm(r,i,u){qn[Kn++]=Ur,qn[Kn++]=Hr,qn[Kn++]=Ms,Ms=r;var p=Ur;r=Hr;var v=32-sr(p)-1;p&=~(1<<v),u+=1;var w=32-sr(i)+v;if(30<w){var E=v-v%5;w=(p&(1<<E)-1).toString(32),p>>=E,v-=E,Ur=1<<32-sr(i)+v|u<<v|p,Hr=w+r}else Ur=1<<w|u<<v|p,Hr=r}function Vu(r){r.return!==null&&(_s(r,1),Jm(r,1,0))}function qu(r){for(;r===ll;)ll=go[--xo],go[xo]=null,cl=go[--xo],go[xo]=null;for(;r===Ms;)Ms=qn[--Kn],qn[Kn]=null,Hr=qn[--Kn],qn[Kn]=null,Ur=qn[--Kn],qn[Kn]=null}var Mn=null,_n=null,gt=!1,ir=null;function Zm(r,i){var u=Qn(5,null,null,0);u.elementType="DELETED",u.stateNode=i,u.return=r,i=r.deletions,i===null?(r.deletions=[u],r.flags|=16):i.push(u)}function eg(r,i){switch(r.tag){case 5:var u=r.type;return i=i.nodeType!==1||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Mn=r,_n=as(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Mn=r,_n=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(u=Ms!==null?{id:Ur,overflow:Hr}:null,r.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},u=Qn(18,null,null,0),u.stateNode=i,u.return=r,r.child=u,Mn=r,_n=null,!0):!1;default:return!1}}function Ku(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Gu(r){if(gt){var i=_n;if(i){var u=i;if(!eg(r,i)){if(Ku(r))throw Error(n(418));i=as(u.nextSibling);var p=Mn;i&&eg(r,i)?Zm(p,u):(r.flags=r.flags&-4097|2,gt=!1,Mn=r)}}else{if(Ku(r))throw Error(n(418));r.flags=r.flags&-4097|2,gt=!1,Mn=r}}}function tg(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Mn=r}function ul(r){if(r!==Mn)return!1;if(!gt)return tg(r),gt=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Fu(r.type,r.memoizedProps)),i&&(i=_n)){if(Ku(r))throw ng(),Error(n(418));for(;i;)Zm(r,i),i=as(i.nextSibling)}if(tg(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(i===0){_n=as(r.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}r=r.nextSibling}_n=null}}else _n=Mn?as(r.stateNode.nextSibling):null;return!0}function ng(){for(var r=_n;r;)r=as(r.nextSibling)}function yo(){_n=Mn=null,gt=!1}function Yu(r){ir===null?ir=[r]:ir.push(r)}var Uk=A.ReactCurrentBatchConfig;function Ai(r,i,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var p=u.stateNode}if(!p)throw Error(n(147,r));var v=p,w=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===w?i.ref:(i=function(E){var $=v.refs;E===null?delete $[w]:$[w]=E},i._stringRef=w,i)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function dl(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function rg(r){var i=r._init;return i(r._payload)}function sg(r){function i(X,W){if(r){var ee=X.deletions;ee===null?(X.deletions=[W],X.flags|=16):ee.push(W)}}function u(X,W){if(!r)return null;for(;W!==null;)i(X,W),W=W.sibling;return null}function p(X,W){for(X=new Map;W!==null;)W.key!==null?X.set(W.key,W):X.set(W.index,W),W=W.sibling;return X}function v(X,W){return X=ys(X,W),X.index=0,X.sibling=null,X}function w(X,W,ee){return X.index=ee,r?(ee=X.alternate,ee!==null?(ee=ee.index,ee<W?(X.flags|=2,W):ee):(X.flags|=2,W)):(X.flags|=1048576,W)}function E(X){return r&&X.alternate===null&&(X.flags|=2),X}function $(X,W,ee,me){return W===null||W.tag!==6?(W=zd(ee,X.mode,me),W.return=X,W):(W=v(W,ee),W.return=X,W)}function H(X,W,ee,me){var De=ee.type;return De===D?ue(X,W,ee.props.children,me,ee.key):W!==null&&(W.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===F&&rg(De)===W.type)?(me=v(W,ee.props),me.ref=Ai(X,W,ee),me.return=X,me):(me=Ol(ee.type,ee.key,ee.props,null,X.mode,me),me.ref=Ai(X,W,ee),me.return=X,me)}function se(X,W,ee,me){return W===null||W.tag!==4||W.stateNode.containerInfo!==ee.containerInfo||W.stateNode.implementation!==ee.implementation?(W=Bd(ee,X.mode,me),W.return=X,W):(W=v(W,ee.children||[]),W.return=X,W)}function ue(X,W,ee,me,De){return W===null||W.tag!==7?(W=Vs(ee,X.mode,me,De),W.return=X,W):(W=v(W,ee),W.return=X,W)}function de(X,W,ee){if(typeof W=="string"&&W!==""||typeof W=="number")return W=zd(""+W,X.mode,ee),W.return=X,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case L:return ee=Ol(W.type,W.key,W.props,null,X.mode,ee),ee.ref=Ai(X,null,W),ee.return=X,ee;case R:return W=Bd(W,X.mode,ee),W.return=X,W;case F:var me=W._init;return de(X,me(W._payload),ee)}if(Ge(W)||Z(W))return W=Vs(W,X.mode,ee,null),W.return=X,W;dl(X,W)}return null}function le(X,W,ee,me){var De=W!==null?W.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number")return De!==null?null:$(X,W,""+ee,me);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case L:return ee.key===De?H(X,W,ee,me):null;case R:return ee.key===De?se(X,W,ee,me):null;case F:return De=ee._init,le(X,W,De(ee._payload),me)}if(Ge(ee)||Z(ee))return De!==null?null:ue(X,W,ee,me,null);dl(X,ee)}return null}function Se(X,W,ee,me,De){if(typeof me=="string"&&me!==""||typeof me=="number")return X=X.get(ee)||null,$(W,X,""+me,De);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case L:return X=X.get(me.key===null?ee:me.key)||null,H(W,X,me,De);case R:return X=X.get(me.key===null?ee:me.key)||null,se(W,X,me,De);case F:var Me=me._init;return Se(X,W,ee,Me(me._payload),De)}if(Ge(me)||Z(me))return X=X.get(ee)||null,ue(W,X,me,De,null);dl(W,me)}return null}function Te(X,W,ee,me){for(var De=null,Me=null,_e=W,$e=W=0,Xt=null;_e!==null&&$e<ee.length;$e++){_e.index>$e?(Xt=_e,_e=null):Xt=_e.sibling;var Ze=le(X,_e,ee[$e],me);if(Ze===null){_e===null&&(_e=Xt);break}r&&_e&&Ze.alternate===null&&i(X,_e),W=w(Ze,W,$e),Me===null?De=Ze:Me.sibling=Ze,Me=Ze,_e=Xt}if($e===ee.length)return u(X,_e),gt&&_s(X,$e),De;if(_e===null){for(;$e<ee.length;$e++)_e=de(X,ee[$e],me),_e!==null&&(W=w(_e,W,$e),Me===null?De=_e:Me.sibling=_e,Me=_e);return gt&&_s(X,$e),De}for(_e=p(X,_e);$e<ee.length;$e++)Xt=Se(_e,X,$e,ee[$e],me),Xt!==null&&(r&&Xt.alternate!==null&&_e.delete(Xt.key===null?$e:Xt.key),W=w(Xt,W,$e),Me===null?De=Xt:Me.sibling=Xt,Me=Xt);return r&&_e.forEach(function(vs){return i(X,vs)}),gt&&_s(X,$e),De}function Re(X,W,ee,me){var De=Z(ee);if(typeof De!="function")throw Error(n(150));if(ee=De.call(ee),ee==null)throw Error(n(151));for(var Me=De=null,_e=W,$e=W=0,Xt=null,Ze=ee.next();_e!==null&&!Ze.done;$e++,Ze=ee.next()){_e.index>$e?(Xt=_e,_e=null):Xt=_e.sibling;var vs=le(X,_e,Ze.value,me);if(vs===null){_e===null&&(_e=Xt);break}r&&_e&&vs.alternate===null&&i(X,_e),W=w(vs,W,$e),Me===null?De=vs:Me.sibling=vs,Me=vs,_e=Xt}if(Ze.done)return u(X,_e),gt&&_s(X,$e),De;if(_e===null){for(;!Ze.done;$e++,Ze=ee.next())Ze=de(X,Ze.value,me),Ze!==null&&(W=w(Ze,W,$e),Me===null?De=Ze:Me.sibling=Ze,Me=Ze);return gt&&_s(X,$e),De}for(_e=p(X,_e);!Ze.done;$e++,Ze=ee.next())Ze=Se(_e,X,$e,Ze.value,me),Ze!==null&&(r&&Ze.alternate!==null&&_e.delete(Ze.key===null?$e:Ze.key),W=w(Ze,W,$e),Me===null?De=Ze:Me.sibling=Ze,Me=Ze);return r&&_e.forEach(function(wS){return i(X,wS)}),gt&&_s(X,$e),De}function Dt(X,W,ee,me){if(typeof ee=="object"&&ee!==null&&ee.type===D&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case L:e:{for(var De=ee.key,Me=W;Me!==null;){if(Me.key===De){if(De=ee.type,De===D){if(Me.tag===7){u(X,Me.sibling),W=v(Me,ee.props.children),W.return=X,X=W;break e}}else if(Me.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===F&&rg(De)===Me.type){u(X,Me.sibling),W=v(Me,ee.props),W.ref=Ai(X,Me,ee),W.return=X,X=W;break e}u(X,Me);break}else i(X,Me);Me=Me.sibling}ee.type===D?(W=Vs(ee.props.children,X.mode,me,ee.key),W.return=X,X=W):(me=Ol(ee.type,ee.key,ee.props,null,X.mode,me),me.ref=Ai(X,W,ee),me.return=X,X=me)}return E(X);case R:e:{for(Me=ee.key;W!==null;){if(W.key===Me)if(W.tag===4&&W.stateNode.containerInfo===ee.containerInfo&&W.stateNode.implementation===ee.implementation){u(X,W.sibling),W=v(W,ee.children||[]),W.return=X,X=W;break e}else{u(X,W);break}else i(X,W);W=W.sibling}W=Bd(ee,X.mode,me),W.return=X,X=W}return E(X);case F:return Me=ee._init,Dt(X,W,Me(ee._payload),me)}if(Ge(ee))return Te(X,W,ee,me);if(Z(ee))return Re(X,W,ee,me);dl(X,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"?(ee=""+ee,W!==null&&W.tag===6?(u(X,W.sibling),W=v(W,ee),W.return=X,X=W):(u(X,W),W=zd(ee,X.mode,me),W.return=X,X=W),E(X)):u(X,W)}return Dt}var vo=sg(!0),og=sg(!1),fl=ls(null),pl=null,bo=null,Xu=null;function Qu(){Xu=bo=pl=null}function Ju(r){var i=fl.current;ft(fl),r._currentValue=i}function Zu(r,i,u){for(;r!==null;){var p=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,p!==null&&(p.childLanes|=i)):p!==null&&(p.childLanes&i)!==i&&(p.childLanes|=i),r===u)break;r=r.return}}function wo(r,i){pl=r,Xu=bo=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(kn=!0),r.firstContext=null)}function Gn(r){var i=r._currentValue;if(Xu!==r)if(r={context:r,memoizedValue:i,next:null},bo===null){if(pl===null)throw Error(n(308));bo=r,pl.dependencies={lanes:0,firstContext:r}}else bo=bo.next=r;return i}var $s=null;function ed(r){$s===null?$s=[r]:$s.push(r)}function ig(r,i,u,p){var v=i.interleaved;return v===null?(u.next=u,ed(i)):(u.next=v.next,v.next=u),i.interleaved=u,Wr(r,p)}function Wr(r,i){r.lanes|=i;var u=r.alternate;for(u!==null&&(u.lanes|=i),u=r,r=r.return;r!==null;)r.childLanes|=i,u=r.alternate,u!==null&&(u.childLanes|=i),u=r,r=r.return;return u.tag===3?u.stateNode:null}var ds=!1;function td(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ag(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Vr(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function fs(r,i,u){var p=r.updateQueue;if(p===null)return null;if(p=p.shared,(Qe&2)!==0){var v=p.pending;return v===null?i.next=i:(i.next=v.next,v.next=i),p.pending=i,Wr(r,u)}return v=p.interleaved,v===null?(i.next=i,ed(p)):(i.next=v.next,v.next=i),p.interleaved=i,Wr(r,u)}function hl(r,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194240)!==0)){var p=i.lanes;p&=r.pendingLanes,u|=p,i.lanes=u,mu(r,u)}}function lg(r,i){var u=r.updateQueue,p=r.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var v=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var E={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?v=w=E:w=w.next=E,u=u.next}while(u!==null);w===null?v=w=i:w=w.next=i}else v=w=i;u={baseState:p.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:p.shared,effects:p.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=i:r.next=i,u.lastBaseUpdate=i}function ml(r,i,u,p){var v=r.updateQueue;ds=!1;var w=v.firstBaseUpdate,E=v.lastBaseUpdate,$=v.shared.pending;if($!==null){v.shared.pending=null;var H=$,se=H.next;H.next=null,E===null?w=se:E.next=se,E=H;var ue=r.alternate;ue!==null&&(ue=ue.updateQueue,$=ue.lastBaseUpdate,$!==E&&($===null?ue.firstBaseUpdate=se:$.next=se,ue.lastBaseUpdate=H))}if(w!==null){var de=v.baseState;E=0,ue=se=H=null,$=w;do{var le=$.lane,Se=$.eventTime;if((p&le)===le){ue!==null&&(ue=ue.next={eventTime:Se,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Te=r,Re=$;switch(le=i,Se=u,Re.tag){case 1:if(Te=Re.payload,typeof Te=="function"){de=Te.call(Se,de,le);break e}de=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Re.payload,le=typeof Te=="function"?Te.call(Se,de,le):Te,le==null)break e;de=P({},de,le);break e;case 2:ds=!0}}$.callback!==null&&$.lane!==0&&(r.flags|=64,le=v.effects,le===null?v.effects=[$]:le.push($))}else Se={eventTime:Se,lane:le,tag:$.tag,payload:$.payload,callback:$.callback,next:null},ue===null?(se=ue=Se,H=de):ue=ue.next=Se,E|=le;if($=$.next,$===null){if($=v.shared.pending,$===null)break;le=$,$=le.next,le.next=null,v.lastBaseUpdate=le,v.shared.pending=null}}while(!0);if(ue===null&&(H=de),v.baseState=H,v.firstBaseUpdate=se,v.lastBaseUpdate=ue,i=v.shared.interleaved,i!==null){v=i;do E|=v.lane,v=v.next;while(v!==i)}else w===null&&(v.shared.lanes=0);Bs|=E,r.lanes=E,r.memoizedState=de}}function cg(r,i,u){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var p=r[i],v=p.callback;if(v!==null){if(p.callback=null,p=u,typeof v!="function")throw Error(n(191,v));v.call(p)}}}var Di={},wr=ls(Di),Ii=ls(Di),Li=ls(Di);function Fs(r){if(r===Di)throw Error(n(174));return r}function nd(r,i){switch(lt(Li,i),lt(Ii,r),lt(wr,Di),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:ce(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=ce(i,r)}ft(wr),lt(wr,i)}function jo(){ft(wr),ft(Ii),ft(Li)}function ug(r){Fs(Li.current);var i=Fs(wr.current),u=ce(i,r.type);i!==u&&(lt(Ii,r),lt(wr,u))}function rd(r){Ii.current===r&&(ft(wr),ft(Ii))}var wt=ls(0);function gl(r){for(var i=r;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var sd=[];function od(){for(var r=0;r<sd.length;r++)sd[r]._workInProgressVersionPrimary=null;sd.length=0}var xl=A.ReactCurrentDispatcher,id=A.ReactCurrentBatchConfig,zs=0,jt=null,zt=null,Gt=null,yl=!1,Oi=!1,Mi=0,Hk=0;function fn(){throw Error(n(321))}function ad(r,i){if(i===null)return!1;for(var u=0;u<i.length&&u<r.length;u++)if(!or(r[u],i[u]))return!1;return!0}function ld(r,i,u,p,v,w){if(zs=w,jt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,xl.current=r===null||r.memoizedState===null?Kk:Gk,r=u(p,v),Oi){w=0;do{if(Oi=!1,Mi=0,25<=w)throw Error(n(301));w+=1,Gt=zt=null,i.updateQueue=null,xl.current=Yk,r=u(p,v)}while(Oi)}if(xl.current=wl,i=zt!==null&&zt.next!==null,zs=0,Gt=zt=jt=null,yl=!1,i)throw Error(n(300));return r}function cd(){var r=Mi!==0;return Mi=0,r}function jr(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?jt.memoizedState=Gt=r:Gt=Gt.next=r,Gt}function Yn(){if(zt===null){var r=jt.alternate;r=r!==null?r.memoizedState:null}else r=zt.next;var i=Gt===null?jt.memoizedState:Gt.next;if(i!==null)Gt=i,zt=r;else{if(r===null)throw Error(n(310));zt=r,r={memoizedState:zt.memoizedState,baseState:zt.baseState,baseQueue:zt.baseQueue,queue:zt.queue,next:null},Gt===null?jt.memoizedState=Gt=r:Gt=Gt.next=r}return Gt}function _i(r,i){return typeof i=="function"?i(r):i}function ud(r){var i=Yn(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var p=zt,v=p.baseQueue,w=u.pending;if(w!==null){if(v!==null){var E=v.next;v.next=w.next,w.next=E}p.baseQueue=v=w,u.pending=null}if(v!==null){w=v.next,p=p.baseState;var $=E=null,H=null,se=w;do{var ue=se.lane;if((zs&ue)===ue)H!==null&&(H=H.next={lane:0,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),p=se.hasEagerState?se.eagerState:r(p,se.action);else{var de={lane:ue,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null};H===null?($=H=de,E=p):H=H.next=de,jt.lanes|=ue,Bs|=ue}se=se.next}while(se!==null&&se!==w);H===null?E=p:H.next=$,or(p,i.memoizedState)||(kn=!0),i.memoizedState=p,i.baseState=E,i.baseQueue=H,u.lastRenderedState=p}if(r=u.interleaved,r!==null){v=r;do w=v.lane,jt.lanes|=w,Bs|=w,v=v.next;while(v!==r)}else v===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function dd(r){var i=Yn(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var p=u.dispatch,v=u.pending,w=i.memoizedState;if(v!==null){u.pending=null;var E=v=v.next;do w=r(w,E.action),E=E.next;while(E!==v);or(w,i.memoizedState)||(kn=!0),i.memoizedState=w,i.baseQueue===null&&(i.baseState=w),u.lastRenderedState=w}return[w,p]}function dg(){}function fg(r,i){var u=jt,p=Yn(),v=i(),w=!or(p.memoizedState,v);if(w&&(p.memoizedState=v,kn=!0),p=p.queue,fd(mg.bind(null,u,p,r),[r]),p.getSnapshot!==i||w||Gt!==null&&Gt.memoizedState.tag&1){if(u.flags|=2048,$i(9,hg.bind(null,u,p,v,i),void 0,null),Yt===null)throw Error(n(349));(zs&30)!==0||pg(u,i,v)}return v}function pg(r,i,u){r.flags|=16384,r={getSnapshot:i,value:u},i=jt.updateQueue,i===null?(i={lastEffect:null,stores:null},jt.updateQueue=i,i.stores=[r]):(u=i.stores,u===null?i.stores=[r]:u.push(r))}function hg(r,i,u,p){i.value=u,i.getSnapshot=p,gg(i)&&xg(r)}function mg(r,i,u){return u(function(){gg(i)&&xg(r)})}function gg(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!or(r,u)}catch{return!0}}function xg(r){var i=Wr(r,1);i!==null&&ur(i,r,1,-1)}function yg(r){var i=jr();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_i,lastRenderedState:r},i.queue=r,r=r.dispatch=qk.bind(null,jt,r),[i.memoizedState,r]}function $i(r,i,u,p){return r={tag:r,create:i,destroy:u,deps:p,next:null},i=jt.updateQueue,i===null?(i={lastEffect:null,stores:null},jt.updateQueue=i,i.lastEffect=r.next=r):(u=i.lastEffect,u===null?i.lastEffect=r.next=r:(p=u.next,u.next=r,r.next=p,i.lastEffect=r)),r}function vg(){return Yn().memoizedState}function vl(r,i,u,p){var v=jr();jt.flags|=r,v.memoizedState=$i(1|i,u,void 0,p===void 0?null:p)}function bl(r,i,u,p){var v=Yn();p=p===void 0?null:p;var w=void 0;if(zt!==null){var E=zt.memoizedState;if(w=E.destroy,p!==null&&ad(p,E.deps)){v.memoizedState=$i(i,u,w,p);return}}jt.flags|=r,v.memoizedState=$i(1|i,u,w,p)}function bg(r,i){return vl(8390656,8,r,i)}function fd(r,i){return bl(2048,8,r,i)}function wg(r,i){return bl(4,2,r,i)}function jg(r,i){return bl(4,4,r,i)}function kg(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function Sg(r,i,u){return u=u!=null?u.concat([r]):null,bl(4,4,kg.bind(null,i,r),u)}function pd(){}function Ng(r,i){var u=Yn();i=i===void 0?null:i;var p=u.memoizedState;return p!==null&&i!==null&&ad(i,p[1])?p[0]:(u.memoizedState=[r,i],r)}function Cg(r,i){var u=Yn();i=i===void 0?null:i;var p=u.memoizedState;return p!==null&&i!==null&&ad(i,p[1])?p[0]:(r=r(),u.memoizedState=[r,i],r)}function Eg(r,i,u){return(zs&21)===0?(r.baseState&&(r.baseState=!1,kn=!0),r.memoizedState=u):(or(u,i)||(u=rm(),jt.lanes|=u,Bs|=u,r.baseState=!0),i)}function Wk(r,i){var u=st;st=u!==0&&4>u?u:4,r(!0);var p=id.transition;id.transition={};try{r(!1),i()}finally{st=u,id.transition=p}}function Pg(){return Yn().memoizedState}function Vk(r,i,u){var p=gs(r);if(u={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null},Tg(r))Rg(i,u);else if(u=ig(r,i,u,p),u!==null){var v=yn();ur(u,r,p,v),Ag(u,i,p)}}function qk(r,i,u){var p=gs(r),v={lane:p,action:u,hasEagerState:!1,eagerState:null,next:null};if(Tg(r))Rg(i,v);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=i.lastRenderedReducer,w!==null))try{var E=i.lastRenderedState,$=w(E,u);if(v.hasEagerState=!0,v.eagerState=$,or($,E)){var H=i.interleaved;H===null?(v.next=v,ed(i)):(v.next=H.next,H.next=v),i.interleaved=v;return}}catch{}finally{}u=ig(r,i,v,p),u!==null&&(v=yn(),ur(u,r,p,v),Ag(u,i,p))}}function Tg(r){var i=r.alternate;return r===jt||i!==null&&i===jt}function Rg(r,i){Oi=yl=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function Ag(r,i,u){if((u&4194240)!==0){var p=i.lanes;p&=r.pendingLanes,u|=p,i.lanes=u,mu(r,u)}}var wl={readContext:Gn,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useInsertionEffect:fn,useLayoutEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useMutableSource:fn,useSyncExternalStore:fn,useId:fn,unstable_isNewReconciler:!1},Kk={readContext:Gn,useCallback:function(r,i){return jr().memoizedState=[r,i===void 0?null:i],r},useContext:Gn,useEffect:bg,useImperativeHandle:function(r,i,u){return u=u!=null?u.concat([r]):null,vl(4194308,4,kg.bind(null,i,r),u)},useLayoutEffect:function(r,i){return vl(4194308,4,r,i)},useInsertionEffect:function(r,i){return vl(4,2,r,i)},useMemo:function(r,i){var u=jr();return i=i===void 0?null:i,r=r(),u.memoizedState=[r,i],r},useReducer:function(r,i,u){var p=jr();return i=u!==void 0?u(i):i,p.memoizedState=p.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},p.queue=r,r=r.dispatch=Vk.bind(null,jt,r),[p.memoizedState,r]},useRef:function(r){var i=jr();return r={current:r},i.memoizedState=r},useState:yg,useDebugValue:pd,useDeferredValue:function(r){return jr().memoizedState=r},useTransition:function(){var r=yg(!1),i=r[0];return r=Wk.bind(null,r[1]),jr().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,u){var p=jt,v=jr();if(gt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),Yt===null)throw Error(n(349));(zs&30)!==0||pg(p,i,u)}v.memoizedState=u;var w={value:u,getSnapshot:i};return v.queue=w,bg(mg.bind(null,p,w,r),[r]),p.flags|=2048,$i(9,hg.bind(null,p,w,u,i),void 0,null),u},useId:function(){var r=jr(),i=Yt.identifierPrefix;if(gt){var u=Hr,p=Ur;u=(p&~(1<<32-sr(p)-1)).toString(32)+u,i=":"+i+"R"+u,u=Mi++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=Hk++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},Gk={readContext:Gn,useCallback:Ng,useContext:Gn,useEffect:fd,useImperativeHandle:Sg,useInsertionEffect:wg,useLayoutEffect:jg,useMemo:Cg,useReducer:ud,useRef:vg,useState:function(){return ud(_i)},useDebugValue:pd,useDeferredValue:function(r){var i=Yn();return Eg(i,zt.memoizedState,r)},useTransition:function(){var r=ud(_i)[0],i=Yn().memoizedState;return[r,i]},useMutableSource:dg,useSyncExternalStore:fg,useId:Pg,unstable_isNewReconciler:!1},Yk={readContext:Gn,useCallback:Ng,useContext:Gn,useEffect:fd,useImperativeHandle:Sg,useInsertionEffect:wg,useLayoutEffect:jg,useMemo:Cg,useReducer:dd,useRef:vg,useState:function(){return dd(_i)},useDebugValue:pd,useDeferredValue:function(r){var i=Yn();return zt===null?i.memoizedState=r:Eg(i,zt.memoizedState,r)},useTransition:function(){var r=dd(_i)[0],i=Yn().memoizedState;return[r,i]},useMutableSource:dg,useSyncExternalStore:fg,useId:Pg,unstable_isNewReconciler:!1};function ar(r,i){if(r&&r.defaultProps){i=P({},i),r=r.defaultProps;for(var u in r)i[u]===void 0&&(i[u]=r[u]);return i}return i}function hd(r,i,u,p){i=r.memoizedState,u=u(p,i),u=u==null?i:P({},i,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var jl={isMounted:function(r){return(r=r._reactInternals)?Is(r)===r:!1},enqueueSetState:function(r,i,u){r=r._reactInternals;var p=yn(),v=gs(r),w=Vr(p,v);w.payload=i,u!=null&&(w.callback=u),i=fs(r,w,v),i!==null&&(ur(i,r,v,p),hl(i,r,v))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var p=yn(),v=gs(r),w=Vr(p,v);w.tag=1,w.payload=i,u!=null&&(w.callback=u),i=fs(r,w,v),i!==null&&(ur(i,r,v,p),hl(i,r,v))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=yn(),p=gs(r),v=Vr(u,p);v.tag=2,i!=null&&(v.callback=i),i=fs(r,v,p),i!==null&&(ur(i,r,p,u),hl(i,r,p))}};function Dg(r,i,u,p,v,w,E){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(p,w,E):i.prototype&&i.prototype.isPureReactComponent?!Si(u,p)||!Si(v,w):!0}function Ig(r,i,u){var p=!1,v=cs,w=i.contextType;return typeof w=="object"&&w!==null?w=Gn(w):(v=jn(i)?Os:dn.current,p=i.contextTypes,w=(p=p!=null)?mo(r,v):cs),i=new i(u,w),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=jl,r.stateNode=i,i._reactInternals=r,p&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=v,r.__reactInternalMemoizedMaskedChildContext=w),i}function Lg(r,i,u,p){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,p),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,p),i.state!==r&&jl.enqueueReplaceState(i,i.state,null)}function md(r,i,u,p){var v=r.stateNode;v.props=u,v.state=r.memoizedState,v.refs={},td(r);var w=i.contextType;typeof w=="object"&&w!==null?v.context=Gn(w):(w=jn(i)?Os:dn.current,v.context=mo(r,w)),v.state=r.memoizedState,w=i.getDerivedStateFromProps,typeof w=="function"&&(hd(r,i,w,u),v.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(i=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),i!==v.state&&jl.enqueueReplaceState(v,v.state,null),ml(r,u,v,p),v.state=r.memoizedState),typeof v.componentDidMount=="function"&&(r.flags|=4194308)}function ko(r,i){try{var u="",p=i;do u+=Ne(p),p=p.return;while(p);var v=u}catch(w){v=`
|
|
39
|
+
Error generating stack: `+w.message+`
|
|
40
|
+
`+w.stack}return{value:r,source:i,stack:v,digest:null}}function gd(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function xd(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var Xk=typeof WeakMap=="function"?WeakMap:Map;function Og(r,i,u){u=Vr(-1,u),u.tag=3,u.payload={element:null};var p=i.value;return u.callback=function(){Tl||(Tl=!0,Dd=p),xd(r,i)},u}function Mg(r,i,u){u=Vr(-1,u),u.tag=3;var p=r.type.getDerivedStateFromError;if(typeof p=="function"){var v=i.value;u.payload=function(){return p(v)},u.callback=function(){xd(r,i)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){xd(r,i),typeof p!="function"&&(hs===null?hs=new Set([this]):hs.add(this));var E=i.stack;this.componentDidCatch(i.value,{componentStack:E!==null?E:""})}),u}function _g(r,i,u){var p=r.pingCache;if(p===null){p=r.pingCache=new Xk;var v=new Set;p.set(i,v)}else v=p.get(i),v===void 0&&(v=new Set,p.set(i,v));v.has(u)||(v.add(u),r=uS.bind(null,r,i,u),i.then(r,r))}function $g(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function Fg(r,i,u,p,v){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(i=Vr(-1,1),i.tag=2,fs(u,i,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=v,r)}var Qk=A.ReactCurrentOwner,kn=!1;function xn(r,i,u,p){i.child=r===null?og(i,null,u,p):vo(i,r.child,u,p)}function zg(r,i,u,p,v){u=u.render;var w=i.ref;return wo(i,v),p=ld(r,i,u,p,w,v),u=cd(),r!==null&&!kn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~v,qr(r,i,v)):(gt&&u&&Vu(i),i.flags|=1,xn(r,i,p,v),i.child)}function Bg(r,i,u,p,v){if(r===null){var w=u.type;return typeof w=="function"&&!Fd(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=w,Ug(r,i,w,p,v)):(r=Ol(u.type,null,p,i,i.mode,v),r.ref=i.ref,r.return=i,i.child=r)}if(w=r.child,(r.lanes&v)===0){var E=w.memoizedProps;if(u=u.compare,u=u!==null?u:Si,u(E,p)&&r.ref===i.ref)return qr(r,i,v)}return i.flags|=1,r=ys(w,p),r.ref=i.ref,r.return=i,i.child=r}function Ug(r,i,u,p,v){if(r!==null){var w=r.memoizedProps;if(Si(w,p)&&r.ref===i.ref)if(kn=!1,i.pendingProps=p=w,(r.lanes&v)!==0)(r.flags&131072)!==0&&(kn=!0);else return i.lanes=r.lanes,qr(r,i,v)}return yd(r,i,u,p,v)}function Hg(r,i,u){var p=i.pendingProps,v=p.children,w=r!==null?r.memoizedState:null;if(p.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},lt(No,$n),$n|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,lt(No,$n),$n|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=w!==null?w.baseLanes:u,lt(No,$n),$n|=p}else w!==null?(p=w.baseLanes|u,i.memoizedState=null):p=u,lt(No,$n),$n|=p;return xn(r,i,v,u),i.child}function Wg(r,i){var u=i.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function yd(r,i,u,p,v){var w=jn(u)?Os:dn.current;return w=mo(i,w),wo(i,v),u=ld(r,i,u,p,w,v),p=cd(),r!==null&&!kn?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~v,qr(r,i,v)):(gt&&p&&Vu(i),i.flags|=1,xn(r,i,u,v),i.child)}function Vg(r,i,u,p,v){if(jn(u)){var w=!0;il(i)}else w=!1;if(wo(i,v),i.stateNode===null)Sl(r,i),Ig(i,u,p),md(i,u,p,v),p=!0;else if(r===null){var E=i.stateNode,$=i.memoizedProps;E.props=$;var H=E.context,se=u.contextType;typeof se=="object"&&se!==null?se=Gn(se):(se=jn(u)?Os:dn.current,se=mo(i,se));var ue=u.getDerivedStateFromProps,de=typeof ue=="function"||typeof E.getSnapshotBeforeUpdate=="function";de||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||($!==p||H!==se)&&Lg(i,E,p,se),ds=!1;var le=i.memoizedState;E.state=le,ml(i,p,E,v),H=i.memoizedState,$!==p||le!==H||wn.current||ds?(typeof ue=="function"&&(hd(i,u,ue,p),H=i.memoizedState),($=ds||Dg(i,u,$,p,le,H,se))?(de||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(i.flags|=4194308)):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=p,i.memoizedState=H),E.props=p,E.state=H,E.context=se,p=$):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),p=!1)}else{E=i.stateNode,ag(r,i),$=i.memoizedProps,se=i.type===i.elementType?$:ar(i.type,$),E.props=se,de=i.pendingProps,le=E.context,H=u.contextType,typeof H=="object"&&H!==null?H=Gn(H):(H=jn(u)?Os:dn.current,H=mo(i,H));var Se=u.getDerivedStateFromProps;(ue=typeof Se=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||($!==de||le!==H)&&Lg(i,E,p,H),ds=!1,le=i.memoizedState,E.state=le,ml(i,p,E,v);var Te=i.memoizedState;$!==de||le!==Te||wn.current||ds?(typeof Se=="function"&&(hd(i,u,Se,p),Te=i.memoizedState),(se=ds||Dg(i,u,se,p,le,Te,H)||!1)?(ue||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(p,Te,H),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(p,Te,H)),typeof E.componentDidUpdate=="function"&&(i.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof E.componentDidUpdate!="function"||$===r.memoizedProps&&le===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||$===r.memoizedProps&&le===r.memoizedState||(i.flags|=1024),i.memoizedProps=p,i.memoizedState=Te),E.props=p,E.state=Te,E.context=H,p=se):(typeof E.componentDidUpdate!="function"||$===r.memoizedProps&&le===r.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||$===r.memoizedProps&&le===r.memoizedState||(i.flags|=1024),p=!1)}return vd(r,i,u,p,w,v)}function vd(r,i,u,p,v,w){Wg(r,i);var E=(i.flags&128)!==0;if(!p&&!E)return v&&Xm(i,u,!1),qr(r,i,w);p=i.stateNode,Qk.current=i;var $=E&&typeof u.getDerivedStateFromError!="function"?null:p.render();return i.flags|=1,r!==null&&E?(i.child=vo(i,r.child,null,w),i.child=vo(i,null,$,w)):xn(r,i,$,w),i.memoizedState=p.state,v&&Xm(i,u,!0),i.child}function qg(r){var i=r.stateNode;i.pendingContext?Gm(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Gm(r,i.context,!1),nd(r,i.containerInfo)}function Kg(r,i,u,p,v){return yo(),Yu(v),i.flags|=256,xn(r,i,u,p),i.child}var bd={dehydrated:null,treeContext:null,retryLane:0};function wd(r){return{baseLanes:r,cachePool:null,transitions:null}}function Gg(r,i,u){var p=i.pendingProps,v=wt.current,w=!1,E=(i.flags&128)!==0,$;if(($=E)||($=r!==null&&r.memoizedState===null?!1:(v&2)!==0),$?(w=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(v|=1),lt(wt,v&1),r===null)return Gu(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(E=p.children,r=p.fallback,w?(p=i.mode,w=i.child,E={mode:"hidden",children:E},(p&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=E):w=Ml(E,p,0,null),r=Vs(r,p,u,null),w.return=i,r.return=i,w.sibling=r,i.child=w,i.child.memoizedState=wd(u),i.memoizedState=bd,r):jd(i,E));if(v=r.memoizedState,v!==null&&($=v.dehydrated,$!==null))return Jk(r,i,E,p,$,v,u);if(w){w=p.fallback,E=i.mode,v=r.child,$=v.sibling;var H={mode:"hidden",children:p.children};return(E&1)===0&&i.child!==v?(p=i.child,p.childLanes=0,p.pendingProps=H,i.deletions=null):(p=ys(v,H),p.subtreeFlags=v.subtreeFlags&14680064),$!==null?w=ys($,w):(w=Vs(w,E,u,null),w.flags|=2),w.return=i,p.return=i,p.sibling=w,i.child=p,p=w,w=i.child,E=r.child.memoizedState,E=E===null?wd(u):{baseLanes:E.baseLanes|u,cachePool:null,transitions:E.transitions},w.memoizedState=E,w.childLanes=r.childLanes&~u,i.memoizedState=bd,p}return w=r.child,r=w.sibling,p=ys(w,{mode:"visible",children:p.children}),(i.mode&1)===0&&(p.lanes=u),p.return=i,p.sibling=null,r!==null&&(u=i.deletions,u===null?(i.deletions=[r],i.flags|=16):u.push(r)),i.child=p,i.memoizedState=null,p}function jd(r,i){return i=Ml({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function kl(r,i,u,p){return p!==null&&Yu(p),vo(i,r.child,null,u),r=jd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Jk(r,i,u,p,v,w,E){if(u)return i.flags&256?(i.flags&=-257,p=gd(Error(n(422))),kl(r,i,E,p)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(w=p.fallback,v=i.mode,p=Ml({mode:"visible",children:p.children},v,0,null),w=Vs(w,v,E,null),w.flags|=2,p.return=i,w.return=i,p.sibling=w,i.child=p,(i.mode&1)!==0&&vo(i,r.child,null,E),i.child.memoizedState=wd(E),i.memoizedState=bd,w);if((i.mode&1)===0)return kl(r,i,E,null);if(v.data==="$!"){if(p=v.nextSibling&&v.nextSibling.dataset,p)var $=p.dgst;return p=$,w=Error(n(419)),p=gd(w,p,void 0),kl(r,i,E,p)}if($=(E&r.childLanes)!==0,kn||$){if(p=Yt,p!==null){switch(E&-E){case 4:v=2;break;case 16:v=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(p.suspendedLanes|E))!==0?0:v,v!==0&&v!==w.retryLane&&(w.retryLane=v,Wr(r,v),ur(p,r,v,-1))}return $d(),p=gd(Error(n(421))),kl(r,i,E,p)}return v.data==="$?"?(i.flags|=128,i.child=r.child,i=dS.bind(null,r),v._reactRetry=i,null):(r=w.treeContext,_n=as(v.nextSibling),Mn=i,gt=!0,ir=null,r!==null&&(qn[Kn++]=Ur,qn[Kn++]=Hr,qn[Kn++]=Ms,Ur=r.id,Hr=r.overflow,Ms=i),i=jd(i,p.children),i.flags|=4096,i)}function Yg(r,i,u){r.lanes|=i;var p=r.alternate;p!==null&&(p.lanes|=i),Zu(r.return,i,u)}function kd(r,i,u,p,v){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:v}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=p,w.tail=u,w.tailMode=v)}function Xg(r,i,u){var p=i.pendingProps,v=p.revealOrder,w=p.tail;if(xn(r,i,p.children,u),p=wt.current,(p&2)!==0)p=p&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Yg(r,u,i);else if(r.tag===19)Yg(r,u,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}p&=1}if(lt(wt,p),(i.mode&1)===0)i.memoizedState=null;else switch(v){case"forwards":for(u=i.child,v=null;u!==null;)r=u.alternate,r!==null&&gl(r)===null&&(v=u),u=u.sibling;u=v,u===null?(v=i.child,i.child=null):(v=u.sibling,u.sibling=null),kd(i,!1,v,u,w);break;case"backwards":for(u=null,v=i.child,i.child=null;v!==null;){if(r=v.alternate,r!==null&&gl(r)===null){i.child=v;break}r=v.sibling,v.sibling=u,u=v,v=r}kd(i,!0,u,null,w);break;case"together":kd(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Sl(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function qr(r,i,u){if(r!==null&&(i.dependencies=r.dependencies),Bs|=i.lanes,(u&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,u=ys(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=ys(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function Zk(r,i,u){switch(i.tag){case 3:qg(i),yo();break;case 5:ug(i);break;case 1:jn(i.type)&&il(i);break;case 4:nd(i,i.stateNode.containerInfo);break;case 10:var p=i.type._context,v=i.memoizedProps.value;lt(fl,p._currentValue),p._currentValue=v;break;case 13:if(p=i.memoizedState,p!==null)return p.dehydrated!==null?(lt(wt,wt.current&1),i.flags|=128,null):(u&i.child.childLanes)!==0?Gg(r,i,u):(lt(wt,wt.current&1),r=qr(r,i,u),r!==null?r.sibling:null);lt(wt,wt.current&1);break;case 19:if(p=(u&i.childLanes)!==0,(r.flags&128)!==0){if(p)return Xg(r,i,u);i.flags|=128}if(v=i.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),lt(wt,wt.current),p)break;return null;case 22:case 23:return i.lanes=0,Hg(r,i,u)}return qr(r,i,u)}var Qg,Sd,Jg,Zg;Qg=function(r,i){for(var u=i.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Sd=function(){},Jg=function(r,i,u,p){var v=r.memoizedProps;if(v!==p){r=i.stateNode,Fs(wr.current);var w=null;switch(u){case"input":v=Y(r,v),p=Y(r,p),w=[];break;case"select":v=P({},v,{value:void 0}),p=P({},p,{value:void 0}),w=[];break;case"textarea":v=Ct(r,v),p=Ct(r,p),w=[];break;default:typeof v.onClick!="function"&&typeof p.onClick=="function"&&(r.onclick=rl)}pe(u,p);var E;u=null;for(se in v)if(!p.hasOwnProperty(se)&&v.hasOwnProperty(se)&&v[se]!=null)if(se==="style"){var $=v[se];for(E in $)$.hasOwnProperty(E)&&(u||(u={}),u[E]="")}else se!=="dangerouslySetInnerHTML"&&se!=="children"&&se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&se!=="autoFocus"&&(a.hasOwnProperty(se)?w||(w=[]):(w=w||[]).push(se,null));for(se in p){var H=p[se];if($=v!=null?v[se]:void 0,p.hasOwnProperty(se)&&H!==$&&(H!=null||$!=null))if(se==="style")if($){for(E in $)!$.hasOwnProperty(E)||H&&H.hasOwnProperty(E)||(u||(u={}),u[E]="");for(E in H)H.hasOwnProperty(E)&&$[E]!==H[E]&&(u||(u={}),u[E]=H[E])}else u||(w||(w=[]),w.push(se,u)),u=H;else se==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,$=$?$.__html:void 0,H!=null&&$!==H&&(w=w||[]).push(se,H)):se==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(se,""+H):se!=="suppressContentEditableWarning"&&se!=="suppressHydrationWarning"&&(a.hasOwnProperty(se)?(H!=null&&se==="onScroll"&&dt("scroll",r),w||$===H||(w=[])):(w=w||[]).push(se,H))}u&&(w=w||[]).push("style",u);var se=w;(i.updateQueue=se)&&(i.flags|=4)}},Zg=function(r,i,u,p){u!==p&&(i.flags|=4)};function Fi(r,i){if(!gt)switch(r.tailMode){case"hidden":i=r.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:p.sibling=null}}function pn(r){var i=r.alternate!==null&&r.alternate.child===r.child,u=0,p=0;if(i)for(var v=r.child;v!==null;)u|=v.lanes|v.childLanes,p|=v.subtreeFlags&14680064,p|=v.flags&14680064,v.return=r,v=v.sibling;else for(v=r.child;v!==null;)u|=v.lanes|v.childLanes,p|=v.subtreeFlags,p|=v.flags,v.return=r,v=v.sibling;return r.subtreeFlags|=p,r.childLanes=u,i}function eS(r,i,u){var p=i.pendingProps;switch(qu(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pn(i),null;case 1:return jn(i.type)&&ol(),pn(i),null;case 3:return p=i.stateNode,jo(),ft(wn),ft(dn),od(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(r===null||r.child===null)&&(ul(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ir!==null&&(Od(ir),ir=null))),Sd(r,i),pn(i),null;case 5:rd(i);var v=Fs(Li.current);if(u=i.type,r!==null&&i.stateNode!=null)Jg(r,i,u,p,v),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!p){if(i.stateNode===null)throw Error(n(166));return pn(i),null}if(r=Fs(wr.current),ul(i)){p=i.stateNode,u=i.type;var w=i.memoizedProps;switch(p[br]=i,p[Ti]=w,r=(i.mode&1)!==0,u){case"dialog":dt("cancel",p),dt("close",p);break;case"iframe":case"object":case"embed":dt("load",p);break;case"video":case"audio":for(v=0;v<Ci.length;v++)dt(Ci[v],p);break;case"source":dt("error",p);break;case"img":case"image":case"link":dt("error",p),dt("load",p);break;case"details":dt("toggle",p);break;case"input":ae(p,w),dt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!w.multiple},dt("invalid",p);break;case"textarea":It(p,w),dt("invalid",p)}pe(u,w),v=null;for(var E in w)if(w.hasOwnProperty(E)){var $=w[E];E==="children"?typeof $=="string"?p.textContent!==$&&(w.suppressHydrationWarning!==!0&&nl(p.textContent,$,r),v=["children",$]):typeof $=="number"&&p.textContent!==""+$&&(w.suppressHydrationWarning!==!0&&nl(p.textContent,$,r),v=["children",""+$]):a.hasOwnProperty(E)&&$!=null&&E==="onScroll"&&dt("scroll",p)}switch(u){case"input":Ye(p),Oe(p,w,!0);break;case"textarea":Ye(p),Tt(p);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(p.onclick=rl)}p=v,i.updateQueue=p,p!==null&&(i.flags|=4)}else{E=v.nodeType===9?v:v.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ie(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=E.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof p.is=="string"?r=E.createElement(u,{is:p.is}):(r=E.createElement(u),u==="select"&&(E=r,p.multiple?E.multiple=!0:p.size&&(E.size=p.size))):r=E.createElementNS(r,u),r[br]=i,r[Ti]=p,Qg(r,i,!1,!1),i.stateNode=r;e:{switch(E=Ee(u,p),u){case"dialog":dt("cancel",r),dt("close",r),v=p;break;case"iframe":case"object":case"embed":dt("load",r),v=p;break;case"video":case"audio":for(v=0;v<Ci.length;v++)dt(Ci[v],r);v=p;break;case"source":dt("error",r),v=p;break;case"img":case"image":case"link":dt("error",r),dt("load",r),v=p;break;case"details":dt("toggle",r),v=p;break;case"input":ae(r,p),v=Y(r,p),dt("invalid",r);break;case"option":v=p;break;case"select":r._wrapperState={wasMultiple:!!p.multiple},v=P({},p,{value:void 0}),dt("invalid",r);break;case"textarea":It(r,p),v=Ct(r,p),dt("invalid",r);break;default:v=p}pe(u,v),$=v;for(w in $)if($.hasOwnProperty(w)){var H=$[w];w==="style"?tn(r,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&oe(r,H)):w==="children"?typeof H=="string"?(u!=="textarea"||H!=="")&&Ce(r,H):typeof H=="number"&&Ce(r,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(a.hasOwnProperty(w)?H!=null&&w==="onScroll"&&dt("scroll",r):H!=null&&N(r,w,H,E))}switch(u){case"input":Ye(r),Oe(r,p,!1);break;case"textarea":Ye(r),Tt(r);break;case"option":p.value!=null&&r.setAttribute("value",""+be(p.value));break;case"select":r.multiple=!!p.multiple,w=p.value,w!=null?Nt(r,!!p.multiple,w,!1):p.defaultValue!=null&&Nt(r,!!p.multiple,p.defaultValue,!0);break;default:typeof v.onClick=="function"&&(r.onclick=rl)}switch(u){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return pn(i),null;case 6:if(r&&i.stateNode!=null)Zg(r,i,r.memoizedProps,p);else{if(typeof p!="string"&&i.stateNode===null)throw Error(n(166));if(u=Fs(Li.current),Fs(wr.current),ul(i)){if(p=i.stateNode,u=i.memoizedProps,p[br]=i,(w=p.nodeValue!==u)&&(r=Mn,r!==null))switch(r.tag){case 3:nl(p.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&nl(p.nodeValue,u,(r.mode&1)!==0)}w&&(i.flags|=4)}else p=(u.nodeType===9?u:u.ownerDocument).createTextNode(p),p[br]=i,i.stateNode=p}return pn(i),null;case 13:if(ft(wt),p=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(gt&&_n!==null&&(i.mode&1)!==0&&(i.flags&128)===0)ng(),yo(),i.flags|=98560,w=!1;else if(w=ul(i),p!==null&&p.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=i.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[br]=i}else yo(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;pn(i),w=!1}else ir!==null&&(Od(ir),ir=null),w=!0;if(!w)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=u,i):(p=p!==null,p!==(r!==null&&r.memoizedState!==null)&&p&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(wt.current&1)!==0?Bt===0&&(Bt=3):$d())),i.updateQueue!==null&&(i.flags|=4),pn(i),null);case 4:return jo(),Sd(r,i),r===null&&Ei(i.stateNode.containerInfo),pn(i),null;case 10:return Ju(i.type._context),pn(i),null;case 17:return jn(i.type)&&ol(),pn(i),null;case 19:if(ft(wt),w=i.memoizedState,w===null)return pn(i),null;if(p=(i.flags&128)!==0,E=w.rendering,E===null)if(p)Fi(w,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(E=gl(r),E!==null){for(i.flags|=128,Fi(w,!1),p=E.updateQueue,p!==null&&(i.updateQueue=p,i.flags|=4),i.subtreeFlags=0,p=u,u=i.child;u!==null;)w=u,r=p,w.flags&=14680066,E=w.alternate,E===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=E.childLanes,w.lanes=E.lanes,w.child=E.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=E.memoizedProps,w.memoizedState=E.memoizedState,w.updateQueue=E.updateQueue,w.type=E.type,r=E.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return lt(wt,wt.current&1|2),i.child}r=r.sibling}w.tail!==null&&At()>Co&&(i.flags|=128,p=!0,Fi(w,!1),i.lanes=4194304)}else{if(!p)if(r=gl(E),r!==null){if(i.flags|=128,p=!0,u=r.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),Fi(w,!0),w.tail===null&&w.tailMode==="hidden"&&!E.alternate&&!gt)return pn(i),null}else 2*At()-w.renderingStartTime>Co&&u!==1073741824&&(i.flags|=128,p=!0,Fi(w,!1),i.lanes=4194304);w.isBackwards?(E.sibling=i.child,i.child=E):(u=w.last,u!==null?u.sibling=E:i.child=E,w.last=E)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=At(),i.sibling=null,u=wt.current,lt(wt,p?u&1|2:u&1),i):(pn(i),null);case 22:case 23:return _d(),p=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==p&&(i.flags|=8192),p&&(i.mode&1)!==0?($n&1073741824)!==0&&(pn(i),i.subtreeFlags&6&&(i.flags|=8192)):pn(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function tS(r,i){switch(qu(i),i.tag){case 1:return jn(i.type)&&ol(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return jo(),ft(wn),ft(dn),od(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return rd(i),null;case 13:if(ft(wt),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));yo()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return ft(wt),null;case 4:return jo(),null;case 10:return Ju(i.type._context),null;case 22:case 23:return _d(),null;case 24:return null;default:return null}}var Nl=!1,hn=!1,nS=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function So(r,i){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(p){Et(r,i,p)}else u.current=null}function Nd(r,i,u){try{u()}catch(p){Et(r,i,p)}}var ex=!1;function rS(r,i){if(_u=Va,r=Dm(),Tu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var v=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var E=0,$=-1,H=-1,se=0,ue=0,de=r,le=null;t:for(;;){for(var Se;de!==u||v!==0&&de.nodeType!==3||($=E+v),de!==w||p!==0&&de.nodeType!==3||(H=E+p),de.nodeType===3&&(E+=de.nodeValue.length),(Se=de.firstChild)!==null;)le=de,de=Se;for(;;){if(de===r)break t;if(le===u&&++se===v&&($=E),le===w&&++ue===p&&(H=E),(Se=de.nextSibling)!==null)break;de=le,le=de.parentNode}de=Se}u=$===-1||H===-1?null:{start:$,end:H}}else u=null}u=u||{start:0,end:0}}else u=null;for($u={focusedElem:r,selectionRange:u},Va=!1,Pe=i;Pe!==null;)if(i=Pe,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Pe=r;else for(;Pe!==null;){i=Pe;try{var Te=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Te!==null){var Re=Te.memoizedProps,Dt=Te.memoizedState,X=i.stateNode,W=X.getSnapshotBeforeUpdate(i.elementType===i.type?Re:ar(i.type,Re),Dt);X.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var ee=i.stateNode.containerInfo;ee.nodeType===1?ee.textContent="":ee.nodeType===9&&ee.documentElement&&ee.removeChild(ee.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(me){Et(i,i.return,me)}if(r=i.sibling,r!==null){r.return=i.return,Pe=r;break}Pe=i.return}return Te=ex,ex=!1,Te}function zi(r,i,u){var p=i.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var v=p=p.next;do{if((v.tag&r)===r){var w=v.destroy;v.destroy=void 0,w!==void 0&&Nd(i,u,w)}v=v.next}while(v!==p)}}function Cl(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&r)===r){var p=u.create;u.destroy=p()}u=u.next}while(u!==i)}}function Cd(r){var i=r.ref;if(i!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof i=="function"?i(r):i.current=r}}function tx(r){var i=r.alternate;i!==null&&(r.alternate=null,tx(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[br],delete i[Ti],delete i[Uu],delete i[Fk],delete i[zk])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function nx(r){return r.tag===5||r.tag===3||r.tag===4}function rx(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||nx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Ed(r,i,u){var p=r.tag;if(p===5||p===6)r=r.stateNode,i?u.nodeType===8?u.parentNode.insertBefore(r,i):u.insertBefore(r,i):(u.nodeType===8?(i=u.parentNode,i.insertBefore(r,u)):(i=u,i.appendChild(r)),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=rl));else if(p!==4&&(r=r.child,r!==null))for(Ed(r,i,u),r=r.sibling;r!==null;)Ed(r,i,u),r=r.sibling}function Pd(r,i,u){var p=r.tag;if(p===5||p===6)r=r.stateNode,i?u.insertBefore(r,i):u.appendChild(r);else if(p!==4&&(r=r.child,r!==null))for(Pd(r,i,u),r=r.sibling;r!==null;)Pd(r,i,u),r=r.sibling}var rn=null,lr=!1;function ps(r,i,u){for(u=u.child;u!==null;)sx(r,i,u),u=u.sibling}function sx(r,i,u){if(vr&&typeof vr.onCommitFiberUnmount=="function")try{vr.onCommitFiberUnmount(Fa,u)}catch{}switch(u.tag){case 5:hn||So(u,i);case 6:var p=rn,v=lr;rn=null,ps(r,i,u),rn=p,lr=v,rn!==null&&(lr?(r=rn,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):rn.removeChild(u.stateNode));break;case 18:rn!==null&&(lr?(r=rn,u=u.stateNode,r.nodeType===8?Bu(r.parentNode,u):r.nodeType===1&&Bu(r,u),yi(r)):Bu(rn,u.stateNode));break;case 4:p=rn,v=lr,rn=u.stateNode.containerInfo,lr=!0,ps(r,i,u),rn=p,lr=v;break;case 0:case 11:case 14:case 15:if(!hn&&(p=u.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){v=p=p.next;do{var w=v,E=w.destroy;w=w.tag,E!==void 0&&((w&2)!==0||(w&4)!==0)&&Nd(u,i,E),v=v.next}while(v!==p)}ps(r,i,u);break;case 1:if(!hn&&(So(u,i),p=u.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=u.memoizedProps,p.state=u.memoizedState,p.componentWillUnmount()}catch($){Et(u,i,$)}ps(r,i,u);break;case 21:ps(r,i,u);break;case 22:u.mode&1?(hn=(p=hn)||u.memoizedState!==null,ps(r,i,u),hn=p):ps(r,i,u);break;default:ps(r,i,u)}}function ox(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new nS),i.forEach(function(p){var v=fS.bind(null,r,p);u.has(p)||(u.add(p),p.then(v,v))})}}function cr(r,i){var u=i.deletions;if(u!==null)for(var p=0;p<u.length;p++){var v=u[p];try{var w=r,E=i,$=E;e:for(;$!==null;){switch($.tag){case 5:rn=$.stateNode,lr=!1;break e;case 3:rn=$.stateNode.containerInfo,lr=!0;break e;case 4:rn=$.stateNode.containerInfo,lr=!0;break e}$=$.return}if(rn===null)throw Error(n(160));sx(w,E,v),rn=null,lr=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(se){Et(v,i,se)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)ix(i,r),i=i.sibling}function ix(r,i){var u=r.alternate,p=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(cr(i,r),kr(r),p&4){try{zi(3,r,r.return),Cl(3,r)}catch(Re){Et(r,r.return,Re)}try{zi(5,r,r.return)}catch(Re){Et(r,r.return,Re)}}break;case 1:cr(i,r),kr(r),p&512&&u!==null&&So(u,u.return);break;case 5:if(cr(i,r),kr(r),p&512&&u!==null&&So(u,u.return),r.flags&32){var v=r.stateNode;try{Ce(v,"")}catch(Re){Et(r,r.return,Re)}}if(p&4&&(v=r.stateNode,v!=null)){var w=r.memoizedProps,E=u!==null?u.memoizedProps:w,$=r.type,H=r.updateQueue;if(r.updateQueue=null,H!==null)try{$==="input"&&w.type==="radio"&&w.name!=null&&xe(v,w),Ee($,E);var se=Ee($,w);for(E=0;E<H.length;E+=2){var ue=H[E],de=H[E+1];ue==="style"?tn(v,de):ue==="dangerouslySetInnerHTML"?oe(v,de):ue==="children"?Ce(v,de):N(v,ue,de,se)}switch($){case"input":qe(v,w);break;case"textarea":en(v,w);break;case"select":var le=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!w.multiple;var Se=w.value;Se!=null?Nt(v,!!w.multiple,Se,!1):le!==!!w.multiple&&(w.defaultValue!=null?Nt(v,!!w.multiple,w.defaultValue,!0):Nt(v,!!w.multiple,w.multiple?[]:"",!1))}v[Ti]=w}catch(Re){Et(r,r.return,Re)}}break;case 6:if(cr(i,r),kr(r),p&4){if(r.stateNode===null)throw Error(n(162));v=r.stateNode,w=r.memoizedProps;try{v.nodeValue=w}catch(Re){Et(r,r.return,Re)}}break;case 3:if(cr(i,r),kr(r),p&4&&u!==null&&u.memoizedState.isDehydrated)try{yi(i.containerInfo)}catch(Re){Et(r,r.return,Re)}break;case 4:cr(i,r),kr(r);break;case 13:cr(i,r),kr(r),v=r.child,v.flags&8192&&(w=v.memoizedState!==null,v.stateNode.isHidden=w,!w||v.alternate!==null&&v.alternate.memoizedState!==null||(Ad=At())),p&4&&ox(r);break;case 22:if(ue=u!==null&&u.memoizedState!==null,r.mode&1?(hn=(se=hn)||ue,cr(i,r),hn=se):cr(i,r),kr(r),p&8192){if(se=r.memoizedState!==null,(r.stateNode.isHidden=se)&&!ue&&(r.mode&1)!==0)for(Pe=r,ue=r.child;ue!==null;){for(de=Pe=ue;Pe!==null;){switch(le=Pe,Se=le.child,le.tag){case 0:case 11:case 14:case 15:zi(4,le,le.return);break;case 1:So(le,le.return);var Te=le.stateNode;if(typeof Te.componentWillUnmount=="function"){p=le,u=le.return;try{i=p,Te.props=i.memoizedProps,Te.state=i.memoizedState,Te.componentWillUnmount()}catch(Re){Et(p,u,Re)}}break;case 5:So(le,le.return);break;case 22:if(le.memoizedState!==null){cx(de);continue}}Se!==null?(Se.return=le,Pe=Se):cx(de)}ue=ue.sibling}e:for(ue=null,de=r;;){if(de.tag===5){if(ue===null){ue=de;try{v=de.stateNode,se?(w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):($=de.stateNode,H=de.memoizedProps.style,E=H!=null&&H.hasOwnProperty("display")?H.display:null,$.style.display=an("display",E))}catch(Re){Et(r,r.return,Re)}}}else if(de.tag===6){if(ue===null)try{de.stateNode.nodeValue=se?"":de.memoizedProps}catch(Re){Et(r,r.return,Re)}}else if((de.tag!==22&&de.tag!==23||de.memoizedState===null||de===r)&&de.child!==null){de.child.return=de,de=de.child;continue}if(de===r)break e;for(;de.sibling===null;){if(de.return===null||de.return===r)break e;ue===de&&(ue=null),de=de.return}ue===de&&(ue=null),de.sibling.return=de.return,de=de.sibling}}break;case 19:cr(i,r),kr(r),p&4&&ox(r);break;case 21:break;default:cr(i,r),kr(r)}}function kr(r){var i=r.flags;if(i&2){try{e:{for(var u=r.return;u!==null;){if(nx(u)){var p=u;break e}u=u.return}throw Error(n(160))}switch(p.tag){case 5:var v=p.stateNode;p.flags&32&&(Ce(v,""),p.flags&=-33);var w=rx(r);Pd(r,w,v);break;case 3:case 4:var E=p.stateNode.containerInfo,$=rx(r);Ed(r,$,E);break;default:throw Error(n(161))}}catch(H){Et(r,r.return,H)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function sS(r,i,u){Pe=r,ax(r)}function ax(r,i,u){for(var p=(r.mode&1)!==0;Pe!==null;){var v=Pe,w=v.child;if(v.tag===22&&p){var E=v.memoizedState!==null||Nl;if(!E){var $=v.alternate,H=$!==null&&$.memoizedState!==null||hn;$=Nl;var se=hn;if(Nl=E,(hn=H)&&!se)for(Pe=v;Pe!==null;)E=Pe,H=E.child,E.tag===22&&E.memoizedState!==null?ux(v):H!==null?(H.return=E,Pe=H):ux(v);for(;w!==null;)Pe=w,ax(w),w=w.sibling;Pe=v,Nl=$,hn=se}lx(r)}else(v.subtreeFlags&8772)!==0&&w!==null?(w.return=v,Pe=w):lx(r)}}function lx(r){for(;Pe!==null;){var i=Pe;if((i.flags&8772)!==0){var u=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:hn||Cl(5,i);break;case 1:var p=i.stateNode;if(i.flags&4&&!hn)if(u===null)p.componentDidMount();else{var v=i.elementType===i.type?u.memoizedProps:ar(i.type,u.memoizedProps);p.componentDidUpdate(v,u.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var w=i.updateQueue;w!==null&&cg(i,w,p);break;case 3:var E=i.updateQueue;if(E!==null){if(u=null,i.child!==null)switch(i.child.tag){case 5:u=i.child.stateNode;break;case 1:u=i.child.stateNode}cg(i,E,u)}break;case 5:var $=i.stateNode;if(u===null&&i.flags&4){u=$;var H=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&u.focus();break;case"img":H.src&&(u.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var se=i.alternate;if(se!==null){var ue=se.memoizedState;if(ue!==null){var de=ue.dehydrated;de!==null&&yi(de)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}hn||i.flags&512&&Cd(i)}catch(le){Et(i,i.return,le)}}if(i===r){Pe=null;break}if(u=i.sibling,u!==null){u.return=i.return,Pe=u;break}Pe=i.return}}function cx(r){for(;Pe!==null;){var i=Pe;if(i===r){Pe=null;break}var u=i.sibling;if(u!==null){u.return=i.return,Pe=u;break}Pe=i.return}}function ux(r){for(;Pe!==null;){var i=Pe;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{Cl(4,i)}catch(H){Et(i,u,H)}break;case 1:var p=i.stateNode;if(typeof p.componentDidMount=="function"){var v=i.return;try{p.componentDidMount()}catch(H){Et(i,v,H)}}var w=i.return;try{Cd(i)}catch(H){Et(i,w,H)}break;case 5:var E=i.return;try{Cd(i)}catch(H){Et(i,E,H)}}}catch(H){Et(i,i.return,H)}if(i===r){Pe=null;break}var $=i.sibling;if($!==null){$.return=i.return,Pe=$;break}Pe=i.return}}var oS=Math.ceil,El=A.ReactCurrentDispatcher,Td=A.ReactCurrentOwner,Xn=A.ReactCurrentBatchConfig,Qe=0,Yt=null,Lt=null,sn=0,$n=0,No=ls(0),Bt=0,Bi=null,Bs=0,Pl=0,Rd=0,Ui=null,Sn=null,Ad=0,Co=1/0,Kr=null,Tl=!1,Dd=null,hs=null,Rl=!1,ms=null,Al=0,Hi=0,Id=null,Dl=-1,Il=0;function yn(){return(Qe&6)!==0?At():Dl!==-1?Dl:Dl=At()}function gs(r){return(r.mode&1)===0?1:(Qe&2)!==0&&sn!==0?sn&-sn:Uk.transition!==null?(Il===0&&(Il=rm()),Il):(r=st,r!==0||(r=window.event,r=r===void 0?16:fm(r.type)),r)}function ur(r,i,u,p){if(50<Hi)throw Hi=0,Id=null,Error(n(185));pi(r,u,p),((Qe&2)===0||r!==Yt)&&(r===Yt&&((Qe&2)===0&&(Pl|=u),Bt===4&&xs(r,sn)),Nn(r,p),u===1&&Qe===0&&(i.mode&1)===0&&(Co=At()+500,al&&us()))}function Nn(r,i){var u=r.callbackNode;U1(r,i);var p=Ua(r,r===Yt?sn:0);if(p===0)u!==null&&em(u),r.callbackNode=null,r.callbackPriority=0;else if(i=p&-p,r.callbackPriority!==i){if(u!=null&&em(u),i===1)r.tag===0?Bk(fx.bind(null,r)):Qm(fx.bind(null,r)),_k(function(){(Qe&6)===0&&us()}),u=null;else{switch(sm(p)){case 1:u=fu;break;case 4:u=tm;break;case 16:u=$a;break;case 536870912:u=nm;break;default:u=$a}u=bx(u,dx.bind(null,r))}r.callbackPriority=i,r.callbackNode=u}}function dx(r,i){if(Dl=-1,Il=0,(Qe&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Eo()&&r.callbackNode!==u)return null;var p=Ua(r,r===Yt?sn:0);if(p===0)return null;if((p&30)!==0||(p&r.expiredLanes)!==0||i)i=Ll(r,p);else{i=p;var v=Qe;Qe|=2;var w=hx();(Yt!==r||sn!==i)&&(Kr=null,Co=At()+500,Hs(r,i));do try{lS();break}catch($){px(r,$)}while(!0);Qu(),El.current=w,Qe=v,Lt!==null?i=0:(Yt=null,sn=0,i=Bt)}if(i!==0){if(i===2&&(v=pu(r),v!==0&&(p=v,i=Ld(r,v))),i===1)throw u=Bi,Hs(r,0),xs(r,p),Nn(r,At()),u;if(i===6)xs(r,p);else{if(v=r.current.alternate,(p&30)===0&&!iS(v)&&(i=Ll(r,p),i===2&&(w=pu(r),w!==0&&(p=w,i=Ld(r,w))),i===1))throw u=Bi,Hs(r,0),xs(r,p),Nn(r,At()),u;switch(r.finishedWork=v,r.finishedLanes=p,i){case 0:case 1:throw Error(n(345));case 2:Ws(r,Sn,Kr);break;case 3:if(xs(r,p),(p&130023424)===p&&(i=Ad+500-At(),10<i)){if(Ua(r,0)!==0)break;if(v=r.suspendedLanes,(v&p)!==p){yn(),r.pingedLanes|=r.suspendedLanes&v;break}r.timeoutHandle=zu(Ws.bind(null,r,Sn,Kr),i);break}Ws(r,Sn,Kr);break;case 4:if(xs(r,p),(p&4194240)===p)break;for(i=r.eventTimes,v=-1;0<p;){var E=31-sr(p);w=1<<E,E=i[E],E>v&&(v=E),p&=~w}if(p=v,p=At()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*oS(p/1960))-p,10<p){r.timeoutHandle=zu(Ws.bind(null,r,Sn,Kr),p);break}Ws(r,Sn,Kr);break;case 5:Ws(r,Sn,Kr);break;default:throw Error(n(329))}}}return Nn(r,At()),r.callbackNode===u?dx.bind(null,r):null}function Ld(r,i){var u=Ui;return r.current.memoizedState.isDehydrated&&(Hs(r,i).flags|=256),r=Ll(r,i),r!==2&&(i=Sn,Sn=u,i!==null&&Od(i)),r}function Od(r){Sn===null?Sn=r:Sn.push.apply(Sn,r)}function iS(r){for(var i=r;;){if(i.flags&16384){var u=i.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var p=0;p<u.length;p++){var v=u[p],w=v.getSnapshot;v=v.value;try{if(!or(w(),v))return!1}catch{return!1}}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function xs(r,i){for(i&=~Rd,i&=~Pl,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var u=31-sr(i),p=1<<u;r[u]=-1,i&=~p}}function fx(r){if((Qe&6)!==0)throw Error(n(327));Eo();var i=Ua(r,0);if((i&1)===0)return Nn(r,At()),null;var u=Ll(r,i);if(r.tag!==0&&u===2){var p=pu(r);p!==0&&(i=p,u=Ld(r,p))}if(u===1)throw u=Bi,Hs(r,0),xs(r,i),Nn(r,At()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Ws(r,Sn,Kr),Nn(r,At()),null}function Md(r,i){var u=Qe;Qe|=1;try{return r(i)}finally{Qe=u,Qe===0&&(Co=At()+500,al&&us())}}function Us(r){ms!==null&&ms.tag===0&&(Qe&6)===0&&Eo();var i=Qe;Qe|=1;var u=Xn.transition,p=st;try{if(Xn.transition=null,st=1,r)return r()}finally{st=p,Xn.transition=u,Qe=i,(Qe&6)===0&&us()}}function _d(){$n=No.current,ft(No)}function Hs(r,i){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Mk(u)),Lt!==null)for(u=Lt.return;u!==null;){var p=u;switch(qu(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&ol();break;case 3:jo(),ft(wn),ft(dn),od();break;case 5:rd(p);break;case 4:jo();break;case 13:ft(wt);break;case 19:ft(wt);break;case 10:Ju(p.type._context);break;case 22:case 23:_d()}u=u.return}if(Yt=r,Lt=r=ys(r.current,null),sn=$n=i,Bt=0,Bi=null,Rd=Pl=Bs=0,Sn=Ui=null,$s!==null){for(i=0;i<$s.length;i++)if(u=$s[i],p=u.interleaved,p!==null){u.interleaved=null;var v=p.next,w=u.pending;if(w!==null){var E=w.next;w.next=v,p.next=E}u.pending=p}$s=null}return r}function px(r,i){do{var u=Lt;try{if(Qu(),xl.current=wl,yl){for(var p=jt.memoizedState;p!==null;){var v=p.queue;v!==null&&(v.pending=null),p=p.next}yl=!1}if(zs=0,Gt=zt=jt=null,Oi=!1,Mi=0,Td.current=null,u===null||u.return===null){Bt=1,Bi=i,Lt=null;break}e:{var w=r,E=u.return,$=u,H=i;if(i=sn,$.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var se=H,ue=$,de=ue.tag;if((ue.mode&1)===0&&(de===0||de===11||de===15)){var le=ue.alternate;le?(ue.updateQueue=le.updateQueue,ue.memoizedState=le.memoizedState,ue.lanes=le.lanes):(ue.updateQueue=null,ue.memoizedState=null)}var Se=$g(E);if(Se!==null){Se.flags&=-257,Fg(Se,E,$,w,i),Se.mode&1&&_g(w,se,i),i=Se,H=se;var Te=i.updateQueue;if(Te===null){var Re=new Set;Re.add(H),i.updateQueue=Re}else Te.add(H);break e}else{if((i&1)===0){_g(w,se,i),$d();break e}H=Error(n(426))}}else if(gt&&$.mode&1){var Dt=$g(E);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),Fg(Dt,E,$,w,i),Yu(ko(H,$));break e}}w=H=ko(H,$),Bt!==4&&(Bt=2),Ui===null?Ui=[w]:Ui.push(w),w=E;do{switch(w.tag){case 3:w.flags|=65536,i&=-i,w.lanes|=i;var X=Og(w,H,i);lg(w,X);break e;case 1:$=H;var W=w.type,ee=w.stateNode;if((w.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||ee!==null&&typeof ee.componentDidCatch=="function"&&(hs===null||!hs.has(ee)))){w.flags|=65536,i&=-i,w.lanes|=i;var me=Mg(w,$,i);lg(w,me);break e}}w=w.return}while(w!==null)}gx(u)}catch(De){i=De,Lt===u&&u!==null&&(Lt=u=u.return);continue}break}while(!0)}function hx(){var r=El.current;return El.current=wl,r===null?wl:r}function $d(){(Bt===0||Bt===3||Bt===2)&&(Bt=4),Yt===null||(Bs&268435455)===0&&(Pl&268435455)===0||xs(Yt,sn)}function Ll(r,i){var u=Qe;Qe|=2;var p=hx();(Yt!==r||sn!==i)&&(Kr=null,Hs(r,i));do try{aS();break}catch(v){px(r,v)}while(!0);if(Qu(),Qe=u,El.current=p,Lt!==null)throw Error(n(261));return Yt=null,sn=0,Bt}function aS(){for(;Lt!==null;)mx(Lt)}function lS(){for(;Lt!==null&&!I1();)mx(Lt)}function mx(r){var i=vx(r.alternate,r,$n);r.memoizedProps=r.pendingProps,i===null?gx(r):Lt=i,Td.current=null}function gx(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=eS(u,i,$n),u!==null){Lt=u;return}}else{if(u=tS(u,i),u!==null){u.flags&=32767,Lt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{Bt=6,Lt=null;return}}if(i=i.sibling,i!==null){Lt=i;return}Lt=i=r}while(i!==null);Bt===0&&(Bt=5)}function Ws(r,i,u){var p=st,v=Xn.transition;try{Xn.transition=null,st=1,cS(r,i,u,p)}finally{Xn.transition=v,st=p}return null}function cS(r,i,u,p){do Eo();while(ms!==null);if((Qe&6)!==0)throw Error(n(327));u=r.finishedWork;var v=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(H1(r,w),r===Yt&&(Lt=Yt=null,sn=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Rl||(Rl=!0,bx($a,function(){return Eo(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Xn.transition,Xn.transition=null;var E=st;st=1;var $=Qe;Qe|=4,Td.current=null,rS(r,u),ix(u,r),Tk($u),Va=!!_u,$u=_u=null,r.current=u,sS(u),L1(),Qe=$,st=E,Xn.transition=w}else r.current=u;if(Rl&&(Rl=!1,ms=r,Al=v),w=r.pendingLanes,w===0&&(hs=null),_1(u.stateNode),Nn(r,At()),i!==null)for(p=r.onRecoverableError,u=0;u<i.length;u++)v=i[u],p(v.value,{componentStack:v.stack,digest:v.digest});if(Tl)throw Tl=!1,r=Dd,Dd=null,r;return(Al&1)!==0&&r.tag!==0&&Eo(),w=r.pendingLanes,(w&1)!==0?r===Id?Hi++:(Hi=0,Id=r):Hi=0,us(),null}function Eo(){if(ms!==null){var r=sm(Al),i=Xn.transition,u=st;try{if(Xn.transition=null,st=16>r?16:r,ms===null)var p=!1;else{if(r=ms,ms=null,Al=0,(Qe&6)!==0)throw Error(n(331));var v=Qe;for(Qe|=4,Pe=r.current;Pe!==null;){var w=Pe,E=w.child;if((Pe.flags&16)!==0){var $=w.deletions;if($!==null){for(var H=0;H<$.length;H++){var se=$[H];for(Pe=se;Pe!==null;){var ue=Pe;switch(ue.tag){case 0:case 11:case 15:zi(8,ue,w)}var de=ue.child;if(de!==null)de.return=ue,Pe=de;else for(;Pe!==null;){ue=Pe;var le=ue.sibling,Se=ue.return;if(tx(ue),ue===se){Pe=null;break}if(le!==null){le.return=Se,Pe=le;break}Pe=Se}}}var Te=w.alternate;if(Te!==null){var Re=Te.child;if(Re!==null){Te.child=null;do{var Dt=Re.sibling;Re.sibling=null,Re=Dt}while(Re!==null)}}Pe=w}}if((w.subtreeFlags&2064)!==0&&E!==null)E.return=w,Pe=E;else e:for(;Pe!==null;){if(w=Pe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:zi(9,w,w.return)}var X=w.sibling;if(X!==null){X.return=w.return,Pe=X;break e}Pe=w.return}}var W=r.current;for(Pe=W;Pe!==null;){E=Pe;var ee=E.child;if((E.subtreeFlags&2064)!==0&&ee!==null)ee.return=E,Pe=ee;else e:for(E=W;Pe!==null;){if($=Pe,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:Cl(9,$)}}catch(De){Et($,$.return,De)}if($===E){Pe=null;break e}var me=$.sibling;if(me!==null){me.return=$.return,Pe=me;break e}Pe=$.return}}if(Qe=v,us(),vr&&typeof vr.onPostCommitFiberRoot=="function")try{vr.onPostCommitFiberRoot(Fa,r)}catch{}p=!0}return p}finally{st=u,Xn.transition=i}}return!1}function xx(r,i,u){i=ko(u,i),i=Og(r,i,1),r=fs(r,i,1),i=yn(),r!==null&&(pi(r,1,i),Nn(r,i))}function Et(r,i,u){if(r.tag===3)xx(r,r,u);else for(;i!==null;){if(i.tag===3){xx(i,r,u);break}else if(i.tag===1){var p=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(hs===null||!hs.has(p))){r=ko(u,r),r=Mg(i,r,1),i=fs(i,r,1),r=yn(),i!==null&&(pi(i,1,r),Nn(i,r));break}}i=i.return}}function uS(r,i,u){var p=r.pingCache;p!==null&&p.delete(i),i=yn(),r.pingedLanes|=r.suspendedLanes&u,Yt===r&&(sn&u)===u&&(Bt===4||Bt===3&&(sn&130023424)===sn&&500>At()-Ad?Hs(r,0):Rd|=u),Nn(r,i)}function yx(r,i){i===0&&((r.mode&1)===0?i=1:(i=Ba,Ba<<=1,(Ba&130023424)===0&&(Ba=4194304)));var u=yn();r=Wr(r,i),r!==null&&(pi(r,i,u),Nn(r,u))}function dS(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),yx(r,u)}function fS(r,i){var u=0;switch(r.tag){case 13:var p=r.stateNode,v=r.memoizedState;v!==null&&(u=v.retryLane);break;case 19:p=r.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(i),yx(r,u)}var vx;vx=function(r,i,u){if(r!==null)if(r.memoizedProps!==i.pendingProps||wn.current)kn=!0;else{if((r.lanes&u)===0&&(i.flags&128)===0)return kn=!1,Zk(r,i,u);kn=(r.flags&131072)!==0}else kn=!1,gt&&(i.flags&1048576)!==0&&Jm(i,cl,i.index);switch(i.lanes=0,i.tag){case 2:var p=i.type;Sl(r,i),r=i.pendingProps;var v=mo(i,dn.current);wo(i,u),v=ld(null,i,p,r,v,u);var w=cd();return i.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,jn(p)?(w=!0,il(i)):w=!1,i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,td(i),v.updater=jl,i.stateNode=v,v._reactInternals=i,md(i,p,r,u),i=vd(null,i,p,!0,w,u)):(i.tag=0,gt&&w&&Vu(i),xn(null,i,v,u),i=i.child),i;case 16:p=i.elementType;e:{switch(Sl(r,i),r=i.pendingProps,v=p._init,p=v(p._payload),i.type=p,v=i.tag=hS(p),r=ar(p,r),v){case 0:i=yd(null,i,p,r,u);break e;case 1:i=Vg(null,i,p,r,u);break e;case 11:i=zg(null,i,p,r,u);break e;case 14:i=Bg(null,i,p,ar(p.type,r),u);break e}throw Error(n(306,p,""))}return i;case 0:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:ar(p,v),yd(r,i,p,v,u);case 1:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:ar(p,v),Vg(r,i,p,v,u);case 3:e:{if(qg(i),r===null)throw Error(n(387));p=i.pendingProps,w=i.memoizedState,v=w.element,ag(r,i),ml(i,p,null,u);var E=i.memoizedState;if(p=E.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},i.updateQueue.baseState=w,i.memoizedState=w,i.flags&256){v=ko(Error(n(423)),i),i=Kg(r,i,p,u,v);break e}else if(p!==v){v=ko(Error(n(424)),i),i=Kg(r,i,p,u,v);break e}else for(_n=as(i.stateNode.containerInfo.firstChild),Mn=i,gt=!0,ir=null,u=og(i,null,p,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(yo(),p===v){i=qr(r,i,u);break e}xn(r,i,p,u)}i=i.child}return i;case 5:return ug(i),r===null&&Gu(i),p=i.type,v=i.pendingProps,w=r!==null?r.memoizedProps:null,E=v.children,Fu(p,v)?E=null:w!==null&&Fu(p,w)&&(i.flags|=32),Wg(r,i),xn(r,i,E,u),i.child;case 6:return r===null&&Gu(i),null;case 13:return Gg(r,i,u);case 4:return nd(i,i.stateNode.containerInfo),p=i.pendingProps,r===null?i.child=vo(i,null,p,u):xn(r,i,p,u),i.child;case 11:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:ar(p,v),zg(r,i,p,v,u);case 7:return xn(r,i,i.pendingProps,u),i.child;case 8:return xn(r,i,i.pendingProps.children,u),i.child;case 12:return xn(r,i,i.pendingProps.children,u),i.child;case 10:e:{if(p=i.type._context,v=i.pendingProps,w=i.memoizedProps,E=v.value,lt(fl,p._currentValue),p._currentValue=E,w!==null)if(or(w.value,E)){if(w.children===v.children&&!wn.current){i=qr(r,i,u);break e}}else for(w=i.child,w!==null&&(w.return=i);w!==null;){var $=w.dependencies;if($!==null){E=w.child;for(var H=$.firstContext;H!==null;){if(H.context===p){if(w.tag===1){H=Vr(-1,u&-u),H.tag=2;var se=w.updateQueue;if(se!==null){se=se.shared;var ue=se.pending;ue===null?H.next=H:(H.next=ue.next,ue.next=H),se.pending=H}}w.lanes|=u,H=w.alternate,H!==null&&(H.lanes|=u),Zu(w.return,u,i),$.lanes|=u;break}H=H.next}}else if(w.tag===10)E=w.type===i.type?null:w.child;else if(w.tag===18){if(E=w.return,E===null)throw Error(n(341));E.lanes|=u,$=E.alternate,$!==null&&($.lanes|=u),Zu(E,u,i),E=w.sibling}else E=w.child;if(E!==null)E.return=w;else for(E=w;E!==null;){if(E===i){E=null;break}if(w=E.sibling,w!==null){w.return=E.return,E=w;break}E=E.return}w=E}xn(r,i,v.children,u),i=i.child}return i;case 9:return v=i.type,p=i.pendingProps.children,wo(i,u),v=Gn(v),p=p(v),i.flags|=1,xn(r,i,p,u),i.child;case 14:return p=i.type,v=ar(p,i.pendingProps),v=ar(p.type,v),Bg(r,i,p,v,u);case 15:return Ug(r,i,i.type,i.pendingProps,u);case 17:return p=i.type,v=i.pendingProps,v=i.elementType===p?v:ar(p,v),Sl(r,i),i.tag=1,jn(p)?(r=!0,il(i)):r=!1,wo(i,u),Ig(i,p,v),md(i,p,v,u),vd(null,i,p,!0,r,u);case 19:return Xg(r,i,u);case 22:return Hg(r,i,u)}throw Error(n(156,i.tag))};function bx(r,i){return Zh(r,i)}function pS(r,i,u,p){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,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 Qn(r,i,u,p){return new pS(r,i,u,p)}function Fd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function hS(r){if(typeof r=="function")return Fd(r)?1:0;if(r!=null){if(r=r.$$typeof,r===K)return 11;if(r===_)return 14}return 2}function ys(r,i){var u=r.alternate;return u===null?(u=Qn(r.tag,i,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=i,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,i=r.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Ol(r,i,u,p,v,w){var E=2;if(p=r,typeof r=="function")Fd(r)&&(E=1);else if(typeof r=="string")E=5;else e:switch(r){case D:return Vs(u.children,v,w,i);case O:E=8,v|=8;break;case G:return r=Qn(12,u,i,v|2),r.elementType=G,r.lanes=w,r;case q:return r=Qn(13,u,i,v),r.elementType=q,r.lanes=w,r;case J:return r=Qn(19,u,i,v),r.elementType=J,r.lanes=w,r;case B:return Ml(u,v,w,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case re:E=10;break e;case z:E=9;break e;case K:E=11;break e;case _:E=14;break e;case F:E=16,p=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=Qn(E,u,i,v),i.elementType=r,i.type=p,i.lanes=w,i}function Vs(r,i,u,p){return r=Qn(7,r,p,i),r.lanes=u,r}function Ml(r,i,u,p){return r=Qn(22,r,p,i),r.elementType=B,r.lanes=u,r.stateNode={isHidden:!1},r}function zd(r,i,u){return r=Qn(6,r,null,i),r.lanes=u,r}function Bd(r,i,u){return i=Qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=u,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function mS(r,i,u,p,v){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hu(0),this.expirationTimes=hu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hu(0),this.identifierPrefix=p,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Ud(r,i,u,p,v,w,E,$,H){return r=new mS(r,i,u,$,H),i===1?(i=1,w===!0&&(i|=8)):i=0,w=Qn(3,null,null,i),r.current=w,w.stateNode=r,w.memoizedState={element:p,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},td(w),r}function gS(r,i,u){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:p==null?null:""+p,children:r,containerInfo:i,implementation:u}}function wx(r){if(!r)return cs;r=r._reactInternals;e:{if(Is(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(jn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(jn(u))return Ym(r,u,i)}return i}function jx(r,i,u,p,v,w,E,$,H){return r=Ud(u,p,!0,r,v,w,E,$,H),r.context=wx(null),u=r.current,p=yn(),v=gs(u),w=Vr(p,v),w.callback=i??null,fs(u,w,v),r.current.lanes=v,pi(r,v,p),Nn(r,p),r}function _l(r,i,u,p){var v=i.current,w=yn(),E=gs(v);return u=wx(u),i.context===null?i.context=u:i.pendingContext=u,i=Vr(w,E),i.payload={element:r},p=p===void 0?null:p,p!==null&&(i.callback=p),r=fs(v,i,E),r!==null&&(ur(r,v,E,w),hl(r,v,E)),E}function $l(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function kx(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function Hd(r,i){kx(r,i),(r=r.alternate)&&kx(r,i)}function xS(){return null}var Sx=typeof reportError=="function"?reportError:function(r){console.error(r)};function Wd(r){this._internalRoot=r}Fl.prototype.render=Wd.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));_l(r,i,null,null)},Fl.prototype.unmount=Wd.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Us(function(){_l(null,r,null,null)}),i[zr]=null}};function Fl(r){this._internalRoot=r}Fl.prototype.unstable_scheduleHydration=function(r){if(r){var i=am();r={blockedOn:null,target:r,priority:i};for(var u=0;u<ss.length&&i!==0&&i<ss[u].priority;u++);ss.splice(u,0,r),u===0&&um(r)}};function Vd(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function zl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Nx(){}function yS(r,i,u,p,v){if(v){if(typeof p=="function"){var w=p;p=function(){var se=$l(E);w.call(se)}}var E=jx(i,p,r,0,null,!1,!1,"",Nx);return r._reactRootContainer=E,r[zr]=E.current,Ei(r.nodeType===8?r.parentNode:r),Us(),E}for(;v=r.lastChild;)r.removeChild(v);if(typeof p=="function"){var $=p;p=function(){var se=$l(H);$.call(se)}}var H=Ud(r,0,!1,null,null,!1,!1,"",Nx);return r._reactRootContainer=H,r[zr]=H.current,Ei(r.nodeType===8?r.parentNode:r),Us(function(){_l(i,H,u,p)}),H}function Bl(r,i,u,p,v){var w=u._reactRootContainer;if(w){var E=w;if(typeof v=="function"){var $=v;v=function(){var H=$l(E);$.call(H)}}_l(i,E,r,v)}else E=yS(u,i,r,v,p);return $l(E)}om=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var u=fi(i.pendingLanes);u!==0&&(mu(i,u|1),Nn(i,At()),(Qe&6)===0&&(Co=At()+500,us()))}break;case 13:Us(function(){var p=Wr(r,1);if(p!==null){var v=yn();ur(p,r,1,v)}}),Hd(r,1)}},gu=function(r){if(r.tag===13){var i=Wr(r,134217728);if(i!==null){var u=yn();ur(i,r,134217728,u)}Hd(r,134217728)}},im=function(r){if(r.tag===13){var i=gs(r),u=Wr(r,i);if(u!==null){var p=yn();ur(u,r,i,p)}Hd(r,i)}},am=function(){return st},lm=function(r,i){var u=st;try{return st=r,i()}finally{st=u}},ln=function(r,i,u){switch(i){case"input":if(qe(r,u),i=u.name,u.type==="radio"&&i!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<u.length;i++){var p=u[i];if(p!==r&&p.form===r.form){var v=sl(p);if(!v)throw Error(n(90));Xe(p),qe(p,v)}}}break;case"textarea":en(r,u);break;case"select":i=u.value,i!=null&&Nt(r,!!u.multiple,i,!1)}},nn=Md,cn=Us;var vS={usingClientEntryPoint:!1,Events:[Ri,po,sl,Rt,Kt,Md]},Wi={findFiberByHostInstance:Ls,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bS={bundleType:Wi.bundleType,version:Wi.version,rendererPackageName:Wi.rendererPackageName,rendererConfig:Wi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Qh(r),r===null?null:r.stateNode},findFiberByHostInstance:Wi.findFiberByHostInstance||xS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ul=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ul.isDisabled&&Ul.supportsFiber)try{Fa=Ul.inject(bS),vr=Ul}catch{}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vS,Cn.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vd(i))throw Error(n(200));return gS(r,i,null,u)},Cn.createRoot=function(r,i){if(!Vd(r))throw Error(n(299));var u=!1,p="",v=Sx;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onRecoverableError!==void 0&&(v=i.onRecoverableError)),i=Ud(r,1,!1,null,null,u,!1,p,v),r[zr]=i.current,Ei(r.nodeType===8?r.parentNode:r),new Wd(i)},Cn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Qh(i),r=r===null?null:r.stateNode,r},Cn.flushSync=function(r){return Us(r)},Cn.hydrate=function(r,i,u){if(!zl(i))throw Error(n(200));return Bl(null,r,i,!0,u)},Cn.hydrateRoot=function(r,i,u){if(!Vd(r))throw Error(n(405));var p=u!=null&&u.hydratedSources||null,v=!1,w="",E=Sx;if(u!=null&&(u.unstable_strictMode===!0&&(v=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(E=u.onRecoverableError)),i=jx(i,null,r,1,u??null,v,!1,w,E),r[zr]=i.current,Ei(r),p)for(r=0;r<p.length;r++)u=p[r],v=u._getVersion,v=v(u._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[u,v]:i.mutableSourceEagerHydrationData.push(u,v);return new Fl(i)},Cn.render=function(r,i,u){if(!zl(i))throw Error(n(200));return Bl(null,r,i,!1,u)},Cn.unmountComponentAtNode=function(r){if(!zl(r))throw Error(n(40));return r._reactRootContainer?(Us(function(){Bl(null,null,r,!1,function(){r._reactRootContainer=null,r[zr]=null})}),!0):!1},Cn.unstable_batchedUpdates=Md,Cn.unstable_renderSubtreeIntoContainer=function(r,i,u,p){if(!zl(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Bl(r,i,u,!1,p)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Ix;function Qv(){if(Ix)return Gd.exports;Ix=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(),Gd.exports=PS(),Gd.exports}var Lx;function TS(){if(Lx)return Hl;Lx=1;var e=Qv();return Hl.createRoot=e.createRoot,Hl.hydrateRoot=e.hydrateRoot,Hl}var RS=TS();/**
|
|
41
|
+
* react-router v7.13.1
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var Ox="popstate";function Mx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function AS(e={}){function t(s,a){var m;let l=(m=a.state)==null?void 0:m.masked,{pathname:c,search:d,hash:f}=l||s.location;return Uf("",{pathname:c,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",l?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,a){return typeof a=="string"?a:xa(a)}return IS(t,n,null,e)}function kt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DS(){return Math.random().toString(36).substring(2,10)}function _x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Uf(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Yo(t):t,state:n,key:t&&t.key||s||DS(),unstable_mask:a}}function xa({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Yo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function IS(e,t,n,s={}){let{window:a=document.defaultView,v5Compat:l=!1}=s,c=a.history,d="POP",f=null,m=h();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function h(){return(c.state||{idx:null}).idx}function x(){d="POP";let j=h(),S=j==null?null:j-m;m=j,f&&f({action:d,location:k.location,delta:S})}function y(j,S){d="PUSH";let T=Mx(j)?j:Uf(k.location,j,S);m=h()+1;let N=_x(T,m),A=k.createHref(T.unstable_mask||T);try{c.pushState(N,"",A)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;a.location.assign(A)}l&&f&&f({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let T=Mx(j)?j:Uf(k.location,j,S);m=h();let N=_x(T,m),A=k.createHref(T.unstable_mask||T);c.replaceState(N,"",A),l&&f&&f({action:d,location:k.location,delta:0})}function C(j){return LS(j)}let k={get action(){return d},get location(){return e(a,c)},listen(j){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Ox,x),f=j,()=>{a.removeEventListener(Ox,x),f=null}},createHref(j){return t(a,j)},createURL:C,encodeLocation(j){let S=C(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:y,replace:b,go(j){return c.go(j)}};return k}function LS(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),kt(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:xa(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function Jv(e,t,n="/"){return OS(e,t,n,!1)}function OS(e,t,n,s){let a=typeof t=="string"?Yo(t):t,l=Xr(a.pathname||"/",n);if(l==null)return null;let c=Zv(e);MS(c);let d=null;for(let f=0;d==null&&f<c.length;++f){let m=KS(l);d=VS(c[f],m,s)}return d}function Zv(e,t=[],n=[],s="",a=!1){let l=(c,d,f=a,m)=>{let h={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(s)&&f)return;kt(h.relativePath.startsWith(s),`Absolute route path "${h.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(s.length)}let x=Pr([s,h.relativePath]),y=n.concat(h);c.children&&c.children.length>0&&(kt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Zv(c.children,t,y,x,f)),!(c.path==null&&!c.index)&&t.push({path:x,score:HS(x,c.index),routesMeta:y})};return e.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))l(c,d);else for(let m of eb(c.path))l(c,d,!0,m)}),t}function eb(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return a?[l,""]:[l];let c=eb(s.join("/")),d=[];return d.push(...c.map(f=>f===""?l:[l,f].join("/"))),a&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function MS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:WS(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var _S=/^:[\w-]+$/,$S=3,FS=2,zS=1,BS=10,US=-2,$x=e=>e==="*";function HS(e,t){let n=e.split("/"),s=n.length;return n.some($x)&&(s+=US),t&&(s+=FS),n.filter(a=>!$x(a)).reduce((a,l)=>a+(_S.test(l)?$S:l===""?zS:BS),s)}function WS(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function VS(e,t,n=!1){let{routesMeta:s}=e,a={},l="/",c=[];for(let d=0;d<s.length;++d){let f=s[d],m=d===s.length-1,h=l==="/"?t:t.slice(l.length)||"/",x=mc({path:f.relativePath,caseSensitive:f.caseSensitive,end:m},h),y=f.route;if(!x&&m&&n&&!s[s.length-1].route.index&&(x=mc({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},h)),!x)return null;Object.assign(a,x.params),c.push({params:a,pathname:Pr([l,x.pathname]),pathnameBase:QS(Pr([l,x.pathnameBase])),route:y}),x.pathnameBase!=="/"&&(l=Pr([l,x.pathnameBase]))}return c}function mc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=qS(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let l=a[0],c=l.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:s.reduce((m,{paramName:h,isOptional:x},y)=>{if(h==="*"){let C=d[y]||"";c=l.slice(0,l.length-C.length).replace(/(.)\/+$/,"$1")}const b=d[y];return x&&!b?m[h]=void 0:m[h]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:e}}function qS(e,t=!1,n=!0){fr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,f,m,h)=>{if(s.push({paramName:d,isOptional:f!=null}),f){let x=h.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function KS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Xr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}var GS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function YS(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Yo(e):e,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=Fx(n.substring(1),"/"):l=Fx(n,t)):l=t,{pathname:l,search:JS(s),hash:ZS(a)}}function Fx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Qd(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function XS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tb(e){let t=XS(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Ep(e,t,n,s=!1){let a;typeof e=="string"?a=Yo(e):(a={...e},kt(!a.pathname||!a.pathname.includes("?"),Qd("?","pathname","search",a)),kt(!a.pathname||!a.pathname.includes("#"),Qd("#","pathname","hash",a)),kt(!a.search||!a.search.includes("#"),Qd("#","search","hash",a)));let l=e===""||a.pathname==="",c=l?"/":a.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!s&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),x-=1;a.pathname=y.join("/")}d=x>=0?t[x]:"/"}let f=YS(a,d),m=c&&c!=="/"&&c.endsWith("/"),h=(l||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(m||h)&&(f.pathname+="/"),f}var Pr=e=>e.join("/").replace(/\/\/+/g,"/"),QS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),JS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ZS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,eN=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function tN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function nN(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var nb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rb(e,t){let n=e;if(typeof n!="string"||!GS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(nb)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Xr(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:a=!0}catch{fr(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sb=["POST","PUT","PATCH","DELETE"];new Set(sb);var rN=["GET",...sb];new Set(rN);var Xo=g.createContext(null);Xo.displayName="DataRouter";var Ic=g.createContext(null);Ic.displayName="DataRouterState";var sN=g.createContext(!1),ob=g.createContext({isTransitioning:!1});ob.displayName="ViewTransition";var oN=g.createContext(new Map);oN.displayName="Fetchers";var iN=g.createContext(null);iN.displayName="Await";var er=g.createContext(null);er.displayName="Navigation";var Sa=g.createContext(null);Sa.displayName="Location";var gr=g.createContext({outlet:null,matches:[],isDataRoute:!1});gr.displayName="Route";var Pp=g.createContext(null);Pp.displayName="RouteError";var ib="REACT_ROUTER_ERROR",aN="REDIRECT",lN="ROUTE_ERROR_RESPONSE";function cN(e){if(e.startsWith(`${ib}:${aN}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function uN(e){if(e.startsWith(`${ib}:${lN}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new eN(t.status,t.statusText,t.data)}catch{}}function dN(e,{relative:t}={}){kt(Na(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=g.useContext(er),{hash:a,pathname:l,search:c}=Ca(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Pr([n,l])),s.createHref({pathname:d,search:c,hash:a})}function Na(){return g.useContext(Sa)!=null}function vn(){return kt(Na(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Sa).location}var ab="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function lb(e){g.useContext(er).static||g.useLayoutEffect(e)}function St(){let{isDataRoute:e}=g.useContext(gr);return e?CN():fN()}function fN(){kt(Na(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Xo),{basename:t,navigator:n}=g.useContext(er),{matches:s}=g.useContext(gr),{pathname:a}=vn(),l=JSON.stringify(tb(s)),c=g.useRef(!1);return lb(()=>{c.current=!0}),g.useCallback((f,m={})=>{if(fr(c.current,ab),!c.current)return;if(typeof f=="number"){n.go(f);return}let h=Ep(f,JSON.parse(l),a,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Pr([t,h.pathname])),(m.replace?n.replace:n.push)(h,m.state,m)},[t,n,l,a,e])}var pN=g.createContext(null);function hN(e){let t=g.useContext(gr).outlet;return g.useMemo(()=>t&&g.createElement(pN.Provider,{value:e},t),[t,e])}function mt(){let{matches:e}=g.useContext(gr),t=e[e.length-1];return t?t.params:{}}function Ca(e,{relative:t}={}){let{matches:n}=g.useContext(gr),{pathname:s}=vn(),a=JSON.stringify(tb(n));return g.useMemo(()=>Ep(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function mN(e,t){return cb(e,t)}function cb(e,t,n){var j;kt(Na(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=g.useContext(er),{matches:a}=g.useContext(gr),l=a[a.length-1],c=l?l.params:{},d=l?l.pathname:"/",f=l?l.pathnameBase:"/",m=l&&l.route;{let S=m&&m.path||"";db(d,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let h=vn(),x;if(t){let S=typeof t=="string"?Yo(t):t;kt(f==="/"||((j=S.pathname)==null?void 0:j.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=h;let y=x.pathname||"/",b=y;if(f!=="/"){let S=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(S.length).join("/")}let C=Jv(e,{pathname:b});fr(m||C!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),fr(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=bN(C&&C.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Pr([f,s.encodeLocation?s.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?f:Pr([f,s.encodeLocation?s.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),a,n);return t&&k?g.createElement(Sa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function gN(){let e=NN(),t=tN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},l={padding:"2px 4px",backgroundColor:s},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:l},"ErrorBoundary")," or"," ",g.createElement("code",{style:l},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:a},n):null,c)}var xN=g.createElement(gN,null),ub=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=uN(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(gr.Provider,{value:this.props.routeContext},g.createElement(Pp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(yN,{error:e},t):t}};ub.contextType=sN;var Jd=new WeakMap;function yN({children:e,error:t}){let{basename:n}=g.useContext(er);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=cN(t.digest);if(s){let a=Jd.get(t);if(a)throw a;let l=rb(s.location,n);if(nb&&!Jd.get(t))if(l.isExternal||s.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:s.replace}));throw Jd.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function vN({routeContext:e,match:t,children:n}){let s=g.useContext(Xo);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(gr.Provider,{value:e},n)}function bN(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let a=e,l=s==null?void 0:s.errors;if(l!=null){let h=a.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);kt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),a=a.slice(0,Math.min(a.length,h+1))}let c=!1,d=-1;if(n&&s){c=s.renderFallback;for(let h=0;h<a.length;h++){let x=a[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=h),x.route.id){let{loaderData:y,errors:b}=s,C=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||C){n.isStatic&&(c=!0),d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,m=s&&f?(h,x)=>{var y,b;f(h,{location:s.location,params:((b=(y=s.matches)==null?void 0:y[0])==null?void 0:b.params)??{},unstable_pattern:nN(s.matches),errorInfo:x})}:void 0;return a.reduceRight((h,x,y)=>{let b,C=!1,k=null,j=null;s&&(b=l&&x.route.id?l[x.route.id]:void 0,k=x.route.errorElement||xN,c&&(d<0&&y===0?(db("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,j=null):d===y&&(C=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(a.slice(0,y+1)),T=()=>{let N;return b?N=k:C?N=j:x.route.Component?N=g.createElement(x.route.Component,null):x.route.element?N=x.route.element:N=h,g.createElement(vN,{match:x,routeContext:{outlet:h,matches:S,isDataRoute:s!=null},children:N})};return s&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?g.createElement(ub,{location:s.location,revalidation:s.revalidation,component:k,error:b,children:T(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:m}):T()},null)}function Tp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wN(e){let t=g.useContext(Xo);return kt(t,Tp(e)),t}function jN(e){let t=g.useContext(Ic);return kt(t,Tp(e)),t}function kN(e){let t=g.useContext(gr);return kt(t,Tp(e)),t}function Rp(e){let t=kN(e),n=t.matches[t.matches.length-1];return kt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function SN(){return Rp("useRouteId")}function NN(){var s;let e=g.useContext(Pp),t=jN("useRouteError"),n=Rp("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function CN(){let{router:e}=wN("useNavigate"),t=Rp("useNavigate"),n=g.useRef(!1);return lb(()=>{n.current=!0}),g.useCallback(async(a,l={})=>{fr(n.current,ab),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...l}))},[e,t])}var zx={};function db(e,t,n){!t&&!zx[e]&&(zx[e]=!0,fr(!1,n))}g.memo(EN);function EN({routes:e,future:t,state:n,isStatic:s,onError:a}){return cb(e,void 0,{state:n,isStatic:s,onError:a})}function PN(e){return hN(e.context)}function Ie(e){kt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function TN({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:a,static:l=!1,unstable_useTransitions:c}){kt(!Na(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=g.useMemo(()=>({basename:d,navigator:a,static:l,unstable_useTransitions:c,future:{}}),[d,a,l,c]);typeof n=="string"&&(n=Yo(n));let{pathname:m="/",search:h="",hash:x="",state:y=null,key:b="default",unstable_mask:C}=n,k=g.useMemo(()=>{let j=Xr(m,d);return j==null?null:{location:{pathname:j,search:h,hash:x,state:y,key:b,unstable_mask:C},navigationType:s}},[d,m,h,x,y,b,s,C]);return fr(k!=null,`<Router basename="${d}"> is not able to match the URL "${m}${h}${x}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:g.createElement(er.Provider,{value:f},g.createElement(Sa.Provider,{children:t,value:k}))}function RN({children:e,location:t}){return mN(Hf(e),t)}function Hf(e,t=[]){let n=[];return g.Children.forEach(e,(s,a)=>{if(!g.isValidElement(s))return;let l=[...t,a];if(s.type===g.Fragment){n.push.apply(n,Hf(s.props.children,l));return}kt(s.type===Ie,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),kt(!s.props.index||!s.props.children,"An index route cannot have child routes.");let c={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(c.children=Hf(s.props.children,l)),n.push(c)}),n}var sc="get",oc="application/x-www-form-urlencoded";function Lc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function AN(e){return Lc(e)&&e.tagName.toLowerCase()==="button"}function DN(e){return Lc(e)&&e.tagName.toLowerCase()==="form"}function IN(e){return Lc(e)&&e.tagName.toLowerCase()==="input"}function LN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ON(e,t){return e.button===0&&(!t||t==="_self")&&!LN(e)}function Wf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(a=>[n,a]):[[n,s]])},[]))}function MN(e,t){let n=Wf(e);return t&&t.forEach((s,a)=>{n.has(a)||t.getAll(a).forEach(l=>{n.append(a,l)})}),n}var Wl=null;function _N(){if(Wl===null)try{new FormData(document.createElement("form"),0),Wl=!1}catch{Wl=!0}return Wl}var $N=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zd(e){return e!=null&&!$N.has(e)?(fr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oc}"`),null):e}function FN(e,t){let n,s,a,l,c;if(DN(e)){let d=e.getAttribute("action");s=d?Xr(d,t):null,n=e.getAttribute("method")||sc,a=Zd(e.getAttribute("enctype"))||oc,l=new FormData(e)}else if(AN(e)||IN(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(s=f?Xr(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||sc,a=Zd(e.getAttribute("formenctype"))||Zd(d.getAttribute("enctype"))||oc,l=new FormData(d,e),!_N()){let{name:m,type:h,value:x}=e;if(h==="image"){let y=m?`${m}.`:"";l.append(`${y}x`,"0"),l.append(`${y}y`,"0")}else m&&l.append(m,x)}}else{if(Lc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=sc,s=null,a=oc,c=e}return l&&a==="text/plain"&&(c=l,l=void 0),{action:s,method:n.toLowerCase(),encType:a,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ap(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zN(e,t,n,s){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${s}`:a.pathname=`${a.pathname}.${s}`:a.pathname==="/"?a.pathname=`_root.${s}`:t&&Xr(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${s}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${s}`,a}async function BN(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function UN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function HN(e,t,n){let s=await Promise.all(e.map(async a=>{let l=t.routes[a.route.id];if(l){let c=await BN(l,n);return c.links?c.links():[]}return[]}));return KN(s.flat(1).filter(UN).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Bx(e,t,n,s,a,l){let c=(f,m)=>n[m]?f.route.id!==n[m].route.id:!0,d=(f,m)=>{var h;return n[m].pathname!==f.pathname||((h=n[m].route.path)==null?void 0:h.endsWith("*"))&&n[m].params["*"]!==f.params["*"]};return l==="assets"?t.filter((f,m)=>c(f,m)||d(f,m)):l==="data"?t.filter((f,m)=>{var x;let h=s.routes[f.route.id];if(!h||!h.hasLoader)return!1;if(c(f,m)||d(f,m))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function WN(e,t,{includeHydrateFallback:n}={}){return VN(e.map(s=>{let a=t.routes[s.route.id];if(!a)return[];let l=[a.module];return a.clientActionModule&&(l=l.concat(a.clientActionModule)),a.clientLoaderModule&&(l=l.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(l=l.concat(a.hydrateFallbackModule)),a.imports&&(l=l.concat(a.imports)),l}).flat(1))}function VN(e){return[...new Set(e)]}function qN(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function KN(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let l=JSON.stringify(qN(a));return n.has(l)||(n.add(l),s.push({key:l,link:a})),s},[])}function fb(){let e=g.useContext(Xo);return Ap(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function GN(){let e=g.useContext(Ic);return Ap(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Dp=g.createContext(void 0);Dp.displayName="FrameworkContext";function pb(){let e=g.useContext(Dp);return Ap(e,"You must render this element inside a <HydratedRouter> element"),e}function YN(e,t){let n=g.useContext(Dp),[s,a]=g.useState(!1),[l,c]=g.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:m,onMouseLeave:h,onTouchStart:x}=t,y=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(T=>{c(T.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return y.current&&j.observe(y.current),()=>{j.disconnect()}}},[e]),g.useEffect(()=>{if(s){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[s]);let b=()=>{a(!0)},C=()=>{a(!1),c(!1)};return n?e!=="intent"?[l,y,{}]:[l,y,{onFocus:qi(d,b),onBlur:qi(f,C),onMouseEnter:qi(m,b),onMouseLeave:qi(h,C),onTouchStart:qi(x,b)}]:[!1,y,{}]}function qi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function XN({page:e,...t}){let{router:n}=fb(),s=g.useMemo(()=>Jv(n.routes,e,n.basename),[n.routes,e,n.basename]);return s?g.createElement(JN,{page:e,matches:s,...t}):null}function QN(e){let{manifest:t,routeModules:n}=pb(),[s,a]=g.useState([]);return g.useEffect(()=>{let l=!1;return HN(e,t,n).then(c=>{l||a(c)}),()=>{l=!0}},[e,t,n]),s}function JN({page:e,matches:t,...n}){let s=vn(),{future:a,manifest:l,routeModules:c}=pb(),{basename:d}=fb(),{loaderData:f,matches:m}=GN(),h=g.useMemo(()=>Bx(e,t,m,l,s,"data"),[e,t,m,l,s]),x=g.useMemo(()=>Bx(e,t,m,l,s,"assets"),[e,t,m,l,s]),y=g.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let k=new Set,j=!1;if(t.forEach(T=>{var A;let N=l.routes[T.route.id];!N||!N.hasLoader||(!h.some(L=>L.route.id===T.route.id)&&T.route.id in f&&((A=c[T.route.id])!=null&&A.shouldRevalidate)||N.hasClientLoader?j=!0:k.add(T.route.id))}),k.size===0)return[];let S=zN(e,d,a.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(T=>k.has(T.route.id)).map(T=>T.route.id).join(",")),[S.pathname+S.search]},[d,a.unstable_trailingSlashAwareDataRequests,f,s,l,h,t,e,c]),b=g.useMemo(()=>WN(x,l),[x,l]),C=QN(x);return g.createElement(g.Fragment,null,y.map(k=>g.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...n})),b.map(k=>g.createElement("link",{key:k,rel:"modulepreload",href:k,...n})),C.map(({key:k,link:j})=>g.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function ZN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var eC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{eC&&(window.__reactRouterVersion="7.13.1")}catch{}function tC({basename:e,children:t,unstable_useTransitions:n,window:s}){let a=g.useRef();a.current==null&&(a.current=AS({window:s,v5Compat:!0}));let l=a.current,[c,d]=g.useState({action:l.action,location:l.location}),f=g.useCallback(m=>{n===!1?d(m):g.startTransition(()=>d(m))},[n]);return g.useLayoutEffect(()=>l.listen(f),[l,f]),g.createElement(TN,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var hb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ye=g.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:a,reloadDocument:l,replace:c,unstable_mask:d,state:f,target:m,to:h,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b,...C},k){let{basename:j,navigator:S,unstable_useTransitions:T}=g.useContext(er),N=typeof h=="string"&&hb.test(h),A=rb(h,j);h=A.to;let L=dN(h,{relative:a}),R=vn(),D=null;if(d){let _=Ep(d,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);j!=="/"&&(_.pathname=_.pathname==="/"?j:Pr([j,_.pathname])),D=S.createHref(_)}let[O,G,re]=YN(s,C),z=oC(h,{replace:c,unstable_mask:d,state:f,target:m,preventScrollReset:x,relative:a,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function K(_){t&&t(_),_.defaultPrevented||z(_)}let q=!(A.isExternal||l),J=g.createElement("a",{...C,...re,href:(q?D:void 0)||A.absoluteURL||L,onClick:q?K:t,ref:ZN(k,G),target:m,"data-discover":!N&&n==="render"?"true":void 0});return O&&!N?g.createElement(g.Fragment,null,J,g.createElement(XN,{page:L})):J});ye.displayName="Link";var nC=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:d,children:f,...m},h){let x=Ca(c,{relative:m.relative}),y=vn(),b=g.useContext(Ic),{navigator:C,basename:k}=g.useContext(er),j=b!=null&&uC(x)&&d===!0,S=C.encodeLocation?C.encodeLocation(x).pathname:x.pathname,T=y.pathname,N=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(T=T.toLowerCase(),N=N?N.toLowerCase():null,S=S.toLowerCase()),N&&k&&(N=Xr(N,k)||N);const A=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let L=T===S||!a&&T.startsWith(S)&&T.charAt(A)==="/",R=N!=null&&(N===S||!a&&N.startsWith(S)&&N.charAt(S.length)==="/"),D={isActive:L,isPending:R,isTransitioning:j},O=L?t:void 0,G;typeof s=="function"?G=s(D):G=[s,L?"active":null,R?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let re=typeof l=="function"?l(D):l;return g.createElement(ye,{...m,"aria-current":O,className:G,ref:h,style:re,to:c,viewTransition:d},typeof f=="function"?f(D):f)});nC.displayName="NavLink";var rC=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:l,method:c=sc,action:d,onSubmit:f,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:y,...b},C)=>{let{unstable_useTransitions:k}=g.useContext(er),j=lC(),S=cC(d,{relative:m}),T=c.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&hb.test(d),A=L=>{if(f&&f(L),L.defaultPrevented)return;L.preventDefault();let R=L.nativeEvent.submitter,D=(R==null?void 0:R.getAttribute("formmethod"))||c,O=()=>j(R||L.currentTarget,{fetcherKey:t,method:D,navigate:n,replace:a,state:l,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:y});k&&n!==!1?g.startTransition(()=>O()):O()};return g.createElement("form",{ref:C,method:T,action:S,onSubmit:s?f:A,...b,"data-discover":!N&&e==="render"?"true":void 0})});rC.displayName="Form";function sC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mb(e){let t=g.useContext(Xo);return kt(t,sC(e)),t}function oC(e,{target:t,replace:n,unstable_mask:s,state:a,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:m}={}){let h=St(),x=vn(),y=Ca(e,{relative:c});return g.useCallback(b=>{if(ON(b,t)){b.preventDefault();let C=n!==void 0?n:xa(x)===xa(y),k=()=>h(e,{replace:C,unstable_mask:s,state:a,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f});m?g.startTransition(()=>k()):k()}},[x,h,y,n,s,a,t,e,l,c,d,f,m])}function Lr(e){fr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=g.useRef(Wf(e)),n=g.useRef(!1),s=vn(),a=g.useMemo(()=>MN(s.search,n.current?null:t.current),[s.search]),l=St(),c=g.useCallback((d,f)=>{const m=Wf(typeof d=="function"?d(new URLSearchParams(a)):d);n.current=!0,l("?"+m,f)},[l,a]);return[a,c]}var iC=0,aC=()=>`__${String(++iC)}__`;function lC(){let{router:e}=mb("useSubmit"),{basename:t}=g.useContext(er),n=SN(),s=e.fetch,a=e.navigate;return g.useCallback(async(l,c={})=>{let{action:d,method:f,encType:m,formData:h,body:x}=FN(l,t);if(c.navigate===!1){let y=c.fetcherKey||aC();await s(y,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||f,formEncType:c.encType||m,flushSync:c.flushSync})}else await a(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||f,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[s,a,t,n])}function cC(e,{relative:t}={}){let{basename:n}=g.useContext(er),s=g.useContext(gr);kt(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),l={...Ca(e||".",{relative:t})},c=vn();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),f=d.getAll("index");if(f.some(h=>h==="")){d.delete("index"),f.filter(x=>x).forEach(x=>d.append("index",x));let h=d.toString();l.search=h?`?${h}`:""}}return(!e||e===".")&&a.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Pr([n,l.pathname])),xa(l)}function uC(e,{relative:t}={}){let n=g.useContext(ob);kt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=mb("useViewTransitionState"),a=Ca(e,{relative:t});if(!n.isTransitioning)return!1;let l=Xr(n.currentLocation.pathname,s)||n.currentLocation.pathname,c=Xr(n.nextLocation.pathname,s)||n.nextLocation.pathname;return mc(a.pathname,c)!=null||mc(a.pathname,l)!=null}var Cs=Qv();const dC=Dc(Cs);/**
|
|
52
|
+
* @license lucide-react v0.460.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const fC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gb=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
57
|
+
* @license lucide-react v0.460.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var pC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
+
* @license lucide-react v0.460.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const hC=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:c,...d},f)=>g.createElement("svg",{ref:f,...pC,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:gb("lucide",a),...d},[...c.map(([m,h])=>g.createElement(m,h)),...Array.isArray(l)?l:[l]]));/**
|
|
67
|
+
* @license lucide-react v0.460.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const je=(e,t)=>{const n=g.forwardRef(({className:s,...a},l)=>g.createElement(hC,{ref:l,iconNode:t,className:gb(`lucide-${fC(e)}`,s),...a}));return n.displayName=`${e}`,n};/**
|
|
72
|
+
* @license lucide-react v0.460.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Oc=je("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
77
|
+
* @license lucide-react v0.460.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const xb=je("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
82
|
+
* @license lucide-react v0.460.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const yb=je("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
|
|
87
|
+
* @license lucide-react v0.460.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const mC=je("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
92
|
+
* @license lucide-react v0.460.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const gc=je("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
97
|
+
* @license lucide-react v0.460.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const gC=je("BookOpenText",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M16 12h2",key:"7q9ll5"}],["path",{d:"M16 8h2",key:"msurwy"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}],["path",{d:"M6 12h2",key:"32wvfc"}],["path",{d:"M6 8h2",key:"30oboj"}]]);/**
|
|
102
|
+
* @license lucide-react v0.460.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const vb=je("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
107
|
+
* @license lucide-react v0.460.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Ip=je("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
112
|
+
* @license lucide-react v0.460.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const xC=je("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
117
|
+
* @license lucide-react v0.460.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Ea=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
122
|
+
* @license lucide-react v0.460.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const ya=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
127
|
+
* @license lucide-react v0.460.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const yC=je("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
132
|
+
* @license lucide-react v0.460.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const bb=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
137
|
+
* @license lucide-react v0.460.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Vf=je("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
142
|
+
* @license lucide-react v0.460.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Lp=je("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
147
|
+
* @license lucide-react v0.460.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const qf=je("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
152
|
+
* @license lucide-react v0.460.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const vC=je("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
157
|
+
* @license lucide-react v0.460.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const bC=je("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
162
|
+
* @license lucide-react v0.460.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const wC=je("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
|
|
167
|
+
* @license lucide-react v0.460.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const jC=je("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
|
172
|
+
* @license lucide-react v0.460.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const kC=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
177
|
+
* @license lucide-react v0.460.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const SC=je("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
182
|
+
* @license lucide-react v0.460.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const NC=je("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
187
|
+
* @license lucide-react v0.460.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const Mc=je("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
192
|
+
* @license lucide-react v0.460.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const CC=je("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
197
|
+
* @license lucide-react v0.460.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const EC=je("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
202
|
+
* @license lucide-react v0.460.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Op=je("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
207
|
+
* @license lucide-react v0.460.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const Ux=je("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
212
|
+
* @license lucide-react v0.460.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const PC=je("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
|
|
217
|
+
* @license lucide-react v0.460.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const TC=je("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/**
|
|
222
|
+
* @license lucide-react v0.460.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const wb=je("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
227
|
+
* @license lucide-react v0.460.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const RC=je("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
|
|
232
|
+
* @license lucide-react v0.460.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Mp=je("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
237
|
+
* @license lucide-react v0.460.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const AC=je("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
242
|
+
* @license lucide-react v0.460.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const _p=je("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
247
|
+
* @license lucide-react v0.460.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const jb=je("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
|
|
252
|
+
* @license lucide-react v0.460.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const DC=je("Hammer",[["path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9",key:"eefl8a"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"b7pghm"}]]);/**
|
|
257
|
+
* @license lucide-react v0.460.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const IC=je("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
262
|
+
* @license lucide-react v0.460.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const kb=je("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
267
|
+
* @license lucide-react v0.460.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const Kf=je("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
|
|
272
|
+
* @license lucide-react v0.460.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const LC=je("Library",[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]);/**
|
|
277
|
+
* @license lucide-react v0.460.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const OC=je("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
282
|
+
* @license lucide-react v0.460.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const MC=je("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
287
|
+
* @license lucide-react v0.460.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const _C=je("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
292
|
+
* @license lucide-react v0.460.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const Sb=je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
297
|
+
* @license lucide-react v0.460.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const $C=je("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
302
|
+
* @license lucide-react v0.460.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const $p=je("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
307
|
+
* @license lucide-react v0.460.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const FC=je("MoonStar",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9",key:"4ay0iu"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}]]);/**
|
|
312
|
+
* @license lucide-react v0.460.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const ef=je("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
|
|
317
|
+
* @license lucide-react v0.460.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const zC=je("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
322
|
+
* @license lucide-react v0.460.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const Fp=je("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
327
|
+
* @license lucide-react v0.460.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const Vt=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
332
|
+
* @license lucide-react v0.460.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const Nb=je("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
337
|
+
* @license lucide-react v0.460.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const BC=je("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
342
|
+
* @license lucide-react v0.460.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const Gf=je("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
347
|
+
* @license lucide-react v0.460.0 - ISC
|
|
348
|
+
*
|
|
349
|
+
* This source code is licensed under the ISC license.
|
|
350
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
351
|
+
*/const zp=je("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
352
|
+
* @license lucide-react v0.460.0 - ISC
|
|
353
|
+
*
|
|
354
|
+
* This source code is licensed under the ISC license.
|
|
355
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
356
|
+
*/const UC=je("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
357
|
+
* @license lucide-react v0.460.0 - ISC
|
|
358
|
+
*
|
|
359
|
+
* This source code is licensed under the ISC license.
|
|
360
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
361
|
+
*/const Rs=je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
362
|
+
* @license lucide-react v0.460.0 - ISC
|
|
363
|
+
*
|
|
364
|
+
* This source code is licensed under the ISC license.
|
|
365
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
366
|
+
*/const HC=je("SendToBack",[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2",key:"1b0bso"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2",key:"1x09vl"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1",key:"pao6x6"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1",key:"19tdru"}]]);/**
|
|
367
|
+
* @license lucide-react v0.460.0 - ISC
|
|
368
|
+
*
|
|
369
|
+
* This source code is licensed under the ISC license.
|
|
370
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
371
|
+
*/const WC=je("ServerOff",[["path",{d:"M7 2h13a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-5",key:"bt2siv"}],["path",{d:"M10 10 2.5 2.5C2 2 2 2.5 2 5v3a2 2 0 0 0 2 2h6z",key:"1hjrv1"}],["path",{d:"M22 17v-1a2 2 0 0 0-2-2h-1",key:"1iynyr"}],["path",{d:"M4 14a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16.5l1-.5.5.5-8-8H4z",key:"161ggg"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
372
|
+
* @license lucide-react v0.460.0 - ISC
|
|
373
|
+
*
|
|
374
|
+
* This source code is licensed under the ISC license.
|
|
375
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
376
|
+
*/const VC=je("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
377
|
+
* @license lucide-react v0.460.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*/const qC=je("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
382
|
+
* @license lucide-react v0.460.0 - ISC
|
|
383
|
+
*
|
|
384
|
+
* This source code is licensed under the ISC license.
|
|
385
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
386
|
+
*/const KC=je("ShieldX",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]]);/**
|
|
387
|
+
* @license lucide-react v0.460.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/const Un=je("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
392
|
+
* @license lucide-react v0.460.0 - ISC
|
|
393
|
+
*
|
|
394
|
+
* This source code is licensed under the ISC license.
|
|
395
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
396
|
+
*/const Hx=je("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
397
|
+
* @license lucide-react v0.460.0 - ISC
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the ISC license.
|
|
400
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/const Cb=je("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
402
|
+
* @license lucide-react v0.460.0 - ISC
|
|
403
|
+
*
|
|
404
|
+
* This source code is licensed under the ISC license.
|
|
405
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
406
|
+
*/const GC=je("SunMedium",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 3v1",key:"1asbbs"}],["path",{d:"M12 20v1",key:"1wcdkc"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M20 12h1",key:"1vloll"}],["path",{d:"m18.364 5.636-.707.707",key:"1hakh0"}],["path",{d:"m6.343 17.657-.707.707",key:"18m9nf"}],["path",{d:"m5.636 5.636.707.707",key:"1xv1c5"}],["path",{d:"m17.657 17.657.707.707",key:"vl76zb"}]]);/**
|
|
407
|
+
* @license lucide-react v0.460.0 - ISC
|
|
408
|
+
*
|
|
409
|
+
* This source code is licensed under the ISC license.
|
|
410
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
411
|
+
*/const Eb=je("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
412
|
+
* @license lucide-react v0.460.0 - ISC
|
|
413
|
+
*
|
|
414
|
+
* This source code is licensed under the ISC license.
|
|
415
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
416
|
+
*/const YC=je("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
417
|
+
* @license lucide-react v0.460.0 - ISC
|
|
418
|
+
*
|
|
419
|
+
* This source code is licensed under the ISC license.
|
|
420
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
+
*/const Or=je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
422
|
+
* @license lucide-react v0.460.0 - ISC
|
|
423
|
+
*
|
|
424
|
+
* This source code is licensed under the ISC license.
|
|
425
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
426
|
+
*/const Qo=je("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
427
|
+
* @license lucide-react v0.460.0 - ISC
|
|
428
|
+
*
|
|
429
|
+
* This source code is licensed under the ISC license.
|
|
430
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
431
|
+
*/const XC=je("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
432
|
+
* @license lucide-react v0.460.0 - ISC
|
|
433
|
+
*
|
|
434
|
+
* This source code is licensed under the ISC license.
|
|
435
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
436
|
+
*/const Bp=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pb(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Pb(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function QC(){for(var e,t,n=0,s="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Pb(e))&&(s&&(s+=" "),s+=t);return s}const Up="-",JC=e=>{const t=e2(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{const d=c.split(Up);return d[0]===""&&d.length!==1&&d.shift(),Tb(d,t)||ZC(c)},getConflictingClassGroupIds:(c,d)=>{const f=n[c]||[];return d&&s[c]?[...f,...s[c]]:f}}},Tb=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],s=t.nextPart.get(n),a=s?Tb(e.slice(1),s):void 0;if(a)return a;if(t.validators.length===0)return;const l=e.join(Up);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},Wx=/^\[(.+)\]$/,ZC=e=>{if(Wx.test(e)){const t=Wx.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},e2=e=>{const{theme:t,prefix:n}=e,s={nextPart:new Map,validators:[]};return n2(Object.entries(e.classGroups),n).forEach(([l,c])=>{Yf(c,s,l,t)}),s},Yf=(e,t,n,s)=>{e.forEach(a=>{if(typeof a=="string"){const l=a===""?t:Vx(t,a);l.classGroupId=n;return}if(typeof a=="function"){if(t2(a)){Yf(a(s),t,n,s);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([l,c])=>{Yf(c,Vx(t,l),n,s)})})},Vx=(e,t)=>{let n=e;return t.split(Up).forEach(s=>{n.nextPart.has(s)||n.nextPart.set(s,{nextPart:new Map,validators:[]}),n=n.nextPart.get(s)}),n},t2=e=>e.isThemeGetter,n2=(e,t)=>t?e.map(([n,s])=>{const a=s.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,a]}):e,r2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,s=new Map;const a=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,s=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=s.get(l))!==void 0)return a(l,c),c},set(l,c){n.has(l)?n.set(l,c):a(l,c)}}},Rb="!",s2=e=>{const{separator:t,experimentalParseClassName:n}=e,s=t.length===1,a=t[0],l=t.length,c=d=>{const f=[];let m=0,h=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(m===0){if(S===a&&(s||d.slice(j,j+l)===t)){f.push(d.slice(h,j)),h=j+l;continue}if(S==="/"){x=j;continue}}S==="["?m++:S==="]"&&m--}const y=f.length===0?d:d.substring(h),b=y.startsWith(Rb),C=b?y.substring(1):y,k=x&&x>h?x-h:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:C,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},o2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(s=>{s[0]==="["?(t.push(...n.sort(),s),n=[]):n.push(s)}),t.push(...n.sort()),t},i2=e=>({cache:r2(e.cacheSize),parseClassName:s2(e),...JC(e)}),a2=/\s+/,l2=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:a}=t,l=[],c=e.trim().split(a2);let d="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{modifiers:h,hasImportantModifier:x,baseClassName:y,maybePostfixModifierPosition:b}=n(m);let C=!!b,k=s(C?y.substring(0,b):y);if(!k){if(!C){d=m+(d.length>0?" "+d:d);continue}if(k=s(y),!k){d=m+(d.length>0?" "+d:d);continue}C=!1}const j=o2(h).join(":"),S=x?j+Rb:j,T=S+k;if(l.includes(T))continue;l.push(T);const N=a(k,C);for(let A=0;A<N.length;++A){const L=N[A];l.push(S+L)}d=m+(d.length>0?" "+d:d)}return d};function c2(){let e=0,t,n,s="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ab(t))&&(s&&(s+=" "),s+=n);return s}const Ab=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=Ab(e[s]))&&(n&&(n+=" "),n+=t);return n};function u2(e,...t){let n,s,a,l=c;function c(f){const m=t.reduce((h,x)=>x(h),e());return n=i2(m),s=n.cache.get,a=n.cache.set,l=d,d(f)}function d(f){const m=s(f);if(m)return m;const h=l2(f,n);return a(f,h),h}return function(){return l(c2.apply(null,arguments))}}const pt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Db=/^\[(?:([a-z-]+):)?(.+)\]$/i,d2=/^\d+\/\d+$/,f2=new Set(["px","full","screen"]),p2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,m2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,g2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,x2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gr=e=>Mo(e)||f2.has(e)||d2.test(e),bs=e=>Jo(e,"length",N2),Mo=e=>!!e&&!Number.isNaN(Number(e)),tf=e=>Jo(e,"number",Mo),Ki=e=>!!e&&Number.isInteger(Number(e)),y2=e=>e.endsWith("%")&&Mo(e.slice(0,-1)),He=e=>Db.test(e),ws=e=>p2.test(e),v2=new Set(["length","size","percentage"]),b2=e=>Jo(e,v2,Ib),w2=e=>Jo(e,"position",Ib),j2=new Set(["image","url"]),k2=e=>Jo(e,j2,E2),S2=e=>Jo(e,"",C2),Gi=()=>!0,Jo=(e,t,n)=>{const s=Db.exec(e);return s?s[1]?typeof t=="string"?s[1]===t:t.has(s[1]):n(s[2]):!1},N2=e=>h2.test(e)&&!m2.test(e),Ib=()=>!1,C2=e=>g2.test(e),E2=e=>x2.test(e),P2=()=>{const e=pt("colors"),t=pt("spacing"),n=pt("blur"),s=pt("brightness"),a=pt("borderColor"),l=pt("borderRadius"),c=pt("borderSpacing"),d=pt("borderWidth"),f=pt("contrast"),m=pt("grayscale"),h=pt("hueRotate"),x=pt("invert"),y=pt("gap"),b=pt("gradientColorStops"),C=pt("gradientColorStopPositions"),k=pt("inset"),j=pt("margin"),S=pt("opacity"),T=pt("padding"),N=pt("saturate"),A=pt("scale"),L=pt("sepia"),R=pt("skew"),D=pt("space"),O=pt("translate"),G=()=>["auto","contain","none"],re=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",He,t],K=()=>[He,t],q=()=>["",Gr,bs],J=()=>["auto",Mo,He],_=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],Z=()=>["","0",He],P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[Mo,He];return{cacheSize:500,separator:":",theme:{colors:[Gi],spacing:[Gr,bs],blur:["none","",ws,He],brightness:M(),borderColor:[e],borderRadius:["none","","full",ws,He],borderSpacing:K(),borderWidth:q(),contrast:M(),grayscale:Z(),hueRotate:M(),invert:Z(),gap:K(),gradientColorStops:[e],gradientColorStopPositions:[y2,bs],inset:z(),margin:z(),opacity:M(),padding:K(),saturate:M(),scale:M(),sepia:Z(),skew:M(),space:K(),translate:K()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[ws]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[..._(),He]}],overflow:[{overflow:re()}],"overflow-x":[{"overflow-x":re()}],"overflow-y":[{"overflow-y":re()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ki,He]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:Z()}],shrink:[{shrink:Z()}],order:[{order:["first","last","none",Ki,He]}],"grid-cols":[{"grid-cols":[Gi]}],"col-start-end":[{col:["auto",{span:["full",Ki,He]},He]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[Gi]}],"row-start-end":[{row:["auto",{span:[Ki,He]},He]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[ws]},ws]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ws,bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",tf]}],"font-family":[{font:[Gi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",Mo,tf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Gr,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Gr,bs]}],"underline-offset":[{"underline-offset":["auto",Gr,He]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[..._(),w2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",b2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},k2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[C]}],"gradient-via-pos":[{via:[C]}],"gradient-to-pos":[{to:[C]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:F()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[Gr,He]}],"outline-w":[{outline:[Gr,bs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Gr,bs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ws,S2]}],"shadow-color":[{shadow:[Gi]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[s]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",ws,He]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[x]}],saturate:[{saturate:[N]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[x]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Ki,He]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Gr,bs,tf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},T2=u2(P2);function Be(...e){return T2(QC(e))}function Ar(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Rn(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function R2(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function A2(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function D2(e){if(!e)return"—";const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const n=Math.floor((Date.now()-t.getTime())/1e3);if(n<60)return"just now";const s=Math.floor(n/60);if(s<60)return`${s}m ago`;const a=Math.floor(s/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Qt(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Lb(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function I2(e){let t=Lb(e);const n=t.match(/^\/w\/[^/]+(\/.*)?$/);return n&&(t=n[1]||"/"),t==="/"?"/":t.startsWith("/projects")?/^\/projects\/[^/]+\/assignments\//.test(t)?"/assignments":"/projects":t.startsWith("/assignments")?"/assignments":t.startsWith("/servers")?"/servers":t.startsWith("/inventories")?"/inventories":t.startsWith("/agent-sessions")?"/agent-sessions":t.startsWith("/playbooks")?"/playbooks":t.startsWith("/memories")?"/memories":t.startsWith("/resources")?"/resources":t.startsWith("/todos")?"/todos":t.startsWith("/attention")?"/attention":t.startsWith("/help")?"/help":t.startsWith("/settings")?"/settings":null}function Ob(e,t){return I2(e)===t}function Mb(e){let n=Lb(e).split("/").filter(Boolean);const s=[];let a="Overview",l=null,c="";if(n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,s.push({label:Qt(n[1]),path:`${c}/projects`}),n=n.slice(2)),n.length===0)return{title:a,breadcrumbs:s,projectSlug:l};if(n[0]==="projects"){if(s.push({label:"Projects",path:`${c}/projects`}),a="Projects",n[1]&&(l=n[1],s.push({label:Qt(n[1]),path:`${c}/projects/${n[1]}`}),a=Qt(n[1])),n[2]==="edit")a="Edit Project";else if(n[2]==="create"&&n[3]==="assignment")a="Create Assignment";else if(n[2]==="assignments"&&n[3])s.push({label:Qt(n[3]),path:`${c}/projects/${n[1]}/assignments/${n[3]}`}),a=Qt(n[3]),n[4]==="edit"?a="Edit Assignment":n[4]==="plan"&&n[5]==="edit"?a="Edit Plan":n[4]==="scratchpad"&&n[5]==="edit"?a="Edit Scratchpad":n[4]==="handoff"&&n[5]==="edit"?a="Append Handoff":n[4]==="decision-record"&&n[5]==="edit"&&(a="Append Decision");else if((n[2]==="memories"||n[2]==="resources")&&n[3]){const d=n[2]==="memories"?"Memories":"Resources",f=n[2]==="memories"?"/memories":"/resources";s.push({label:d,path:f}),s.push({label:Qt(n[3]),path:`${c}/projects/${n[1]}/${n[2]}/${n[3]}`}),a=Qt(n[3]),n[4]==="edit"&&(a=n[2]==="memories"?"Edit Memory":"Edit Resource")}}else n[0]==="servers"?(a="Servers",s.push({label:"Servers",path:`${c}/servers`})):n[0]==="inventories"?(a="Inventories",s.push({label:"Inventories",path:`${c}/inventories`})):n[0]==="agent-sessions"?(a="Agent Sessions",s.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(a="Attention",s.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(a="Assignments",s.push({label:"Assignments",path:`${c}/assignments`})):n[0]==="playbooks"?(s.push({label:"Playbooks",path:"/playbooks"}),a="Playbooks",n[1]==="create"?a="Create Playbook":n[1]&&n[2]==="edit"?(s.push({label:Qt(n[1]),path:`/playbooks/${n[1]}`}),a="Edit Playbook"):n[1]&&(s.push({label:Qt(n[1]),path:`/playbooks/${n[1]}`}),a=Qt(n[1]))):n[0]==="memories"?(s.push({label:"Memories",path:"/memories"}),a="Memories",n[1]==="new"&&(a="New Memory")):n[0]==="resources"?(s.push({label:"Resources",path:"/resources"}),a="Resources",n[1]==="new"&&(a="New Resource")):n[0]==="todos"?(a="Todos",s.push({label:"Todos",path:`${c}/todos`})):n[0]==="help"?(a="Help",s.push({label:"Help",path:"/help"})):n[0]==="settings"?(a="Settings",s.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="project"&&(a="Create Project",s.push({label:"Create Project",path:`${c}/create/project`}));return{title:a,breadcrumbs:s,projectSlug:l}}function qx({items:e,onNavigate:t}){const n=vn();return o.jsx("nav",{className:"space-y-1",children:e.map(s=>{const a=s.icon,l=Ob(n.pathname,s.to)&&!n.pathname.startsWith("/w/");return o.jsxs(ye,{to:s.to,onClick:t,className:Be("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition",l?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"),children:[o.jsx(a,{className:"h-4 w-4"}),o.jsx("span",{children:s.label})]},s.to)})})}const _b=[{slug:"default",label:"Syntaur",description:"Brand purple, warm yellow, coral & teal accents.",swatches:{primary:"oklch(70% 0.18 290)",secondary:"oklch(80% 0.14 75)",coral:"oklch(72% 0.17 15)",teal:"oklch(72% 0.14 185)",amber:"oklch(82% 0.16 75)"}},{slug:"ocean",label:"Midnight",description:"Deep indigo-blue with cyan accents. Inspired by One Dark Pro.",swatches:{primary:"oklch(70% 0.16 240)",secondary:"oklch(78% 0.13 200)",coral:"oklch(72% 0.18 350)",teal:"oklch(78% 0.14 195)",amber:"oklch(84% 0.15 90)"}},{slug:"forest",label:"Verdant",description:"Saturated emerald and pine on a dark olive base.",swatches:{primary:"oklch(72% 0.17 145)",secondary:"oklch(80% 0.13 110)",coral:"oklch(72% 0.17 25)",teal:"oklch(75% 0.13 175)",amber:"oklch(82% 0.16 95)"}},{slug:"sunset",label:"Ember",description:"Warm sepia surfaces with copper and amber accents.",swatches:{primary:"oklch(72% 0.18 35)",secondary:"oklch(80% 0.16 60)",coral:"oklch(72% 0.19 15)",teal:"oklch(72% 0.12 180)",amber:"oklch(86% 0.17 70)"}}],L2=_b.map(e=>e.slug),xc="default";function $b(e){return typeof e=="string"&&L2.includes(e)}const Fb={preset:xc,custom:!1};let na=null,Po=null;function Hp(e){if(!e||typeof e!="object")return Fb;const t=e;return{preset:$b(t.preset)?t.preset:xc,custom:t.custom===!0}}function O2(){return na?Promise.resolve(na):Po||(Po=fetch("/api/config/theme").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{const t=Hp(e);return na=t,Po=null,t}).catch(()=>(Po=null,Fb)),Po)}async function M2(e){const t=await fetch("/api/config/theme",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preset:e})});if(!t.ok){const s=await t.json().catch(()=>({error:`HTTP ${t.status}`}));throw new Error(s.error??"Failed to save theme")}const n=Hp(await t.json());return na=n,n}async function _2(){const e=await fetch("/api/config/theme",{method:"DELETE"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=Hp(await e.json());return na=t,t}const Xf="syntaur-theme",ic="syntaur-preset",zb=g.createContext(null);function Qf(){try{const e=window.localStorage.getItem(Xf);return e==="light"||e==="dark"?e:null}catch{return null}}function Bb(){try{const e=window.localStorage.getItem(ic);return $b(e)?e:xc}catch{return xc}}function Ub(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Hb(e){document.documentElement.classList.toggle("dark",e==="dark")}function Wb(e){document.documentElement.dataset.theme=e}function $2(){typeof document>"u"||(Hb(Qf()??Ub()),Wb(Bb()))}function F2({children:e}){const[t,n]=g.useState(()=>Qf()),[s,a]=g.useState(()=>Qf()??Ub()),[l,c]=g.useState(()=>Bb());g.useEffect(()=>{Hb(s)},[s]),g.useEffect(()=>{Wb(l)},[l]),g.useEffect(()=>{let h=!1;return O2().then(x=>{if(!h&&x.preset!==l){c(x.preset);try{window.localStorage.setItem(ic,x.preset)}catch{}}}),()=>{h=!0}},[]),g.useEffect(()=>{if(!window.matchMedia)return;const h=window.matchMedia("(prefers-color-scheme: dark)"),x=()=>{t||a(h.matches?"dark":"light")};return x(),h.addEventListener("change",x),()=>{h.removeEventListener("change",x)}},[t]);async function d(h){c(h);try{window.localStorage.setItem(ic,h)}catch{}await M2(h)}async function f(){const h=await _2();c(h.preset);try{window.localStorage.setItem(ic,h.preset)}catch{}}const m={resolvedTheme:s,explicitTheme:t,setTheme:h=>{window.localStorage.setItem(Xf,h),n(h),a(h)},toggleTheme:()=>{const h=s==="dark"?"light":"dark";window.localStorage.setItem(Xf,h),n(h),a(h)},preset:l,setPreset:d,resetPreset:f};return o.jsx(zb.Provider,{value:m,children:e})}function Wp(){const e=g.useContext(zb);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const ac=new Set;let Pn=null,_o=null;function z2(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function Vb(){Pn&&(Pn.readyState===WebSocket.OPEN||Pn.readyState===WebSocket.CONNECTING)||(Pn=new WebSocket(z2()),Pn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of ac)n(t)}catch{}},Pn.onclose=()=>{Pn=null,_o&&clearTimeout(_o),_o=setTimeout(Vb,2e3)},Pn.onerror=()=>{Pn==null||Pn.close()})}function _c(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=s=>t.current(s);return ac.add(n),Vb(),()=>{ac.delete(n),ac.size===0&&Pn&&(_o&&clearTimeout(_o),_o=null,Pn.close(),Pn=null)}},[])}function _t(e,t){const[n,s]=g.useState(null),[a,l]=g.useState(!0),[c,d]=g.useState(null),[f,m]=g.useState(0),h=g.useCallback(()=>{m(x=>x+1)},[]);return g.useEffect(()=>{if(!e){l(!1),s(null);return}let x=!1;return l(!0),d(null),fetch(e).then(async y=>{if(!y.ok){const b=await y.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${y.status}`)}return y.json()}).then(y=>{x||(s(y),l(!1))}).catch(y=>{x||(d(y.message),l(!1))}),()=>{x=!0}},[e,f]),_c(x=>{t&&((x.type==="project-updated"||x.type==="assignment-updated")&&h(),x.type==="servers-updated"&&t==="servers"&&h(),x.type==="agent-sessions-updated"&&t==="agent-sessions"&&h(),x.type==="playbooks-updated"&&t==="playbooks"&&h(),x.type==="leases-updated"&&t==="inventories"&&h())}),{data:n,loading:a,error:c,refetch:h}}function Zo(){return _t("/api/projects","projects")}function Vp(){return _t("/api/workspaces","projects")}function $t(){const{workspace:e}=mt();return e?`/w/${e}`:""}function B2(){return _t("/api/overview","overview")}function qb(){return _t("/api/assignments","assignments")}function U2(){return _t("/api/attention","attention")}function Kb(){return _t("/api/help")}function Gb(e){const t=e?`/api/projects/${e}`:null;return _t(t,"project")}function H2(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return _t(n,"assignment")}function W2(e){const t=e?`/api/assignments/${e}`:null;return _t(t,"assignment")}function Yb(e){return _t(e)}function qp(){return _t("/api/servers","servers")}function V2(){return _t("/api/leases","inventories")}function q2(){return _t("/api/agent-sessions","agent-sessions")}function K2(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return _t(n,"agent-sessions")}function Xb(){return _t("/api/playbooks","playbooks")}function G2(e){const t=e?`/api/playbooks/${e}`:null;return _t(t,"playbooks")}function Y2(){return _t("/api/memories","project")}function X2(e,t){const n=e&&t?`/api/projects/${e}/memories/${t}`:null;return _t(n,"project")}function Q2(){return _t("/api/resources","project")}function J2(e,t){const n=e&&t?`/api/projects/${e}/resources/${t}`:null;return _t(n,"project")}const $c=["new-workspace","new-project","new-todo","new-assignment"];function Z2(e){return typeof e=="string"&&$c.includes(e)}const eE=["mod+k","mod+shift+k","?","escape","enter","shift+t","g","g o","g m","g a","g t","g s","g !","g ,","j","k","o","a","e","/","r","p","h","d","s","[","]"],tE=["mod","ctrl","alt","shift"];function Tn(e){if(typeof e!="string")return"";const t=e.trim();if(!t)return"";if(/\s/.test(t)&&!t.includes("+"))return t.split(/\s+/).map(Tn).filter(d=>d.length>0).join(" ");const n=t.split("+").map(d=>d.trim()).filter(d=>d.length>0);if(n.length===0)return"";if(n.length===1)return n[0].toLowerCase();const s=n[n.length-1].toLowerCase(),a=n.slice(0,-1).map(d=>d.toLowerCase()),l=new Set,c=[];for(const d of tE)a.includes(d)&&!l.has(d)&&(c.push(d),l.add(d));for(const d of a)l.has(d)||(c.push(d),l.add(d));return[...c,s].join("+")}function nE(e){const t=Tn(e);return t?eE.includes(t):!1}const rE={"new-workspace":Tn("Mod+Shift+Alt+w"),"new-project":Tn("Mod+Shift+Alt+p"),"new-todo":Tn("Mod+Shift+Alt+t"),"new-assignment":Tn("Mod+Shift+Alt+a")};function sE(e){const t={...rE};for(const n of $c){const s=e[n];typeof s=="string"&&s.length>0&&(t[n]=s)}return t}function Ys(){if(typeof navigator>"u")return!1;const e=navigator.platform||"",t=navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)||/Mac OS X/.test(t)}function oE(e){const t=e.split("+").map(a=>a.trim()),n=t[t.length-1]??"",s=new Set(t.slice(0,-1).map(a=>a.toLowerCase()));return{key:n.toLowerCase(),mod:s.has("mod"),shift:s.has("shift"),alt:s.has("alt"),ctrl:s.has("ctrl")}}function Vl(e,t){const n=oE(t);if(e.key.toLowerCase()!==n.key)return!1;const a=Ys()?e.metaKey:e.ctrlKey;return!(n.mod&&!a||!n.mod&&!n.ctrl&&a||n.ctrl&&!e.ctrlKey||n.shift&&!e.shiftKey||!n.shift&&!(n.key.length===1&&!/^[a-z0-9]$/.test(n.key))&&e.shiftKey||n.alt&&!e.altKey||!n.alt&&e.altKey)}function Qb(e){const t=[],n=Ys()?e.metaKey:e.ctrlKey;n&&t.push("mod"),e.ctrlKey&&!n&&t.push("ctrl"),e.altKey&&t.push("alt");const s=e.key;let a;s===" "||s==="Spacebar"?a="space":(s.length,a=s.toLowerCase());const l=a.length===1&&/^[a-z0-9]$/.test(a);e.shiftKey&&l&&t.push("shift");const c=[...t,a].join("+");return Tn(c)}function Tr(e){return e.split("+").map(n=>{const s=n.toLowerCase();return s==="mod"?Ys()?"⌘":"Ctrl":s==="shift"?Ys()?"⇧":"Shift":s==="alt"?Ys()?"⌥":"Alt":s==="ctrl"?Ys()?"⌃":"Ctrl":s==="enter"?"↵":s==="escape"?"Esc":s==="arrowup"?"↑":s==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(Ys()?"":"+")}function iE(e){const[t,n]=g.useState(null),[s,a]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{try{const f=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!f.ok)throw new Error(`HTTP ${f.status}`);n(await f.json()),c(null)}catch(f){c(f instanceof Error?f.message:"Failed to fetch todos")}finally{a(!1)}},[e]);return g.useEffect(()=>{d()},[d]),_c(f=>{f.type==="todos-updated"&&!f.projectSlug&&d()}),{data:t,loading:s,error:l,refetch:d}}function Kp(){const[e,t]=g.useState(null),[n,s]=g.useState(!0),[a,l]=g.useState(null),c=g.useCallback(async()=>{try{const d=await fetch("/api/todos");if(!d.ok)throw new Error(`HTTP ${d.status}`);t(await d.json()),l(null)}catch(d){l(d instanceof Error?d.message:"Failed to fetch todos")}finally{s(!1)}},[]);return g.useEffect(()=>{c()},[c]),_c(d=>{d.type==="todos-updated"&&!d.projectSlug&&c()}),{data:e,loading:n,error:a,refetch:c}}async function Gp(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function Jb(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function Zb(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function ew(e,t,n){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function tw(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function aE(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function nw(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}async function rw(e,t){const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const s=await n.text().catch(()=>"");let a=null;try{a=s?JSON.parse(s):null}catch{}const l=(a==null?void 0:a.error)||s||`HTTP ${n.status}`,c=new Error(l);throw c.status=n.status,c}return n.json().catch(()=>({}))}async function lE(e,t){await rw(`/api/todos/${encodeURIComponent(e)}/promote`,t)}async function cE(e,t,n){await rw(`/api/todos/${encodeURIComponent(e)}/${t}/move`,{to:n})}const uE=new Set(["/projects","/assignments","/servers","/todos"]);function lc(e,t){return uE.has(e)?`${t}${e}`:e}const dE=[{id:"page-overview",title:"Overview",basePath:"/",keywords:["home","dashboard"]},{id:"page-projects",title:"Projects",basePath:"/projects",keywords:[]},{id:"page-assignments",title:"Assignments",basePath:"/assignments",keywords:[]},{id:"page-todos",title:"Todos",basePath:"/todos",keywords:["tasks"]},{id:"page-servers",title:"Servers",basePath:"/servers",keywords:["sessions"]},{id:"page-attention",title:"Attention",basePath:"/attention",keywords:["alerts"]},{id:"page-playbooks",title:"Playbooks",basePath:"/playbooks",keywords:[]},{id:"page-memories",title:"Memories",basePath:"/memories",keywords:["knowledge","learnings"]},{id:"page-resources",title:"Resources",basePath:"/resources",keywords:["knowledge","reference"]},{id:"page-settings",title:"Settings",basePath:"/settings",keywords:[]},{id:"page-help",title:"Help",basePath:"/help",keywords:["shortcuts"]}];function fE(e){const t=[];for(const n of dE)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:lc(n.basePath,e.wsPrefix)});for(const n of e.projects??[]){const s=n.workspace?`/w/${n.workspace}`:"";t.push({type:"project",id:`project-${n.slug}`,title:n.title,subtitle:n.slug,keywords:n.tags,route:`${s}/projects/${n.slug}`}),t.push({type:"todo",id:`project-todos-${n.slug}`,title:`${n.title} todos`,subtitle:`${n.slug} · project`,keywords:[...n.tags??[],"project","todos"],route:`${s}/projects/${n.slug}?tab=todos`})}for(const n of e.assignments??[]){const s=n.projectWorkspace?`/w/${n.projectWorkspace}`:"";t.push({type:"assignment",id:n.projectSlug===null?`assignment-standalone-${n.id}`:`assignment-${n.projectSlug}-${n.slug}`,title:n.title,subtitle:`${n.projectTitle} · ${n.status}`,keywords:[n.projectSlug??"standalone",n.assignee??""].filter(a=>!!a),route:n.projectSlug===null?`/assignments/${n.id}`:`${s}/projects/${n.projectSlug}/assignments/${n.slug}`})}for(const n of e.playbooks??[])t.push({type:"playbook",id:`playbook-${n.slug}`,title:n.name,subtitle:n.description,keywords:n.tags,route:`/playbooks/${n.slug}`});for(const n of e.servers??[])t.push({type:"server",id:`server-${n.name}`,title:n.name,subtitle:n.alive?"alive":"dead",route:`${lc("/servers",e.wsPrefix)}#server-${encodeURIComponent(n.name)}`});for(const n of e.todos??[]){const s=n.workspace&&n.workspace!=="_ungrouped"?`/w/${n.workspace}`:e.wsPrefix,a=lc("/todos",s);t.push({type:"todo",id:`todo-${n.id}`,title:n.description,subtitle:n.status,keywords:n.tags,route:`${a}?focus=${encodeURIComponent(n.id)}`})}return t}function dr(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function nf(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}async function pE(e,t,n){const s=t?"disable":"enable",a=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${s}`,{method:"POST"});if(!a.ok){const l=await a.json().catch(()=>({}));throw new Error(l.error||`Failed to ${s} playbook`)}n()}async function rf(e,t){const n=await fetch(`/api/todos/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t})});if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s.error||`Failed to create todo (HTTP ${n.status})`)}}async function Kx(){const e=await fetch("/api/workspaces");if(!e.ok)throw new Error(`Failed to load workspaces (HTTP ${e.status})`);const t=await e.json();return{workspaces:Array.isArray(t.workspaces)?t.workspaces:[],hasUngrouped:t.hasUngrouped===!0}}async function Gx(){const e=await fetch("/api/projects");if(!e.ok)throw new Error(`Failed to load projects (HTTP ${e.status})`);const t=await e.json();return Array.isArray(t)?t:[]}async function sf(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load template (HTTP ${t.status})`);const n=await t.json();if(!n.content)throw new Error("Template returned no content");return n.content}function qs(e,t,n){const s=e.match(/^(---\n)([\s\S]*?)(\n---)/);if(!s)return`---
|
|
437
|
+
${t}: ${JSON.stringify(n)}
|
|
438
|
+
---
|
|
439
|
+
${e}`;const a=s[1],l=s[2],c=s[3],d=e.slice(s[0].length),f=JSON.stringify(n),m=new RegExp(`^${t}:\\s*.*$`,"m");let h;return m.test(l)?h=l.replace(m,`${t}: ${f}`):h=`${l}
|
|
440
|
+
${t}: ${f}`,`${a}${h}${c}${d}`}const hE=/^[a-z0-9][a-z0-9-]*$/;function mE(e){const{playbooks:t,projectSlug:n,currentProjectTitle:s,currentProjectWorkspace:a,wsPrefix:l,refetchPlaybooks:c,navigate:d,toggleTheme:f}=e,m=[];if(m.push({id:"new-workspace",title:"New Workspace",subtitle:"Create a Syntaur workspace",group:"Create",keywords:["new","create","workspace"],bindableKind:"new-workspace",flow:{steps:[{kind:"text",id:"name",label:"Workspace name",placeholder:"lowercase, hyphenated (e.g. acme-app)",required:!0,pattern:{regex:hE,message:"Use lowercase letters, digits, and hyphens (e.g. acme-app). Must start with a letter or digit."}}],submit:async(h,x)=>{const y=(h.name??"").trim();if(!y)throw new Error("Name is required");const b=await fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y})});if(!b.ok){const C=await b.json().catch(()=>({}));throw new Error(C.error||`Failed to create workspace (HTTP ${b.status})`)}x.navigate(`/w/${y}/projects`)}}}),m.push({id:"new-project",title:"New Project",subtitle:"Create a project (pick workspace)",group:"Create",keywords:["new","create","project"],bindableKind:"new-project",flow:{steps:[{kind:"picker",id:"workspace",label:"Workspace",emptyMessage:'No workspaces yet — create one with "New Workspace"',loadOptions:async()=>{const{workspaces:h,hasUngrouped:x}=await Kx(),y=[{value:"_ungrouped",label:"Ungrouped",hint:"no workspace"}];for(const b of h)y.push({value:b,label:b,hint:"workspace"});return y}},{kind:"text",id:"title",label:"Project title",placeholder:"e.g. Marketing site rebuild",required:!0}],submit:async(h,x)=>{const y=(h.workspace??"").trim(),b=(h.title??"").trim();if(!b)throw new Error("Title is required");const C=dr(b);if(!C)throw new Error("Title must contain at least one alphanumeric character");let k=await sf("/api/templates/project");k=qs(k,"slug",C),k=qs(k,"title",b),y&&y!=="_ungrouped"&&(k=qs(k,"workspace",y));const j=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:k})}),S=await j.json().catch(()=>({}));if(!j.ok)throw new Error(S.error||`Failed to create project (HTTP ${j.status})`);const T=y&&y!=="_ungrouped"?`/w/${y}/projects/${S.slug??C}`:`/projects/${S.slug??C}`;x.navigate(T)}}}),m.push({id:"new-todo",title:"New Todo",subtitle:"Pick scope (global / workspace / project)",group:"Create",keywords:["new","create","todo","task"],bindableKind:"new-todo",flow:{steps:[{kind:"picker",id:"scope",label:"Scope",loadOptions:async()=>{const[{workspaces:h},x]=await Promise.all([Kx(),Gx()]),y=[{value:"_ungrouped",label:"Global",hint:"no workspace"}];for(const b of h)y.push({value:b,label:b,hint:"workspace"});for(const b of x){const C=b.workspace??"_ungrouped";y.push({value:C,label:`${b.title}`,hint:`project · ${b.workspace??"ungrouped"}`})}return y}},{kind:"text",id:"description",label:"Description",placeholder:"Describe the todo…",required:!0}],submit:async h=>{const x=(h.scope??"_ungrouped").trim()||"_ungrouped",y=(h.description??"").trim();if(!y)throw new Error("Description is required");await Gp(x,y)}}}),m.push({id:"new-assignment",title:"New Assignment",subtitle:"Pick standalone or a project",group:"Create",keywords:["new","create","assignment"],bindableKind:"new-assignment",flow:{steps:[{kind:"picker",id:"project",label:"Project",loadOptions:async()=>{const h=await Gx(),x=[{value:"_standalone",label:"Standalone",hint:"one-off / not in a project"}];for(const y of h)x.push({value:y.slug,label:y.title,hint:y.workspace?`workspace · ${y.workspace}`:"ungrouped"});return x}},{kind:"text",id:"title",label:"Assignment title",placeholder:"What needs to get done?",required:!0}],submit:async(h,x)=>{var N;const y=(h.project??"_standalone").trim()||"_standalone",b=(h.title??"").trim();if(!b)throw new Error("Title is required");const C=dr(b);if(!C)throw new Error("Title must contain at least one alphanumeric character");if(y==="_standalone"){let A=await sf("/api/templates/assignment?standalone=1");A=qs(A,"slug",C),A=qs(A,"title",b);const L=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:A})}),R=await L.json().catch(()=>({}));if(!L.ok)throw new Error(R.error||`Failed to create assignment (HTTP ${L.status})`);const D=((N=R==null?void 0:R.assignment)==null?void 0:N.id)??(R==null?void 0:R.id);D?x.navigate(`/assignments/${D}`):x.navigate("/assignments");return}let k=await sf("/api/templates/assignment");k=qs(k,"slug",C),k=qs(k,"title",b);const j=await fetch(`/api/projects/${encodeURIComponent(y)}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:k})}),S=await j.json().catch(()=>({}));if(!j.ok)throw new Error(S.error||`Failed to create assignment (HTTP ${j.status})`);const T=S.slug??C;x.navigate(`/projects/${y}/assignments/${T}`)}}}),m.push({id:"create-project-route",title:"New Project (advanced editor)",subtitle:"Open the markdown editor",group:"Create",keywords:["new","create","project","advanced","editor"],run:()=>d(`${l}/create/project`)}),m.push({id:"create-standalone-assignment",title:"New Standalone Assignment (editor)",subtitle:"Open the markdown editor",group:"Create",keywords:["new","create","assignment","standalone","one-off","editor"],run:()=>d(`${l}/assignments/new`)}),n&&m.push({id:`create-assignment-in-${n}`,title:`New Assignment in ${s??n}`,subtitle:n,group:"Create",keywords:["new","create","assignment",n],run:()=>d(`${l}/projects/${n}/create/assignment`)}),m.push({id:"create-playbook",title:"New Playbook",group:"Create",keywords:["new","create","playbook"],run:()=>d("/playbooks/create")}),m.push({id:"create-todo-global",title:"New Todo (global, quick)",subtitle:"Ungrouped, single-step",group:"Create",keywords:["new","create","todo","global","ungrouped","quick"],requiresInput:{placeholder:"Describe the todo…",runWithInput:async h=>{const x=h.trim();x&&await rf("_ungrouped",x)}}}),l){const h=l.replace(/^\/w\//,"");m.push({id:`create-todo-workspace-${h}`,title:`New Todo in workspace ${h}`,subtitle:h,group:"Create",keywords:["new","create","todo","workspace",h],requiresInput:{placeholder:`Describe the todo for workspace ${h}…`,runWithInput:async x=>{const y=x.trim();y&&await rf(h,y)}}})}n&&a&&m.push({id:`create-todo-project-${n}`,title:`New Todo in project ${s??n}`,subtitle:`${n} · workspace ${a}`,group:"Create",keywords:["new","create","todo","project",n,a],requiresInput:{placeholder:`Describe the todo for project ${s??n}…`,runWithInput:async h=>{const x=h.trim();x&&await rf(a,x)}}});for(const h of t)m.push({id:`toggle-playbook-${h.slug}`,title:`Toggle Playbook: ${h.name}`,subtitle:h.enabled?"enabled":"disabled",group:"Toggle",keywords:["toggle","playbook",h.slug,...h.tags??[]],run:()=>pE(h.slug,h.enabled,c)});return m.push({id:"toggle-theme",title:"Toggle theme",subtitle:"Light / dark",group:"Theme",keywords:["theme","toggle","light","dark","appearance"],run:()=>f()}),m}function yt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Yx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fc(...e){return t=>{let n=!1;const s=e.map(a=>{const l=Yx(a,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let a=0;a<s.length;a++){const l=s[a];typeof l=="function"?l():Yx(e[a],null)}}}}function mn(...e){return g.useCallback(Fc(...e),e)}function gE(e,t){const n=g.createContext(t),s=l=>{const{children:c,...d}=l,f=g.useMemo(()=>d,Object.values(d));return o.jsx(n.Provider,{value:f,children:c})};s.displayName=e+"Provider";function a(l){const c=g.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[s,a]}function Zs(e,t=[]){let n=[];function s(l,c){const d=g.createContext(c),f=n.length;n=[...n,c];const m=x=>{var S;const{scope:y,children:b,...C}=x,k=((S=y==null?void 0:y[e])==null?void 0:S[f])||d,j=g.useMemo(()=>C,Object.values(C));return o.jsx(k.Provider,{value:j,children:b})};m.displayName=l+"Provider";function h(x,y){var k;const b=((k=y==null?void 0:y[e])==null?void 0:k[f])||d,C=g.useContext(b);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${l}\``)}return[m,h]}const a=()=>{const l=n.map(c=>g.createContext(c));return function(d){const f=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:f}}),[d,f])}};return a.scopeName=e,[s,xE(a,...t)]}function xE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const c=s.reduce((d,{useScope:f,scopeName:m})=>{const x=f(l)[`__scope${m}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Es=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},yE=Xv[" useId ".trim().toString()]||(()=>{}),vE=0;function $o(e){const[t,n]=g.useState(yE());return Es(()=>{n(s=>s??String(vE++))},[e]),t?`radix-${t}`:""}var bE=Xv[" useInsertionEffect ".trim().toString()]||Es;function zc({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[a,l,c]=wE({defaultProp:t,onChange:n}),d=e!==void 0,f=d?e:a;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const x=h.current;x!==d&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=d},[d,s])}const m=g.useCallback(h=>{var x;if(d){const y=jE(h)?h(e):h;y!==e&&((x=c.current)==null||x.call(c,y))}else l(h)},[d,e,l,c]);return[f,m]}function wE({defaultProp:e,onChange:t}){const[n,s]=g.useState(e),a=g.useRef(n),l=g.useRef(t);return bE(()=>{l.current=t},[t]),g.useEffect(()=>{var c;a.current!==n&&((c=l.current)==null||c.call(l,n),a.current=n)},[n,a]),[n,s,l]}function jE(e){return typeof e=="function"}function kE(e){const t=SE(e),n=g.forwardRef((s,a)=>{const{children:l,...c}=s,d=g.Children.toArray(l),f=d.find(CE);if(f){const m=f.props.children,h=d.map(x=>x===f?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return o.jsx(t,{...c,ref:a,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return o.jsx(t,{...c,ref:a,children:l})});return n.displayName=`${e}.Slot`,n}function SE(e){const t=g.forwardRef((n,s)=>{const{children:a,...l}=n;if(g.isValidElement(a)){const c=PE(a),d=EE(l,a.props);return a.type!==g.Fragment&&(d.ref=s?Fc(s,c):c),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NE=Symbol("radix.slottable");function CE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NE}function EE(e,t){const n={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?n[s]=(...d)=>{const f=l(...d);return a(...d),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...l}:s==="className"&&(n[s]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}function PE(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var TE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ft=TE.reduce((e,t)=>{const n=kE(`Primitive.${t}`),s=g.forwardRef((a,l)=>{const{asChild:c,...d}=a,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function RE(e,t){e&&Cs.flushSync(()=>e.dispatchEvent(t))}function Xs(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function AE(e,t=globalThis==null?void 0:globalThis.document){const n=Xs(e);g.useEffect(()=>{const s=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var DE="DismissableLayer",Jf="dismissableLayer.update",IE="dismissableLayer.pointerDownOutside",LE="dismissableLayer.focusOutside",Xx,sw=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yp=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...f}=e,m=g.useContext(sw),[h,x]=g.useState(null),y=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),C=mn(t,D=>x(D)),k=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),T=h?k.indexOf(h):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=T>=S,L=_E(D=>{const O=D.target,G=[...m.branches].some(re=>re.contains(O));!A||G||(a==null||a(D),c==null||c(D),D.defaultPrevented||d==null||d())},y),R=$E(D=>{const O=D.target;[...m.branches].some(re=>re.contains(O))||(l==null||l(D),c==null||c(D),D.defaultPrevented||d==null||d())},y);return AE(D=>{T===m.layers.size-1&&(s==null||s(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},y),g.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Xx=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),Qx(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Xx)}},[h,y,n,m]),g.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),Qx())},[h,m]),g.useEffect(()=>{const D=()=>b({});return document.addEventListener(Jf,D),()=>document.removeEventListener(Jf,D)},[]),o.jsx(Ft.div,{...f,ref:C,style:{pointerEvents:N?A?"auto":"none":void 0,...e.style},onFocusCapture:yt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:yt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:yt(e.onPointerDownCapture,L.onPointerDownCapture)})});Yp.displayName=DE;var OE="DismissableLayerBranch",ME=g.forwardRef((e,t)=>{const n=g.useContext(sw),s=g.useRef(null),a=mn(t,s);return g.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),o.jsx(Ft.div,{...e,ref:a})});ME.displayName=OE;function _E(e,t=globalThis==null?void 0:globalThis.document){const n=Xs(e),s=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){ow(IE,n,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=f,t.addEventListener("click",a.current,{once:!0})):f()}else t.removeEventListener("click",a.current);s.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function $E(e,t=globalThis==null?void 0:globalThis.document){const n=Xs(e),s=g.useRef(!1);return g.useEffect(()=>{const a=l=>{l.target&&!s.current&&ow(LE,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Qx(){const e=new CustomEvent(Jf);document.dispatchEvent(e)}function ow(e,t,n,{discrete:s}){const a=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),s?RE(a,l):a.dispatchEvent(l)}var of="focusScope.autoFocusOnMount",af="focusScope.autoFocusOnUnmount",Jx={bubbles:!1,cancelable:!0},FE="FocusScope",iw=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...c}=e,[d,f]=g.useState(null),m=Xs(a),h=Xs(l),x=g.useRef(null),y=mn(t,k=>f(k)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(s){let k=function(N){if(b.paused||!d)return;const A=N.target;d.contains(A)?x.current=A:Ss(x.current,{select:!0})},j=function(N){if(b.paused||!d)return;const A=N.relatedTarget;A!==null&&(d.contains(A)||Ss(x.current,{select:!0}))},S=function(N){if(document.activeElement===document.body)for(const L of N)L.removedNodes.length>0&&Ss(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const T=new MutationObserver(S);return d&&T.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),T.disconnect()}}},[s,d,b.paused]),g.useEffect(()=>{if(d){ey.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(of,Jx);d.addEventListener(of,m),d.dispatchEvent(S),S.defaultPrevented||(zE(VE(aw(d)),{select:!0}),document.activeElement===k&&Ss(d))}return()=>{d.removeEventListener(of,m),setTimeout(()=>{const S=new CustomEvent(af,Jx);d.addEventListener(af,h),d.dispatchEvent(S),S.defaultPrevented||Ss(k??document.body,{select:!0}),d.removeEventListener(af,h),ey.remove(b)},0)}}},[d,m,h,b]);const C=g.useCallback(k=>{if(!n&&!s||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const T=k.currentTarget,[N,A]=BE(T);N&&A?!k.shiftKey&&S===A?(k.preventDefault(),n&&Ss(N,{select:!0})):k.shiftKey&&S===N&&(k.preventDefault(),n&&Ss(A,{select:!0})):S===T&&k.preventDefault()}},[n,s,b.paused]);return o.jsx(Ft.div,{tabIndex:-1,...c,ref:y,onKeyDown:C})});iw.displayName=FE;function zE(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(Ss(s,{select:t}),document.activeElement!==n)return}function BE(e){const t=aw(e),n=Zx(t,e),s=Zx(t.reverse(),e);return[n,s]}function aw(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zx(e,t){for(const n of e)if(!UE(n,{upTo:t}))return n}function UE(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HE(e){return e instanceof HTMLInputElement&&"select"in e}function Ss(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&HE(e)&&t&&e.select()}}var ey=WE();function WE(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ty(e,t),e.unshift(t)},remove(t){var n;e=ty(e,t),(n=e[0])==null||n.resume()}}}function ty(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function VE(e){return e.filter(t=>t.tagName!=="A")}var qE="Portal",Xp=g.forwardRef((e,t)=>{var d;const{container:n,...s}=e,[a,l]=g.useState(!1);Es(()=>l(!0),[]);const c=n||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?dC.createPortal(o.jsx(Ft.div,{...s,ref:t}),c):null});Xp.displayName=qE;function KE(e,t){return g.useReducer((n,s)=>t[n][s]??n,e)}var eo=e=>{const{present:t,children:n}=e,s=GE(t),a=typeof n=="function"?n({present:s.isPresent}):g.Children.only(n),l=mn(s.ref,YE(a));return typeof n=="function"||s.isPresent?g.cloneElement(a,{ref:l}):null};eo.displayName="Presence";function GE(e){const[t,n]=g.useState(),s=g.useRef(null),a=g.useRef(e),l=g.useRef("none"),c=e?"mounted":"unmounted",[d,f]=KE(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const m=ql(s.current);l.current=d==="mounted"?m:"none"},[d]),Es(()=>{const m=s.current,h=a.current;if(h!==e){const y=l.current,b=ql(m);e?f("MOUNT"):b==="none"||(m==null?void 0:m.display)==="none"?f("UNMOUNT"):f(h&&y!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),Es(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,x=b=>{const k=ql(s.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(f("ANIMATION_END"),!a.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},y=b=>{b.target===t&&(l.current=ql(s.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(m=>{s.current=m?getComputedStyle(m):null,n(m)},[])}}function ql(e){return(e==null?void 0:e.animationName)||"none"}function YE(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lf=0;function XE(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ny()),document.body.insertAdjacentElement("beforeend",e[1]??ny()),lf++,()=>{lf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),lf--}},[])}function ny(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Nr=function(){return Nr=Object.assign||function(t){for(var n,s=1,a=arguments.length;s<a;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Nr.apply(this,arguments)};function lw(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(n[s[a]]=e[s[a]]);return n}function QE(e,t,n){if(n||arguments.length===2)for(var s=0,a=t.length,l;s<a;s++)(l||!(s in t))&&(l||(l=Array.prototype.slice.call(t,0,s)),l[s]=t[s]);return e.concat(l||Array.prototype.slice.call(t))}var cc="right-scroll-bar-position",uc="width-before-scroll-bar",JE="with-scroll-bars-hidden",ZE="--removed-body-scroll-bar-size";function cf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eP(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var a=n.value;a!==s&&(n.value=s,n.callback(s,a))}}}})[0];return n.callback=t,n.facade}var tP=typeof window<"u"?g.useLayoutEffect:g.useEffect,ry=new WeakMap;function nP(e,t){var n=eP(null,function(s){return e.forEach(function(a){return cf(a,s)})});return tP(function(){var s=ry.get(n);if(s){var a=new Set(s),l=new Set(e),c=n.current;a.forEach(function(d){l.has(d)||cf(d,null)}),l.forEach(function(d){a.has(d)||cf(d,c)})}ry.set(n,e)},[e]),n}function rP(e){return e}function sP(e,t){t===void 0&&(t=rP);var n=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var c=t(l,s);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(s=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){s=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var f=function(){var h=c;c=[],h.forEach(l)},m=function(){return Promise.resolve().then(f)};m(),n={push:function(h){c.push(h),m()},filter:function(h){return c=c.filter(h),n}}}};return a}function oP(e){e===void 0&&(e={});var t=sP(null);return t.options=Nr({async:!0,ssr:!1},e),t}var cw=function(e){var t=e.sideCar,n=lw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return g.createElement(s,Nr({},n))};cw.isSideCarExport=!0;function iP(e,t){return e.useMedium(t),cw}var uw=oP(),uf=function(){},Bc=g.forwardRef(function(e,t){var n=g.useRef(null),s=g.useState({onScrollCapture:uf,onWheelCapture:uf,onTouchMoveCapture:uf}),a=s[0],l=s[1],c=e.forwardProps,d=e.children,f=e.className,m=e.removeScrollBar,h=e.enabled,x=e.shards,y=e.sideCar,b=e.noRelative,C=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,T=S===void 0?"div":S,N=e.gapMode,A=lw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=y,R=nP([n,t]),D=Nr(Nr({},A),a);return g.createElement(g.Fragment,null,h&&g.createElement(L,{sideCar:uw,removeScrollBar:m,shards:x,noRelative:b,noIsolation:C,inert:k,setCallbacks:l,allowPinchZoom:!!j,lockRef:n,gapMode:N}),c?g.cloneElement(g.Children.only(d),Nr(Nr({},D),{ref:R})):g.createElement(T,Nr({},D,{className:f,ref:R}),d))});Bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bc.classNames={fullWidth:uc,zeroRight:cc};var aP=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lP(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aP();return t&&e.setAttribute("nonce",t),e}function cP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function uP(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lP())&&(cP(t,n),uP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fP=function(){var e=dP();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dw=function(){var e=fP(),t=function(n){var s=n.styles,a=n.dynamic;return e(s,a),null};return t},pP={left:0,top:0,right:0,gap:0},df=function(e){return parseInt(e||"",10)||0},hP=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[df(n),df(s),df(a)]},mP=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pP;var t=hP(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},gP=dw(),Fo="data-scroll-locked",xP=function(e,t,n,s){var a=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
441
|
+
.`.concat(JE,` {
|
|
442
|
+
overflow: hidden `).concat(s,`;
|
|
443
|
+
padding-right: `).concat(d,"px ").concat(s,`;
|
|
444
|
+
}
|
|
445
|
+
body[`).concat(Fo,`] {
|
|
446
|
+
overflow: hidden `).concat(s,`;
|
|
447
|
+
overscroll-behavior: contain;
|
|
448
|
+
`).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&`
|
|
449
|
+
padding-left: `.concat(a,`px;
|
|
450
|
+
padding-top: `).concat(l,`px;
|
|
451
|
+
padding-right: `).concat(c,`px;
|
|
452
|
+
margin-left:0;
|
|
453
|
+
margin-top:0;
|
|
454
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
455
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.`).concat(cc,` {
|
|
459
|
+
right: `).concat(d,"px ").concat(s,`;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.`).concat(uc,` {
|
|
463
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.`).concat(cc," .").concat(cc,` {
|
|
467
|
+
right: 0 `).concat(s,`;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.`).concat(uc," .").concat(uc,` {
|
|
471
|
+
margin-right: 0 `).concat(s,`;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
body[`).concat(Fo,`] {
|
|
475
|
+
`).concat(ZE,": ").concat(d,`px;
|
|
476
|
+
}
|
|
477
|
+
`)},sy=function(){var e=parseInt(document.body.getAttribute(Fo)||"0",10);return isFinite(e)?e:0},yP=function(){g.useEffect(function(){return document.body.setAttribute(Fo,(sy()+1).toString()),function(){var e=sy()-1;e<=0?document.body.removeAttribute(Fo):document.body.setAttribute(Fo,e.toString())}},[])},vP=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;yP();var l=g.useMemo(function(){return mP(a)},[a]);return g.createElement(gP,{styles:xP(l,!t,a,n?"":"!important")})},Zf=!1;if(typeof window<"u")try{var Kl=Object.defineProperty({},"passive",{get:function(){return Zf=!0,!0}});window.addEventListener("test",Kl,Kl),window.removeEventListener("test",Kl,Kl)}catch{Zf=!1}var To=Zf?{passive:!1}:!1,bP=function(e){return e.tagName==="TEXTAREA"},fw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bP(e)&&n[t]==="visible")},wP=function(e){return fw(e,"overflowY")},jP=function(e){return fw(e,"overflowX")},oy=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=pw(e,s);if(a){var l=hw(e,s),c=l[1],d=l[2];if(c>d)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},kP=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},SP=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},pw=function(e,t){return e==="v"?wP(t):jP(t)},hw=function(e,t){return e==="v"?kP(t):SP(t)},NP=function(e,t){return e==="h"&&t==="rtl"?-1:1},CP=function(e,t,n,s,a){var l=NP(e,window.getComputedStyle(t).direction),c=l*s,d=n.target,f=t.contains(d),m=!1,h=c>0,x=0,y=0;do{if(!d)break;var b=hw(e,d),C=b[0],k=b[1],j=b[2],S=k-j-l*C;(C||S)&&pw(e,d)&&(x+=S,y+=C);var T=d.parentNode;d=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!f&&d!==document.body||f&&(t.contains(d)||t===d));return(h&&Math.abs(x)<1||!h&&Math.abs(y)<1)&&(m=!0),m},Gl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iy=function(e){return[e.deltaX,e.deltaY]},ay=function(e){return e&&"current"in e?e.current:e},EP=function(e,t){return e[0]===t[0]&&e[1]===t[1]},PP=function(e){return`
|
|
478
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
479
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
480
|
+
`)},TP=0,Ro=[];function RP(e){var t=g.useRef([]),n=g.useRef([0,0]),s=g.useRef(),a=g.useState(TP++)[0],l=g.useState(dw)[0],c=g.useRef(e);g.useEffect(function(){c.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var k=QE([e.lockRef.current],(e.shards||[]).map(ay),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=g.useCallback(function(k,j){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var S=Gl(k),T=n.current,N="deltaX"in k?k.deltaX:T[0]-S[0],A="deltaY"in k?k.deltaY:T[1]-S[1],L,R=k.target,D=Math.abs(N)>Math.abs(A)?"h":"v";if("touches"in k&&D==="h"&&R.type==="range")return!1;var O=window.getSelection(),G=O&&O.anchorNode,re=G?G===R||G.contains(R):!1;if(re)return!1;var z=oy(D,R);if(!z)return!0;if(z?L=D:(L=D==="v"?"h":"v",z=oy(D,R)),!z)return!1;if(!s.current&&"changedTouches"in k&&(N||A)&&(s.current=L),!L)return!0;var K=s.current||L;return CP(K,j,k,K==="h"?N:A)},[]),f=g.useCallback(function(k){var j=k;if(!(!Ro.length||Ro[Ro.length-1]!==l)){var S="deltaY"in j?iy(j):Gl(j),T=t.current.filter(function(L){return L.name===j.type&&(L.target===j.target||j.target===L.shadowParent)&&EP(L.delta,S)})[0];if(T&&T.should){j.cancelable&&j.preventDefault();return}if(!T){var N=(c.current.shards||[]).map(ay).filter(Boolean).filter(function(L){return L.contains(j.target)}),A=N.length>0?d(j,N[0]):!c.current.noIsolation;A&&j.cancelable&&j.preventDefault()}}},[]),m=g.useCallback(function(k,j,S,T){var N={name:k,delta:j,target:S,should:T,shadowParent:AP(S)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(A){return A!==N})},1)},[]),h=g.useCallback(function(k){n.current=Gl(k),s.current=void 0},[]),x=g.useCallback(function(k){m(k.type,iy(k),k.target,d(k,e.lockRef.current))},[]),y=g.useCallback(function(k){m(k.type,Gl(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return Ro.push(l),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:y}),document.addEventListener("wheel",f,To),document.addEventListener("touchmove",f,To),document.addEventListener("touchstart",h,To),function(){Ro=Ro.filter(function(k){return k!==l}),document.removeEventListener("wheel",f,To),document.removeEventListener("touchmove",f,To),document.removeEventListener("touchstart",h,To)}},[]);var b=e.removeScrollBar,C=e.inert;return g.createElement(g.Fragment,null,C?g.createElement(l,{styles:PP(a)}):null,b?g.createElement(vP,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function AP(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const DP=iP(uw,RP);var mw=g.forwardRef(function(e,t){return g.createElement(Bc,Nr({},e,{ref:t,sideCar:DP}))});mw.classNames=Bc.classNames;var IP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ao=new WeakMap,Yl=new WeakMap,Xl={},ff=0,gw=function(e){return e&&(e.host||gw(e.parentNode))},LP=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=gw(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},OP=function(e,t,n,s){var a=LP(t,Array.isArray(e)?e:[e]);Xl[n]||(Xl[n]=new WeakMap);var l=Xl[n],c=[],d=new Set,f=new Set(a),m=function(x){!x||d.has(x)||(d.add(x),m(x.parentNode))};a.forEach(m);var h=function(x){!x||f.has(x)||Array.prototype.forEach.call(x.children,function(y){if(d.has(y))h(y);else try{var b=y.getAttribute(s),C=b!==null&&b!=="false",k=(Ao.get(y)||0)+1,j=(l.get(y)||0)+1;Ao.set(y,k),l.set(y,j),c.push(y),k===1&&C&&Yl.set(y,!0),j===1&&y.setAttribute(n,"true"),C||y.setAttribute(s,"true")}catch(S){console.error("aria-hidden: cannot operate on ",y,S)}})};return h(t),d.clear(),ff++,function(){c.forEach(function(x){var y=Ao.get(x)-1,b=l.get(x)-1;Ao.set(x,y),l.set(x,b),y||(Yl.has(x)||x.removeAttribute(s),Yl.delete(x)),b||x.removeAttribute(n)}),ff--,ff||(Ao=new WeakMap,Ao=new WeakMap,Yl=new WeakMap,Xl={})}},MP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=IP(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),OP(s,a,n,"aria-hidden")):function(){return null}};function _P(e){const t=$P(e),n=g.forwardRef((s,a)=>{const{children:l,...c}=s,d=g.Children.toArray(l),f=d.find(zP);if(f){const m=f.props.children,h=d.map(x=>x===f?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return o.jsx(t,{...c,ref:a,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return o.jsx(t,{...c,ref:a,children:l})});return n.displayName=`${e}.Slot`,n}function $P(e){const t=g.forwardRef((n,s)=>{const{children:a,...l}=n;if(g.isValidElement(a)){const c=UP(a),d=BP(l,a.props);return a.type!==g.Fragment&&(d.ref=s?Fc(s,c):c),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FP=Symbol("radix.slottable");function zP(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FP}function BP(e,t){const n={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?n[s]=(...d)=>{const f=l(...d);return a(...d),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...l}:s==="className"&&(n[s]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}function UP(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Uc="Dialog",[xw,yw]=Zs(Uc),[HP,xr]=xw(Uc),vw=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:a,onOpenChange:l,modal:c=!0}=e,d=g.useRef(null),f=g.useRef(null),[m,h]=zc({prop:s,defaultProp:a??!1,onChange:l,caller:Uc});return o.jsx(HP,{scope:t,triggerRef:d,contentRef:f,contentId:$o(),titleId:$o(),descriptionId:$o(),open:m,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(x=>!x),[h]),modal:c,children:n})};vw.displayName=Uc;var bw="DialogTrigger",ww=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=xr(bw,n),l=mn(t,a.triggerRef);return o.jsx(Ft.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Zp(a.open),...s,ref:l,onClick:yt(e.onClick,a.onOpenToggle)})});ww.displayName=bw;var Qp="DialogPortal",[WP,jw]=xw(Qp,{forceMount:void 0}),kw=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:a}=e,l=xr(Qp,t);return o.jsx(WP,{scope:t,forceMount:n,children:g.Children.map(s,c=>o.jsx(eo,{present:n||l.open,children:o.jsx(Xp,{asChild:!0,container:a,children:c})}))})};kw.displayName=Qp;var yc="DialogOverlay",Sw=g.forwardRef((e,t)=>{const n=jw(yc,e.__scopeDialog),{forceMount:s=n.forceMount,...a}=e,l=xr(yc,e.__scopeDialog);return l.modal?o.jsx(eo,{present:s||l.open,children:o.jsx(qP,{...a,ref:t})}):null});Sw.displayName=yc;var VP=_P("DialogOverlay.RemoveScroll"),qP=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=xr(yc,n);return o.jsx(mw,{as:VP,allowPinchZoom:!0,shards:[a.contentRef],children:o.jsx(Ft.div,{"data-state":Zp(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Qs="DialogContent",Nw=g.forwardRef((e,t)=>{const n=jw(Qs,e.__scopeDialog),{forceMount:s=n.forceMount,...a}=e,l=xr(Qs,e.__scopeDialog);return o.jsx(eo,{present:s||l.open,children:l.modal?o.jsx(KP,{...a,ref:t}):o.jsx(GP,{...a,ref:t})})});Nw.displayName=Qs;var KP=g.forwardRef((e,t)=>{const n=xr(Qs,e.__scopeDialog),s=g.useRef(null),a=mn(t,n.contentRef,s);return g.useEffect(()=>{const l=s.current;if(l)return MP(l)},[]),o.jsx(Cw,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yt(e.onCloseAutoFocus,l=>{var c;l.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:yt(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:yt(e.onFocusOutside,l=>l.preventDefault())})}),GP=g.forwardRef((e,t)=>{const n=xr(Qs,e.__scopeDialog),s=g.useRef(!1),a=g.useRef(!1);return o.jsx(Cw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,l),l.defaultPrevented||(s.current||(d=n.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:l=>{var f,m;(f=e.onInteractOutside)==null||f.call(e,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=l.target;((m=n.triggerRef.current)==null?void 0:m.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&a.current&&l.preventDefault()}})}),Cw=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:l,...c}=e,d=xr(Qs,n),f=g.useRef(null),m=mn(t,f);return XE(),o.jsxs(o.Fragment,{children:[o.jsx(iw,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:l,children:o.jsx(Yp,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Zp(d.open),...c,ref:m,onDismiss:()=>d.onOpenChange(!1)})}),o.jsxs(o.Fragment,{children:[o.jsx(XP,{titleId:d.titleId}),o.jsx(JP,{contentRef:f,descriptionId:d.descriptionId})]})]})}),Jp="DialogTitle",Ew=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=xr(Jp,n);return o.jsx(Ft.h2,{id:a.titleId,...s,ref:t})});Ew.displayName=Jp;var Pw="DialogDescription",Tw=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=xr(Pw,n);return o.jsx(Ft.p,{id:a.descriptionId,...s,ref:t})});Tw.displayName=Pw;var Rw="DialogClose",Aw=g.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=xr(Rw,n);return o.jsx(Ft.button,{type:"button",...s,ref:t,onClick:yt(e.onClick,()=>a.onOpenChange(!1))})});Aw.displayName=Rw;function Zp(e){return e?"open":"closed"}var Dw="DialogTitleWarning",[YP,Iw]=gE(Dw,{contentName:Qs,titleName:Jp,docsSlug:"dialog"}),XP=({titleId:e})=>{const t=Iw(Dw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
481
|
+
|
|
482
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
483
|
+
|
|
484
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},QP="DialogDescriptionWarning",JP=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Iw(QP).contentName}}.`;return g.useEffect(()=>{var l;const a=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Lw=vw,ZP=ww,Ow=kw,eh=Sw,th=Nw,nh=Ew,rh=Tw,Mw=Aw;const ei=Lw,eT=Ow,_w=g.forwardRef(({className:e,...t},n)=>o.jsx(eh,{ref:n,className:Be("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));_w.displayName=eh.displayName;const to=g.forwardRef(({className:e,children:t,...n},s)=>o.jsxs(eT,{children:[o.jsx(_w,{}),o.jsx(th,{ref:s,className:Be("chrome-card fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 !p-6 outline-none",e),...n,children:t})]}));to.displayName=th.displayName;function sh({className:e,...t}){return o.jsx("div",{className:Be("flex flex-col space-y-2 text-left",e),...t})}function oh({className:e,...t}){return o.jsx("div",{className:Be("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const no=g.forwardRef(({className:e,...t},n)=>o.jsx(nh,{ref:n,className:Be("text-lg font-semibold tracking-tight text-foreground",e),...t}));no.displayName=nh.displayName;const Pa=g.forwardRef(({className:e,...t},n)=>o.jsx(rh,{ref:n,className:Be("text-sm leading-6 text-muted-foreground",e),...t}));Pa.displayName=rh.displayName;const tT=-1,nT=-40;function pf(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,s=0,a=-2,l=0;for(let c=0;c<e.length;c++){const d=e[c];let f=!1;for(;s<t.length;)if(t[s]===d){if(n+=100,s===a+1&&(n+=20),s===0)n+=30;else{const m=t[s-1];(m===" "||m==="-"||m==="_"||m==="/")&&(n+=15)}l>0&&(n+=Math.max(nT,l*tT)),a=s,l=0,s++,f=!0;break}else l++,s++;if(!f)return-1/0}return n}const ly={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function ih(e,t,n=50){const s=e.toLowerCase();if(!s)return t.slice(0,n).map(c=>({...c,score:0}));const l=t.map(c=>{var x;const d=pf(s,c.title.toLowerCase())*1,f=c.subtitle?pf(s,c.subtitle.toLowerCase())*.5:-1/0,m=(x=c.keywords)!=null&&x.length?pf(s,c.keywords.join(" ").toLowerCase())*.3:-1/0,h=Math.max(d,f,m);return{...c,score:h}}).filter(c=>c.score>-1/0);return l.sort((c,d)=>d.score!==c.score?d.score-c.score:c.title.length!==d.title.length?c.title.length-d.title.length:c.title!==d.title?c.title<d.title?-1:1:(ly[c.type]??99)-(ly[d.type]??99)),l.slice(0,n)}const rT={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function sT({entries:e}){const{paletteOpen:t,closePalette:n}=As(),s=St(),[a,l]=g.useState(""),[c,d]=g.useState(0),f=g.useRef(null),m=g.useMemo(()=>ih(a,e,50),[a,e]);g.useEffect(()=>{d(0)},[a,t]),g.useEffect(()=>{t||l("")},[t]),g.useEffect(()=>{var b;const y=(b=f.current)==null?void 0:b.querySelector(`[data-palette-idx="${c}"]`);y==null||y.scrollIntoView({block:"nearest"})},[c]);function h(y){s(y.route),n()}function x(y){if(y.key==="ArrowDown")y.preventDefault(),d(b=>Math.min(m.length-1,b+1));else if(y.key==="ArrowUp")y.preventDefault(),d(b=>Math.max(0,b-1));else if(y.key==="Enter"){y.preventDefault();const b=m[c];b&&h(b)}}return o.jsx(ei,{open:t,onOpenChange:y=>y?null:n(),children:o.jsxs(to,{className:"max-w-xl p-0 gap-0",children:[o.jsx(no,{className:"sr-only",children:"Command palette"}),o.jsx("input",{autoFocus:!0,type:"text",value:a,onChange:y=>l(y.target.value),onKeyDown:x,placeholder:"Search projects, assignments, playbooks, servers, todos…",className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0"}),o.jsx("div",{ref:f,className:"max-h-[60vh] overflow-y-auto p-1",children:m.length===0?o.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:a?"No matches":"Start typing to search"}):m.map((y,b)=>{const C=b===c;return o.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>h(y),onMouseEnter:()=>d(b),className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors ${C?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[o.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:rT[y.type]??y.type}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:y.title}),y.subtitle?o.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:y.subtitle}):null]},y.id)})}),o.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[o.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),o.jsxs("span",{children:[m.length," result",m.length===1?"":"s"]})]})]})})}function oT({label:e,onBack:t,disabled:n,stepCounter:s}){return o.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-3 py-2",children:[o.jsxs("button",{type:"button",onClick:t,disabled:n,className:"inline-flex h-7 items-center gap-1 rounded border border-border/70 bg-background/60 px-2 text-[11px] text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground disabled:opacity-50","aria-label":"Back",children:[o.jsx(yC,{className:"h-3.5 w-3.5","aria-hidden":"true"}),o.jsx("span",{children:"Back"})]}),o.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),s?o.jsxs("span",{className:"ml-auto text-[10px] text-muted-foreground/80",children:["step ",s.current," of ",s.total]}):null]})}function iT({step:e,initialValue:t,disabled:n,onSubmit:s}){const[a,l]=g.useState(t??""),[c,d]=g.useState(!1),f=g.useRef(null);g.useEffect(()=>{var C;(C=f.current)==null||C.focus()},[]);const m=a.trim(),h=e.required!==!1,x=e.pattern&&m.length>0&&!e.pattern.regex.test(m),y=!n&&(!h||m.length>0)&&!x;function b(C){if(C.key==="Enter"){if(C.preventDefault(),!y){d(!0);return}s(m)}}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:f,type:"text",value:a,onChange:C=>{l(C.target.value),d(!1)},onKeyDown:b,placeholder:e.placeholder,disabled:n,className:"w-full border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),c&&e.pattern&&x?o.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:e.pattern.message}):null]})}function aT({step:e,disabled:t,onSubmit:n}){const[s,a]=g.useState({phase:"loading"}),[l,c]=g.useState(""),[d,f]=g.useState(0),[m,h]=g.useState(0),x=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{var k;(k=x.current)==null||k.focus()},[]),g.useEffect(()=>{let k=!1;return a({phase:"loading"}),Promise.resolve().then(()=>e.loadOptions()).then(j=>{k||a({phase:"loaded",options:j})}).catch(j=>{if(k)return;const S=j instanceof Error?j.message:"Failed to load options";a({phase:"error",message:S})}),()=>{k=!0}},[e,m]);const b=g.useMemo(()=>{if(s.phase!=="loaded")return[];const k=s.options.map(j=>({type:"option",title:j.label,subtitle:j.hint,keywords:[j.value],option:j}));return ih(l,k,100)},[s,l]);g.useEffect(()=>{f(0)},[b.length]),g.useEffect(()=>{var j;const k=(j=y.current)==null?void 0:j.querySelector(`[data-picker-idx="${d}"]`);k==null||k.scrollIntoView({block:"nearest"})},[d]);function C(k){if(s.phase==="loaded"){if(k.key==="ArrowDown")k.preventDefault(),f(j=>Math.min(b.length-1,j+1));else if(k.key==="ArrowUp")k.preventDefault(),f(j=>Math.max(0,j-1));else if(k.key==="Enter"){k.preventDefault();const j=b[d];j&&n(j.option.value)}}}return o.jsxs(o.Fragment,{children:[o.jsx("input",{ref:x,type:"text",value:l,onChange:k=>c(k.target.value),onKeyDown:C,placeholder:`Filter ${e.label.toLowerCase()}…`,disabled:t||s.phase==="loading",className:"w-full border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),o.jsx("div",{ref:y,className:"max-h-[60vh] min-h-[120px] overflow-y-auto p-1",children:s.phase==="loading"?o.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Loading…"}):s.phase==="error"?o.jsxs("div",{className:"px-4 py-4 text-sm",children:[o.jsxs("div",{className:"mb-2 text-destructive",children:["Failed to load: ",s.message]}),o.jsx("button",{type:"button",onClick:()=>h(k=>k+1),className:"rounded border border-border/70 bg-background/60 px-2 py-1 text-xs text-foreground hover:bg-accent/40",children:"Retry"})]}):b.length===0?o.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:s.options.length===0?e.emptyMessage??"No options available":"No matches"}):b.map((k,j)=>{const S=j===d;return o.jsxs("button",{type:"button","data-picker-idx":j,onClick:()=>n(k.option.value),onMouseEnter:()=>f(j),disabled:t,className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors disabled:opacity-60 ${S?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.option.label}),k.option.hint?o.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:k.option.hint}):null]},k.option.value)})})]})}function lT({entries:e}){var ge,Ne;const t=St(),{actionsPaletteOpen:n,closeActionsPalette:s,customBindings:a,bindAction:l,findConflict:c,pendingActionKind:d,consumePendingActionKind:f}=As(),[m,h]=g.useState(""),[x,y]=g.useState(0),[b,C]=g.useState(null),[k,j]=g.useState(""),[S,T]=g.useState(null),[N,A]=g.useState(null),[L,R]=g.useState(!1),[D,O]=g.useState(null),G=g.useRef(null),re=g.useMemo(()=>e.map(te=>({type:te.group.toLowerCase(),title:te.title,subtitle:te.subtitle,keywords:te.keywords,action:te})),[e]),z=g.useMemo(()=>ih(m,re,50),[m,re]);g.useEffect(()=>{y(0)},[m,n]),g.useEffect(()=>{n||(h(""),C(null),j(""),T(null),A(null),R(!1),O(null))},[n]),g.useEffect(()=>{if(!n||!d)return;const te=f();if(!te)return;const fe=e.find(be=>be.bindableKind===te);fe&&K(fe)},[n,d]),g.useEffect(()=>{var fe;const te=(fe=G.current)==null?void 0:fe.querySelector(`[data-palette-idx="${x}"]`);te==null||te.scrollIntoView({block:"nearest"})},[x]);async function K(te){if(!L){if(te.flow&&te.flow.steps.length>0){T({action:te,stepIndex:0,values:{}}),O(null);return}if(te.requiresInput){C(te),j(""),O(null);return}if(te.run){R(!0),O(null);try{await te.run(),s()}catch(fe){O(fe instanceof Error?fe.message:"Action failed")}finally{R(!1)}}}}async function q(te){if(!S)return;const fe=S.action.flow.steps[S.stepIndex],be={...S.values,[fe.id]:te};if(S.stepIndex+1<S.action.flow.steps.length){T({action:S.action,stepIndex:S.stepIndex+1,values:be});return}R(!0),O(null);try{await S.action.flow.submit(be,{navigate:t}),s()}catch(ke){O(ke instanceof Error?ke.message:"Action failed")}finally{R(!1)}}function J(){if(S&&!L){if(S.stepIndex===0){T(null),O(null);return}T({action:S.action,stepIndex:S.stepIndex-1,values:S.values}),O(null)}}async function _(){if(L||!(b!=null&&b.requiresInput))return;const te=k.trim();if(te){R(!0),O(null);try{await b.requiresInput.runWithInput(te),s()}catch(fe){O(fe instanceof Error?fe.message:"Action failed")}finally{R(!1)}}}function F(te){if(te.key==="ArrowDown")te.preventDefault(),y(fe=>Math.min(z.length-1,fe+1));else if(te.key==="ArrowUp")te.preventDefault(),y(fe=>Math.max(0,fe-1));else if(te.key==="Enter"&&(te.metaKey||te.ctrlKey)){te.preventDefault();const fe=z[x];fe!=null&&fe.action.bindableKind&&A({action:fe.action,combo:null,conflict:null,saving:!1,error:null})}else if(te.key==="Enter"){te.preventDefault();const fe=z[x];fe&&K(fe.action)}}function B(te){te.key==="Enter"?(te.preventDefault(),_()):te.key==="Escape"&&(te.preventDefault(),C(null),j(""))}function U(te){if(!N||te.key==="Escape"||te.key==="Enter"&&!N.combo)return;te.preventDefault(),te.stopPropagation();const fe=Qb(te.nativeEvent);if(!fe)return;const be=c(fe,N.action.bindableKind);A({...N,combo:fe,conflict:be,error:null})}async function Z(){var te;if(!(!N||!N.combo||!N.action.bindableKind)){if((te=N.conflict)!=null&&te.description){A({...N,error:`Reserved: ${N.conflict.description}`});return}A({...N,saving:!0,error:null});try{await l(N.action.bindableKind,N.combo),A(null)}catch(fe){A({...N,saving:!1,error:fe instanceof Error?fe.message:"Failed to save binding"})}}}const P=b!==null,M=S!==null,Q=N!==null,I=S?S.action.flow.steps[S.stepIndex]:null;return o.jsx(ei,{open:n,onOpenChange:te=>te?null:s(),children:o.jsxs(to,{className:"max-w-xl p-0 gap-0",onEscapeKeyDown:te=>{if(!L){if(Q){te.preventDefault(),A(null);return}if(M){te.preventDefault(),J();return}P&&(te.preventDefault(),C(null),j(""),O(null))}},children:[o.jsx(no,{className:"sr-only",children:"Actions palette"}),Q&&N?o.jsxs("div",{onKeyDown:U,tabIndex:-1,autoFocus:!0,children:[o.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-4 py-3",children:[o.jsx(Kf,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),o.jsxs("span",{className:"text-sm text-foreground",children:["Bind hotkey for ",N.action.title]})]}),o.jsx("div",{className:"px-4 py-6 text-center",children:N.combo?o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"text-2xl font-semibold tracking-wide text-foreground",children:Tr(N.combo)}),(ge=N.conflict)!=null&&ge.description?o.jsxs("div",{className:"text-sm text-destructive",children:["Reserved: ",N.conflict.description," (cannot bind)"]}):(Ne=N.conflict)!=null&&Ne.kind?o.jsxs("div",{className:"text-sm text-amber-500 dark:text-amber-400",children:['Already bound to "',N.conflict.kind,'". Press Enter to overwrite.']}):o.jsx("div",{className:"text-sm text-muted-foreground",children:"Press Enter to save, or another key to retry."}),N.error?o.jsx("div",{className:"text-sm text-destructive",children:N.error}):null]}):o.jsx("div",{className:"text-sm text-muted-foreground",children:"Press the key combination you want to bind…"})}),o.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[o.jsx("span",{children:"any key records · Enter saves · Esc cancels"}),o.jsx("span",{children:N.saving?"Saving…":""})]}),o.jsx("button",{type:"button",className:"sr-only",onClick:()=>void Z(),"data-bind-confirm":!0}),o.jsx("input",{type:"hidden",onKeyDown:te=>{te.key==="Enter"&&Z()}})]}):M&&I&&S?o.jsxs(o.Fragment,{children:[o.jsx(oT,{label:`${S.action.title} · ${I.label}`,onBack:J,disabled:L,stepCounter:{current:S.stepIndex+1,total:S.action.flow.steps.length}}),I.kind==="text"?o.jsx(iT,{step:I,initialValue:S.values[I.id],disabled:L,onSubmit:q}):o.jsx(aT,{step:I,disabled:L,onSubmit:q}),D?o.jsx("div",{className:"border-t border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:D}):null,o.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[o.jsx("span",{children:"↵ next · ← back · Esc back"}),o.jsx("span",{children:L?"Running…":""})]})]}):P?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-4 py-3",children:[o.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:b.group}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b.title})]}),o.jsx("input",{autoFocus:!0,type:"text",value:k,onChange:te=>j(te.target.value),onKeyDown:B,placeholder:b.requiresInput.placeholder,disabled:L,className:"w-full border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),D?o.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:D}):null,o.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[o.jsxs("span",{children:["↵"," submit ","·"," Esc back"]}),o.jsx("span",{children:L?"Running…":""})]})]}):o.jsxs(o.Fragment,{children:[o.jsx("input",{autoFocus:!0,type:"text",value:m,onChange:te=>h(te.target.value),onKeyDown:F,placeholder:"Run an action: new project, new todo, toggle…",disabled:L,className:"w-full rounded-t-xl border-0 border-b border-border/70 bg-transparent px-4 py-3 text-sm text-foreground outline-none focus:ring-0 disabled:opacity-60"}),D?o.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:D}):null,o.jsx("div",{ref:G,className:"max-h-[60vh] overflow-y-auto p-1",children:z.length===0?o.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:m?"No matches":"Start typing to search actions"}):z.map((te,fe)=>{const be=fe===x,ke=te.action.bindableKind,we=ke?a[ke]:void 0;return o.jsxs("button",{type:"button","data-palette-idx":fe,onClick:()=>K(te.action),onMouseEnter:()=>y(fe),disabled:L,className:`group flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors disabled:opacity-60 ${be?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[o.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:te.action.group}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:te.action.title}),te.action.subtitle?o.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:te.action.subtitle}):null,we?o.jsx("span",{className:"shrink-0 rounded border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] font-medium tracking-wide text-foreground",children:Tr(we)}):null,ke?o.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Bind hotkey",onClick:Ye=>{Ye.preventDefault(),Ye.stopPropagation(),A({action:te.action,combo:null,conflict:null,saving:!1,error:null})},className:`shrink-0 inline-flex h-6 w-6 items-center justify-center rounded border border-border/70 bg-background/60 text-muted-foreground transition-opacity hover:text-foreground ${be?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:o.jsx(Kf,{className:"h-3.5 w-3.5","aria-hidden":"true"})}):null]},te.action.id)})}),o.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[o.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," run ","·"," ⌘↵ bind ","·"," Esc close"]}),o.jsx("span",{children:L?"Running…":`${z.length} action${z.length===1?"":"s"}`})]})]})]})})}const cT=[{combo:"mod+k",description:"Open command palette",scope:"global"},{combo:"mod+shift+k",description:"Open actions palette",scope:"global"},{combo:"?",description:"Show keyboard shortcuts",scope:"global"},{combo:"escape",description:"Close dialog or cancel",scope:"global"},{combo:"enter",description:"Activate selected item",scope:"global"},{combo:"shift+t",description:"Toggle light/dark theme",scope:"global"},{combo:"g",description:"Start navigation chord",scope:"global"},{combo:"g o",description:"Go to Overview",scope:"global"},{combo:"g m",description:"Go to Projects",scope:"global"},{combo:"g a",description:"Go to Assignments",scope:"global"},{combo:"g t",description:"Go to Todos",scope:"global"},{combo:"g s",description:"Go to Servers",scope:"global"},{combo:"g !",description:"Go to Attention",scope:"global"},{combo:"g ,",description:"Go to Settings",scope:"global"},{combo:"j",description:"Move selection down",scope:"list"},{combo:"k",description:"Move selection up",scope:"list"},{combo:"o",description:"Open selected item",scope:"list"},{combo:"a",description:"New assignment in project",scope:"project"},{combo:"e",description:"Edit project / assignment",scope:"project|assignment"},{combo:"/",description:"Focus search",scope:"assignments-board"},{combo:"r",description:"Refresh board",scope:"assignments-board"},{combo:"p",description:"Edit plan",scope:"assignment"},{combo:"h",description:"Append handoff",scope:"assignment"},{combo:"d",description:"Append decision record",scope:"assignment"},{combo:"s",description:"Edit scratchpad",scope:"assignment"},{combo:"[",description:"Previous assignment",scope:"assignment"},{combo:"]",description:"Next assignment",scope:"assignment"}];function uT(e){const t=Tn(e);return t?cT.find(n=>n.combo===t)??null:null}const Yi={"new-workspace":"New Workspace","new-project":"New Project","new-todo":"New Todo","new-assignment":"New Assignment"},dT={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},fT=["global","list:projects","list:assignments","list:todos","project","assignment"];function cy(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Tr(t)} then ${Tr(n)}`}return Tr(e)}function pT(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n,customBindings:s,actionEntries:a}=As(),l=g.useMemo(()=>{const f=new Set;for(const m of Object.values(s))typeof m=="string"&&m&&f.add(Tn(m));return f},[s]),c=g.useMemo(()=>{if(!e)return new Map;const f=n(),m=new Map;for(const h of f){if(l.has(Tn(h.keys)))continue;const x=m.get(h.scope)??[];x.push({keys:h.keys,description:h.description}),m.set(h.scope,x)}return m},[e,n,l]),d=g.useMemo(()=>{const f=[];for(const[m,h]of Object.entries(s)){if(!h)continue;const x=a.find(y=>y.bindableKind===m);f.push({kind:m,combo:h,title:x?x.title:m})}return f},[s,a]);return o.jsx(ei,{open:e,onOpenChange:f=>f?null:t(),children:o.jsxs(to,{className:"max-w-2xl",children:[o.jsx(no,{children:"Keyboard shortcuts"}),o.jsxs(Pa,{children:["Press Esc to close. ",Tr("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),o.jsxs("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[fT.map(f=>{const m=c.get(f);return!m||m.length===0?null:o.jsxs("section",{children:[o.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:dT[f]}),o.jsx("ul",{className:"space-y-1",children:m.map((h,x)=>o.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-1.5 text-sm",children:[o.jsx("span",{className:"text-foreground",children:h.description}),o.jsx("kbd",{className:"shrink-0 rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground",children:cy(h.keys)})]},`${f}-${h.keys}-${x}`))})]},f)}),d.length>0?o.jsxs("section",{children:[o.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Custom bindings"}),o.jsx("ul",{className:"space-y-1",children:d.map(f=>o.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-1.5 text-sm",children:[o.jsx("span",{className:"text-foreground",children:f.title}),o.jsx("kbd",{className:"shrink-0 rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-muted-foreground",children:cy(f.combo)})]},`custom-${f.kind}`))})]}):null]})]})})}const ah={bindings:{},custom:!1};let ra=null,Do=null;const ep=new Set;function $w(e){ra=e;for(const t of ep)t(e)}function lh(e){if(!e||typeof e!="object")return ah;const t=e,n={};if(t.bindings&&typeof t.bindings=="object"&&!Array.isArray(t.bindings))for(const[s,a]of Object.entries(t.bindings)){if(!Z2(s)||typeof a!="string"||a.trim()==="")continue;const l=Tn(a);l&&(n[s]=l)}return{bindings:n,custom:t.custom===!0}}function hT(){return ra?Promise.resolve(ra):Do||(Do=fetch("/api/config/hotkeys").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{const t=lh(e);return ra=t,Do=null,t}).catch(()=>(Do=null,ah)),Do)}function mT(){const[e,t]=g.useState(()=>ra??ah);return g.useEffect(()=>{let n=!1;return hT().then(s=>{n||t(s)}),ep.add(t),()=>{n=!0,ep.delete(t)}},[]),e}async function uy(e){const t={};for(const a of $c){const l=e[a];if(typeof l!="string")continue;const c=Tn(l);c&&(t[a]=c)}const n=await fetch("/api/config/hotkeys",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({bindings:t})});if(!n.ok){const a=await n.json().catch(()=>({error:`HTTP ${n.status}`}));throw new Error(a.error??"Failed to save hotkey bindings")}const s=lh(await n.json());return $w(s),s}async function gT(){const e=await fetch("/api/config/hotkeys",{method:"DELETE"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=lh(await e.json());return $w(t),t}const dy=1500;function xT(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const Fw=g.createContext(null);function yT({children:e}){const{toggleTheme:t}=Wp(),n=vn(),s=St(),a=xT(n.pathname),l=Zo(),c=qb(),d=Xb(),f=qp(),m=Kp(),h=g.useMemo(()=>{var Ue,Ge,Nt,Ct;const ne=l.data??[],Y=((Ue=c.data)==null?void 0:Ue.assignments)??[],ae=((Ge=d.data)==null?void 0:Ge.playbooks)??[],xe=((Nt=f.data)==null?void 0:Nt.sessions)??[],Oe=(((Ct=m.data)==null?void 0:Ct.workspaces)??[]).flatMap(It=>It.items.map(en=>({...en,workspace:It.workspace})));return fE({projects:ne,assignments:Y,playbooks:ae,servers:xe,todos:Oe,wsPrefix:a})},[l.data,c.data,d.data,f.data,m.data,a]),y=g.useMemo(()=>Mb(n.pathname),[n.pathname]).projectSlug,b=g.useMemo(()=>{var ne;return y?((ne=l.data)==null?void 0:ne.find(Y=>Y.slug===y))??null:null},[l.data,y]),C=(b==null?void 0:b.title)??null,k=(b==null?void 0:b.workspace)??null,j=g.useMemo(()=>{var ne;return mE({playbooks:((ne=d.data)==null?void 0:ne.playbooks)??[],projectSlug:y,currentProjectTitle:C,currentProjectWorkspace:k,wsPrefix:a,refetchPlaybooks:d.refetch,navigate:s,toggleTheme:t})},[d.data,d.refetch,y,C,k,a,s,t]),S=g.useRef(new Map),T=g.useRef(["global"]),N=g.useRef({phase:"idle"}),A=g.useRef(null),L=g.useRef(1),[R,D]=g.useState(!1),[O,G]=g.useState(!1),[re,z]=g.useState(!1),[K,q]=g.useState(null),{bindings:J}=mT(),_=g.useMemo(()=>sE(J),[J]),F=g.useCallback(ne=>{const Y=L.current++;return S.current.set(Y,{...ne,id:Y}),Y},[]),B=g.useCallback(ne=>{S.current.delete(ne)},[]),U=g.useCallback(ne=>{T.current.push(ne)},[]),Z=g.useCallback(ne=>{const Y=T.current;for(let ae=Y.length-1;ae>=0;ae--)if(Y[ae]===ne){Y.splice(ae,1);return}},[]),P=g.useCallback(()=>D(!0),[]),M=g.useCallback(()=>D(!1),[]),Q=g.useCallback(()=>G(!0),[]),I=g.useCallback(()=>G(!1),[]),ge=g.useCallback(()=>z(!0),[]),Ne=g.useCallback(()=>{z(!1),q(null)},[]),te=g.useCallback(()=>Array.from(S.current.values()),[]),fe=g.useCallback(()=>{let ne=null;return q(Y=>(ne=Y,null)),ne},[]),be=g.useCallback(ne=>{q(ne),z(!0)},[]),ke=g.useCallback((ne,Y)=>{const ae=Tn(ne);if(!ae)return null;if(nE(ae)){const xe=uT(ae);return{description:(xe==null?void 0:xe.description)??"Reserved built-in shortcut"}}for(const[xe,qe]of Object.entries(_))if(!(Y&&xe===Y)&&qe===ae)return{kind:xe};return null},[_]),we=g.useCallback(async(ne,Y)=>{const ae=Tn(Y);if(!ae)throw new Error("Empty combo");const xe=ke(ae,ne);if(xe){const Oe=xe.description?`Reserved: ${xe.description}`:`Already bound to "${xe.kind}"`;throw new Error(Oe)}const qe={...J,[ne]:ae};return await uy(qe),ae},[J,ke]),Ye=g.useCallback(async ne=>{if(!J[ne])return;const Y={...J};delete Y[ne],await uy(Y)},[J]);g.useEffect(()=>{N.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[n.pathname]),g.useEffect(()=>{function ne(Oe){if(!(Oe instanceof HTMLElement))return!1;const Ue=Oe.tagName;return!!(Ue==="INPUT"||Ue==="TEXTAREA"||Ue==="SELECT"||Oe.isContentEditable||Oe.closest('[role="combobox"], [role="textbox"]'))}function Y(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function ae(){const Oe=T.current;return Oe[Oe.length-1]??"global"}function xe(Oe){return Oe.scope==="global"?!0:Oe.scope===ae()}function qe(Oe){const Ue=Vl(Oe,"Mod+k"),Ge=Vl(Oe,"Mod+Shift+k"),Nt=Oe.key==="Escape",Ct=Ue||Ge||Nt;if(Y()&&!Ct||ne(Oe.target)&&!Ct)return;const It=N.current;if(It.phase==="awaiting-second")if(Date.now()-It.startedAt>dy)N.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null);else{const ie=Array.from(S.current.values());for(const ce of ie){if(!xe(ce))continue;const ve=ce.keys.split(" ");if(!(ve.length!==2||ve[0]!=="g")&&Vl(Oe,ve[1])&&!(ce.when&&!ce.when())){Oe.preventDefault(),N.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null),ce.handler(Oe);return}}N.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null)}const en=Array.from(S.current.values());for(const Tt of en){if(!xe(Tt))continue;const ie=Tt.keys.split(" ");if(ie.length===1&&Vl(Oe,ie[0])&&!(Tt.when&&!Tt.when())){Oe.preventDefault(),Tt.handler(Oe);return}}Oe.key==="g"&&!Oe.metaKey&&!Oe.ctrlKey&&!Oe.altKey&&!Oe.shiftKey&&Array.from(S.current.values()).some(ie=>xe(ie)&&ie.keys.startsWith("g "))&&(Oe.preventDefault(),N.current={phase:"awaiting-second",startedAt:Date.now()},A.current!==null&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>{N.current={phase:"idle"},A.current=null},dy))}return window.addEventListener("keydown",qe),()=>{window.removeEventListener("keydown",qe),A.current!==null&&(window.clearTimeout(A.current),A.current=null)}},[]),g.useEffect(()=>{const ne=F({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>B(ne)},[F,B,t]),g.useEffect(()=>{const ne=F({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>Q()});return()=>B(ne)},[F,B,Q]),g.useEffect(()=>{const ne=F({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(R){M();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||P()}});return()=>B(ne)},[F,B,P,M,R]),g.useEffect(()=>{const ne=F({keys:"Mod+Shift+k",scope:"global",description:"Open actions palette",handler:()=>{if(re){Ne();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||ge()}});return()=>B(ne)},[F,B,ge,Ne,re]),g.useEffect(()=>{const Y=[{suffix:"o",basePath:"/",desc:"Go to Overview"},{suffix:"m",basePath:"/projects",desc:"Go to Projects"},{suffix:"a",basePath:"/assignments",desc:"Go to Assignments"},{suffix:"t",basePath:"/todos",desc:"Go to Todos"},{suffix:"s",basePath:"/servers",desc:"Go to Servers"},{suffix:"!",basePath:"/attention",desc:"Go to Attention"},{suffix:",",basePath:"/settings",desc:"Go to Settings"}].map(ae=>F({keys:`g ${ae.suffix}`,scope:"global",description:ae.desc,handler:()=>s(lc(ae.basePath,a))}));return()=>Y.forEach(B)},[F,B,s,a]),g.useEffect(()=>{const ne=[];for(const[Y,ae]of Object.entries(_)){if(!ae)continue;const xe=j.find(Oe=>Oe.bindableKind===Y),qe=xe?`Custom: ${xe.title}`:`Custom: ${Y}`;ne.push(F({keys:ae,scope:"global",description:qe,handler:()=>{q(Y),z(!0)}}))}return()=>ne.forEach(B)},[F,B,_,j]);const Xe=g.useMemo(()=>({register:F,unregister:B,pushScope:U,popScope:Z,openPalette:P,closePalette:M,paletteOpen:R,openCheatsheet:Q,closeCheatsheet:I,cheatsheetOpen:O,openActionsPalette:ge,closeActionsPalette:Ne,actionsPaletteOpen:re,listBindings:te,wsPrefix:a,paletteEntries:h,actionEntries:j,userBindings:J,customBindings:_,bindAction:we,unbindAction:Ye,findConflict:ke,openActionsPaletteWithAction:be,pendingActionKind:K,consumePendingActionKind:fe}),[F,B,U,Z,P,M,R,Q,I,O,ge,Ne,re,te,a,h,j,J,_,we,Ye,ke,be,K,fe]);return o.jsxs(Fw.Provider,{value:Xe,children:[e,o.jsx(sT,{entries:h}),o.jsx(lT,{entries:j}),o.jsx(pT,{})]})}function As(){const e=g.useContext(Fw);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function xt({keys:e,handler:t,scope:n="global",description:s,when:a,enabled:l=!0}){const{register:c,unregister:d}=As(),f=g.useRef(t),m=g.useRef(a);g.useEffect(()=>{f.current=t,m.current=a},[t,a]),g.useEffect(()=>{if(!l)return;const h=c({keys:e,handler:x=>f.current(x),scope:n,description:s,when:m.current?()=>m.current():void 0});return()=>d(h)},[c,d,e,n,s,l])}function ro(e){const{pushScope:t,popScope:n}=As();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function Ta(e,t){const[n,s]=g.useState(e.length===0?-1:0),a=vn();g.useEffect(()=>{s(e.length===0?-1:0)},[a.pathname]),g.useEffect(()=>{s(c=>e.length===0?-1:Math.min(Math.max(0,c),e.length-1))},[e.length]),g.useEffect(()=>{if(document.querySelectorAll("[data-hotkey-row-index]").forEach(d=>{const f=Number(d.getAttribute("data-hotkey-row-index"));d.setAttribute("data-hotkey-selected",f===n?"true":"false")}),n>=0){const d=document.querySelector(`[data-hotkey-row-index="${n}"]`);d==null||d.scrollIntoView({block:"nearest"})}},[n,e.length]),xt({keys:"j",scope:t.scope,description:"Select next row",handler:()=>s(c=>e.length===0?-1:Math.min(e.length-1,c<0?0:c+1))}),xt({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>s(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),xt({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),xt({keys:"o",scope:t.scope,description:"Open selected row",enabled:t.bindO??!0,handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}});const l=g.useCallback(c=>({"data-hotkey-row-index":c,"data-hotkey-selected":c===n?"true":"false"}),[n]);return{selectedIndex:n,hotkeyRowProps:l}}function vT({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:s}){const a=$t(),{resolvedTheme:l,toggleTheme:c}=Wp(),{openPalette:d}=As();return o.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/70 backdrop-blur",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[o.jsx("button",{type:"button",onClick:s,className:"inline-flex h-8 w-8 items-center justify-center rounded-md border border-border/70 bg-card/80 text-foreground lg:hidden","aria-label":"Open navigation",children:o.jsx($C,{className:"h-4 w-4"})}),o.jsx("div",{className:"min-w-0 flex-1",children:o.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?o.jsxs("nav",{className:"flex items-center gap-1.5 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:[t.slice(0,-1).map((f,m)=>o.jsxs("span",{className:"flex items-center gap-1.5",children:[m>0?o.jsx("span",{children:"/"}):null,o.jsx(ye,{to:f.path,className:"hover:text-foreground",children:f.label})]},f.path)),o.jsx("span",{children:"/"})]}):null,o.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[o.jsx(Rs,{className:"h-4 w-4"}),o.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:Tr("Mod+k")})]}),o.jsx(ye,{className:"shell-action",to:"/help",children:"Help"}),o.jsxs(ye,{className:"shell-action",to:`${a}/create/project`,children:[o.jsx(Vt,{className:"h-4 w-4"}),o.jsx("span",{children:"New Project"})]}),n?o.jsxs(ye,{className:"shell-action",to:`${a}/projects/${n}/create/assignment`,children:[o.jsx(Vt,{className:"h-4 w-4"}),o.jsx("span",{children:"New Assignment"})]}):null,o.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[l==="dark"?o.jsx(GC,{className:"h-4 w-4"}):o.jsx(FC,{className:"h-4 w-4"}),o.jsx("span",{children:l==="dark"?"Light":"Dark"})]})]})]})})}const bT=[{to:"/",label:"Overview",icon:NC},{to:"/attention",label:"Attention",icon:Qo},{to:"/playbooks",label:"Playbooks",icon:vb},{to:"/memories",label:"Memories",icon:xC},{to:"/resources",label:"Resources",icon:LC},{to:"/inventories",label:"Inventories",icon:Ip},{to:"/todos",label:"Todos",icon:Un}],wT=[{suffix:"/projects",label:"Projects",icon:Mp},{suffix:"/assignments",label:"Assignments",icon:_C},{suffix:"/servers",label:"Servers",icon:$p},{suffix:"/inventories",label:"Inventories",icon:Ip},{suffix:"/agent-sessions",label:"Agent Sessions",icon:Oc},{suffix:"/todos",label:"Todos",icon:Un}],jT=[{to:"/help",label:"Help",icon:OC},{to:"/settings",label:"Settings",icon:VC}],fy="syntaur.dashboard.sourceFirstNoticeDismissed";function kT({title:e,breadcrumbs:t,projectSlug:n,workspace:s,children:a}){const[l,c]=g.useState(!1);xt({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:l,handler:()=>c(!1)});const[d,f]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(fy)==="1"}catch{return!1}});function m(){if(f(!0),!(typeof window>"u"))try{window.localStorage.setItem(fy,"1")}catch{}}return o.jsx("div",{className:"min-h-screen bg-background",children:o.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[o.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar px-4 py-4 lg:flex lg:flex-col",children:o.jsx(py,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:s})}),l?o.jsx("div",{className:"fixed inset-0 z-40 bg-overlay/40 lg:hidden",children:o.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[o.jsx(ye,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),o.jsx("button",{type:"button",onClick:()=>c(!1),className:"inline-flex h-9 w-9 items-center justify-center rounded-md border border-border/70 bg-background/80",children:o.jsx(Bp,{className:"h-4 w-4"})})]}),o.jsx(py,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:s,onNavigate:()=>c(!1)})]})}):null,o.jsxs("div",{className:"min-w-0",children:[o.jsx(vT,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),o.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:a})]})]})})}function py({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:s}){const{data:a}=Vp(),l=(a==null?void 0:a.workspaces)??[],c=(a==null?void 0:a.hasUngrouped)??!1,d=vn(),[f,m]=g.useState(new Set),[h,x]=g.useState(!1),[y,b]=g.useState(""),C=St();function k(S){m(T=>{const N=new Set(T);return N.has(S)?N.delete(S):N.add(S),N})}const j=[...l,...c?["_ungrouped"]:[]];return o.jsxs("div",{className:"flex h-full flex-col gap-3",children:[o.jsx("div",{className:"space-y-3",children:o.jsxs(ye,{to:"/",className:"inline-flex items-center gap-3",onClick:s,children:[o.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-card text-foreground shadow-sm ring-1 ring-border/60",children:o.jsxs("svg",{viewBox:"0 0 43 51","aria-label":"Syntaur",role:"img",className:"h-4 w-auto",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("path",{d:"M13 2C13 0.89543 13.8954 0 15 0H41C42.1046 0 43 0.895431 43 2V12C43 13.1046 42.1046 14 41 14H13V2Z"}),o.jsx("path",{d:"M0 15C0 13.8954 0.895431 13 2 13H14V25C14 26.1046 13.1046 27 12 27H2C0.89543 27 0 26.1046 0 25V15Z"}),o.jsx("path",{d:"M30 49C30 50.1046 29.1046 51 28 51L2 51C0.89543 51 0 50.1046 0 49L0 39C0 37.8954 0.895431 37 2 37L30 37L30 49Z"}),o.jsx("path",{d:"M42.9646 36C42.9646 37.1046 42.0692 38 40.9646 38H28.9646V26C28.9646 24.8954 29.86 24 30.9646 24H40.9646C42.0692 24 42.9646 24.8954 42.9646 26V36Z"})]})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),o.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first project control"})]})]})}),o.jsx(qx,{items:bT,onNavigate:s}),o.jsx("div",{className:"border-t border-border/40"}),o.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!h&&o.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const T=S==="_ungrouped",N=T?"Ungrouped":Qt(S),A=T?"/w/_ungrouped":`/w/${S}`,L=f.has(S),R=n===S||n===null&&T&&d.pathname.startsWith("/w/_ungrouped");return o.jsxs("div",{children:[o.jsxs("button",{type:"button",onClick:()=>k(S),className:`flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-semibold uppercase tracking-wider transition ${R?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[o.jsx(ya,{className:`h-3 w-3 transition-transform ${L?"-rotate-90":""}`}),N]}),!L&&o.jsx("nav",{className:"ml-2 space-y-0.5",children:wT.map(D=>{const O=`${A}${D.suffix}`,G=Ob(d.pathname,D.suffix)&&d.pathname.startsWith(A),re=D.icon;return o.jsxs(ye,{to:O,onClick:s,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${G?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[o.jsx(re,{className:"h-4 w-4"}),o.jsx("span",{children:D.label})]},O)})})]},S)}),h?o.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const T=y.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");T&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:T})}).then(()=>{s==null||s(),C(`/w/${T}/projects`)}))},children:o.jsx("input",{autoFocus:!0,type:"text",value:y,onChange:S=>b(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{y.trim()||(x(!1),b(""))},placeholder:"workspace-name",className:"w-full rounded-md border border-border/60 bg-background/80 px-2 py-1 text-xs text-foreground placeholder:text-muted-foreground/50 focus:border-foreground/40 focus:outline-none"})}):o.jsxs("button",{type:"button",onClick:()=>x(!0),className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground/60 transition hover:text-muted-foreground",children:[o.jsx(Vt,{className:"h-3 w-3"}),"New Workspace"]})]}),o.jsx("div",{className:"border-t border-border/40"}),o.jsx(qx,{items:jT,onNavigate:s}),e?null:o.jsx("div",{className:"chrome-card",children:o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Project and assignment markdown files stay authoritative. Derived files are read-only projections."})]}),o.jsx("button",{type:"button",onClick:t,className:"inline-flex h-7 w-7 items-center justify-center rounded-md border border-border/70 bg-background/80 text-muted-foreground transition hover:text-foreground","aria-label":"Dismiss source-first dashboard notice",children:o.jsx(Bp,{className:"h-4 w-4"})})]})})]})}function ST(){const e=vn(),{workspace:t}=mt(),{title:n,breadcrumbs:s,projectSlug:a}=Mb(e.pathname);return o.jsx(kT,{title:n,breadcrumbs:s,projectSlug:a,workspace:t??null,children:o.jsx(PN,{})})}const tp="border-status-pending-foreground/30 bg-status-pending text-status-pending-foreground",hy="border-status-in-progress-foreground/30 bg-status-in-progress text-status-in-progress-foreground",NT="border-status-blocked-foreground/30 bg-status-blocked text-status-blocked-foreground",CT="border-status-review-foreground/30 bg-status-review text-status-review-foreground",ET="border-status-completed-foreground/30 bg-status-completed text-status-completed-foreground",PT="border-status-failed-foreground/30 bg-status-failed text-status-failed-foreground",TT="border-status-archived-foreground/30 bg-status-archived text-status-archived-foreground",vc={pending:{label:"Pending",description:"Waiting to start or waiting on dependencies.",className:tp,icon:jC},in_progress:{label:"In Progress",description:"Actively being worked on.",className:hy,icon:Sb},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:NT,icon:Vf},review:{label:"Review",description:"Ready for inspection or approval.",className:CT,icon:UC},completed:{label:"Completed",description:"Finished successfully.",className:ET,icon:Lp},failed:{label:"Failed",description:"Could not be completed as planned.",className:PT,icon:Vf},active:{label:"Active",description:"The project has active or review work in flight.",className:hy,icon:qf},stopped:{label:"Stopped",description:"Session ended without completing.",className:tp,icon:vC},archived:{label:"Archived",description:"Archived by a human override.",className:TT,icon:qf}};function Zt({status:e,className:t,showIcon:n=!0,progress:s}){const a=vc[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,h=>h.toUpperCase()),description:`Status: ${e}`,className:tp,icon:qf},l=a.icon,c=s&&s.total>0,d=c?Math.min(1,Math.max(0,s.checked/s.total)):0,f=c?`${a.description} (${s.checked}/${s.total} criteria)`:a.description,m=n?c?o.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[o.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[o.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),o.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeDasharray:2*Math.PI*7,strokeDashoffset:2*Math.PI*7*(1-d)})]}),o.jsx(l,{className:"h-2.5 w-2.5"})]}):o.jsx(l,{className:"h-3.5 w-3.5"}):null;return o.jsxs("span",{title:f,className:Be("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-0.5 text-xs font-medium tracking-normal","shadow-[inset_0_0_0_1px_oklch(100%_0_0_/_0)] dark:shadow-[inset_0_0_0_1px_oklch(100%_0_0_/_0.04)]",a.className,t),children:[m,o.jsx("span",{children:a.label})]})}function zw(e){var t;return((t=vc[e])==null?void 0:t.description)??`Status: ${e}`}const RT={default:"chrome-card",info:"rounded-lg border border-primary/30 bg-primary/5 p-3 dark:border-primary/40 dark:bg-primary/10",warn:"rounded-lg border border-warning-foreground/30 bg-warning p-3",danger:"rounded-lg border border-error-foreground/30 bg-error p-3",success:"rounded-lg border border-success-foreground/30 bg-success p-3"};function ot({label:e,value:t,description:n,icon:s,tone:a="default",to:l}){const c=o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),o.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),s?o.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:o.jsx(s,{className:"h-5 w-5"})}):null]}),n?o.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=Be(RT[a],l?"block transition hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return l?o.jsx(ye,{to:l,className:d,children:c}):o.jsx("article",{className:d,children:c})}function Le({title:e,description:t,children:n,className:s,actions:a}){return o.jsxs("section",{className:Be("surface-panel space-y-3",s),children:[e||a?o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[e?o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?o.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),a]}):null,n]})}function rt({label:e="Loading dashboard data…"}){return o.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:o.jsx("div",{className:"chrome-card !px-4 !py-3",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function Je({title:e="Something went wrong",error:t,action:n}){return o.jsx("div",{className:"rounded-lg border border-error-foreground/30 bg-error px-4 py-5",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("h3",{className:"text-lg font-semibold text-error-foreground",children:e}),o.jsx("p",{className:"text-sm leading-6 text-error-foreground/90",children:t}),n?o.jsx("div",{className:"pt-2",children:n}):null]})})}function et({title:e,description:t,actions:n}){return o.jsx("div",{className:"rounded-lg border border-dashed border-border bg-muted/40 px-4 py-6 text-center",children:o.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[o.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),o.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?o.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function dc({command:e,description:t,example:n}){return o.jsxs("div",{className:"rounded-lg border border-border/70 bg-code px-3 py-3 text-code-foreground shadow-sm",children:[o.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?o.jsx("p",{className:"mt-2 text-sm text-code-foreground/80",children:t}):null,n?o.jsx("p",{className:"mt-2 font-mono text-xs text-code-foreground/60",children:n}):null]})}function AT({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return o.jsx(Le,{title:t?"Getting Started Refresher":"Getting Started",description:t?"A fast reminder of the real flow for creating and running work in Syntaur.":"A first-run checklist that maps to the current CLI and dashboard flow.",actions:o.jsx(ye,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:o.jsx("div",{className:"space-y-3",children:n.map((s,a)=>o.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:a+1}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:s.title}),o.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:s.detail}),s.command?o.jsx(dc,{command:s.command.command,example:s.command.example}):null]})]})},s.title))})})}function DT(){var c;const{data:e,loading:t,error:n}=B2(),{data:s}=Kb(),{data:a}=Kp(),l=a!=null&&a.workspaces?a.workspaces.reduce((d,f)=>d+f.counts.open+f.counts.in_progress,0):0;return t?o.jsx(rt,{label:"Loading overview…"}):n||!e?o.jsx(Je,{error:n||"Overview data is unavailable."}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("header",{className:"space-y-2",children:[o.jsx("p",{className:"eyebrow",children:"Workspace Overview"}),o.jsx("h1",{className:"text-4xl font-semibold tracking-display text-foreground md:text-5xl",children:"What needs you today"}),o.jsx("p",{className:"max-w-2xl text-sm leading-6 text-muted-foreground",children:"A live snapshot of every project and assignment in your filesystem — sourced from markdown, not a database."})]}),o.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[o.jsx(ot,{label:"Active Projects",value:e.stats.activeProjects,icon:Mp,to:"/projects"}),o.jsx(ot,{label:"In Progress",value:e.stats.inProgressAssignments,icon:AC,tone:"info",to:"/assignments?status=in_progress"}),o.jsx(ot,{label:"Blocked",value:e.stats.blockedAssignments,icon:Qo,tone:"warn",to:"/assignments?status=blocked"}),o.jsx(ot,{label:"Review",value:e.stats.reviewAssignments,icon:wC,tone:"info",to:"/assignments?status=review"}),o.jsx(ot,{label:"Failed",value:e.stats.failedAssignments,icon:zC,tone:"danger",to:"/assignments?status=failed"}),o.jsx(ot,{label:"Stale",value:e.stats.staleAssignments,icon:Oc,to:"/assignments?stale=1"}),o.jsx(ot,{label:"Open Todos",value:l,icon:Un,to:"/todos"}),o.jsx(ot,{label:"Active Servers",value:e.serverStats?e.serverStats.aliveSessions:"…",description:e.serverStats?`${e.serverStats.totalPorts} ports · ${e.serverStats.deadSessions>0?`${e.serverStats.deadSessions} dead`:"all healthy"}`:"connecting",icon:$p,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),o.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx(Le,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?o.jsx(et,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):o.jsx("div",{className:"space-y-3",children:e.attention.map(d=>o.jsxs(ye,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40 hover:bg-background",children:[o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),o.jsx("p",{className:"text-sm text-muted-foreground",children:d.projectTitle})]}),o.jsx(Zt,{status:d.status})]}),o.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),o.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Rn(d.updated)]})]},d.id))})}),o.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[o.jsx(Le,{title:"Recently Updated Projects",children:e.recentProjects.length===0?o.jsx(et,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:o.jsx(ye,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):o.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>o.jsx(ye,{to:`/projects/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Rn(d.updated)})]}),o.jsx(Zt,{status:d.status})]})},d.slug))})}),o.jsx(Le,{title:"Recent Activity",children:e.recentActivity.length===0?o.jsx(et,{title:"No activity yet",description:"Once projects and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):o.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>o.jsxs(ye,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"font-semibold text-foreground",children:d.title}),o.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),o.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:Qt(d.type)})]}),o.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Rn(d.updated)})]},d.id))})})]})]}),e.firstRun&&o.jsx(AT,{help:s})]})]})}function IT(){const{data:e,loading:t,error:n}=U2();return t?o.jsx(rt,{label:"Loading attention queue…"}):n||!e?o.jsx(Je,{error:n||"Attention queue is unavailable."}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("header",{className:"space-y-2",children:[o.jsx("p",{className:"eyebrow",style:{color:"oklch(var(--secondary))"},children:"Needs Attention"}),o.jsx("h1",{className:"text-4xl font-semibold tracking-display text-foreground md:text-5xl",children:"Blocked, failed, and stale"}),o.jsx("p",{className:"max-w-2xl text-sm leading-6 text-muted-foreground",children:"Everything that needs a human or agent in the loop, ranked by severity and freshness."})]}),o.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[o.jsx(ot,{label:"Critical",value:e.summary.critical,icon:RC,tone:"danger"}),o.jsx(ot,{label:"High",value:e.summary.high,icon:Qo,tone:"warn"}),o.jsx(ot,{label:"Medium",value:e.summary.medium,icon:KC,tone:"info"}),o.jsx(ot,{label:"Low",value:e.summary.low,icon:IC})]}),o.jsx(Le,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?o.jsx(et,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):o.jsx("div",{className:"space-y-3",children:e.items.map(s=>o.jsxs(ye,{to:s.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[o.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:s.assignmentTitle}),o.jsx("p",{className:"text-sm text-muted-foreground",children:s.projectTitle})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:s.severity}),o.jsx(Zt,{status:s.status})]})]}),o.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s.reason}),o.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Rn(s.updated)]})]},s.id))})})]})}function LT({term:e,description:t}){return o.jsx("span",{title:t,className:"cursor-help rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-foreground underline decoration-dotted underline-offset-4",children:e})}function OT(){const{data:e,loading:t,error:n}=Kb(),{openCheatsheet:s}=As();return t?o.jsx(rt,{label:"Loading help…"}):n||!e?o.jsx(Je,{error:n||"Help content is unavailable."}):o.jsxs("div",{className:"space-y-5",children:[o.jsx(Le,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx("button",{type:"button",onClick:s,className:"inline-flex items-center gap-2 rounded-md border border-border/70 bg-background/80 px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent",children:"Open shortcuts cheatsheet"}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",o.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",Tr("Mod+k")," opens the command palette."]})]})}),o.jsx(Le,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:o.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(a=>o.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:a},a))})}),o.jsx(Le,{title:"Getting Started",children:o.jsx("div",{className:"space-y-3",children:e.workflow.map((a,l)=>o.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.title}),o.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:a.detail}),a.command?o.jsx(dc,{command:a.command.command,description:a.command.description,example:a.command.example}):null,a.href?o.jsx(ye,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:a.href,children:"Open the related surface"}):null]})]})},a.title))})}),o.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[o.jsxs(Le,{title:"Core Concepts",children:[o.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(a=>o.jsx(LT,{term:a.term,description:a.description},a.term))}),o.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(a=>o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.term}),o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:a.description})]},a.term))})]}),o.jsx(Le,{title:"Status Guide",children:o.jsx("div",{className:"space-y-3",children:e.statusGuide.map(a=>o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx(Zt,{status:a.status}),o.jsx("p",{className:"font-semibold text-foreground",children:a.meaning})]}),o.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:a.useWhen})]},a.status))})})]}),o.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[o.jsx(Le,{title:"Ownership And File Rules",children:o.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(a=>o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.label}),o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:a.description}),o.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:a.files.map(l=>o.jsx("span",{className:"rounded-full border border-border/60 bg-card/90 px-2.5 py-1 font-mono text-xs text-foreground",children:l},l))})]},a.label))})}),o.jsx(Le,{title:"How To Navigate The Dashboard",children:o.jsx("div",{className:"space-y-3",children:e.navigation.map(a=>o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.label}),o.jsx(ye,{className:"text-sm font-semibold text-primary hover:underline",to:a.href,children:"Open"})]}),o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:a.description})]},a.label))})})]}),o.jsx(Le,{title:"CLI Quick Reference",children:o.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(a=>o.jsx(dc,{command:a.command,description:a.description,example:a.example},a.command))})}),o.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[o.jsx(Le,{title:"FAQ",children:o.jsx("div",{className:"space-y-3",children:e.faq.map(a=>o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.question}),o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:a.answer})]},a.question))})}),o.jsx(Le,{title:"First Project Checklist",children:o.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((a,l)=>o.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:l+1}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:a.title}),o.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:a.detail}),a.command?o.jsx(dc,{command:a.command.command,example:a.command.example}):null,a.href?o.jsx(ye,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:a.href,children:"Open the related surface"}):null]})]})},a.title))})})]})]})}function ch({children:e}){return o.jsx("div",{className:"chrome-card flex flex-col gap-2 !p-2.5 md:flex-row md:flex-wrap md:items-center",children:e})}const Hc=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},s)=>o.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[o.jsx(Rs,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),o.jsx("input",{ref:s,value:e,onChange:a=>t(a.target.value),placeholder:n,className:"h-9 w-full rounded-md border border-border/60 bg-background/90 pl-9 pr-3 text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30"})]}));Hc.displayName="SearchInput";function uh({value:e,options:t,onChange:n}){return o.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(s=>o.jsx("button",{type:"button",onClick:()=>n(s.value),className:Be("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===s.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:s.label},s.value))})}function Bw({columns:e,items:t,getItemId:n,getColumnId:s,renderCard:a,canDrop:l,onMove:c,emptyMessage:d="No cards in this column."}){const[f,m]=g.useState(null),[h,x]=g.useState(null),y=g.useRef(null),b=g.useMemo(()=>new Map(t.map(L=>[n(L),L])),[n,t]),C=g.useMemo(()=>e.map(L=>({column:L,items:t.filter(R=>s(R)===L.id)})),[e,s,t]),k=f?b.get(f)??null:null;function j(L){if(!k)return{allowed:!1};const R=s(k);return(l==null?void 0:l({item:k,fromColumnId:R,toColumnId:L}))??{allowed:!0}}function S(){m(null),x(null)}function T(L,R){c&&(L.dataTransfer.effectAllowed="move",L.dataTransfer.setData("text/plain",R),m(R))}function N(L,R,D){!c||!k||!j(R).allowed||(L.preventDefault(),L.dataTransfer.dropEffect="move",x(G=>(G==null?void 0:G.columnId)===R&&G.index===D?G:{columnId:R,index:D}))}async function A(L,R,D){var K;if(L.preventDefault(),!c||!k){S();return}const O=s(k),re=(((K=C.find(q=>q.column.id===O))==null?void 0:K.items)??[]).findIndex(q=>n(q)===n(k));if(!j(R).allowed||re<0){S();return}if(O===R&&(D===re||D===re+1)){S();return}try{await c({item:k,fromColumnId:O,toColumnId:R,fromIndex:re,toIndex:D})}finally{S()}}return o.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"oklch(var(--border)) transparent",scrollbarWidth:"thin"},children:o.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:C.map(({column:L,items:R})=>{const D=j(L.id),O=(h==null?void 0:h.columnId)===L.id;return o.jsxs("section",{className:Be("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!D.allowed?"border-dashed opacity-65":"",k&&D.allowed?"border-primary/30 bg-accent/30":"",O?"ring-2 ring-ring/30":""),title:k&&!D.allowed?D.reason:void 0,children:[o.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:L.title}),L.description?o.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:L.description}):null]}),o.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:R.length})]}),o.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:G=>N(G,L.id,R.length),onDrop:G=>A(G,L.id,R.length),children:[R.length===0?o.jsx(MT,{active:(h==null?void 0:h.columnId)===L.id&&h.index===0,disabled:!!k&&!D.allowed,children:typeof d=="function"?d(L):d}):null,R.map((G,re)=>{const z=n(G),K=f===z;return o.jsxs(g.Fragment,{children:[o.jsx("div",{className:Be("h-2 rounded-full transition",(h==null?void 0:h.columnId)===L.id&&h.index===re?"bg-primary/70":"bg-transparent"),onDragOver:q=>N(q,L.id,re),onDrop:q=>A(q,L.id,re)}),o.jsx("div",{draggable:!!c,onMouseDown:q=>{y.current=q.target},onDragStart:q=>{const J=y.current;if(J!=null&&J.closest("a, button")){q.preventDefault();return}T(q,z)},onDragEnd:S,className:Be("transition",c?"cursor-grab active:cursor-grabbing":"",K?"scale-[0.98] opacity-50":""),children:a(G,{dragging:K})})]},z)}),R.length>0?o.jsx("div",{className:Be("mt-1 rounded-md border border-dashed px-3 py-2 text-center text-xs text-muted-foreground transition",(h==null?void 0:h.columnId)===L.id&&h.index===R.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!D.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},L.id)})})})}function MT({active:e,disabled:t,children:n}){return o.jsx("div",{className:Be("flex min-h-[128px] items-center justify-center rounded-lg border border-dashed px-4 text-center text-sm text-muted-foreground transition",e?"border-primary/60 bg-primary/10 text-foreground":"border-border/60 bg-background/50",t?"opacity-45":""),children:n})}const Uw={statuses:[{id:"pending",label:"Pending"},{id:"in_progress",label:"In Progress"},{id:"blocked",label:"Blocked"},{id:"review",label:"Review"},{id:"completed",label:"Completed"},{id:"failed",label:"Failed"}],order:["pending","in_progress","blocked","review","completed","failed"],transitions:[],custom:!1};let sa=null,Gs=null;function _T(){return sa?Promise.resolve(sa):Gs||(Gs=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(sa=e,Gs=null,e)).catch(()=>(Gs=null,Uw)),Gs)}function Wc(){const[e,t]=g.useState(()=>sa??Uw);return g.useEffect(()=>{_T().then(t)},[]),e}function my(){sa=null,Gs=null}function $T(e,t){const n=e.statuses.find(s=>s.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,s=>s.toUpperCase())}const FT={completed:"bg-status-completed-foreground",in_progress:"bg-status-in-progress-foreground",review:"bg-status-review-foreground",blocked:"bg-status-blocked-foreground",failed:"bg-status-failed-foreground",pending:"bg-status-pending-foreground"},gy=["bg-primary","bg-secondary","bg-accent-coral","bg-accent-teal","bg-accent-amber"];function bc({progress:e,className:t,showLegend:n=!1}){const s=Wc(),a=g.useMemo(()=>{let c=0;return(s.order.length>0?s.order:Object.keys(e).filter(f=>f!=="total")).map(f=>({key:f,className:FT[f]??gy[c++%gy.length]}))},[s.order,e]),l=a.filter(c=>(e[c.key]??0)>0);return o.jsxs("div",{className:Be("space-y-2",t),children:[o.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?o.jsx("div",{className:"h-full w-full bg-muted"}):l.map(c=>o.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${Qt(c.key)}: ${e[c.key]??0}`},c.key))}),n?o.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:a.map(c=>o.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[o.jsx("span",{className:Be("h-2 w-2 rounded-full",c.className)}),o.jsx("span",{children:Qt(c.key)}),o.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const zT=["pending","active","blocked","failed","completed","archived"],dh=zT,BT=["pending","in_progress","blocked","review","completed","failed"];function UT(e){return e&&e.length>0?e:[...BT]}function HT(e,t,n){if(t<0||t>=e.length)return e;const s=[...e],[a]=s.splice(t,1),l=t<n?n-1:n;return s.splice(Math.max(0,Math.min(l,s.length)),0,a),s}function xy(){const{workspace:e}=mt(),t=$t(),n=St(),{data:s,loading:a,error:l,refetch:c}=Zo(),d=g.useRef(null);ro("list:projects");const[f,m]=g.useState(""),[h,x]=g.useState("all"),[y,b]=g.useState("active"),[C,k]=g.useState("all"),[j,S]=g.useState("updated"),[T,N]=Lr(),A=T.get("view"),L=A==="table"||A==="kanban"?A:"cards",R=F=>{N(B=>{const U=new URLSearchParams(B);return F==="cards"?U.delete("view"):U.set("view",F),U})},[D,O]=g.useState({}),G=g.useMemo(()=>s?s.filter(F=>{if(e){if(e==="_ungrouped"){if(F.workspace!==null)return!1}else if(F.workspace!==e)return!1}return y==="active"&&F.archived||y==="archived"&&!F.archived||h!=="all"&&F.status!==h||C!=="all"&&!F.tags.includes(C)?!1:f.trim()?`${F.title} ${F.tags.join(" ")} ${F.slug}`.toLowerCase().includes(f.toLowerCase()):!0}).sort((F,B)=>qT(F,B,j)):[],[s,f,h,y,C,j,e]),re=G.map(F=>`${F.slug}:${F.status}`).join("|");g.useEffect(()=>{O(KT(G))},[re,j]);const z=g.useMemo(()=>{const F=new Map(G.map(B=>[B.slug,B]));return dh.flatMap(B=>(D[B]??G.filter(Z=>Z.status===B).map(Z=>Z.slug)).map(Z=>F.get(Z)).filter(Z=>!!Z))},[G,D]),{visibleItems:K,visibleIndexByKey:q}=g.useMemo(()=>{const F=L==="kanban"?z:G,B=new Map;return F.forEach((U,Z)=>B.set(U.slug,Z)),{visibleItems:F,visibleIndexByKey:B}},[L,G,z]),{hotkeyRowProps:J}=Ta(K,{scope:"list:projects",onOpen:F=>n(`${t}/projects/${F.slug}`)});if(xt({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var F;return(F=d.current)==null?void 0:F.focus()}}),xt({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),a)return o.jsx(rt,{label:"Loading projects…"});if(l||!s)return o.jsx(Je,{error:l||"Project list is unavailable."});const _=Array.from(new Set(s.flatMap(F=>F.tags))).sort();return o.jsxs("div",{className:"space-y-5",children:[o.jsxs(ch,{children:[o.jsx(Hc,{ref:d,value:f,onChange:m,placeholder:"Search by project title or tag"}),o.jsxs("select",{value:h,onChange:F=>x(F.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All statuses"}),o.jsx("option",{value:"pending",children:"Pending"}),o.jsx("option",{value:"active",children:"Active"}),o.jsx("option",{value:"blocked",children:"Blocked"}),o.jsx("option",{value:"failed",children:"Failed"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"archived",children:"Archived"})]}),o.jsxs("select",{value:y,onChange:F=>b(F.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"active",children:"Hide archived"}),o.jsx("option",{value:"all",children:"All projects"}),o.jsx("option",{value:"archived",children:"Archived only"})]}),o.jsxs("select",{value:C,onChange:F=>k(F.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All tags"}),_.map(F=>o.jsx("option",{value:F,children:F},F))]}),o.jsxs("select",{value:j,onChange:F=>S(F.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"updated",children:"Sort: Updated"}),o.jsx("option",{value:"created",children:"Sort: Created"}),o.jsx("option",{value:"title",children:"Sort: Title"}),o.jsx("option",{value:"attention",children:"Sort: Attention"})]}),o.jsx(uh,{value:L,onChange:F=>R(F),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),G.length===0?s.length===0?o.jsxs("div",{className:"rounded-frame border border-border/60 bg-card px-6 py-16 text-center",children:[o.jsx("p",{className:"eyebrow mx-auto justify-center",children:"Start here"}),o.jsx("h2",{className:"mx-auto mt-4 max-w-2xl text-3xl font-semibold tracking-display text-foreground md:text-4xl",children:"The task manager built for agents, by agents"}),o.jsx("p",{className:"mx-auto mt-3 max-w-xl text-sm leading-6 text-muted-foreground",children:"A project groups assignments, resources, and memories under one objective. Markdown stays authoritative — the dashboard is just a view."}),o.jsxs("div",{className:"mt-6 flex flex-wrap justify-center gap-3",children:[o.jsx(ye,{className:"shell-action shell-action--solid",to:`${t}/create/project`,children:"Create your first project"}),o.jsx(ye,{className:"shell-action",to:"/help",children:"Read the spec"})]})]}):o.jsx(et,{title:"No projects match these filters",description:"Adjust the current search and filters or create a new project.",actions:o.jsx(ye,{className:"shell-action shell-action--solid",to:`${t}/create/project`,children:"Create Project"})}):L==="cards"?o.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:G.map((F,B)=>o.jsxs(ye,{to:`${t}/projects/${F.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",...J(B),children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:F.title}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Ar(F.updated)]})]}),o.jsx(Zt,{status:F.status})]}),o.jsxs("div",{className:"mt-4 space-y-3",children:[o.jsx(bc,{progress:F.progress,showLegend:!0}),o.jsx("div",{className:"flex flex-wrap gap-2",children:F.tags.map(U=>o.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:U},U))}),o.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),o.jsx("p",{className:"mt-1 font-semibold text-foreground",children:F.needsAttention.blockedCount+F.needsAttention.failedCount})]}),o.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[o.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),o.jsx("p",{className:"mt-1 font-semibold text-foreground",children:F.progress.total})]})]})]})]},F.slug))}):L==="table"?o.jsx(Le,{title:`${G.length} project${G.length===1?"":"s"}`,children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[o.jsx("th",{className:"pb-3 font-medium",children:"Project"}),o.jsx("th",{className:"pb-3 font-medium",children:"Status"}),o.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),o.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),o.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),o.jsx("tbody",{children:G.map((F,B)=>o.jsxs("tr",{className:"border-b border-border/50 last:border-0",...J(B),children:[o.jsxs("td",{className:"py-4 pr-4",children:[o.jsx(ye,{to:`${t}/projects/${F.slug}`,className:"font-semibold text-foreground hover:text-primary",children:F.title}),o.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:F.tags.map(U=>o.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:U},U))})]}),o.jsx("td",{className:"py-4 pr-4",children:o.jsx(Zt,{status:F.status})}),o.jsx("td",{className:"py-4 pr-4",children:o.jsx("div",{className:"min-w-[220px]",children:o.jsx(bc,{progress:F.progress})})}),o.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:F.needsAttention.blockedCount+F.needsAttention.failedCount}),o.jsx("td",{className:"py-4 text-muted-foreground",children:Ar(F.updated)})]},F.slug))})]})})}):o.jsx(Bw,{columns:VT,items:z,getItemId:F=>F.slug,getColumnId:F=>F.status,canDrop:({fromColumnId:F,toColumnId:B})=>({allowed:!0,reason:F===B?void 0:"This will set a manual status override on the project."}),onMove:({item:F,fromColumnId:B,toColumnId:U,fromIndex:Z,toIndex:P})=>{if(B===U){const M=D[B]??G.filter(Q=>Q.status===B).map(Q=>Q.slug);O(Q=>({...Q,[B]:HT(M,Z,P)}));return}fetch(`/api/projects/${F.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:U})}).then(()=>{window.location.reload()})},emptyMessage:F=>`No ${F.title.toLowerCase()} projects.`,renderCard:(F,{dragging:B})=>{const U=q.get(F.slug)??-1;return o.jsx("div",{...U>=0?J(U):{},children:o.jsx(GT,{project:F,dragging:B})})}}),o.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(kb,{className:"mt-0.5 h-4 w-4"}),o.jsxs("p",{children:["Project status is derived from assignment state by default.",L==="kanban"?" Drag projects between columns or use":" Use"," the status override on the project detail page to set a manual status."]})]})})]})}const WT={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},VT=dh.map(e=>({id:e,title:WT[e],description:zw(e)}));function qT(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return yy(t)-yy(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function yy(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function KT(e){return Object.fromEntries(dh.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function GT({project:e,dragging:t}){const n=$t();return o.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(ye,{to:`${n}/projects/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Ar(e.updated)]})]}),o.jsx(Zt,{status:e.status})]}),o.jsx("div",{className:"mt-4",children:o.jsx(bc,{progress:e.progress})}),o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(s=>o.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:s},s)),o.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),o.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.needsAttention.blockedCount+e.needsAttention.failedCount," needs attention"]})]}),o.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived project lane"})]})}function Yr({value:e}){const[t,n]=g.useState(!1);function s(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return o.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?o.jsx(Ea,{className:"h-3 w-3 text-status-completed-foreground"}):o.jsx(Mc,{className:"h-3 w-3"})})}const vy="inline-flex max-w-[14rem] items-center gap-1 whitespace-nowrap rounded-full border px-2 py-0.5 text-[11px] font-semibold tracking-wide border-border/60 text-muted-foreground",by="truncate";function fh({externalIds:e,className:t}){return e.length===0?null:o.jsx("span",{className:Be("flex flex-wrap items-center gap-1.5",t),children:e.map((n,s)=>{const a=`${n.system}:${n.id}`,l=`${n.system}:${n.id}:${s}`;return n.url!=null&&n.url.length>0?o.jsxs("a",{href:n.url??void 0,target:"_blank",rel:"noopener noreferrer",className:Be(vy,"transition-colors hover:text-foreground hover:border-foreground/40"),title:`Open ${a} in ${n.system}`,children:[o.jsx("span",{className:by,children:a}),o.jsx(Op,{className:"h-2.5 w-2.5 shrink-0"})]},l):o.jsx("span",{className:vy,title:a,children:o.jsx("span",{className:by,children:a})},l)})})}function wy(e){const t=YT(e),n=g.forwardRef((s,a)=>{const{children:l,...c}=s,d=g.Children.toArray(l),f=d.find(QT);if(f){const m=f.props.children,h=d.map(x=>x===f?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return o.jsx(t,{...c,ref:a,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return o.jsx(t,{...c,ref:a,children:l})});return n.displayName=`${e}.Slot`,n}function YT(e){const t=g.forwardRef((n,s)=>{const{children:a,...l}=n;if(g.isValidElement(a)){const c=ZT(a),d=JT(l,a.props);return a.type!==g.Fragment&&(d.ref=s?Fc(s,c):c),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var XT=Symbol("radix.slottable");function QT(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===XT}function JT(e,t){const n={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?n[s]=(...d)=>{const f=l(...d);return a(...d),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...l}:s==="className"&&(n[s]=[a,l].filter(Boolean).join(" "))}return{...e,...n}}function ZT(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function eR(e){const t=e+"CollectionProvider",[n,s]=Zs(t),[a,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,T=Pt.useRef(null),N=Pt.useRef(new Map).current;return o.jsx(a,{scope:j,itemMap:N,collectionRef:T,children:S})};c.displayName=t;const d=e+"CollectionSlot",f=wy(d),m=Pt.forwardRef((k,j)=>{const{scope:S,children:T}=k,N=l(d,S),A=mn(j,N.collectionRef);return o.jsx(f,{ref:A,children:T})});m.displayName=d;const h=e+"CollectionItemSlot",x="data-radix-collection-item",y=wy(h),b=Pt.forwardRef((k,j)=>{const{scope:S,children:T,...N}=k,A=Pt.useRef(null),L=mn(j,A),R=l(h,S);return Pt.useEffect(()=>(R.itemMap.set(A,{ref:A,...N}),()=>void R.itemMap.delete(A))),o.jsx(y,{[x]:"",ref:L,children:T})});b.displayName=h;function C(k){const j=l(e+"CollectionConsumer",k);return Pt.useCallback(()=>{const T=j.collectionRef.current;if(!T)return[];const N=Array.from(T.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((R,D)=>N.indexOf(R.ref.current)-N.indexOf(D.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:m,ItemSlot:b},C,s]}var tR=g.createContext(void 0);function Hw(e){const t=g.useContext(tR);return e||t||"ltr"}var hf="rovingFocusGroup.onEntryFocus",nR={bubbles:!1,cancelable:!0},Ra="RovingFocusGroup",[np,Ww,rR]=eR(Ra),[sR,Vw]=Zs(Ra,[rR]),[oR,iR]=sR(Ra),qw=g.forwardRef((e,t)=>o.jsx(np.Provider,{scope:e.__scopeRovingFocusGroup,children:o.jsx(np.Slot,{scope:e.__scopeRovingFocusGroup,children:o.jsx(aR,{...e,ref:t})})}));qw.displayName=Ra;var aR=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:a=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:h=!1,...x}=e,y=g.useRef(null),b=mn(t,y),C=Hw(l),[k,j]=zc({prop:c,defaultProp:d??null,onChange:f,caller:Ra}),[S,T]=g.useState(!1),N=Xs(m),A=Ww(n),L=g.useRef(!1),[R,D]=g.useState(0);return g.useEffect(()=>{const O=y.current;if(O)return O.addEventListener(hf,N),()=>O.removeEventListener(hf,N)},[N]),o.jsx(oR,{scope:n,orientation:s,dir:C,loop:a,currentTabStopId:k,onItemFocus:g.useCallback(O=>j(O),[j]),onItemShiftTab:g.useCallback(()=>T(!0),[]),onFocusableItemAdd:g.useCallback(()=>D(O=>O+1),[]),onFocusableItemRemove:g.useCallback(()=>D(O=>O-1),[]),children:o.jsx(Ft.div,{tabIndex:S||R===0?-1:0,"data-orientation":s,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:yt(e.onMouseDown,()=>{L.current=!0}),onFocus:yt(e.onFocus,O=>{const G=!L.current;if(O.target===O.currentTarget&&G&&!S){const re=new CustomEvent(hf,nR);if(O.currentTarget.dispatchEvent(re),!re.defaultPrevented){const z=A().filter(F=>F.focusable),K=z.find(F=>F.active),q=z.find(F=>F.id===k),_=[K,q,...z].filter(Boolean).map(F=>F.ref.current);Yw(_,h)}}L.current=!1}),onBlur:yt(e.onBlur,()=>T(!1))})})}),Kw="RovingFocusGroupItem",Gw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:a=!1,tabStopId:l,children:c,...d}=e,f=$o(),m=l||f,h=iR(Kw,n),x=h.currentTabStopId===m,y=Ww(n),{onFocusableItemAdd:b,onFocusableItemRemove:C,currentTabStopId:k}=h;return g.useEffect(()=>{if(s)return b(),()=>C()},[s,b,C]),o.jsx(np.ItemSlot,{scope:n,id:m,focusable:s,active:a,children:o.jsx(Ft.span,{tabIndex:x?0:-1,"data-orientation":h.orientation,...d,ref:t,onMouseDown:yt(e.onMouseDown,j=>{s?h.onItemFocus(m):j.preventDefault()}),onFocus:yt(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:yt(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){h.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=uR(j,h.orientation,h.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let N=y().filter(A=>A.focusable).map(A=>A.ref.current);if(S==="last")N.reverse();else if(S==="prev"||S==="next"){S==="prev"&&N.reverse();const A=N.indexOf(j.currentTarget);N=h.loop?dR(N,A+1):N.slice(A+1)}setTimeout(()=>Yw(N))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});Gw.displayName=Kw;var lR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cR(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uR(e,t,n){const s=cR(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return lR[s]}function Yw(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function dR(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var fR=qw,pR=Gw,Vc="Tabs",[hR]=Zs(Vc,[Vw]),Xw=Vw(),[mR,ph]=hR(Vc),Qw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:a,defaultValue:l,orientation:c="horizontal",dir:d,activationMode:f="automatic",...m}=e,h=Hw(d),[x,y]=zc({prop:s,onChange:a,defaultProp:l??"",caller:Vc});return o.jsx(mR,{scope:n,baseId:$o(),value:x,onValueChange:y,orientation:c,dir:h,activationMode:f,children:o.jsx(Ft.div,{dir:h,"data-orientation":c,...m,ref:t})})});Qw.displayName=Vc;var Jw="TabsList",Zw=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...a}=e,l=ph(Jw,n),c=Xw(n);return o.jsx(fR,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:s,children:o.jsx(Ft.div,{role:"tablist","aria-orientation":l.orientation,...a,ref:t})})});Zw.displayName=Jw;var e0="TabsTrigger",t0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:a=!1,...l}=e,c=ph(e0,n),d=Xw(n),f=s0(c.baseId,s),m=o0(c.baseId,s),h=s===c.value;return o.jsx(pR,{asChild:!0,...d,focusable:!a,active:h,children:o.jsx(Ft.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:f,...l,ref:t,onMouseDown:yt(e.onMouseDown,x=>{!a&&x.button===0&&x.ctrlKey===!1?c.onValueChange(s):x.preventDefault()}),onKeyDown:yt(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(s)}),onFocus:yt(e.onFocus,()=>{const x=c.activationMode!=="manual";!h&&!a&&x&&c.onValueChange(s)})})})});t0.displayName=e0;var n0="TabsContent",r0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:a,children:l,...c}=e,d=ph(n0,n),f=s0(d.baseId,s),m=o0(d.baseId,s),h=s===d.value,x=g.useRef(h);return g.useEffect(()=>{const y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),o.jsx(eo,{present:a||h,children:({present:y})=>o.jsx(Ft.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!y,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:y&&l})})});r0.displayName=n0;function s0(e,t){return`${e}-trigger-${t}`}function o0(e,t){return`${e}-content-${t}`}var i0=Qw,a0=Zw,rp=t0,sp=r0;function hh({value:e,onValueChange:t,items:n,className:s}){return o.jsxs(i0,{value:e,onValueChange:t,className:s,children:[o.jsx(a0,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(a=>o.jsxs(rp,{value:a.value,className:Be("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:[o.jsx("span",{children:a.label}),typeof a.count=="number"?o.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:a.count}):null]},a.value))}),n.map(a=>o.jsx(sp,{value:a.value,className:"pt-3",children:a.content},a.value))]})}const gR="modulepreload",xR=function(e){return"/"+e},jy={},yR=function(t,n,s){let a=Promise.resolve();if(n&&n.length>0){let c=function(m){return Promise.all(m.map(h=>Promise.resolve(h).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=c(n.map(m=>{if(m=xR(m),m in jy)return;jy[m]=!0;const h=m.endsWith(".css"),x=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const y=document.createElement("link");if(y.rel=h?"stylesheet":gR,h||(y.as="script"),y.crossOrigin="",y.href=m,f&&y.setAttribute("nonce",f),document.head.appendChild(y),h)return new Promise((b,C)=>{y.addEventListener("load",b),y.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return a.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};function vR({definition:e,className:t,nodeRoutes:n={}}){const s=g.useRef(null),[a,l]=g.useState(null),[c,d]=g.useState(!0),f=St(),m=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let h=!1;async function x(){if(s.current)try{const y=(await yR(async()=>{const{default:k}=await import("./mermaid.core-C8wCWYw-.js").then(j=>j.bF);return{default:k}},[])).default;if(y.initialize({startOnLoad:!1,theme:"base",themeVariables:bR(m==="dark")}),h)return;const b=`mermaid-${Date.now()}`,{svg:C}=await y.render(b,e);if(h||!s.current)return;s.current.innerHTML=C,wR(s.current,n,f),d(!1)}catch(y){h||(l(y instanceof Error?y.message:"Failed to render graph"),d(!1))}}return d(!0),l(null),x(),()=>{h=!0}},[e,f,n,m]),a?o.jsxs("div",{className:Be("rounded-lg border border-border bg-card p-4",t),children:[o.jsxs("p",{className:"text-sm text-error-foreground",children:["Failed to render dependency graph: ",a]}),o.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):o.jsxs("div",{className:Be("rounded-lg border border-border bg-card p-4",t),children:[c&&o.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),o.jsx("div",{ref:s,className:"overflow-auto"})]})}function bR(e){const t=document.documentElement,n=x=>{const y=getComputedStyle(t).getPropertyValue(x).trim();return y?`oklch(${y})`:""},s=n("--card"),a=n("--card-foreground"),l=n("--border"),c=n("--primary"),d=n("--primary-foreground"),f=n("--muted"),m=n("--muted-foreground"),h=n("--secondary");return{background:s,primaryColor:s,primaryTextColor:a,primaryBorderColor:l,secondaryColor:f,secondaryTextColor:a,secondaryBorderColor:l,tertiaryColor:f,tertiaryTextColor:m,tertiaryBorderColor:l,lineColor:e?m:l,textColor:a,mainBkg:s,nodeBkg:s,nodeTextColor:a,nodeBorder:l,clusterBkg:f,clusterBorder:l,edgeLabelBackground:s,titleColor:a,activeTaskBkgColor:c,activeTaskBorderColor:c,altBackground:f,labelColor:a,errorBkgColor:h,errorTextColor:d}}function wR(e,t,n){var s;for(const a of e.querySelectorAll(".node")){const l=((s=a.textContent)==null?void 0:s.replace(/\s+/g," ").trim())??"",c=t[l];if(!c)continue;a.style.cursor="pointer",a.setAttribute("role","link"),a.setAttribute("tabindex","0"),a.setAttribute("aria-label",`Open ${l}`);const d=()=>n(c);a.addEventListener("click",d),a.addEventListener("keydown",f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),d())})}}function jR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NR={};function ky(e,t){return(NR.jsx?SR:kR).test(e)}const CR=/[ \t\n\f\r]/g;function ER(e){return typeof e=="object"?e.type==="text"?Sy(e.value):!1:Sy(e)}function Sy(e){return e.replace(CR,"")===""}class Aa{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Aa.prototype.normal={};Aa.prototype.property={};Aa.prototype.space=void 0;function l0(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Aa(n,s,t)}function op(e){return e.toLowerCase()}class Dn{constructor(t,n){this.attribute=n,this.property=t}}Dn.prototype.attribute="";Dn.prototype.booleanish=!1;Dn.prototype.boolean=!1;Dn.prototype.commaOrSpaceSeparated=!1;Dn.prototype.commaSeparated=!1;Dn.prototype.defined=!1;Dn.prototype.mustUseProperty=!1;Dn.prototype.number=!1;Dn.prototype.overloadedBoolean=!1;Dn.prototype.property="";Dn.prototype.spaceSeparated=!1;Dn.prototype.space=void 0;let PR=0;const We=so(),Ot=so(),ip=so(),he=so(),ct=so(),zo=so(),Fn=so();function so(){return 2**++PR}const ap=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Ot,commaOrSpaceSeparated:Fn,commaSeparated:zo,number:he,overloadedBoolean:ip,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),mf=Object.keys(ap);class mh extends Dn{constructor(t,n,s,a){let l=-1;if(super(t,n),Ny(this,"space",a),typeof s=="number")for(;++l<mf.length;){const c=mf[l];Ny(this,mf[l],(s&ap[c])===ap[c])}}}mh.prototype.defined=!0;function Ny(e,t,n){n&&(e[t]=n)}function ti(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const l=new mh(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(l.mustUseProperty=!0),t[s]=l,n[op(s)]=s,n[op(l.attribute)]=s}return new Aa(t,n,e.space)}const c0=ti({properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:ct,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:he,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:ct,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Ot,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function u0(e,t){return t in e?e[t]:t}function d0(e,t){return u0(e,t.toLowerCase())}const TR=ti({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zo,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:ct,autoFocus:We,autoPlay:We,blocking:ct,capture:null,charSet:null,checked:We,cite:null,className:ct,cols:he,colSpan:null,content:null,contentEditable:Ot,controls:We,controlsList:ct,coords:he|zo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:ip,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:ct,height:he,hidden:ip,high:he,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:ct,itemRef:ct,itemScope:We,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,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:We,optimum:he,pattern:null,ping:ct,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:ct,required:We,reversed:We,rows:he,rowSpan:he,sandbox:ct,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Ot,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:d0}),RR=ti({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:Fn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ct,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:zo,g2:zo,glyphName:zo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Fn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fn,rev:Fn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fn,requiredFeatures:Fn,requiredFonts:Fn,requiredFormats:Fn,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Fn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:u0}),f0=ti({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()}}),p0=ti({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:d0}),h0=ti({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),AR={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"},DR=/[A-Z]/g,Cy=/-[a-z]/g,IR=/^data[-\w.:]+$/i;function LR(e,t){const n=op(t);let s=t,a=Dn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&IR.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Cy,MR);s="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Cy.test(l)){let c=l.replace(DR,OR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}a=mh}return new a(s,t)}function OR(e){return"-"+e.toLowerCase()}function MR(e){return e.charAt(1).toUpperCase()}const _R=l0([c0,TR,f0,p0,h0],"html"),gh=l0([c0,RR,f0,p0,h0],"svg");function $R(e){return e.join(" ").trim()}var Io={},gf,Ey;function FR(){if(Ey)return gf;Ey=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
485
|
+
`,m="/",h="*",x="",y="comment",b="declaration";function C(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var T=1,N=1;function A(J){var _=J.match(t);_&&(T+=_.length);var F=J.lastIndexOf(f);N=~F?J.length-F:N+J.length}function L(){var J={line:T,column:N};return function(_){return _.position=new R(J),G(),_}}function R(J){this.start=J,this.end={line:T,column:N},this.source=S.source}R.prototype.content=j;function D(J){var _=new Error(S.source+":"+T+":"+N+": "+J);if(_.reason=J,_.filename=S.source,_.line=T,_.column=N,_.source=j,!S.silent)throw _}function O(J){var _=J.exec(j);if(_){var F=_[0];return A(F),j=j.slice(F.length),_}}function G(){O(n)}function re(J){var _;for(J=J||[];_=z();)_!==!1&&J.push(_);return J}function z(){var J=L();if(!(m!=j.charAt(0)||h!=j.charAt(1))){for(var _=2;x!=j.charAt(_)&&(h!=j.charAt(_)||m!=j.charAt(_+1));)++_;if(_+=2,x===j.charAt(_-1))return D("End of comment missing");var F=j.slice(2,_-2);return N+=2,A(F),j=j.slice(_),N+=2,J({type:y,comment:F})}}function K(){var J=L(),_=O(s);if(_){if(z(),!O(a))return D("property missing ':'");var F=O(l),B=J({type:b,property:k(_[0].replace(e,x)),value:F?k(F[0].replace(e,x)):x});return O(c),B}}function q(){var J=[];re(J);for(var _;_=K();)_!==!1&&(J.push(_),re(J));return J}return G(),q()}function k(j){return j?j.replace(d,x):x}return gf=C,gf}var Py;function zR(){if(Py)return Io;Py=1;var e=Io&&Io.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.default=n;const t=e(FR());function n(s,a){let l=null;if(!s||typeof s!="string")return l;const c=(0,t.default)(s),d=typeof a=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:m,value:h}=f;d?a(m,h,f):h&&(l=l||{},l[m]=h)}),l}return Io}var Xi={},Ty;function BR(){if(Ty)return Xi;Ty=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,l=function(m){return!m||n.test(m)||e.test(m)},c=function(m,h){return h.toUpperCase()},d=function(m,h){return"".concat(h,"-")},f=function(m,h){return h===void 0&&(h={}),l(m)?m:(m=m.toLowerCase(),h.reactCompat?m=m.replace(a,d):m=m.replace(s,d),m.replace(t,c))};return Xi.camelCase=f,Xi}var Qi,Ry;function UR(){if(Ry)return Qi;Ry=1;var e=Qi&&Qi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(zR()),n=BR();function s(a,l){var c={};return!a||typeof a!="string"||(0,t.default)(a,function(d,f){d&&f&&(c[(0,n.camelCase)(d,l)]=f)}),c}return s.default=s,Qi=s,Qi}var HR=UR();const WR=Dc(HR),m0=g0("end"),xh=g0("start");function g0(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function VR(e){const t=xh(e),n=m0(e);if(t&&n)return{start:t,end:n}}function oa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ay(e.position):"start"in e||"end"in e?Ay(e):"line"in e||"column"in e?lp(e):""}function lp(e){return Dy(e&&e.line)+":"+Dy(e&&e.column)}function Ay(e){return lp(e&&e.start)+"-"+lp(e&&e.end)}function Dy(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",l={},c=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?a=t:!l.cause&&t&&(c=!0,a=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof s=="string"){const f=s.indexOf(":");f===-1?l.ruleId=s:(l.source=s.slice(0,f),l.ruleId=s.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const d=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=oa(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="";gn.prototype.name="";gn.prototype.reason="";gn.prototype.message="";gn.prototype.stack="";gn.prototype.column=void 0;gn.prototype.line=void 0;gn.prototype.ancestors=void 0;gn.prototype.cause=void 0;gn.prototype.fatal=void 0;gn.prototype.place=void 0;gn.prototype.ruleId=void 0;gn.prototype.source=void 0;const yh={}.hasOwnProperty,qR=new Map,KR=/[A-Z]/g,GR=new Set(["table","tbody","thead","tfoot","tr"]),YR=new Set(["td","th"]),x0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=s3(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");s=r3(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,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"?gh:_R,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=y0(a,e,void 0);return l&&typeof l!="string"?l:a.create(e,a.Fragment,{children:l||void 0},void 0)}function y0(e,t,n){if(t.type==="element")return QR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return JR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return e3(e,t,n);if(t.type==="mdxjsEsm")return ZR(e,t);if(t.type==="root")return t3(e,t,n);if(t.type==="text")return n3(e,t)}function QR(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=gh,e.schema=a),e.ancestors.push(t);const l=b0(e,t.tagName,!1),c=o3(e,t);let d=bh(e,t);return GR.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!ER(f):!0})),v0(e,c,l,t),vh(c,d),e.ancestors.pop(),e.schema=s,e.create(t,l,c,n)}function JR(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}va(e,t.position)}function ZR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);va(e,t.position)}function e3(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=gh,e.schema=a),e.ancestors.push(t);const l=t.name===null?e.Fragment:b0(e,t.name,!0),c=i3(e,t),d=bh(e,t);return v0(e,c,l,t),vh(c,d),e.ancestors.pop(),e.schema=s,e.create(t,l,c,n)}function t3(e,t,n){const s={};return vh(s,bh(e,t)),e.create(t,e.Fragment,s,n)}function n3(e,t){return t.value}function v0(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function vh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function r3(e,t,n){return s;function s(a,l,c,d){const m=Array.isArray(c.children)?n:t;return d?m(l,c,d):m(l,c)}}function s3(e,t){return n;function n(s,a,l,c){const d=Array.isArray(l.children),f=xh(s);return t(a,l,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function o3(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&yh.call(t.properties,a)){const l=a3(e,a,t.properties[a]);if(l){const[c,d]=l;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&YR.has(t.tagName)?s=d:n[c]=d}}if(s){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function i3(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const l=s.data.estree.body[0];l.type;const c=l.expression;c.type;const d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else va(e,t.position);else{const a=s.name;let l;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const d=s.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else va(e,t.position);else l=s.value===null?!0:s.value;n[a]=l}return n}function bh(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:qR;for(;++s<t.children.length;){const l=t.children[s];let c;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const m=a.get(f)||0;c=f+"-"+m,a.set(f,m+1)}}const d=y0(e,l,c);d!==void 0&&n.push(d)}return n}function a3(e,t,n){const s=LR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?jR(n):$R(n)),s.property==="style"){let a=typeof n=="object"?n:l3(e,String(n));return e.stylePropertyNameCase==="css"&&(a=c3(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?AR[s.property]||s.property:s.attribute,n]}}function l3(e,t){try{return WR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=x0+"#cannot-parse-style-attribute",a}}function b0(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let l=-1,c;for(;++l<a.length;){const d=ky(a[l])?{type:"Identifier",name:a[l]}:{type:"Literal",value:a[l]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}s=c}else s=ky(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return yh.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);va(e)}function va(e,t){const n=new gn("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=x0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function c3(e){const t={};let n;for(n in e)yh.call(e,n)&&(t[u3(n)]=e[n]);return t}function u3(e){let t=e.replace(KR,d3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function d3(e){return"-"+e.toLowerCase()}const xf={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"]},f3={};function p3(e,t){const n=f3,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return w0(e,s,a)}function w0(e,t,n){if(h3(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 Iy(e.children,t,n)}return Array.isArray(e)?Iy(e,t,n):""}function Iy(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=w0(e[a],t,n);return s.join("")}function h3(e){return!!(e&&typeof e=="object")}const Ly=document.createElement("i");function wh(e){const t="&"+e+";";Ly.innerHTML=t;const n=Ly.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dr(e,t,n,s){const a=e.length;let l=0,c;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)c=Array.from(s),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<s.length;)c=s.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Zn(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const Oy={}.hasOwnProperty;function m3(e){const t={};let n=-1;for(;++n<e.length;)g3(t,e[n]);return t}function g3(e,t){let n;for(n in t){const a=(Oy.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){Oy.call(a,c)||(a[c]=[]);const d=l[c];x3(a[c],Array.isArray(d)?d:d?[d]:[])}}}function x3(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);Dr(e,0,0,s)}function j0(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 Bo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Cr=Ds(/[A-Za-z]/),Bn=Ds(/[\dA-Za-z]/),y3=Ds(/[#-'*+\--9=?A-Z^-~]/);function cp(e){return e!==null&&(e<32||e===127)}const up=Ds(/\d/),v3=Ds(/[\dA-Fa-f]/),b3=Ds(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function An(e){return e!==null&&(e<0||e===32)}function nt(e){return e===-2||e===-1||e===32}const w3=Ds(new RegExp("\\p{P}|\\p{S}","u")),j3=Ds(/\s/);function Ds(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ni(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&Bn(e.charCodeAt(n+1))&&Bn(e.charCodeAt(n+2)))a=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const d=e.charCodeAt(n+1);l<56320&&d>56319&&d<57344?(c=String.fromCharCode(l,d),a=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(s,n),encodeURIComponent(c)),s=n+a+1,c=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function ut(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(f){return nt(f)?(e.enter(n),d(f)):t(f)}function d(f){return nt(f)&&l++<a?(e.consume(f),d):(e.exit(n),t(f))}}const k3={tokenize:S3};function S3(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ut(e,t,"linePrefix")}function a(d){return e.enter("paragraph"),l(d)}function l(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Fe(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),c)}}const N3={tokenize:C3},My={tokenize:E3};function C3(e){const t=this,n=[];let s=0,a,l,c;return d;function d(N){if(s<n.length){const A=n[s];return t.containerState=A[1],e.attempt(A[0].continuation,f,m)(N)}return m(N)}function f(N){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&T();const A=t.events.length;let L=A,R;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){R=t.events[L][1].end;break}S(s);let D=A;for(;D<t.events.length;)t.events[D][1].end={...R},D++;return Dr(t.events,L+1,0,t.events.slice(A)),t.events.length=D,m(N)}return d(N)}function m(N){if(s===n.length){if(!a)return y(N);if(a.currentConstruct&&a.currentConstruct.concrete)return C(N);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(My,h,x)(N)}function h(N){return a&&T(),S(s),y(N)}function x(N){return t.parser.lazy[t.now().line]=s!==n.length,c=t.now().offset,C(N)}function y(N){return t.containerState={},e.attempt(My,b,C)(N)}function b(N){return s++,n.push([t.currentConstruct,t.containerState]),y(N)}function C(N){if(N===null){a&&T(),S(0),e.consume(N);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:l}),k(N)}function k(N){if(N===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(N);return}return Fe(N)?(e.consume(N),j(e.exit("chunkFlow")),s=0,t.interrupt=void 0,d):(e.consume(N),k)}function j(N,A){const L=t.sliceStream(N);if(A&&L.push(null),N.previous=l,l&&(l.next=N),l=N,a.defineSkip(N.start),a.write(L),t.parser.lazy[N.start.line]){let R=a.events.length;for(;R--;)if(a.events[R][1].start.offset<c&&(!a.events[R][1].end||a.events[R][1].end.offset>c))return;const D=t.events.length;let O=D,G,re;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(G){re=t.events[O][1].end;break}G=!0}for(S(s),R=D;R<t.events.length;)t.events[R][1].end={...re},R++;Dr(t.events,O+1,0,t.events.slice(D)),t.events.length=R}}function S(N){let A=n.length;for(;A-- >N;){const L=n[A];t.containerState=L[1],L[0].exit.call(t,e)}n.length=N}function T(){a.write([null]),l=void 0,a=void 0,t.containerState._closeFlow=void 0}}function E3(e,t,n){return ut(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _y(e){if(e===null||An(e)||j3(e))return 1;if(w3(e))return 2}function jh(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const l=e[a].resolveAll;l&&!s.includes(l)&&(t=l(t,n),s.push(l))}return t}const dp={name:"attention",resolveAll:P3,tokenize:T3};function P3(e,t){let n=-1,s,a,l,c,d,f,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[s][1].end},y={...e[n][1].start};$y(x,-f),$y(y,f),c={type:f>1?"strongSequence":"emphasisSequence",start:x,end:{...e[s][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:f>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[s][1].end={...c.start},e[n][1].start={...d.end},m=[],e[s][1].end.offset-e[s][1].start.offset&&(m=Zn(m,[["enter",e[s][1],t],["exit",e[s][1],t]])),m=Zn(m,[["enter",a,t],["enter",c,t],["exit",c,t],["enter",l,t]]),m=Zn(m,jh(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),m=Zn(m,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=Zn(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Dr(e,s-1,n-s+3,m),n=s+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function T3(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=_y(s);let l;return c;function c(f){return l=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===l)return e.consume(f),d;const m=e.exit("attentionSequence"),h=_y(f),x=!h||h===2&&a||n.includes(f),y=!a||a===2&&h||n.includes(s);return m._open=!!(l===42?x:x&&(a||!y)),m._close=!!(l===42?y:y&&(h||!x)),t(f)}}function $y(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const R3={name:"autolink",tokenize:A3};function A3(e,t,n){let s=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(b){return Cr(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||Bn(b)?(s=1,d(b)):m(b)}function d(b){return b===58?(e.consume(b),s=0,f):(b===43||b===45||b===46||Bn(b))&&s++<32?(e.consume(b),d):(s=0,m(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||cp(b)?n(b):(e.consume(b),f)}function m(b){return b===64?(e.consume(b),h):y3(b)?(e.consume(b),m):n(b)}function h(b){return Bn(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),s=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):y(b)}function y(b){if((b===45||Bn(b))&&s++<63){const C=b===45?y:x;return e.consume(b),C}return n(b)}}const qc={partial:!0,tokenize:D3};function D3(e,t,n){return s;function s(l){return nt(l)?ut(e,a,"linePrefix")(l):a(l)}function a(l){return l===null||Fe(l)?t(l):n(l)}}const k0={continuation:{tokenize:L3},exit:O3,name:"blockQuote",tokenize:I3};function I3(e,t,n){const s=this;return a;function a(c){if(c===62){const d=s.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return n(c)}function l(c){return nt(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function L3(e,t,n){const s=this;return a;function a(c){return nt(c)?ut(e,l,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(k0,t,n)(c)}}function O3(e){e.exit("blockQuote")}const S0={name:"characterEscape",tokenize:M3};function M3(e,t,n){return s;function s(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),a}function a(l){return b3(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const N0={name:"characterReference",tokenize:_3};function _3(e,t,n){const s=this;let a=0,l,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),f}function f(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,c=Bn,h(x))}function m(x){return x===88||x===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(x),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=v3,h):(e.enter("characterReferenceValue"),l=7,c=up,h(x))}function h(x){if(x===59&&a){const y=e.exit("characterReferenceValue");return c===Bn&&!wh(s.sliceSerialize(y))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&a++<l?(e.consume(x),h):n(x)}}const Fy={partial:!0,tokenize:F3},zy={concrete:!0,name:"codeFenced",tokenize:$3};function $3(e,t,n){const s=this,a={partial:!0,tokenize:L};let l=0,c=0,d;return f;function f(R){return m(R)}function m(R){const D=s.events[s.events.length-1];return l=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,d=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(R)}function h(R){return R===d?(c++,e.consume(R),h):c<3?n(R):(e.exit("codeFencedFenceSequence"),nt(R)?ut(e,x,"whitespace")(R):x(R))}function x(R){return R===null||Fe(R)?(e.exit("codeFencedFence"),s.interrupt?t(R):e.check(Fy,k,A)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(R))}function y(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(R)):nt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ut(e,b,"whitespace")(R)):R===96&&R===d?n(R):(e.consume(R),y)}function b(R){return R===null||Fe(R)?x(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(R))}function C(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(R)):R===96&&R===d?n(R):(e.consume(R),C)}function k(R){return e.attempt(a,A,j)(R)}function j(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),S}function S(R){return l>0&&nt(R)?ut(e,T,"linePrefix",l+1)(R):T(R)}function T(R){return R===null||Fe(R)?e.check(Fy,k,A)(R):(e.enter("codeFlowValue"),N(R))}function N(R){return R===null||Fe(R)?(e.exit("codeFlowValue"),T(R)):(e.consume(R),N)}function A(R){return e.exit("codeFenced"),t(R)}function L(R,D,O){let G=0;return re;function re(_){return R.enter("lineEnding"),R.consume(_),R.exit("lineEnding"),z}function z(_){return R.enter("codeFencedFence"),nt(_)?ut(R,K,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):K(_)}function K(_){return _===d?(R.enter("codeFencedFenceSequence"),q(_)):O(_)}function q(_){return _===d?(G++,R.consume(_),q):G>=c?(R.exit("codeFencedFenceSequence"),nt(_)?ut(R,J,"whitespace")(_):J(_)):O(_)}function J(_){return _===null||Fe(_)?(R.exit("codeFencedFence"),D(_)):O(_)}}}function F3(e,t,n){const s=this;return a;function a(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}const yf={name:"codeIndented",tokenize:B3},z3={partial:!0,tokenize:U3};function B3(e,t,n){const s=this;return a;function a(m){return e.enter("codeIndented"),ut(e,l,"linePrefix",5)(m)}function l(m){const h=s.events[s.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?f(m):Fe(m)?e.attempt(z3,c,f)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Fe(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function f(m){return e.exit("codeIndented"),t(m)}}function U3(e,t,n){const s=this;return a;function a(c){return s.parser.lazy[s.now().line]?n(c):Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):ut(e,l,"linePrefix",5)(c)}function l(c){const d=s.events[s.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Fe(c)?a(c):n(c)}}const H3={name:"codeText",previous:V3,resolve:W3,tokenize:q3};function W3(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function V3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function q3(e,t,n){let s=0,a,l;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),s++,d):(e.exit("codeTextSequence"),f(x))}function f(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),f):x===96?(l=e.enter("codeTextSequence"),a=0,h(x)):Fe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),f):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Fe(x)?(e.exit("codeTextData"),f(x)):(e.consume(x),m)}function h(x){return x===96?(e.consume(x),a++,h):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(l.type="codeTextData",m(x))}}class K3{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 s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const a=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&Ji(this.left,s),l.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),Ji(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ji(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);Ji(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ji(this.left,n.reverse())}}}function Ji(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 C0(e){const t={};let n=-1,s,a,l,c,d,f,m;const h=new K3(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(s=h.get(n),n&&s[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(f=s[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,G3(h,n)),n=t[n],m=!0);else if(s[1]._container){for(l=n,a=void 0;l--;)if(c=h.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(a&&(h.get(a)[1].type="lineEndingBlank"),c[1].type="lineEnding",a=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;a&&(s[1].end={...h.get(a)[1].start},d=h.slice(a,n),d.unshift(s),h.splice(a,n-a+1,d))}}return Dr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function G3(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const l=[];let c=n._tokenizer;c||(c=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,f=[],m={};let h,x,y=-1,b=n,C=0,k=0;const j=[k];for(;b;){for(;e.get(++a)[1]!==b;);l.push(a),b._tokenizer||(h=s.sliceStream(b),b.next||h.push(null),x&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(h),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),x=b,b=b.next}for(b=n;++y<d.length;)d[y][0]==="exit"&&d[y-1][0]==="enter"&&d[y][1].type===d[y-1][1].type&&d[y][1].start.line!==d[y][1].end.line&&(k=y+1,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),y=j.length;y--;){const S=d.slice(j[y],j[y+1]),T=l.pop();f.push([T,T+S.length-1]),e.splice(T,2,S)}for(f.reverse(),y=-1;++y<f.length;)m[C+f[y][0]]=C+f[y][1],C+=f[y][1]-f[y][0]-1;return m}const Y3={resolve:Q3,tokenize:J3},X3={partial:!0,tokenize:Z3};function Q3(e){return C0(e),e}function J3(e,t){let n;return s;function s(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?l(d):Fe(d)?e.check(X3,c,l)(d):(e.consume(d),a)}function l(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Z3(e,t,n){const s=this;return a;function a(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ut(e,l,"linePrefix")}function l(c){if(c===null||Fe(c))return n(c);const d=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,n,t)(c)}}function E0(e,t,n,s,a,l,c,d,f){const m=f||Number.POSITIVE_INFINITY;let h=0;return x;function x(S){return S===60?(e.enter(s),e.enter(a),e.enter(l),e.consume(S),e.exit(l),y):S===null||S===32||S===41||cp(S)?n(S):(e.enter(s),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function y(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(a),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),y(S)):S===null||S===60||Fe(S)?n(S):(e.consume(S),S===92?C:b)}function C(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!h&&(S===null||S===41||An(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(s),t(S)):h<m&&S===40?(e.consume(S),h++,k):S===41?(e.consume(S),h--,k):S===null||S===32||S===40||cp(S)?n(S):(e.consume(S),S===92?j:k)}function j(S){return S===40||S===41||S===92?(e.consume(S),k):k(S)}}function P0(e,t,n,s,a,l){const c=this;let d=0,f;return m;function m(b){return e.enter(s),e.enter(a),e.consume(b),e.exit(a),e.enter(l),h}function h(b){return d>999||b===null||b===91||b===93&&!f||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(l),e.enter(a),e.consume(b),e.exit(a),e.exit(s),t):Fe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),x(b))}function x(b){return b===null||b===91||b===93||Fe(b)||d++>999?(e.exit("chunkString"),h(b)):(e.consume(b),f||(f=!nt(b)),b===92?y:x)}function y(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function T0(e,t,n,s,a,l){let c;return d;function d(y){return y===34||y===39||y===40?(e.enter(s),e.enter(a),e.consume(y),e.exit(a),c=y===40?41:y,f):n(y)}function f(y){return y===c?(e.enter(a),e.consume(y),e.exit(a),e.exit(s),t):(e.enter(l),m(y))}function m(y){return y===c?(e.exit(l),f(c)):y===null?n(y):Fe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ut(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===c||y===null||Fe(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?x:h)}function x(y){return y===c||y===92?(e.consume(y),h):h(y)}}function ia(e,t){let n;return s;function s(a){return Fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):nt(a)?ut(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const eA={name:"definition",tokenize:nA},tA={partial:!0,tokenize:rA};function nA(e,t,n){const s=this;let a;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return P0.call(s,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return a=Bo(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),f):n(b)}function f(b){return An(b)?ia(e,m)(b):m(b)}function m(b){return E0(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(tA,x,x)(b)}function x(b){return nt(b)?ut(e,y,"whitespace")(b):y(b)}function y(b){return b===null||Fe(b)?(e.exit("definition"),s.parser.defined.push(a),t(b)):n(b)}}function rA(e,t,n){return s;function s(d){return An(d)?ia(e,a)(d):n(d)}function a(d){return T0(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return nt(d)?ut(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Fe(d)?t(d):n(d)}}const sA={name:"hardBreakEscape",tokenize:oA};function oA(e,t,n){return s;function s(l){return e.enter("hardBreakEscape"),e.consume(l),a}function a(l){return Fe(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const iA={name:"headingAtx",resolve:aA,tokenize:lA};function aA(e,t){let n=e.length-2,s=3,a,l;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},l={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},Dr(e,s,n-s+1,[["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t]])),e}function lA(e,t,n){let s=0;return a;function a(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),c(h)}function c(h){return h===35&&s++<6?(e.consume(h),c):h===null||An(h)?(e.exit("atxHeadingSequence"),d(h)):n(h)}function d(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||Fe(h)?(e.exit("atxHeading"),t(h)):nt(h)?ut(e,d,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),d(h))}function m(h){return h===null||h===35||An(h)?(e.exit("atxHeadingText"),d(h)):(e.consume(h),m)}}const cA=["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"],By=["pre","script","style","textarea"],uA={concrete:!0,name:"htmlFlow",resolveTo:pA,tokenize:hA},dA={partial:!0,tokenize:gA},fA={partial:!0,tokenize:mA};function pA(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 hA(e,t,n){const s=this;let a,l,c,d,f;return m;function m(I){return h(I)}function h(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),x}function x(I){return I===33?(e.consume(I),y):I===47?(e.consume(I),l=!0,k):I===63?(e.consume(I),a=3,s.interrupt?t:P):Cr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function y(I){return I===45?(e.consume(I),a=2,b):I===91?(e.consume(I),a=5,d=0,C):Cr(I)?(e.consume(I),a=4,s.interrupt?t:P):n(I)}function b(I){return I===45?(e.consume(I),s.interrupt?t:P):n(I)}function C(I){const ge="CDATA[";return I===ge.charCodeAt(d++)?(e.consume(I),d===ge.length?s.interrupt?t:K:C):n(I)}function k(I){return Cr(I)?(e.consume(I),c=String.fromCharCode(I),j):n(I)}function j(I){if(I===null||I===47||I===62||An(I)){const ge=I===47,Ne=c.toLowerCase();return!ge&&!l&&By.includes(Ne)?(a=1,s.interrupt?t(I):K(I)):cA.includes(c.toLowerCase())?(a=6,ge?(e.consume(I),S):s.interrupt?t(I):K(I)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(I):l?T(I):N(I))}return I===45||Bn(I)?(e.consume(I),c+=String.fromCharCode(I),j):n(I)}function S(I){return I===62?(e.consume(I),s.interrupt?t:K):n(I)}function T(I){return nt(I)?(e.consume(I),T):re(I)}function N(I){return I===47?(e.consume(I),re):I===58||I===95||Cr(I)?(e.consume(I),A):nt(I)?(e.consume(I),N):re(I)}function A(I){return I===45||I===46||I===58||I===95||Bn(I)?(e.consume(I),A):L(I)}function L(I){return I===61?(e.consume(I),R):nt(I)?(e.consume(I),L):N(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),f=I,D):nt(I)?(e.consume(I),R):O(I)}function D(I){return I===f?(e.consume(I),f=null,G):I===null||Fe(I)?n(I):(e.consume(I),D)}function O(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||An(I)?L(I):(e.consume(I),O)}function G(I){return I===47||I===62||nt(I)?N(I):n(I)}function re(I){return I===62?(e.consume(I),z):n(I)}function z(I){return I===null||Fe(I)?K(I):nt(I)?(e.consume(I),z):n(I)}function K(I){return I===45&&a===2?(e.consume(I),F):I===60&&a===1?(e.consume(I),B):I===62&&a===4?(e.consume(I),M):I===63&&a===3?(e.consume(I),P):I===93&&a===5?(e.consume(I),Z):Fe(I)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(dA,Q,q)(I)):I===null||Fe(I)?(e.exit("htmlFlowData"),q(I)):(e.consume(I),K)}function q(I){return e.check(fA,J,Q)(I)}function J(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),_}function _(I){return I===null||Fe(I)?q(I):(e.enter("htmlFlowData"),K(I))}function F(I){return I===45?(e.consume(I),P):K(I)}function B(I){return I===47?(e.consume(I),c="",U):K(I)}function U(I){if(I===62){const ge=c.toLowerCase();return By.includes(ge)?(e.consume(I),M):K(I)}return Cr(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),U):K(I)}function Z(I){return I===93?(e.consume(I),P):K(I)}function P(I){return I===62?(e.consume(I),M):I===45&&a===2?(e.consume(I),P):K(I)}function M(I){return I===null||Fe(I)?(e.exit("htmlFlowData"),Q(I)):(e.consume(I),M)}function Q(I){return e.exit("htmlFlow"),t(I)}}function mA(e,t,n){const s=this;return a;function a(c){return Fe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return s.parser.lazy[s.now().line]?n(c):t(c)}}function gA(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(qc,t,n)}}const xA={name:"htmlText",tokenize:yA};function yA(e,t,n){const s=this;let a,l,c;return d;function d(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),f}function f(P){return P===33?(e.consume(P),m):P===47?(e.consume(P),L):P===63?(e.consume(P),N):Cr(P)?(e.consume(P),O):n(P)}function m(P){return P===45?(e.consume(P),h):P===91?(e.consume(P),l=0,C):Cr(P)?(e.consume(P),T):n(P)}function h(P){return P===45?(e.consume(P),b):n(P)}function x(P){return P===null?n(P):P===45?(e.consume(P),y):Fe(P)?(c=x,B(P)):(e.consume(P),x)}function y(P){return P===45?(e.consume(P),b):x(P)}function b(P){return P===62?F(P):P===45?y(P):x(P)}function C(P){const M="CDATA[";return P===M.charCodeAt(l++)?(e.consume(P),l===M.length?k:C):n(P)}function k(P){return P===null?n(P):P===93?(e.consume(P),j):Fe(P)?(c=k,B(P)):(e.consume(P),k)}function j(P){return P===93?(e.consume(P),S):k(P)}function S(P){return P===62?F(P):P===93?(e.consume(P),S):k(P)}function T(P){return P===null||P===62?F(P):Fe(P)?(c=T,B(P)):(e.consume(P),T)}function N(P){return P===null?n(P):P===63?(e.consume(P),A):Fe(P)?(c=N,B(P)):(e.consume(P),N)}function A(P){return P===62?F(P):N(P)}function L(P){return Cr(P)?(e.consume(P),R):n(P)}function R(P){return P===45||Bn(P)?(e.consume(P),R):D(P)}function D(P){return Fe(P)?(c=D,B(P)):nt(P)?(e.consume(P),D):F(P)}function O(P){return P===45||Bn(P)?(e.consume(P),O):P===47||P===62||An(P)?G(P):n(P)}function G(P){return P===47?(e.consume(P),F):P===58||P===95||Cr(P)?(e.consume(P),re):Fe(P)?(c=G,B(P)):nt(P)?(e.consume(P),G):F(P)}function re(P){return P===45||P===46||P===58||P===95||Bn(P)?(e.consume(P),re):z(P)}function z(P){return P===61?(e.consume(P),K):Fe(P)?(c=z,B(P)):nt(P)?(e.consume(P),z):G(P)}function K(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),a=P,q):Fe(P)?(c=K,B(P)):nt(P)?(e.consume(P),K):(e.consume(P),J)}function q(P){return P===a?(e.consume(P),a=void 0,_):P===null?n(P):Fe(P)?(c=q,B(P)):(e.consume(P),q)}function J(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||An(P)?G(P):(e.consume(P),J)}function _(P){return P===47||P===62||An(P)?G(P):n(P)}function F(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function B(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),U}function U(P){return nt(P)?ut(e,Z,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):Z(P)}function Z(P){return e.enter("htmlTextData"),c(P)}}const kh={name:"labelEnd",resolveAll:jA,resolveTo:kA,tokenize:SA},vA={tokenize:NA},bA={tokenize:CA},wA={tokenize:EA};function jA(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&Dr(e,0,e.length,n),e}function kA(e,t){let n=e.length,s=0,a,l,c,d;for(;n--;)if(a=e[n][1],l){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(l=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(c=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},h={type:"labelText",start:{...e[l+s+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",f,t],["enter",m,t]],d=Zn(d,e.slice(l+1,l+s+3)),d=Zn(d,[["enter",h,t]]),d=Zn(d,jh(t.parser.constructs.insideSpan.null,e.slice(l+s+4,c-3),t)),d=Zn(d,[["exit",h,t],e[c-2],e[c-1],["exit",m,t]]),d=Zn(d,e.slice(c+1)),d=Zn(d,[["exit",f,t]]),Dr(e,l,e.length,d),e}function SA(e,t,n){const s=this;let a=s.events.length,l,c;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){l=s.events[a][1];break}return d;function d(y){return l?l._inactive?x(y):(c=s.parser.defined.includes(Bo(s.sliceSerialize({start:l.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(vA,h,c?h:x)(y):y===91?e.attempt(bA,h,c?m:x)(y):c?h(y):x(y)}function m(y){return e.attempt(wA,h,x)(y)}function h(y){return t(y)}function x(y){return l._balanced=!0,n(y)}}function NA(e,t,n){return s;function s(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),a}function a(x){return An(x)?ia(e,l)(x):l(x)}function l(x){return x===41?h(x):E0(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return An(x)?ia(e,f)(x):h(x)}function d(x){return n(x)}function f(x){return x===34||x===39||x===40?T0(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):h(x)}function m(x){return An(x)?ia(e,h)(x):h(x)}function h(x){return x===41?(e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),e.exit("resource"),t):n(x)}}function CA(e,t,n){const s=this;return a;function a(d){return P0.call(s,e,l,c,"reference","referenceMarker","referenceString")(d)}function l(d){return s.parser.defined.includes(Bo(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function EA(e,t,n){return s;function s(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),a}function a(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const PA={name:"labelStartImage",resolveAll:kh.resolveAll,tokenize:TA};function TA(e,t,n){const s=this;return a;function a(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),l}function l(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):t(d)}}const RA={name:"labelStartLink",resolveAll:kh.resolveAll,tokenize:AA};function AA(e,t,n){const s=this;return a;function a(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):t(c)}}const vf={name:"lineEnding",tokenize:DA};function DA(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ut(e,t,"linePrefix")}}const fc={name:"thematicBreak",tokenize:IA};function IA(e,t,n){let s=0,a;return l;function l(m){return e.enter("thematicBreak"),c(m)}function c(m){return a=m,d(m)}function d(m){return m===a?(e.enter("thematicBreakSequence"),f(m)):s>=3&&(m===null||Fe(m))?(e.exit("thematicBreak"),t(m)):n(m)}function f(m){return m===a?(e.consume(m),s++,f):(e.exit("thematicBreakSequence"),nt(m)?ut(e,d,"whitespace")(m):d(m))}}const En={continuation:{tokenize:_A},exit:FA,name:"list",tokenize:MA},LA={partial:!0,tokenize:zA},OA={partial:!0,tokenize:$A};function MA(e,t,n){const s=this,a=s.events[s.events.length-1];let l=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,c=0;return d;function d(b){const C=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:up(b)){if(s.containerState.type||(s.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(fc,n,m)(b):m(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return n(b)}function f(b){return up(b)&&++c<10?(e.consume(b),f):(!s.interrupt||c<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),m(b)):n(b)}function m(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(qc,s.interrupt?n:h,e.attempt(LA,y,x))}function h(b){return s.containerState.initialBlankLine=!0,l++,y(b)}function x(b){return nt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),y):n(b)}function y(b){return s.containerState.size=l+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function _A(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(qc,a,l);function a(d){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,ut(e,t,"listItemIndent",s.containerState.size+1)(d)}function l(d){return s.containerState.furtherBlankLines||!nt(d)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(d)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(OA,t,c)(d))}function c(d){return s.containerState._closeFlow=!0,s.interrupt=void 0,ut(e,e.attempt(En,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function $A(e,t,n){const s=this;return ut(e,a,"listItemIndent",s.containerState.size+1);function a(l){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(l):n(l)}}function FA(e){e.exit(this.containerState.type)}function zA(e,t,n){const s=this;return ut(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(l){const c=s.events[s.events.length-1];return!nt(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Uy={name:"setextUnderline",resolveTo:BA,tokenize:UA};function BA(e,t){let n=e.length,s,a,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const c={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",l?(e.splice(a,0,["enter",c,t]),e.splice(l+1,0,["exit",e[s][1],t]),e[s][1].end={...e[l][1].end}):e[s][1]=c,e.push(["exit",c,t]),e}function UA(e,t,n){const s=this;let a;return l;function l(m){let h=s.events.length,x;for(;h--;)if(s.events[h][1].type!=="lineEnding"&&s.events[h][1].type!=="linePrefix"&&s.events[h][1].type!=="content"){x=s.events[h][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||x)?(e.enter("setextHeadingLine"),a=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===a?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),nt(m)?ut(e,f,"lineSuffix")(m):f(m))}function f(m){return m===null||Fe(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const HA={tokenize:WA};function WA(e){const t=this,n=e.attempt(qc,s,e.attempt(this.parser.constructs.flowInitial,a,ut(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Y3,a)),"linePrefix")));return n;function s(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const VA={resolveAll:A0()},qA=R0("string"),KA=R0("text");function R0(e){return{resolveAll:A0(e==="text"?GA:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],l=n.attempt(a,c,d);return c;function c(h){return m(h)?l(h):d(h)}function d(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return m(h)?(n.exit("data"),l(h)):(n.consume(h),f)}function m(h){if(h===null)return!0;const x=a[h];let y=-1;if(x)for(;++y<x.length;){const b=x[y];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function A0(e){return t;function t(n,s){let a=-1,l;for(;++a<=n.length;)l===void 0?n[a]&&n[a][1].type==="data"&&(l=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==l+2&&(n[l][1].end=n[a-1][1].end,n.splice(l+2,a-l-2),a=l+2),l=void 0);return e?e(n,s):n}}function GA(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 s=e[n-1][1],a=t.sliceStream(s);let l=a.length,c=-1,d=0,f;for(;l--;){const m=a[l];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)f=!0,d++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const m={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:s.start._bufferIndex+c,_index:s.start._index+l,line:s.end.line,column:s.end.column-d,offset:s.end.offset-d},end:{...s.end}};s.end={...m.start},s.start.offset===s.end.offset?Object.assign(s,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const YA={42:En,43:En,45:En,48:En,49:En,50:En,51:En,52:En,53:En,54:En,55:En,56:En,57:En,62:k0},XA={91:eA},QA={[-2]:yf,[-1]:yf,32:yf},JA={35:iA,42:fc,45:[Uy,fc],60:uA,61:Uy,95:fc,96:zy,126:zy},ZA={38:N0,92:S0},e4={[-5]:vf,[-4]:vf,[-3]:vf,33:PA,38:N0,42:dp,60:[R3,xA],91:RA,92:[sA,S0],93:kh,95:dp,96:H3},t4={null:[dp,VA]},n4={null:[42,95]},r4={null:[]},s4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:n4,contentInitial:XA,disable:r4,document:YA,flow:JA,flowInitial:QA,insideSpan:t4,string:ZA,text:e4},Symbol.toStringTag,{value:"Module"}));function o4(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},l=[];let c=[],d=[];const f={attempt:D(L),check:D(R),consume:T,enter:N,exit:A,interrupt:D(R,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:C,parser:e,previous:null,sliceSerialize:y,sliceStream:b,write:x};let h=t.tokenize.call(m,f);return t.resolveAll&&l.push(t),m;function x(z){return c=Zn(c,z),j(),c[c.length-1]!==null?[]:(O(t,0),m.events=jh(l,m.events,m),m.events)}function y(z,K){return a4(b(z),K)}function b(z){return i4(c,z)}function C(){const{_bufferIndex:z,_index:K,line:q,column:J,offset:_}=s;return{_bufferIndex:z,_index:K,line:q,column:J,offset:_}}function k(z){a[z.line]=z.column,re()}function j(){let z;for(;s._index<c.length;){const K=c[s._index];if(typeof K=="string")for(z=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===z&&s._bufferIndex<K.length;)S(K.charCodeAt(s._bufferIndex));else S(K)}}function S(z){h=h(z)}function T(z){Fe(z)?(s.line++,s.column=1,s.offset+=z===-3?2:1,re()):z!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),m.previous=z}function N(z,K){const q=K||{};return q.type=z,q.start=C(),m.events.push(["enter",q,m]),d.push(q),q}function A(z){const K=d.pop();return K.end=C(),m.events.push(["exit",K,m]),K}function L(z,K){O(z,K.from)}function R(z,K){K.restore()}function D(z,K){return q;function q(J,_,F){let B,U,Z,P;return Array.isArray(J)?Q(J):"tokenize"in J?Q([J]):M(J);function M(te){return fe;function fe(be){const ke=be!==null&&te[be],we=be!==null&&te.null,Ye=[...Array.isArray(ke)?ke:ke?[ke]:[],...Array.isArray(we)?we:we?[we]:[]];return Q(Ye)(be)}}function Q(te){return B=te,U=0,te.length===0?F:I(te[U])}function I(te){return fe;function fe(be){return P=G(),Z=te,te.partial||(m.currentConstruct=te),te.name&&m.parser.constructs.disable.null.includes(te.name)?Ne():te.tokenize.call(K?Object.assign(Object.create(m),K):m,f,ge,Ne)(be)}}function ge(te){return z(Z,P),_}function Ne(te){return P.restore(),++U<B.length?I(B[U]):F}}}function O(z,K){z.resolveAll&&!l.includes(z)&&l.push(z),z.resolve&&Dr(m.events,K,m.events.length-K,z.resolve(m.events.slice(K),m)),z.resolveTo&&(m.events=z.resolveTo(m.events,m))}function G(){const z=C(),K=m.previous,q=m.currentConstruct,J=m.events.length,_=Array.from(d);return{from:J,restore:F};function F(){s=z,m.previous=K,m.currentConstruct=q,m.events.length=J,d=_,re()}}function re(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function i4(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,l=t.end._bufferIndex;let c;if(n===a)c=[e[n].slice(s,l)];else{if(c=e.slice(n,a),s>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(s):c.shift()}l>0&&c.push(e[a].slice(0,l))}return c}function a4(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const l=e[n];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
486
|
+
`;break}case-3:{c=`\r
|
|
487
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&a)continue;c=" ";break}default:c=String.fromCharCode(l)}a=l===-2,s.push(c)}return s.join("")}function l4(e){const s={constructs:m3([s4,...(e||{}).extensions||[]]),content:a(k3),defined:[],document:a(N3),flow:a(HA),lazy:{},string:a(qA),text:a(KA)};return s;function a(l){return c;function c(d){return o4(s,l,d)}}}function c4(e){for(;!C0(e););return e}const Hy=/[\0\t\n\r]/g;function u4(){let e=1,t="",n=!0,s;return a;function a(l,c,d){const f=[];let m,h,x,y,b;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),x=0,t="",n&&(l.charCodeAt(0)===65279&&x++,n=void 0);x<l.length;){if(Hy.lastIndex=x,m=Hy.exec(l),y=m&&m.index!==void 0?m.index:l.length,b=l.charCodeAt(y),!m){t=l.slice(x);break}if(b===10&&x===y&&s)f.push(-3),s=void 0;else switch(s&&(f.push(-5),s=void 0),x<y&&(f.push(l.slice(x,y)),e+=y-x),b){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:s=!0,e=1}x=y+1}return d&&(s&&f.push(-5),t&&f.push(t),f.push(null)),f}}const d4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function f4(e){return e.replace(d4,p4)}function p4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),l=a===120||a===88;return j0(n.slice(l?2:1),l?16:10)}return wh(n)||e}const D0={}.hasOwnProperty;function h4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),m4(n)(c4(l4(n).document().write(u4()(e,t,!0))))}function m4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ue),autolinkProtocol:G,autolinkEmail:G,atxHeading:l(ae),blockQuote:l(we),characterEscape:G,characterReference:G,codeFenced:l(Ye),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(Ye,c),codeText:l(Xe,c),codeTextData:G,data:G,codeFlowValue:G,definition:l(ne),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Y),hardBreakEscape:l(xe),hardBreakTrailing:l(xe),htmlFlow:l(qe,c),htmlFlowData:G,htmlText:l(qe,c),htmlTextData:G,image:l(Oe),label:c,link:l(Ue),listItem:l(Nt),listItemValue:y,listOrdered:l(Ge,x),listUnordered:l(Ge),paragraph:l(Ct),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(ae),strong:l(It),thematicBreak:l(Tt)},exit:{atxHeading:f(),atxHeadingSequence:L,autolink:f(),autolinkEmail:ke,autolinkProtocol:be,blockQuote:f(),characterEscapeValue:re,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:te,characterReference:fe,codeFenced:f(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:C,codeFlowValue:re,codeIndented:f(S),codeText:f(_),codeTextData:re,data:re,definition:f(),definitionDestinationString:A,definitionLabelString:T,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(K),hardBreakTrailing:f(K),htmlFlow:f(q),htmlFlowData:re,htmlText:f(J),htmlTextData:re,image:f(B),label:Z,labelText:U,lineEnding:z,link:f(F),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ge,resourceDestinationString:P,resourceTitleString:M,resource:Q,setextHeading:f(O),setextHeadingLineSequence:D,setextHeadingText:R,strong:f(),thematicBreak:f()}};I0(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(ie){let ce={type:"root",children:[]};const ve={stack:[ce],tokenStack:[],config:t,enter:d,exit:m,buffer:c,resume:h,data:n},oe=[];let Ce=-1;for(;++Ce<ie.length;)if(ie[Ce][1].type==="listOrdered"||ie[Ce][1].type==="listUnordered")if(ie[Ce][0]==="enter")oe.push(Ce);else{const Ae=oe.pop();Ce=a(ie,Ae,Ce)}for(Ce=-1;++Ce<ie.length;){const Ae=t[ie[Ce][0]];D0.call(Ae,ie[Ce][1].type)&&Ae[ie[Ce][1].type].call(Object.assign({sliceSerialize:ie[Ce][2].sliceSerialize},ve),ie[Ce][1])}if(ve.tokenStack.length>0){const Ae=ve.tokenStack[ve.tokenStack.length-1];(Ae[1]||Wy).call(ve,void 0,Ae[0])}for(ce.position={start:js(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:js(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce<t.transforms.length;)ce=t.transforms[Ce](ce)||ce;return ce}function a(ie,ce,ve){let oe=ce-1,Ce=-1,Ae=!1,qt,an,tn,V;for(;++oe<=ve;){const pe=ie[oe];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?Ce++:Ce--,V=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(qt&&!V&&!Ce&&!tn&&(tn=oe),V=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:V=void 0}if(!Ce&&pe[0]==="enter"&&pe[1].type==="listItemPrefix"||Ce===-1&&pe[0]==="exit"&&(pe[1].type==="listUnordered"||pe[1].type==="listOrdered")){if(qt){let Ee=oe;for(an=void 0;Ee--;){const ze=ie[Ee];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;an&&(ie[an][1].type="lineEndingBlank",Ae=!0),ze[1].type="lineEnding",an=Ee}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}tn&&(!an||tn<an)&&(qt._spread=!0),qt.end=Object.assign({},an?ie[an][1].start:pe[1].end),ie.splice(an||oe,0,["exit",qt,pe[2]]),oe++,ve++}if(pe[1].type==="listItemPrefix"){const Ee={type:"listItem",_spread:!1,start:Object.assign({},pe[1].start),end:void 0};qt=Ee,ie.splice(oe,0,["enter",Ee,pe[2]]),oe++,ve++,tn=void 0,V=!0}}}return ie[ce][1]._spread=Ae,ve}function l(ie,ce){return ve;function ve(oe){d.call(this,ie(oe),oe),ce&&ce.call(this,oe)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ie,ce,ve){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([ce,ve||void 0]),ie.position={start:js(ce.start),end:void 0}}function f(ie){return ce;function ce(ve){ie&&ie.call(this,ve),m.call(this,ve)}}function m(ie,ce){const ve=this.stack.pop(),oe=this.tokenStack.pop();if(oe)oe[0].type!==ie.type&&(ce?ce.call(this,ie,oe[0]):(oe[1]||Wy).call(this,ie,oe[0]));else throw new Error("Cannot close `"+ie.type+"` ("+oa({start:ie.start,end:ie.end})+"): it’s not open");ve.position.end=js(ie.end)}function h(){return p3(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function y(ie){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=ie}function C(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=ie}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.value=ie.replace(/(\r?\n|\r)$/g,"")}function T(ie){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ce,ve.identifier=Bo(this.sliceSerialize(ie)).toLowerCase()}function N(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.title=ie}function A(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.url=ie}function L(ie){const ce=this.stack[this.stack.length-1];if(!ce.depth){const ve=this.sliceSerialize(ie).length;ce.depth=ve}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function D(ie){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function G(ie){const ve=this.stack[this.stack.length-1].children;let oe=ve[ve.length-1];(!oe||oe.type!=="text")&&(oe=en(),oe.position={start:js(ie.start),end:void 0},ve.push(oe)),this.stack.push(oe)}function re(ie){const ce=this.stack.pop();ce.value+=this.sliceSerialize(ie),ce.position.end=js(ie.end)}function z(ie){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ce.children[ce.children.length-1];ve.position.end=js(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(G.call(this,ie),re.call(this,ie))}function K(){this.data.atHardBreak=!0}function q(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.value=ie}function J(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.value=ie}function _(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.value=ie}function F(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ce,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function B(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=ce,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function U(ie){const ce=this.sliceSerialize(ie),ve=this.stack[this.stack.length-2];ve.label=f4(ce),ve.identifier=Bo(ce).toLowerCase()}function Z(){const ie=this.stack[this.stack.length-1],ce=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const oe=ie.children;ve.children=oe}else ve.alt=ce}function P(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.url=ie}function M(){const ie=this.resume(),ce=this.stack[this.stack.length-1];ce.title=ie}function Q(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ge(ie){const ce=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ce,ve.identifier=Bo(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Ne(ie){this.data.characterReferenceType=ie.type}function te(ie){const ce=this.sliceSerialize(ie),ve=this.data.characterReferenceType;let oe;ve?(oe=j0(ce,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):oe=wh(ce);const Ce=this.stack[this.stack.length-1];Ce.value+=oe}function fe(ie){const ce=this.stack.pop();ce.position.end=js(ie.end)}function be(ie){re.call(this,ie);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(ie)}function ke(ie){re.call(this,ie);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(ie)}function we(){return{type:"blockquote",children:[]}}function Ye(){return{type:"code",lang:null,meta:null,value:""}}function Xe(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Y(){return{type:"emphasis",children:[]}}function ae(){return{type:"heading",depth:0,children:[]}}function xe(){return{type:"break"}}function qe(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function Ge(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function Nt(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Ct(){return{type:"paragraph",children:[]}}function It(){return{type:"strong",children:[]}}function en(){return{type:"text",value:""}}function Tt(){return{type:"thematicBreak"}}}function js(e){return{line:e.line,column:e.column,offset:e.offset}}function I0(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?I0(e,s):g4(e,s)}}function g4(e,t){let n;for(n in t)if(D0.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function Wy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+oa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+oa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+oa({start:t.start,end:t.end})+") is still open")}function x4(e){const t=this;t.parser=n;function n(s){return h4(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function y4(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 v4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
488
|
+
`}]}function b4(e,t){const n=t.value?t.value+`
|
|
489
|
+
`:"",s={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(s.className=["language-"+a[0]]);let l={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function w4(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function j4(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k4(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),a=ni(s.toLowerCase()),l=e.footnoteOrder.indexOf(s);let c,d=e.footnoteCounts.get(s);d===void 0?(d=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=l+1,d+=1,e.footnoteCounts.set(s,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,f);const m={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,m),e.applyData(t,m)}function S4(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 N4(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function L0(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const a=e.all(t),l=a[0];l&&l.type==="text"?l.value="["+l.value:a.unshift({type:"text",value:"["});const c=a[a.length-1];return c&&c.type==="text"?c.value+=s:a.push({type:"text",value:s}),a}function C4(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return L0(e,t);const a={src:ni(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(a.title=s.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,l),e.applyData(t,l)}function E4(e,t){const n={src:ni(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 s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function P4(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function T4(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return L0(e,t);const a={href:ni(s.url||"")};s.title!==null&&s.title!==void 0&&(a.title=s.title);const l={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function R4(e,t){const n={href:ni(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function A4(e,t,n){const s=e.all(t),a=n?D4(n):O0(t),l={},c=[];if(typeof t.checked=="boolean"){const h=s[0];let x;h&&h.type==="element"&&h.tagName==="p"?x=h:(x={type:"element",tagName:"p",properties:{},children:[]},s.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let d=-1;for(;++d<s.length;){const h=s[d];(a||d!==0||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
490
|
+
`}),h.type==="element"&&h.tagName==="p"&&!a?c.push(...h.children):c.push(h)}const f=s[s.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
|
|
491
|
+
`});const m={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,m),e.applyData(t,m)}function D4(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=O0(n[s])}return t}function O0(e){const t=e.spread;return t??e.children.length>1}function I4(e,t){const n={},s=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<s.length;){const c=s[a];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function L4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function O4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function M4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _4(e,t){const n=e.all(t),s=n.shift(),a=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),a.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=xh(t.children[1]),f=m0(t.children[t.children.length-1]);d&&f&&(c.position={start:d,end:f}),a.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function $4(e,t,n){const s=n?n.children:void 0,l=(s?s.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let f=-1;const m=[];for(;++f<d;){const x=t.children[f],y={},b=c?c[f]:void 0;b&&(y.align=b);let C={type:"element",tagName:l,properties:y,children:[]};x&&(C.children=e.all(x),e.patch(x,C),C=e.applyData(x,C)),m.push(C)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,h),e.applyData(t,h)}function F4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Vy=9,qy=32;function z4(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),a=0;const l=[];for(;s;)l.push(Ky(t.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=n.exec(t);return l.push(Ky(t.slice(a),a>0,!1)),l.join("")}function Ky(e,t,n){let s=0,a=e.length;if(t){let l=e.codePointAt(s);for(;l===Vy||l===qy;)s++,l=e.codePointAt(s)}if(n){let l=e.codePointAt(a-1);for(;l===Vy||l===qy;)a--,l=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function B4(e,t){const n={type:"text",value:z4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function U4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const H4={blockquote:y4,break:v4,code:b4,delete:w4,emphasis:j4,footnoteReference:k4,heading:S4,html:N4,imageReference:C4,image:E4,inlineCode:P4,linkReference:T4,link:R4,listItem:A4,list:I4,paragraph:L4,root:O4,strong:M4,table:_4,tableCell:F4,tableRow:$4,text:B4,thematicBreak:U4,toml:Ql,yaml:Ql,definition:Ql,footnoteDefinition:Ql};function Ql(){}const M0=-1,Kc=0,aa=1,wc=2,Sh=3,Nh=4,Ch=5,Eh=6,_0=7,$0=8,Gy=typeof self=="object"?self:globalThis,W4=(e,t)=>{const n=(a,l)=>(e.set(l,a),a),s=a=>{if(e.has(a))return e.get(a);const[l,c]=t[a];switch(l){case Kc:case M0:return n(c,a);case aa:{const d=n([],a);for(const f of c)d.push(s(f));return d}case wc:{const d=n({},a);for(const[f,m]of c)d[s(f)]=s(m);return d}case Sh:return n(new Date(c),a);case Nh:{const{source:d,flags:f}=c;return n(new RegExp(d,f),a)}case Ch:{const d=n(new Map,a);for(const[f,m]of c)d.set(s(f),s(m));return d}case Eh:{const d=n(new Set,a);for(const f of c)d.add(s(f));return d}case _0:{const{name:d,message:f}=c;return n(new Gy[d](f),a)}case $0:return n(BigInt(c),a);case"BigInt":return n(Object(BigInt(c)),a);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new Gy[l](c),a)};return s},Yy=e=>W4(new Map,e)(0),Lo="",{toString:V4}={},{keys:q4}=Object,Zi=e=>{const t=typeof e;if(t!=="object"||!e)return[Kc,t];const n=V4.call(e).slice(8,-1);switch(n){case"Array":return[aa,Lo];case"Object":return[wc,Lo];case"Date":return[Sh,Lo];case"RegExp":return[Nh,Lo];case"Map":return[Ch,Lo];case"Set":return[Eh,Lo];case"DataView":return[aa,n]}return n.includes("Array")?[aa,n]:n.includes("Error")?[_0,n]:[wc,n]},Jl=([e,t])=>e===Kc&&(t==="function"||t==="symbol"),K4=(e,t,n,s)=>{const a=(c,d)=>{const f=s.push(c)-1;return n.set(d,f),f},l=c=>{if(n.has(c))return n.get(c);let[d,f]=Zi(c);switch(d){case Kc:{let h=c;switch(f){case"bigint":d=$0,h=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return a([M0],c)}return a([d,h],c)}case aa:{if(f){let y=c;return f==="DataView"?y=new Uint8Array(c.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(c)),a([f,[...y]],c)}const h=[],x=a([d,h],c);for(const y of c)h.push(l(y));return x}case wc:{if(f)switch(f){case"BigInt":return a([f,c.toString()],c);case"Boolean":case"Number":case"String":return a([f,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const h=[],x=a([d,h],c);for(const y of q4(c))(e||!Jl(Zi(c[y])))&&h.push([l(y),l(c[y])]);return x}case Sh:return a([d,c.toISOString()],c);case Nh:{const{source:h,flags:x}=c;return a([d,{source:h,flags:x}],c)}case Ch:{const h=[],x=a([d,h],c);for(const[y,b]of c)(e||!(Jl(Zi(y))||Jl(Zi(b))))&&h.push([l(y),l(b)]);return x}case Eh:{const h=[],x=a([d,h],c);for(const y of c)(e||!Jl(Zi(y)))&&h.push(l(y));return x}}const{message:m}=c;return a([d,{name:f,message:m}],c)};return l},Xy=(e,{json:t,lossy:n}={})=>{const s=[];return K4(!(t||n),!!t,new Map,s)(e),s},jc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Yy(Xy(e,t)):structuredClone(e):(e,t)=>Yy(Xy(e,t));function G4(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 Y4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function X4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||G4,s=e.options.footnoteBackLabel||Y4,a=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[f]);if(!m)continue;const h=e.all(m),x=String(m.identifier).toUpperCase(),y=ni(x.toLowerCase());let b=0;const C=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){C.length>0&&C.push({type:"text",value:" "});let T=typeof n=="string"?n:n(f,b);typeof T=="string"&&(T={type:"text",value:T}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(f,b),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const j=h[h.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const T=j.children[j.children.length-1];T&&T.type==="text"?T.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...C)}else h.push(...C);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(h,!0)};e.patch(m,S),d.push(S)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...jc(c),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
492
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
493
|
+
`}]}}const F0=(function(e){if(e==null)return eD;if(typeof e=="function")return Gc(e);if(typeof e=="object")return Array.isArray(e)?Q4(e):J4(e);if(typeof e=="string")return Z4(e);throw new Error("Expected function, string, or object as test")});function Q4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=F0(e[n]);return Gc(s);function s(...a){let l=-1;for(;++l<t.length;)if(t[l].apply(this,a))return!0;return!1}}function J4(e){const t=e;return Gc(n);function n(s){const a=s;let l;for(l in e)if(a[l]!==t[l])return!1;return!0}}function Z4(e){return Gc(t);function t(n){return n&&n.type===e}}function Gc(e){return t;function t(n,s,a){return!!(tD(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function eD(){return!0}function tD(e){return e!==null&&typeof e=="object"&&"type"in e}const z0=[],nD=!0,Qy=!1,rD="skip";function sD(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const l=F0(a),c=s?-1:1;d(e,void 0,[])();function d(f,m,h){const x=f&&typeof f=="object"?f:{};if(typeof x.type=="string"){const b=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return y;function y(){let b=z0,C,k,j;if((!t||l(f,m,h[h.length-1]||void 0))&&(b=oD(n(f,h)),b[0]===Qy))return b;if("children"in f&&f.children){const S=f;if(S.children&&b[0]!==rD)for(k=(s?S.children.length:-1)+c,j=h.concat(S);k>-1&&k<S.children.length;){const T=S.children[k];if(C=d(T,k,j)(),C[0]===Qy)return C;k=typeof C[1]=="number"?C[1]:k+c}}return b}}}function oD(e){return Array.isArray(e)?e:typeof e=="number"?[nD,e]:e==null?z0:[e]}function B0(e,t,n,s){let a,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,a=n):(l=t,c=n,a=s),sD(e,l,d,a);function d(f,m){const h=m[m.length-1],x=h?h.children.indexOf(f):void 0;return c(f,x,h)}}const fp={}.hasOwnProperty,iD={};function aD(e,t){const n=t||iD,s=new Map,a=new Map,l=new Map,c={...H4,...n.handlers},d={all:m,applyData:cD,definitionById:s,footnoteById:a,footnoteCounts:l,footnoteOrder:[],handlers:c,one:f,options:n,patch:lD,wrap:dD};return B0(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const x=h.type==="definition"?s:a,y=String(h.identifier).toUpperCase();x.has(y)||x.set(y,h)}}),d;function f(h,x){const y=h.type,b=d.handlers[y];if(fp.call(d.handlers,y)&&b)return b(d,h,x);if(d.options.passThrough&&d.options.passThrough.includes(y)){if("children"in h){const{children:k,...j}=h,S=jc(j);return S.children=d.all(h),S}return jc(h)}return(d.options.unknownHandler||uD)(d,h,x)}function m(h){const x=[];if("children"in h){const y=h.children;let b=-1;for(;++b<y.length;){const C=d.one(y[b],h);if(C){if(b&&y[b-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Jy(C.value)),!Array.isArray(C)&&C.type==="element")){const k=C.children[0];k&&k.type==="text"&&(k.value=Jy(k.value))}Array.isArray(C)?x.push(...C):x.push(C)}}}return x}}function lD(e,t){e.position&&(t.position=VR(e))}function cD(e,t){let n=t;if(e&&e.data){const s=e.data.hName,a=e.data.hChildren,l=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const c="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,jc(l)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function uD(e,t){const n=t.data||{},s="value"in t&&!(fp.call(n,"hProperties")||fp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function dD(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
494
|
+
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
495
|
+
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
496
|
+
`}),n}function Jy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zy(e,t){const n=aD(e,t),s=n.one(e,void 0),a=X4(n),l=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&l.children.push({type:"text",value:`
|
|
497
|
+
`},a),l}function fD(e,t){return e&&"run"in e?async function(n,s){const a=Zy(n,{file:s,...t});await e.run(a,s)}:function(n,s){return Zy(n,{file:s,...e||t})}}function ev(e){if(e)throw e}var bf,tv;function pD(){if(tv)return bf;tv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},l=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var h=e.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!h&&!x)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},c=function(m,h){n&&h.name==="__proto__"?n(m,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):m[h.name]=h.newValue},d=function(m,h){if(h==="__proto__")if(e.call(m,h)){if(s)return s(m,h).value}else return;return m[h]};return bf=function f(){var m,h,x,y,b,C,k=arguments[0],j=1,S=arguments.length,T=!1;for(typeof k=="boolean"&&(T=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<S;++j)if(m=arguments[j],m!=null)for(h in m)x=d(k,h),y=d(m,h),k!==y&&(T&&y&&(l(y)||(b=a(y)))?(b?(b=!1,C=x&&a(x)?x:[]):C=x&&l(x)?x:{},c(k,{name:h,newValue:f(T,C,y)})):typeof y<"u"&&c(k,{name:h,newValue:y}));return k},bf}var hD=pD();const wf=Dc(hD);function pp(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 mD(){const e=[],t={run:n,use:s};return t;function n(...a){let l=-1;const c=a.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...a);function d(f,...m){const h=e[++l];let x=-1;if(f){c(f);return}for(;++x<a.length;)(m[x]===null||m[x]===void 0)&&(m[x]=a[x]);a=m,h?gD(h,d)(...m):c(null,...m)}}function s(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function gD(e,t){let n;return s;function s(...c){const d=e.length>c.length;let f;d&&c.push(a);try{f=e.apply(this,c)}catch(m){const h=m;if(d&&n)throw h;return a(h)}d||(f&&f.then&&typeof f.then=="function"?f.then(l,a):f instanceof Error?a(f):l(f))}function a(c,...d){n||(n=!0,t(c,...d))}function l(c){a(null,c)}}const Sr={basename:xD,dirname:yD,extname:vD,join:bD,sep:"/"};function xD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Da(e);let n=0,s=-1,a=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(l){n=a+1;break}}else s<0&&(l=!0,s=a+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let c=-1,d=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(l){n=a+1;break}}else c<0&&(l=!0,c=a+1),d>-1&&(e.codePointAt(a)===t.codePointAt(d--)?d<0&&(s=a):(d=-1,s=c));return n===s?s=c:s<0&&(s=e.length),e.slice(n,s)}function yD(e){if(Da(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function vD(e){Da(e);let t=e.length,n=-1,s=0,a=-1,l=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){s=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?a<0?a=t:l!==1&&(l=1):a>-1&&(l=-1)}return a<0||n<0||l===0||l===1&&a===n-1&&a===s+1?"":e.slice(a,n)}function bD(...e){let t=-1,n;for(;++t<e.length;)Da(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":wD(n)}function wD(e){Da(e);const t=e.codePointAt(0)===47;let n=jD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function jD(e,t){let n="",s=0,a=-1,l=0,c=-1,d,f;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(a===c-1||l===1))if(a!==c-1&&l===2){if(n.length<2||s!==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="",s=0):(n=n.slice(0,f),s=n.length-1-n.lastIndexOf("/")),a=c,l=0;continue}}else if(n.length>0){n="",s=0,a=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(a+1,c):n=e.slice(a+1,c),s=c-a-1;a=c,l=0}else d===46&&l>-1?l++:l=-1}return n}function Da(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const kD={cwd:SD};function SD(){return"/"}function hp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ND(e){if(typeof e=="string")e=new URL(e);else if(!hp(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 CD(e)}function CD(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const jf=["history","path","basename","stem","extname","dirname"];class U0{constructor(t){let n;t?hp(t)?n={path:t}:typeof t=="string"||ED(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":kD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<jf.length;){const l=jf[s];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let a;for(a in n)jf.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Sr.basename(this.path):void 0}set basename(t){Sf(t,"basename"),kf(t,"basename"),this.path=Sr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Sr.dirname(this.path):void 0}set dirname(t){nv(this.basename,"dirname"),this.path=Sr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Sr.extname(this.path):void 0}set extname(t){if(kf(t,"extname"),nv(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=Sr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){hp(t)&&(t=ND(t)),Sf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Sr.basename(this.path,this.extname):void 0}set stem(t){Sf(t,"stem"),kf(t,"stem"),this.path=Sr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const a=this.message(t,n,s);throw a.fatal=!0,a}info(t,n,s){const a=this.message(t,n,s);return a.fatal=void 0,a}message(t,n,s){const a=new gn(t,n,s);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function kf(e,t){if(e&&e.includes(Sr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Sr.sep+"`")}function Sf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function nv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ED(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const PD=(function(e){const s=this.constructor.prototype,a=s[e],l=function(){return a.apply(l,arguments)};return Object.setPrototypeOf(l,s),l}),TD={}.hasOwnProperty;class Ph extends PD{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=mD()}copy(){const t=new Ph;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(wf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ef("data",this.frozen),this.namespace[t]=n,this):TD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ef("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,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const a=n.call(t,...s);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Zl(t),s=this.parser||this.Parser;return Nf("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),Nf("process",this.parser||this.Parser),Cf("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(l,c){const d=Zl(t),f=s.parse(d);s.run(f,d,function(h,x,y){if(h||!x||!y)return m(h);const b=x,C=s.stringify(b,y);DD(C)?y.value=C:y.result=C,m(h,y)});function m(h,x){h||!x?c(h):l?l(x):n(void 0,x)}}}processSync(t){let n=!1,s;return this.freeze(),Nf("processSync",this.parser||this.Parser),Cf("processSync",this.compiler||this.Compiler),this.process(t,a),sv("processSync","process",n),s;function a(l,c){n=!0,ev(l),s=c}}run(t,n,s){rv(t),this.freeze();const a=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?l(void 0,s):new Promise(l);function l(c,d){const f=Zl(n);a.run(t,f,m);function m(h,x,y){const b=x||t;h?d(h):c?c(b):s(void 0,b,y)}}}runSync(t,n){let s=!1,a;return this.run(t,n,l),sv("runSync","run",s),a;function l(c,d){ev(c),a=d,s=!0}}stringify(t,n){this.freeze();const s=Zl(n),a=this.compiler||this.Compiler;return Cf("stringify",a),rv(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(Ef("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(m){if(typeof m=="function")f(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[h,...x]=m;f(h,x)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");d(m.plugins),m.settings&&(a.settings=wf(!0,a.settings,m.settings))}function d(m){let h=-1;if(m!=null)if(Array.isArray(m))for(;++h<m.length;){const x=m[h];l(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function f(m,h){let x=-1,y=-1;for(;++x<s.length;)if(s[x][0]===m){y=x;break}if(y===-1)s.push([m,...h]);else if(h.length>0){let[b,...C]=h;const k=s[y][1];pp(k)&&pp(b)&&(b=wf(!0,k,b)),s[y]=[m,b,...C]}}}}const RD=new Ph().freeze();function Nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ef(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 rv(e){if(!pp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zl(e){return AD(e)?e:new U0(e)}function AD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function DD(e){return typeof e=="string"||ID(e)}function ID(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const LD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ov=[],iv={allowDangerousHtml:!0},OD=/^(https?|ircs?|mailto|xmpp)$/i,MD=[{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:"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 _D(e){const t=$D(e),n=FD(e);return zD(t.runSync(t.parse(n),n),e)}function $D(e){const t=e.rehypePlugins||ov,n=e.remarkPlugins||ov,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...iv}:iv;return RD().use(x4).use(n).use(fD,s).use(t)}function FD(e){const t=e.children||"",n=new U0;return typeof t=="string"&&(n.value=t),n}function zD(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,l=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||BD;for(const h of MD)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+LD+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),B0(e,m),XR(e,{Fragment:o.Fragment,components:a,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function m(h,x,y){if(h.type==="raw"&&y&&typeof x=="number")return c?y.children.splice(x,1):y.children[x]={type:"text",value:h.value},x;if(h.type==="element"){let b;for(b in xf)if(Object.hasOwn(xf,b)&&Object.hasOwn(h.properties,b)){const C=h.properties[b],k=xf[b];(k===null||k.includes(h.tagName))&&(h.properties[b]=f(String(C||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):l?l.includes(h.tagName):!1;if(!b&&s&&typeof x=="number"&&(b=!s(h,x,y)),b&&y&&typeof x=="number")return d&&h.children?y.children.splice(x,1,...h.children):y.children.splice(x,1),x}}}function BD(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||s!==-1&&t>s||OD.test(e.slice(0,t))?e:""}function Mt({content:e,className:t,emptyState:n="No markdown content yet."}){const s=e.replace(/<!--[\s\S]*?-->/g,"");return s.trim()?o.jsx("div",{className:Be("prose-syntaur max-w-none",t),children:o.jsx(_D,{children:s})}):o.jsx("div",{className:"rounded-md border border-dashed border-border/80 bg-muted/30 px-3 py-4 text-sm text-muted-foreground",children:n})}function UD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>s=>{t.forEach(a=>a(s))},t)}const Yc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ri(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Th(e){return"nodeType"in e}function In(e){var t,n;return e?ri(e)?e:Th(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Rh(e){const{Document:t}=In(e);return e instanceof t}function Ia(e){return ri(e)?!1:e instanceof In(e).HTMLElement}function H0(e){return e instanceof In(e).SVGElement}function si(e){return e?ri(e)?e.document:Th(e)?Rh(e)?e:Ia(e)||H0(e)?e.ownerDocument:document:document:document}const Ir=Yc?g.useLayoutEffect:g.useEffect;function Ah(e){const t=g.useRef(e);return Ir(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return t.current==null?void 0:t.current(...s)},[])}function HD(){const e=g.useRef(null),t=g.useCallback((s,a)=>{e.current=setInterval(s,a)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ba(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Ir(()=>{n.current!==e&&(n.current=e)},t),n}function La(e,t){const n=g.useRef();return g.useMemo(()=>{const s=e(n.current);return n.current=s,s},[...t])}function kc(e){const t=Ah(e),n=g.useRef(null),s=g.useCallback(a=>{a!==n.current&&(t==null||t(a,n.current)),n.current=a},[]);return[n,s]}function mp(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let Pf={};function Oa(e,t){return g.useMemo(()=>{if(t)return t;const n=Pf[e]==null?0:Pf[e]+1;return Pf[e]=n,e+"-"+n},[e,t])}function W0(e){return function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];return s.reduce((l,c)=>{const d=Object.entries(c);for(const[f,m]of d){const h=l[f];h!=null&&(l[f]=h+e*m)}return l},{...t})}}const Uo=W0(1),Sc=W0(-1);function WD(e){return"clientX"in e&&"clientY"in e}function Dh(e){if(!e)return!1;const{KeyboardEvent:t}=In(e.target);return t&&e instanceof t}function VD(e){if(!e)return!1;const{TouchEvent:t}=In(e.target);return t&&e instanceof t}function gp(e){if(VD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return WD(e)?{x:e.clientX,y:e.clientY}:null}const qo=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[qo.Translate.toString(e),qo.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:s}=e;return t+" "+n+"ms "+s}}}),av="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function qD(e){return e.matches(av)?e:e.querySelector(av)}const KD={display:"none"};function GD(e){let{id:t,value:n}=e;return Pt.createElement("div",{id:t,style:KD},n)}function YD(e){let{id:t,announcement:n,ariaLiveType:s="assertive"}=e;const a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Pt.createElement("div",{id:t,style:a,role:"status","aria-live":s,"aria-atomic":!0},n)}function XD(){const[e,t]=g.useState("");return{announce:g.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const V0=g.createContext(null);function QD(e){const t=g.useContext(V0);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function JD(){const[e]=g.useState(()=>new Set),t=g.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[g.useCallback(s=>{let{type:a,event:l}=s;e.forEach(c=>{var d;return(d=c[a])==null?void 0:d.call(c,l)})},[e]),t]}const ZD={draggable:`
|
|
498
|
+
To pick up a draggable item, press the space bar.
|
|
499
|
+
While dragging, use the arrow keys to move the item.
|
|
500
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
501
|
+
`},eI={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function tI(e){let{announcements:t=eI,container:n,hiddenTextDescribedById:s,screenReaderInstructions:a=ZD}=e;const{announce:l,announcement:c}=XD(),d=Oa("DndLiveRegion"),[f,m]=g.useState(!1);if(g.useEffect(()=>{m(!0)},[]),QD(g.useMemo(()=>({onDragStart(x){let{active:y}=x;l(t.onDragStart({active:y}))},onDragMove(x){let{active:y,over:b}=x;t.onDragMove&&l(t.onDragMove({active:y,over:b}))},onDragOver(x){let{active:y,over:b}=x;l(t.onDragOver({active:y,over:b}))},onDragEnd(x){let{active:y,over:b}=x;l(t.onDragEnd({active:y,over:b}))},onDragCancel(x){let{active:y,over:b}=x;l(t.onDragCancel({active:y,over:b}))}}),[l,t])),!f)return null;const h=Pt.createElement(Pt.Fragment,null,Pt.createElement(GD,{id:s,value:a.draggable}),Pt.createElement(YD,{id:d,announcement:c}));return n?Cs.createPortal(h,n):h}var Ut;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ut||(Ut={}));function Nc(){}function Cc(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function q0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const pr=Object.freeze({x:0,y:0});function nI(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function rI(e,t){let{data:{value:n}}=e,{data:{value:s}}=t;return n-s}function sI(e,t){let{data:{value:n}}=e,{data:{value:s}}=t;return s-n}function oI(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function lv(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const K0=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:s}=e;const a=lv(t,t.left,t.top),l=[];for(const c of s){const{id:d}=c,f=n.get(d);if(f){const m=nI(lv(f),a);l.push({id:d,data:{droppableContainer:c,value:m}})}}return l.sort(rI)};function iI(e,t){const n=Math.max(t.top,e.top),s=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),c=a-s,d=l-n;if(s<a&&n<l){const f=t.width*t.height,m=e.width*e.height,h=c*d,x=h/(f+m-h);return Number(x.toFixed(4))}return 0}const aI=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:s}=e;const a=[];for(const l of s){const{id:c}=l,d=n.get(c);if(d){const f=iI(d,t);f>0&&a.push({id:c,data:{droppableContainer:l,value:f}})}}return a.sort(sI)};function lI(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function G0(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pr}function cI(e){return function(n){for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];return a.reduce((c,d)=>({...c,top:c.top+e*d.y,bottom:c.bottom+e*d.y,left:c.left+e*d.x,right:c.right+e*d.x}),{...n})}}const uI=cI(1);function dI(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function fI(e,t,n){const s=dI(t);if(!s)return e;const{scaleX:a,scaleY:l,x:c,y:d}=s,f=e.left-c-(1-a)*parseFloat(n),m=e.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),h=a?e.width/a:e.width,x=l?e.height/l:e.height;return{width:h,height:x,top:m,right:f+h,bottom:m+x,left:f}}const pI={ignoreTransform:!1};function oi(e,t){t===void 0&&(t=pI);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:m,transformOrigin:h}=In(e).getComputedStyle(e);m&&(n=fI(n,m,h))}const{top:s,left:a,width:l,height:c,bottom:d,right:f}=n;return{top:s,left:a,width:l,height:c,bottom:d,right:f}}function cv(e){return oi(e,{ignoreTransform:!0})}function hI(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function mI(e,t){return t===void 0&&(t=In(e).getComputedStyle(e)),t.position==="fixed"}function gI(e,t){t===void 0&&(t=In(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(a=>{const l=t[a];return typeof l=="string"?n.test(l):!1})}function Ih(e,t){const n=[];function s(a){if(t!=null&&n.length>=t||!a)return n;if(Rh(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!Ia(a)||H0(a)||n.includes(a))return n;const l=In(e).getComputedStyle(a);return a!==e&&gI(a,l)&&n.push(a),mI(a,l)?n:s(a.parentNode)}return e?s(e):n}function Y0(e){const[t]=Ih(e,1);return t??null}function Tf(e){return!Yc||!e?null:ri(e)?e:Th(e)?Rh(e)||e===si(e).scrollingElement?window:Ia(e)?e:null:null}function X0(e){return ri(e)?e.scrollX:e.scrollLeft}function Q0(e){return ri(e)?e.scrollY:e.scrollTop}function xp(e){return{x:X0(e),y:Q0(e)}}var Jt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Jt||(Jt={}));function J0(e){return!Yc||!e?!1:e===document.scrollingElement}function Z0(e){const t={x:0,y:0},n=J0(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},a=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,c=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:a,isLeft:l,isBottom:c,isRight:d,maxScroll:s,minScroll:t}}const xI={x:.2,y:.2};function yI(e,t,n,s,a){let{top:l,left:c,right:d,bottom:f}=n;s===void 0&&(s=10),a===void 0&&(a=xI);const{isTop:m,isBottom:h,isLeft:x,isRight:y}=Z0(e),b={x:0,y:0},C={x:0,y:0},k={height:t.height*a.y,width:t.width*a.x};return!m&&l<=t.top+k.height?(b.y=Jt.Backward,C.y=s*Math.abs((t.top+k.height-l)/k.height)):!h&&f>=t.bottom-k.height&&(b.y=Jt.Forward,C.y=s*Math.abs((t.bottom-k.height-f)/k.height)),!y&&d>=t.right-k.width?(b.x=Jt.Forward,C.x=s*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Jt.Backward,C.x=s*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:C}}function vI(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,height:c}}const{top:t,left:n,right:s,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:s,bottom:a,width:e.clientWidth,height:e.clientHeight}}function ej(e){return e.reduce((t,n)=>Uo(t,xp(n)),pr)}function bI(e){return e.reduce((t,n)=>t+X0(n),0)}function wI(e){return e.reduce((t,n)=>t+Q0(n),0)}function jI(e,t){if(t===void 0&&(t=oi),!e)return;const{top:n,left:s,bottom:a,right:l}=t(e);Y0(e)&&(a<=0||l<=0||n>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const kI=[["x",["left","right"],bI],["y",["top","bottom"],wI]];class Lh{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Ih(n),a=ej(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,c,d]of kI)for(const f of c)Object.defineProperty(this,f,{get:()=>{const m=d(s),h=a[l]-m;return this.rect[f]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class la{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...n)})},this.target=t}add(t,n,s){var a;(a=this.target)==null||a.addEventListener(t,n,s),this.listeners.push([t,n,s])}}function SI(e){const{EventTarget:t}=In(e);return e instanceof t?e:si(e)}function Rf(e,t){const n=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+s**2)>t:"x"in t&&"y"in t?n>t.x&&s>t.y:"x"in t?n>t.x:"y"in t?s>t.y:!1}var Jn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Jn||(Jn={}));function uv(e){e.preventDefault()}function NI(e){e.stopPropagation()}var tt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(tt||(tt={}));const tj={start:[tt.Space,tt.Enter],cancel:[tt.Esc],end:[tt.Space,tt.Enter,tt.Tab]},CI=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case tt.Right:return{...n,x:n.x+25};case tt.Left:return{...n,x:n.x-25};case tt.Down:return{...n,y:n.y+25};case tt.Up:return{...n,y:n.y-25}}};class Xc{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new la(si(n)),this.windowListeners=new la(In(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Jn.Resize,this.handleCancel),this.windowListeners.add(Jn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Jn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,s=t.node.current;s&&jI(s),n(pr)}handleKeyDown(t){if(Dh(t)){const{active:n,context:s,options:a}=this.props,{keyboardCodes:l=tj,coordinateGetter:c=CI,scrollBehavior:d="smooth"}=a,{code:f}=t;if(l.end.includes(f)){this.handleEnd(t);return}if(l.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:m}=s.current,h=m?{x:m.left,y:m.top}:pr;this.referenceCoordinates||(this.referenceCoordinates=h);const x=c(t,{active:n,context:s.current,currentCoordinates:h});if(x){const y=Sc(x,h),b={x:0,y:0},{scrollableAncestors:C}=s.current;for(const k of C){const j=t.code,{isTop:S,isRight:T,isLeft:N,isBottom:A,maxScroll:L,minScroll:R}=Z0(k),D=vI(k),O={x:Math.min(j===tt.Right?D.right-D.width/2:D.right,Math.max(j===tt.Right?D.left:D.left+D.width/2,x.x)),y:Math.min(j===tt.Down?D.bottom-D.height/2:D.bottom,Math.max(j===tt.Down?D.top:D.top+D.height/2,x.y))},G=j===tt.Right&&!T||j===tt.Left&&!N,re=j===tt.Down&&!A||j===tt.Up&&!S;if(G&&O.x!==x.x){const z=k.scrollLeft+y.x,K=j===tt.Right&&z<=L.x||j===tt.Left&&z>=R.x;if(K&&!y.y){k.scrollTo({left:z,behavior:d});return}K?b.x=k.scrollLeft-z:b.x=j===tt.Right?k.scrollLeft-L.x:k.scrollLeft-R.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(re&&O.y!==x.y){const z=k.scrollTop+y.y,K=j===tt.Down&&z<=L.y||j===tt.Up&&z>=R.y;if(K&&!y.x){k.scrollTo({top:z,behavior:d});return}K?b.y=k.scrollTop-z:b.y=j===tt.Down?k.scrollTop-L.y:k.scrollTop-R.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,Uo(Sc(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:s}=this.props;t.preventDefault(),s(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Xc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:s=tj,onActivation:a}=t,{active:l}=n;const{code:c}=e.nativeEvent;if(s.start.includes(c)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),a==null||a({event:e.nativeEvent}),!0)}return!1}}];function dv(e){return!!(e&&"distance"in e)}function fv(e){return!!(e&&"delay"in e)}class Oh{constructor(t,n,s){var a;s===void 0&&(s=SI(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:c}=l;this.props=t,this.events=n,this.document=si(c),this.documentListeners=new la(this.document),this.listeners=new la(s),this.windowListeners=new la(In(c)),this.initialCoordinates=(a=gp(l))!=null?a:pr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Jn.Resize,this.handleCancel),this.windowListeners.add(Jn.DragStart,uv),this.windowListeners.add(Jn.VisibilityChange,this.handleCancel),this.windowListeners.add(Jn.ContextMenu,uv),this.documentListeners.add(Jn.Keydown,this.handleKeydown),n){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(fv(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(dv(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:s,onPending:a}=this.props;a(s,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Jn.Click,NI,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Jn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:s,initialCoordinates:a,props:l}=this,{onMove:c,options:{activationConstraint:d}}=l;if(!a)return;const f=(n=gp(t))!=null?n:pr,m=Sc(a,f);if(!s&&d){if(dv(d)){if(d.tolerance!=null&&Rf(m,d.tolerance))return this.handleCancel();if(Rf(m,d.distance))return this.handleStart()}if(fv(d)&&Rf(m,d.tolerance))return this.handleCancel();this.handlePending(d,m);return}t.cancelable&&t.preventDefault(),c(f)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===tt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const EI={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Qc extends Oh{constructor(t){const{event:n}=t,s=si(n.target);super(t,EI,s)}}Qc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;return!n.isPrimary||n.button!==0?!1:(s==null||s({event:n}),!0)}}];const PI={move:{name:"mousemove"},end:{name:"mouseup"}};var yp;(function(e){e[e.RightClick=2]="RightClick"})(yp||(yp={}));class TI extends Oh{constructor(t){super(t,PI,si(t.event.target))}}TI.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;return n.button===yp.RightClick?!1:(s==null||s({event:n}),!0)}}];const Af={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class RI extends Oh{constructor(t){super(t,Af)}static setup(){return window.addEventListener(Af.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Af.move.name,t)};function t(){}}}RI.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:s}=t;const{touches:a}=n;return a.length>1?!1:(s==null||s({event:n}),!0)}}];var ca;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ca||(ca={}));var Ec;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ec||(Ec={}));function AI(e){let{acceleration:t,activator:n=ca.Pointer,canScroll:s,draggingRect:a,enabled:l,interval:c=5,order:d=Ec.TreeOrder,pointerCoordinates:f,scrollableAncestors:m,scrollableAncestorRects:h,delta:x,threshold:y}=e;const b=II({delta:x,disabled:!l}),[C,k]=HD(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),T=g.useMemo(()=>{switch(n){case ca.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case ca.DraggableRect:return a}},[n,a,f]),N=g.useRef(null),A=g.useCallback(()=>{const R=N.current;if(!R)return;const D=j.current.x*S.current.x,O=j.current.y*S.current.y;R.scrollBy(D,O)},[]),L=g.useMemo(()=>d===Ec.TreeOrder?[...m].reverse():m,[d,m]);g.useEffect(()=>{if(!l||!m.length||!T){k();return}for(const R of L){if((s==null?void 0:s(R))===!1)continue;const D=m.indexOf(R),O=h[D];if(!O)continue;const{direction:G,speed:re}=yI(R,O,T,t,y);for(const z of["x","y"])b[z][G[z]]||(re[z]=0,G[z]=0);if(re.x>0||re.y>0){k(),N.current=R,C(A,c),j.current=re,S.current=G;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,A,s,k,l,c,JSON.stringify(T),JSON.stringify(b),C,m,L,h,JSON.stringify(y)])}const DI={x:{[Jt.Backward]:!1,[Jt.Forward]:!1},y:{[Jt.Backward]:!1,[Jt.Forward]:!1}};function II(e){let{delta:t,disabled:n}=e;const s=mp(t);return La(a=>{if(n||!s||!a)return DI;const l={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[Jt.Backward]:a.x[Jt.Backward]||l.x===-1,[Jt.Forward]:a.x[Jt.Forward]||l.x===1},y:{[Jt.Backward]:a.y[Jt.Backward]||l.y===-1,[Jt.Forward]:a.y[Jt.Forward]||l.y===1}}},[n,t,s])}function LI(e,t){const n=t!=null?e.get(t):void 0,s=n?n.node.current:null;return La(a=>{var l;return t==null?null:(l=s??a)!=null?l:null},[s,t])}function OI(e,t){return g.useMemo(()=>e.reduce((n,s)=>{const{sensor:a}=s,l=a.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,s)}));return[...n,...l]},[]),[e,t])}var wa;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(wa||(wa={}));var vp;(function(e){e.Optimized="optimized"})(vp||(vp={}));const pv=new Map;function MI(e,t){let{dragging:n,dependencies:s,config:a}=t;const[l,c]=g.useState(null),{frequency:d,measure:f,strategy:m}=a,h=g.useRef(e),x=j(),y=ba(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!y.current&&c(T=>T===null?S:T.concat(S.filter(N=>!T.includes(N))))},[y]),C=g.useRef(null),k=La(S=>{if(x&&!n)return pv;if(!S||S===pv||h.current!==e||l!=null){const T=new Map;for(let N of e){if(!N)continue;if(l&&l.length>0&&!l.includes(N.id)&&N.rect.current){T.set(N.id,N.rect.current);continue}const A=N.node.current,L=A?new Lh(f(A),A):null;N.rect.current=L,L&&T.set(N.id,L)}return T}return S},[e,l,n,x,f]);return g.useEffect(()=>{h.current=e},[e]),g.useEffect(()=>{x||b()},[n,x]),g.useEffect(()=>{l&&l.length>0&&c(null)},[JSON.stringify(l)]),g.useEffect(()=>{x||typeof d!="number"||C.current!==null||(C.current=setTimeout(()=>{b(),C.current=null},d))},[d,x,b,...s]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:l!=null};function j(){switch(m){case wa.Always:return!1;case wa.BeforeDragging:return n;default:return!n}}}function nj(e,t){return La(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function _I(e,t){return nj(e,t)}function $I(e){let{callback:t,disabled:n}=e;const s=Ah(t),a=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(s)},[s,n]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Jc(e){let{callback:t,disabled:n}=e;const s=Ah(t),a=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(s)},[n]);return g.useEffect(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function FI(e){return new Lh(oi(e),e)}function hv(e,t,n){t===void 0&&(t=FI);const[s,a]=g.useState(null);function l(){a(f=>{if(!e)return null;if(e.isConnected===!1){var m;return(m=f??n)!=null?m:null}const h=t(e);return JSON.stringify(f)===JSON.stringify(h)?f:h})}const c=$I({callback(f){if(e)for(const m of f){const{type:h,target:x}=m;if(h==="childList"&&x instanceof HTMLElement&&x.contains(e)){l();break}}}}),d=Jc({callback:l});return Ir(()=>{l(),e?(d==null||d.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(d==null||d.disconnect(),c==null||c.disconnect())},[e]),s}function zI(e){const t=nj(e);return G0(e,t)}const mv=[];function BI(e){const t=g.useRef(e),n=La(s=>e?s&&s!==mv&&e&&t.current&&e.parentNode===t.current.parentNode?s:Ih(e):mv,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function UI(e){const[t,n]=g.useState(null),s=g.useRef(e),a=g.useCallback(l=>{const c=Tf(l.target);c&&n(d=>d?(d.set(c,xp(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=s.current;if(e!==l){c(l);const d=e.map(f=>{const m=Tf(f);return m?(m.addEventListener("scroll",a,{passive:!0}),[m,xp(m)]):null}).filter(f=>f!=null);n(d.length?new Map(d):null),s.current=e}return()=>{c(e),c(l)};function c(d){d.forEach(f=>{const m=Tf(f);m==null||m.removeEventListener("scroll",a)})}},[a,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,c)=>Uo(l,c),pr):ej(e):pr,[e,t])}function gv(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const s=e!==pr;s&&!n.current&&(n.current=e),!s&&n.current&&(n.current=null)},[e]),n.current?Sc(e,n.current):pr}function HI(e){g.useEffect(()=>{if(!Yc)return;const t=e.map(n=>{let{sensor:s}=n;return s.setup==null?void 0:s.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function WI(e,t){return g.useMemo(()=>e.reduce((n,s)=>{let{eventName:a,handler:l}=s;return n[a]=c=>{l(c,t)},n},{}),[e,t])}function rj(e){return g.useMemo(()=>e?hI(e):null,[e])}const xv=[];function VI(e,t){t===void 0&&(t=oi);const[n]=e,s=rj(n?In(n):null),[a,l]=g.useState(xv);function c(){l(()=>e.length?e.map(f=>J0(f)?s:new Lh(t(f),f)):xv)}const d=Jc({callback:c});return Ir(()=>{d==null||d.disconnect(),c(),e.forEach(f=>d==null?void 0:d.observe(f))},[e]),a}function qI(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ia(t)?t:e}function KI(e){let{measure:t}=e;const[n,s]=g.useState(null),a=g.useCallback(m=>{for(const{target:h}of m)if(Ia(h)){s(x=>{const y=t(h);return x?{...x,width:y.width,height:y.height}:y});break}},[t]),l=Jc({callback:a}),c=g.useCallback(m=>{const h=qI(m);l==null||l.disconnect(),h&&(l==null||l.observe(h)),s(h?t(h):null)},[t,l]),[d,f]=kc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:f}),[n,d,f])}const GI=[{sensor:Qc,options:{}},{sensor:Xc,options:{}}],YI={current:{}},pc={draggable:{measure:cv},droppable:{measure:cv,strategy:wa.WhileDragging,frequency:vp.Optimized},dragOverlay:{measure:oi}};class ua extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,s;return(n=(s=this.get(t))==null?void 0:s.node.current)!=null?n:void 0}}const XI={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ua,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:pc,measureDroppableContainers:Nc,windowRect:null,measuringScheduled:!1},QI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nc,draggableNodes:new Map,over:null,measureDroppableContainers:Nc},Zc=g.createContext(QI),sj=g.createContext(XI);function JI(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ua}}}function ZI(e,t){switch(t.type){case Ut.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ut.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Ut.DragEnd:case Ut.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ut.RegisterDroppable:{const{element:n}=t,{id:s}=n,a=new ua(e.droppable.containers);return a.set(s,n),{...e,droppable:{...e.droppable,containers:a}}}case Ut.SetDroppableDisabled:{const{id:n,key:s,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||s!==l.key)return e;const c=new ua(e.droppable.containers);return c.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:c}}}case Ut.UnregisterDroppable:{const{id:n,key:s}=t,a=e.droppable.containers.get(n);if(!a||s!==a.key)return e;const l=new ua(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function eL(e){let{disabled:t}=e;const{active:n,activatorEvent:s,draggableNodes:a}=g.useContext(Zc),l=mp(s),c=mp(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!s&&l&&c!=null){if(!Dh(l)||document.activeElement===l.target)return;const d=a.get(c);if(!d)return;const{activatorNode:f,node:m}=d;if(!f.current&&!m.current)return;requestAnimationFrame(()=>{for(const h of[f.current,m.current]){if(!h)continue;const x=qD(h);if(x){x.focus();break}}})}},[s,t,a,c,l]),null}function tL(e,t){let{transform:n,...s}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...s}),n):n}function nL(e){return g.useMemo(()=>({draggable:{...pc.draggable,...e==null?void 0:e.draggable},droppable:{...pc.droppable,...e==null?void 0:e.droppable},dragOverlay:{...pc.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function rL(e){let{activeNode:t,measure:n,initialRect:s,config:a=!0}=e;const l=g.useRef(!1),{x:c,y:d}=typeof a=="boolean"?{x:a,y:a}:a;Ir(()=>{if(!c&&!d||!t){l.current=!1;return}if(l.current||!s)return;const m=t==null?void 0:t.node.current;if(!m||m.isConnected===!1)return;const h=n(m),x=G0(h,s);if(c||(x.x=0),d||(x.y=0),l.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const y=Y0(m);y&&y.scrollBy({top:x.y,left:x.x})}},[t,c,d,s,n])}const oj=g.createContext({...pr,scaleX:1,scaleY:1});var Ns;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ns||(Ns={}));const ij=g.memo(function(t){var n,s,a,l;let{id:c,accessibility:d,autoScroll:f=!0,children:m,sensors:h=GI,collisionDetection:x=aI,measuring:y,modifiers:b,...C}=t;const k=g.useReducer(ZI,void 0,JI),[j,S]=k,[T,N]=JD(),[A,L]=g.useState(Ns.Uninitialized),R=A===Ns.Initialized,{draggable:{active:D,nodes:O,translate:G},droppable:{containers:re}}=j,z=D!=null?O.get(D):null,K=g.useRef({initial:null,translated:null}),q=g.useMemo(()=>{var Ve;return D!=null?{id:D,data:(Ve=z==null?void 0:z.data)!=null?Ve:YI,rect:K}:null},[D,z]),J=g.useRef(null),[_,F]=g.useState(null),[B,U]=g.useState(null),Z=ba(C,Object.values(C)),P=Oa("DndDescribedBy",c),M=g.useMemo(()=>re.getEnabled(),[re]),Q=nL(y),{droppableRects:I,measureDroppableContainers:ge,measuringScheduled:Ne}=MI(M,{dragging:R,dependencies:[G.x,G.y],config:Q.droppable}),te=LI(O,D),fe=g.useMemo(()=>B?gp(B):null,[B]),be=vt(),ke=_I(te,Q.draggable.measure);rL({activeNode:D!=null?O.get(D):null,config:be.layoutShiftCompensation,initialRect:ke,measure:Q.draggable.measure});const we=hv(te,Q.draggable.measure,ke),Ye=hv(te?te.parentElement:null),Xe=g.useRef({activatorEvent:null,active:null,activeNode:te,collisionRect:null,collisions:null,droppableRects:I,draggableNodes:O,draggingNode:null,draggingNodeRect:null,droppableContainers:re,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=re.getNodeFor((n=Xe.current.over)==null?void 0:n.id),Y=KI({measure:Q.dragOverlay.measure}),ae=(s=Y.nodeRef.current)!=null?s:te,xe=R?(a=Y.rect)!=null?a:we:null,qe=!!(Y.nodeRef.current&&Y.rect),Oe=zI(qe?null:we),Ue=rj(ae?In(ae):null),Ge=BI(R?ne??te:null),Nt=VI(Ge),Ct=tL(b,{transform:{x:G.x-Oe.x,y:G.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:B,active:q,activeNodeRect:we,containerNodeRect:Ye,draggingNodeRect:xe,over:Xe.current.over,overlayNodeRect:Y.rect,scrollableAncestors:Ge,scrollableAncestorRects:Nt,windowRect:Ue}),It=fe?Uo(fe,G):null,en=UI(Ge),Tt=gv(en),ie=gv(en,[we]),ce=Uo(Ct,Tt),ve=xe?uI(xe,Ct):null,oe=q&&ve?x({active:q,collisionRect:ve,droppableRects:I,droppableContainers:M,pointerCoordinates:It}):null,Ce=oI(oe,"id"),[Ae,qt]=g.useState(null),an=qe?Ct:Uo(Ct,ie),tn=lI(an,(l=Ae==null?void 0:Ae.rect)!=null?l:null,we),V=g.useRef(null),pe=g.useCallback((Ve,it)=>{let{sensor:Rt,options:Kt}=it;if(J.current==null)return;const nn=O.get(J.current);if(!nn)return;const cn=Ve.nativeEvent,bn=new Rt({active:J.current,activeNode:nn,event:cn,options:Kt,context:Xe,onAbort(bt){if(!O.get(bt))return;const{onDragAbort:un}=Z.current,nr={id:bt};un==null||un(nr),T({type:"onDragAbort",event:nr})},onPending(bt,Vn,un,nr){if(!O.get(bt))return;const{onDragPending:yr}=Z.current,Ln={id:bt,constraint:Vn,initialCoordinates:un,offset:nr};yr==null||yr(Ln),T({type:"onDragPending",event:Ln})},onStart(bt){const Vn=J.current;if(Vn==null)return;const un=O.get(Vn);if(!un)return;const{onDragStart:nr}=Z.current,rr={activatorEvent:cn,active:{id:Vn,data:un.data,rect:K}};Cs.unstable_batchedUpdates(()=>{nr==null||nr(rr),L(Ns.Initializing),S({type:Ut.DragStart,initialCoordinates:bt,active:Vn}),T({type:"onDragStart",event:rr}),F(V.current),U(cn)})},onMove(bt){S({type:Ut.DragMove,coordinates:bt})},onEnd:$r(Ut.DragEnd),onCancel:$r(Ut.DragCancel)});V.current=bn;function $r(bt){return async function(){const{active:un,collisions:nr,over:rr,scrollAdjustedTranslate:yr}=Xe.current;let Ln=null;if(un&&yr){const{cancelDrop:Fr}=Z.current;Ln={activatorEvent:cn,active:un,collisions:nr,delta:yr,over:rr},bt===Ut.DragEnd&&typeof Fr=="function"&&await Promise.resolve(Fr(Ln))&&(bt=Ut.DragCancel)}J.current=null,Cs.unstable_batchedUpdates(()=>{S({type:bt}),L(Ns.Uninitialized),qt(null),F(null),U(null),V.current=null;const Fr=bt===Ut.DragEnd?"onDragEnd":"onDragCancel";if(Ln){const di=Z.current[Fr];di==null||di(Ln),T({type:Fr,event:Ln})}})}}},[O]),Ee=g.useCallback((Ve,it)=>(Rt,Kt)=>{const nn=Rt.nativeEvent,cn=O.get(Kt);if(J.current!==null||!cn||nn.dndKit||nn.defaultPrevented)return;const bn={active:cn};Ve(Rt,it.options,bn)===!0&&(nn.dndKit={capturedBy:it.sensor},J.current=Kt,pe(Rt,it))},[O,pe]),ze=OI(h,Ee);HI(h),Ir(()=>{we&&A===Ns.Initializing&&L(Ns.Initialized)},[we,A]),g.useEffect(()=>{const{onDragMove:Ve}=Z.current,{active:it,activatorEvent:Rt,collisions:Kt,over:nn}=Xe.current;if(!it||!Rt)return;const cn={active:it,activatorEvent:Rt,collisions:Kt,delta:{x:ce.x,y:ce.y},over:nn};Cs.unstable_batchedUpdates(()=>{Ve==null||Ve(cn),T({type:"onDragMove",event:cn})})},[ce.x,ce.y]),g.useEffect(()=>{const{active:Ve,activatorEvent:it,collisions:Rt,droppableContainers:Kt,scrollAdjustedTranslate:nn}=Xe.current;if(!Ve||J.current==null||!it||!nn)return;const{onDragOver:cn}=Z.current,bn=Kt.get(Ce),$r=bn&&bn.rect.current?{id:bn.id,rect:bn.rect.current,data:bn.data,disabled:bn.disabled}:null,bt={active:Ve,activatorEvent:it,collisions:Rt,delta:{x:nn.x,y:nn.y},over:$r};Cs.unstable_batchedUpdates(()=>{qt($r),cn==null||cn(bt),T({type:"onDragOver",event:bt})})},[Ce]),Ir(()=>{Xe.current={activatorEvent:B,active:q,activeNode:te,collisionRect:ve,collisions:oe,droppableRects:I,draggableNodes:O,draggingNode:ae,draggingNodeRect:xe,droppableContainers:re,over:Ae,scrollableAncestors:Ge,scrollAdjustedTranslate:ce},K.current={initial:xe,translated:ve}},[q,te,oe,ve,O,ae,xe,I,re,Ae,Ge,ce]),AI({...be,delta:G,draggingRect:ve,pointerCoordinates:It,scrollableAncestors:Ge,scrollableAncestorRects:Nt});const Wn=g.useMemo(()=>({active:q,activeNode:te,activeNodeRect:we,activatorEvent:B,collisions:oe,containerNodeRect:Ye,dragOverlay:Y,draggableNodes:O,droppableContainers:re,droppableRects:I,over:Ae,measureDroppableContainers:ge,scrollableAncestors:Ge,scrollableAncestorRects:Nt,measuringConfiguration:Q,measuringScheduled:Ne,windowRect:Ue}),[q,te,we,B,oe,Ye,Y,O,re,I,Ae,ge,Ge,Nt,Q,Ne,Ue]),ln=g.useMemo(()=>({activatorEvent:B,activators:ze,active:q,activeNodeRect:we,ariaDescribedById:{draggable:P},dispatch:S,draggableNodes:O,over:Ae,measureDroppableContainers:ge}),[B,ze,q,we,S,P,O,Ae,ge]);return Pt.createElement(V0.Provider,{value:N},Pt.createElement(Zc.Provider,{value:ln},Pt.createElement(sj.Provider,{value:Wn},Pt.createElement(oj.Provider,{value:tn},m)),Pt.createElement(eL,{disabled:(d==null?void 0:d.restoreFocus)===!1})),Pt.createElement(tI,{...d,hiddenTextDescribedById:P}));function vt(){const Ve=(_==null?void 0:_.autoScrollEnabled)===!1,it=typeof f=="object"?f.enabled===!1:f===!1,Rt=R&&!Ve&&!it;return typeof f=="object"?{...f,enabled:Rt}:{enabled:Rt}}}),sL=g.createContext(null),yv="button",oL="Draggable";function iL(e){let{id:t,data:n,disabled:s=!1,attributes:a}=e;const l=Oa(oL),{activators:c,activatorEvent:d,active:f,activeNodeRect:m,ariaDescribedById:h,draggableNodes:x,over:y}=g.useContext(Zc),{role:b=yv,roleDescription:C="draggable",tabIndex:k=0}=a??{},j=(f==null?void 0:f.id)===t,S=g.useContext(j?oj:sL),[T,N]=kc(),[A,L]=kc(),R=WI(c,t),D=ba(n);Ir(()=>(x.set(t,{id:t,key:l,node:T,activatorNode:A,data:D}),()=>{const G=x.get(t);G&&G.key===l&&x.delete(t)}),[x,t]);const O=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":s,"aria-pressed":j&&b===yv?!0:void 0,"aria-roledescription":C,"aria-describedby":h.draggable}),[s,b,k,j,C,h.draggable]);return{active:f,activatorEvent:d,activeNodeRect:m,attributes:O,isDragging:j,listeners:s?void 0:R,node:T,over:y,setNodeRef:N,setActivatorNodeRef:L,transform:S}}function aL(){return g.useContext(sj)}const lL="Droppable",cL={timeout:25};function uL(e){let{data:t,disabled:n=!1,id:s,resizeObserverConfig:a}=e;const l=Oa(lL),{active:c,dispatch:d,over:f,measureDroppableContainers:m}=g.useContext(Zc),h=g.useRef({disabled:n}),x=g.useRef(!1),y=g.useRef(null),b=g.useRef(null),{disabled:C,updateMeasurementsFor:k,timeout:j}={...cL,...a},S=ba(k??s),T=g.useCallback(()=>{if(!x.current){x.current=!0;return}b.current!=null&&clearTimeout(b.current),b.current=setTimeout(()=>{m(Array.isArray(S.current)?S.current:[S.current]),b.current=null},j)},[j]),N=Jc({callback:T,disabled:C||!c}),A=g.useCallback((O,G)=>{N&&(G&&(N.unobserve(G),x.current=!1),O&&N.observe(O))},[N]),[L,R]=kc(A),D=ba(t);return g.useEffect(()=>{!N||!L.current||(N.disconnect(),x.current=!1,N.observe(L.current))},[L,N]),g.useEffect(()=>(d({type:Ut.RegisterDroppable,element:{id:s,key:l,disabled:n,node:L,rect:y,data:D}}),()=>d({type:Ut.UnregisterDroppable,key:l,id:s})),[s]),g.useEffect(()=>{n!==h.current.disabled&&(d({type:Ut.SetDroppableDisabled,id:s,key:l,disabled:n}),h.current.disabled=n)},[s,l,n,d]),{active:c,rect:y,isOver:(f==null?void 0:f.id)===s,node:L,over:f,setNodeRef:R}}function eu(e,t,n){const s=e.slice();return s.splice(n<0?s.length+n:n,0,s.splice(t,1)[0]),s}function dL(e,t){return e.reduce((n,s,a)=>{const l=t.get(s);return l&&(n[a]=l),n},Array(e.length))}function ec(e){return e!==null&&e>=0}function fL(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function pL(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const aj=e=>{let{rects:t,activeIndex:n,overIndex:s,index:a}=e;const l=eu(t,s,n),c=t[a],d=l[a];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},tc={scaleX:1,scaleY:1},lj=e=>{var t;let{activeIndex:n,activeNodeRect:s,index:a,rects:l,overIndex:c}=e;const d=(t=l[n])!=null?t:s;if(!d)return null;if(a===n){const m=l[c];return m?{x:0,y:n<c?m.top+m.height-(d.top+d.height):m.top-d.top,...tc}:null}const f=hL(l,a,n);return a>n&&a<=c?{x:0,y:-d.height-f,...tc}:a<n&&a>=c?{x:0,y:d.height+f,...tc}:{x:0,y:0,...tc}};function hL(e,t,n){const s=e[t],a=e[t-1],l=e[t+1];return s?n<t?a?s.top-(a.top+a.height):l?l.top-(s.top+s.height):0:l?l.top-(s.top+s.height):a?s.top-(a.top+a.height):0:0}const cj="Sortable",uj=Pt.createContext({activeIndex:-1,containerId:cj,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:aj,disabled:{draggable:!1,droppable:!1}});function dj(e){let{children:t,id:n,items:s,strategy:a=aj,disabled:l=!1}=e;const{active:c,dragOverlay:d,droppableRects:f,over:m,measureDroppableContainers:h}=aL(),x=Oa(cj,n),y=d.rect!==null,b=g.useMemo(()=>s.map(R=>typeof R=="object"&&"id"in R?R.id:R),[s]),C=c!=null,k=c?b.indexOf(c.id):-1,j=m?b.indexOf(m.id):-1,S=g.useRef(b),T=!fL(b,S.current),N=j!==-1&&k===-1||T,A=pL(l);Ir(()=>{T&&C&&h(b)},[T,b,C,h]),g.useEffect(()=>{S.current=b},[b]);const L=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:A,disableTransforms:N,items:b,overIndex:j,useDragOverlay:y,sortedRects:dL(b,f),strategy:a}),[k,x,A.draggable,A.droppable,N,b,j,f,y,a]);return Pt.createElement(uj.Provider,{value:L},t)}const mL=e=>{let{id:t,items:n,activeIndex:s,overIndex:a}=e;return eu(n,s,a).indexOf(t)},gL=e=>{let{containerId:t,isSorting:n,wasDragging:s,index:a,items:l,newIndex:c,previousItems:d,previousContainerId:f,transition:m}=e;return!m||!s||d!==l&&a===c?!1:n?!0:c!==a&&t===f},xL={duration:200,easing:"ease"},fj="transform",yL=qo.Transition.toString({property:fj,duration:0,easing:"linear"}),vL={roleDescription:"sortable"};function bL(e){let{disabled:t,index:n,node:s,rect:a}=e;const[l,c]=g.useState(null),d=g.useRef(n);return Ir(()=>{if(!t&&n!==d.current&&s.current){const f=a.current;if(f){const m=oi(s.current,{ignoreTransform:!0}),h={x:f.left-m.left,y:f.top-m.top,scaleX:f.width/m.width,scaleY:f.height/m.height};(h.x||h.y)&&c(h)}}n!==d.current&&(d.current=n)},[t,n,s,a]),g.useEffect(()=>{l&&c(null)},[l]),l}function pj(e){let{animateLayoutChanges:t=gL,attributes:n,disabled:s,data:a,getNewIndex:l=mL,id:c,strategy:d,resizeObserverConfig:f,transition:m=xL}=e;const{items:h,containerId:x,activeIndex:y,disabled:b,disableTransforms:C,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:T}=g.useContext(uj),N=wL(s,b),A=h.indexOf(c),L=g.useMemo(()=>({sortable:{containerId:x,index:A,items:h},...a}),[x,a,A,h]),R=g.useMemo(()=>h.slice(h.indexOf(c)),[h,c]),{rect:D,node:O,isOver:G,setNodeRef:re}=uL({id:c,data:L,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:R,...f}}),{active:z,activatorEvent:K,activeNodeRect:q,attributes:J,setNodeRef:_,listeners:F,isDragging:B,over:U,setActivatorNodeRef:Z,transform:P}=iL({id:c,data:L,attributes:{...vL,...n},disabled:N.draggable}),M=UD(re,_),Q=!!z,I=Q&&!C&&ec(y)&&ec(j),ge=!S&&B,Ne=ge&&I?P:null,fe=I?Ne??(d??T)({rects:k,activeNodeRect:q,activeIndex:y,overIndex:j,index:A}):null,be=ec(y)&&ec(j)?l({id:c,items:h,activeIndex:y,overIndex:j}):A,ke=z==null?void 0:z.id,we=g.useRef({activeId:ke,items:h,newIndex:be,containerId:x}),Ye=h!==we.current.items,Xe=t({active:z,containerId:x,isDragging:B,isSorting:Q,id:c,index:A,items:h,newIndex:we.current.newIndex,previousItems:we.current.items,previousContainerId:we.current.containerId,transition:m,wasDragging:we.current.activeId!=null}),ne=bL({disabled:!Xe,index:A,node:O,rect:D});return g.useEffect(()=>{Q&&we.current.newIndex!==be&&(we.current.newIndex=be),x!==we.current.containerId&&(we.current.containerId=x),h!==we.current.items&&(we.current.items=h)},[Q,be,x,h]),g.useEffect(()=>{if(ke===we.current.activeId)return;if(ke!=null&&we.current.activeId==null){we.current.activeId=ke;return}const ae=setTimeout(()=>{we.current.activeId=ke},50);return()=>clearTimeout(ae)},[ke]),{active:z,activeIndex:y,attributes:J,data:L,rect:D,index:A,newIndex:be,items:h,isOver:G,isSorting:Q,isDragging:B,listeners:F,node:O,overIndex:j,over:U,setNodeRef:M,setActivatorNodeRef:Z,setDroppableNodeRef:re,setDraggableNodeRef:_,transform:ne??fe,transition:Y()};function Y(){if(ne||Ye&&we.current.newIndex===A)return yL;if(!(ge&&!Dh(K)||!m)&&(Q||Xe))return qo.Transition.toString({...m,property:fj})}}function wL(e,t){var n,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(s=e==null?void 0:e.droppable)!=null?s:t.droppable}}tt.Down,tt.Right,tt.Up,tt.Left;function Mr(e){return`/api/projects/${encodeURIComponent(e)}/todos`}function jL(e){const[t,n]=g.useState(null),[s,a]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{if(e)try{const f=await fetch(Mr(e));if(!f.ok)throw new Error(`HTTP ${f.status}`);n(await f.json()),c(null)}catch(f){c(f instanceof Error?f.message:"Failed to fetch todos")}finally{a(!1)}},[e]);return g.useEffect(()=>{d()},[d]),_c(f=>{f.type==="todos-updated"&&f.projectSlug===e&&d()}),{data:t,loading:s,error:l,refetch:d}}async function kL(e,t,n){await fetch(Mr(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function SL(e,t,n){await fetch(`${Mr(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function NL(e,t,n){await fetch(`${Mr(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function CL(e,t,n){await fetch(`${Mr(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function EL(e,t){await fetch(`${Mr(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function PL(e,t){await fetch(`${Mr(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function TL(e,t){await fetch(`${Mr(e)}/${t}`,{method:"DELETE"})}async function hj(e,t){const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const s=await n.text().catch(()=>"");let a=null;try{a=s?JSON.parse(s):null}catch{}const l=(a==null?void 0:a.error)||s||`HTTP ${n.status}`,c=new Error(l);throw c.status=n.status,c}return n.json().catch(()=>({}))}async function RL(e,t){await hj(`${Mr(e)}/promote`,t)}async function AL(e,t,n){await hj(`${Mr(e)}/${t}/move`,{to:n})}const vv=[{value:"open",icon:"○",label:"Open",color:"text-muted-foreground"},{value:"in_progress",icon:"◉",label:"In Progress",color:"text-status-in-progress-foreground"},{value:"completed",icon:"✓",label:"Completed",color:"text-status-completed-foreground"},{value:"blocked",icon:"✕",label:"Blocked",color:"text-status-blocked-foreground"}];function Mh({status:e,onChange:t}){const[n,s]=g.useState(!1),a=g.useRef(null);g.useEffect(()=>{if(!n)return;function c(d){a.current&&!a.current.contains(d.target)&&s(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const l=vv.find(c=>c.value===e);return o.jsxs("div",{className:"relative",ref:a,onClick:c=>c.stopPropagation(),children:[o.jsx("button",{onClick:()=>s(!n),className:`text-lg leading-none ${l.color} hover:opacity-70 transition`,title:l.label,children:l.icon}),n&&o.jsx("div",{className:"absolute left-0 top-full mt-1 z-20 min-w-[140px] rounded-md border border-border/70 bg-background shadow-lg py-1",children:vv.filter(c=>c.value!==e).map(c=>o.jsxs("button",{onClick:()=>{t(c.value),s(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[o.jsx("span",{className:"text-base leading-none",children:c.icon}),o.jsx("span",{children:c.label})]},c.value))})]})}function mj({open:e,selectedIds:t,scope:n,onOpenChange:s,onDone:a}){const[l,c]=g.useState("new"),[d,f]=g.useState(!1),[m,h]=g.useState(null),[x,y]=g.useState(null),[b,C]=g.useState(null),[k,j]=g.useState(""),[S,T]=g.useState(""),[N,A]=g.useState(""),[L,R]=g.useState(""),[D,O]=g.useState(""),[G,re]=g.useState(""),[z,K]=g.useState(null),[q,J]=g.useState(!1),_=t.length>1;g.useEffect(()=>{if(!e){c("new"),h(null),j(""),T(""),A(""),R(""),O(""),re(""),K(null);return}let P=!1;return(async()=>{try{const M=await fetch("/api/projects");if(!M.ok)throw new Error(`HTTP ${M.status}`);const Q=await M.json();P||y(Q.filter(I=>!I.archived))}catch(M){P||C(M instanceof Error?M.message:String(M))}})(),()=>{P=!0}},[e]),g.useEffect(()=>{if(!D){K(null);return}let P=!1;return J(!0),(async()=>{try{const M=await fetch(`/api/projects/${encodeURIComponent(D)}/assignments`);if(!M.ok)throw new Error(`HTTP ${M.status}`);const Q=await M.json();P||K(Q)}catch{P||K([])}finally{P||J(!1)}})(),()=>{P=!0}},[D]);const F=g.useMemo(()=>x??[],[x]);async function B(P){if(P.preventDefault(),!k){h("Pick a target project.");return}if(_&&!S.trim()){h("Title is required when promoting multiple todos.");return}const M={todoIds:t,mode:"new-assignment",target:{project:k},title:S.trim()||void 0,type:N.trim()||void 0,priority:L||void 0};await Z(M)}async function U(P){if(P.preventDefault(),!D||!G){h("Pick both project and assignment.");return}const M={todoIds:t,mode:"to-assignment",target:{assignment:`${D}/${G}`}};await Z(M)}async function Z(P){f(!0),h(null);try{n.kind==="workspace"?await lE(n.workspace,P):await RL(n.projectId,P),a(),s(!1)}catch(M){h(M instanceof Error?M.message:String(M))}finally{f(!1)}}return o.jsx(ei,{open:e,onOpenChange:P=>d?void 0:s(P),children:o.jsxs(to,{className:"max-w-xl",children:[o.jsxs(sh,{children:[o.jsxs(no,{children:["Promote ",t.length," todo",t.length===1?"":"s"]}),o.jsxs(Pa,{children:["Convert the selected todo",t.length===1?"":"s"," to an assignment. The source todo",t.length===1?"":"s"," will be marked completed."]})]}),o.jsxs(i0,{value:l,onValueChange:P=>c(P),children:[o.jsxs(a0,{className:"flex gap-2 rounded-md border border-border/70 bg-card/80 p-1 mb-4",children:[o.jsx(rp,{value:"new",className:Be("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:"New assignment"}),o.jsx(rp,{value:"existing",className:Be("inline-flex items-center gap-2 rounded-sm px-3 py-1.5 text-sm font-medium text-muted-foreground transition","data-[state=active]:bg-foreground data-[state=active]:text-background"),children:"Existing assignment"})]}),o.jsx(sp,{value:"new",children:o.jsxs("form",{onSubmit:B,className:"space-y-4",children:[o.jsx(Oo,{label:"Target project",children:o.jsx(bv,{value:k,onChange:j,projects:F,error:b,disabled:d})}),o.jsx(Oo,{label:_?"Title (required)":"Title (defaults to first todo)",children:o.jsx("input",{type:"text",value:S,onChange:P=>T(P.target.value),disabled:d,className:"editor-textarea w-full bg-background/95 font-sans"})}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsx(Oo,{label:"Type",children:o.jsx("input",{type:"text",value:N,onChange:P=>A(P.target.value),placeholder:"feature",disabled:d,className:"editor-textarea w-full bg-background/95 font-sans"})}),o.jsx(Oo,{label:"Priority",children:o.jsxs("select",{value:L,onChange:P=>R(P.target.value),disabled:d,className:"editor-textarea w-full bg-background/95 font-sans",children:[o.jsx("option",{value:"",children:"—"}),o.jsx("option",{value:"low",children:"low"}),o.jsx("option",{value:"medium",children:"medium"}),o.jsx("option",{value:"high",children:"high"}),o.jsx("option",{value:"critical",children:"critical"})]})})]}),m?o.jsx(wv,{message:m}):null,o.jsx(jv,{onCancel:()=>s(!1),submitting:d,submitLabel:"Promote"})]})}),o.jsx(sp,{value:"existing",children:o.jsxs("form",{onSubmit:U,className:"space-y-4",children:[o.jsx(Oo,{label:"Project",children:o.jsx(bv,{value:D,onChange:P=>{O(P),re("")},projects:F,error:b,disabled:d})}),o.jsx(Oo,{label:q?"Assignment (loading...)":"Assignment",children:o.jsxs("select",{value:G,onChange:P=>re(P.target.value),disabled:d||!D||q,className:"editor-textarea w-full bg-background/95 font-sans",children:[o.jsx("option",{value:"",children:D?"Select assignment...":"Pick a project first"}),(z??[]).map(P=>o.jsxs("option",{value:P.slug,children:[P.title," (",P.status,")"]},P.slug))]})}),m?o.jsx(wv,{message:m}):null,o.jsx(jv,{onCancel:()=>s(!1),submitting:d,submitLabel:"Promote"})]})})]})]})})}function Oo({label:e,children:t}){return o.jsxs("label",{className:"block space-y-1.5",children:[o.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:e}),t]})}function bv({value:e,onChange:t,projects:n,error:s,disabled:a}){return s?o.jsxs("div",{className:"text-sm text-destructive",children:["Failed to load projects: ",s]}):o.jsxs("select",{value:e,onChange:l=>t(l.target.value),disabled:a,className:"editor-textarea w-full bg-background/95 font-sans",children:[o.jsx("option",{value:"",children:"Select project..."}),n.map(l=>o.jsxs("option",{value:l.slug,children:[l.title," (",l.slug,")"]},l.slug))]})}function wv({message:e}){return o.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:e})}function jv({onCancel:e,submitting:t,submitLabel:n}){return o.jsxs(oh,{children:[o.jsx("button",{type:"button",onClick:e,disabled:t,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),o.jsx("button",{type:"submit",disabled:t,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:t?"Submitting...":n})]})}function gj({open:e,selectedIds:t,scope:n,onOpenChange:s,onDone:a}){const[l,c]=g.useState("project"),[d,f]=g.useState(""),[m,h]=g.useState(""),[x,y]=g.useState(!1),[b,C]=g.useState(null),[k,j]=g.useState(null),[S,T]=g.useState(null);g.useEffect(()=>{if(!e){c("project"),f(""),h(""),C(null),j(null);return}let D=!1;return(async()=>{try{const O=await fetch("/api/projects");if(!O.ok)throw new Error(`HTTP ${O.status}`);const G=await O.json();D||T(G.filter(re=>!re.archived))}catch(O){D||j(O instanceof Error?O.message:String(O))}})(),()=>{D=!0}},[e]);const N=g.useMemo(()=>S?n.kind==="project"?S.filter(D=>D.slug!==n.projectId):S:[],[S,n]);function A(){if(l==="global")return{global:!0};if(l==="workspace"){const D=d.trim();return D?{workspace:D}:"Workspace name is required."}return m?{project:m}:"Pick a target project."}async function L(D,O){try{return n.kind==="workspace"?await cE(n.workspace,D,O):await AL(n.projectId,D,O),{ok:!0}}catch(G){return{ok:!1,error:G instanceof Error?G.message:String(G)}}}async function R(D){D.preventDefault(),j(null);const O=A();if(typeof O=="string"){j(O);return}y(!0),C(null);const G=[],re=[];for(const z of t){const K=await L(z,O);K.ok?G.push(z):re.push({id:z,error:K.error})}y(!1),a(),re.length===0?s(!1):C({succeeded:G,failed:re})}return o.jsx(ei,{open:e,onOpenChange:D=>x?void 0:s(D),children:o.jsx(to,{className:"max-w-xl",children:o.jsxs("form",{onSubmit:R,className:"space-y-4",children:[o.jsxs(sh,{children:[o.jsxs(no,{children:["Move ",t.length," todo",t.length===1?"":"s"]}),o.jsxs(Pa,{children:["Move the selected todo",t.length===1?"":"s"," to a different scope. id, tags, branch, timestamps, and plan dir are preserved."]})]}),o.jsxs("fieldset",{className:"space-y-2",disabled:x,children:[o.jsx("legend",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground mb-1",children:"Target scope"}),o.jsx(Df,{kind:"project",checked:l==="project",onChange:()=>c("project"),label:"Project"}),o.jsx(Df,{kind:"workspace",checked:l==="workspace",onChange:()=>c("workspace"),label:"Workspace"}),o.jsx(Df,{kind:"global",checked:l==="global",onChange:()=>c("global"),label:"Global"})]}),l==="project"?o.jsx(kv,{label:"Target project",children:o.jsxs("select",{value:m,onChange:D=>h(D.target.value),disabled:x,className:"editor-textarea w-full bg-background/95 font-sans",children:[o.jsx("option",{value:"",children:"Select project..."}),N.map(D=>o.jsxs("option",{value:D.slug,children:[D.title," (",D.slug,")"]},D.slug))]})}):null,l==="workspace"?o.jsx(kv,{label:"Target workspace name",children:o.jsx("input",{type:"text",value:d,onChange:D=>f(D.target.value),disabled:x,placeholder:"e.g. syntaur",className:"editor-textarea w-full bg-background/95 font-sans"})}):null,k?o.jsx(DL,{message:k}):null,b?o.jsxs("div",{className:"rounded-md border border-warning-foreground/30 bg-warning px-3 py-2 text-sm text-warning-foreground space-y-1",children:[o.jsxs("div",{className:"font-medium",children:["Moved ",b.succeeded.length," of ",t.length,"; ",b.failed.length," failed."]}),o.jsx("ul",{className:"text-xs space-y-0.5",children:b.failed.map(D=>o.jsxs("li",{children:["[t:",D.id,"] ",D.error]},D.id))})]}):null,o.jsxs(oh,{children:[o.jsx("button",{type:"button",onClick:()=>s(!1),disabled:x,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:b?"Close":"Cancel"}),b===null?o.jsx("button",{type:"submit",disabled:x,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:x?"Moving...":"Move"}):null]})]})})})}function kv({label:e,children:t}){return o.jsxs("label",{className:"block space-y-1.5",children:[o.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:e}),t]})}function Df({kind:e,checked:t,onChange:n,label:s}){return o.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[o.jsx("input",{type:"radio",name:"move-target-kind",value:e,checked:t,onChange:n}),o.jsx("span",{children:s})]})}function DL({message:e}){return o.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:e})}const IL=["top","right","bottom","left"],Ps=Math.min,zn=Math.max,Pc=Math.round,nc=Math.floor,Rr=e=>({x:e,y:e}),LL={left:"right",right:"left",bottom:"top",top:"bottom"};function bp(e,t,n){return zn(e,Ps(t,n))}function Qr(e,t){return typeof e=="function"?e(t):e}function Jr(e){return e.split("-")[0]}function ii(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function $h(e){return e==="y"?"height":"width"}function Er(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fh(e){return _h(Er(e))}function OL(e,t,n){n===void 0&&(n=!1);const s=ii(e),a=Fh(e),l=$h(a);let c=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=Tc(c)),[c,Tc(c)]}function ML(e){const t=Tc(e);return[wp(e),t,wp(t)]}function wp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Sv=["left","right"],Nv=["right","left"],_L=["top","bottom"],$L=["bottom","top"];function FL(e,t,n){switch(e){case"top":case"bottom":return n?t?Nv:Sv:t?Sv:Nv;case"left":case"right":return t?_L:$L;default:return[]}}function zL(e,t,n,s){const a=ii(e);let l=FL(Jr(e),n==="start",s);return a&&(l=l.map(c=>c+"-"+a),t&&(l=l.concat(l.map(wp)))),l}function Tc(e){const t=Jr(e);return LL[t]+e.slice(t.length)}function BL(e){return{top:0,right:0,bottom:0,left:0,...e}}function xj(e){return typeof e!="number"?BL(e):{top:e,right:e,bottom:e,left:e}}function Rc(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function Cv(e,t,n){let{reference:s,floating:a}=e;const l=Er(t),c=Fh(t),d=$h(c),f=Jr(t),m=l==="y",h=s.x+s.width/2-a.width/2,x=s.y+s.height/2-a.height/2,y=s[d]/2-a[d]/2;let b;switch(f){case"top":b={x:h,y:s.y-a.height};break;case"bottom":b={x:h,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:x};break;case"left":b={x:s.x-a.width,y:x};break;default:b={x:s.x,y:s.y}}switch(ii(t)){case"start":b[c]-=y*(n&&m?-1:1);break;case"end":b[c]+=y*(n&&m?-1:1);break}return b}async function UL(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:l,rects:c,elements:d,strategy:f}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:x="floating",altBoundary:y=!1,padding:b=0}=Qr(t,e),C=xj(b),j=d[y?x==="floating"?"reference":"floating":x],S=Rc(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(j)))==null||n?j:j.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:h,strategy:f})),T=x==="floating"?{x:s,y:a,width:c.floating.width,height:c.floating.height}:c.reference,N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(N))?await(l.getScale==null?void 0:l.getScale(N))||{x:1,y:1}:{x:1,y:1},L=Rc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:T,offsetParent:N,strategy:f}):T);return{top:(S.top-L.top+C.top)/A.y,bottom:(L.bottom-S.bottom+C.bottom)/A.y,left:(S.left-L.left+C.left)/A.x,right:(L.right-S.right+C.right)/A.x}}const HL=50,WL=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:UL},f=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:h,y:x}=Cv(m,s,f),y=s,b=0;const C={};for(let k=0;k<l.length;k++){const j=l[k];if(!j)continue;const{name:S,fn:T}=j,{x:N,y:A,data:L,reset:R}=await T({x:h,y:x,initialPlacement:s,placement:y,strategy:a,middlewareData:C,rects:m,platform:d,elements:{reference:e,floating:t}});h=N??h,x=A??x,C[S]={...C[S],...L},R&&b<HL&&(b++,typeof R=="object"&&(R.placement&&(y=R.placement),R.rects&&(m=R.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):R.rects),{x:h,y:x}=Cv(m,y,f)),k=-1)}return{x:h,y:x,placement:y,strategy:a,middlewareData:C}},VL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:l,platform:c,elements:d,middlewareData:f}=t,{element:m,padding:h=0}=Qr(e,t)||{};if(m==null)return{};const x=xj(h),y={x:n,y:s},b=Fh(a),C=$h(b),k=await c.getDimensions(m),j=b==="y",S=j?"top":"left",T=j?"bottom":"right",N=j?"clientHeight":"clientWidth",A=l.reference[C]+l.reference[b]-y[b]-l.floating[C],L=y[b]-l.reference[b],R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let D=R?R[N]:0;(!D||!await(c.isElement==null?void 0:c.isElement(R)))&&(D=d.floating[N]||l.floating[C]);const O=A/2-L/2,G=D/2-k[C]/2-1,re=Ps(x[S],G),z=Ps(x[T],G),K=re,q=D-k[C]-z,J=D/2-k[C]/2+O,_=bp(K,J,q),F=!f.arrow&&ii(a)!=null&&J!==_&&l.reference[C]/2-(J<K?re:z)-k[C]/2<0,B=F?J<K?J-K:J-q:0;return{[b]:y[b]+B,data:{[b]:_,centerOffset:J-_-B,...F&&{alignmentOffset:B}},reset:F}}}),qL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:l,rects:c,initialPlacement:d,platform:f,elements:m}=t,{mainAxis:h=!0,crossAxis:x=!0,fallbackPlacements:y,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:k=!0,...j}=Qr(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const S=Jr(a),T=Er(d),N=Jr(d)===d,A=await(f.isRTL==null?void 0:f.isRTL(m.floating)),L=y||(N||!k?[Tc(d)]:ML(d)),R=C!=="none";!y&&R&&L.push(...zL(d,k,C,A));const D=[d,...L],O=await f.detectOverflow(t,j),G=[];let re=((s=l.flip)==null?void 0:s.overflows)||[];if(h&&G.push(O[S]),x){const J=OL(a,c,A);G.push(O[J[0]],O[J[1]])}if(re=[...re,{placement:a,overflows:G}],!G.every(J=>J<=0)){var z,K;const J=(((z=l.flip)==null?void 0:z.index)||0)+1,_=D[J];if(_&&(!(x==="alignment"?T!==Er(_):!1)||re.every(U=>Er(U.placement)===T?U.overflows[0]>0:!0)))return{data:{index:J,overflows:re},reset:{placement:_}};let F=(K=re.filter(B=>B.overflows[0]<=0).sort((B,U)=>B.overflows[1]-U.overflows[1])[0])==null?void 0:K.placement;if(!F)switch(b){case"bestFit":{var q;const B=(q=re.filter(U=>{if(R){const Z=Er(U.placement);return Z===T||Z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Z=>Z>0).reduce((Z,P)=>Z+P,0)]).sort((U,Z)=>U[1]-Z[1])[0])==null?void 0:q[0];B&&(F=B);break}case"initialPlacement":F=d;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function Ev(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pv(e){return IL.some(t=>e[t]>=0)}const KL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:a="referenceHidden",...l}=Qr(e,t);switch(a){case"referenceHidden":{const c=await s.detectOverflow(t,{...l,elementContext:"reference"}),d=Ev(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Pv(d)}}}case"escaped":{const c=await s.detectOverflow(t,{...l,altBoundary:!0}),d=Ev(c,n.floating);return{data:{escapedOffsets:d,escaped:Pv(d)}}}default:return{}}}}},yj=new Set(["left","top"]);async function GL(e,t){const{placement:n,platform:s,elements:a}=e,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),c=Jr(n),d=ii(n),f=Er(n)==="y",m=yj.has(c)?-1:1,h=l&&f?-1:1,x=Qr(t,e);let{mainAxis:y,crossAxis:b,alignmentAxis:C}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof C=="number"&&(b=d==="end"?C*-1:C),f?{x:b*h,y:y*m}:{x:y*m,y:b*h}}const YL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:l,placement:c,middlewareData:d}=t,f=await GL(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:l+f.y,data:{...f,placement:c}}}}},XL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:S=>{let{x:T,y:N}=S;return{x:T,y:N}}},...m}=Qr(e,t),h={x:n,y:s},x=await l.detectOverflow(t,m),y=Er(Jr(a)),b=_h(y);let C=h[b],k=h[y];if(c){const S=b==="y"?"top":"left",T=b==="y"?"bottom":"right",N=C+x[S],A=C-x[T];C=bp(N,C,A)}if(d){const S=y==="y"?"top":"left",T=y==="y"?"bottom":"right",N=k+x[S],A=k-x[T];k=bp(N,k,A)}const j=f.fn({...t,[b]:C,[y]:k});return{...j,data:{x:j.x-n,y:j.y-s,enabled:{[b]:c,[y]:d}}}}}},QL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:f=!0,crossAxis:m=!0}=Qr(e,t),h={x:n,y:s},x=Er(a),y=_h(x);let b=h[y],C=h[x];const k=Qr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(f){const N=y==="y"?"height":"width",A=l.reference[y]-l.floating[N]+j.mainAxis,L=l.reference[y]+l.reference[N]-j.mainAxis;b<A?b=A:b>L&&(b=L)}if(m){var S,T;const N=y==="y"?"width":"height",A=yj.has(Jr(a)),L=l.reference[x]-l.floating[N]+(A&&((S=c.offset)==null?void 0:S[x])||0)+(A?0:j.crossAxis),R=l.reference[x]+l.reference[N]+(A?0:((T=c.offset)==null?void 0:T[x])||0)-(A?j.crossAxis:0);C<L?C=L:C>R&&(C=R)}return{[y]:b,[x]:C}}}},JL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:l,platform:c,elements:d}=t,{apply:f=()=>{},...m}=Qr(e,t),h=await c.detectOverflow(t,m),x=Jr(a),y=ii(a),b=Er(a)==="y",{width:C,height:k}=l.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=y===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=y==="end"?"top":"bottom");const T=k-h.top-h.bottom,N=C-h.left-h.right,A=Ps(k-h[j],T),L=Ps(C-h[S],N),R=!t.middlewareData.shift;let D=A,O=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=N),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(D=T),R&&!y){const re=zn(h.left,0),z=zn(h.right,0),K=zn(h.top,0),q=zn(h.bottom,0);b?O=C-2*(re!==0||z!==0?re+z:zn(h.left,h.right)):D=k-2*(K!==0||q!==0?K+q:zn(h.top,h.bottom))}await f({...t,availableWidth:O,availableHeight:D});const G=await c.getDimensions(d.floating);return C!==G.width||k!==G.height?{reset:{rects:!0}}:{}}}};function tu(){return typeof window<"u"}function ai(e){return vj(e)?(e.nodeName||"").toLowerCase():"#document"}function Hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _r(e){var t;return(t=(vj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vj(e){return tu()?e instanceof Node||e instanceof Hn(e).Node:!1}function hr(e){return tu()?e instanceof Element||e instanceof Hn(e).Element:!1}function Zr(e){return tu()?e instanceof HTMLElement||e instanceof Hn(e).HTMLElement:!1}function Tv(e){return!tu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Hn(e).ShadowRoot}function Ma(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&a!=="inline"&&a!=="contents"}function ZL(e){return/^(table|td|th)$/.test(ai(e))}function nu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const eO=/transform|translate|scale|rotate|perspective|filter/,tO=/paint|layout|strict|content/,Ks=e=>!!e&&e!=="none";let If;function zh(e){const t=hr(e)?mr(e):e;return Ks(t.transform)||Ks(t.translate)||Ks(t.scale)||Ks(t.rotate)||Ks(t.perspective)||!Bh()&&(Ks(t.backdropFilter)||Ks(t.filter))||eO.test(t.willChange||"")||tO.test(t.contain||"")}function nO(e){let t=Ts(e);for(;Zr(t)&&!Ko(t);){if(zh(t))return t;if(nu(t))return null;t=Ts(t)}return null}function Bh(){return If==null&&(If=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),If}function Ko(e){return/^(html|body|#document)$/.test(ai(e))}function mr(e){return Hn(e).getComputedStyle(e)}function ru(e){return hr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ts(e){if(ai(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Tv(e)&&e.host||_r(e);return Tv(t)?t.host:t}function bj(e){const t=Ts(e);return Ko(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zr(t)&&Ma(t)?t:bj(t)}function ja(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=bj(e),l=a===((s=e.ownerDocument)==null?void 0:s.body),c=Hn(a);if(l){const d=jp(c);return t.concat(c,c.visualViewport||[],Ma(a)?a:[],d&&n?ja(d):[])}else return t.concat(a,ja(a,[],n))}function jp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wj(e){const t=mr(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=Zr(e),l=a?e.offsetWidth:n,c=a?e.offsetHeight:s,d=Pc(n)!==l||Pc(s)!==c;return d&&(n=l,s=c),{width:n,height:s,$:d}}function Uh(e){return hr(e)?e:e.contextElement}function Ho(e){const t=Uh(e);if(!Zr(t))return Rr(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:l}=wj(t);let c=(l?Pc(n.width):n.width)/s,d=(l?Pc(n.height):n.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const rO=Rr(0);function jj(e){const t=Hn(e);return!Bh()||!t.visualViewport?rO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Hn(e)?!1:t}function Js(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),l=Uh(e);let c=Rr(1);t&&(s?hr(s)&&(c=Ho(s)):c=Ho(e));const d=sO(l,n,s)?jj(l):Rr(0);let f=(a.left+d.x)/c.x,m=(a.top+d.y)/c.y,h=a.width/c.x,x=a.height/c.y;if(l){const y=Hn(l),b=s&&hr(s)?Hn(s):s;let C=y,k=jp(C);for(;k&&s&&b!==C;){const j=Ho(k),S=k.getBoundingClientRect(),T=mr(k),N=S.left+(k.clientLeft+parseFloat(T.paddingLeft))*j.x,A=S.top+(k.clientTop+parseFloat(T.paddingTop))*j.y;f*=j.x,m*=j.y,h*=j.x,x*=j.y,f+=N,m+=A,C=Hn(k),k=jp(C)}}return Rc({width:h,height:x,x:f,y:m})}function su(e,t){const n=ru(e).scrollLeft;return t?t.left+n:Js(_r(e)).left+n}function kj(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-su(e,n),a=n.top+t.scrollTop;return{x:s,y:a}}function oO(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const l=a==="fixed",c=_r(s),d=t?nu(t.floating):!1;if(s===c||d&&l)return n;let f={scrollLeft:0,scrollTop:0},m=Rr(1);const h=Rr(0),x=Zr(s);if((x||!x&&!l)&&((ai(s)!=="body"||Ma(c))&&(f=ru(s)),x)){const b=Js(s);m=Ho(s),h.x=b.x+s.clientLeft,h.y=b.y+s.clientTop}const y=c&&!x&&!l?kj(c,f):Rr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-f.scrollLeft*m.x+h.x+y.x,y:n.y*m.y-f.scrollTop*m.y+h.y+y.y}}function iO(e){return Array.from(e.getClientRects())}function aO(e){const t=_r(e),n=ru(e),s=e.ownerDocument.body,a=zn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=zn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let c=-n.scrollLeft+su(e);const d=-n.scrollTop;return mr(s).direction==="rtl"&&(c+=zn(t.clientWidth,s.clientWidth)-a),{width:a,height:l,x:c,y:d}}const Rv=25;function lO(e,t){const n=Hn(e),s=_r(e),a=n.visualViewport;let l=s.clientWidth,c=s.clientHeight,d=0,f=0;if(a){l=a.width,c=a.height;const h=Bh();(!h||h&&t==="fixed")&&(d=a.offsetLeft,f=a.offsetTop)}const m=su(s);if(m<=0){const h=s.ownerDocument,x=h.body,y=getComputedStyle(x),b=h.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(s.clientWidth-x.clientWidth-b);C<=Rv&&(l-=C)}else m<=Rv&&(l+=m);return{width:l,height:c,x:d,y:f}}function cO(e,t){const n=Js(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,l=Zr(e)?Ho(e):Rr(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,f=a*l.x,m=s*l.y;return{width:c,height:d,x:f,y:m}}function Av(e,t,n){let s;if(t==="viewport")s=lO(e,n);else if(t==="document")s=aO(_r(e));else if(hr(t))s=cO(t,n);else{const a=jj(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Rc(s)}function Sj(e,t){const n=Ts(e);return n===t||!hr(n)||Ko(n)?!1:mr(n).position==="fixed"||Sj(n,t)}function uO(e,t){const n=t.get(e);if(n)return n;let s=ja(e,[],!1).filter(d=>hr(d)&&ai(d)!=="body"),a=null;const l=mr(e).position==="fixed";let c=l?Ts(e):e;for(;hr(c)&&!Ko(c);){const d=mr(c),f=zh(c);!f&&d.position==="fixed"&&(a=null),(l?!f&&!a:!f&&d.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Ma(c)&&!f&&Sj(e,c))?s=s.filter(h=>h!==c):a=d,c=Ts(c)}return t.set(e,s),s}function dO(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const c=[...n==="clippingAncestors"?nu(t)?[]:uO(t,this._c):[].concat(n),s],d=Av(t,c[0],a);let f=d.top,m=d.right,h=d.bottom,x=d.left;for(let y=1;y<c.length;y++){const b=Av(t,c[y],a);f=zn(b.top,f),m=Ps(b.right,m),h=Ps(b.bottom,h),x=zn(b.left,x)}return{width:m-x,height:h-f,x,y:f}}function fO(e){const{width:t,height:n}=wj(e);return{width:t,height:n}}function pO(e,t,n){const s=Zr(t),a=_r(t),l=n==="fixed",c=Js(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const f=Rr(0);function m(){f.x=su(a)}if(s||!s&&!l)if((ai(t)!=="body"||Ma(a))&&(d=ru(t)),s){const b=Js(t,!0,l,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}else a&&m();l&&!s&&a&&m();const h=a&&!s&&!l?kj(a,d):Rr(0),x=c.left+d.scrollLeft-f.x-h.x,y=c.top+d.scrollTop-f.y-h.y;return{x,y,width:c.width,height:c.height}}function Lf(e){return mr(e).position==="static"}function Dv(e,t){if(!Zr(e)||mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _r(e)===n&&(n=n.ownerDocument.body),n}function Nj(e,t){const n=Hn(e);if(nu(e))return n;if(!Zr(e)){let a=Ts(e);for(;a&&!Ko(a);){if(hr(a)&&!Lf(a))return a;a=Ts(a)}return n}let s=Dv(e,t);for(;s&&ZL(s)&&Lf(s);)s=Dv(s,t);return s&&Ko(s)&&Lf(s)&&!zh(s)?n:s||nO(e)||n}const hO=async function(e){const t=this.getOffsetParent||Nj,n=this.getDimensions,s=await n(e.floating);return{reference:pO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function mO(e){return mr(e).direction==="rtl"}const gO={convertOffsetParentRelativeRectToViewportRelativeRect:oO,getDocumentElement:_r,getClippingRect:dO,getOffsetParent:Nj,getElementRects:hO,getClientRects:iO,getDimensions:fO,getScale:Ho,isElement:hr,isRTL:mO};function Cj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xO(e,t){let n=null,s;const a=_r(e);function l(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function c(d,f){d===void 0&&(d=!1),f===void 0&&(f=1),l();const m=e.getBoundingClientRect(),{left:h,top:x,width:y,height:b}=m;if(d||t(),!y||!b)return;const C=nc(x),k=nc(a.clientWidth-(h+y)),j=nc(a.clientHeight-(x+b)),S=nc(h),N={rootMargin:-C+"px "+-k+"px "+-j+"px "+-S+"px",threshold:zn(0,Ps(1,f))||1};let A=!0;function L(R){const D=R[0].intersectionRatio;if(D!==f){if(!A)return c();D?c(!1,D):s=setTimeout(()=>{c(!1,1e-7)},1e3)}D===1&&!Cj(m,e.getBoundingClientRect())&&c(),A=!1}try{n=new IntersectionObserver(L,{...N,root:a.ownerDocument})}catch{n=new IntersectionObserver(L,N)}n.observe(e)}return c(!0),l}function yO(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,m=Uh(e),h=a||l?[...m?ja(m):[],...t?ja(t):[]]:[];h.forEach(S=>{a&&S.addEventListener("scroll",n,{passive:!0}),l&&S.addEventListener("resize",n)});const x=m&&d?xO(m,n):null;let y=-1,b=null;c&&(b=new ResizeObserver(S=>{let[T]=S;T&&T.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var N;(N=b)==null||N.observe(t)})),n()}),m&&!f&&b.observe(m),t&&b.observe(t));let C,k=f?Js(e):null;f&&j();function j(){const S=Js(e);k&&!Cj(k,S)&&n(),k=S,C=requestAnimationFrame(j)}return n(),()=>{var S;h.forEach(T=>{a&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,f&&cancelAnimationFrame(C)}}const vO=YL,bO=XL,wO=qL,jO=JL,kO=KL,Iv=VL,SO=QL,NO=(e,t,n)=>{const s=new Map,a={platform:gO,...n},l={...a.platform,_c:s};return WL(e,t,{...a,platform:l})};var CO=typeof document<"u",EO=function(){},hc=CO?g.useLayoutEffect:EO;function Ac(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,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!Ac(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const l=a[s];if(!(l==="_owner"&&e.$$typeof)&&!Ac(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function Ej(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lv(e,t){const n=Ej(e);return Math.round(t*n)/n}function Of(e){const t=g.useRef(e);return hc(()=>{t.current=e}),t}function PO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:f,open:m}=e,[h,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,b]=g.useState(s);Ac(y,s)||b(s);const[C,k]=g.useState(null),[j,S]=g.useState(null),T=g.useCallback(U=>{U!==R.current&&(R.current=U,k(U))},[]),N=g.useCallback(U=>{U!==D.current&&(D.current=U,S(U))},[]),A=l||C,L=c||j,R=g.useRef(null),D=g.useRef(null),O=g.useRef(h),G=f!=null,re=Of(f),z=Of(a),K=Of(m),q=g.useCallback(()=>{if(!R.current||!D.current)return;const U={placement:t,strategy:n,middleware:y};z.current&&(U.platform=z.current),NO(R.current,D.current,U).then(Z=>{const P={...Z,isPositioned:K.current!==!1};J.current&&!Ac(O.current,P)&&(O.current=P,Cs.flushSync(()=>{x(P)}))})},[y,t,n,z,K]);hc(()=>{m===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,x(U=>({...U,isPositioned:!1})))},[m]);const J=g.useRef(!1);hc(()=>(J.current=!0,()=>{J.current=!1}),[]),hc(()=>{if(A&&(R.current=A),L&&(D.current=L),A&&L){if(re.current)return re.current(A,L,q);q()}},[A,L,q,re,G]);const _=g.useMemo(()=>({reference:R,floating:D,setReference:T,setFloating:N}),[T,N]),F=g.useMemo(()=>({reference:A,floating:L}),[A,L]),B=g.useMemo(()=>{const U={position:n,left:0,top:0};if(!F.floating)return U;const Z=Lv(F.floating,h.x),P=Lv(F.floating,h.y);return d?{...U,transform:"translate("+Z+"px, "+P+"px)",...Ej(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Z,top:P}},[n,d,F.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:q,refs:_,elements:F,floatingStyles:B}),[h,q,_,F,B])}const TO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?Iv({element:s.current,padding:a}).fn(n):{}:s?Iv({element:s,padding:a}).fn(n):{}}}},RO=(e,t)=>{const n=vO(e);return{name:n.name,fn:n.fn,options:[e,t]}},AO=(e,t)=>{const n=bO(e);return{name:n.name,fn:n.fn,options:[e,t]}},DO=(e,t)=>({fn:SO(e).fn,options:[e,t]}),IO=(e,t)=>{const n=wO(e);return{name:n.name,fn:n.fn,options:[e,t]}},LO=(e,t)=>{const n=jO(e);return{name:n.name,fn:n.fn,options:[e,t]}},OO=(e,t)=>{const n=kO(e);return{name:n.name,fn:n.fn,options:[e,t]}},MO=(e,t)=>{const n=TO(e);return{name:n.name,fn:n.fn,options:[e,t]}};var _O="Arrow",Pj=g.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...l}=e;return o.jsx(Ft.svg,{...l,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:o.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pj.displayName=_O;var $O=Pj;function FO(e){const[t,n]=g.useState(void 0);return Es(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let c,d;if("borderBoxSize"in l){const f=l.borderBoxSize,m=Array.isArray(f)?f[0]:f;c=m.inlineSize,d=m.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var Hh="Popper",[Tj,Rj]=Zs(Hh),[zO,Aj]=Tj(Hh),Dj=e=>{const{__scopePopper:t,children:n}=e,[s,a]=g.useState(null);return o.jsx(zO,{scope:t,anchor:s,onAnchorChange:a,children:n})};Dj.displayName=Hh;var Ij="PopperAnchor",Lj=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,l=Aj(Ij,n),c=g.useRef(null),d=mn(t,c),f=g.useRef(null);return g.useEffect(()=>{const m=f.current;f.current=(s==null?void 0:s.current)||c.current,m!==f.current&&l.onAnchorChange(f.current)}),s?null:o.jsx(Ft.div,{...a,ref:d})});Lj.displayName=Ij;var Wh="PopperContent",[BO,UO]=Tj(Wh),Oj=g.forwardRef((e,t)=>{var fe,be,ke,we,Ye,Xe;const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:x="partial",hideWhenDetached:y=!1,updatePositionStrategy:b="optimized",onPlaced:C,...k}=e,j=Aj(Wh,n),[S,T]=g.useState(null),N=mn(t,ne=>T(ne)),[A,L]=g.useState(null),R=FO(A),D=(R==null?void 0:R.width)??0,O=(R==null?void 0:R.height)??0,G=s+(l!=="center"?"-"+l:""),re=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},z=Array.isArray(m)?m:[m],K=z.length>0,q={padding:re,boundary:z.filter(WO),altBoundary:K},{refs:J,floatingStyles:_,placement:F,isPositioned:B,middlewareData:U}=PO({strategy:"fixed",placement:G,whileElementsMounted:(...ne)=>yO(...ne,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[RO({mainAxis:a+O,alignmentAxis:c}),f&&AO({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?DO():void 0,...q}),f&&IO({...q}),LO({...q,apply:({elements:ne,rects:Y,availableWidth:ae,availableHeight:xe})=>{const{width:qe,height:Oe}=Y.reference,Ue=ne.floating.style;Ue.setProperty("--radix-popper-available-width",`${ae}px`),Ue.setProperty("--radix-popper-available-height",`${xe}px`),Ue.setProperty("--radix-popper-anchor-width",`${qe}px`),Ue.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),A&&MO({element:A,padding:d}),VO({arrowWidth:D,arrowHeight:O}),y&&OO({strategy:"referenceHidden",...q})]}),[Z,P]=$j(F),M=Xs(C);Es(()=>{B&&(M==null||M())},[B,M]);const Q=(fe=U.arrow)==null?void 0:fe.x,I=(be=U.arrow)==null?void 0:be.y,ge=((ke=U.arrow)==null?void 0:ke.centerOffset)!==0,[Ne,te]=g.useState();return Es(()=>{S&&te(window.getComputedStyle(S).zIndex)},[S]),o.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:B?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[(we=U.transformOrigin)==null?void 0:we.x,(Ye=U.transformOrigin)==null?void 0:Ye.y].join(" "),...((Xe=U.hide)==null?void 0:Xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:o.jsx(BO,{scope:n,placedSide:Z,onArrowChange:L,arrowX:Q,arrowY:I,shouldHideArrow:ge,children:o.jsx(Ft.div,{"data-side":Z,"data-align":P,...k,ref:N,style:{...k.style,animation:B?void 0:"none"}})})})});Oj.displayName=Wh;var Mj="PopperArrow",HO={top:"bottom",right:"left",bottom:"top",left:"right"},_j=g.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,l=UO(Mj,s),c=HO[l.placedSide];return o.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:o.jsx($O,{...a,ref:n,style:{...a.style,display:"block"}})})});_j.displayName=Mj;function WO(e){return e!==null}var VO=e=>({name:"transformOrigin",options:e,fn(t){var j,S,T;const{placement:n,rects:s,middlewareData:a}=t,c=((j=a.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[m,h]=$j(n),x={start:"0%",center:"50%",end:"100%"}[h],y=(((S=a.arrow)==null?void 0:S.x)??0)+d/2,b=(((T=a.arrow)==null?void 0:T.y)??0)+f/2;let C="",k="";return m==="bottom"?(C=c?x:`${y}px`,k=`${-f}px`):m==="top"?(C=c?x:`${y}px`,k=`${s.floating.height+f}px`):m==="right"?(C=`${-f}px`,k=c?x:`${b}px`):m==="left"&&(C=`${s.floating.width+f}px`,k=c?x:`${b}px`),{data:{x:C,y:k}}}});function $j(e){const[t,n="center"]=e.split("-");return[t,n]}var qO=Dj,KO=Lj,GO=Oj,YO=_j,XO=Symbol("radix.slottable");function QO(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=XO,t}var JO=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),ZO="VisuallyHidden",Fj=g.forwardRef((e,t)=>o.jsx(Ft.span,{...e,ref:t,style:{...JO,...e.style}}));Fj.displayName=ZO;var eM=Fj,[ou]=Zs("Tooltip",[Rj]),iu=Rj(),zj="TooltipProvider",tM=700,kp="tooltip.open",[nM,Vh]=ou(zj),Bj=e=>{const{__scopeTooltip:t,delayDuration:n=tM,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:l}=e,c=g.useRef(!0),d=g.useRef(!1),f=g.useRef(0);return g.useEffect(()=>{const m=f.current;return()=>window.clearTimeout(m)},[]),o.jsx(nM,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(f.current),c.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(m=>{d.current=m},[]),disableHoverableContent:a,children:l})};Bj.displayName=zj;var ka="Tooltip",[rM,_a]=ou(ka),Uj=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:a,onOpenChange:l,disableHoverableContent:c,delayDuration:d}=e,f=Vh(ka,e.__scopeTooltip),m=iu(t),[h,x]=g.useState(null),y=$o(),b=g.useRef(0),C=c??f.disableHoverableContent,k=d??f.delayDuration,j=g.useRef(!1),[S,T]=zc({prop:s,defaultProp:a??!1,onChange:D=>{D?(f.onOpen(),document.dispatchEvent(new CustomEvent(kp))):f.onClose(),l==null||l(D)},caller:ka}),N=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),A=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,T(!0)},[T]),L=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,T(!1)},[T]),R=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,T(!0),b.current=0},k)},[k,T]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),o.jsx(qO,{...m,children:o.jsx(rM,{scope:t,contentId:y,open:S,stateAttribute:N,trigger:h,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{f.isOpenDelayedRef.current?R():A()},[f.isOpenDelayedRef,R,A]),onTriggerLeave:g.useCallback(()=>{C?L():(window.clearTimeout(b.current),b.current=0)},[L,C]),onOpen:A,onClose:L,disableHoverableContent:C,children:n})})};Uj.displayName=ka;var Sp="TooltipTrigger",Hj=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=_a(Sp,n),l=Vh(Sp,n),c=iu(n),d=g.useRef(null),f=mn(t,d,a.onTriggerChange),m=g.useRef(!1),h=g.useRef(!1),x=g.useCallback(()=>m.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),o.jsx(KO,{asChild:!0,...c,children:o.jsx(Ft.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:f,onPointerMove:yt(e.onPointerMove,y=>{y.pointerType!=="touch"&&!h.current&&!l.isPointerInTransitRef.current&&(a.onTriggerEnter(),h.current=!0)}),onPointerLeave:yt(e.onPointerLeave,()=>{a.onTriggerLeave(),h.current=!1}),onPointerDown:yt(e.onPointerDown,()=>{a.open&&a.onClose(),m.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:yt(e.onFocus,()=>{m.current||a.onOpen()}),onBlur:yt(e.onBlur,a.onClose),onClick:yt(e.onClick,a.onClose)})})});Hj.displayName=Sp;var qh="TooltipPortal",[sM,oM]=ou(qh,{forceMount:void 0}),Wj=e=>{const{__scopeTooltip:t,forceMount:n,children:s,container:a}=e,l=_a(qh,t);return o.jsx(sM,{scope:t,forceMount:n,children:o.jsx(eo,{present:n||l.open,children:o.jsx(Xp,{asChild:!0,container:a,children:s})})})};Wj.displayName=qh;var Go="TooltipContent",Vj=g.forwardRef((e,t)=>{const n=oM(Go,e.__scopeTooltip),{forceMount:s=n.forceMount,side:a="top",...l}=e,c=_a(Go,e.__scopeTooltip);return o.jsx(eo,{present:s||c.open,children:c.disableHoverableContent?o.jsx(qj,{side:a,...l,ref:t}):o.jsx(iM,{side:a,...l,ref:t})})}),iM=g.forwardRef((e,t)=>{const n=_a(Go,e.__scopeTooltip),s=Vh(Go,e.__scopeTooltip),a=g.useRef(null),l=mn(t,a),[c,d]=g.useState(null),{trigger:f,onClose:m}=n,h=a.current,{onPointerInTransitChange:x}=s,y=g.useCallback(()=>{d(null),x(!1)},[x]),b=g.useCallback((C,k)=>{const j=C.currentTarget,S={x:C.clientX,y:C.clientY},T=dM(S,j.getBoundingClientRect()),N=fM(S,T),A=pM(k.getBoundingClientRect()),L=mM([...N,...A]);d(L),x(!0)},[x]);return g.useEffect(()=>()=>y(),[y]),g.useEffect(()=>{if(f&&h){const C=j=>b(j,h),k=j=>b(j,f);return f.addEventListener("pointerleave",C),h.addEventListener("pointerleave",k),()=>{f.removeEventListener("pointerleave",C),h.removeEventListener("pointerleave",k)}}},[f,h,b,y]),g.useEffect(()=>{if(c){const C=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},T=(f==null?void 0:f.contains(j))||(h==null?void 0:h.contains(j)),N=!hM(S,c);T?y():N&&(y(),m())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[f,h,c,m,y]),o.jsx(qj,{...e,ref:l})}),[aM,lM]=ou(ka,{isInside:!1}),cM=QO("TooltipContent"),qj=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=e,f=_a(Go,n),m=iu(n),{onClose:h}=f;return g.useEffect(()=>(document.addEventListener(kp,h),()=>document.removeEventListener(kp,h)),[h]),g.useEffect(()=>{if(f.trigger){const x=y=>{const b=y.target;b!=null&&b.contains(f.trigger)&&h()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[f.trigger,h]),o.jsx(Yp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:h,children:o.jsxs(GO,{"data-state":f.stateAttribute,...m,...d,ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[o.jsx(cM,{children:s}),o.jsx(aM,{scope:n,isInside:!0,children:o.jsx(eM,{id:f.contentId,role:"tooltip",children:a||s})})]})})});Vj.displayName=Go;var Kj="TooltipArrow",uM=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=iu(n);return lM(Kj,n).isInside?null:o.jsx(YO,{...a,...s,ref:t})});uM.displayName=Kj;function dM(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,s,a,l)){case l:return"left";case a:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function fM(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function pM(e){const{top:t,right:n,bottom:s,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:s},{x:a,y:s}]}function hM(e,t){const{x:n,y:s}=e;let a=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],f=t[c],m=d.x,h=d.y,x=f.x,y=f.y;h>s!=y>s&&n<(x-m)*(s-h)/(y-h)+m&&(a=!a)}return a}function mM(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),gM(t)}function gM(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(a.y-c.y)>=(l.y-c.y)*(a.x-c.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const a=e[s];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(a.y-c.y)>=(l.y-c.y)*(a.x-c.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var xM=Bj,yM=Uj,vM=Hj,bM=Wj,Gj=Vj;const da=xM,fa=yM,pa=vM,Wo=g.forwardRef(({className:e,sideOffset:t=4,...n},s)=>o.jsx(bM,{children:o.jsx(Gj,{ref:s,sideOffset:t,className:Be("z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Wo.displayName=Gj.displayName;function wM({item:e,copiedId:t,selected:n,onToggleSelected:s,onMoveOne:a,onCycleStatus:l,onStatusChange:c,onCopyId:d,onDelete:f,disabled:m,hotkeyRowProps:h}){const{attributes:x,listeners:y,setNodeRef:b,setActivatorNodeRef:C,transform:k,transition:j,isDragging:S}=pj({id:e.id,disabled:m}),T={transform:qo.Transform.toString(k),transition:j,zIndex:S?50:void 0,position:S?"relative":void 0};return o.jsxs("div",{ref:b,style:T,"data-todo-id":e.id,...h??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${S?"opacity-50 shadow-lg":""}`,onClick:()=>l(e.id,e.status),children:[o.jsx("input",{type:"checkbox","aria-label":`Select todo ${e.id}`,checked:n,onChange:N=>s(e.id,N),onClick:N=>N.stopPropagation(),className:"h-4 w-4 cursor-pointer accent-foreground"}),!m&&o.jsx("button",{ref:C,...x,...y,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:N=>N.stopPropagation(),children:o.jsx(jb,{className:"h-4 w-4"})}),o.jsx(Mh,{status:e.status,onChange:N=>c(e.id,N)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&o.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(N=>`#${N}`).join(" ")}),e.session&&o.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]}),o.jsx(Yj,{item:e})]}),t===e.id?o.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[o.jsx(Ea,{className:"h-3 w-3"})," Copied to clipboard"]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:N=>d(N,e.id),children:["t:",e.id]}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:N=>d(N,e.id),children:o.jsx(Mc,{className:"h-3 w-3"})}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Move to...",onClick:N=>a(e.id,N),children:o.jsx(yb,{className:"h-3 w-3"})}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:N=>f(N,e.id,e.description),children:o.jsx(Or,{className:"h-3 w-3"})})]})]})}function Yj({item:e}){return!(e.branch||e.planDir||e.worktreePath||e.createdAt||e.updatedAt)?null:o.jsxs("span",{className:"inline-flex items-center gap-1 ml-2 align-middle",children:[e.branch?o.jsx(da,{delayDuration:120,children:o.jsxs(fa,{children:[o.jsx(pa,{asChild:!0,children:o.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-info-foreground/30 bg-info/30 px-1.5 py-0.5 text-[10px] font-mono text-info-foreground",children:[o.jsx(_p,{className:"h-2.5 w-2.5"}),o.jsx("span",{className:"max-w-[120px] truncate",children:e.branch})]})}),o.jsx(Wo,{children:e.branch})]})}):null,e.planDir?o.jsx(da,{delayDuration:120,children:o.jsxs(fa,{children:[o.jsx(pa,{asChild:!0,children:o.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),navigator.clipboard.writeText(e.planDir)},className:"inline-flex items-center rounded-full border border-status-completed-foreground/40 bg-status-completed/30 p-1 text-status-completed-foreground hover:bg-status-completed/50","aria-label":"Copy plan directory path",children:o.jsx(wb,{className:"h-2.5 w-2.5"})})}),o.jsxs(Wo,{children:["Plan: ",e.planDir]})]})}):null,e.worktreePath||e.createdAt||e.updatedAt?o.jsx(da,{delayDuration:120,children:o.jsxs(fa,{children:[o.jsx(pa,{asChild:!0,children:o.jsx("span",{className:"text-[10px] text-muted-foreground/60 cursor-default",children:"·"})}),o.jsx(Wo,{children:o.jsxs("div",{className:"space-y-0.5 text-xs font-mono",children:[e.worktreePath?o.jsxs("div",{children:["worktree: ",e.worktreePath]}):null,e.createdAt?o.jsxs("div",{children:["created: ",e.createdAt]}):null,e.updatedAt?o.jsxs("div",{children:["updated: ",e.updatedAt]}):null]})})]})}):null]})}function jM(){const{workspace:e}=mt(),t=e||"_global",{data:n,loading:s,error:a,refetch:l}=iE(t),[c,d]=g.useState(""),[f,m]=g.useState(""),[h,x]=g.useState(""),[y,b]=g.useState(""),[C,k]=g.useState(null),[j,S]=g.useState(new Set),[T,N]=g.useState(!1),[A,L]=g.useState(!1),[R,D]=g.useState(null),O=g.useRef(null);ro("list:todos");const G=!!(c.trim()||f||h),re=q0(Cc(Qc,{activationConstraint:{distance:8}}),Cc(Xc));function z(Y,ae){Y.stopPropagation(),navigator.clipboard.writeText(ae),k(ae),setTimeout(()=>k(xe=>xe===ae?null:xe),1500)}const K=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const Y=new Set;for(const ae of n.items)for(const xe of ae.tags)Y.add(xe);return Array.from(Y).sort()},[n]),q=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let Y=n.items;if(c.trim()){const ae=c.toLowerCase();Y=Y.filter(xe=>xe.description.toLowerCase().includes(ae)||xe.tags.some(qe=>qe.toLowerCase().includes(ae))||xe.id.includes(ae))}return f&&(Y=Y.filter(ae=>ae.status===f)),h&&(Y=Y.filter(ae=>ae.tags.includes(h))),Y},[n,c,f,h]);g.useEffect(()=>{S(new Set)},[c,f,h,t]);const J=g.useMemo(()=>q.filter(Y=>j.has(Y.id)).length,[q,j]),_=q.length>0&&J===q.length,F=J>0&&!_;function B(Y){S(ae=>{const xe=new Set(ae);return xe.has(Y)?xe.delete(Y):xe.add(Y),xe})}function U(){S(Y=>{const ae=new Set(Y);if(_)for(const xe of q)ae.delete(xe.id);else for(const xe of q)ae.add(xe.id);return ae})}function Z(){S(new Set)}const P=R?[R]:Array.from(j);function M(){S(new Set),D(null),l()}function Q(){S(new Set),l()}async function I(){y.trim()&&(await Gp(t,y.trim()),b(""),l())}const ge={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function Ne(Y,ae){fe(Y,ge[ae]||"open")}async function te(Y,ae,xe){Y.stopPropagation(),window.confirm(`Delete "${xe}"? This can't be undone.`)&&(await nw(t,ae),l())}async function fe(Y,ae){switch(ae){case"open":await tw(t,Y);break;case"in_progress":await ew(t,Y);break;case"completed":await Jb(t,Y);break;case"blocked":await Zb(t,Y);break}l()}const{hotkeyRowProps:be}=Ta(q,{scope:"list:todos",bindO:!1,onOpen:Y=>Ne(Y.id,Y.status)});xt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var Y;return(Y=O.current)==null?void 0:Y.focus()}}),xt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>l()});const[ke,we]=Lr(),Ye=ke.get("focus");g.useEffect(()=>{if(!Ye)return;const Y=document.querySelector(`[data-todo-id="${window.CSS.escape(Ye)}"]`);if(!Y)return;Y.scrollIntoView({block:"nearest"}),Y.classList.add("ring-2","ring-primary/60");const ae=window.setTimeout(()=>{Y.classList.remove("ring-2","ring-primary/60"),we(xe=>{const qe=new URLSearchParams(xe);return qe.delete("focus"),qe})},1500);return()=>window.clearTimeout(ae)},[Ye,q.length,we]);async function Xe(Y){const{active:ae,over:xe}=Y;if(!xe||ae.id===xe.id||!(n!=null&&n.items))return;const qe=n.items.findIndex(Ge=>Ge.id===ae.id),Oe=n.items.findIndex(Ge=>Ge.id===xe.id);if(qe===-1||Oe===-1)return;const Ue=eu(n.items,qe,Oe);await aE(t,Ue.map(Ge=>Ge.id)),l()}if(s)return o.jsx(rt,{label:"Loading todos..."});if(a)return o.jsx(Je,{error:a});const ne=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[o.jsx(ot,{label:"Open",value:ne.open,icon:Un}),o.jsx(ot,{label:"In Progress",value:ne.in_progress,icon:Un,tone:"info"}),o.jsx(ot,{label:"Blocked",value:ne.blocked,icon:Qo,tone:"warn"}),o.jsx(ot,{label:"Total",value:ne.total,icon:Un})]}),o.jsx("div",{className:"surface-panel p-3",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"text",placeholder:"Add a todo...",value:y,onChange:Y=>b(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&I(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),o.jsxs("button",{onClick:I,disabled:!y.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[o.jsx(Vt,{className:"h-4 w-4"}),"Add"]})]})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1 max-w-sm",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{ref:O,type:"text",placeholder:"Search...",value:c,onChange:Y=>d(Y.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs("select",{value:f,onChange:Y=>m(Y.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All statuses"}),o.jsx("option",{value:"open",children:"Open"}),o.jsx("option",{value:"in_progress",children:"In Progress"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"blocked",children:"Blocked"})]}),K.length>0&&o.jsxs("select",{value:h,onChange:Y=>x(Y.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All tags"}),K.map(Y=>o.jsxs("option",{value:Y,children:["#",Y]},Y))]})]}),j.size>0?o.jsxs("div",{className:"surface-panel flex items-center justify-between gap-3 px-3 py-2",children:[o.jsxs("span",{className:"text-sm font-medium",children:[j.size," selected"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>N(!0),className:"shell-action bg-foreground text-background hover:opacity-90",children:"Promote selected"}),o.jsx("button",{type:"button",onClick:()=>{D(null),L(!0)},className:"shell-action",children:"Move to…"}),o.jsx("button",{type:"button",onClick:Z,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]})]}):null,q.length===0?o.jsx(et,{title:"No todos",description:"Add your first todo above."}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3 px-3 py-1 text-xs text-muted-foreground",children:[o.jsx("input",{type:"checkbox","aria-label":"Select all visible todos",checked:_,ref:Y=>{Y&&(Y.indeterminate=F)},onChange:U,className:"h-4 w-4 cursor-pointer accent-foreground"}),o.jsxs("span",{children:["Select all in current filter (",q.length,")"]})]}),o.jsx(ij,{sensors:re,collisionDetection:K0,onDragEnd:Xe,children:o.jsx(dj,{items:q.map(Y=>Y.id),strategy:lj,children:o.jsx("div",{className:"space-y-1",children:q.map((Y,ae)=>o.jsx(wM,{item:Y,copiedId:C,selected:j.has(Y.id),onToggleSelected:xe=>B(xe),onMoveOne:(xe,qe)=>{qe.stopPropagation(),D(xe),L(!0)},onCycleStatus:Ne,onStatusChange:fe,onCopyId:z,onDelete:te,disabled:G,hotkeyRowProps:be(ae)},Y.id))})})})]}),o.jsx(mj,{open:T,selectedIds:Array.from(j),scope:{kind:"workspace",workspace:t},onOpenChange:N,onDone:Q}),o.jsx(gj,{open:A,selectedIds:P,scope:{kind:"workspace",workspace:t},onOpenChange:Y=>{L(Y),Y||D(null)},onDone:M})]})}function kM({item:e,copiedId:t,selected:n,onToggleSelected:s,onMoveOne:a,onCycleStatus:l,onStatusChange:c,onCopyId:d,onDelete:f,disabled:m,hotkeyRowProps:h}){const{attributes:x,listeners:y,setNodeRef:b,setActivatorNodeRef:C,transform:k,transition:j,isDragging:S}=pj({id:e.id,disabled:m}),T={transform:qo.Transform.toString(k),transition:j,zIndex:S?50:void 0,position:S?"relative":void 0};return o.jsxs("div",{ref:b,style:T,"data-todo-id":e.id,...h??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${S?"opacity-50 shadow-lg":""}`,onClick:()=>l(e.id,e.status),children:[o.jsx("input",{type:"checkbox","aria-label":`Select todo ${e.id}`,checked:n,onChange:N=>s(e.id,N),onClick:N=>N.stopPropagation(),className:"h-4 w-4 cursor-pointer accent-foreground"}),!m&&o.jsx("button",{ref:C,...x,...y,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:N=>N.stopPropagation(),children:o.jsx(jb,{className:"h-4 w-4"})}),o.jsx(Mh,{status:e.status,onChange:N=>c(e.id,N)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&o.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(N=>`#${N}`).join(" ")}),e.session&&o.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]}),o.jsx(Yj,{item:e})]}),t===e.id?o.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[o.jsx(Ea,{className:"h-3 w-3"})," Copied to clipboard"]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:N=>d(N,e.id),children:["t:",e.id]}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:N=>d(N,e.id),children:o.jsx(Mc,{className:"h-3 w-3"})}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Move to...",onClick:N=>a(e.id,N),children:o.jsx(yb,{className:"h-3 w-3"})}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:N=>f(N,e.id,e.description),children:o.jsx(Or,{className:"h-3 w-3"})})]})]})}function SM({projectId:e}){const{data:t,loading:n,error:s,refetch:a}=jL(e),[l,c]=g.useState(""),[d,f]=g.useState(""),[m,h]=g.useState(""),[x,y]=g.useState(""),[b,C]=g.useState(null),[k,j]=g.useState(new Set),[S,T]=g.useState(!1),[N,A]=g.useState(!1),[L,R]=g.useState(null),D=g.useRef(null);ro("list:todos");const O=!!(l.trim()||d||m),G=q0(Cc(Qc,{activationConstraint:{distance:8}}),Cc(Xc));function re(ne,Y){ne.stopPropagation(),navigator.clipboard.writeText(Y),C(Y),setTimeout(()=>C(ae=>ae===Y?null:ae),1500)}const z=g.useMemo(()=>{if(!(t!=null&&t.items))return[];const ne=new Set;for(const Y of t.items)for(const ae of Y.tags)ne.add(ae);return Array.from(ne).sort()},[t]),K=g.useMemo(()=>{if(!(t!=null&&t.items))return[];let ne=t.items;if(l.trim()){const Y=l.toLowerCase();ne=ne.filter(ae=>ae.description.toLowerCase().includes(Y)||ae.tags.some(xe=>xe.toLowerCase().includes(Y))||ae.id.includes(Y))}return d&&(ne=ne.filter(Y=>Y.status===d)),m&&(ne=ne.filter(Y=>Y.tags.includes(m))),ne},[t,l,d,m]);g.useEffect(()=>{j(new Set)},[l,d,m,e]);const q=g.useMemo(()=>K.filter(ne=>k.has(ne.id)).length,[K,k]),J=K.length>0&&q===K.length,_=q>0&&!J;function F(ne){j(Y=>{const ae=new Set(Y);return ae.has(ne)?ae.delete(ne):ae.add(ne),ae})}function B(){j(ne=>{const Y=new Set(ne);if(J)for(const ae of K)Y.delete(ae.id);else for(const ae of K)Y.add(ae.id);return Y})}function U(){j(new Set)}const Z=L?[L]:Array.from(k);function P(){j(new Set),R(null),a()}function M(){j(new Set),a()}async function Q(){x.trim()&&(await kL(e,x.trim()),y(""),a())}const I={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function ge(ne,Y){te(ne,I[Y]||"open")}async function Ne(ne,Y,ae){ne.stopPropagation(),window.confirm(`Delete "${ae}"? This can't be undone.`)&&(await TL(e,Y),a())}async function te(ne,Y){switch(Y){case"open":await EL(e,ne);break;case"in_progress":await CL(e,ne);break;case"completed":await SL(e,ne);break;case"blocked":await NL(e,ne);break}a()}const{hotkeyRowProps:fe}=Ta(K,{scope:"list:todos",bindO:!1,onOpen:ne=>ge(ne.id,ne.status)});xt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var ne;return(ne=D.current)==null?void 0:ne.focus()}}),xt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>a()});const[be,ke]=Lr(),we=be.get("focus");g.useEffect(()=>{if(!we)return;const ne=document.querySelector(`[data-todo-id="${window.CSS.escape(we)}"]`);if(!ne)return;ne.scrollIntoView({block:"nearest"}),ne.classList.add("ring-2","ring-primary/60");const Y=window.setTimeout(()=>{ne.classList.remove("ring-2","ring-primary/60"),ke(ae=>{const xe=new URLSearchParams(ae);return xe.delete("focus"),xe},{replace:!0})},1500);return()=>window.clearTimeout(Y)},[we,K.length,ke]);async function Ye(ne){const{active:Y,over:ae}=ne;if(!ae||Y.id===ae.id||!(t!=null&&t.items))return;const xe=t.items.findIndex(Ue=>Ue.id===Y.id),qe=t.items.findIndex(Ue=>Ue.id===ae.id);if(xe===-1||qe===-1)return;const Oe=eu(t.items,xe,qe);await PL(e,Oe.map(Ue=>Ue.id)),a()}if(n)return o.jsx(rt,{label:"Loading todos..."});if(s)return o.jsx(Je,{error:s});const Xe=(t==null?void 0:t.counts)||{open:0,in_progress:0,blocked:0,total:0};return o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[o.jsx(ot,{label:"Open",value:Xe.open,icon:Un}),o.jsx(ot,{label:"In Progress",value:Xe.in_progress,icon:Un,tone:"info"}),o.jsx(ot,{label:"Blocked",value:Xe.blocked,icon:Qo,tone:"warn"}),o.jsx(ot,{label:"Total",value:Xe.total,icon:Un})]}),o.jsx("div",{className:"surface-panel p-3",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:ne=>y(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&Q(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),o.jsxs("button",{onClick:Q,disabled:!x.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[o.jsx(Vt,{className:"h-4 w-4"}),"Add"]})]})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1 max-w-sm",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{ref:D,type:"text",placeholder:"Search...",value:l,onChange:ne=>c(ne.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs("select",{value:d,onChange:ne=>f(ne.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All statuses"}),o.jsx("option",{value:"open",children:"Open"}),o.jsx("option",{value:"in_progress",children:"In Progress"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"blocked",children:"Blocked"})]}),z.length>0&&o.jsxs("select",{value:m,onChange:ne=>h(ne.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All tags"}),z.map(ne=>o.jsxs("option",{value:ne,children:["#",ne]},ne))]})]}),k.size>0?o.jsxs("div",{className:"surface-panel flex items-center justify-between gap-3 px-3 py-2",children:[o.jsxs("span",{className:"text-sm font-medium",children:[k.size," selected"]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>T(!0),className:"shell-action bg-foreground text-background hover:opacity-90",children:"Promote selected"}),o.jsx("button",{type:"button",onClick:()=>{R(null),A(!0)},className:"shell-action",children:"Move to…"}),o.jsx("button",{type:"button",onClick:U,className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear"})]})]}):null,K.length===0?o.jsx(et,{title:"No todos",description:"Add your first todo above."}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3 px-3 py-1 text-xs text-muted-foreground",children:[o.jsx("input",{type:"checkbox","aria-label":"Select all visible todos",checked:J,ref:ne=>{ne&&(ne.indeterminate=_)},onChange:B,className:"h-4 w-4 cursor-pointer accent-foreground"}),o.jsxs("span",{children:["Select all in current filter (",K.length,")"]})]}),o.jsx(ij,{sensors:G,collisionDetection:K0,onDragEnd:Ye,children:o.jsx(dj,{items:K.map(ne=>ne.id),strategy:lj,children:o.jsx("div",{className:"space-y-1",children:K.map((ne,Y)=>o.jsx(kM,{item:ne,copiedId:b,selected:k.has(ne.id),onToggleSelected:ae=>F(ae),onMoveOne:(ae,xe)=>{xe.stopPropagation(),R(ae),A(!0)},onCycleStatus:ge,onStatusChange:te,onCopyId:re,onDelete:Ne,disabled:O,hotkeyRowProps:fe(Y)},ne.id))})})})]}),o.jsx(mj,{open:S,selectedIds:Array.from(k),scope:{kind:"project",projectId:e},onOpenChange:T,onDone:M}),o.jsx(gj,{open:N,selectedIds:Z,scope:{kind:"project",projectId:e},onOpenChange:ne=>{A(ne),ne||R(null)},onDone:P})]})}const NM=new Set(["overview","assignments","todos","dependencies","knowledge"]);function Ov(){const{slug:e}=mt(),t=$t(),n=St();ro("project"),xt({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),xt({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:s,loading:a,error:l,refetch:c}=Gb(e),d=Wc(),{data:f}=Vp(),[m,h]=Lr(),x=m.get("tab"),y=x&&NM.has(x)?x:"overview";function b(z){h(K=>{const q=new URLSearchParams(K);return z==="overview"?q.delete("tab"):q.set("tab",z),q},{replace:!0})}const[C,k]=g.useState("board"),[j,S]=g.useState("all"),[T,N]=g.useState("all"),[A,L]=g.useState("all"),R=g.useMemo(()=>s?Object.fromEntries(s.assignments.flatMap(z=>{const K=`${t}/projects/${s.slug}/assignments/${z.slug}`;return[[z.slug,K],[z.title,K]]})):{},[s]);async function D(z){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:z})}),c()}async function O(z){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:z})}),c()}if(a)return o.jsx(rt,{label:"Loading project workspace…"});if(l||!s)return o.jsx(Je,{error:l||"Project not found."});const G=Array.from(new Set(s.assignments.map(z=>z.assignee).filter(Boolean))).sort(),re=s.assignments.filter(z=>!(j!=="all"&&z.status!==j||T!=="all"&&z.assignee!==T||A!=="all"&&z.priority!==A));return o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx(Zt,{status:s.status}),s.statusOverride&&o.jsx("button",{type:"button",className:"shell-action border-warning-foreground/40 text-warning-foreground",onClick:()=>D(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),o.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:z=>{z.target.value&&D(z.target.value)},title:"Override project status",children:[o.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(z=>o.jsx("option",{value:z.id,children:z.label},z.id)),o.jsx("option",{value:"active",children:"Active"})]}),f&&f.workspaces.length>0&&o.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:z=>{z.target.value==="_ungrouped"?O(null):z.target.value&&O(z.target.value)},title:"Move project to a different workspace",children:[o.jsx("option",{value:"",children:"Move to Workspace…"}),f.workspaces.filter(z=>z!==s.workspace).map(z=>o.jsx("option",{value:z,children:z},z)),s.workspace&&o.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),o.jsxs(ye,{className:"shell-action",to:`${t}/projects/${s.slug}/edit`,children:[o.jsx(Hx,{className:"h-4 w-4"}),o.jsx("span",{children:"Edit Project"})]}),o.jsxs(ye,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${s.slug}/create/assignment`,children:[o.jsx(Vt,{className:"h-4 w-4"}),o.jsx("span",{children:"New Assignment"})]}),o.jsx(fh,{externalIds:s.externalIds}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",Ar(s.created),". Last source update ",Rn(s.updated),"."]})]}),o.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[o.jsx(ot,{label:"Assignments",value:s.progress.total}),o.jsx(ot,{label:"In Progress",value:s.progress.in_progress??0,tone:"info"}),o.jsx(ot,{label:"Review",value:s.progress.review??0,tone:"info"}),o.jsx(ot,{label:"Blocked",value:s.progress.blocked??0,tone:"warn"}),o.jsx(ot,{label:"Completed",value:s.progress.completed??0,tone:"success"})]}),o.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[o.jsx("div",{className:"space-y-4",children:o.jsx(hh,{value:y,onValueChange:b,items:[{value:"overview",label:"Overview",content:o.jsx("div",{className:"space-y-5",children:o.jsx(Le,{title:"Project Overview",children:o.jsx(Mt,{content:s.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:s.assignments.length,content:o.jsx("div",{className:"space-y-5",children:o.jsx(Le,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("select",{value:j,onChange:z=>S(z.target.value),className:"editor-input max-w-[170px]",children:[o.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(z=>o.jsx("option",{value:z.id,children:z.label},z.id))]}),o.jsxs("select",{value:T,onChange:z=>N(z.target.value),className:"editor-input max-w-[170px]",children:[o.jsx("option",{value:"all",children:"All assignees"}),G.map(z=>o.jsx("option",{value:z??"",children:z},z))]}),o.jsxs("select",{value:A,onChange:z=>L(z.target.value),className:"editor-input max-w-[170px]",children:[o.jsx("option",{value:"all",children:"All priorities"}),o.jsx("option",{value:"low",children:"Low"}),o.jsx("option",{value:"medium",children:"Medium"}),o.jsx("option",{value:"high",children:"High"}),o.jsx("option",{value:"critical",children:"Critical"})]}),o.jsx(uh,{value:C,onChange:z=>k(z),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:re.length===0?o.jsx(et,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:o.jsx(ye,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${s.slug}/create/assignment`,children:"Create Assignment"})}):C==="board"?o.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:re.map(z=>o.jsx(CM,{projectSlug:s.slug,assignment:z},z.slug))}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[o.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),o.jsx("th",{className:"pb-3 font-medium",children:"Status"}),o.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),o.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),o.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),o.jsx("tbody",{children:re.map(z=>o.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[o.jsx("td",{className:"py-4",children:o.jsx(ye,{to:`${t}/projects/${s.slug}/assignments/${z.slug}`,className:"font-semibold text-foreground hover:text-primary",children:z.title})}),o.jsx("td",{className:"py-4",children:o.jsx(Zt,{status:z.status})}),o.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:z.priority}),o.jsx("td",{className:"py-4 text-muted-foreground",children:z.assignee??"—"}),o.jsx("td",{className:"py-4 text-muted-foreground",children:Ar(z.updated)})]},z.slug))})]})})})})},{value:"todos",label:"Todos",content:o.jsx(SM,{projectId:s.slug})},{value:"dependencies",label:"Dependencies",content:s.dependencyGraph?o.jsx(Le,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:o.jsx(vR,{definition:s.dependencyGraph,nodeRoutes:R})}):o.jsx(et,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:o.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[o.jsx(Le,{title:"Resources",description:"Shared project references.",actions:o.jsxs(ye,{className:"shell-action",to:`/resources/new?project=${s.slug}`,children:[o.jsx(Vt,{className:"h-4 w-4"}),o.jsx("span",{children:"New Resource"})]}),children:s.resources.length===0?o.jsx(et,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):o.jsx("div",{className:"space-y-3",children:s.resources.map(z=>o.jsxs(ye,{to:`/projects/${s.slug}/resources/${z.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:z.name}),o.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[z.category," · ",z.source]})]},z.slug))})}),o.jsx(Le,{title:"Memories",description:"Learnings and patterns captured during the project.",actions:o.jsxs(ye,{className:"shell-action",to:`/memories/new?project=${s.slug}`,children:[o.jsx(Vt,{className:"h-4 w-4"}),o.jsx("span",{children:"New Memory"})]}),children:s.memories.length===0?o.jsx(et,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):o.jsx("div",{className:"space-y-3",children:s.memories.map(z=>o.jsxs(ye,{to:`/projects/${s.slug}/memories/${z.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:z.name}),o.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[z.scope," · ",z.source]})]},z.slug))})})]})}]})}),o.jsxs("div",{className:"space-y-5",children:[o.jsx(Le,{title:"Progress Summary",children:o.jsx(bc,{progress:s.progress,showLegend:!0})}),o.jsx(Le,{title:"Attention",children:o.jsxs("dl",{className:"space-y-3 text-sm",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),o.jsx("dd",{className:"font-semibold text-foreground",children:s.needsAttention.blockedCount})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),o.jsx("dd",{className:"font-semibold text-foreground",children:s.needsAttention.failedCount})]}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),o.jsx("dd",{className:"font-semibold text-foreground",children:s.needsAttention.openQuestions})]})]})}),o.jsx(Le,{title:"Quick Links",children:o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs(ye,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${s.slug}/edit`,children:[o.jsx(Hx,{className:"h-4 w-4"}),"Edit project source"]}),o.jsxs(ye,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${s.slug}/create/assignment`,children:[o.jsx(Vt,{className:"h-4 w-4"}),"Create assignment"]}),o.jsxs(ye,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[o.jsx(gC,{className:"h-4 w-4"}),"Review project rules"]}),o.jsxs("button",{type:"button",onClick:()=>b("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[o.jsx(_p,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),s.archived?o.jsxs(Le,{title:"Archive Metadata",children:[o.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",s.archivedAt?Rn(s.archivedAt):"with no timestamp recorded","."]}),s.archivedReason?o.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.archivedReason}):null]}):null]})]})]})}function CM({projectSlug:e,assignment:t}){const n=$t();return o.jsxs(ye,{to:`${n}/projects/${e}/assignments/${t.slug}`,className:"block rounded-lg border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),o.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:t.id,children:[t.id.slice(0,8),o.jsx("span",{onClick:s=>{s.preventDefault(),s.stopPropagation()},children:o.jsx(Yr,{value:t.id})})]}),o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",Ar(t.updated)]})]}),o.jsx(Zt,{status:t.status})]}),o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[o.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),o.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),o.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[t.dependsOn.length," dependencies"]})]})]})}function Xj({open:e,action:t,assignmentTitle:n,loading:s=!1,onConfirm:a,onOpenChange:l}){const[c,d]=g.useState("");g.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const f=g.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const m=`${t.label} "${n}"`,h=s?"Applying...":t.label,x=c.trim()||void 0;return o.jsx(ei,{open:e,onOpenChange:y=>s?void 0:l(y),children:o.jsx(to,{className:"max-w-xl",children:o.jsxs("form",{className:"space-y-5",onSubmit:y=>{y.preventDefault(),a(x)},children:[o.jsxs(sh,{children:[o.jsx(no,{children:m}),o.jsx(Pa,{children:t.description})]}),t.warning?o.jsx("div",{className:"rounded-lg border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:t.warning}):null,o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:f}),o.jsx("textarea",{value:c,onChange:y=>d(y.target.value),autoFocus:!0,rows:4,disabled:s,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),o.jsxs(oh,{children:[o.jsx("button",{type:"button",onClick:()=>l(!1),disabled:s,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),o.jsx("button",{type:"submit",disabled:s,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:h})]})]})})})}var EM=Symbol("radix.slottable");function PM(e){const t=({children:n})=>o.jsx(o.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=EM,t}var Qj="AlertDialog",[TM]=Zs(Qj,[yw]),es=yw(),Jj=e=>{const{__scopeAlertDialog:t,...n}=e,s=es(t);return o.jsx(Lw,{...s,...n,modal:!0})};Jj.displayName=Qj;var RM="AlertDialogTrigger",AM=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,a=es(n);return o.jsx(ZP,{...a,...s,ref:t})});AM.displayName=RM;var DM="AlertDialogPortal",Zj=e=>{const{__scopeAlertDialog:t,...n}=e,s=es(t);return o.jsx(Ow,{...s,...n})};Zj.displayName=DM;var IM="AlertDialogOverlay",e1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,a=es(n);return o.jsx(eh,{...a,...s,ref:t})});e1.displayName=IM;var Vo="AlertDialogContent",[LM,OM]=TM(Vo),MM=PM("AlertDialogContent"),t1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:s,...a}=e,l=es(n),c=g.useRef(null),d=mn(t,c),f=g.useRef(null);return o.jsx(YP,{contentName:Vo,titleName:n1,docsSlug:"alert-dialog",children:o.jsx(LM,{scope:n,cancelRef:f,children:o.jsxs(th,{role:"alertdialog",...l,...a,ref:d,onOpenAutoFocus:yt(a.onOpenAutoFocus,m=>{var h;m.preventDefault(),(h=f.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[o.jsx(MM,{children:s}),o.jsx($M,{contentRef:c})]})})})});t1.displayName=Vo;var n1="AlertDialogTitle",r1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,a=es(n);return o.jsx(nh,{...a,...s,ref:t})});r1.displayName=n1;var s1="AlertDialogDescription",o1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,a=es(n);return o.jsx(rh,{...a,...s,ref:t})});o1.displayName=s1;var _M="AlertDialogAction",i1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,a=es(n);return o.jsx(Mw,{...a,...s,ref:t})});i1.displayName=_M;var a1="AlertDialogCancel",l1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...s}=e,{cancelRef:a}=OM(a1,n),l=es(n),c=mn(t,a);return o.jsx(Mw,{...l,...s,ref:c})});l1.displayName=a1;var $M=({contentRef:e})=>{const t=`\`${Vo}\` requires a description for the component to be accessible for screen reader users.
|
|
502
|
+
|
|
503
|
+
You can add a description to the \`${Vo}\` by passing a \`${s1}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
504
|
+
|
|
505
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Vo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
506
|
+
|
|
507
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},FM=Jj,zM=Zj,c1=e1,u1=t1,d1=i1,f1=l1,p1=r1,h1=o1;const BM=FM,UM=zM,m1=g.forwardRef(({className:e,...t},n)=>o.jsx(c1,{ref:n,className:Be("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));m1.displayName=c1.displayName;const g1=g.forwardRef(({className:e,...t},n)=>o.jsxs(UM,{children:[o.jsx(m1,{}),o.jsx(u1,{ref:n,className:Be("chrome-card fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 !p-6 outline-none",e),...t})]}));g1.displayName=u1.displayName;function HM({className:e,...t}){return o.jsx("div",{className:Be("flex flex-col space-y-2 text-left",e),...t})}function WM({className:e,...t}){return o.jsx("div",{className:Be("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const x1=g.forwardRef(({className:e,...t},n)=>o.jsx(p1,{ref:n,className:Be("text-lg font-semibold tracking-tight text-foreground",e),...t}));x1.displayName=p1.displayName;const y1=g.forwardRef(({className:e,...t},n)=>o.jsx(h1,{ref:n,className:Be("text-sm leading-6 text-muted-foreground",e),...t}));y1.displayName=h1.displayName;const v1=g.forwardRef(({className:e,...t},n)=>o.jsx(d1,{ref:n,className:Be(e),...t}));v1.displayName=d1.displayName;const b1=g.forwardRef(({className:e,...t},n)=>o.jsx(f1,{ref:n,className:Be(e),...t}));b1.displayName=f1.displayName;function Kh({open:e,title:t,description:n,confirmLabel:s,cancelLabel:a="Cancel",loading:l=!1,destructive:c=!1,onConfirm:d,onOpenChange:f}){return o.jsx(BM,{open:e,onOpenChange:m=>l?void 0:f(m),children:o.jsxs(g1,{children:[o.jsxs(HM,{children:[o.jsx(x1,{children:t}),o.jsx(y1,{children:n})]}),o.jsxs(WM,{children:[o.jsx(b1,{disabled:l,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:a}),o.jsx(v1,{disabled:l,className:`shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50 ${c?"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-foreground text-background hover:opacity-90"}`,onClick:m=>{m.preventDefault(),d()},children:l?"Working...":s})]})]})})}function VM({items:e,align:t="end"}){const[n,s]=g.useState(!1),a=g.useRef(null);return g.useEffect(()=>{if(!n)return;function l(d){a.current&&!a.current.contains(d.target)&&s(!1)}function c(d){d.key==="Escape"&&s(!1)}return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[n]),e.length===0?null:o.jsxs("div",{className:"relative",ref:a,children:[o.jsx("button",{type:"button",onClick:()=>s(l=>!l),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:o.jsx(EC,{className:"h-4 w-4"})}),n&&o.jsx("div",{className:Be("absolute top-full mt-1 z-30 min-w-[220px] rounded-md border border-border/70 bg-background shadow-lg py-1",t==="end"?"right-0":"left-0"),children:o.jsx(da,{delayDuration:200,children:e.map(l=>{const c=l.icon,d=Be("flex w-full items-center gap-2 px-3 py-1.5 text-sm text-left transition",l.disabled?"opacity-50 cursor-not-allowed":l.destructive?"text-destructive hover:bg-destructive/10":"hover:bg-foreground/5"),f=o.jsxs(o.Fragment,{children:[c?o.jsx(c,{className:"h-4 w-4 shrink-0"}):null,o.jsx("span",{className:"truncate",children:l.label})]});if(l.disabled){const m=o.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:o.jsx("button",{type:"button",disabled:!0,className:d,children:f})});return l.disabledReason?o.jsxs(fa,{children:[o.jsx(pa,{asChild:!0,children:m}),o.jsx(Wo,{side:"left",children:l.disabledReason})]},l.key):o.jsx("div",{children:m},l.key)}return l.href?o.jsx(ye,{to:l.href,className:d,onClick:()=>s(!1),children:f},l.key):o.jsx("button",{type:"button",className:d,onClick:()=>{var m;(m=l.onSelect)==null||m.call(l),s(!1)},children:f},l.key)})})})]})}async function w1(e,t,n,s){const a=await fetch(`/api/projects/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s?{reason:s}:{})}),l=await a.json().catch(()=>null);if(!a.ok)throw new Error((l==null?void 0:l.error)||`HTTP ${a.status}`);return l.assignment}async function j1(e,t,n){const s=await fetch(`/api/projects/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),a=await s.json().catch(()=>null);if(!s.ok)throw new Error((a==null?void 0:a.error)||`HTTP ${s.status}`);return a.assignment}async function qM(e,t){const n=await fetch(`/api/projects/${e}/assignments/${t}`,{method:"DELETE"}),s=await n.json().catch(()=>null);if(!n.ok)throw new Error((s==null?void 0:s.error)||`HTTP ${n.status}`)}function k1(e){return e.requiresReason||e.command==="block"}function KM(e){const t=e.split(`
|
|
508
|
+
`),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let s=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){s=c;break}const a=t.slice(n+1,s).map(c=>c.match(/^\s*[-*]\s+\[( |x|X)\]\s+(.*)$/)).filter(c=>!!c).map(c=>({checked:c[1].toLowerCase()==="x",text:c[2].trim()})),l=[...t.slice(0,n),...t.slice(s)].join(`
|
|
509
|
+
`).replace(/\n{3,}/g,`
|
|
510
|
+
|
|
511
|
+
`).trim();return{acceptanceCriteria:a,summaryBody:l}}function GM(e){const t=e.split(`
|
|
512
|
+
`),n=t.findIndex(c=>/^##\s+Todos\s*$/i.test(c.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let s=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){s=c;break}const a=t.slice(n+1,s).join(`
|
|
513
|
+
`).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
|
|
514
|
+
|
|
515
|
+
`).trim(),l=[...t.slice(0,n),...t.slice(s)].join(`
|
|
516
|
+
`).replace(/\n{3,}/g,`
|
|
517
|
+
|
|
518
|
+
`).trim();return{hasSection:!0,todosMarkdown:a,remaining:l}}function YM({projectSlug:e,dependencies:t,blockedReason:n}){const[s,a]=g.useState(!1);if(t.length===0)return null;const l=t.filter(d=>d.status!=="completed"&&d.status!=="review"),c=l.length===0;return c&&!s?o.jsxs("button",{type:"button",onClick:()=>a(!0),className:"flex w-full items-center gap-2 rounded-lg border border-success-foreground/30 bg-success/70 px-4 py-2.5 text-left transition hover:bg-success",children:[o.jsx(Lp,{className:"h-4 w-4 shrink-0 text-success-foreground"}),o.jsxs("span",{className:"text-sm font-medium text-success-foreground",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),o.jsx(ya,{className:"ml-auto h-4 w-4 text-success-foreground"})]}):o.jsxs("div",{className:"space-y-3",children:[l.length>0&&o.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-warning-foreground/30 bg-warning px-4 py-3",children:[o.jsx(Vf,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning-foreground"}),o.jsxs("div",{className:"text-sm text-warning-foreground",children:[o.jsxs("strong",{children:[l.length," ",l.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&o.jsxs("p",{className:"mt-1 text-warning-foreground/80",children:["Blocked reason: ",n]})]})]}),o.jsx(Le,{title:"Dependencies",description:`${t.length-l.length} of ${t.length} resolved`,actions:c?o.jsx("button",{type:"button",onClick:()=>a(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:o.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>o.jsxs(ye,{to:`/projects/${e}/assignments/${d.slug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[o.jsx(Zt,{status:d.status}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),o.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&o.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),o.jsx(gc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function XM({links:e}){const t=$t();if(e.length===0)return null;const n=e.filter(a=>!a.isReverse),s=e.filter(a=>a.isReverse);return o.jsx(Le,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:o.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(a=>o.jsxs(ye,{to:`${t}/projects/${a.projectSlug}/assignments/${a.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[o.jsx(mC,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),o.jsx(Zt,{status:a.status}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:a.title}),o.jsx("p",{className:"truncate text-xs text-muted-foreground",children:a.slug})]}),o.jsx(gc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${a.slug}`)),s.map(a=>o.jsxs(ye,{to:`${t}/projects/${a.projectSlug}/assignments/${a.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[o.jsx(xb,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),o.jsx(Zt,{status:a.status}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:a.title}),o.jsx("p",{className:"truncate text-xs text-muted-foreground",children:a.slug})]}),o.jsx(gc,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${a.slug}`))]})})}function QM(e){const t=new Map;for(const s of e)t.set(s.id,{entry:s,replies:[]});const n=[];for(const s of e){const a=t.get(s.id);s.replyTo&&t.has(s.replyTo)?t.get(s.replyTo).replies.push(a):n.push(a)}return n}function JM(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function S1({projectSlug:e,assignmentSlug:t,entries:n}){const[s,a]=g.useState(n);g.useEffect(()=>{a(n)},[n]);const l=g.useMemo(()=>QM(s),[s]),[c,d]=g.useState(""),[f,m]=g.useState("note"),[h,x]=g.useState(!1),[y,b]=g.useState(null);async function C(j){var N;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,T={id:S,timestamp:new Date().toISOString(),author:"human",type:f,body:c,resolved:f==="question"?!1:void 0};a(A=>[...A,T]);try{const A=await fetch(JM(e,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:c,type:f})});if(!A.ok){const D=await A.text();throw new Error(D||`HTTP ${A.status}`)}const L=await A.json().catch(()=>null),R=(N=L==null?void 0:L.comment)==null?void 0:N.id;a(D=>D.map(O=>O.id===S?{...O,id:R??O.id}:O)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(A){b(A instanceof Error?A.message:String(A)),a(L=>L.filter(R=>R.id!==S))}finally{x(!1)}}async function k(j,S){a(T=>T.map(N=>N.id===j?{...N,resolved:S}:N));try{const T=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,N=await fetch(T,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!N.ok)throw new Error(`HTTP ${N.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(T){b(T instanceof Error?T.message:String(T)),a(N=>N.map(A=>A.id===j?{...A,resolved:!S}:A))}}return o.jsx(Le,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:o.jsxs("div",{className:"space-y-4",children:[l.map(j=>o.jsx(N1,{node:j,onToggleResolved:k,depth:0},j.entry.id)),o.jsxs("form",{onSubmit:C,className:"mt-6 space-y-2 border-t border-border pt-4",children:[o.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Add comment"}),o.jsx("textarea",{value:c,onChange:j=>d(j.target.value),className:"w-full rounded border border-border bg-background p-2 text-sm",rows:3,placeholder:"Ask a question, leave a note, or give feedback…"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("select",{value:f,onChange:j=>m(j.target.value),className:"rounded border border-border bg-background px-2 py-1 text-xs",children:[o.jsx("option",{value:"note",children:"note"}),o.jsx("option",{value:"question",children:"question"}),o.jsx("option",{value:"feedback",children:"feedback"})]}),o.jsx("button",{type:"submit",disabled:h||!c.trim(),className:"shell-action",children:h?"Posting…":"Post comment"}),y?o.jsx("span",{className:"text-xs text-error-foreground",children:y}):null]})]})]})})}function N1({node:e,depth:t,onToggleResolved:n}){const{entry:s,replies:a}=e,l=s.type==="question";return o.jsxs("div",{className:Be("space-y-2",t>0&&"ml-4 border-l border-border pl-4"),children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[o.jsx("span",{className:"font-mono",children:s.id}),o.jsx("span",{children:"·"}),o.jsx("span",{children:s.timestamp}),o.jsx("span",{children:"·"}),o.jsx("span",{className:"font-medium text-foreground",children:s.author}),o.jsx("span",{children:"·"}),o.jsx("span",{className:Be("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",l&&"bg-warning text-warning-foreground",s.type==="feedback"&&"bg-info text-info-foreground",s.type==="note"&&"bg-muted text-muted-foreground"),children:s.type}),l?o.jsxs("button",{type:"button",onClick:()=>n(s.id,!s.resolved),className:Be("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium",s.resolved?"bg-success text-success-foreground hover:bg-success/80":"bg-muted text-muted-foreground hover:bg-muted/80"),title:s.resolved?"Mark unresolved":"Mark resolved",children:[s.resolved?o.jsx(Lp,{className:"h-3 w-3"}):o.jsx(bC,{className:"h-3 w-3"}),s.resolved?"resolved":"open"]}):null,s.replyTo?o.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[o.jsx(BC,{className:"h-3 w-3"}),s.replyTo]}):null]}),o.jsx(Mt,{content:s.body}),a.length>0?o.jsx("div",{className:"space-y-2",children:a.map(c=>o.jsx(N1,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const ZM=["review","complete","unblock","start","block","fail","reopen"];function Mv(){var It,en,Tt,ie,ce,ve;const{slug:e,aslug:t}=mt(),n=St(),s=$t(),[a,l]=Lr(),[c,d]=g.useState(null),[f,m]=g.useState(null),[h,x]=g.useState(null),[y,b]=g.useState(null),[C,k]=g.useState(null),[j,S]=g.useState(!1),[T,N]=g.useState(!1),[A,L]=g.useState(0),R=a.get("tab")??"summary",D=Wc(),{data:O,loading:G,error:re,refetch:z}=H2(e,t),{data:K}=Gb(e),{data:q}=qp(),{data:J}=K2(e,t),_=g.useMemo(()=>{if(!O||!K)return[];const oe=new Map(K.assignments.map(Ce=>[Ce.slug,Ce]));return O.dependsOn.map(Ce=>{const Ae=oe.get(Ce);return{slug:Ce,title:(Ae==null?void 0:Ae.title)??Ce,status:(Ae==null?void 0:Ae.status)??"pending",priority:(Ae==null?void 0:Ae.priority)??"medium",assignee:(Ae==null?void 0:Ae.assignee)??null}})},[O,K]),F=_.filter(oe=>oe.status!=="completed"&&oe.status!=="review");ro("assignment");const B=g.useMemo(()=>((K==null?void 0:K.assignments)??[]).map(oe=>oe.slug),[K]),U=t?B.indexOf(t):-1,Z=U>0?B[U-1]:null,P=U>=0&&U<B.length-1?B[U+1]:null,M=`${s}/projects/${e}/assignments/${t}`;xt({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${M}/edit`)}),xt({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${M}/plan/edit`)}),xt({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${M}/handoff/edit`)}),xt({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${M}/decision-record/edit`)}),xt({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${M}/scratchpad/edit`)}),xt({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!Z,handler:()=>Z&&n(`${s}/projects/${e}/assignments/${Z}`)}),xt({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!P,handler:()=>P&&n(`${s}/projects/${e}/assignments/${P}`)});const Q=g.useMemo(()=>O?KM(O.body):{acceptanceCriteria:[],summaryBody:""},[O]),I=g.useMemo(()=>GM(Q.summaryBody),[Q.summaryBody]),ge=Q.acceptanceCriteria,Ne=ge.filter(oe=>oe.checked).length,te=ge.length>0&&Ne===ge.length,fe=g.useRef(te),be=g.useRef(!1);if(g.useEffect(()=>{if(O){if(!be.current){fe.current=te,be.current=!0;return}te&&!fe.current&&L(oe=>oe+1),fe.current=te}},[te,O]),G)return o.jsx(rt,{label:"Loading assignment workspace…"});if(re||!O||!e||!t)return o.jsx(Je,{error:re||"Assignment not found."});const ke=e,we=t,Ye=ge.length>0?{checked:Ne,total:ge.length}:void 0,Xe=O.availableTransitions??[],ne=Xe.filter(oe=>!oe.disabled&&oe.targetStatus!==O.status),Y=ZM.map(oe=>ne.find(Ce=>Ce.command===oe)).find(Boolean)??ne[0]??null,ae=[];if(q!=null&&q.sessions)for(const oe of q.sessions)for(const Ce of oe.windows)for(const Ae of Ce.panes)((It=Ae.assignment)==null?void 0:It.project)===e&&((en=Ae.assignment)==null?void 0:en.slug)===t&&ae.push({sessionName:oe.name,command:Ae.command,urls:Ae.urls});async function xe(oe){d(null);try{await j1(ke,we,oe),z()}catch(Ce){d(Ce.message)}}async function qe(){N(!0);try{await qM(ke,we),n(`${s}/projects/${ke}`)}catch(oe){d(oe.message),N(!1),S(!1)}}async function Oe(oe,Ce){d(null),m(oe.command);try{return await w1(ke,we,oe,Ce),z(),!0}catch(Ae){return d(Ae.message),!1}finally{m(null)}}function Ue(oe){if(k1(oe)){x(oe);return}Oe(oe)}async function Ge(oe,Ce){b(null),k(oe);try{const Ae=await fetch(`/api/projects/${ke}/assignments/${we}/acceptance-criteria/${oe}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:Ce})}),qt=await Ae.json();if(!Ae.ok)throw new Error(qt.error||`HTTP ${Ae.status}`);z()}catch(Ae){b(Ae.message)}finally{k(null)}}const Nt=[...ne.filter(oe=>oe!==Y).map(oe=>({key:`transition-${oe.command}`,label:oe.label,onSelect:()=>Ue(oe),disabled:f===oe.command})),...Xe.filter(oe=>oe.disabled||oe.targetStatus===O.status).map(oe=>({key:`transition-${oe.command}`,label:oe.label,disabled:!0,disabledReason:oe.targetStatus===O.status?`Already ${O.status.replace(/_/g," ")}`:oe.disabledReason??oe.warning??oe.description})),...D.statuses.map(oe=>({key:`override-${oe.id}`,label:`Override → ${oe.label}`,onSelect:()=>xe(oe.id),disabled:oe.id===O.status,disabledReason:oe.id===O.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:TC,href:`${s}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:HC,href:`${s}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:ef,href:`${s}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:gc,href:`${s}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:DC,href:`${s}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:Or,destructive:!0,onSelect:()=>S(!0)}],Ct=(Y==null?void 0:Y.command)==="review";return o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx(Zt,{status:O.status,progress:Ye}),o.jsx("h1",{className:"text-lg font-semibold text-foreground",children:O.title}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",D2(O.updated)]}),F.length>0&&o.jsxs("span",{className:"text-xs text-warning-foreground",children:["⚠ ",F.length," unmet dep",F.length===1?"":"s"]}),o.jsx(fh,{externalIds:O.externalIds}),o.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[Y&&o.jsx("button",{type:"button",title:Y.warning||Y.description,disabled:f===Y.command,onClick:()=>Ue(Y),className:Be("shell-action disabled:cursor-not-allowed disabled:opacity-50",Y.warning&&"border-warning-foreground/40",Ct&&A>0&&"send-to-review-glow"),children:o.jsx("span",{children:f===Y.command?"Working…":Y.label})},Ct?`review-${A}`:Y.command),o.jsx(VM,{items:Nt,align:"end"})]})]}),c?o.jsx("p",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:c}):null,O.blockedReason?o.jsxs("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:[o.jsx("strong",{children:"Blocked reason:"})," ",O.blockedReason]}):null]}),_.length>0&&o.jsx(YM,{projectSlug:e,dependencies:_,blockedReason:O.blockedReason}),O.enrichedLinks&&O.enrichedLinks.length>0&&o.jsx(XM,{links:O.enrichedLinks}),O.referencedBy&&O.referencedBy.length>0&&o.jsx(Le,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:o.jsx("ul",{className:"space-y-2",children:O.referencedBy.map(oe=>{const Ce=oe.sourceProjectSlug===null?`/assignments/${oe.sourceId}`:`${s}/projects/${oe.sourceProjectSlug}/assignments/${oe.sourceSlug}`;return o.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[o.jsx(ye,{to:Ce,className:"text-foreground hover:text-primary",children:oe.sourceTitle}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",oe.mentions," mention",oe.mentions===1?"":"s",")"]}),oe.sourceProjectSlug===null?o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"}):null]},oe.sourceId)})})}),o.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[o.jsx("div",{className:"space-y-4",children:o.jsx(hh,{value:R,onValueChange:oe=>l({tab:oe}),items:[{value:"summary",label:"Summary",content:o.jsxs("div",{className:"space-y-5",children:[Q.acceptanceCriteria.length>0?o.jsx(Le,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:o.jsxs("div",{className:"space-y-3",children:[y?o.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:y}):null,Q.acceptanceCriteria.map((oe,Ce)=>{const Ae=C!==null;return o.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[o.jsx("input",{type:"checkbox",checked:oe.checked,disabled:Ae,onChange:qt=>Ge(Ce,qt.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),o.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":oe.checked,children:oe.text})]},`${Ce}-${oe.text}`)})]})}):null,I.hasSection?o.jsx(Le,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:o.jsx(Mt,{content:I.todosMarkdown,emptyState:"No todos yet."})}):null,o.jsx(Le,{title:"Assignment Summary",children:o.jsx(Mt,{content:I.remaining,emptyState:Q.acceptanceCriteria.length>0||I.hasSection?"No additional summary markdown beyond the acceptance criteria and todos.":"This assignment does not have summary markdown yet."})})]})},{value:"plan",label:"Plan",count:O.plan?1:0,content:O.plan?o.jsx("div",{className:"space-y-5",children:o.jsxs(Le,{title:"Plan",description:"Shows plan.md only. Versioned plans (plan-v2.md, ...) linked from the Todos section are not yet rendered here — open them from the filesystem.",actions:o.jsxs(ye,{className:"shell-action",to:`${s}/projects/${e}/assignments/${t}/plan/edit`,children:[o.jsx(ef,{className:"h-4 w-4"}),o.jsx("span",{children:"Edit Plan"})]}),children:[o.jsx("div",{className:"mb-4",children:o.jsx(Zt,{status:O.plan.status})}),o.jsx(Mt,{content:O.plan.body,emptyState:"No plan content yet."})]})}):o.jsx(et,{title:"No plan yet",description:"Plan files are optional and versioned. Run /plan-assignment to create plan.md (or plan-v2.md, ...) and link it from the Todos section."})},{value:"scratchpad",label:"Scratchpad",count:O.scratchpad?1:0,content:O.scratchpad?o.jsx(Le,{title:"Scratchpad",actions:o.jsxs(ye,{className:"shell-action",to:`${s}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[o.jsx(ef,{className:"h-4 w-4"}),o.jsx("span",{children:"Edit Scratchpad"})]}),children:o.jsx(Mt,{content:O.scratchpad.body,emptyState:"Scratchpad is empty."})}):o.jsx(et,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Tt=O.handoff)==null?void 0:Tt.handoffCount)??0,content:o.jsx("div",{className:"space-y-5",children:O.handoff?o.jsx(Le,{children:o.jsx(Mt,{content:O.handoff.body,emptyState:"No handoff history yet."})}):o.jsx(et,{title:"No handoff log yet",description:"Handoffs appear here when an agent runs /complete-assignment or you append one manually."})})},{value:"progress",label:"Progress",count:((ie=O.progress)==null?void 0:ie.entryCount)??0,content:o.jsx("div",{className:"space-y-5",children:O.progress&&O.progress.entries.length>0?o.jsx(Le,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:o.jsx("ol",{className:"space-y-4",children:O.progress.entries.map((oe,Ce)=>o.jsxs("li",{className:"border-l-2 border-border pl-3",children:[o.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:oe.timestamp}),o.jsx(Mt,{content:oe.body})]},`${oe.timestamp}-${Ce}`))})}):o.jsx(et,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((ce=O.comments)==null?void 0:ce.entryCount)??0,content:o.jsx("div",{className:"space-y-5",children:O.comments&&O.comments.entries.length>0?o.jsx(S1,{projectSlug:e,assignmentSlug:t,entries:O.comments.entries}):o.jsx(et,{title:"No comments yet",description:"Comments appear here when agents or humans post via `syntaur comment` or the dashboard."})})},{value:"decisions",label:"Decisions",count:((ve=O.decisionRecord)==null?void 0:ve.decisionCount)??0,content:o.jsx("div",{className:"space-y-5",children:O.decisionRecord?o.jsx(Le,{children:o.jsx(Mt,{content:O.decisionRecord.body,emptyState:"No decision history yet."})}):o.jsx(et,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),o.jsxs("div",{className:"space-y-5",children:[o.jsx(Le,{title:"Details",children:o.jsxs("dl",{className:"space-y-3 text-sm",children:[o.jsx(ks,{label:"ID",value:O.id,copyable:!0}),o.jsx(ks,{label:"Priority",value:O.priority}),O.assignee&&o.jsx(ks,{label:"Assignee",value:O.assignee}),o.jsx(ks,{label:"Updated",value:`${A2(O.updated)} · Created ${R2(O.created)}`}),O.workspace.repository&&o.jsx(ks,{label:"Repository",value:O.workspace.repository,copyable:!0}),O.workspace.worktreePath&&o.jsx(ks,{label:"Worktree",value:O.workspace.worktreePath,copyable:!0}),O.workspace.branch&&o.jsx(ks,{label:"Branch",value:O.workspace.branch,copyable:!0}),O.workspace.parentBranch&&o.jsx(ks,{label:"Parent branch",value:O.workspace.parentBranch,copyable:!0})]})}),ae.length>0&&o.jsx(Le,{title:"Servers",children:o.jsx("div",{className:"space-y-2",children:ae.map((oe,Ce)=>o.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[o.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:oe.command}),o.jsx("span",{className:"text-xs text-muted-foreground",children:oe.sessionName}),oe.urls.map(Ae=>o.jsxs("a",{href:Ae,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[Ae.replace("http://localhost:",":"),o.jsx(Op,{className:"h-2.5 w-2.5"})]},Ae))]},Ce))})}),J&&J.sessions.length>0&&o.jsx(Le,{title:"Agent Sessions",children:o.jsx("div",{className:"space-y-2",children:J.sessions.map(oe=>o.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Oc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),o.jsx("span",{className:"font-medium text-foreground",children:oe.agent}),o.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:oe.sessionId,children:[oe.sessionId.slice(0,8),o.jsx(Yr,{value:oe.sessionId})]})]}),o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(Zt,{status:oe.status}),o.jsx("span",{className:"text-xs text-muted-foreground",children:Rn(oe.started)})]})]},oe.sessionId))})})]})]}),o.jsx(Xj,{open:h!==null,action:h,assignmentTitle:O.title,loading:f===(h==null?void 0:h.command),onOpenChange:oe=>{oe||x(null)},onConfirm:async oe=>{if(!h)return;await Oe(h,oe)&&x(null)}}),o.jsx(Kh,{open:j,title:"Delete assignment?",description:`This will permanently delete "${O.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:T,onOpenChange:oe=>{oe||S(!1)},onConfirm:qe})]})}function ks({label:e,value:t,copyable:n}){return o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsx("dt",{className:"text-muted-foreground",children:e}),o.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[o.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&o.jsx(Yr,{value:t})]})]})}function e5(){var d,f,m,h,x;const{id:e}=mt(),[t,n]=Lr(),s=t.get("tab")??"summary",{data:a,loading:l,error:c}=W2(e);return l?o.jsx(rt,{}):c?o.jsx(Je,{error:c}):a?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("header",{className:"space-y-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[o.jsx(Zt,{status:a.status}),o.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:a.id}),o.jsx(fh,{externalIds:a.externalIds}),o.jsx(ye,{to:`/assignments/${a.id}/edit`,className:"ml-auto rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit"})]}),o.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:a.title}),a.blockedReason?o.jsxs("p",{className:"text-sm text-warning-foreground",children:["Blocked: ",a.blockedReason]}):null]}),a.referencedBy&&a.referencedBy.length>0?o.jsx(Le,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:o.jsx("ul",{className:"space-y-2",children:a.referencedBy.map(y=>o.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[o.jsx(ye,{to:y.sourceProjectSlug===null?`/assignments/${y.sourceId}`:`/projects/${y.sourceProjectSlug}/assignments/${y.sourceSlug}`,className:"text-foreground hover:text-primary",children:y.sourceTitle}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",y.mentions," mention",y.mentions===1?"":"s",")"]})]},y.sourceId))})}):null,o.jsx(hh,{value:s,onValueChange:y=>n({tab:y}),items:[{value:"summary",label:"Summary",content:o.jsx("div",{className:"space-y-5",children:o.jsx(Le,{title:"Assignment",children:o.jsx(Mt,{content:a.body,emptyState:"This assignment does not have summary markdown yet."})})})},{value:"progress",label:"Progress",count:((d=a.progress)==null?void 0:d.entryCount)??0,content:o.jsx("div",{className:"space-y-5",children:a.progress&&a.progress.entries.length>0?o.jsx(Le,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:o.jsx("ol",{className:"space-y-4",children:a.progress.entries.map((y,b)=>o.jsxs("li",{className:"border-l-2 border-border pl-3",children:[o.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:y.timestamp}),o.jsx(Mt,{content:y.body})]},`${y.timestamp}-${b}`))})}):o.jsx(et,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((f=a.comments)==null?void 0:f.entryCount)??0,content:o.jsx("div",{className:"space-y-5",children:o.jsx(S1,{projectSlug:null,assignmentSlug:a.id,entries:((m=a.comments)==null?void 0:m.entries)??[]})})},{value:"plan",label:"Plan",content:o.jsx("div",{className:"space-y-5",children:a.plan?o.jsxs(Le,{children:[o.jsx(Mt,{content:a.plan.body,emptyState:"Plan file exists but is empty."}),o.jsx("div",{className:"mt-3 flex justify-end",children:o.jsx(ye,{to:`/assignments/${a.id}/plan/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit plan"})})]}):o.jsx(et,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:o.jsx("div",{className:"space-y-5",children:a.scratchpad?o.jsxs(Le,{children:[o.jsx(Mt,{content:a.scratchpad.body,emptyState:"Scratchpad is empty."}),o.jsx("div",{className:"mt-3 flex justify-end",children:o.jsx(ye,{to:`/assignments/${a.id}/scratchpad/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Edit scratchpad"})})]}):o.jsx(et,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((h=a.handoff)==null?void 0:h.handoffCount)??0,content:o.jsx("div",{className:"space-y-5",children:a.handoff?o.jsxs(Le,{children:[o.jsx(Mt,{content:a.handoff.body,emptyState:"No handoff history yet."}),o.jsx("div",{className:"mt-3 flex justify-end",children:o.jsx(ye,{to:`/assignments/${a.id}/handoff/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Append handoff"})})]}):o.jsx(et,{title:"No handoff log yet",description:"Handoffs appear here when an agent appends one."})})},{value:"decisions",label:"Decisions",count:((x=a.decisionRecord)==null?void 0:x.decisionCount)??0,content:o.jsx("div",{className:"space-y-5",children:a.decisionRecord?o.jsxs(Le,{children:[o.jsx(Mt,{content:a.decisionRecord.body,emptyState:"No decision history yet."}),o.jsx("div",{className:"mt-3 flex justify-end",children:o.jsx(ye,{to:`/assignments/${a.id}/decision-record/edit`,className:"rounded border border-border px-2 py-1 text-xs text-muted-foreground hover:border-foreground/40 hover:text-foreground",children:"Append decision"})})]}):o.jsx(et,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):o.jsx(Je,{error:"Assignment not found"})}const t5=["table","list","kanban"],_v={critical:0,high:1,medium:2,low:3};function $v(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function n5(e,t){return e.toString()===t.toString()}function Fv(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function r5(e,t,n){return[...e].sort((a,l)=>{let c=0;switch(t){case"title":c=a.title.localeCompare(l.title);break;case"status":c=a.status.localeCompare(l.status);break;case"priority":c=(_v[a.priority]??99)-(_v[l.priority]??99);break;case"assignee":c=(a.assignee??"").localeCompare(l.assignee??"");break;case"dependencies":c=a.dependsOn.length-l.dependsOn.length;break;case"updated":c=a.updated.localeCompare(l.updated);break}return n==="asc"?c:-c})}function zv(){const{workspace:e}=mt(),t=$t(),n=St(),s=g.useRef(null);ro("list:assignments");const{data:a,loading:l,error:c,refetch:d}=qb(),f=Wc(),[m,h]=Lr(),x=g.useMemo(()=>UT(f.order),[f]),y=g.useMemo(()=>{const V={};for(const pe of x)V[pe]=$T(f,pe);return V},[x,f]),b=g.useMemo(()=>x.map(V=>({id:V,title:y[V]??V,description:zw(V)})),[x,y]),C=g.useMemo(()=>new Set(["all",...x]),[x]),k=m.get("view"),j=m.get("status"),S=m.get("stale"),T=k&&t5.includes(k)?k:"kanban";function N(V){return!V||!C.has(V)?"all":V}const A=g.useCallback(V=>{h(pe=>{const Ee=new URLSearchParams(pe);return V==="kanban"?Ee.delete("view"):Ee.set("view",V),Ee})},[h]),[L,R]=g.useState(""),[D,O]=g.useState(()=>N(j)),[G,re]=g.useState("all"),[z,K]=g.useState("all"),[q,J]=g.useState("all"),[_,F]=g.useState(()=>$v(S)),[B,U]=g.useState("updated"),[Z,P]=g.useState("desc"),[M,Q]=g.useState(()=>new Set(x)),[I,ge]=g.useState([]),[Ne,te]=g.useState(null),[fe,be]=g.useState(null),[ke,we]=g.useState(null),[Ye,Xe]=g.useState(null),[ne,Y]=g.useState(null);g.useEffect(()=>{ge((a==null?void 0:a.assignments)??[])},[a]),g.useEffect(()=>{const V=N(j);V!==D&&O(V);const pe=$v(S);pe!==_&&F(pe)},[_,S,D,j]),g.useEffect(()=>{h(V=>{const pe=new URLSearchParams(V);return D==="all"?pe.delete("status"):pe.set("status",D),_==="all"?pe.delete("stale"):_==="stale"?pe.set("stale","1"):pe.set("stale","0"),n5(V,pe)?V:pe})},[_,h,D]);const ae=g.useMemo(()=>Array.from(new Set(I.map(V=>V.status))).sort(),[I]),xe=g.useMemo(()=>Array.from(new Set(I.map(V=>V.priority))).sort(),[I]),qe=g.useMemo(()=>Array.from(new Set(I.map(V=>V.assignee??"__unassigned__"))).sort(),[I]),Oe=g.useMemo(()=>Array.from(new Map(I.filter(V=>V.projectSlug!==null).map(V=>[V.projectSlug,V.projectTitle]))).sort(([,V],[,pe])=>V.localeCompare(pe)),[I]),Ue=g.useMemo(()=>I.filter(V=>{if(e){if(e==="_ungrouped"){if(V.projectWorkspace!==null)return!1}else if(V.projectWorkspace!==e)return!1}if(D!=="all"&&V.status!==D||G!=="all"&&V.priority!==G||_==="stale"&&!Fv(V.updated)||_==="fresh"&&Fv(V.updated)||z!=="all"&&(V.assignee??"__unassigned__")!==z)return!1;if(q!=="all"){if(q==="__standalone__"){if(V.projectSlug!==null)return!1}else if(V.projectSlug!==q)return!1}const pe=L.trim().toLowerCase();return!(pe&&!`${V.title} ${V.slug} ${V.projectTitle??"standalone"} ${V.projectSlug??""}`.toLowerCase().includes(pe))}),[_,I,L,D,G,z,q,e]),Ge=g.useMemo(()=>r5(Ue,B,Z),[Ue,B,Z]),{visibleItems:Nt,visibleIndexByKey:Ct}=g.useMemo(()=>{const V=T==="table"?Ge:x.flatMap(Ee=>Ue.filter(ze=>ze.status===Ee)),pe=new Map;return V.forEach((Ee,ze)=>pe.set(on(Ee),ze)),{visibleItems:V,visibleIndexByKey:pe}},[T,Ge,Ue,x]),{hotkeyRowProps:It}=Ta(Nt,{scope:"list:assignments",onOpen:V=>{if(V.projectSlug===null){n(`/assignments/${V.id}`);return}const pe=V.projectWorkspace?`/w/${V.projectWorkspace}`:t;n(`${pe}/projects/${V.projectSlug}/assignments/${V.slug}`)}});if(xt({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var V;return(V=s.current)==null?void 0:V.focus()}}),xt({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),l)return o.jsx(rt,{label:"Loading assignments board…"});if(c||!a)return o.jsx(Je,{error:c||"Assignments board is unavailable."});async function en({item:V,toColumnId:pe,action:Ee,reason:ze}){te(null),be(on(V));const Wn=I;ge(ln=>ln.map(vt=>on(vt)===on(V)?{...vt,status:pe,blockedReason:pe==="blocked"?ze??vt.blockedReason:null}:vt));try{if(V.projectSlug===null){if(!Ee)throw new Error("Standalone assignments require a transition action, not status override.");const vt=await fetch(`/api/assignments/${encodeURIComponent(V.id)}/transitions/${encodeURIComponent(Ee.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ze?{reason:ze}:{})});if(!vt.ok)throw new Error((await vt.json()).error??`HTTP ${vt.status}`);const it=(await vt.json()).assignment;ge(Rt=>Rt.map(Kt=>on(Kt)===on(V)?{...Kt,status:it.status,blockedReason:it.blockedReason,availableTransitions:it.availableTransitions,updated:it.updated}:Kt));return}const ln=Ee?await w1(V.projectSlug,V.slug,Ee,ze):await j1(V.projectSlug,V.slug,pe);return ge(vt=>vt.map(Ve=>on(Ve)===on(V)?{...Ve,status:ln.status,blockedReason:ln.blockedReason,availableTransitions:ln.availableTransitions,updated:ln.updated}:Ve)),d(),!0}catch(ln){return ge(Wn),te(ln.message),!1}finally{be(null)}}async function Tt({item:V,toColumnId:pe}){if(V.status===pe)return;const Ee=ea(V,pe);if(Ee!=null&&Ee.disabled){te(Ee.disabledReason||`Cannot move this assignment to ${pe}.`);return}if(Ee&&k1(Ee)){Y({item:V,toColumnId:pe,action:Ee});return}await en({item:V,toColumnId:pe,action:Ee})}function ie(V){Q(pe=>{const Ee=new Set(pe);return Ee.has(V)?Ee.delete(V):Ee.add(V),Ee})}function ce(V){B===V?P(pe=>pe==="asc"?"desc":"asc"):(U(V),P("asc"))}const ve=ke?I.find(V=>on(V)===ke)??null:null;function oe(V,pe){V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/plain",pe),we(pe)}function Ce(){we(null),Xe(null)}function Ae(V,pe){if(!ve)return;const Ee=ea(ve,pe);ve.status===pe||Ee!=null&&Ee.disabled||(V.preventDefault(),V.dataTransfer.dropEffect="move",Xe(pe))}function qt(V,pe){Ye===pe&&!V.currentTarget.contains(V.relatedTarget)&&Xe(null)}function an(V,pe){if(V.preventDefault(),!ve||ve.status===pe){Ce();return}Ce(),Tt({item:ve,toColumnId:pe})}function tn({field:V,children:pe}){const Ee=B===V;return o.jsx("th",{className:"pb-3 font-medium",children:o.jsxs("button",{type:"button",onClick:()=>ce(V),className:"inline-flex items-center gap-1 hover:text-foreground",children:[pe,Ee?Z==="asc"?o.jsx(bb,{className:"h-3 w-3"}):o.jsx(ya,{className:"h-3 w-3"}):null]})})}return o.jsxs("div",{className:"space-y-5",children:[o.jsx("div",{className:"flex items-center justify-end",children:o.jsxs(ye,{to:`${t}/assignments/new`,className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"New Assignment"]})}),o.jsxs(ch,{children:[o.jsx(Hc,{ref:s,value:L,onChange:R,placeholder:"Search assignments or projects"}),o.jsxs("select",{value:D,onChange:V=>O(N(V.target.value)),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All statuses"}),ae.map(V=>o.jsx("option",{value:V,children:y[V]??V},V))]}),o.jsxs("select",{value:G,onChange:V=>re(V.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All priorities"}),xe.map(V=>o.jsx("option",{value:V,className:"capitalize",children:V},V))]}),o.jsxs("select",{value:z,onChange:V=>K(V.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All assignees"}),qe.map(V=>o.jsx("option",{value:V,children:V==="__unassigned__"?"Unassigned":V},V))]}),o.jsxs("select",{value:q,onChange:V=>J(V.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All projects"}),o.jsx("option",{value:"__standalone__",children:"Standalone"}),Oe.map(([V,pe])=>o.jsx("option",{value:V,children:pe},V))]}),o.jsxs("select",{value:_,onChange:V=>F(V.target.value),className:"editor-input max-w-[180px]",children:[o.jsx("option",{value:"all",children:"All activity"}),o.jsx("option",{value:"stale",children:"Stale only"}),o.jsx("option",{value:"fresh",children:"Fresh only"})]}),o.jsx(uh,{value:T,onChange:V=>A(V),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),Ne?o.jsx("div",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:Ne}):null,a.assignments.length===0?o.jsx(et,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:o.jsxs(ye,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[o.jsx(Mp,{className:"h-4 w-4"}),o.jsx("span",{children:"Browse Projects"})]})}):Ue.length===0?o.jsx(et,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):T==="table"?o.jsx(Le,{title:`${Ge.length} assignment${Ge.length===1?"":"s"}`,children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[o.jsx(tn,{field:"title",children:"Assignment"}),o.jsx(tn,{field:"status",children:"Status"}),o.jsx(tn,{field:"priority",children:"Priority"}),o.jsx(tn,{field:"assignee",children:"Assignee"}),o.jsx(tn,{field:"dependencies",children:"Dependencies"}),o.jsx(tn,{field:"updated",children:"Updated"})]})}),o.jsx("tbody",{children:Ge.map((V,pe)=>o.jsxs("tr",{className:"border-b border-border/50 last:border-0",...It(pe),children:[o.jsxs("td",{className:"py-4 pr-4",children:[o.jsx(ye,{to:V.projectSlug===null?`/assignments/${V.id}`:`${t}/projects/${V.projectSlug}/assignments/${V.slug}`,className:"font-semibold text-foreground hover:text-primary",children:V.title}),o.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:V.projectTitle??o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),o.jsxs("p",{className:"mt-0.5 inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:V.id,children:[V.id.slice(0,8),o.jsx(Yr,{value:V.id})]})]}),o.jsx("td",{className:"py-4 pr-4",children:o.jsx("select",{value:V.status,disabled:fe===on(V),onChange:Ee=>Tt({item:V,toColumnId:Ee.target.value}),className:Be("appearance-none rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-wide outline-none","cursor-pointer bg-[length:12px] bg-[right_6px_center] bg-no-repeat pr-6",`bg-[url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E")]`,(vc[V.status]??vc.pending).className,fe===on(V)&&"animate-pulse opacity-60"),children:x.map(Ee=>{const ze=V.status===Ee?void 0:ea(V,Ee),Wn=(ze==null?void 0:ze.disabled)??!1;return o.jsx("option",{value:Ee,disabled:Wn,title:Wn?(ze==null?void 0:ze.disabledReason)??void 0:void 0,children:y[Ee]},Ee)})})}),o.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:V.priority}),o.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.assignee??"Unassigned"}),o.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.dependsOn.length}),o.jsx("td",{className:"py-4 text-muted-foreground",children:Ar(V.updated)})]},on(V)))})]})})}):T==="list"?o.jsx("div",{className:"space-y-3",children:x.map(V=>{var vt;const pe=Ue.filter(Ve=>Ve.status===V);if(pe.length===0&&!ve)return null;const Ee=M.has(V),ze=ve?ve.status!==V&&!((vt=ea(ve,V))!=null&&vt.disabled):!1,Wn=ve?ve.status!==V&&!ze:!1,ln=Ye===V;return o.jsxs("div",{className:Be("rounded-lg border border-border/60 bg-card/90 transition",ln&&ze&&"ring-2 ring-ring/30",Wn&&"border-dashed opacity-65"),onDragOver:Ve=>Ae(Ve,V),onDragLeave:Ve=>qt(Ve,V),onDrop:Ve=>an(Ve,V),children:[o.jsxs("button",{type:"button",onClick:()=>ie(V),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[o.jsx(ya,{className:`h-4 w-4 text-muted-foreground transition-transform ${Ee?"":"-rotate-90"}`}),o.jsx("span",{className:"font-semibold text-foreground",children:y[V]}),o.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:pe.length})]}),Ee&&pe.length>0&&o.jsx("div",{className:"space-y-3 px-4 pb-4",children:pe.map(Ve=>{const it=on(Ve),Rt=ke===it,Kt=Ct.get(it)??-1;return o.jsx("div",{draggable:!0,onDragStart:nn=>oe(nn,it),onDragEnd:Ce,...Kt>=0?It(Kt):{},className:Be("cursor-grab transition active:cursor-grabbing",Rt&&"scale-[0.98] opacity-50"),children:o.jsx(Bv,{assignment:Ve,dragging:Rt,transitioning:fe===it})},it)})})]},V)})}):o.jsx(Bw,{columns:b,items:Ue,getItemId:on,getColumnId:V=>V.status,canDrop:({item:V,fromColumnId:pe,toColumnId:Ee})=>{if(pe===Ee)return{allowed:!0};const ze=ea(V,Ee);return ze!=null&&ze.disabled?{allowed:!1,reason:ze.disabledReason||ze.description}:{allowed:!0,reason:ze?ze.warning||ze.description:`Move to ${Ee} (direct status change).`}},onMove:({item:V,toColumnId:pe})=>Tt({item:V,toColumnId:pe}),emptyMessage:V=>`No ${V.title.toLowerCase()} assignments.`,renderCard:(V,{dragging:pe})=>{const Ee=Ct.get(on(V))??-1;return o.jsx("div",{...Ee>=0?It(Ee):{},children:o.jsx(Bv,{assignment:V,dragging:pe,transitioning:fe===on(V)})})}}),o.jsx(Xj,{open:ne!==null,action:(ne==null?void 0:ne.action)??null,assignmentTitle:(ne==null?void 0:ne.item.title)??"Assignment",loading:fe===(ne?on(ne.item):null),onOpenChange:V=>{V||Y(null)},onConfirm:async V=>{if(!ne)return;const pe=ne;await en({item:pe.item,toColumnId:pe.toColumnId,action:pe.action,reason:V})&&Y(null)}})]})}function Bv({assignment:e,dragging:t,transitioning:n}){var a;const s=$t();return o.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[o.jsxs("div",{className:"flex items-start justify-between gap-3",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx(ye,{to:e.projectSlug===null?`/assignments/${e.id}`:`${s}/projects/${e.projectSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e.projectTitle??o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),o.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(a=e.id)==null?void 0:a.slice(0,8),e.id&&o.jsx(Yr,{value:e.id})]})]}),o.jsx(Zt,{status:e.status})]}),e.blockedReason?o.jsx("p",{className:"mt-3 rounded-md border border-warning-foreground/30 bg-warning px-3 py-2 text-sm text-warning-foreground",children:e.blockedReason}):null,o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[o.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),o.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),o.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),o.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[o.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),o.jsx("span",{children:Ar(e.updated)})]})]})}function ea(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function on(e){return e.id||e.slug||"unknown"}function tr(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],s=e.slice(t[0].length),a=n.split(`
|
|
519
|
+
`),l=[],c=new Map;let d=null,f=[];const m=()=>{d&&(l.push(d),c.set(d,f))};for(const h of a){const x=h.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!h.startsWith(" ")){m(),d=x[1],f=[h];continue}d&&f.push(h)}return m(),{order:l,blocks:c,body:s}}function li(e){return`---
|
|
520
|
+
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
521
|
+
`)}
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
${e.body.replace(/^\n+/,"")}`}function Ht(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const s=n[0].match(/^[^:]+:\s*(.*)$/);if(!s)return"";const a=s[1].trim();return a==="null"?"":a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'")?a.slice(1,-1):a}function s5(e,t){return Ht(e,t)==="true"}function ha(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(s=>s.trim()).filter(s=>s.startsWith("- ")).map(s=>s.slice(2).trim()):[]}function o5(e){return typeof e=="boolean"?e?"true":"false":e===null||e===""?"null":/^\d{4}-\d{2}-\d{2}T/.test(e)?`"${e}"`:/[:#{}[\],&*?|>!%@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:e}function Wt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${o5(n)}`])}function ma(e,t,n){if(e.blocks.has(t)||e.order.push(t),n.length===0){e.blocks.set(t,[`${t}: []`]);return}e.blocks.set(t,[`${t}:`,...n.map(s=>` - ${s}`)])}function ga(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function au(e){const t=tr(e);return{title:Ht(t,"title"),slug:Ht(t,"slug"),workspace:Ht(t,"workspace"),archived:s5(t,"archived"),archivedAt:Ht(t,"archivedAt"),archivedReason:Ht(t,"archivedReason"),tags:ha(t,"tags").join(", "),body:t.body}}function i5(e,t){const n=tr(e),s={...au(e),...t};return Wt(n,"title",s.title),Wt(n,"slug",s.slug),Wt(n,"workspace",s.workspace||null),Wt(n,"archived",s.archived),Wt(n,"archivedAt",s.archivedAt||null),Wt(n,"archivedReason",s.archivedReason||null),ma(n,"tags",ga(s.tags)),n.body=s.body,li(n)}function lu(e){const t=tr(e);return{title:Ht(t,"title"),slug:Ht(t,"slug"),status:Ht(t,"status"),priority:Ht(t,"priority")||"medium",assignee:Ht(t,"assignee"),dependsOn:ha(t,"dependsOn").join(", "),links:ha(t,"links").join(", "),blockedReason:Ht(t,"blockedReason"),tags:ha(t,"tags").join(", "),body:t.body}}function a5(e,t){const n=tr(e),s={...lu(e),...t};return Wt(n,"title",s.title),Wt(n,"slug",s.slug),Wt(n,"status",s.status),Wt(n,"priority",s.priority),Wt(n,"assignee",s.assignee||null),ma(n,"dependsOn",ga(s.dependsOn)),ma(n,"links",ga(s.links)),Wt(n,"blockedReason",s.blockedReason||null),ma(n,"tags",ga(s.tags)),n.body=s.body,li(n)}function cu(e){const t=tr(e);return{assignment:Ht(t,"assignment"),status:Ht(t,"status"),body:t.body}}function l5(e,t){const n=tr(e),s={...cu(e),...t};return Wt(n,"assignment",s.assignment),Wt(n,"status",s.status),n.body=s.body,li(n)}function uu(e){const t=tr(e);return{assignment:Ht(t,"assignment"),body:t.body}}function c5(e,t){const n=tr(e),s={...uu(e),...t};return Wt(n,"assignment",s.assignment),n.body=s.body,li(n)}function du(e){const t=tr(e);return{name:Ht(t,"name"),slug:Ht(t,"slug"),description:Ht(t,"description"),whenToUse:Ht(t,"when_to_use"),tags:ha(t,"tags").join(", "),body:t.body}}function u5(e,t){const n=tr(e),s={...du(e),...t};return Wt(n,"name",s.name),Wt(n,"slug",s.slug),Wt(n,"description",s.description||null),Wt(n,"when_to_use",s.whenToUse||null),ma(n,"tags",ga(s.tags)),n.body=s.body,li(n)}function Gh(e){return{body:tr(e).body}}function C1(e){return Gh(e)}function E1(e,t){const n=tr(e);return t.body!==void 0&&(n.body=t.body),li(n)}function d5(e,t){return E1(e,t)}function ht(e,t,n){switch(e){case"project":return i5(t,n);case"assignment":return a5(t,n);case"plan":return l5(t,n);case"scratchpad":return c5(t,n);case"playbook":return u5(t,n);case"memory":return E1(t,n);case"resource":return d5(t,n);default:return t}}function ci({initialContent:e,documentType:t,mode:n="edit",onSave:s,saving:a,error:l,title:c,description:d,onCancel:f,helpTitle:m,helpBody:h,allowSlugEdit:x=!1}){const[y,b]=g.useState(e),[C,k]=g.useState(!1),[j,S]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const T=m5(t,y),N=y!==e,A=h5(t,y),L=N?"Unsaved changes":n==="create"?"Draft":"Saved",R=t!=="memory"&&t!=="resource";return o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[o.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),o.jsx("span",{className:"rounded-full border border-border/70 bg-background/80 px-2.5 py-1 text-xs font-medium text-muted-foreground",children:L})]}),d?o.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("button",{type:"button",onClick:f,className:"shell-action",children:[o.jsx(xb,{className:"h-4 w-4"}),o.jsx("span",{children:"Back"})]}),R?o.jsxs("button",{type:"button",onClick:()=>k(D=>!D),className:"shell-action",children:[o.jsx(PC,{className:"h-4 w-4"}),o.jsx("span",{children:C?"Structured":"Raw Markdown"})]}):null,o.jsxs("button",{type:"button",onClick:()=>s(y),disabled:a||T.length>0,className:"inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-semibold text-background transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:[o.jsx(zp,{className:"h-4 w-4"}),o.jsx("span",{children:a?"Saving…":"Save"})]})]})]}),l?o.jsx("p",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:l}):null,T.length>0?o.jsx("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:o.jsx("ul",{className:"space-y-1",children:T.map(D=>o.jsx("li",{children:D},D))})}):null]}),o.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[o.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),o.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[o.jsx(Ux,{className:"h-4 w-4"}),"Preview"]})]}),o.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[o.jsx("div",{className:j==="preview"?"hidden md:block":"",children:o.jsx("div",{className:"surface-panel space-y-3",children:C?o.jsx("textarea",{value:y,onChange:D=>b(D.target.value),className:"min-h-[720px] w-full rounded-md border border-border/70 bg-background/90 p-4 font-mono text-sm text-foreground outline-none transition focus:border-primary focus:ring-2 focus:ring-ring/30",spellCheck:!1}):o.jsx(f5,{documentType:t,content:y,onChange:b,allowSlugEdit:x})})}),o.jsx("div",{className:j==="edit"?"hidden md:block":"",children:o.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ux,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),o.jsx(Mt,{content:A,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function f5({documentType:e,content:t,onChange:n,allowSlugEdit:s}){if(e==="project"){const l=au(t);return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(ta,{children:[o.jsx(at,{label:"Project title",children:o.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,f={title:d};s&&(l.slug===dr(l.title)||!l.slug.trim())&&(f.slug=dr(d)),n(ht(e,t,f))},className:"editor-input"})}),o.jsx(at,{label:"Slug",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("input",{value:l.slug,disabled:!s,onChange:c=>n(ht(e,t,{slug:dr(c.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),o.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is the folder name and URL-safe identifier. It is locked after creation so links and file paths stay stable."})]})}),o.jsx(at,{label:"Tags",children:o.jsx("input",{value:l.tags,onChange:c=>n(ht(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),o.jsx(p5,{value:l.workspace,onChange:c=>n(ht(e,t,{workspace:c}))})]}),o.jsx(at,{label:"Project body",children:o.jsx("textarea",{value:l.body,onChange:c=>n(ht(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const l=lu(t);return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(ta,{children:[o.jsx(at,{label:"Assignment title",children:o.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,f={title:d};s&&(l.slug===dr(l.title)||!l.slug.trim())&&(f.slug=dr(d)),n(ht(e,t,f))},className:"editor-input"})}),o.jsx(at,{label:"Slug",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("input",{value:l.slug,disabled:!s,onChange:c=>n(ht(e,t,{slug:dr(c.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),o.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the assignment folder name and URL. It is auto-generated from the title until you change it, and it cannot be renamed after creation.":"The slug is locked after creation because assignment paths and dependency references use it as a stable identifier."})]})}),o.jsx(at,{label:"Status",children:o.jsxs("select",{value:l.status,onChange:c=>n(ht(e,t,{status:c.target.value})),className:"editor-input",children:[o.jsx("option",{value:"pending",children:"Pending"}),o.jsx("option",{value:"in_progress",children:"In Progress"}),o.jsx("option",{value:"blocked",children:"Blocked"}),o.jsx("option",{value:"review",children:"Review"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"failed",children:"Failed"})]})}),o.jsx(at,{label:"Priority",children:o.jsxs("select",{value:l.priority,onChange:c=>n(ht(e,t,{priority:c.target.value})),className:"editor-input",children:[o.jsx("option",{value:"low",children:"Low"}),o.jsx("option",{value:"medium",children:"Medium"}),o.jsx("option",{value:"high",children:"High"}),o.jsx("option",{value:"critical",children:"Critical"})]})}),o.jsx(at,{label:"Assignee",children:o.jsx("input",{value:l.assignee,onChange:c=>n(ht(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),o.jsx(at,{label:"Depends on",className:"md:col-span-2",children:o.jsx("input",{value:l.dependsOn,onChange:c=>n(ht(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),o.jsx(at,{label:"Links",className:"md:col-span-2",children:o.jsx("input",{value:l.links,onChange:c=>n(ht(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),o.jsx(at,{label:"Blocked reason",className:"md:col-span-2",children:o.jsx("input",{value:l.blockedReason,onChange:c=>n(ht(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),o.jsx(at,{label:"Tags",className:"md:col-span-2",children:o.jsx("input",{value:l.tags,onChange:c=>n(ht(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),o.jsx(at,{label:"Assignment body",children:o.jsx("textarea",{value:l.body,onChange:c=>n(ht(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const l=cu(t);return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(ta,{children:[o.jsx(at,{label:"Assignment",children:o.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),o.jsx(at,{label:"Plan status",children:o.jsxs("select",{value:l.status,onChange:c=>n(ht(e,t,{status:c.target.value})),className:"editor-input",children:[o.jsx("option",{value:"draft",children:"Draft"}),o.jsx("option",{value:"approved",children:"Approved"}),o.jsx("option",{value:"in_progress",children:"In Progress"}),o.jsx("option",{value:"completed",children:"Completed"})]})})]}),o.jsx(at,{label:"Plan body",children:o.jsx("textarea",{value:l.body,onChange:c=>n(ht(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const l=uu(t);return o.jsxs("div",{className:"space-y-3",children:[o.jsx(ta,{children:o.jsx(at,{label:"Assignment",children:o.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),o.jsx(at,{label:"Scratchpad body",children:o.jsx("textarea",{value:l.body,onChange:c=>n(ht(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="memory"||e==="resource"){const l=e==="memory"?Gh(t):C1(t),c=e==="memory"?"Memory body":"Resource body";return o.jsxs("div",{className:"space-y-3",children:[o.jsx(at,{label:c,children:o.jsx("textarea",{value:l.body,onChange:d=>n(ht(e,t,{body:d.target.value})),className:"editor-textarea",spellCheck:!1})}),o.jsx("p",{className:"text-xs text-muted-foreground/80",children:"Frontmatter (name, scope/category, source, related assignments, tags) is preserved server-side on save."})]})}const a=du(t);return o.jsxs("div",{className:"space-y-3",children:[o.jsxs(ta,{children:[o.jsx(at,{label:"Playbook name",children:o.jsx("input",{value:a.name,onChange:l=>{const c=l.target.value,d={name:c};s&&(a.slug===dr(a.name)||!a.slug.trim())&&(d.slug=dr(c)),n(ht(e,t,d))},className:"editor-input"})}),o.jsx(at,{label:"Slug",children:o.jsxs("div",{className:"space-y-2",children:[o.jsx("input",{value:a.slug,disabled:!s,onChange:l=>n(ht(e,t,{slug:dr(l.target.value)})),className:`editor-input ${s?"":"editor-input-disabled"}`}),o.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:s?"The slug becomes the filename. It is auto-generated from the name until you change it.":"The slug is locked after creation because it is the filename."})]})}),o.jsx(at,{label:"Description",className:"md:col-span-2",children:o.jsx("input",{value:a.description,onChange:l=>n(ht(e,t,{description:l.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),o.jsx(at,{label:"Tags",className:"md:col-span-2",children:o.jsx("input",{value:a.tags,onChange:l=>n(ht(e,t,{tags:l.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),o.jsx(at,{label:"When to use",className:"md:col-span-2",children:o.jsx("input",{value:a.whenToUse,onChange:l=>n(ht(e,t,{whenToUse:l.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),o.jsx(at,{label:"Playbook rules",children:o.jsx("textarea",{value:a.body,onChange:l=>n(ht(e,t,{body:l.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function ta({children:e}){return o.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function at({label:e,children:t,className:n}){return o.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function p5({value:e,onChange:t}){const{data:n}=Vp(),s=(n==null?void 0:n.workspaces)??[];return o.jsx(at,{label:"Workspace",children:o.jsxs("select",{value:e,onChange:a=>t(a.target.value),className:"editor-input",children:[o.jsx("option",{value:"",children:"Ungrouped"}),s.map(a=>o.jsx("option",{value:a,children:a},a))]})})}function h5(e,t){switch(e){case"project":return au(t).body;case"assignment":return lu(t).body;case"plan":return cu(t).body;case"scratchpad":return uu(t).body;case"playbook":return du(t).body;case"memory":return Gh(t).body;case"resource":return C1(t).body}}function m5(e,t){switch(e){case"project":{const n=au(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!nf(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}case"assignment":{const n=lu(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!nf(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}case"plan":return cu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return uu(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=du(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!nf(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(s=>!!s)}case"memory":case"resource":return[]}}function Uv(){const e=St(),{workspace:t}=mt(),n=$t(),[s,a]=g.useState(null),[l,c]=g.useState(!0),[d,f]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/project").then(y=>y.json()).then(y=>{let b=y.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
|
|
525
|
+
workspace: ${t}`)),a(b),c(!1)}).catch(y=>{h(y.message),c(!1)})},[t]);async function x(y){f(!0),h(null);try{const b=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y})}),C=await b.json();if(!b.ok){h(C.error||`HTTP ${b.status}`),f(!1);return}e(`${n}/projects/${C.slug}`)}catch(b){h(b.message),f(!1);return}f(!1)}return l?o.jsx(rt,{label:"Loading project template…"}):m&&!s?o.jsx(Je,{error:m}):o.jsx(ci,{initialContent:s||"",documentType:"project",mode:"create",onSave:x,saving:d,error:m,title:"Create Project",description:"Projects hold the high-level objective, shared context, and human-authored overview. Put execution details in assignments instead of overloading project.md.",onCancel:()=>e(`${n}/projects`),helpTitle:"Project editing rules",helpBody:"Use this form for project intent, slug, tags, and overview content. If you ever need less common metadata, raw markdown mode still exposes the full file.",allowSlugEdit:!0})}function Hv(){const{slug:e}=mt(),t=$t(),n=St(),[s,a]=g.useState(null),[l,c]=g.useState(!0),[d,f]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(y=>y.json()).then(y=>{a(y.content),c(!1)}).catch(y=>{h(y.message),c(!1)})},[]);async function x(y){if(!e){h("Project slug is required.");return}f(!0),h(null);try{const b=await fetch(`/api/projects/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y})}),C=await b.json();if(!b.ok){h(C.error||`HTTP ${b.status}`),f(!1);return}n(`${t}/projects/${e}/assignments/${C.slug}`)}catch(b){h(b.message),f(!1);return}f(!1)}return l?o.jsx(rt,{label:"Loading assignment template…"}):m&&!s?o.jsx(Je,{error:m}):o.jsx(ci,{initialContent:s||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Assignment",description:"Assignments are the execution unit. Declare dependencies here, keep status pending until work starts, and use blocked later only for runtime obstacles.",onCancel:()=>n(e?`${t}/projects/${e}`:`${t}/projects`),helpTitle:"Assignment editing rules",helpBody:"Use structured fields for priority, assignee, dependencies, and tags. Status can be changed through lifecycle actions, kanban drag, or the status override.",allowSlugEdit:!0})}function Wv(){const{workspace:e}=mt(),t=$t(),n=St(),[s,a]=g.useState(null),[l,c]=g.useState(!0),[d,f]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{const y=new URLSearchParams({standalone:"1"});e&&y.set("workspace",e),fetch(`/api/templates/assignment?${y.toString()}`).then(b=>b.json()).then(b=>{a(b.content),c(!1)}).catch(b=>{h(b.message),c(!1)})},[e]);async function x(y){var b;f(!0),h(null);try{const C=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:y})}),k=await C.json();if(!C.ok){h(k.error||`HTTP ${C.status}`),f(!1);return}const j=(b=k==null?void 0:k.assignment)==null?void 0:b.id;if(!j){h("Server did not return the new assignment id."),f(!1);return}n(`/assignments/${j}`)}catch(C){h(C.message),f(!1);return}f(!1)}return l?o.jsx(rt,{label:"Loading assignment template…"}):m&&!s?o.jsx(Je,{error:m}):o.jsx(ci,{initialContent:s||"",documentType:"assignment",mode:"create",onSave:x,saving:d,error:m,title:"Create Standalone Assignment",description:e?`Standalone assignments live outside any project. This one will be tagged with workspaceGroup: ${e} so it appears in this workspace's views.`:"Standalone assignments live outside any project. Add a workspaceGroup to make them appear in workspace-filtered views.",onCancel:()=>n(`${t}/assignments`),helpTitle:"Standalone assignment editing rules",helpBody:"No project field is needed (it must remain null). Use workspaceGroup to group with other workspace work. Status, priority, and tags work the same as project-nested assignments.",allowSlugEdit:!0})}function ui({loadUrl:e,saveUrl:t,redirectTo:n,title:s,description:a,documentType:l,helpTitle:c,helpBody:d}){const f=St(),{data:m,loading:h,error:x}=Yb(e),[y,b]=g.useState(!1),[C,k]=g.useState(null);async function j(S){b(!0),k(null);try{const T=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),N=await T.json();if(!T.ok){k(N.error||`HTTP ${T.status}`),b(!1);return}f(n)}catch(T){k(T.message),b(!1);return}b(!1)}return h?o.jsx(rt,{label:`Loading ${s.toLowerCase()}…`}):x||!m?o.jsx(Je,{error:x||`${s} is unavailable.`}):o.jsx(ci,{initialContent:m.content,documentType:l,onSave:j,saving:y,error:C,title:s,description:a,onCancel:()=>f(n),helpTitle:c,helpBody:d})}function Vv(){const{slug:e}=mt(),t=$t(),n=e??"";return o.jsx(ui,{loadUrl:`/api/projects/${n}/edit`,saveUrl:`/api/projects/${n}`,redirectTo:`${t}/projects/${n}`,title:"Edit Project",description:"Project edits change the human-authored source document. The structured form stays focused on title, slug, tags, and overview content.",documentType:"project",helpTitle:"Editable vs derived project fields",helpBody:"Project status remains derived from assignment state. If you need less common frontmatter fields, switch to raw markdown mode instead of expanding the structured form."})}function Mf(){const{slug:e,aslug:t,id:n}=mt(),s=$t(),a=!!n,l=a?`/api/assignments/${n}/edit`:`/api/projects/${e}/assignments/${t}/edit`,c=a?`/api/assignments/${n}`:`/api/projects/${e}/assignments/${t}`,d=a?`/assignments/${n}`:`${s}/projects/${e}/assignments/${t}`;return o.jsx(ui,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Assignment",description:"Edit assignment fields including status, priority, assignee, dependencies, and body.",documentType:"assignment",helpTitle:"Assignment editing",helpBody:"All fields are editable. Status can also be changed through lifecycle actions or kanban drag."})}function _f(){const{slug:e,aslug:t,id:n}=mt(),s=$t(),a=!!n,l=a?`/api/assignments/${n}/plan/edit`:`/api/projects/${e}/assignments/${t}/plan/edit`,c=a?`/api/assignments/${n}/plan`:`/api/projects/${e}/assignments/${t}/plan`,d=a?`/assignments/${n}?tab=plan`:`${s}/projects/${e}/assignments/${t}?tab=plan`;return o.jsx(ui,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Plan",description:"Plans are separate from assignment status, so keep implementation steps here instead of overloading the assignment body.",documentType:"plan",helpTitle:"Plan status is separate",helpBody:"Plan status tracks the plan document itself. It does not replace the assignment lifecycle state."})}function $f(){const{slug:e,aslug:t,id:n}=mt(),s=$t(),a=!!n,l=a?`/api/assignments/${n}/scratchpad/edit`:`/api/projects/${e}/assignments/${t}/scratchpad/edit`,c=a?`/api/assignments/${n}/scratchpad`:`/api/projects/${e}/assignments/${t}/scratchpad`,d=a?`/assignments/${n}?tab=scratchpad`:`${s}/projects/${e}/assignments/${t}?tab=scratchpad`;return o.jsx(ui,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Edit Scratchpad",description:"Scratchpad is the assignment’s working memory surface for notes, experiments, and temporary context.",documentType:"scratchpad",helpTitle:"Scratchpad usage",helpBody:"Scratchpad is for transient notes. Keep canonical objective and lifecycle data in assignment.md and any active plan files (plan.md, plan-v2.md, ...)."})}function P1({loadUrl:e,saveUrl:t,redirectTo:n,title:s,description:a,helpTitle:l,helpBody:c}){const d=St(),{data:f,loading:m,error:h}=Yb(e),[x,y]=g.useState(""),[b,C]=g.useState(""),[k,j]=g.useState(!1),[S,T]=g.useState(null);async function N(){j(!0),T(null);try{const A=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:x,body:b})}),L=await A.json();if(!A.ok){T(L.error||`HTTP ${A.status}`),j(!1);return}d(n)}catch(A){T(A.message),j(!1);return}j(!1)}return m?o.jsx(rt,{label:`Loading ${s.toLowerCase()}…`}):h||!f?o.jsx(Je,{error:h||`${s} is unavailable.`}):o.jsxs("div",{className:"space-y-4",children:[o.jsx(Le,{title:s,description:a,children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("label",{className:"block space-y-2",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),o.jsx("input",{value:x,onChange:A=>y(A.target.value),placeholder:"Optional title",className:"editor-input"})]}),o.jsxs("label",{className:"block space-y-2",children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),o.jsx("textarea",{value:b,onChange:A=>C(A.target.value),className:"editor-textarea",spellCheck:!1})]}),S?o.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:S}):null,o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),o.jsx("button",{type:"button",onClick:N,disabled:k||!b.trim(),className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:k?"Appending…":"Append Entry"})]})]})}),o.jsx(Le,{title:"Current Document",children:o.jsx(Mt,{content:f.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function Ff(){const{slug:e,aslug:t,id:n}=mt(),s=$t(),a=!!n,l=a?`/api/assignments/${n}/handoff/edit`:`/api/projects/${e}/assignments/${t}/handoff/edit`,c=a?`/api/assignments/${n}/handoff/entries`:`/api/projects/${e}/assignments/${t}/handoff/entries`,d=a?`/assignments/${n}?tab=handoff`:`${s}/projects/${e}/assignments/${t}?tab=handoff`;return o.jsx(P1,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Append Handoff Entry",description:"Add a new handoff without rewriting previous history.",helpTitle:"Append-only handoff history",helpBody:"Handoff log entries preserve the baton-passing trail between sessions and agents. Add a new entry instead of editing older ones."})}function zf(){const{slug:e,aslug:t,id:n}=mt(),s=$t(),a=!!n,l=a?`/api/assignments/${n}/decision-record/edit`:`/api/projects/${e}/assignments/${t}/decision-record/edit`,c=a?`/api/assignments/${n}/decision-record/entries`:`/api/projects/${e}/assignments/${t}/decision-record/entries`,d=a?`/assignments/${n}?tab=decisions`:`${s}/projects/${e}/assignments/${t}?tab=decisions`;return o.jsx(P1,{loadUrl:l,saveUrl:c,redirectTo:d,title:"Append Decision Entry",description:"Record a new decision and rationale without editing prior entries.",helpTitle:"Append-only decision history",helpBody:"Decision records should accumulate over time so the implementation rationale remains auditable and reviewable."})}function qv(){const{workspace:e}=mt(),{data:t}=Zo(),{data:n,loading:s,error:a,refetch:l}=qp(),[c,d]=g.useState(!1),[f,m]=g.useState(""),[h,x]=g.useState(!1),y=vn();g.useEffect(()=>{const T=y.hash.match(/^#server-(.+)/);if(!T)return;const N=decodeURIComponent(T[1]),A=document.querySelector(`[data-server-name="${window.CSS.escape(N)}"]`);if(!A)return;A.scrollIntoView({block:"nearest"}),A.classList.add("ring-2","ring-primary/60");const L=window.setTimeout(()=>A.classList.remove("ring-2","ring-primary/60"),1500);return()=>window.clearTimeout(L)},[y.hash,n]);const b=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const T=new Set(t.filter(N=>e==="_ungrouped"?N.workspace===null:N.workspace===e).map(N=>N.slug));return n.sessions.filter(N=>N.windows.some(A=>A.panes.some(L=>L.assignment&&L.assignment.project!==null&&T.has(L.assignment.project))))})();async function C(T){if(T.preventDefault(),!!f.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.trim()})}),m(""),d(!1),l()}catch{}}async function k(){x(!0);try{await fetch("/api/servers/refresh",{method:"POST"}),l()}finally{x(!1)}}async function j(T){await fetch(`/api/servers/${encodeURIComponent(T)}`,{method:"DELETE"}),l()}async function S(T){await fetch(`/api/servers/${encodeURIComponent(T)}/refresh`,{method:"POST"}),l()}return s?o.jsx(rt,{label:"Loading servers…"}):a?o.jsx(Je,{error:a}):n?n.tmuxAvailable?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?o.jsxs("form",{onSubmit:C,className:"flex items-center gap-2",children:[o.jsx("input",{type:"text",value:f,onChange:T=>m(T.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),o.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),o.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):o.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[o.jsx(Vt,{className:"h-3.5 w-3.5"}),"Track Session"]}),o.jsxs("button",{className:"shell-action",onClick:k,disabled:h,children:[o.jsx(Nb,{className:`h-3.5 w-3.5 ${h?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?o.jsx(et,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):o.jsx("div",{className:"mt-4 space-y-4",children:b.map(T=>o.jsx(g5,{session:T,onRefresh:()=>S(T.name),onRemove:()=>j(T.name),onRefetch:l},T.name))})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[o.jsx(YC,{className:"h-10 w-10 text-muted-foreground/40"}),o.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),o.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",o.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function g5({session:e,onRefresh:t,onRemove:n,onRefetch:s}){return o.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx($p,{className:"h-4 w-4 text-muted-foreground"}),o.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),o.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.alive?"border border-success-foreground/30 bg-success text-success-foreground":"border border-error-foreground/30 bg-error text-error-foreground"}`,children:e.alive?"alive":"dead"}),o.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:o.jsx(Nb,{className:"h-3.5 w-3.5"})}),o.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:o.jsx(Or,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&o.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(a=>o.jsxs("div",{children:[o.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",a.index,": ",a.name]}),o.jsx("div",{className:"space-y-1.5",children:a.panes.map(l=>o.jsx(x5,{pane:l,sessionName:e.name,windowIndex:a.index,onRefetch:s},`${a.index}:${l.index}`))})]},a.index))}),!e.alive&&o.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(WC,{className:"h-4 w-4"}),o.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function x5({pane:e,sessionName:t,windowIndex:n,onRefetch:s}){const a=$t(),l=e.cwd.replace(/^\/Users\/[^/]+/,"~");return o.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[o.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),o.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),o.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx("span",{className:"truncate",title:e.cwd,children:l}),o.jsx(Yr,{value:e.cwd})]}),e.branch&&o.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[o.jsx(_p,{className:"h-3 w-3"}),e.branch,e.worktree&&o.jsx("span",{className:"rounded bg-status-in-progress px-1 py-0.5 text-[10px] font-medium text-status-in-progress-foreground",children:"worktree"})]}),e.ports.length>0&&o.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>o.jsxs("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/10 dark:border-primary/40 dark:bg-primary/10 dark:hover:bg-primary/20",children:[c.replace("http://localhost:",":"),o.jsx(Op,{className:"h-2.5 w-2.5"})]},c))}),o.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?o.jsxs(ye,{to:e.assignment.project===null?`/assignments/${e.assignment.slug}`:`${a}/projects/${e.assignment.project}/assignments/${e.assignment.slug}`,className:"inline-flex items-center gap-1 rounded border border-primary/30 bg-primary/10 px-1.5 py-0.5 text-xs font-medium text-primary hover:bg-primary/20",children:[o.jsx(MC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?o.jsx("span",{className:"ml-1 rounded bg-muted px-1 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"Standalone"}):null]}):o.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function T1(e){return e<60?`${e}s`:e<3600?`${Math.round(e/60)}m`:e<86400?`${Math.round(e/3600)}h`:`${Math.round(e/86400)}d`}function y5(e,t){const n=Date.parse(e),s=Math.floor((n-t)/1e3);return Number.isNaN(s)?"–":s<=0?"expired":T1(s)}function v5(e){switch(e){case"idle":return"bg-green-500/15 text-green-400 border-green-500/30";case"leased":return"bg-amber-500/15 text-amber-400 border-amber-500/30";case"retired":return"bg-zinc-500/15 text-zinc-400 border-zinc-500/30"}}function b5(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Kv(){const{data:e,loading:t,error:n,refetch:s}=V2(),[a,l]=g.useState(()=>Date.now()),[c,d]=g.useState(null),[f,m]=g.useState(!1);if(g.useEffect(()=>{const x=window.setInterval(()=>l(Date.now()),1e3);return()=>window.clearInterval(x)},[]),t)return o.jsx(rt,{label:"Loading inventories…"});if(n)return o.jsx(Je,{title:"Could not load inventories",error:n,action:o.jsx("button",{type:"button",onClick:s,className:"rounded border px-3 py-1 text-sm",children:"Retry"})});if(!e||e.inventories.length===0)return o.jsx(et,{title:"No inventories yet",description:"Create one with `syntaur lease create-inventory <slug> --kind <kind>`, then add members with `syntaur lease member add <slug> <id>`."});async function h(){if(c){m(!0);try{const x=await fetch(`/api/leases/${encodeURIComponent(c.slug)}/force-release/${encodeURIComponent(c.lease.lease_id)}`,{method:"POST"});if(!x.ok){const y=await x.json().catch(()=>null);throw new Error((y==null?void 0:y.error)??`HTTP ${x.status}`)}s(),d(null)}catch(x){window.alert(x instanceof Error?`Force release failed: ${x.message}`:"Force release failed")}finally{m(!1)}}}return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"flex items-start justify-between",children:o.jsxs("div",{children:[o.jsx("h1",{className:"text-2xl font-semibold",children:"Inventories"}),o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Claimable shared resources (dev envs, test DBs, named locks, …). Global in v1 — the same set appears on every workspace."})]})}),o.jsx("div",{className:"grid gap-4",children:e.inventories.map(x=>o.jsx(w5,{detail:x,now:a,onForceRelease:y=>d({slug:x.inventory.slug,lease:y})},x.inventory.slug))}),o.jsx(Kh,{open:c!==null,title:"Force release this lease?",description:c?`This will revoke lease ${c.lease.lease_id} and (if it's still the current holder) free member ${c.lease.member_id}. Any agent still using this lease will see a stale-lease error on its next CLI call.`:"",confirmLabel:"Force release",destructive:!0,loading:f,onConfirm:h,onOpenChange:x=>{x||d(null)}})]})}function w5({detail:e,now:t,onForceRelease:n}){const{inventory:s,members:a,active_leases:l}=e,c=a.filter(f=>f.status==="idle").length,d=a.filter(f=>f.status==="leased").length;return o.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsxs("h2",{className:"text-lg font-semibold",children:[o.jsx(Ip,{className:"mr-2 inline h-4 w-4 text-muted-foreground"}),s.display_name??s.slug]}),o.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[o.jsx("code",{className:"font-mono",children:s.slug})," · kind=",s.kind," · default TTL=",T1(s.default_ttl_s)]})]}),o.jsx("div",{className:"text-right text-xs text-muted-foreground",children:o.jsxs("div",{children:[c," idle · ",d," leased · ",a.length," total"]})})]}),o.jsx("div",{className:"mt-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:a.map(f=>o.jsx(j5,{member:f},f.member_id))}),l.length>0&&o.jsxs("div",{className:"mt-4",children:[o.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Active leases"}),o.jsx("div",{className:"mt-2 space-y-2",children:l.map(f=>o.jsx(k5,{lease:f,now:t,onForceRelease:()=>n(f)},f.lease_id))})]})]})}function j5({member:e}){const t=b5(e.metadata_json);return o.jsxs("div",{className:"rounded-md border bg-muted/40 px-3 py-2 text-sm",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-mono",children:e.member_id}),o.jsx("span",{className:`rounded border px-1.5 py-0.5 text-xs ${v5(e.status)}`,children:e.status})]}),t&&o.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:Object.entries(t).map(([n,s])=>o.jsxs("div",{className:"truncate",children:[o.jsx("span",{className:"font-mono",children:n}),"=",o.jsx("span",{className:"font-mono",children:String(s)})]},n))})]})}function k5({lease:e,now:t,onForceRelease:n}){return o.jsxs("div",{className:"flex items-center justify-between rounded border bg-muted/20 px-3 py-2 text-sm",children:[o.jsx("div",{className:"min-w-0 flex-1",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("span",{className:"font-mono text-xs text-muted-foreground",children:[e.lease_id.slice(0,8),"…"]}),o.jsx("span",{className:"font-mono",children:e.member_id}),e.requested_for&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:["for ",e.requested_for]})]})}),o.jsxs("div",{className:"ml-3 flex items-center gap-3",children:[o.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx(kC,{className:"h-3 w-3"}),y5(e.expires_at,t)]}),o.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1 rounded border border-destructive/40 px-2 py-1 text-xs text-destructive hover:bg-destructive/10",children:[o.jsx(qC,{className:"h-3 w-3"}),"Force release"]})]})]})}function Gv(){const{workspace:e}=mt(),{data:t}=Zo(),{data:n,loading:s,error:a}=q2(),[l,c]=g.useState(""),[d,f]=g.useState(""),[m,h]=g.useState(""),[x,y]=g.useState("started_desc"),[b,C]=g.useState(0),[k,j]=g.useState(new Set),[S,T]=g.useState(!1),[N,A]=g.useState(null),[L,R]=g.useState(null),D=(n==null?void 0:n.sessions.some(q=>q.status==="active"))??!1;g.useEffect(()=>{if(!D)return;const q=window.setInterval(()=>C(J=>J+1),3e4);return()=>window.clearInterval(q)},[D]),g.useEffect(()=>{j(q=>{if(q.size===0)return q;const J=new Set((n==null?void 0:n.sessions.map(F=>F.sessionId))??[]),_=new Set([...q].filter(F=>J.has(F)));return _.size===q.size?q:_})},[n]);const O=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const q=l.trim().toLowerCase();return[...n.sessions.filter(_=>{var U;if(e&&t){const Z=((U=t.find(P=>P.slug===_.projectSlug))==null?void 0:U.workspace)??null;if(e==="_ungrouped"){if(Z!==null)return!1}else if(Z!==e)return!1}const F=N5(_.started);return d&&(!F||F<d)||m&&(!F||F>m)?!1:q?[_.projectSlug??"",_.assignmentSlug??"",_.agent,_.sessionId,_.path,_.description??"",_.transcriptPath??""].join(" ").toLowerCase().includes(q):!0})].sort((_,F)=>C5(_,F,x))},[n,l,x,d,m,b,e,t]);function G(q){j(J=>{const _=new Set(J);return _.has(q)?_.delete(q):_.add(q),_})}function re(){k.size===O.length&&O.length>0?j(new Set):j(new Set(O.map(q=>q.sessionId)))}async function z(q){A(null),T(!0);try{const J=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:q})}),_=await J.json().catch(()=>null);if(!J.ok)throw new Error((_==null?void 0:_.error)||`HTTP ${J.status}`);j(F=>new Set([...F].filter(B=>!q.includes(B)))),R(null)}catch(J){A(J.message)}finally{T(!1)}}if(s)return o.jsx(rt,{label:"Loading agent sessions..."});if(a)return o.jsx(Je,{error:a});if(!n)return null;const K=n.sessions.length>0;return o.jsxs(o.Fragment,{children:[o.jsxs(ch,{children:[o.jsx(Hc,{value:l,onChange:c,placeholder:"Search project, assignment, agent, session ID, path, or description"}),o.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started From",o.jsx("input",{type:"date",value:d,onChange:q=>f(q.target.value),className:"editor-input min-w-[150px]"})]}),o.jsxs("label",{className:"flex min-w-[150px] flex-col gap-1 text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:["Started To",o.jsx("input",{type:"date",value:m,onChange:q=>h(q.target.value),className:"editor-input min-w-[150px]"})]}),o.jsxs("select",{value:x,onChange:q=>y(q.target.value),className:"editor-input max-w-[200px]",children:[o.jsx("option",{value:"started_desc",children:"Newest first"}),o.jsx("option",{value:"started_asc",children:"Oldest first"}),o.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),o.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),N?o.jsx("div",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:N}):null,k.size>0&&o.jsxs("div",{className:"mt-4 flex items-center gap-3 rounded border border-border/40 bg-muted/30 px-4 py-2 text-sm",children:[o.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),o.jsxs("button",{className:"shell-action text-destructive",onClick:()=>R({sessionIds:[...k],title:`Delete ${k.size} selected session${k.size===1?"":"s"}?`,description:"This removes the selected agent session records from the dashboard. This cannot be undone.",confirmLabel:k.size===1?"Delete Session":"Delete Sessions"}),disabled:S,children:[o.jsx(Or,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),o.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),K?O.length===0?o.jsx(et,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):o.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[1280px] table-fixed text-sm",children:[o.jsxs("colgroup",{children:[o.jsx("col",{style:{width:"32px"}}),o.jsx("col",{style:{width:"140px"}}),o.jsx("col",{style:{width:"160px"}}),o.jsx("col",{style:{width:"200px"}}),o.jsx("col",{style:{width:"110px"}}),o.jsx("col",{style:{width:"130px"}}),o.jsx("col",{style:{width:"140px"}}),o.jsx("col",{style:{width:"200px"}}),o.jsx("col",{style:{width:"200px"}}),o.jsx("col",{style:{width:"40px"}})]}),o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[o.jsx("th",{className:"pb-2 pr-3",children:o.jsx("button",{onClick:re,className:"text-muted-foreground hover:text-foreground",children:k.size===O.length&&O.length>0?o.jsx(Un,{className:"h-4 w-4"}):o.jsx(Cb,{className:"h-4 w-4"})})}),o.jsx("th",{className:"pb-2 pr-3",children:"Project"}),o.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),o.jsx("th",{className:"pb-2 pr-3",children:"Description"}),o.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),o.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),o.jsx("th",{className:"pb-2 pr-3",children:"Started"}),o.jsx("th",{className:"pb-2 pr-3",children:"Path"}),o.jsx("th",{className:"pb-2 pr-3",children:"Transcript"}),o.jsx("th",{className:"pb-2"})]})}),o.jsx("tbody",{children:O.map(q=>o.jsx(S5,{session:q,selected:k.has(q.sessionId),onToggle:()=>G(q.sessionId),onDelete:()=>R({sessionIds:[q.sessionId],title:`Delete session ${q.sessionId.slice(0,8)}...?`,description:`Remove this ${q.agent} session record${q.assignmentSlug?` for ${q.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},q.sessionId))})]})}):o.jsx(et,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),o.jsx(Kh,{open:L!==null,title:(L==null?void 0:L.title)??"Delete session?",description:(L==null?void 0:L.description)??"",confirmLabel:(L==null?void 0:L.confirmLabel)??"Delete",destructive:!0,loading:S,onOpenChange:q=>{q||R(null)},onConfirm:async()=>{L&&await z(L.sessionIds)}})]})}function S5({session:e,selected:t,onToggle:n,onDelete:s}){const a=$t(),l=e.sessionId.length>12?e.sessionId.slice(0,8)+"...":e.sessionId,c=e.path?e.path.replace(/^\/Users\/[^/]+/,"~"):"—",d=e.transcriptPath?e.transcriptPath.replace(/^\/Users\/[^/]+/,"~"):"—";return o.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[o.jsx("td",{className:"py-2 pr-3",children:o.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?o.jsx(Un,{className:"h-4 w-4"}):o.jsx(Cb,{className:"h-4 w-4"})})}),o.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?o.jsx(ye,{to:`${a}/projects/${e.projectSlug}`,className:"block truncate text-primary hover:underline",title:Qt(e.projectSlug),children:Qt(e.projectSlug)}):e.assignmentSlug?o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono uppercase tracking-wide text-muted-foreground",children:"Standalone"}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?o.jsx(ye,{to:`${a}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"block truncate text-primary hover:underline",title:Qt(e.assignmentSlug),children:Qt(e.assignmentSlug)}):e.assignmentSlug?o.jsx(ye,{to:`/assignments/${e.assignmentSlug}`,className:"block truncate font-mono text-primary hover:underline",title:e.assignmentSlug,children:e.assignmentSlug}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx("td",{className:"py-2 pr-3",children:e.description?o.jsx("div",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx(Oc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),o.jsx("span",{className:"truncate",children:e.agent})]})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.sessionId,children:l}),o.jsx(Yr,{value:e.sessionId})]})}),o.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:o.jsx("span",{className:"truncate block",children:Rn(e.started)})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&o.jsx(Yr,{value:e.path})]})}),o.jsx("td",{className:"py-2 pr-3",children:e.transcriptPath?o.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[o.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),o.jsx(Yr,{value:e.transcriptPath})]}):o.jsx("span",{className:"text-muted-foreground",children:"—"})}),o.jsx("td",{className:"py-2",children:o.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:o.jsx(Or,{className:"h-3.5 w-3.5"})})})]})}function N5(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${s}-${a}`}function rc(e){const t=Date.parse(e.started),n=e.ended?Date.parse(e.ended):Date.now();return Number.isNaN(t)||Number.isNaN(n)?0:Math.max(0,Math.floor((n-t)/6e4))}function C5(e,t,n){switch(n){case"started_asc":return e.started.localeCompare(t.started);case"started_desc":return t.started.localeCompare(e.started);case"duration_asc":return rc(e)-rc(t);case"duration_desc":return rc(t)-rc(e);case"assignment_asc":return(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"")||(e.projectSlug??"").localeCompare(t.projectSlug??"");case"agent_asc":return e.agent.localeCompare(t.agent)||(e.assignmentSlug??"").localeCompare(t.assignmentSlug??"");default:return 0}}function E5(){const{data:e,loading:t,error:n,refetch:s}=Xb(),[a,l]=g.useState(""),[c,d]=g.useState(null),f=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!a.trim())return e.playbooks;const h=a.toLowerCase();return e.playbooks.filter(x=>x.name.toLowerCase().includes(h)||x.description.toLowerCase().includes(h)||x.slug.toLowerCase().includes(h)||x.tags.some(y=>y.toLowerCase().includes(h)))},[e,a]);async function m(h,x,y){if(h.preventDefault(),h.stopPropagation(),!c){d(x);try{const b=y?"disable":"enable",C=await fetch(`/api/playbooks/${encodeURIComponent(x)}/${b}`,{method:"POST"});if(!C.ok){const k=await C.json().catch(()=>({}));throw new Error(k.error||`Failed to ${b} playbook`)}s()}catch(b){console.error(b),alert(b instanceof Error?b.message:"Failed to update playbook")}finally{d(null)}}}return t?o.jsx(rt,{label:"Loading playbooks..."}):n?o.jsx(Je,{error:n}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsxs("div",{className:"relative flex-1 max-w-sm",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{type:"text",placeholder:"Search playbooks...",value:a,onChange:h=>l(h.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs(ye,{to:"/playbooks/create",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"Create Playbook"]})]}),o.jsxs(ye,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[o.jsx(wb,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),o.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:"auto-generated"})]}),o.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",o.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px]",children:"~/.syntaur/playbooks/manifest.md"})," in your CLAUDE.md for agent context."]})]})]}),f.length===0?o.jsx(et,{title:"No playbooks found",description:(e==null?void 0:e.playbooks.length)===0?"Playbooks define rules and workflows for how agents should operate. Create your first one to get started.":"No playbooks match your search.",actions:(e==null?void 0:e.playbooks.length)===0?o.jsxs(ye,{to:"/playbooks/create",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):o.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:f.map(h=>{const x=c===h.slug;return o.jsxs("div",{className:`surface-panel relative flex flex-col gap-2 p-4 transition hover:border-foreground/20 ${h.enabled?"":"opacity-75"}`,children:[o.jsxs(ye,{to:`/playbooks/${h.slug}`,className:"group flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(vb,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:h.name}),h.description?o.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:h.description}):null]})]}),o.jsx("div",{className:"flex items-center gap-2 pt-1 pr-20",children:o.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.tags.slice(0,3).map(y=>o.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-[10px] text-muted-foreground",children:[o.jsx(Eb,{className:"h-2.5 w-2.5"}),y]},y)),h.tags.length>3?o.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",h.tags.length-3]}):null]})})]}),o.jsx("button",{type:"button",role:"switch","aria-checked":h.enabled,"aria-label":h.enabled?"Disable playbook":"Enable playbook",onClick:y=>m(y,h.slug,h.enabled),disabled:x,className:`absolute bottom-3 right-3 z-10 inline-flex h-5 w-9 items-center rounded-full border opacity-100 transition disabled:opacity-50 ${h.enabled?"border-status-completed-foreground/60 bg-status-completed-foreground/80":"border-foreground/40 bg-foreground/15"}`,children:o.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${h.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]},h.slug)})})]})}function P5(){const{slug:e}=mt(),t=St(),{data:n,loading:s,error:a,refetch:l}=G2(e),[c,d]=g.useState(!1),[f,m]=g.useState(!1),[h,x]=g.useState(!1),y=e==="manifest";async function b(){if(e){m(!0);try{(await fetch(`/api/playbooks/${e}`,{method:"DELETE"})).ok&&t("/playbooks")}finally{m(!1)}}}async function C(){if(!(!e||!n)){x(!0);try{const k=n.enabled?"disable":"enable",j=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${k}`,{method:"POST"});if(!j.ok){const S=await j.json().catch(()=>({}));throw new Error(S.error||`Failed to ${k} playbook`)}l()}catch(k){console.error(k),alert(k instanceof Error?k.message:"Failed to update playbook")}finally{x(!1)}}}return s?o.jsx(rt,{label:"Loading playbook..."}):a?o.jsx(Je,{error:a}):n?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:y?"Playbook Manifest":n.name}),y?o.jsx("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:"auto-generated"}):null]}),!y&&n.description?o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,y?o.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",o.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:"~/.syntaur/playbooks/manifest.md"})," ","in your CLAUDE.md for agent context."]}):null,!y&&n.whenToUse?o.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[o.jsxs("span",{children:["Created ",Rn(n.created)]}),o.jsxs("span",{children:["Updated ",Rn(n.updated)]})]}),n.tags.length>0?o.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(k=>o.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(Eb,{className:"h-3 w-3"}),k]},k))}):null]}),y?null:o.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.enabled?"Enabled":"Disabled"}),o.jsx("button",{type:"button",role:"switch","aria-checked":n.enabled,"aria-label":n.enabled?"Disable playbook":"Enable playbook",onClick:C,disabled:h,className:`inline-flex h-5 w-9 items-center rounded-full border transition disabled:opacity-50 ${n.enabled?"border-status-completed-foreground/60 bg-status-completed-foreground/80":"border-foreground/40 bg-foreground/15"}`,children:o.jsx("span",{className:`block h-4 w-4 rounded-full shadow-sm transition-transform ${n.enabled?"translate-x-[18px] bg-background":"translate-x-[2px] bg-foreground/70"}`})})]}),o.jsxs(ye,{to:`/playbooks/${e}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[o.jsx(Fp,{className:"h-3 w-3"}),"Edit"]}),c?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:b,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-destructive px-3 text-xs font-medium text-destructive-foreground transition hover:bg-destructive/90 disabled:opacity-50",children:f?"Deleting...":"Confirm"}),o.jsx("button",{type:"button",onClick:()=>d(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):o.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-destructive transition hover:bg-destructive/10",children:[o.jsx(Or,{className:"h-3 w-3"}),"Delete"]})]})]}),o.jsx("div",{className:"surface-panel p-4",children:o.jsx(Mt,{content:n.body})})]}):null}function T5(){const e=St(),[t,n]=g.useState(null),[s,a]=g.useState(!0),[l,c]=g.useState(!1),[d,f]=g.useState(null);g.useEffect(()=>{fetch("/api/playbooks/template/new").then(h=>h.json()).then(h=>{n(h.content),a(!1)}).catch(h=>{f(h.message),a(!1)})},[]);async function m(h){c(!0),f(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:h})}),y=await x.json();if(!x.ok){f(y.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${y.slug}`)}catch(x){f(x.message),c(!1);return}c(!1)}return s?o.jsx(rt,{label:"Loading playbook template..."}):d&&!t?o.jsx(Je,{error:d}):o.jsx(ci,{initialContent:t||"",documentType:"playbook",mode:"create",onSave:m,saving:l,error:d,title:"Create Playbook",description:"Playbooks define rules and workflows for how agents should operate. Keep them short, imperative, and focused on a single concern.",onCancel:()=>e("/playbooks"),allowSlugEdit:!0})}function R5(){const{slug:e}=mt(),t=St(),[n,s]=g.useState(null),[a,l]=g.useState(!0),[c,d]=g.useState(!1),[f,m]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{s(x.content),l(!1)}).catch(x=>{m(x.message),l(!1)})},[e]);async function h(x){if(e){d(!0),m(null);try{const y=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await y.json();if(!y.ok){m(b.error||`HTTP ${y.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(y){m(y.message),d(!1);return}d(!1)}}return a?o.jsx(rt,{label:"Loading playbook..."}):f&&!n?o.jsx(Je,{error:f}):o.jsx(ci,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:h,saving:c,error:f,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function A5(){const{data:e,loading:t,error:n}=Y2(),[s,a]=g.useState(""),[l,c]=g.useState("all"),[d,f]=g.useState("all"),[m,h]=g.useState("all"),x=(e==null?void 0:e.memories)??[],y=g.useMemo(()=>Array.from(new Set(x.map(j=>j.projectSlug))).sort(),[x]),b=g.useMemo(()=>Array.from(new Set(x.map(j=>j.scope).filter(Boolean))).sort(),[x]),C=g.useMemo(()=>Array.from(new Set(x.map(j=>j.source).filter(Boolean))).sort(),[x]),k=g.useMemo(()=>x.filter(j=>{if(l!=="all"&&j.projectSlug!==l||d!=="all"&&j.scope!==d||m!=="all"&&j.source!==m)return!1;if(s.trim()){const S=s.toLowerCase();if(!j.name.toLowerCase().includes(S)&&!j.slug.toLowerCase().includes(S)&&!j.projectTitle.toLowerCase().includes(S))return!1}return!0}),[x,s,l,d,m]);return t?o.jsx(rt,{label:"Loading memories…"}):n?o.jsx(Je,{error:n}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{type:"text",placeholder:"Search memories…",value:s,onChange:j=>a(j.target.value),className:"h-9 w-64 rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs("select",{value:l,onChange:j=>c(j.target.value),className:"editor-input max-w-[170px]",children:[o.jsx("option",{value:"all",children:"All projects"}),y.map(j=>o.jsx("option",{value:j,children:j},j))]}),o.jsxs("select",{value:d,onChange:j=>f(j.target.value),className:"editor-input max-w-[140px]",children:[o.jsx("option",{value:"all",children:"All scopes"}),b.map(j=>o.jsx("option",{value:j,children:j},j))]}),o.jsxs("select",{value:m,onChange:j=>h(j.target.value),className:"editor-input max-w-[140px]",children:[o.jsx("option",{value:"all",children:"All sources"}),C.map(j=>o.jsx("option",{value:j,children:j},j))]})]}),o.jsxs(ye,{to:"/memories/new",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"New Memory"]})]}),k.length===0?o.jsx(et,{title:x.length===0?"No memories yet":"No memories match these filters",description:x.length===0?"Memories capture patterns and learnings discovered while working in a project. Agents create them via /create-memory or you can add one manually.":"Clear the current filters or create a new memory.",actions:x.length===0?o.jsxs(ye,{to:"/memories/new",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"New Memory"]}):void 0}):o.jsx("div",{className:"surface-panel overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[820px] text-left text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Name"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Project"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Scope"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Source"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"# Related"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Updated"})]})}),o.jsx("tbody",{children:k.map(j=>o.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[o.jsx("td",{className:"px-3 py-3",children:o.jsx(ye,{to:`/projects/${j.projectSlug}/memories/${j.slug}`,className:"font-semibold text-foreground hover:text-primary",children:j.name||j.slug})}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:o.jsx(ye,{to:`/projects/${j.projectSlug}`,className:"hover:text-foreground hover:underline",children:j.projectTitle})}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.scope||"—"}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.source||"—"}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.relatedAssignments.length}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:Ar(j.updated)})]},`${j.projectSlug}/${j.slug}`))})]})})]})}function D5(){const{slug:e,itemSlug:t}=mt(),n=St(),{data:s,loading:a,error:l}=X2(e,t),[c,d]=g.useState(!1),[f,m]=g.useState(!1);async function h(){if(!(!e||!t)){m(!0);try{(await fetch(`/api/projects/${e}/memories/${t}`,{method:"DELETE"})).ok&&n("/memories")}finally{m(!1)}}}return a?o.jsx(rt,{label:"Loading memory…"}):l?o.jsx(Je,{error:l}):s?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:s.name||s.slug}),o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[o.jsx(ye,{to:`/projects/${s.projectSlug}`,className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 hover:text-foreground",children:s.projectTitle}),s.scope?o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:["Scope: ",s.scope]}):null,s.source?o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:["Source: ",s.source]}):null,s.sourceAssignment?o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:["From: ",s.sourceAssignment]}):null,o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:[s.relatedAssignments.length," related"]})]}),o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[o.jsxs("span",{children:["Created ",Rn(s.created)]}),o.jsxs("span",{children:["Updated ",Rn(s.updated)]})]}),s.tags&&s.tags.length>0?o.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:s.tags.map(x=>o.jsx("span",{className:"inline-flex items-center rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 text-xs text-muted-foreground",children:x},x))}):null]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[o.jsxs(ye,{to:`/projects/${e}/memories/${t}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[o.jsx(Fp,{className:"h-3 w-3"}),"Edit"]}),c?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:h,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-destructive px-3 text-xs font-medium text-destructive-foreground transition hover:bg-destructive/90 disabled:opacity-50",children:f?"Deleting…":"Confirm"}),o.jsx("button",{type:"button",onClick:()=>d(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):o.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-destructive transition hover:bg-destructive/10",children:[o.jsx(Or,{className:"h-3 w-3"}),"Delete"]})]})]}),o.jsx("div",{className:"surface-panel p-4",children:o.jsx(Mt,{content:s.body})})]}):null}function I5(){const e=St(),[t]=Lr(),n=t.get("project"),{data:s,loading:a,error:l}=Zo(),[c,d]=g.useState(n??""),[f,m]=g.useState(""),[h,x]=g.useState(""),[y,b]=g.useState(!1),[C,k]=g.useState(null);g.useEffect(()=>{!c&&s&&s.length>0&&d(n??s[0].slug)},[s,n,c]);async function j(S){if(S.preventDefault(),!(!c||!f.trim())){b(!0),k(null);try{const T=await fetch(`/api/projects/${c}/memories`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.trim(),body:h||void 0})}),N=await T.json();if(!T.ok){k(N.error||`HTTP ${T.status}`),b(!1);return}e(`/projects/${N.projectSlug}/memories/${N.slug}`)}catch(T){k(T.message),b(!1)}}}return a?o.jsx(rt,{label:"Loading projects…"}):l?o.jsx(Je,{error:l}):!s||s.length===0?o.jsx(Je,{error:"You need at least one project before you can create a memory. Create a project from the sidebar."}):o.jsxs("form",{onSubmit:j,className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"New Memory"}),o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Memories capture patterns and learnings discovered during work in a project. They are available to every assignment in that project."})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"project",className:"block text-sm font-medium text-foreground",children:"Project"}),o.jsx("select",{id:"project",value:c,onChange:S=>d(S.target.value),className:"editor-input",required:!0,children:s.map(S=>o.jsx("option",{value:S.slug,children:S.title},S.slug))})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground",children:"Name"}),o.jsx("input",{id:"name",type:"text",value:f,onChange:S=>m(S.target.value),placeholder:"e.g. PostgreSQL connection pooling",className:"editor-input",required:!0,autoFocus:!0}),o.jsx("p",{className:"text-xs text-muted-foreground/80",children:"The slug is auto-derived from the name. Letters, digits, and hyphens."})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"body",className:"block text-sm font-medium text-foreground",children:"Body"}),o.jsx("textarea",{id:"body",value:h,onChange:S=>x(S.target.value),rows:14,placeholder:"Write the memory body in markdown. Leave blank to start from a template.",className:"editor-input font-mono text-sm"})]}),C?o.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:C}):null,o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"submit",disabled:y||!f.trim()||!c,className:"inline-flex h-9 items-center rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-50",children:y?"Creating…":"Create Memory"}),o.jsx("button",{type:"button",onClick:()=>e("/memories"),className:"inline-flex h-9 items-center rounded-md border border-border/70 bg-background px-3 text-sm font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]})]})}function L5(){const{slug:e,itemSlug:t}=mt();return o.jsx(ui,{loadUrl:`/api/projects/${e}/memories/${t}/edit`,saveUrl:`/api/projects/${e}/memories/${t}`,redirectTo:`/projects/${e}/memories/${t}`,title:"Edit Memory",description:"Edit the body. The frontmatter (name, scope, source, related assignments) is preserved unchanged on save.",documentType:"memory",helpTitle:"Memory editing",helpBody:"Memory edits are body-only. Frontmatter changes from the editor are ignored server-side; the file's existing frontmatter is preserved and `updated` is bumped automatically."})}function O5(){const{data:e,loading:t,error:n}=Q2(),[s,a]=g.useState(""),[l,c]=g.useState("all"),[d,f]=g.useState("all"),[m,h]=g.useState("all"),x=(e==null?void 0:e.resources)??[],y=g.useMemo(()=>Array.from(new Set(x.map(j=>j.projectSlug))).sort(),[x]),b=g.useMemo(()=>Array.from(new Set(x.map(j=>j.category).filter(Boolean))).sort(),[x]),C=g.useMemo(()=>Array.from(new Set(x.map(j=>j.source).filter(Boolean))).sort(),[x]),k=g.useMemo(()=>x.filter(j=>{if(l!=="all"&&j.projectSlug!==l||d!=="all"&&j.category!==d||m!=="all"&&j.source!==m)return!1;if(s.trim()){const S=s.toLowerCase();if(!j.name.toLowerCase().includes(S)&&!j.slug.toLowerCase().includes(S)&&!j.projectTitle.toLowerCase().includes(S))return!1}return!0}),[x,s,l,d,m]);return t?o.jsx(rt,{label:"Loading resources…"}):n?o.jsx(Je,{error:n}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{type:"text",placeholder:"Search resources…",value:s,onChange:j=>a(j.target.value),className:"h-9 w-64 rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs("select",{value:l,onChange:j=>c(j.target.value),className:"editor-input max-w-[170px]",children:[o.jsx("option",{value:"all",children:"All projects"}),y.map(j=>o.jsx("option",{value:j,children:j},j))]}),o.jsxs("select",{value:d,onChange:j=>f(j.target.value),className:"editor-input max-w-[160px]",children:[o.jsx("option",{value:"all",children:"All categories"}),b.map(j=>o.jsx("option",{value:j,children:j},j))]}),o.jsxs("select",{value:m,onChange:j=>h(j.target.value),className:"editor-input max-w-[140px]",children:[o.jsx("option",{value:"all",children:"All sources"}),C.map(j=>o.jsx("option",{value:j,children:j},j))]})]}),o.jsxs(ye,{to:"/resources/new",className:"inline-flex h-9 items-center gap-2 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"New Resource"]})]}),k.length===0?o.jsx(et,{title:x.length===0?"No resources yet":"No resources match these filters",description:x.length===0?"Resources are reference materials shared across a project — specs, requirements, links, or any reference content.":"Clear the current filters or create a new resource.",actions:x.length===0?o.jsxs(ye,{to:"/resources/new",className:"inline-flex items-center gap-2 rounded-md bg-foreground px-3 py-2 text-sm font-medium text-background transition hover:bg-foreground/90",children:[o.jsx(Vt,{className:"h-4 w-4"}),"New Resource"]}):void 0}):o.jsx("div",{className:"surface-panel overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[820px] text-left text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Name"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Project"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Category"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Source"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"# Related"}),o.jsx("th",{className:"px-3 pb-3 pt-3 font-medium",children:"Updated"})]})}),o.jsx("tbody",{children:k.map(j=>o.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[o.jsx("td",{className:"px-3 py-3",children:o.jsx(ye,{to:`/projects/${j.projectSlug}/resources/${j.slug}`,className:"font-semibold text-foreground hover:text-primary",children:j.name||j.slug})}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:o.jsx(ye,{to:`/projects/${j.projectSlug}`,className:"hover:text-foreground hover:underline",children:j.projectTitle})}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.category||"—"}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.source||"—"}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:j.relatedAssignments.length}),o.jsx("td",{className:"px-3 py-3 text-muted-foreground",children:Ar(j.updated)})]},`${j.projectSlug}/${j.slug}`))})]})})]})}function M5(){const{slug:e,itemSlug:t}=mt(),n=St(),{data:s,loading:a,error:l}=J2(e,t),[c,d]=g.useState(!1),[f,m]=g.useState(!1);async function h(){if(!(!e||!t)){m(!0);try{(await fetch(`/api/projects/${e}/resources/${t}`,{method:"DELETE"})).ok&&n("/resources")}finally{m(!1)}}}return a?o.jsx(rt,{label:"Loading resource…"}):l?o.jsx(Je,{error:l}):s?o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:s.name||s.slug}),o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[o.jsx(ye,{to:`/projects/${s.projectSlug}`,className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5 hover:text-foreground",children:s.projectTitle}),s.category?o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:["Category: ",s.category]}):null,s.source?o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:["Source: ",s.source]}):null,o.jsxs("span",{className:"rounded-full border border-border/60 bg-muted/50 px-2 py-0.5",children:[s.relatedAssignments.length," related"]})]}),o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[o.jsxs("span",{children:["Created ",Rn(s.created)]}),o.jsxs("span",{children:["Updated ",Rn(s.updated)]})]})]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[o.jsxs(ye,{to:`/projects/${e}/resources/${t}/edit`,className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:[o.jsx(Fp,{className:"h-3 w-3"}),"Edit"]}),c?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:h,disabled:f,className:"inline-flex h-8 items-center gap-1.5 rounded-md bg-destructive px-3 text-xs font-medium text-destructive-foreground transition hover:bg-destructive/90 disabled:opacity-50",children:f?"Deleting…":"Confirm"}),o.jsx("button",{type:"button",onClick:()=>d(!1),className:"inline-flex h-8 items-center rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]}):o.jsxs("button",{type:"button",onClick:()=>d(!0),className:"inline-flex h-8 items-center gap-1.5 rounded-md border border-border/70 bg-background px-3 text-xs font-medium text-destructive transition hover:bg-destructive/10",children:[o.jsx(Or,{className:"h-3 w-3"}),"Delete"]})]})]}),o.jsx("div",{className:"surface-panel p-4",children:o.jsx(Mt,{content:s.body})})]}):null}function _5(){const e=St(),[t]=Lr(),n=t.get("project"),{data:s,loading:a,error:l}=Zo(),[c,d]=g.useState(n??""),[f,m]=g.useState(""),[h,x]=g.useState(""),[y,b]=g.useState(!1),[C,k]=g.useState(null);g.useEffect(()=>{!c&&s&&s.length>0&&d(n??s[0].slug)},[s,n,c]);async function j(S){if(S.preventDefault(),!(!c||!f.trim())){b(!0),k(null);try{const T=await fetch(`/api/projects/${c}/resources`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f.trim(),body:h||void 0})}),N=await T.json();if(!T.ok){k(N.error||`HTTP ${T.status}`),b(!1);return}e(`/projects/${N.projectSlug}/resources/${N.slug}`)}catch(T){k(T.message),b(!1)}}}return a?o.jsx(rt,{label:"Loading projects…"}):l?o.jsx(Je,{error:l}):!s||s.length===0?o.jsx(Je,{error:"You need at least one project before you can create a resource. Create a project from the sidebar."}):o.jsxs("form",{onSubmit:j,className:"space-y-5",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"New Resource"}),o.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Resources are reference material — specs, requirements, links — shared across every assignment in a project."})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"project",className:"block text-sm font-medium text-foreground",children:"Project"}),o.jsx("select",{id:"project",value:c,onChange:S=>d(S.target.value),className:"editor-input",required:!0,children:s.map(S=>o.jsx("option",{value:S.slug,children:S.title},S.slug))})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground",children:"Name"}),o.jsx("input",{id:"name",type:"text",value:f,onChange:S=>m(S.target.value),placeholder:"e.g. Auth Requirements",className:"editor-input",required:!0,autoFocus:!0}),o.jsx("p",{className:"text-xs text-muted-foreground/80",children:"The slug is auto-derived from the name. Letters, digits, and hyphens."})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"body",className:"block text-sm font-medium text-foreground",children:"Body"}),o.jsx("textarea",{id:"body",value:h,onChange:S=>x(S.target.value),rows:14,placeholder:"Write the resource body in markdown. Leave blank to start from a template.",className:"editor-input font-mono text-sm"})]}),C?o.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:C}):null,o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"submit",disabled:y||!f.trim()||!c,className:"inline-flex h-9 items-center rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-50",children:y?"Creating…":"Create Resource"}),o.jsx("button",{type:"button",onClick:()=>e("/resources"),className:"inline-flex h-9 items-center rounded-md border border-border/70 bg-background px-3 text-sm font-medium text-foreground transition hover:bg-muted",children:"Cancel"})]})]})}function $5(){const{slug:e,itemSlug:t}=mt();return o.jsx(ui,{loadUrl:`/api/projects/${e}/resources/${t}/edit`,saveUrl:`/api/projects/${e}/resources/${t}`,redirectTo:`/projects/${e}/resources/${t}`,title:"Edit Resource",description:"Edit the body. The frontmatter (name, category, source, related assignments) is preserved unchanged on save.",documentType:"resource",helpTitle:"Resource editing",helpBody:"Resource edits are body-only. Frontmatter changes from the editor are ignored server-side; the file's existing frontmatter is preserved and `updated` is bumped automatically."})}function F5({value:e,onChange:t}){return o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"color",value:e||"#64748b",onChange:n=>t(n.target.value),className:"h-7 w-7 shrink-0 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5",title:"Pick a color"}),o.jsx("input",{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"#64748b",className:"editor-input w-[5.5rem] font-mono text-xs"})]})}const Np=["projects","playbooks","todos","servers","config"];function z5(e){const t=new Set;for(const n of e.split(",").map(s=>s.trim()))Np.includes(n)&&t.add(n);return t}function Yv(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function B5(){const[e,t]=g.useState(!0),[n,s]=g.useState(null),[a,l]=g.useState(""),[c,d]=g.useState(new Set(Np)),[f,m]=g.useState(!1),[h,x]=g.useState(!1),[y,b]=g.useState(null),[C,k]=g.useState(null),j=g.useCallback(async()=>{try{const R=await fetch("/api/backup");if(!R.ok)throw new Error(`HTTP ${R.status}`);const D=await R.json();s(D),l(D.repo??""),d(z5(D.categories)),m(!1)}catch(R){k({type:"error",message:`Failed to load backup config: ${R instanceof Error?R.message:String(R)}`})}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(R){d(D=>{const O=new Set(D);return O.has(R)?O.delete(R):O.add(R),O}),m(!0)}async function T(){x(!0),k(null);try{const R=Array.from(c),D=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:a.trim()||null,categories:R})}),O=await D.json();if(!D.ok)throw new Error(O.error||`HTTP ${D.status}`);s(O),m(!1),k({type:"success",message:"Backup configuration saved."})}catch(R){k({type:"error",message:`Save failed: ${R instanceof Error?R.message:String(R)}`})}finally{x(!1)}}async function N(){b("push"),k(null);try{const R=await fetch("/api/backup/push",{method:"POST"}),D=await R.json();if(!R.ok||D.success===!1)throw new Error(D.error||D.message||`HTTP ${R.status}`);k({type:"success",message:D.message||"Backup complete."}),await j()}catch(R){k({type:"error",message:`Backup failed: ${R instanceof Error?R.message:String(R)}`})}finally{b(null)}}async function A(){if(window.confirm("Restore will overwrite local files for the selected categories with the contents of the GitHub repo. This cannot be undone. Continue?")){b("pull"),k(null);try{const D=await fetch("/api/backup/pull",{method:"POST"}),O=await D.json();if(!D.ok||O.success===!1)throw new Error(O.error||O.message||`HTTP ${D.status}`);k({type:"success",message:O.message||"Restore complete."}),await j()}catch(D){k({type:"error",message:`Restore failed: ${D instanceof Error?D.message:String(D)}`})}finally{b(null)}}}if(e)return o.jsx(Le,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const L=!!a.trim()&&c.size>0&&!y&&!f;return o.jsx(Le,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:o.jsxs("div",{className:"space-y-4",children:[C&&o.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${C.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:C.message}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),o.jsx("input",{type:"text",value:a,onChange:R=>{l(R.target.value),m(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",o.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:Np.map(R=>{const D=c.has(R);return o.jsxs("button",{type:"button",onClick:()=>S(R),className:`shell-action text-xs ${D?"bg-primary/10 text-primary hover:bg-primary/20":"bg-muted/30 text-muted-foreground hover:bg-muted/60"}`,children:[o.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${D?"bg-primary":"bg-muted-foreground/40"}`}),R]},R)})})]}),o.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),Yv((n==null?void 0:n.lastBackup)??null)]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),Yv((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&o.jsx("div",{className:"sm:col-span-2 text-warning-foreground",children:"⚠ A backup operation is in progress or the lock file is stale."})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[o.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:T,disabled:h||!f,children:[o.jsx(zp,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Config"]}),o.jsxs("button",{className:"shell-action",onClick:N,disabled:!L,title:L?"Back up now":f?"Save config first":"Set repo and pick categories",children:[o.jsx(XC,{className:"h-3.5 w-3.5"}),y==="push"?"Backing up...":"Back Up Now"]}),o.jsxs("button",{className:"shell-action",onClick:A,disabled:!L,title:L?"Restore from backup":f?"Save config first":"Set repo and pick categories",children:[o.jsx(CC,{className:"h-3.5 w-3.5"}),y==="pull"?"Restoring...":"Restore"]}),f&&o.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),o.jsxs("p",{className:"flex items-start gap-2 rounded-md border border-border/40 bg-muted/20 p-3 text-xs text-muted-foreground",children:[o.jsx(SC,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),o.jsxs("span",{children:["Restore never overwrites ",o.jsx("code",{className:"rounded bg-muted px-1",children:"config.md"})," (would clobber backup settings). The agent sessions database is not backed up — only markdown files."]})]})]})})}function U5(){const{customBindings:e,userBindings:t,actionEntries:n,findConflict:s,bindAction:a,unbindAction:l}=As(),[c,d]=g.useState(null),[f,m]=g.useState(null),[h,x]=g.useState(!1),y=Object.values(t).some(N=>typeof N=="string"&&N.length>0);function b(N,A){m({type:N,message:A}),setTimeout(()=>m(null),2500)}function C(N){d({kind:N,combo:null,conflict:null,saving:!1,error:null})}function k(N){if(!c||N.key==="Escape")return;if(N.key==="Enter"&&c.combo){N.preventDefault(),j();return}if(N.key==="Enter")return;N.preventDefault(),N.stopPropagation();const A=Qb(N.nativeEvent);if(!A)return;const L=s(A,c.kind);d({...c,combo:A,conflict:L,error:null})}async function j(){var N;if(c!=null&&c.combo){if((N=c.conflict)!=null&&N.description){d({...c,error:`Reserved: ${c.conflict.description}`});return}d({...c,saving:!0,error:null});try{await a(c.kind,c.combo),d(null),b("success",`Bound ${Yi[c.kind]}`)}catch(A){d({...c,saving:!1,error:A instanceof Error?A.message:"Failed to save"})}}}async function S(N){try{await l(N),b("success",`Cleared ${Yi[N]} binding`)}catch(A){b("error",A instanceof Error?A.message:"Failed to clear binding")}}async function T(){if(!h){x(!0);try{await gT(),b("success","All hotkey bindings cleared")}catch(N){b("error",N instanceof Error?N.message:"Failed to reset bindings")}finally{x(!1)}}}return o.jsxs(Le,{title:"Hotkey Bindings",description:"Each canonical create action ships with a default hotkey that fires the action without opening the palette. Override any of them below — Clear restores the default.",actions:y?o.jsxs("button",{className:"shell-action text-xs",onClick:()=>void T(),disabled:h,children:[o.jsx(Gf,{className:"h-3 w-3"}),"Restore defaults"]}):void 0,children:[f?o.jsx("div",{className:`mb-3 rounded-md border px-3 py-1.5 text-xs ${f.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:f.message}):null,o.jsx("ul",{className:"space-y-2",children:$c.map(N=>{var O,G;const A=n.find(re=>re.bindableKind===N),L=e[N],R=typeof t[N]=="string"&&!!t[N],D=(c==null?void 0:c.kind)===N;return o.jsxs("li",{className:"flex flex-wrap items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2",children:[o.jsx(Kf,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("div",{className:"text-sm text-foreground",children:(A==null?void 0:A.title)??Yi[N]}),A!=null&&A.subtitle?o.jsx("div",{className:"text-xs text-muted-foreground",children:A.subtitle}):null]}),L?o.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[o.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-foreground",children:Tr(L)}),o.jsx("span",{className:`text-[10px] uppercase tracking-wide ${R?"text-primary":"text-muted-foreground"}`,children:R?"custom":"default"})]}):o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:"unbound"}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("button",{type:"button",className:"shell-action text-xs",onClick:()=>C(N),children:L?"Rebind":"Bind"}),R?o.jsxs("button",{type:"button",className:"shell-action text-xs",onClick:()=>void S(N),"aria-label":`Restore default ${Yi[N]} binding`,children:[o.jsx(Bp,{className:"h-3 w-3"}),"Restore default"]}):null]}),D?o.jsx("div",{className:"mt-2 w-full rounded-md border border-primary/40 bg-primary/5 px-3 py-3 text-center outline-none",tabIndex:0,autoFocus:!0,onKeyDown:k,onBlur:()=>{(c==null?void 0:c.kind)===N&&!c.saving&&d(null)},children:c!=null&&c.combo?o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"text-base font-semibold tracking-wide text-foreground",children:Tr(c.combo)}),(O=c.conflict)!=null&&O.description?o.jsxs("div",{className:"text-xs text-destructive",children:["Reserved: ",c.conflict.description]}):(G=c.conflict)!=null&&G.kind?o.jsxs("div",{className:"text-xs text-amber-500 dark:text-amber-400",children:['Already bound to "',Yi[c.conflict.kind],'". Press Enter to overwrite.']}):o.jsx("div",{className:"text-xs text-muted-foreground",children:"Press Enter to save, Esc to cancel, any other key to retry."}),c.error?o.jsx("div",{className:"text-xs text-destructive",children:c.error}):null]}):o.jsx("div",{className:"text-xs text-muted-foreground",children:"Press the key combination you want to bind…"})}):null]},N)})})]})}function Bf(e){return{statuses:e.statuses.map(t=>({id:t.id,label:t.label,description:t.description??"",color:t.color??"",terminal:t.terminal??!1})),order:[...e.order]}}function H5(){const[e,t]=g.useState(!0),[n,s]=g.useState(null),[a,l]=g.useState(!1),[c,d]=g.useState([]),[f,m]=g.useState([]),[h,x]=g.useState(!1),[y,b]=g.useState(null),[C,k]=g.useState(!1),{preset:j,setPreset:S,resetPreset:T}=Wp(),[N,A]=g.useState(!1),[L,R]=g.useState(null);async function D(B){if(!(B===j||N)){A(!0),R(null);try{await S(B),R({type:"success",message:"Theme updated"}),setTimeout(()=>R(null),2e3)}catch(U){R({type:"error",message:U instanceof Error?U.message:"Failed to save theme"})}finally{A(!1)}}}async function O(){A(!0),R(null);try{await T(),R({type:"success",message:"Theme reset to default"}),setTimeout(()=>R(null),2e3)}catch(B){R({type:"error",message:B instanceof Error?B.message:"Failed to reset theme"})}finally{A(!1)}}const G=g.useCallback(async()=>{try{const B=await fetch("/api/config/statuses");if(!B.ok)throw new Error(`HTTP ${B.status}`);const U=await B.json(),Z=Bf(U);d(Z.statuses),m(Z.order),l(U.custom),k(!1),s(null)}catch(B){s(B instanceof Error?B.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{G()},[G]);function re(){setTimeout(()=>b(null),3e3)}async function z(){x(!0),b(null);try{const B={statuses:c.map(M=>({id:M.id,label:M.label,...M.description?{description:M.description}:{},...M.color?{color:M.color}:{},...M.terminal?{terminal:!0}:{}})),order:f,transitions:[]},U=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(B)});if(!U.ok){const M=await U.json().catch(()=>({error:"Unknown error"}));throw new Error(M.error??"Save failed")}const Z=await U.json(),P=Bf(Z);d(P.statuses),m(P.order),l(Z.custom),k(!1),my(),b({type:"success",message:"Status config saved"}),re()}catch(B){b({type:"error",message:B instanceof Error?B.message:"Save failed"})}finally{x(!1)}}async function K(){x(!0),b(null);try{const B=await fetch("/api/config/statuses",{method:"DELETE"});if(!B.ok)throw new Error("Reset failed");const U=await B.json(),Z=Bf(U);d(Z.statuses),m(Z.order),l(U.custom),k(!1),my(),b({type:"success",message:"Reset to defaults"}),re()}catch(B){b({type:"error",message:B instanceof Error?B.message:"Reset failed"})}finally{x(!1)}}function q(B,U,Z){d(P=>{const M=[...P];if(M[B]={...M[B],[U]:Z},U==="id"&&typeof Z=="string"){const Q=P[B].id;m(I=>I.map(ge=>ge===Q?Z:ge))}return M}),k(!0)}function J(){const B=`status_${c.length+1}`;d(U=>[...U,{id:B,label:"New Status",description:"",color:"",terminal:!1}]),m(U=>[...U,B]),k(!0)}function _(B){const U=c[B].id;d(Z=>Z.filter((P,M)=>M!==B)),m(Z=>Z.filter(P=>P!==U)),k(!0)}function F(B,U){const Z=B+U;Z<0||Z>=f.length||(m(P=>{const M=[...P];return[M[B],M[Z]]=[M[Z],M[B]],M}),k(!0))}return e?o.jsx(rt,{label:"Loading settings..."}):n?o.jsx(Je,{error:n}):o.jsx(da,{children:o.jsxs("div",{className:"space-y-6",children:[o.jsxs(Le,{title:"Theme",description:"Pick a color theme for the dashboard. The default is the Syntaur brand.",actions:j!=="default"?o.jsxs("button",{className:"shell-action text-xs",onClick:O,disabled:N,children:[o.jsx(Gf,{className:"h-3 w-3"}),"Reset"]}):void 0,children:[L&&o.jsx("div",{className:`mb-3 rounded-md border px-3 py-1.5 text-xs ${L.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:L.message}),o.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:_b.map(B=>{const U=B.slug===j;return o.jsxs("button",{type:"button",onClick:()=>D(B.slug),disabled:N,"aria-pressed":U,className:`group relative flex flex-col gap-2 rounded-lg border bg-card/95 p-3 text-left transition disabled:opacity-60 ${U?"border-primary ring-2 ring-primary/40":"border-border/60 hover:border-primary/40"}`,children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:B.swatches.primary}}),o.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:B.swatches.secondary}}),o.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:B.swatches.coral}}),o.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:B.swatches.teal}}),o.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:B.swatches.amber}}),U&&o.jsx("span",{className:"ml-auto inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:o.jsx(Ea,{className:"h-3 w-3"})})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-medium text-foreground",children:B.label}),o.jsx("div",{className:"text-xs text-muted-foreground",children:B.description})]})]},B.slug)})})]}),o.jsx(U5,{}),o.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${a?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(kb,{className:"h-4 w-4"}),a?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),o.jsxs("button",{className:"shell-action text-xs",onClick:K,disabled:h||!a&&!C,children:[o.jsx(Gf,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),y&&o.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${y.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:y.message}),o.jsx(Le,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:o.jsxs("button",{className:"shell-action text-xs",onClick:J,children:[o.jsx(Vt,{className:"h-3 w-3"}),"Add Status"]}),children:o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[o.jsx("th",{className:"pb-2 pr-3",children:"ID"}),o.jsx("th",{className:"pb-2 pr-3",children:"Label"}),o.jsx("th",{className:"pb-2 pr-3",children:"Color"}),o.jsx("th",{className:"pb-2 pr-3",children:o.jsxs(fa,{children:[o.jsx(pa,{asChild:!0,children:o.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),o.jsx(Wo,{className:"max-w-xs text-xs font-normal normal-case tracking-normal",children:'When enabled, assignments in this status count as finished — they fill the "done" portion of progress bars and satisfy dependency requirements.'})]})}),o.jsx("th",{className:"pb-2 w-10"})]})}),o.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((B,U)=>o.jsxs("tr",{children:[o.jsx("td",{className:"py-2 pr-3",children:o.jsx("input",{type:"text",value:B.id,onChange:Z=>q(U,"id",Z.target.value),className:"editor-input w-full text-sm"})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsx("input",{type:"text",value:B.label,onChange:Z=>q(U,"label",Z.target.value),className:"editor-input w-full text-sm"})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsx(F5,{value:B.color,onChange:Z=>q(U,"color",Z)})}),o.jsx("td",{className:"py-2 pr-3",children:o.jsx("button",{type:"button",role:"switch","aria-checked":B.terminal,onClick:()=>q(U,"terminal",!B.terminal),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background ${B.terminal?"bg-primary":"bg-muted"}`,children:o.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${B.terminal?"translate-x-4":"translate-x-0"}`})})}),o.jsx("td",{className:"py-2",children:o.jsx("button",{className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>_(U),title:"Remove status",children:o.jsx(Or,{className:"h-3.5 w-3.5"})})})]},U))})]})})}),o.jsx(Le,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:o.jsx("div",{className:"space-y-1",children:f.map((B,U)=>{var P;const Z=((P=c.find(M=>M.id===B))==null?void 0:P.label)??B;return o.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[o.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:U+1}),o.jsx("span",{className:"flex-1 font-medium",children:Z}),o.jsx("span",{className:"text-xs text-muted-foreground",children:B}),o.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>F(U,-1),disabled:U===0,title:"Move up",children:o.jsx(bb,{className:"h-3.5 w-3.5"})}),o.jsx("button",{className:"inline-flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-30",onClick:()=>F(U,1),disabled:U===f.length-1,title:"Move down",children:o.jsx(ya,{className:"h-3.5 w-3.5"})})]},U)})})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:z,disabled:h||!C,children:[o.jsx(zp,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Configuration"]}),C&&o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),G()},disabled:h,children:"Discard Changes"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),o.jsx(B5,{})]})})}function W5(){const{data:e,loading:t,error:n,refetch:s}=Kp(),[a,l]=g.useState(""),c=g.useRef(null);ro("list:todos");const[d,f]=g.useState(""),[m,h]=g.useState(""),[x,y]=g.useState(""),[b,C]=g.useState("_global"),[k,j]=g.useState(null);function S(_,F){_.stopPropagation(),navigator.clipboard.writeText(F),j(F),setTimeout(()=>j(B=>B===F?null:B),1500)}const T=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const _=[];for(const F of e.workspaces)for(const B of F.items)_.push({...B,workspace:F.workspace});return _},[e]),N=g.useMemo(()=>{const _=new Set;for(const F of T)for(const B of F.tags)_.add(B);return Array.from(_).sort()},[T]),A=g.useMemo(()=>{let _=T;if(a.trim()){const F=a.toLowerCase();_=_.filter(B=>B.description.toLowerCase().includes(F)||B.tags.some(U=>U.toLowerCase().includes(F))||B.id.includes(F))}return d&&(_=_.filter(F=>F.status===d)),m&&(_=_.filter(F=>F.tags.includes(m))),_},[T,a,d,m]),L=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const _={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const F of e.workspaces)_.open+=F.counts.open,_.in_progress+=F.counts.in_progress,_.completed+=F.counts.completed,_.blocked+=F.counts.blocked,_.total+=F.counts.total;return _},[e]);async function R(){x.trim()&&(await Gp(b,x.trim()),y(""),s())}const D={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function O(_,F,B){G(_,F,D[B]||"open")}async function G(_,F,B){switch(B){case"open":await tw(_,F);break;case"in_progress":await ew(_,F);break;case"completed":await Jb(_,F);break;case"blocked":await Zb(_,F);break}s()}async function re(_,F){await nw(_,F),s()}const{hotkeyRowProps:z}=Ta(A,{scope:"list:todos",bindO:!1,onOpen:_=>O(_.workspace,_.id,_.status)});xt({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var _;return(_=c.current)==null?void 0:_.focus()}}),xt({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>s()});const[K,q]=Lr(),J=K.get("focus");return g.useEffect(()=>{if(!J)return;const _=document.querySelector(`[data-todo-id="${CSS.escape(J)}"]`);if(!_)return;_.scrollIntoView({block:"nearest"}),_.classList.add("ring-2","ring-primary/60");const F=window.setTimeout(()=>{_.classList.remove("ring-2","ring-primary/60"),q(B=>{const U=new URLSearchParams(B);return U.delete("focus"),U})},1500);return()=>window.clearTimeout(F)},[J,A.length,q]),t?o.jsx(rt,{label:"Loading todos..."}):n?o.jsx(Je,{error:n}):o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[o.jsx(ot,{label:"Open",value:L.open,icon:Un}),o.jsx(ot,{label:"In Progress",value:L.in_progress,icon:Sb,tone:"info"}),o.jsx(ot,{label:"Blocked",value:L.blocked,icon:Qo,tone:"warn"}),o.jsx(ot,{label:"Completed",value:L.completed,icon:Un,tone:"default"})]}),o.jsx("div",{className:"surface-panel p-3",children:o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("select",{value:b,onChange:_=>C(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(_=>_.workspace!=="_global").map(_=>o.jsx("option",{value:_.workspace,children:_.workspace},_.workspace))]}),o.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:_=>y(_.target.value),onKeyDown:_=>_.key==="Enter"&&R(),className:"h-9 flex-1 rounded-md border border-border/70 bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"}),o.jsxs("button",{onClick:R,disabled:!x.trim(),className:"inline-flex h-9 items-center gap-1.5 rounded-md bg-foreground px-3 text-sm font-medium text-background transition hover:bg-foreground/90 disabled:opacity-40",children:[o.jsx(Vt,{className:"h-4 w-4"}),"Add"]})]})}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"relative flex-1 max-w-sm",children:[o.jsx(Rs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),o.jsx("input",{ref:c,type:"text",placeholder:"Search todos...",value:a,onChange:_=>l(_.target.value),className:"h-9 w-full rounded-md border border-border/70 bg-background pl-9 pr-3 text-sm text-foreground placeholder:text-muted-foreground/60 focus:border-foreground/30 focus:outline-none"})]}),o.jsxs("select",{value:d,onChange:_=>f(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All statuses"}),o.jsx("option",{value:"open",children:"Open"}),o.jsx("option",{value:"in_progress",children:"In Progress"}),o.jsx("option",{value:"completed",children:"Completed"}),o.jsx("option",{value:"blocked",children:"Blocked"})]}),N.length>0&&o.jsxs("select",{value:m,onChange:_=>h(_.target.value),className:"h-9 rounded-md border border-border/70 bg-background px-2 text-sm text-foreground focus:border-foreground/30 focus:outline-none",children:[o.jsx("option",{value:"",children:"All tags"}),N.map(_=>o.jsxs("option",{value:_,children:["#",_]},_))]})]}),A.length===0?o.jsx(et,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):o.jsx("div",{className:"space-y-1",children:A.map((_,F)=>o.jsxs("div",{"data-todo-id":_.id,...z(F),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>O(_.workspace,_.id,_.status),children:[o.jsx(Mh,{status:_.status,onChange:B=>G(_.workspace,_.id,B)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:`text-sm ${_.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:_.description}),_.tags.length>0&&o.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:_.tags.map(B=>`#${B}`).join(" ")})]}),o.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:_.workspace!=="_global"&&o.jsx(ye,{to:`/w/${_.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:B=>B.stopPropagation(),children:_.workspace})}),k===_.id?o.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[o.jsx(Ea,{className:"h-3 w-3"})," Copied to clipboard"]}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:B=>S(B,_.id),children:["t:",_.id]}),o.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:B=>S(B,_.id),children:o.jsx(Mc,{className:"h-3 w-3"})})]}),o.jsx("button",{onClick:()=>re(_.workspace,_.id),className:"text-xs text-muted-foreground/40 hover:text-destructive transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${_.workspace}-${_.id}`))})]})}function V5(){return o.jsx(tC,{children:o.jsx(yT,{children:o.jsx(RN,{children:o.jsxs(Ie,{element:o.jsx(ST,{}),children:[o.jsx(Ie,{path:"/",element:o.jsx(DT,{})}),o.jsx(Ie,{path:"/projects",element:o.jsx(xy,{})}),o.jsx(Ie,{path:"/assignments",element:o.jsx(zv,{})}),o.jsx(Ie,{path:"/assignments/new",element:o.jsx(Wv,{})}),o.jsx(Ie,{path:"/assignments/:id",element:o.jsx(e5,{})}),o.jsx(Ie,{path:"/assignments/:id/edit",element:o.jsx(Mf,{})}),o.jsx(Ie,{path:"/assignments/:id/plan/edit",element:o.jsx(_f,{})}),o.jsx(Ie,{path:"/assignments/:id/scratchpad/edit",element:o.jsx($f,{})}),o.jsx(Ie,{path:"/assignments/:id/handoff/edit",element:o.jsx(Ff,{})}),o.jsx(Ie,{path:"/assignments/:id/decision-record/edit",element:o.jsx(zf,{})}),o.jsx(Ie,{path:"/attention",element:o.jsx(IT,{})}),o.jsx(Ie,{path:"/servers",element:o.jsx(qv,{})}),o.jsx(Ie,{path:"/inventories",element:o.jsx(Kv,{})}),o.jsx(Ie,{path:"/agent-sessions",element:o.jsx(Gv,{})}),o.jsx(Ie,{path:"/playbooks",element:o.jsx(E5,{})}),o.jsx(Ie,{path:"/playbooks/create",element:o.jsx(T5,{})}),o.jsx(Ie,{path:"/playbooks/:slug",element:o.jsx(P5,{})}),o.jsx(Ie,{path:"/playbooks/:slug/edit",element:o.jsx(R5,{})}),o.jsx(Ie,{path:"/memories",element:o.jsx(A5,{})}),o.jsx(Ie,{path:"/memories/new",element:o.jsx(I5,{})}),o.jsx(Ie,{path:"/projects/:slug/memories/:itemSlug",element:o.jsx(D5,{})}),o.jsx(Ie,{path:"/projects/:slug/memories/:itemSlug/edit",element:o.jsx(L5,{})}),o.jsx(Ie,{path:"/resources",element:o.jsx(O5,{})}),o.jsx(Ie,{path:"/resources/new",element:o.jsx(_5,{})}),o.jsx(Ie,{path:"/projects/:slug/resources/:itemSlug",element:o.jsx(M5,{})}),o.jsx(Ie,{path:"/projects/:slug/resources/:itemSlug/edit",element:o.jsx($5,{})}),o.jsx(Ie,{path:"/todos",element:o.jsx(W5,{})}),o.jsx(Ie,{path:"/help",element:o.jsx(OT,{})}),o.jsx(Ie,{path:"/settings",element:o.jsx(H5,{})}),o.jsx(Ie,{path:"/create/project",element:o.jsx(Uv,{})}),o.jsx(Ie,{path:"/projects/:slug",element:o.jsx(Ov,{})}),o.jsx(Ie,{path:"/projects/:slug/edit",element:o.jsx(Vv,{})}),o.jsx(Ie,{path:"/projects/:slug/create/assignment",element:o.jsx(Hv,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug",element:o.jsx(Mv,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug/edit",element:o.jsx(Mf,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:o.jsx(_f,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:o.jsx($f,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:o.jsx(Ff,{})}),o.jsx(Ie,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:o.jsx(zf,{})}),o.jsx(Ie,{path:"/w/:workspace/projects",element:o.jsx(xy,{})}),o.jsx(Ie,{path:"/w/:workspace/assignments",element:o.jsx(zv,{})}),o.jsx(Ie,{path:"/w/:workspace/assignments/new",element:o.jsx(Wv,{})}),o.jsx(Ie,{path:"/w/:workspace/servers",element:o.jsx(qv,{})}),o.jsx(Ie,{path:"/w/:workspace/inventories",element:o.jsx(Kv,{})}),o.jsx(Ie,{path:"/w/:workspace/agent-sessions",element:o.jsx(Gv,{})}),o.jsx(Ie,{path:"/w/:workspace/todos",element:o.jsx(jM,{})}),o.jsx(Ie,{path:"/w/:workspace/create/project",element:o.jsx(Uv,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug",element:o.jsx(Ov,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/edit",element:o.jsx(Vv,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/create/assignment",element:o.jsx(Hv,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:o.jsx(Mv,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:o.jsx(Mf,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:o.jsx(_f,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:o.jsx($f,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:o.jsx(Ff,{})}),o.jsx(Ie,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:o.jsx(zf,{})})]})})})})}$2();RS.createRoot(document.getElementById("root")).render(o.jsx(g.StrictMode,{children:o.jsx(F2,{children:o.jsx(V5,{})})}));export{yR as _,q5 as a,Dc as g};
|