syntaur 0.5.2 → 0.6.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/dashboard/dist/assets/{_basePickBy-ij-Ukp6s.js → _basePickBy-BQIP1Ca7.js} +1 -1
- package/dashboard/dist/assets/{_baseUniq-CZKk9gZR.js → _baseUniq-BnBWRwT7.js} +1 -1
- package/dashboard/dist/assets/{arc-C30UbJZB.js → arc-BYWL4eq0.js} +1 -1
- package/dashboard/dist/assets/{architectureDiagram-2XIMDMQ5-BDVieGIr.js → architectureDiagram-2XIMDMQ5-CD_SWPSa.js} +1 -1
- package/dashboard/dist/assets/{blockDiagram-WCTKOSBZ-DZYY4t9w.js → blockDiagram-WCTKOSBZ-BS1ZbFBU.js} +1 -1
- package/dashboard/dist/assets/{c4Diagram-IC4MRINW-B019MXol.js → c4Diagram-IC4MRINW-D99yg-l2.js} +1 -1
- package/dashboard/dist/assets/channel-Df6VrFK5.js +1 -0
- package/dashboard/dist/assets/{chunk-4BX2VUAB-DrkTwY15.js → chunk-4BX2VUAB-BkN9IORC.js} +1 -1
- package/dashboard/dist/assets/{chunk-55IACEB6-mFTAE8DD.js → chunk-55IACEB6-BQPHWefV.js} +1 -1
- package/dashboard/dist/assets/{chunk-FMBD7UC4-VgDZaNoS.js → chunk-FMBD7UC4-CNcExMdx.js} +1 -1
- package/dashboard/dist/assets/{chunk-JSJVCQXG-C_KXaq-c.js → chunk-JSJVCQXG-LXBmftkC.js} +1 -1
- package/dashboard/dist/assets/{chunk-KX2RTZJC-DI-P_pPL.js → chunk-KX2RTZJC-Tqi7zNqq.js} +1 -1
- package/dashboard/dist/assets/{chunk-NQ4KR5QH-TgYAsxTk.js → chunk-NQ4KR5QH-DkMbx-rW.js} +1 -1
- package/dashboard/dist/assets/{chunk-QZHKN3VN-Drfv_VpM.js → chunk-QZHKN3VN-BlrRCfkJ.js} +1 -1
- package/dashboard/dist/assets/{chunk-WL4C6EOR-CpLwvo_U.js → chunk-WL4C6EOR-of3XBzMu.js} +1 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-CyfzumTY.js +1 -0
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-CyfzumTY.js +1 -0
- package/dashboard/dist/assets/clone-CMs4Aqrx.js +1 -0
- package/dashboard/dist/assets/{cose-bilkent-S5V4N54A-CkKtF37m.js → cose-bilkent-S5V4N54A-BlIiyO76.js} +1 -1
- package/dashboard/dist/assets/{dagre-KLK3FWXG-BBlY_FL3.js → dagre-KLK3FWXG-CYQjSI9N.js} +1 -1
- package/dashboard/dist/assets/{diagram-E7M64L7V-DLsFDLHm.js → diagram-E7M64L7V-BZHzTKct.js} +1 -1
- package/dashboard/dist/assets/{diagram-IFDJBPK2--sb7diMG.js → diagram-IFDJBPK2-kMP3WqBV.js} +1 -1
- package/dashboard/dist/assets/{diagram-P4PSJMXO-D2LuEWVt.js → diagram-P4PSJMXO-BWSHyFOv.js} +1 -1
- package/dashboard/dist/assets/{erDiagram-INFDFZHY-C1BEeili.js → erDiagram-INFDFZHY-B5HrvsPP.js} +1 -1
- package/dashboard/dist/assets/{flowDiagram-PKNHOUZH-BpbapQbU.js → flowDiagram-PKNHOUZH-Dm4ewP7w.js} +1 -1
- package/dashboard/dist/assets/{ganttDiagram-A5KZAMGK-Io60qUuG.js → ganttDiagram-A5KZAMGK-DB3k27zu.js} +1 -1
- package/dashboard/dist/assets/{gitGraphDiagram-K3NZZRJ6-oemlGgRh.js → gitGraphDiagram-K3NZZRJ6-G7y6Ey-m.js} +1 -1
- package/dashboard/dist/assets/{graph-BZb-lGfH.js → graph-CaM4i6vq.js} +1 -1
- package/dashboard/dist/assets/index-B4QMu-Oq.css +1 -0
- package/dashboard/dist/assets/index-BBWZjPBC.js +495 -0
- package/dashboard/dist/assets/{infoDiagram-LFFYTUFH-Ca4mwnZF.js → infoDiagram-LFFYTUFH-JNTUbTjg.js} +1 -1
- package/dashboard/dist/assets/{ishikawaDiagram-PHBUUO56-9zuQ8y8W.js → ishikawaDiagram-PHBUUO56-BZJt1ht8.js} +1 -1
- package/dashboard/dist/assets/{journeyDiagram-4ABVD52K-OdeeOdMx.js → journeyDiagram-4ABVD52K-DPcqvl9A.js} +1 -1
- package/dashboard/dist/assets/{kanban-definition-K7BYSVSG-Cie4JtFn.js → kanban-definition-K7BYSVSG-D1D7AuOV.js} +1 -1
- package/dashboard/dist/assets/{layout-Bmx2mvFv.js → layout-BTOh3EDT.js} +1 -1
- package/dashboard/dist/assets/{linear-CW6K_-MX.js → linear-MbCpC_Cg.js} +1 -1
- package/dashboard/dist/assets/{mermaid.core-DmfO6BgK.js → mermaid.core-CYbhqlNy.js} +4 -4
- package/dashboard/dist/assets/{mindmap-definition-YRQLILUH-L6b3vG79.js → mindmap-definition-YRQLILUH-CwYCISFH.js} +1 -1
- package/dashboard/dist/assets/{pieDiagram-SKSYHLDU-CkHTCIWg.js → pieDiagram-SKSYHLDU-5qfZ73SG.js} +1 -1
- package/dashboard/dist/assets/{quadrantDiagram-337W2JSQ-B9MqhhIC.js → quadrantDiagram-337W2JSQ-WI8y1sQ_.js} +1 -1
- package/dashboard/dist/assets/{requirementDiagram-Z7DCOOCP-CyHAfXCK.js → requirementDiagram-Z7DCOOCP-BFlD0ZTS.js} +1 -1
- package/dashboard/dist/assets/{sankeyDiagram-WA2Y5GQK-DHNzGGyE.js → sankeyDiagram-WA2Y5GQK-Bdckv1Se.js} +1 -1
- package/dashboard/dist/assets/{sequenceDiagram-2WXFIKYE-BVvcJkrx.js → sequenceDiagram-2WXFIKYE-DgzxKAlZ.js} +1 -1
- package/dashboard/dist/assets/{stateDiagram-RAJIS63D-CZ2cknh7.js → stateDiagram-RAJIS63D-DO4OXahC.js} +1 -1
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-o8bgX-J3.js +1 -0
- package/dashboard/dist/assets/{timeline-definition-YZTLITO2-BXUtlVyd.js → timeline-definition-YZTLITO2-BBB01JWw.js} +1 -1
- package/dashboard/dist/assets/{treemap-KZPCXAKY-Dgi-hMKM.js → treemap-KZPCXAKY-Dr0jb8op.js} +1 -1
- package/dashboard/dist/assets/{vennDiagram-LZ73GAT5-C9zGrrUQ.js → vennDiagram-LZ73GAT5-D40KFl2o.js} +1 -1
- package/dashboard/dist/assets/{xychartDiagram-JWTSCODW-Dq71BUtc.js → xychartDiagram-JWTSCODW-DBUmWQfT.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dist/dashboard/server.js +2380 -1263
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.js +5601 -4684
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/syntaur-skills/README.md +2 -0
- package/vendor/syntaur-skills/skills/clear-assignment/SKILL.md +111 -0
- package/vendor/syntaur-skills/skills/manage-statuses/SKILL.md +72 -0
- package/dashboard/dist/assets/channel-DH4gshIt.js +0 -1
- package/dashboard/dist/assets/classDiagram-VBA2DB6C-emsfh8H4.js +0 -1
- package/dashboard/dist/assets/classDiagram-v2-RAHNMMFH-emsfh8H4.js +0 -1
- package/dashboard/dist/assets/clone-gdeRwgBN.js +0 -1
- package/dashboard/dist/assets/index-BSVCsfvM.css +0 -1
- package/dashboard/dist/assets/index-CXWVuGs-.js +0 -481
- package/dashboard/dist/assets/stateDiagram-v2-FVOUBMTO-C4CPervD.js +0 -1
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
function Kj(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const l=Object.getOwnPropertyDescriptor(o,i);l&&Object.defineProperty(e,i,l.get?l:{enumerable:!0,get:()=>o[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Y_(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),n}var zd={exports:{}},Mi={},Bd={exports:{}},Ve={};/**
|
|
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 ux;function Gj(){if(ux)return Ve;ux=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),x=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function j(z,X,O){this.props=z,this.context=X,this.refs=k,this.updater=O||b}j.prototype.isReactComponent={},j.prototype.setState=function(z,X){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,X,"setState")},j.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function S(){}S.prototype=j.prototype;function R(z,X,O){this.props=z,this.context=X,this.refs=k,this.updater=O||b}var E=R.prototype=new S;E.constructor=R,N(E,j.prototype),E.isPureReactComponent=!0;var A=Array.isArray,L=Object.prototype.hasOwnProperty,P={current:null},F={key:!0,ref:!0,__self:!0,__source:!0};function _(z,X,O){var pe,Ce={},ee=null,de=null;if(X!=null)for(pe in X.ref!==void 0&&(de=X.ref),X.key!==void 0&&(ee=""+X.key),X)L.call(X,pe)&&!F.hasOwnProperty(pe)&&(Ce[pe]=X[pe]);var xe=arguments.length-2;if(xe===1)Ce.children=O;else if(1<xe){for(var be=Array(xe),we=0;we<xe;we++)be[we]=arguments[we+2];Ce.children=be}if(z&&z.defaultProps)for(pe in xe=z.defaultProps,xe)Ce[pe]===void 0&&(Ce[pe]=xe[pe]);return{$$typeof:e,type:z,key:ee,ref:de,props:Ce,_owner:P.current}}function Q(z,X){return{$$typeof:e,type:z.type,key:X,ref:z.ref,props:z.props,_owner:z._owner}}function re(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function U(z){var X={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(O){return X[O]})}var G=/\/+/g;function K(z,X){return typeof z=="object"&&z!==null&&z.key!=null?U(""+z.key):X.toString(36)}function Z(z,X,O,pe,Ce){var ee=typeof z;(ee==="undefined"||ee==="boolean")&&(z=null);var de=!1;if(z===null)de=!0;else switch(ee){case"string":case"number":de=!0;break;case"object":switch(z.$$typeof){case e:case t:de=!0}}if(de)return de=z,Ce=Ce(de),z=pe===""?"."+K(de,0):pe,A(Ce)?(O="",z!=null&&(O=z.replace(G,"$&/")+"/"),Z(Ce,X,O,"",function(we){return we})):Ce!=null&&(re(Ce)&&(Ce=Q(Ce,O+(!Ce.key||de&&de.key===Ce.key?"":(""+Ce.key).replace(G,"$&/")+"/")+z)),X.push(Ce)),1;if(de=0,pe=pe===""?".":pe+":",A(z))for(var xe=0;xe<z.length;xe++){ee=z[xe];var be=pe+K(ee,xe);de+=Z(ee,X,O,be,Ce)}else if(be=v(z),typeof be=="function")for(z=be.call(z),xe=0;!(ee=z.next()).done;)ee=ee.value,be=pe+K(ee,xe++),de+=Z(ee,X,O,be,Ce);else if(ee==="object")throw X=String(z),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.");return de}function M(z,X,O){if(z==null)return z;var pe=[],Ce=0;return Z(z,pe,"","",function(ee){return X.call(O,ee,Ce++)}),pe}function I(z){if(z._status===-1){var X=z._result;X=X(),X.then(function(O){(z._status===0||z._status===-1)&&(z._status=1,z._result=O)},function(O){(z._status===0||z._status===-1)&&(z._status=2,z._result=O)}),z._status===-1&&(z._status=0,z._result=X)}if(z._status===1)return z._result.default;throw z._result}var D={current:null},$={transition:null},q={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:$,ReactCurrentOwner:P};function T(){throw Error("act(...) is not supported in production builds of React.")}return Ve.Children={map:M,forEach:function(z,X,O){M(z,function(){X.apply(this,arguments)},O)},count:function(z){var X=0;return M(z,function(){X++}),X},toArray:function(z){return M(z,function(X){return X})||[]},only:function(z){if(!re(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Ve.Component=j,Ve.Fragment=n,Ve.Profiler=i,Ve.PureComponent=R,Ve.StrictMode=o,Ve.Suspense=p,Ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Ve.act=T,Ve.cloneElement=function(z,X,O){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var pe=N({},z.props),Ce=z.key,ee=z.ref,de=z._owner;if(X!=null){if(X.ref!==void 0&&(ee=X.ref,de=P.current),X.key!==void 0&&(Ce=""+X.key),z.type&&z.type.defaultProps)var xe=z.type.defaultProps;for(be in X)L.call(X,be)&&!F.hasOwnProperty(be)&&(pe[be]=X[be]===void 0&&xe!==void 0?xe[be]:X[be])}var be=arguments.length-2;if(be===1)pe.children=O;else if(1<be){xe=Array(be);for(var we=0;we<be;we++)xe[we]=arguments[we+2];pe.children=xe}return{$$typeof:e,type:z.type,key:Ce,ref:ee,props:pe,_owner:de}},Ve.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:l,_context:z},z.Consumer=z},Ve.createElement=_,Ve.createFactory=function(z){var X=_.bind(null,z);return X.type=z,X},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(z){return{$$typeof:d,render:z}},Ve.isValidElement=re,Ve.lazy=function(z){return{$$typeof:h,_payload:{_status:-1,_result:z},_init:I}},Ve.memo=function(z,X){return{$$typeof:m,type:z,compare:X===void 0?null:X}},Ve.startTransition=function(z){var X=$.transition;$.transition={};try{z()}finally{$.transition=X}},Ve.unstable_act=T,Ve.useCallback=function(z,X){return D.current.useCallback(z,X)},Ve.useContext=function(z){return D.current.useContext(z)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(z){return D.current.useDeferredValue(z)},Ve.useEffect=function(z,X){return D.current.useEffect(z,X)},Ve.useId=function(){return D.current.useId()},Ve.useImperativeHandle=function(z,X,O){return D.current.useImperativeHandle(z,X,O)},Ve.useInsertionEffect=function(z,X){return D.current.useInsertionEffect(z,X)},Ve.useLayoutEffect=function(z,X){return D.current.useLayoutEffect(z,X)},Ve.useMemo=function(z,X){return D.current.useMemo(z,X)},Ve.useReducer=function(z,X,O){return D.current.useReducer(z,X,O)},Ve.useRef=function(z){return D.current.useRef(z)},Ve.useState=function(z){return D.current.useState(z)},Ve.useSyncExternalStore=function(z,X,O){return D.current.useSyncExternalStore(z,X,O)},Ve.useTransition=function(){return D.current.useTransition()},Ve.version="18.3.1",Ve}var dx;function xp(){return dx||(dx=1,Bd.exports=Gj()),Bd.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 fx;function Yj(){if(fx)return Mi;fx=1;var e=xp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(d,p,m){var h,x={},v=null,b=null;m!==void 0&&(v=""+m),p.key!==void 0&&(v=""+p.key),p.ref!==void 0&&(b=p.ref);for(h in p)o.call(p,h)&&!l.hasOwnProperty(h)&&(x[h]=p[h]);if(d&&d.defaultProps)for(h in p=d.defaultProps,p)x[h]===void 0&&(x[h]=p[h]);return{$$typeof:t,type:d,key:v,ref:b,props:x,_owner:i.current}}return Mi.Fragment=n,Mi.jsx=c,Mi.jsxs=c,Mi}var px;function Xj(){return px||(px=1,zd.exports=Yj()),zd.exports}var a=Xj(),g=xp();const Ct=jc(g),Ev=Kj({__proto__:null,default:Ct},[g]);var Ol={},Ud={exports:{}},Sn={},Hd={exports:{}},Wd={};/**
|
|
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 hx;function Qj(){return hx||(hx=1,(function(e){function t($,q){var T=$.length;$.push(q);e:for(;0<T;){var z=T-1>>>1,X=$[z];if(0<i(X,q))$[z]=q,$[T]=X,T=z;else break e}}function n($){return $.length===0?null:$[0]}function o($){if($.length===0)return null;var q=$[0],T=$.pop();if(T!==q){$[0]=T;e:for(var z=0,X=$.length,O=X>>>1;z<O;){var pe=2*(z+1)-1,Ce=$[pe],ee=pe+1,de=$[ee];if(0>i(Ce,T))ee<X&&0>i(de,Ce)?($[z]=de,$[ee]=T,z=ee):($[z]=Ce,$[pe]=T,z=pe);else if(ee<X&&0>i(de,T))$[z]=de,$[ee]=T,z=ee;else break e}}return q}function i($,q){var T=$.sortIndex-q.sortIndex;return T!==0?T:$.id-q.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 p=[],m=[],h=1,x=null,v=3,b=!1,N=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E($){for(var q=n(m);q!==null;){if(q.callback===null)o(m);else if(q.startTime<=$)o(m),q.sortIndex=q.expirationTime,t(p,q);else break;q=n(m)}}function A($){if(k=!1,E($),!N)if(n(p)!==null)N=!0,I(L);else{var q=n(m);q!==null&&D(A,q.startTime-$)}}function L($,q){N=!1,k&&(k=!1,S(_),_=-1),b=!0;var T=v;try{for(E(q),x=n(p);x!==null&&(!(x.expirationTime>q)||$&&!U());){var z=x.callback;if(typeof z=="function"){x.callback=null,v=x.priorityLevel;var X=z(x.expirationTime<=q);q=e.unstable_now(),typeof X=="function"?x.callback=X:x===n(p)&&o(p),E(q)}else o(p);x=n(p)}if(x!==null)var O=!0;else{var pe=n(m);pe!==null&&D(A,pe.startTime-q),O=!1}return O}finally{x=null,v=T,b=!1}}var P=!1,F=null,_=-1,Q=5,re=-1;function U(){return!(e.unstable_now()-re<Q)}function G(){if(F!==null){var $=e.unstable_now();re=$;var q=!0;try{q=F(!0,$)}finally{q?K():(P=!1,F=null)}}else P=!1}var K;if(typeof R=="function")K=function(){R(G)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,M=Z.port2;Z.port1.onmessage=G,K=function(){M.postMessage(null)}}else K=function(){j(G,0)};function I($){F=$,P||(P=!0,K())}function D($,q){_=j(function(){$(e.unstable_now())},q)}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($){$.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,I(L))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(p)},e.unstable_next=function($){switch(v){case 1:case 2:case 3:var q=3;break;default:q=v}var T=v;v=q;try{return $()}finally{v=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,q){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var T=v;v=$;try{return q()}finally{v=T}},e.unstable_scheduleCallback=function($,q,T){var z=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?z+T:z):T=z,$){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=T+X,$={id:h++,callback:q,priorityLevel:$,startTime:T,expirationTime:X,sortIndex:-1},T>z?($.sortIndex=T,t(m,$),n(p)===null&&$===n(m)&&(k?(S(_),_=-1):k=!0,D(A,T-z))):($.sortIndex=X,t(p,$),N||b||(N=!0,I(L))),$},e.unstable_shouldYield=U,e.unstable_wrapCallback=function($){var q=v;return function(){var T=v;v=q;try{return $.apply(this,arguments)}finally{v=T}}}})(Wd)),Wd}var mx;function Jj(){return mx||(mx=1,Hd.exports=Qj()),Hd.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 gx;function Zj(){if(gx)return Sn;gx=1;var e=xp(),t=Jj();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function l(r,s){c(r,s),c(r+"Capture",s)}function c(r,s){for(i[r]=s,r=0;r<s.length;r++)o.add(s[r])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=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 v(r){return p.call(x,r)?!0:p.call(h,r)?!1:m.test(r)?x[r]=!0:(h[r]=!0,!1)}function b(r,s,u,f){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function N(r,s,u,f){if(s===null||typeof s>"u"||b(r,s,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(r,s,u,f,y,w,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=w,this.removeEmptyString=C}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 s=r[0];j[s]=new k(s,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 R(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 s=r.replace(S,R);j[s]=new k(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,R);j[s]=new k(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,R);j[s]=new k(s,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 E(r,s,u,f){var y=j.hasOwnProperty(s)?j[s]:null;(y!==null?y.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(N(s,u,y,f)&&(u=null),f||y===null?v(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):y.mustUseProperty?r[y.propertyName]=u===null?y.type===3?!1:"":u:(s=y.attributeName,f=y.attributeNamespace,u===null?r.removeAttribute(s):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,f?r.setAttributeNS(f,s,u):r.setAttribute(s,u))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),P=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),re=Symbol.for("react.provider"),U=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),$=Symbol.iterator;function q(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var T=Object.assign,z;function X(r){if(z===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);z=s&&s[1]||""}return`
|
|
34
|
+
`+z+r}var O=!1;function pe(r,s){if(!r||O)return"";O=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(te){var f=te}Reflect.construct(r,[],s)}else{try{s.call()}catch(te){f=te}r.call(s.prototype)}else{try{throw Error()}catch(te){f=te}r()}}catch(te){if(te&&f&&typeof te.stack=="string"){for(var y=te.stack.split(`
|
|
35
|
+
`),w=f.stack.split(`
|
|
36
|
+
`),C=y.length-1,B=w.length-1;1<=C&&0<=B&&y[C]!==w[B];)B--;for(;1<=C&&0<=B;C--,B--)if(y[C]!==w[B]){if(C!==1||B!==1)do if(C--,B--,0>B||y[C]!==w[B]){var H=`
|
|
37
|
+
`+y[C].replace(" at new "," at ");return r.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",r.displayName)),H}while(1<=C&&0<=B);break}}}finally{O=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?X(r):""}function Ce(r){switch(r.tag){case 5:return X(r.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function ee(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 F:return"Fragment";case P:return"Portal";case Q:return"Profiler";case _:return"StrictMode";case K:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case U:return(r.displayName||"Context")+".Consumer";case re:return(r._context.displayName||"Context")+".Provider";case G:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case M:return s=r.displayName||null,s!==null?s:ee(r.type)||"Memo";case I:s=r._payload,r=r._init;try{return ee(r(s))}catch{}}return null}function de(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ee(s);case 8:return s===_?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function xe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function be(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function we(r){var s=be(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),f=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,w=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(C){f=""+C,w.call(this,C)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(C){f=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Je(r){r._valueTracker||(r._valueTracker=we(r))}function nt(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),f="";return r&&(f=be(r)?r.checked?"true":"false":r.value),r=f,r!==u?(s.setValue(r),!0):!1}function he(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 ke(r,s){var u=s.checked;return T({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function $e(r,s){var u=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;u=xe(s.value!=null?s.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function He(r,s){s=s.checked,s!=null&&E(r,"checked",s,!1)}function lt(r,s){He(r,s);var u=xe(s.value),f=s.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?qe(r,s.type,u):s.hasOwnProperty("defaultValue")&&qe(r,s.type,xe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Oe(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function qe(r,s,u){(s!=="number"||he(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Qe=Array.isArray;function jt(r,s,u,f){if(r=r.options,s){s={};for(var y=0;y<u.length;y++)s["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=s.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&f&&(r[u].defaultSelected=!0)}else{for(u=""+xe(u),s=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,f&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function St(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return T({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Dt(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(Qe(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:xe(u)}}function Qt(r,s){var u=xe(s.value),f=xe(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function Et(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function oe(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 ie(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?oe(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var me,ne=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,f,y){MSApp.execUnsafeLocalFunction(function(){return r(s,u,f,y)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(me=me||document.createElement("div"),me.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=me.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function ye(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var Pe={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},Ht=["Webkit","ms","Moz","O"];Object.keys(Pe).forEach(function(r){Ht.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),Pe[s]=Pe[r]})});function rn(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||Pe.hasOwnProperty(r)&&Pe[r]?(""+s).trim():s+"px"}function Jt(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var f=u.indexOf("--")===0,y=rn(u,s[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,y):r[u]=y}}var V=T({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 ce(r,s){if(s){if(V[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function je(r,s){if(r.indexOf("-")===-1)return typeof s.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 Fe=null;function Hn(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var on=null,xt=null,We=null;function rt(r){if(r=ki(r)){if(typeof on!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Ya(s),on(r.stateNode,r.type,s))}}function Pt(r){xt?We?We.push(r):We=[r]:xt=r}function Wt(){if(xt){var r=xt,s=We;if(We=xt=null,rt(r),s)for(r=0;r<s.length;r++)rt(s[r])}}function Zt(r,s){return r(s)}function sn(){}var yn=!1;function Or(r,s,u){if(yn)return r(s,u);yn=!0;try{return Zt(r,s,u)}finally{yn=!1,(xt!==null||We!==null)&&(sn(),Wt())}}function yt(r,s){var u=r.stateNode;if(u===null)return null;var f=Ya(u);if(f===null)return null;u=f[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Wn=!1;if(d)try{var an={};Object.defineProperty(an,"passive",{get:function(){Wn=!0}}),window.addEventListener("test",an,an),window.removeEventListener("test",an,an)}catch{Wn=!1}function er(r,s,u,f,y,w,C,B,H){var te=Array.prototype.slice.call(arguments,3);try{s.apply(u,te)}catch(ae){this.onError(ae)}}var tr=!1,gr=null,Dn=!1,Lr=null,ri={onError:function(r){tr=!0,gr=r}};function tk(r,s,u,f,y,w,C,B,H){tr=!1,gr=null,er.apply(ri,arguments)}function nk(r,s,u,f,y,w,C,B,H){if(tk.apply(this,arguments),tr){if(tr){var te=gr;tr=!1,gr=null}else throw Error(n(198));Dn||(Dn=!0,Lr=te)}}function Io(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function Ih(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function Oh(r){if(Io(r)!==r)throw Error(n(188))}function rk(r){var s=r.alternate;if(!s){if(s=Io(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,f=s;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return Oh(y),r;if(w===f)return Oh(y),s;w=w.sibling}throw Error(n(188))}if(u.return!==f.return)u=y,f=w;else{for(var C=!1,B=y.child;B;){if(B===u){C=!0,u=y,f=w;break}if(B===f){C=!0,f=y,u=w;break}B=B.sibling}if(!C){for(B=w.child;B;){if(B===u){C=!0,u=w,f=y;break}if(B===f){C=!0,f=w,u=y;break}B=B.sibling}if(!C)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function Lh(r){return r=rk(r),r!==null?_h(r):null}function _h(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=_h(r);if(s!==null)return s;r=r.sibling}return null}var Mh=t.unstable_scheduleCallback,$h=t.unstable_cancelCallback,ok=t.unstable_shouldYield,sk=t.unstable_requestPaint,Tt=t.unstable_now,ik=t.unstable_getCurrentPriorityLevel,iu=t.unstable_ImmediatePriority,Fh=t.unstable_UserBlockingPriority,Ta=t.unstable_NormalPriority,ak=t.unstable_LowPriority,zh=t.unstable_IdlePriority,Ra=null,xr=null;function lk(r){if(xr&&typeof xr.onCommitFiberRoot=="function")try{xr.onCommitFiberRoot(Ra,r,void 0,(r.current.flags&128)===128)}catch{}}var nr=Math.clz32?Math.clz32:dk,ck=Math.log,uk=Math.LN2;function dk(r){return r>>>=0,r===0?32:31-(ck(r)/uk|0)|0}var Aa=64,Da=4194304;function oi(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 Ia(r,s){var u=r.pendingLanes;if(u===0)return 0;var f=0,y=r.suspendedLanes,w=r.pingedLanes,C=u&268435455;if(C!==0){var B=C&~y;B!==0?f=oi(B):(w&=C,w!==0&&(f=oi(w)))}else C=u&~y,C!==0?f=oi(C):w!==0&&(f=oi(w));if(f===0)return 0;if(s!==0&&s!==f&&(s&y)===0&&(y=f&-f,w=s&-s,y>=w||y===16&&(w&4194240)!==0))return s;if((f&4)!==0&&(f|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=f;0<s;)u=31-nr(s),y=1<<u,f|=r[u],s&=~y;return f}function fk(r,s){switch(r){case 1:case 2:case 4:return s+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 s+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 pk(r,s){for(var u=r.suspendedLanes,f=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var C=31-nr(w),B=1<<C,H=y[C];H===-1?((B&u)===0||(B&f)!==0)&&(y[C]=fk(B,s)):H<=s&&(r.expiredLanes|=B),w&=~B}}function au(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Bh(){var r=Aa;return Aa<<=1,(Aa&4194240)===0&&(Aa=64),r}function lu(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function si(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-nr(s),r[s]=u}function hk(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var y=31-nr(u),w=1<<y;s[y]=0,f[y]=-1,r[y]=-1,u&=~w}}function cu(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var f=31-nr(u),y=1<<f;y&s|r[f]&s&&(r[f]|=s),u&=~y}}var Ze=0;function Uh(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Hh,uu,Wh,Vh,qh,du=!1,Oa=[],Qr=null,Jr=null,Zr=null,ii=new Map,ai=new Map,eo=[],mk="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 Kh(r,s){switch(r){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Zr=null;break;case"pointerover":case"pointerout":ii.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(s.pointerId)}}function li(r,s,u,f,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:s,domEventName:u,eventSystemFlags:f,nativeEvent:w,targetContainers:[y]},s!==null&&(s=ki(s),s!==null&&uu(s)),r):(r.eventSystemFlags|=f,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function gk(r,s,u,f,y){switch(s){case"focusin":return Qr=li(Qr,r,s,u,f,y),!0;case"dragenter":return Jr=li(Jr,r,s,u,f,y),!0;case"mouseover":return Zr=li(Zr,r,s,u,f,y),!0;case"pointerover":var w=y.pointerId;return ii.set(w,li(ii.get(w)||null,r,s,u,f,y)),!0;case"gotpointercapture":return w=y.pointerId,ai.set(w,li(ai.get(w)||null,r,s,u,f,y)),!0}return!1}function Gh(r){var s=Oo(r.target);if(s!==null){var u=Io(s);if(u!==null){if(s=u.tag,s===13){if(s=Ih(u),s!==null){r.blockedOn=s,qh(r.priority,function(){Wh(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function La(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=pu(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);Fe=f,u.target.dispatchEvent(f),Fe=null}else return s=ki(u),s!==null&&uu(s),r.blockedOn=u,!1;s.shift()}return!0}function Yh(r,s,u){La(r)&&u.delete(s)}function xk(){du=!1,Qr!==null&&La(Qr)&&(Qr=null),Jr!==null&&La(Jr)&&(Jr=null),Zr!==null&&La(Zr)&&(Zr=null),ii.forEach(Yh),ai.forEach(Yh)}function ci(r,s){r.blockedOn===s&&(r.blockedOn=null,du||(du=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,xk)))}function ui(r){function s(y){return ci(y,r)}if(0<Oa.length){ci(Oa[0],r);for(var u=1;u<Oa.length;u++){var f=Oa[u];f.blockedOn===r&&(f.blockedOn=null)}}for(Qr!==null&&ci(Qr,r),Jr!==null&&ci(Jr,r),Zr!==null&&ci(Zr,r),ii.forEach(s),ai.forEach(s),u=0;u<eo.length;u++)f=eo[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<eo.length&&(u=eo[0],u.blockedOn===null);)Gh(u),u.blockedOn===null&&eo.shift()}var rs=A.ReactCurrentBatchConfig,_a=!0;function yk(r,s,u,f){var y=Ze,w=rs.transition;rs.transition=null;try{Ze=1,fu(r,s,u,f)}finally{Ze=y,rs.transition=w}}function vk(r,s,u,f){var y=Ze,w=rs.transition;rs.transition=null;try{Ze=4,fu(r,s,u,f)}finally{Ze=y,rs.transition=w}}function fu(r,s,u,f){if(_a){var y=pu(r,s,u,f);if(y===null)Ru(r,s,f,Ma,u),Kh(r,f);else if(gk(y,r,s,u,f))f.stopPropagation();else if(Kh(r,f),s&4&&-1<mk.indexOf(r)){for(;y!==null;){var w=ki(y);if(w!==null&&Hh(w),w=pu(r,s,u,f),w===null&&Ru(r,s,f,Ma,u),w===y)break;y=w}y!==null&&f.stopPropagation()}else Ru(r,s,f,null,u)}}var Ma=null;function pu(r,s,u,f){if(Ma=null,r=Hn(f),r=Oo(r),r!==null)if(s=Io(r),s===null)r=null;else if(u=s.tag,u===13){if(r=Ih(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Ma=r,null}function Xh(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(ik()){case iu:return 1;case Fh:return 4;case Ta:case ak:return 16;case zh:return 536870912;default:return 16}default:return 16}}var to=null,hu=null,$a=null;function Qh(){if($a)return $a;var r,s=hu,u=s.length,f,y="value"in to?to.value:to.textContent,w=y.length;for(r=0;r<u&&s[r]===y[r];r++);var C=u-r;for(f=1;f<=C&&s[u-f]===y[w-f];f++);return $a=y.slice(r,1<f?1-f:void 0)}function Fa(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function za(){return!0}function Jh(){return!1}function In(r){function s(u,f,y,w,C){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=w,this.target=C,this.currentTarget=null;for(var B in r)r.hasOwnProperty(B)&&(u=r[B],this[B]=u?u(w):w[B]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?za:Jh,this.isPropagationStopped=Jh,this}return T(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=za)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=za)},persist:function(){},isPersistent:za}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=In(os),di=T({},os,{view:0,detail:0}),bk=In(di),gu,xu,fi,Ba=T({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,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!==fi&&(fi&&r.type==="mousemove"?(gu=r.screenX-fi.screenX,xu=r.screenY-fi.screenY):xu=gu=0,fi=r),gu)},movementY:function(r){return"movementY"in r?r.movementY:xu}}),Zh=In(Ba),wk=T({},Ba,{dataTransfer:0}),kk=In(wk),jk=T({},di,{relatedTarget:0}),yu=In(jk),Sk=T({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),Nk=In(Sk),Ck=T({},os,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Ek=In(Ck),Pk=T({},os,{data:0}),em=In(Pk),Tk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Rk={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"},Ak={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dk(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=Ak[r])?!!s[r]:!1}function vu(){return Dk}var Ik=T({},di,{key:function(r){if(r.key){var s=Tk[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Fa(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Rk[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(r){return r.type==="keypress"?Fa(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Fa(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Ok=In(Ik),Lk=T({},Ba,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tm=In(Lk),_k=T({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),Mk=In(_k),$k=T({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fk=In($k),zk=T({},Ba,{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}),Bk=In(zk),Uk=[9,13,27,32],bu=d&&"CompositionEvent"in window,pi=null;d&&"documentMode"in document&&(pi=document.documentMode);var Hk=d&&"TextEvent"in window&&!pi,nm=d&&(!bu||pi&&8<pi&&11>=pi),rm=" ",om=!1;function sm(r,s){switch(r){case"keyup":return Uk.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function im(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ss=!1;function Wk(r,s){switch(r){case"compositionend":return im(s);case"keypress":return s.which!==32?null:(om=!0,rm);case"textInput":return r=s.data,r===rm&&om?null:r;default:return null}}function Vk(r,s){if(ss)return r==="compositionend"||!bu&&sm(r,s)?(r=Qh(),$a=hu=to=null,ss=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return nm&&s.locale!=="ko"?null:s.data;default:return null}}var qk={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 am(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!qk[r.type]:s==="textarea"}function lm(r,s,u,f){Pt(f),s=qa(s,"onChange"),0<s.length&&(u=new mu("onChange","change",null,u,f),r.push({event:u,listeners:s}))}var hi=null,mi=null;function Kk(r){Cm(r,0)}function Ua(r){var s=us(r);if(nt(s))return r}function Gk(r,s){if(r==="change")return s}var cm=!1;if(d){var wu;if(d){var ku="oninput"in document;if(!ku){var um=document.createElement("div");um.setAttribute("oninput","return;"),ku=typeof um.oninput=="function"}wu=ku}else wu=!1;cm=wu&&(!document.documentMode||9<document.documentMode)}function dm(){hi&&(hi.detachEvent("onpropertychange",fm),mi=hi=null)}function fm(r){if(r.propertyName==="value"&&Ua(mi)){var s=[];lm(s,mi,r,Hn(r)),Or(Kk,s)}}function Yk(r,s,u){r==="focusin"?(dm(),hi=s,mi=u,hi.attachEvent("onpropertychange",fm)):r==="focusout"&&dm()}function Xk(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ua(mi)}function Qk(r,s){if(r==="click")return Ua(s)}function Jk(r,s){if(r==="input"||r==="change")return Ua(s)}function Zk(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var rr=typeof Object.is=="function"?Object.is:Zk;function gi(r,s){if(rr(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),f=Object.keys(s);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!p.call(s,y)||!rr(r[y],s[y]))return!1}return!0}function pm(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function hm(r,s){var u=pm(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=s&&f>=s)return{node:u,offset:s-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=pm(u)}}function mm(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?mm(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function gm(){for(var r=window,s=he();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=he(r.document)}return s}function ju(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function ej(r){var s=gm(),u=r.focusedElem,f=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&mm(u.ownerDocument.documentElement,u)){if(f!==null&&ju(u)){if(s=f.start,r=f.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var y=u.textContent.length,w=Math.min(f.start,y);f=f.end===void 0?w:Math.min(f.end,y),!r.extend&&w>f&&(y=f,f=w,w=y),y=hm(u,w);var C=hm(u,f);y&&C&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(y.node,y.offset),r.removeAllRanges(),w>f?(r.addRange(s),r.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var tj=d&&"documentMode"in document&&11>=document.documentMode,is=null,Su=null,xi=null,Nu=!1;function xm(r,s,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Nu||is==null||is!==he(f)||(f=is,"selectionStart"in f&&ju(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),xi&&gi(xi,f)||(xi=f,f=qa(Su,"onSelect"),0<f.length&&(s=new mu("onSelect","select",null,s,u),r.push({event:s,listeners:f}),s.target=is)))}function Ha(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var as={animationend:Ha("Animation","AnimationEnd"),animationiteration:Ha("Animation","AnimationIteration"),animationstart:Ha("Animation","AnimationStart"),transitionend:Ha("Transition","TransitionEnd")},Cu={},ym={};d&&(ym=document.createElement("div").style,"AnimationEvent"in window||(delete as.animationend.animation,delete as.animationiteration.animation,delete as.animationstart.animation),"TransitionEvent"in window||delete as.transitionend.transition);function Wa(r){if(Cu[r])return Cu[r];if(!as[r])return r;var s=as[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in ym)return Cu[r]=s[u];return r}var vm=Wa("animationend"),bm=Wa("animationiteration"),wm=Wa("animationstart"),km=Wa("transitionend"),jm=new Map,Sm="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 no(r,s){jm.set(r,s),l(s,[r])}for(var Eu=0;Eu<Sm.length;Eu++){var Pu=Sm[Eu],nj=Pu.toLowerCase(),rj=Pu[0].toUpperCase()+Pu.slice(1);no(nj,"on"+rj)}no(vm,"onAnimationEnd"),no(bm,"onAnimationIteration"),no(wm,"onAnimationStart"),no("dblclick","onDoubleClick"),no("focusin","onFocus"),no("focusout","onBlur"),no(km,"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 yi="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(" "),oj=new Set("cancel close invalid load scroll toggle".split(" ").concat(yi));function Nm(r,s,u){var f=r.type||"unknown-event";r.currentTarget=u,nk(f,s,void 0,r),r.currentTarget=null}function Cm(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],y=f.event;f=f.listeners;e:{var w=void 0;if(s)for(var C=f.length-1;0<=C;C--){var B=f[C],H=B.instance,te=B.currentTarget;if(B=B.listener,H!==w&&y.isPropagationStopped())break e;Nm(y,B,te),w=H}else for(C=0;C<f.length;C++){if(B=f[C],H=B.instance,te=B.currentTarget,B=B.listener,H!==w&&y.isPropagationStopped())break e;Nm(y,B,te),w=H}}}if(Dn)throw r=Lr,Dn=!1,Lr=null,r}function ct(r,s){var u=s[_u];u===void 0&&(u=s[_u]=new Set);var f=r+"__bubble";u.has(f)||(Em(s,r,2,!1),u.add(f))}function Tu(r,s,u){var f=0;s&&(f|=4),Em(u,r,f,s)}var Va="_reactListening"+Math.random().toString(36).slice(2);function vi(r){if(!r[Va]){r[Va]=!0,o.forEach(function(u){u!=="selectionchange"&&(oj.has(u)||Tu(u,!1,r),Tu(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Va]||(s[Va]=!0,Tu("selectionchange",!1,s))}}function Em(r,s,u,f){switch(Xh(s)){case 1:var y=yk;break;case 4:y=vk;break;default:y=fu}u=y.bind(null,s,u,r),y=void 0,!Wn||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),f?y!==void 0?r.addEventListener(s,u,{capture:!0,passive:y}):r.addEventListener(s,u,!0):y!==void 0?r.addEventListener(s,u,{passive:y}):r.addEventListener(s,u,!1)}function Ru(r,s,u,f,y){var w=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var C=f.tag;if(C===3||C===4){var B=f.stateNode.containerInfo;if(B===y||B.nodeType===8&&B.parentNode===y)break;if(C===4)for(C=f.return;C!==null;){var H=C.tag;if((H===3||H===4)&&(H=C.stateNode.containerInfo,H===y||H.nodeType===8&&H.parentNode===y))return;C=C.return}for(;B!==null;){if(C=Oo(B),C===null)return;if(H=C.tag,H===5||H===6){f=w=C;continue e}B=B.parentNode}}f=f.return}Or(function(){var te=w,ae=Hn(u),le=[];e:{var se=jm.get(r);if(se!==void 0){var ge=mu,Ne=r;switch(r){case"keypress":if(Fa(u)===0)break e;case"keydown":case"keyup":ge=Ok;break;case"focusin":Ne="focus",ge=yu;break;case"focusout":Ne="blur",ge=yu;break;case"beforeblur":case"afterblur":ge=yu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=Zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=kk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=Mk;break;case vm:case bm:case wm:ge=Nk;break;case km:ge=Fk;break;case"scroll":ge=bk;break;case"wheel":ge=Bk;break;case"copy":case"cut":case"paste":ge=Ek;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=tm}var Ee=(s&4)!==0,Rt=!Ee&&r==="scroll",Y=Ee?se!==null?se+"Capture":null:se;Ee=[];for(var W=te,J;W!==null;){J=W;var fe=J.stateNode;if(J.tag===5&&fe!==null&&(J=fe,Y!==null&&(fe=yt(W,Y),fe!=null&&Ee.push(bi(W,fe,J)))),Rt)break;W=W.return}0<Ee.length&&(se=new ge(se,Ne,null,u,ae),le.push({event:se,listeners:Ee}))}}if((s&7)===0){e:{if(se=r==="mouseover"||r==="pointerover",ge=r==="mouseout"||r==="pointerout",se&&u!==Fe&&(Ne=u.relatedTarget||u.fromElement)&&(Oo(Ne)||Ne[_r]))break e;if((ge||se)&&(se=ae.window===ae?ae:(se=ae.ownerDocument)?se.defaultView||se.parentWindow:window,ge?(Ne=u.relatedTarget||u.toElement,ge=te,Ne=Ne?Oo(Ne):null,Ne!==null&&(Rt=Io(Ne),Ne!==Rt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(ge=null,Ne=te),ge!==Ne)){if(Ee=Zh,fe="onMouseLeave",Y="onMouseEnter",W="mouse",(r==="pointerout"||r==="pointerover")&&(Ee=tm,fe="onPointerLeave",Y="onPointerEnter",W="pointer"),Rt=ge==null?se:us(ge),J=Ne==null?se:us(Ne),se=new Ee(fe,W+"leave",ge,u,ae),se.target=Rt,se.relatedTarget=J,fe=null,Oo(ae)===te&&(Ee=new Ee(Y,W+"enter",Ne,u,ae),Ee.target=J,Ee.relatedTarget=Rt,fe=Ee),Rt=fe,ge&&Ne)t:{for(Ee=ge,Y=Ne,W=0,J=Ee;J;J=ls(J))W++;for(J=0,fe=Y;fe;fe=ls(fe))J++;for(;0<W-J;)Ee=ls(Ee),W--;for(;0<J-W;)Y=ls(Y),J--;for(;W--;){if(Ee===Y||Y!==null&&Ee===Y.alternate)break t;Ee=ls(Ee),Y=ls(Y)}Ee=null}else Ee=null;ge!==null&&Pm(le,se,ge,Ee,!1),Ne!==null&&Rt!==null&&Pm(le,Rt,Ne,Ee,!0)}}e:{if(se=te?us(te):window,ge=se.nodeName&&se.nodeName.toLowerCase(),ge==="select"||ge==="input"&&se.type==="file")var Te=Gk;else if(am(se))if(cm)Te=Jk;else{Te=Xk;var De=Yk}else(ge=se.nodeName)&&ge.toLowerCase()==="input"&&(se.type==="checkbox"||se.type==="radio")&&(Te=Qk);if(Te&&(Te=Te(r,te))){lm(le,Te,u,ae);break e}De&&De(r,se,te),r==="focusout"&&(De=se._wrapperState)&&De.controlled&&se.type==="number"&&qe(se,"number",se.value)}switch(De=te?us(te):window,r){case"focusin":(am(De)||De.contentEditable==="true")&&(is=De,Su=te,xi=null);break;case"focusout":xi=Su=is=null;break;case"mousedown":Nu=!0;break;case"contextmenu":case"mouseup":case"dragend":Nu=!1,xm(le,u,ae);break;case"selectionchange":if(tj)break;case"keydown":case"keyup":xm(le,u,ae)}var Ie;if(bu)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 ss?sm(r,u)&&(_e="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(_e="onCompositionStart");_e&&(nm&&u.locale!=="ko"&&(ss||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&ss&&(Ie=Qh()):(to=ae,hu="value"in to?to.value:to.textContent,ss=!0)),De=qa(te,_e),0<De.length&&(_e=new em(_e,r,null,u,ae),le.push({event:_e,listeners:De}),Ie?_e.data=Ie:(Ie=im(u),Ie!==null&&(_e.data=Ie)))),(Ie=Hk?Wk(r,u):Vk(r,u))&&(te=qa(te,"onBeforeInput"),0<te.length&&(ae=new em("onBeforeInput","beforeinput",null,u,ae),le.push({event:ae,listeners:te}),ae.data=Ie))}Cm(le,s)})}function bi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function qa(r,s){for(var u=s+"Capture",f=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=yt(r,u),w!=null&&f.unshift(bi(r,w,y)),w=yt(r,s),w!=null&&f.push(bi(r,w,y))),r=r.return}return f}function ls(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Pm(r,s,u,f,y){for(var w=s._reactName,C=[];u!==null&&u!==f;){var B=u,H=B.alternate,te=B.stateNode;if(H!==null&&H===f)break;B.tag===5&&te!==null&&(B=te,y?(H=yt(u,w),H!=null&&C.unshift(bi(u,H,B))):y||(H=yt(u,w),H!=null&&C.push(bi(u,H,B)))),u=u.return}C.length!==0&&r.push({event:s,listeners:C})}var sj=/\r\n?/g,ij=/\u0000|\uFFFD/g;function Tm(r){return(typeof r=="string"?r:""+r).replace(sj,`
|
|
38
|
+
`).replace(ij,"")}function Ka(r,s,u){if(s=Tm(s),Tm(r)!==s&&u)throw Error(n(425))}function Ga(){}var Au=null,Du=null;function Iu(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Ou=typeof setTimeout=="function"?setTimeout:void 0,aj=typeof clearTimeout=="function"?clearTimeout:void 0,Rm=typeof Promise=="function"?Promise:void 0,lj=typeof queueMicrotask=="function"?queueMicrotask:typeof Rm<"u"?function(r){return Rm.resolve(null).then(r).catch(cj)}:Ou;function cj(r){setTimeout(function(){throw r})}function Lu(r,s){var u=s,f=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(f===0){r.removeChild(y),ui(s);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);ui(s)}function ro(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Am(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var cs=Math.random().toString(36).slice(2),yr="__reactFiber$"+cs,wi="__reactProps$"+cs,_r="__reactContainer$"+cs,_u="__reactEvents$"+cs,uj="__reactListeners$"+cs,dj="__reactHandles$"+cs;function Oo(r){var s=r[yr];if(s)return s;for(var u=r.parentNode;u;){if(s=u[_r]||u[yr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=Am(r);r!==null;){if(u=r[yr])return u;r=Am(r)}return s}r=u,u=r.parentNode}return null}function ki(r){return r=r[yr]||r[_r],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function us(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ya(r){return r[wi]||null}var Mu=[],ds=-1;function oo(r){return{current:r}}function ut(r){0>ds||(r.current=Mu[ds],Mu[ds]=null,ds--)}function ot(r,s){ds++,Mu[ds]=r.current,r.current=s}var so={},ln=oo(so),vn=oo(!1),Lo=so;function fs(r,s){var u=r.type.contextTypes;if(!u)return so;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in u)y[w]=s[w];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=y),y}function bn(r){return r=r.childContextTypes,r!=null}function Xa(){ut(vn),ut(ln)}function Dm(r,s,u){if(ln.current!==so)throw Error(n(168));ot(ln,s),ot(vn,u)}function Im(r,s,u){var f=r.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var y in f)if(!(y in s))throw Error(n(108,de(r)||"Unknown",y));return T({},u,f)}function Qa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||so,Lo=ln.current,ot(ln,r),ot(vn,vn.current),!0}function Om(r,s,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=Im(r,s,Lo),f.__reactInternalMemoizedMergedChildContext=r,ut(vn),ut(ln),ot(ln,r)):ut(vn),ot(vn,u)}var Mr=null,Ja=!1,$u=!1;function Lm(r){Mr===null?Mr=[r]:Mr.push(r)}function fj(r){Ja=!0,Lm(r)}function io(){if(!$u&&Mr!==null){$u=!0;var r=0,s=Ze;try{var u=Mr;for(Ze=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}Mr=null,Ja=!1}catch(y){throw Mr!==null&&(Mr=Mr.slice(r+1)),Mh(iu,io),y}finally{Ze=s,$u=!1}}return null}var ps=[],hs=0,Za=null,el=0,Vn=[],qn=0,_o=null,$r=1,Fr="";function Mo(r,s){ps[hs++]=el,ps[hs++]=Za,Za=r,el=s}function _m(r,s,u){Vn[qn++]=$r,Vn[qn++]=Fr,Vn[qn++]=_o,_o=r;var f=$r;r=Fr;var y=32-nr(f)-1;f&=~(1<<y),u+=1;var w=32-nr(s)+y;if(30<w){var C=y-y%5;w=(f&(1<<C)-1).toString(32),f>>=C,y-=C,$r=1<<32-nr(s)+y|u<<y|f,Fr=w+r}else $r=1<<w|u<<y|f,Fr=r}function Fu(r){r.return!==null&&(Mo(r,1),_m(r,1,0))}function zu(r){for(;r===Za;)Za=ps[--hs],ps[hs]=null,el=ps[--hs],ps[hs]=null;for(;r===_o;)_o=Vn[--qn],Vn[qn]=null,Fr=Vn[--qn],Vn[qn]=null,$r=Vn[--qn],Vn[qn]=null}var On=null,Ln=null,ft=!1,or=null;function Mm(r,s){var u=Xn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function $m(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,On=r,Ln=ro(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,On=r,Ln=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=_o!==null?{id:$r,overflow:Fr}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=Xn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,On=r,Ln=null,!0):!1;default:return!1}}function Bu(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Uu(r){if(ft){var s=Ln;if(s){var u=s;if(!$m(r,s)){if(Bu(r))throw Error(n(418));s=ro(u.nextSibling);var f=On;s&&$m(r,s)?Mm(f,u):(r.flags=r.flags&-4097|2,ft=!1,On=r)}}else{if(Bu(r))throw Error(n(418));r.flags=r.flags&-4097|2,ft=!1,On=r}}}function Fm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;On=r}function tl(r){if(r!==On)return!1;if(!ft)return Fm(r),ft=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!Iu(r.type,r.memoizedProps)),s&&(s=Ln)){if(Bu(r))throw zm(),Error(n(418));for(;s;)Mm(r,s),s=ro(s.nextSibling)}if(Fm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Ln=ro(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Ln=null}}else Ln=On?ro(r.stateNode.nextSibling):null;return!0}function zm(){for(var r=Ln;r;)r=ro(r.nextSibling)}function ms(){Ln=On=null,ft=!1}function Hu(r){or===null?or=[r]:or.push(r)}var pj=A.ReactCurrentBatchConfig;function ji(r,s,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 f=u.stateNode}if(!f)throw Error(n(147,r));var y=f,w=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===w?s.ref:(s=function(C){var B=y.refs;C===null?delete B[w]:B[w]=C},s._stringRef=w,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function nl(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Bm(r){var s=r._init;return s(r._payload)}function Um(r){function s(Y,W){if(r){var J=Y.deletions;J===null?(Y.deletions=[W],Y.flags|=16):J.push(W)}}function u(Y,W){if(!r)return null;for(;W!==null;)s(Y,W),W=W.sibling;return null}function f(Y,W){for(Y=new Map;W!==null;)W.key!==null?Y.set(W.key,W):Y.set(W.index,W),W=W.sibling;return Y}function y(Y,W){return Y=mo(Y,W),Y.index=0,Y.sibling=null,Y}function w(Y,W,J){return Y.index=J,r?(J=Y.alternate,J!==null?(J=J.index,J<W?(Y.flags|=2,W):J):(Y.flags|=2,W)):(Y.flags|=1048576,W)}function C(Y){return r&&Y.alternate===null&&(Y.flags|=2),Y}function B(Y,W,J,fe){return W===null||W.tag!==6?(W=Od(J,Y.mode,fe),W.return=Y,W):(W=y(W,J),W.return=Y,W)}function H(Y,W,J,fe){var Te=J.type;return Te===F?ae(Y,W,J.props.children,fe,J.key):W!==null&&(W.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===I&&Bm(Te)===W.type)?(fe=y(W,J.props),fe.ref=ji(Y,W,J),fe.return=Y,fe):(fe=Cl(J.type,J.key,J.props,null,Y.mode,fe),fe.ref=ji(Y,W,J),fe.return=Y,fe)}function te(Y,W,J,fe){return W===null||W.tag!==4||W.stateNode.containerInfo!==J.containerInfo||W.stateNode.implementation!==J.implementation?(W=Ld(J,Y.mode,fe),W.return=Y,W):(W=y(W,J.children||[]),W.return=Y,W)}function ae(Y,W,J,fe,Te){return W===null||W.tag!==7?(W=Vo(J,Y.mode,fe,Te),W.return=Y,W):(W=y(W,J),W.return=Y,W)}function le(Y,W,J){if(typeof W=="string"&&W!==""||typeof W=="number")return W=Od(""+W,Y.mode,J),W.return=Y,W;if(typeof W=="object"&&W!==null){switch(W.$$typeof){case L:return J=Cl(W.type,W.key,W.props,null,Y.mode,J),J.ref=ji(Y,null,W),J.return=Y,J;case P:return W=Ld(W,Y.mode,J),W.return=Y,W;case I:var fe=W._init;return le(Y,fe(W._payload),J)}if(Qe(W)||q(W))return W=Vo(W,Y.mode,J,null),W.return=Y,W;nl(Y,W)}return null}function se(Y,W,J,fe){var Te=W!==null?W.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return Te!==null?null:B(Y,W,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case L:return J.key===Te?H(Y,W,J,fe):null;case P:return J.key===Te?te(Y,W,J,fe):null;case I:return Te=J._init,se(Y,W,Te(J._payload),fe)}if(Qe(J)||q(J))return Te!==null?null:ae(Y,W,J,fe,null);nl(Y,J)}return null}function ge(Y,W,J,fe,Te){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return Y=Y.get(J)||null,B(W,Y,""+fe,Te);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case L:return Y=Y.get(fe.key===null?J:fe.key)||null,H(W,Y,fe,Te);case P:return Y=Y.get(fe.key===null?J:fe.key)||null,te(W,Y,fe,Te);case I:var De=fe._init;return ge(Y,W,J,De(fe._payload),Te)}if(Qe(fe)||q(fe))return Y=Y.get(J)||null,ae(W,Y,fe,Te,null);nl(W,fe)}return null}function Ne(Y,W,J,fe){for(var Te=null,De=null,Ie=W,_e=W=0,Kt=null;Ie!==null&&_e<J.length;_e++){Ie.index>_e?(Kt=Ie,Ie=null):Kt=Ie.sibling;var Ge=se(Y,Ie,J[_e],fe);if(Ge===null){Ie===null&&(Ie=Kt);break}r&&Ie&&Ge.alternate===null&&s(Y,Ie),W=w(Ge,W,_e),De===null?Te=Ge:De.sibling=Ge,De=Ge,Ie=Kt}if(_e===J.length)return u(Y,Ie),ft&&Mo(Y,_e),Te;if(Ie===null){for(;_e<J.length;_e++)Ie=le(Y,J[_e],fe),Ie!==null&&(W=w(Ie,W,_e),De===null?Te=Ie:De.sibling=Ie,De=Ie);return ft&&Mo(Y,_e),Te}for(Ie=f(Y,Ie);_e<J.length;_e++)Kt=ge(Ie,Y,_e,J[_e],fe),Kt!==null&&(r&&Kt.alternate!==null&&Ie.delete(Kt.key===null?_e:Kt.key),W=w(Kt,W,_e),De===null?Te=Kt:De.sibling=Kt,De=Kt);return r&&Ie.forEach(function(go){return s(Y,go)}),ft&&Mo(Y,_e),Te}function Ee(Y,W,J,fe){var Te=q(J);if(typeof Te!="function")throw Error(n(150));if(J=Te.call(J),J==null)throw Error(n(151));for(var De=Te=null,Ie=W,_e=W=0,Kt=null,Ge=J.next();Ie!==null&&!Ge.done;_e++,Ge=J.next()){Ie.index>_e?(Kt=Ie,Ie=null):Kt=Ie.sibling;var go=se(Y,Ie,Ge.value,fe);if(go===null){Ie===null&&(Ie=Kt);break}r&&Ie&&go.alternate===null&&s(Y,Ie),W=w(go,W,_e),De===null?Te=go:De.sibling=go,De=go,Ie=Kt}if(Ge.done)return u(Y,Ie),ft&&Mo(Y,_e),Te;if(Ie===null){for(;!Ge.done;_e++,Ge=J.next())Ge=le(Y,Ge.value,fe),Ge!==null&&(W=w(Ge,W,_e),De===null?Te=Ge:De.sibling=Ge,De=Ge);return ft&&Mo(Y,_e),Te}for(Ie=f(Y,Ie);!Ge.done;_e++,Ge=J.next())Ge=ge(Ie,Y,_e,Ge.value,fe),Ge!==null&&(r&&Ge.alternate!==null&&Ie.delete(Ge.key===null?_e:Ge.key),W=w(Ge,W,_e),De===null?Te=Ge:De.sibling=Ge,De=Ge);return r&&Ie.forEach(function(qj){return s(Y,qj)}),ft&&Mo(Y,_e),Te}function Rt(Y,W,J,fe){if(typeof J=="object"&&J!==null&&J.type===F&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case L:e:{for(var Te=J.key,De=W;De!==null;){if(De.key===Te){if(Te=J.type,Te===F){if(De.tag===7){u(Y,De.sibling),W=y(De,J.props.children),W.return=Y,Y=W;break e}}else if(De.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===I&&Bm(Te)===De.type){u(Y,De.sibling),W=y(De,J.props),W.ref=ji(Y,De,J),W.return=Y,Y=W;break e}u(Y,De);break}else s(Y,De);De=De.sibling}J.type===F?(W=Vo(J.props.children,Y.mode,fe,J.key),W.return=Y,Y=W):(fe=Cl(J.type,J.key,J.props,null,Y.mode,fe),fe.ref=ji(Y,W,J),fe.return=Y,Y=fe)}return C(Y);case P:e:{for(De=J.key;W!==null;){if(W.key===De)if(W.tag===4&&W.stateNode.containerInfo===J.containerInfo&&W.stateNode.implementation===J.implementation){u(Y,W.sibling),W=y(W,J.children||[]),W.return=Y,Y=W;break e}else{u(Y,W);break}else s(Y,W);W=W.sibling}W=Ld(J,Y.mode,fe),W.return=Y,Y=W}return C(Y);case I:return De=J._init,Rt(Y,W,De(J._payload),fe)}if(Qe(J))return Ne(Y,W,J,fe);if(q(J))return Ee(Y,W,J,fe);nl(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,W!==null&&W.tag===6?(u(Y,W.sibling),W=y(W,J),W.return=Y,Y=W):(u(Y,W),W=Od(J,Y.mode,fe),W.return=Y,Y=W),C(Y)):u(Y,W)}return Rt}var gs=Um(!0),Hm=Um(!1),rl=oo(null),ol=null,xs=null,Wu=null;function Vu(){Wu=xs=ol=null}function qu(r){var s=rl.current;ut(rl),r._currentValue=s}function Ku(r,s,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),r===u)break;r=r.return}}function ys(r,s){ol=r,Wu=xs=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(wn=!0),r.firstContext=null)}function Kn(r){var s=r._currentValue;if(Wu!==r)if(r={context:r,memoizedValue:s,next:null},xs===null){if(ol===null)throw Error(n(308));xs=r,ol.dependencies={lanes:0,firstContext:r}}else xs=xs.next=r;return s}var $o=null;function Gu(r){$o===null?$o=[r]:$o.push(r)}function Wm(r,s,u,f){var y=s.interleaved;return y===null?(u.next=u,Gu(s)):(u.next=y.next,y.next=u),s.interleaved=u,zr(r,f)}function zr(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var ao=!1;function Yu(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vm(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Br(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function lo(r,s,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(Ke&2)!==0){var y=f.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),f.pending=s,zr(r,u)}return y=f.interleaved,y===null?(s.next=s,Gu(f)):(s.next=y.next,y.next=s),f.interleaved=s,zr(r,u)}function sl(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,cu(r,u)}}function qm(r,s){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var C={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?y=w=C:w=w.next=C,u=u.next}while(u!==null);w===null?y=w=s:w=w.next=s}else y=w=s;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function il(r,s,u,f){var y=r.updateQueue;ao=!1;var w=y.firstBaseUpdate,C=y.lastBaseUpdate,B=y.shared.pending;if(B!==null){y.shared.pending=null;var H=B,te=H.next;H.next=null,C===null?w=te:C.next=te,C=H;var ae=r.alternate;ae!==null&&(ae=ae.updateQueue,B=ae.lastBaseUpdate,B!==C&&(B===null?ae.firstBaseUpdate=te:B.next=te,ae.lastBaseUpdate=H))}if(w!==null){var le=y.baseState;C=0,ae=te=H=null,B=w;do{var se=B.lane,ge=B.eventTime;if((f&se)===se){ae!==null&&(ae=ae.next={eventTime:ge,lane:0,tag:B.tag,payload:B.payload,callback:B.callback,next:null});e:{var Ne=r,Ee=B;switch(se=s,ge=u,Ee.tag){case 1:if(Ne=Ee.payload,typeof Ne=="function"){le=Ne.call(ge,le,se);break e}le=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Ee.payload,se=typeof Ne=="function"?Ne.call(ge,le,se):Ne,se==null)break e;le=T({},le,se);break e;case 2:ao=!0}}B.callback!==null&&B.lane!==0&&(r.flags|=64,se=y.effects,se===null?y.effects=[B]:se.push(B))}else ge={eventTime:ge,lane:se,tag:B.tag,payload:B.payload,callback:B.callback,next:null},ae===null?(te=ae=ge,H=le):ae=ae.next=ge,C|=se;if(B=B.next,B===null){if(B=y.shared.pending,B===null)break;se=B,B=se.next,se.next=null,y.lastBaseUpdate=se,y.shared.pending=null}}while(!0);if(ae===null&&(H=le),y.baseState=H,y.firstBaseUpdate=te,y.lastBaseUpdate=ae,s=y.shared.interleaved,s!==null){y=s;do C|=y.lane,y=y.next;while(y!==s)}else w===null&&(y.shared.lanes=0);Bo|=C,r.lanes=C,r.memoizedState=le}}function Km(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var f=r[s],y=f.callback;if(y!==null){if(f.callback=null,f=u,typeof y!="function")throw Error(n(191,y));y.call(f)}}}var Si={},vr=oo(Si),Ni=oo(Si),Ci=oo(Si);function Fo(r){if(r===Si)throw Error(n(174));return r}function Xu(r,s){switch(ot(Ci,s),ot(Ni,r),ot(vr,Si),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ie(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ie(s,r)}ut(vr),ot(vr,s)}function vs(){ut(vr),ut(Ni),ut(Ci)}function Gm(r){Fo(Ci.current);var s=Fo(vr.current),u=ie(s,r.type);s!==u&&(ot(Ni,r),ot(vr,u))}function Qu(r){Ni.current===r&&(ut(vr),ut(Ni))}var vt=oo(0);function al(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ju=[];function Zu(){for(var r=0;r<Ju.length;r++)Ju[r]._workInProgressVersionPrimary=null;Ju.length=0}var ll=A.ReactCurrentDispatcher,ed=A.ReactCurrentBatchConfig,zo=0,bt=null,Mt=null,Vt=null,cl=!1,Ei=!1,Pi=0,hj=0;function cn(){throw Error(n(321))}function td(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!rr(r[u],s[u]))return!1;return!0}function nd(r,s,u,f,y,w){if(zo=w,bt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,ll.current=r===null||r.memoizedState===null?yj:vj,r=u(f,y),Ei){w=0;do{if(Ei=!1,Pi=0,25<=w)throw Error(n(301));w+=1,Vt=Mt=null,s.updateQueue=null,ll.current=bj,r=u(f,y)}while(Ei)}if(ll.current=fl,s=Mt!==null&&Mt.next!==null,zo=0,Vt=Mt=bt=null,cl=!1,s)throw Error(n(300));return r}function rd(){var r=Pi!==0;return Pi=0,r}function br(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?bt.memoizedState=Vt=r:Vt=Vt.next=r,Vt}function Gn(){if(Mt===null){var r=bt.alternate;r=r!==null?r.memoizedState:null}else r=Mt.next;var s=Vt===null?bt.memoizedState:Vt.next;if(s!==null)Vt=s,Mt=r;else{if(r===null)throw Error(n(310));Mt=r,r={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},Vt===null?bt.memoizedState=Vt=r:Vt=Vt.next=r}return Vt}function Ti(r,s){return typeof s=="function"?s(r):s}function od(r){var s=Gn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=Mt,y=f.baseQueue,w=u.pending;if(w!==null){if(y!==null){var C=y.next;y.next=w.next,w.next=C}f.baseQueue=y=w,u.pending=null}if(y!==null){w=y.next,f=f.baseState;var B=C=null,H=null,te=w;do{var ae=te.lane;if((zo&ae)===ae)H!==null&&(H=H.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),f=te.hasEagerState?te.eagerState:r(f,te.action);else{var le={lane:ae,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};H===null?(B=H=le,C=f):H=H.next=le,bt.lanes|=ae,Bo|=ae}te=te.next}while(te!==null&&te!==w);H===null?C=f:H.next=B,rr(f,s.memoizedState)||(wn=!0),s.memoizedState=f,s.baseState=C,s.baseQueue=H,u.lastRenderedState=f}if(r=u.interleaved,r!==null){y=r;do w=y.lane,bt.lanes|=w,Bo|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function sd(r){var s=Gn(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,y=u.pending,w=s.memoizedState;if(y!==null){u.pending=null;var C=y=y.next;do w=r(w,C.action),C=C.next;while(C!==y);rr(w,s.memoizedState)||(wn=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,f]}function Ym(){}function Xm(r,s){var u=bt,f=Gn(),y=s(),w=!rr(f.memoizedState,y);if(w&&(f.memoizedState=y,wn=!0),f=f.queue,id(Zm.bind(null,u,f,r),[r]),f.getSnapshot!==s||w||Vt!==null&&Vt.memoizedState.tag&1){if(u.flags|=2048,Ri(9,Jm.bind(null,u,f,y,s),void 0,null),qt===null)throw Error(n(349));(zo&30)!==0||Qm(u,s,y)}return y}function Qm(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Jm(r,s,u,f){s.value=u,s.getSnapshot=f,eg(s)&&tg(r)}function Zm(r,s,u){return u(function(){eg(s)&&tg(r)})}function eg(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!rr(r,u)}catch{return!0}}function tg(r){var s=zr(r,1);s!==null&&lr(s,r,1,-1)}function ng(r){var s=br();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:r},s.queue=r,r=r.dispatch=xj.bind(null,bt,r),[s.memoizedState,r]}function Ri(r,s,u,f){return r={tag:r,create:s,destroy:u,deps:f,next:null},s=bt.updateQueue,s===null?(s={lastEffect:null,stores:null},bt.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,s.lastEffect=r)),r}function rg(){return Gn().memoizedState}function ul(r,s,u,f){var y=br();bt.flags|=r,y.memoizedState=Ri(1|s,u,void 0,f===void 0?null:f)}function dl(r,s,u,f){var y=Gn();f=f===void 0?null:f;var w=void 0;if(Mt!==null){var C=Mt.memoizedState;if(w=C.destroy,f!==null&&td(f,C.deps)){y.memoizedState=Ri(s,u,w,f);return}}bt.flags|=r,y.memoizedState=Ri(1|s,u,w,f)}function og(r,s){return ul(8390656,8,r,s)}function id(r,s){return dl(2048,8,r,s)}function sg(r,s){return dl(4,2,r,s)}function ig(r,s){return dl(4,4,r,s)}function ag(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function lg(r,s,u){return u=u!=null?u.concat([r]):null,dl(4,4,ag.bind(null,s,r),u)}function ad(){}function cg(r,s){var u=Gn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&td(s,f[1])?f[0]:(u.memoizedState=[r,s],r)}function ug(r,s){var u=Gn();s=s===void 0?null:s;var f=u.memoizedState;return f!==null&&s!==null&&td(s,f[1])?f[0]:(r=r(),u.memoizedState=[r,s],r)}function dg(r,s,u){return(zo&21)===0?(r.baseState&&(r.baseState=!1,wn=!0),r.memoizedState=u):(rr(u,s)||(u=Bh(),bt.lanes|=u,Bo|=u,r.baseState=!0),s)}function mj(r,s){var u=Ze;Ze=u!==0&&4>u?u:4,r(!0);var f=ed.transition;ed.transition={};try{r(!1),s()}finally{Ze=u,ed.transition=f}}function fg(){return Gn().memoizedState}function gj(r,s,u){var f=po(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},pg(r))hg(s,u);else if(u=Wm(r,s,u,f),u!==null){var y=mn();lr(u,r,f,y),mg(u,s,f)}}function xj(r,s,u){var f=po(r),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(pg(r))hg(s,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var C=s.lastRenderedState,B=w(C,u);if(y.hasEagerState=!0,y.eagerState=B,rr(B,C)){var H=s.interleaved;H===null?(y.next=y,Gu(s)):(y.next=H.next,H.next=y),s.interleaved=y;return}}catch{}finally{}u=Wm(r,s,y,f),u!==null&&(y=mn(),lr(u,r,f,y),mg(u,s,f))}}function pg(r){var s=r.alternate;return r===bt||s!==null&&s===bt}function hg(r,s){Ei=cl=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function mg(r,s,u){if((u&4194240)!==0){var f=s.lanes;f&=r.pendingLanes,u|=f,s.lanes=u,cu(r,u)}}var fl={readContext:Kn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},yj={readContext:Kn,useCallback:function(r,s){return br().memoizedState=[r,s===void 0?null:s],r},useContext:Kn,useEffect:og,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,ul(4194308,4,ag.bind(null,s,r),u)},useLayoutEffect:function(r,s){return ul(4194308,4,r,s)},useInsertionEffect:function(r,s){return ul(4,2,r,s)},useMemo:function(r,s){var u=br();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var f=br();return s=u!==void 0?u(s):s,f.memoizedState=f.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},f.queue=r,r=r.dispatch=gj.bind(null,bt,r),[f.memoizedState,r]},useRef:function(r){var s=br();return r={current:r},s.memoizedState=r},useState:ng,useDebugValue:ad,useDeferredValue:function(r){return br().memoizedState=r},useTransition:function(){var r=ng(!1),s=r[0];return r=mj.bind(null,r[1]),br().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var f=bt,y=br();if(ft){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),qt===null)throw Error(n(349));(zo&30)!==0||Qm(f,s,u)}y.memoizedState=u;var w={value:u,getSnapshot:s};return y.queue=w,og(Zm.bind(null,f,w,r),[r]),f.flags|=2048,Ri(9,Jm.bind(null,f,w,u,s),void 0,null),u},useId:function(){var r=br(),s=qt.identifierPrefix;if(ft){var u=Fr,f=$r;u=(f&~(1<<32-nr(f)-1)).toString(32)+u,s=":"+s+"R"+u,u=Pi++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=hj++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},vj={readContext:Kn,useCallback:cg,useContext:Kn,useEffect:id,useImperativeHandle:lg,useInsertionEffect:sg,useLayoutEffect:ig,useMemo:ug,useReducer:od,useRef:rg,useState:function(){return od(Ti)},useDebugValue:ad,useDeferredValue:function(r){var s=Gn();return dg(s,Mt.memoizedState,r)},useTransition:function(){var r=od(Ti)[0],s=Gn().memoizedState;return[r,s]},useMutableSource:Ym,useSyncExternalStore:Xm,useId:fg,unstable_isNewReconciler:!1},bj={readContext:Kn,useCallback:cg,useContext:Kn,useEffect:id,useImperativeHandle:lg,useInsertionEffect:sg,useLayoutEffect:ig,useMemo:ug,useReducer:sd,useRef:rg,useState:function(){return sd(Ti)},useDebugValue:ad,useDeferredValue:function(r){var s=Gn();return Mt===null?s.memoizedState=r:dg(s,Mt.memoizedState,r)},useTransition:function(){var r=sd(Ti)[0],s=Gn().memoizedState;return[r,s]},useMutableSource:Ym,useSyncExternalStore:Xm,useId:fg,unstable_isNewReconciler:!1};function sr(r,s){if(r&&r.defaultProps){s=T({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function ld(r,s,u,f){s=r.memoizedState,u=u(f,s),u=u==null?s:T({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var pl={isMounted:function(r){return(r=r._reactInternals)?Io(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var f=mn(),y=po(r),w=Br(f,y);w.payload=s,u!=null&&(w.callback=u),s=lo(r,w,y),s!==null&&(lr(s,r,y,f),sl(s,r,y))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var f=mn(),y=po(r),w=Br(f,y);w.tag=1,w.payload=s,u!=null&&(w.callback=u),s=lo(r,w,y),s!==null&&(lr(s,r,y,f),sl(s,r,y))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=mn(),f=po(r),y=Br(u,f);y.tag=2,s!=null&&(y.callback=s),s=lo(r,y,f),s!==null&&(lr(s,r,f,u),sl(s,r,f))}};function gg(r,s,u,f,y,w,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,w,C):s.prototype&&s.prototype.isPureReactComponent?!gi(u,f)||!gi(y,w):!0}function xg(r,s,u){var f=!1,y=so,w=s.contextType;return typeof w=="object"&&w!==null?w=Kn(w):(y=bn(s)?Lo:ln.current,f=s.contextTypes,w=(f=f!=null)?fs(r,y):so),s=new s(u,w),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=pl,r.stateNode=s,s._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),s}function yg(r,s,u,f){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,f),s.state!==r&&pl.enqueueReplaceState(s,s.state,null)}function cd(r,s,u,f){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Yu(r);var w=s.contextType;typeof w=="object"&&w!==null?y.context=Kn(w):(w=bn(s)?Lo:ln.current,y.context=fs(r,w)),y.state=r.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(ld(r,s,w,u),y.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(s=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),s!==y.state&&pl.enqueueReplaceState(y,y.state,null),il(r,u,y,f),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function bs(r,s){try{var u="",f=s;do u+=Ce(f),f=f.return;while(f);var y=u}catch(w){y=`
|
|
39
|
+
Error generating stack: `+w.message+`
|
|
40
|
+
`+w.stack}return{value:r,source:s,stack:y,digest:null}}function ud(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function dd(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var wj=typeof WeakMap=="function"?WeakMap:Map;function vg(r,s,u){u=Br(-1,u),u.tag=3,u.payload={element:null};var f=s.value;return u.callback=function(){bl||(bl=!0,Cd=f),dd(r,s)},u}function bg(r,s,u){u=Br(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var y=s.value;u.payload=function(){return f(y)},u.callback=function(){dd(r,s)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){dd(r,s),typeof f!="function"&&(uo===null?uo=new Set([this]):uo.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),u}function wg(r,s,u){var f=r.pingCache;if(f===null){f=r.pingCache=new wj;var y=new Set;f.set(s,y)}else y=f.get(s),y===void 0&&(y=new Set,f.set(s,y));y.has(u)||(y.add(u),r=Lj.bind(null,r,s,u),s.then(r,r))}function kg(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function jg(r,s,u,f,y){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=Br(-1,1),s.tag=2,lo(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var kj=A.ReactCurrentOwner,wn=!1;function hn(r,s,u,f){s.child=r===null?Hm(s,null,u,f):gs(s,r.child,u,f)}function Sg(r,s,u,f,y){u=u.render;var w=s.ref;return ys(s,y),f=nd(r,s,u,f,w,y),u=rd(),r!==null&&!wn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Ur(r,s,y)):(ft&&u&&Fu(s),s.flags|=1,hn(r,s,f,y),s.child)}function Ng(r,s,u,f,y){if(r===null){var w=u.type;return typeof w=="function"&&!Id(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=w,Cg(r,s,w,f,y)):(r=Cl(u.type,null,f,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(w=r.child,(r.lanes&y)===0){var C=w.memoizedProps;if(u=u.compare,u=u!==null?u:gi,u(C,f)&&r.ref===s.ref)return Ur(r,s,y)}return s.flags|=1,r=mo(w,f),r.ref=s.ref,r.return=s,s.child=r}function Cg(r,s,u,f,y){if(r!==null){var w=r.memoizedProps;if(gi(w,f)&&r.ref===s.ref)if(wn=!1,s.pendingProps=f=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(wn=!0);else return s.lanes=r.lanes,Ur(r,s,y)}return fd(r,s,u,f,y)}function Eg(r,s,u){var f=s.pendingProps,y=f.children,w=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ot(ks,_n),_n|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,ot(ks,_n),_n|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=w!==null?w.baseLanes:u,ot(ks,_n),_n|=f}else w!==null?(f=w.baseLanes|u,s.memoizedState=null):f=u,ot(ks,_n),_n|=f;return hn(r,s,y,u),s.child}function Pg(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function fd(r,s,u,f,y){var w=bn(u)?Lo:ln.current;return w=fs(s,w),ys(s,y),u=nd(r,s,u,f,w,y),f=rd(),r!==null&&!wn?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~y,Ur(r,s,y)):(ft&&f&&Fu(s),s.flags|=1,hn(r,s,u,y),s.child)}function Tg(r,s,u,f,y){if(bn(u)){var w=!0;Qa(s)}else w=!1;if(ys(s,y),s.stateNode===null)ml(r,s),xg(s,u,f),cd(s,u,f,y),f=!0;else if(r===null){var C=s.stateNode,B=s.memoizedProps;C.props=B;var H=C.context,te=u.contextType;typeof te=="object"&&te!==null?te=Kn(te):(te=bn(u)?Lo:ln.current,te=fs(s,te));var ae=u.getDerivedStateFromProps,le=typeof ae=="function"||typeof C.getSnapshotBeforeUpdate=="function";le||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(B!==f||H!==te)&&yg(s,C,f,te),ao=!1;var se=s.memoizedState;C.state=se,il(s,f,C,y),H=s.memoizedState,B!==f||se!==H||vn.current||ao?(typeof ae=="function"&&(ld(s,u,ae,f),H=s.memoizedState),(B=ao||gg(s,u,B,f,se,H,te))?(le||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=H),C.props=f,C.state=H,C.context=te,f=B):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{C=s.stateNode,Vm(r,s),B=s.memoizedProps,te=s.type===s.elementType?B:sr(s.type,B),C.props=te,le=s.pendingProps,se=C.context,H=u.contextType,typeof H=="object"&&H!==null?H=Kn(H):(H=bn(u)?Lo:ln.current,H=fs(s,H));var ge=u.getDerivedStateFromProps;(ae=typeof ge=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(B!==le||se!==H)&&yg(s,C,f,H),ao=!1,se=s.memoizedState,C.state=se,il(s,f,C,y);var Ne=s.memoizedState;B!==le||se!==Ne||vn.current||ao?(typeof ge=="function"&&(ld(s,u,ge,f),Ne=s.memoizedState),(te=ao||gg(s,u,te,f,se,Ne,H)||!1)?(ae||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(f,Ne,H),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(f,Ne,H)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ne),C.props=f,C.state=Ne,C.context=H,f=te):(typeof C.componentDidUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||B===r.memoizedProps&&se===r.memoizedState||(s.flags|=1024),f=!1)}return pd(r,s,u,f,w,y)}function pd(r,s,u,f,y,w){Pg(r,s);var C=(s.flags&128)!==0;if(!f&&!C)return y&&Om(s,u,!1),Ur(r,s,w);f=s.stateNode,kj.current=s;var B=C&&typeof u.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,r!==null&&C?(s.child=gs(s,r.child,null,w),s.child=gs(s,null,B,w)):hn(r,s,B,w),s.memoizedState=f.state,y&&Om(s,u,!0),s.child}function Rg(r){var s=r.stateNode;s.pendingContext?Dm(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Dm(r,s.context,!1),Xu(r,s.containerInfo)}function Ag(r,s,u,f,y){return ms(),Hu(y),s.flags|=256,hn(r,s,u,f),s.child}var hd={dehydrated:null,treeContext:null,retryLane:0};function md(r){return{baseLanes:r,cachePool:null,transitions:null}}function Dg(r,s,u){var f=s.pendingProps,y=vt.current,w=!1,C=(s.flags&128)!==0,B;if((B=C)||(B=r!==null&&r.memoizedState===null?!1:(y&2)!==0),B?(w=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),ot(vt,y&1),r===null)return Uu(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=f.children,r=f.fallback,w?(f=s.mode,w=s.child,C={mode:"hidden",children:C},(f&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=C):w=El(C,f,0,null),r=Vo(r,f,u,null),w.return=s,r.return=s,w.sibling=r,s.child=w,s.child.memoizedState=md(u),s.memoizedState=hd,r):gd(s,C));if(y=r.memoizedState,y!==null&&(B=y.dehydrated,B!==null))return jj(r,s,C,f,B,y,u);if(w){w=f.fallback,C=s.mode,y=r.child,B=y.sibling;var H={mode:"hidden",children:f.children};return(C&1)===0&&s.child!==y?(f=s.child,f.childLanes=0,f.pendingProps=H,s.deletions=null):(f=mo(y,H),f.subtreeFlags=y.subtreeFlags&14680064),B!==null?w=mo(B,w):(w=Vo(w,C,u,null),w.flags|=2),w.return=s,f.return=s,f.sibling=w,s.child=f,f=w,w=s.child,C=r.child.memoizedState,C=C===null?md(u):{baseLanes:C.baseLanes|u,cachePool:null,transitions:C.transitions},w.memoizedState=C,w.childLanes=r.childLanes&~u,s.memoizedState=hd,f}return w=r.child,r=w.sibling,f=mo(w,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=u),f.return=s,f.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=f,s.memoizedState=null,f}function gd(r,s){return s=El({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function hl(r,s,u,f){return f!==null&&Hu(f),gs(s,r.child,null,u),r=gd(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function jj(r,s,u,f,y,w,C){if(u)return s.flags&256?(s.flags&=-257,f=ud(Error(n(422))),hl(r,s,C,f)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(w=f.fallback,y=s.mode,f=El({mode:"visible",children:f.children},y,0,null),w=Vo(w,y,C,null),w.flags|=2,f.return=s,w.return=s,f.sibling=w,s.child=f,(s.mode&1)!==0&&gs(s,r.child,null,C),s.child.memoizedState=md(C),s.memoizedState=hd,w);if((s.mode&1)===0)return hl(r,s,C,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var B=f.dgst;return f=B,w=Error(n(419)),f=ud(w,f,void 0),hl(r,s,C,f)}if(B=(C&r.childLanes)!==0,wn||B){if(f=qt,f!==null){switch(C&-C){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|C))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,zr(r,y),lr(f,r,y,-1))}return Dd(),f=ud(Error(n(421))),hl(r,s,C,f)}return y.data==="$?"?(s.flags|=128,s.child=r.child,s=_j.bind(null,r),y._reactRetry=s,null):(r=w.treeContext,Ln=ro(y.nextSibling),On=s,ft=!0,or=null,r!==null&&(Vn[qn++]=$r,Vn[qn++]=Fr,Vn[qn++]=_o,$r=r.id,Fr=r.overflow,_o=s),s=gd(s,f.children),s.flags|=4096,s)}function Ig(r,s,u){r.lanes|=s;var f=r.alternate;f!==null&&(f.lanes|=s),Ku(r.return,s,u)}function xd(r,s,u,f,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y}:(w.isBackwards=s,w.rendering=null,w.renderingStartTime=0,w.last=f,w.tail=u,w.tailMode=y)}function Og(r,s,u){var f=s.pendingProps,y=f.revealOrder,w=f.tail;if(hn(r,s,f.children,u),f=vt.current,(f&2)!==0)f=f&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ig(r,u,s);else if(r.tag===19)Ig(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(ot(vt,f),(s.mode&1)===0)s.memoizedState=null;else switch(y){case"forwards":for(u=s.child,y=null;u!==null;)r=u.alternate,r!==null&&al(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=s.child,s.child=null):(y=u.sibling,u.sibling=null),xd(s,!1,y,u,w);break;case"backwards":for(u=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&al(r)===null){s.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}xd(s,!0,u,null,w);break;case"together":xd(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ml(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Ur(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),Bo|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=mo(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=mo(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function Sj(r,s,u){switch(s.tag){case 3:Rg(s),ms();break;case 5:Gm(s);break;case 1:bn(s.type)&&Qa(s);break;case 4:Xu(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,y=s.memoizedProps.value;ot(rl,f._currentValue),f._currentValue=y;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ot(vt,vt.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?Dg(r,s,u):(ot(vt,vt.current&1),r=Ur(r,s,u),r!==null?r.sibling:null);ot(vt,vt.current&1);break;case 19:if(f=(u&s.childLanes)!==0,(r.flags&128)!==0){if(f)return Og(r,s,u);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ot(vt,vt.current),f)break;return null;case 22:case 23:return s.lanes=0,Eg(r,s,u)}return Ur(r,s,u)}var Lg,yd,_g,Mg;Lg=function(r,s){for(var u=s.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===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},yd=function(){},_g=function(r,s,u,f){var y=r.memoizedProps;if(y!==f){r=s.stateNode,Fo(vr.current);var w=null;switch(u){case"input":y=ke(r,y),f=ke(r,f),w=[];break;case"select":y=T({},y,{value:void 0}),f=T({},f,{value:void 0}),w=[];break;case"textarea":y=St(r,y),f=St(r,f),w=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=Ga)}ce(u,f);var C;u=null;for(te in y)if(!f.hasOwnProperty(te)&&y.hasOwnProperty(te)&&y[te]!=null)if(te==="style"){var B=y[te];for(C in B)B.hasOwnProperty(C)&&(u||(u={}),u[C]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(i.hasOwnProperty(te)?w||(w=[]):(w=w||[]).push(te,null));for(te in f){var H=f[te];if(B=y!=null?y[te]:void 0,f.hasOwnProperty(te)&&H!==B&&(H!=null||B!=null))if(te==="style")if(B){for(C in B)!B.hasOwnProperty(C)||H&&H.hasOwnProperty(C)||(u||(u={}),u[C]="");for(C in H)H.hasOwnProperty(C)&&B[C]!==H[C]&&(u||(u={}),u[C]=H[C])}else u||(w||(w=[]),w.push(te,u)),u=H;else te==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,B=B?B.__html:void 0,H!=null&&B!==H&&(w=w||[]).push(te,H)):te==="children"?typeof H!="string"&&typeof H!="number"||(w=w||[]).push(te,""+H):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(i.hasOwnProperty(te)?(H!=null&&te==="onScroll"&&ct("scroll",r),w||B===H||(w=[])):(w=w||[]).push(te,H))}u&&(w=w||[]).push("style",u);var te=w;(s.updateQueue=te)&&(s.flags|=4)}},Mg=function(r,s,u,f){u!==f&&(s.flags|=4)};function Ai(r,s){if(!ft)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function un(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(s)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=f,r.childLanes=u,s}function Nj(r,s,u){var f=s.pendingProps;switch(zu(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return un(s),null;case 1:return bn(s.type)&&Xa(),un(s),null;case 3:return f=s.stateNode,vs(),ut(vn),ut(ln),Zu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(tl(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,or!==null&&(Td(or),or=null))),yd(r,s),un(s),null;case 5:Qu(s);var y=Fo(Ci.current);if(u=s.type,r!==null&&s.stateNode!=null)_g(r,s,u,f,y),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return un(s),null}if(r=Fo(vr.current),tl(s)){f=s.stateNode,u=s.type;var w=s.memoizedProps;switch(f[yr]=s,f[wi]=w,r=(s.mode&1)!==0,u){case"dialog":ct("cancel",f),ct("close",f);break;case"iframe":case"object":case"embed":ct("load",f);break;case"video":case"audio":for(y=0;y<yi.length;y++)ct(yi[y],f);break;case"source":ct("error",f);break;case"img":case"image":case"link":ct("error",f),ct("load",f);break;case"details":ct("toggle",f);break;case"input":$e(f,w),ct("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!w.multiple},ct("invalid",f);break;case"textarea":Dt(f,w),ct("invalid",f)}ce(u,w),y=null;for(var C in w)if(w.hasOwnProperty(C)){var B=w[C];C==="children"?typeof B=="string"?f.textContent!==B&&(w.suppressHydrationWarning!==!0&&Ka(f.textContent,B,r),y=["children",B]):typeof B=="number"&&f.textContent!==""+B&&(w.suppressHydrationWarning!==!0&&Ka(f.textContent,B,r),y=["children",""+B]):i.hasOwnProperty(C)&&B!=null&&C==="onScroll"&&ct("scroll",f)}switch(u){case"input":Je(f),Oe(f,w,!0);break;case"textarea":Je(f),Et(f);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(f.onclick=Ga)}f=y,s.updateQueue=f,f!==null&&(s.flags|=4)}else{C=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=oe(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=C.createElement(u,{is:f.is}):(r=C.createElement(u),u==="select"&&(C=r,f.multiple?C.multiple=!0:f.size&&(C.size=f.size))):r=C.createElementNS(r,u),r[yr]=s,r[wi]=f,Lg(r,s,!1,!1),s.stateNode=r;e:{switch(C=je(u,f),u){case"dialog":ct("cancel",r),ct("close",r),y=f;break;case"iframe":case"object":case"embed":ct("load",r),y=f;break;case"video":case"audio":for(y=0;y<yi.length;y++)ct(yi[y],r);y=f;break;case"source":ct("error",r),y=f;break;case"img":case"image":case"link":ct("error",r),ct("load",r),y=f;break;case"details":ct("toggle",r),y=f;break;case"input":$e(r,f),y=ke(r,f),ct("invalid",r);break;case"option":y=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},y=T({},f,{value:void 0}),ct("invalid",r);break;case"textarea":Dt(r,f),y=St(r,f),ct("invalid",r);break;default:y=f}ce(u,y),B=y;for(w in B)if(B.hasOwnProperty(w)){var H=B[w];w==="style"?Jt(r,H):w==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&ne(r,H)):w==="children"?typeof H=="string"?(u!=="textarea"||H!=="")&&ye(r,H):typeof H=="number"&&ye(r,""+H):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?H!=null&&w==="onScroll"&&ct("scroll",r):H!=null&&E(r,w,H,C))}switch(u){case"input":Je(r),Oe(r,f,!1);break;case"textarea":Je(r),Et(r);break;case"option":f.value!=null&&r.setAttribute("value",""+xe(f.value));break;case"select":r.multiple=!!f.multiple,w=f.value,w!=null?jt(r,!!f.multiple,w,!1):f.defaultValue!=null&&jt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=Ga)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return un(s),null;case 6:if(r&&s.stateNode!=null)Mg(r,s,r.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(u=Fo(Ci.current),Fo(vr.current),tl(s)){if(f=s.stateNode,u=s.memoizedProps,f[yr]=s,(w=f.nodeValue!==u)&&(r=On,r!==null))switch(r.tag){case 3:Ka(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ka(f.nodeValue,u,(r.mode&1)!==0)}w&&(s.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[yr]=s,s.stateNode=f}return un(s),null;case 13:if(ut(vt),f=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(ft&&Ln!==null&&(s.mode&1)!==0&&(s.flags&128)===0)zm(),ms(),s.flags|=98560,w=!1;else if(w=tl(s),f!==null&&f.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=s.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[yr]=s}else ms(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;un(s),w=!1}else or!==null&&(Td(or),or=null),w=!0;if(!w)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(vt.current&1)!==0?$t===0&&($t=3):Dd())),s.updateQueue!==null&&(s.flags|=4),un(s),null);case 4:return vs(),yd(r,s),r===null&&vi(s.stateNode.containerInfo),un(s),null;case 10:return qu(s.type._context),un(s),null;case 17:return bn(s.type)&&Xa(),un(s),null;case 19:if(ut(vt),w=s.memoizedState,w===null)return un(s),null;if(f=(s.flags&128)!==0,C=w.rendering,C===null)if(f)Ai(w,!1);else{if($t!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=al(r),C!==null){for(s.flags|=128,Ai(w,!1),f=C.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=u,u=s.child;u!==null;)w=u,r=f,w.flags&=14680066,C=w.alternate,C===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=C.childLanes,w.lanes=C.lanes,w.child=C.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=C.memoizedProps,w.memoizedState=C.memoizedState,w.updateQueue=C.updateQueue,w.type=C.type,r=C.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return ot(vt,vt.current&1|2),s.child}r=r.sibling}w.tail!==null&&Tt()>js&&(s.flags|=128,f=!0,Ai(w,!1),s.lanes=4194304)}else{if(!f)if(r=al(C),r!==null){if(s.flags|=128,f=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),Ai(w,!0),w.tail===null&&w.tailMode==="hidden"&&!C.alternate&&!ft)return un(s),null}else 2*Tt()-w.renderingStartTime>js&&u!==1073741824&&(s.flags|=128,f=!0,Ai(w,!1),s.lanes=4194304);w.isBackwards?(C.sibling=s.child,s.child=C):(u=w.last,u!==null?u.sibling=C:s.child=C,w.last=C)}return w.tail!==null?(s=w.tail,w.rendering=s,w.tail=s.sibling,w.renderingStartTime=Tt(),s.sibling=null,u=vt.current,ot(vt,f?u&1|2:u&1),s):(un(s),null);case 22:case 23:return Ad(),f=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(_n&1073741824)!==0&&(un(s),s.subtreeFlags&6&&(s.flags|=8192)):un(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function Cj(r,s){switch(zu(s),s.tag){case 1:return bn(s.type)&&Xa(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return vs(),ut(vn),ut(ln),Zu(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Qu(s),null;case 13:if(ut(vt),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ms()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return ut(vt),null;case 4:return vs(),null;case 10:return qu(s.type._context),null;case 22:case 23:return Ad(),null;case 24:return null;default:return null}}var gl=!1,dn=!1,Ej=typeof WeakSet=="function"?WeakSet:Set,Se=null;function ws(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){Nt(r,s,f)}else u.current=null}function vd(r,s,u){try{u()}catch(f){Nt(r,s,f)}}var $g=!1;function Pj(r,s){if(Au=_a,r=gm(),ju(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,w=f.focusNode;f=f.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var C=0,B=-1,H=-1,te=0,ae=0,le=r,se=null;t:for(;;){for(var ge;le!==u||y!==0&&le.nodeType!==3||(B=C+y),le!==w||f!==0&&le.nodeType!==3||(H=C+f),le.nodeType===3&&(C+=le.nodeValue.length),(ge=le.firstChild)!==null;)se=le,le=ge;for(;;){if(le===r)break t;if(se===u&&++te===y&&(B=C),se===w&&++ae===f&&(H=C),(ge=le.nextSibling)!==null)break;le=se,se=le.parentNode}le=ge}u=B===-1||H===-1?null:{start:B,end:H}}else u=null}u=u||{start:0,end:0}}else u=null;for(Du={focusedElem:r,selectionRange:u},_a=!1,Se=s;Se!==null;)if(s=Se,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Se=r;else for(;Se!==null;){s=Se;try{var Ne=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Ee=Ne.memoizedProps,Rt=Ne.memoizedState,Y=s.stateNode,W=Y.getSnapshotBeforeUpdate(s.elementType===s.type?Ee:sr(s.type,Ee),Rt);Y.__reactInternalSnapshotBeforeUpdate=W}break;case 3:var J=s.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(fe){Nt(s,s.return,fe)}if(r=s.sibling,r!==null){r.return=s.return,Se=r;break}Se=s.return}return Ne=$g,$g=!1,Ne}function Di(r,s,u){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&r)===r){var w=y.destroy;y.destroy=void 0,w!==void 0&&vd(s,u,w)}y=y.next}while(y!==f)}}function xl(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==s)}}function bd(r){var s=r.ref;if(s!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof s=="function"?s(r):s.current=r}}function Fg(r){var s=r.alternate;s!==null&&(r.alternate=null,Fg(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[yr],delete s[wi],delete s[_u],delete s[uj],delete s[dj])),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 zg(r){return r.tag===5||r.tag===3||r.tag===4}function Bg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||zg(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 wd(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=Ga));else if(f!==4&&(r=r.child,r!==null))for(wd(r,s,u),r=r.sibling;r!==null;)wd(r,s,u),r=r.sibling}function kd(r,s,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(kd(r,s,u),r=r.sibling;r!==null;)kd(r,s,u),r=r.sibling}var en=null,ir=!1;function co(r,s,u){for(u=u.child;u!==null;)Ug(r,s,u),u=u.sibling}function Ug(r,s,u){if(xr&&typeof xr.onCommitFiberUnmount=="function")try{xr.onCommitFiberUnmount(Ra,u)}catch{}switch(u.tag){case 5:dn||ws(u,s);case 6:var f=en,y=ir;en=null,co(r,s,u),en=f,ir=y,en!==null&&(ir?(r=en,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):en.removeChild(u.stateNode));break;case 18:en!==null&&(ir?(r=en,u=u.stateNode,r.nodeType===8?Lu(r.parentNode,u):r.nodeType===1&&Lu(r,u),ui(r)):Lu(en,u.stateNode));break;case 4:f=en,y=ir,en=u.stateNode.containerInfo,ir=!0,co(r,s,u),en=f,ir=y;break;case 0:case 11:case 14:case 15:if(!dn&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var w=y,C=w.destroy;w=w.tag,C!==void 0&&((w&2)!==0||(w&4)!==0)&&vd(u,s,C),y=y.next}while(y!==f)}co(r,s,u);break;case 1:if(!dn&&(ws(u,s),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(B){Nt(u,s,B)}co(r,s,u);break;case 21:co(r,s,u);break;case 22:u.mode&1?(dn=(f=dn)||u.memoizedState!==null,co(r,s,u),dn=f):co(r,s,u);break;default:co(r,s,u)}}function Hg(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Ej),s.forEach(function(f){var y=Mj.bind(null,r,f);u.has(f)||(u.add(f),f.then(y,y))})}}function ar(r,s){var u=s.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];try{var w=r,C=s,B=C;e:for(;B!==null;){switch(B.tag){case 5:en=B.stateNode,ir=!1;break e;case 3:en=B.stateNode.containerInfo,ir=!0;break e;case 4:en=B.stateNode.containerInfo,ir=!0;break e}B=B.return}if(en===null)throw Error(n(160));Ug(w,C,y),en=null,ir=!1;var H=y.alternate;H!==null&&(H.return=null),y.return=null}catch(te){Nt(y,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Wg(s,r),s=s.sibling}function Wg(r,s){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(ar(s,r),wr(r),f&4){try{Di(3,r,r.return),xl(3,r)}catch(Ee){Nt(r,r.return,Ee)}try{Di(5,r,r.return)}catch(Ee){Nt(r,r.return,Ee)}}break;case 1:ar(s,r),wr(r),f&512&&u!==null&&ws(u,u.return);break;case 5:if(ar(s,r),wr(r),f&512&&u!==null&&ws(u,u.return),r.flags&32){var y=r.stateNode;try{ye(y,"")}catch(Ee){Nt(r,r.return,Ee)}}if(f&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,C=u!==null?u.memoizedProps:w,B=r.type,H=r.updateQueue;if(r.updateQueue=null,H!==null)try{B==="input"&&w.type==="radio"&&w.name!=null&&He(y,w),je(B,C);var te=je(B,w);for(C=0;C<H.length;C+=2){var ae=H[C],le=H[C+1];ae==="style"?Jt(y,le):ae==="dangerouslySetInnerHTML"?ne(y,le):ae==="children"?ye(y,le):E(y,ae,le,te)}switch(B){case"input":lt(y,w);break;case"textarea":Qt(y,w);break;case"select":var se=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var ge=w.value;ge!=null?jt(y,!!w.multiple,ge,!1):se!==!!w.multiple&&(w.defaultValue!=null?jt(y,!!w.multiple,w.defaultValue,!0):jt(y,!!w.multiple,w.multiple?[]:"",!1))}y[wi]=w}catch(Ee){Nt(r,r.return,Ee)}}break;case 6:if(ar(s,r),wr(r),f&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(Ee){Nt(r,r.return,Ee)}}break;case 3:if(ar(s,r),wr(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{ui(s.containerInfo)}catch(Ee){Nt(r,r.return,Ee)}break;case 4:ar(s,r),wr(r);break;case 13:ar(s,r),wr(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(Nd=Tt())),f&4&&Hg(r);break;case 22:if(ae=u!==null&&u.memoizedState!==null,r.mode&1?(dn=(te=dn)||ae,ar(s,r),dn=te):ar(s,r),wr(r),f&8192){if(te=r.memoizedState!==null,(r.stateNode.isHidden=te)&&!ae&&(r.mode&1)!==0)for(Se=r,ae=r.child;ae!==null;){for(le=Se=ae;Se!==null;){switch(se=Se,ge=se.child,se.tag){case 0:case 11:case 14:case 15:Di(4,se,se.return);break;case 1:ws(se,se.return);var Ne=se.stateNode;if(typeof Ne.componentWillUnmount=="function"){f=se,u=se.return;try{s=f,Ne.props=s.memoizedProps,Ne.state=s.memoizedState,Ne.componentWillUnmount()}catch(Ee){Nt(f,u,Ee)}}break;case 5:ws(se,se.return);break;case 22:if(se.memoizedState!==null){Kg(le);continue}}ge!==null?(ge.return=se,Se=ge):Kg(le)}ae=ae.sibling}e:for(ae=null,le=r;;){if(le.tag===5){if(ae===null){ae=le;try{y=le.stateNode,te?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(B=le.stateNode,H=le.memoizedProps.style,C=H!=null&&H.hasOwnProperty("display")?H.display:null,B.style.display=rn("display",C))}catch(Ee){Nt(r,r.return,Ee)}}}else if(le.tag===6){if(ae===null)try{le.stateNode.nodeValue=te?"":le.memoizedProps}catch(Ee){Nt(r,r.return,Ee)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===r)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===r)break e;for(;le.sibling===null;){if(le.return===null||le.return===r)break e;ae===le&&(ae=null),le=le.return}ae===le&&(ae=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:ar(s,r),wr(r),f&4&&Hg(r);break;case 21:break;default:ar(s,r),wr(r)}}function wr(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if(zg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(ye(y,""),f.flags&=-33);var w=Bg(r);kd(r,w,y);break;case 3:case 4:var C=f.stateNode.containerInfo,B=Bg(r);wd(r,B,C);break;default:throw Error(n(161))}}catch(H){Nt(r,r.return,H)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Tj(r,s,u){Se=r,Vg(r)}function Vg(r,s,u){for(var f=(r.mode&1)!==0;Se!==null;){var y=Se,w=y.child;if(y.tag===22&&f){var C=y.memoizedState!==null||gl;if(!C){var B=y.alternate,H=B!==null&&B.memoizedState!==null||dn;B=gl;var te=dn;if(gl=C,(dn=H)&&!te)for(Se=y;Se!==null;)C=Se,H=C.child,C.tag===22&&C.memoizedState!==null?Gg(y):H!==null?(H.return=C,Se=H):Gg(y);for(;w!==null;)Se=w,Vg(w),w=w.sibling;Se=y,gl=B,dn=te}qg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,Se=w):qg(r)}}function qg(r){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:dn||xl(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!dn)if(u===null)f.componentDidMount();else{var y=s.elementType===s.type?u.memoizedProps:sr(s.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var w=s.updateQueue;w!==null&&Km(s,w,f);break;case 3:var C=s.updateQueue;if(C!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}Km(s,C,u)}break;case 5:var B=s.stateNode;if(u===null&&s.flags&4){u=B;var H=s.memoizedProps;switch(s.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(s.memoizedState===null){var te=s.alternate;if(te!==null){var ae=te.memoizedState;if(ae!==null){var le=ae.dehydrated;le!==null&&ui(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}dn||s.flags&512&&bd(s)}catch(se){Nt(s,s.return,se)}}if(s===r){Se=null;break}if(u=s.sibling,u!==null){u.return=s.return,Se=u;break}Se=s.return}}function Kg(r){for(;Se!==null;){var s=Se;if(s===r){Se=null;break}var u=s.sibling;if(u!==null){u.return=s.return,Se=u;break}Se=s.return}}function Gg(r){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{xl(4,s)}catch(H){Nt(s,u,H)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var y=s.return;try{f.componentDidMount()}catch(H){Nt(s,y,H)}}var w=s.return;try{bd(s)}catch(H){Nt(s,w,H)}break;case 5:var C=s.return;try{bd(s)}catch(H){Nt(s,C,H)}}}catch(H){Nt(s,s.return,H)}if(s===r){Se=null;break}var B=s.sibling;if(B!==null){B.return=s.return,Se=B;break}Se=s.return}}var Rj=Math.ceil,yl=A.ReactCurrentDispatcher,jd=A.ReactCurrentOwner,Yn=A.ReactCurrentBatchConfig,Ke=0,qt=null,It=null,tn=0,_n=0,ks=oo(0),$t=0,Ii=null,Bo=0,vl=0,Sd=0,Oi=null,kn=null,Nd=0,js=1/0,Hr=null,bl=!1,Cd=null,uo=null,wl=!1,fo=null,kl=0,Li=0,Ed=null,jl=-1,Sl=0;function mn(){return(Ke&6)!==0?Tt():jl!==-1?jl:jl=Tt()}function po(r){return(r.mode&1)===0?1:(Ke&2)!==0&&tn!==0?tn&-tn:pj.transition!==null?(Sl===0&&(Sl=Bh()),Sl):(r=Ze,r!==0||(r=window.event,r=r===void 0?16:Xh(r.type)),r)}function lr(r,s,u,f){if(50<Li)throw Li=0,Ed=null,Error(n(185));si(r,u,f),((Ke&2)===0||r!==qt)&&(r===qt&&((Ke&2)===0&&(vl|=u),$t===4&&ho(r,tn)),jn(r,f),u===1&&Ke===0&&(s.mode&1)===0&&(js=Tt()+500,Ja&&io()))}function jn(r,s){var u=r.callbackNode;pk(r,s);var f=Ia(r,r===qt?tn:0);if(f===0)u!==null&&$h(u),r.callbackNode=null,r.callbackPriority=0;else if(s=f&-f,r.callbackPriority!==s){if(u!=null&&$h(u),s===1)r.tag===0?fj(Xg.bind(null,r)):Lm(Xg.bind(null,r)),lj(function(){(Ke&6)===0&&io()}),u=null;else{switch(Uh(f)){case 1:u=iu;break;case 4:u=Fh;break;case 16:u=Ta;break;case 536870912:u=zh;break;default:u=Ta}u=ox(u,Yg.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Yg(r,s){if(jl=-1,Sl=0,(Ke&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Ss()&&r.callbackNode!==u)return null;var f=Ia(r,r===qt?tn:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||s)s=Nl(r,f);else{s=f;var y=Ke;Ke|=2;var w=Jg();(qt!==r||tn!==s)&&(Hr=null,js=Tt()+500,Ho(r,s));do try{Ij();break}catch(B){Qg(r,B)}while(!0);Vu(),yl.current=w,Ke=y,It!==null?s=0:(qt=null,tn=0,s=$t)}if(s!==0){if(s===2&&(y=au(r),y!==0&&(f=y,s=Pd(r,y))),s===1)throw u=Ii,Ho(r,0),ho(r,f),jn(r,Tt()),u;if(s===6)ho(r,f);else{if(y=r.current.alternate,(f&30)===0&&!Aj(y)&&(s=Nl(r,f),s===2&&(w=au(r),w!==0&&(f=w,s=Pd(r,w))),s===1))throw u=Ii,Ho(r,0),ho(r,f),jn(r,Tt()),u;switch(r.finishedWork=y,r.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:Wo(r,kn,Hr);break;case 3:if(ho(r,f),(f&130023424)===f&&(s=Nd+500-Tt(),10<s)){if(Ia(r,0)!==0)break;if(y=r.suspendedLanes,(y&f)!==f){mn(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=Ou(Wo.bind(null,r,kn,Hr),s);break}Wo(r,kn,Hr);break;case 4:if(ho(r,f),(f&4194240)===f)break;for(s=r.eventTimes,y=-1;0<f;){var C=31-nr(f);w=1<<C,C=s[C],C>y&&(y=C),f&=~w}if(f=y,f=Tt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Rj(f/1960))-f,10<f){r.timeoutHandle=Ou(Wo.bind(null,r,kn,Hr),f);break}Wo(r,kn,Hr);break;case 5:Wo(r,kn,Hr);break;default:throw Error(n(329))}}}return jn(r,Tt()),r.callbackNode===u?Yg.bind(null,r):null}function Pd(r,s){var u=Oi;return r.current.memoizedState.isDehydrated&&(Ho(r,s).flags|=256),r=Nl(r,s),r!==2&&(s=kn,kn=u,s!==null&&Td(s)),r}function Td(r){kn===null?kn=r:kn.push.apply(kn,r)}function Aj(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var y=u[f],w=y.getSnapshot;y=y.value;try{if(!rr(w(),y))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ho(r,s){for(s&=~Sd,s&=~vl,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-nr(s),f=1<<u;r[u]=-1,s&=~f}}function Xg(r){if((Ke&6)!==0)throw Error(n(327));Ss();var s=Ia(r,0);if((s&1)===0)return jn(r,Tt()),null;var u=Nl(r,s);if(r.tag!==0&&u===2){var f=au(r);f!==0&&(s=f,u=Pd(r,f))}if(u===1)throw u=Ii,Ho(r,0),ho(r,s),jn(r,Tt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Wo(r,kn,Hr),jn(r,Tt()),null}function Rd(r,s){var u=Ke;Ke|=1;try{return r(s)}finally{Ke=u,Ke===0&&(js=Tt()+500,Ja&&io())}}function Uo(r){fo!==null&&fo.tag===0&&(Ke&6)===0&&Ss();var s=Ke;Ke|=1;var u=Yn.transition,f=Ze;try{if(Yn.transition=null,Ze=1,r)return r()}finally{Ze=f,Yn.transition=u,Ke=s,(Ke&6)===0&&io()}}function Ad(){_n=ks.current,ut(ks)}function Ho(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,aj(u)),It!==null)for(u=It.return;u!==null;){var f=u;switch(zu(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&Xa();break;case 3:vs(),ut(vn),ut(ln),Zu();break;case 5:Qu(f);break;case 4:vs();break;case 13:ut(vt);break;case 19:ut(vt);break;case 10:qu(f.type._context);break;case 22:case 23:Ad()}u=u.return}if(qt=r,It=r=mo(r.current,null),tn=_n=s,$t=0,Ii=null,Sd=vl=Bo=0,kn=Oi=null,$o!==null){for(s=0;s<$o.length;s++)if(u=$o[s],f=u.interleaved,f!==null){u.interleaved=null;var y=f.next,w=u.pending;if(w!==null){var C=w.next;w.next=y,f.next=C}u.pending=f}$o=null}return r}function Qg(r,s){do{var u=It;try{if(Vu(),ll.current=fl,cl){for(var f=bt.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}cl=!1}if(zo=0,Vt=Mt=bt=null,Ei=!1,Pi=0,jd.current=null,u===null||u.return===null){$t=1,Ii=s,It=null;break}e:{var w=r,C=u.return,B=u,H=s;if(s=tn,B.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=H,ae=B,le=ae.tag;if((ae.mode&1)===0&&(le===0||le===11||le===15)){var se=ae.alternate;se?(ae.updateQueue=se.updateQueue,ae.memoizedState=se.memoizedState,ae.lanes=se.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var ge=kg(C);if(ge!==null){ge.flags&=-257,jg(ge,C,B,w,s),ge.mode&1&&wg(w,te,s),s=ge,H=te;var Ne=s.updateQueue;if(Ne===null){var Ee=new Set;Ee.add(H),s.updateQueue=Ee}else Ne.add(H);break e}else{if((s&1)===0){wg(w,te,s),Dd();break e}H=Error(n(426))}}else if(ft&&B.mode&1){var Rt=kg(C);if(Rt!==null){(Rt.flags&65536)===0&&(Rt.flags|=256),jg(Rt,C,B,w,s),Hu(bs(H,B));break e}}w=H=bs(H,B),$t!==4&&($t=2),Oi===null?Oi=[w]:Oi.push(w),w=C;do{switch(w.tag){case 3:w.flags|=65536,s&=-s,w.lanes|=s;var Y=vg(w,H,s);qm(w,Y);break e;case 1:B=H;var W=w.type,J=w.stateNode;if((w.flags&128)===0&&(typeof W.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(uo===null||!uo.has(J)))){w.flags|=65536,s&=-s,w.lanes|=s;var fe=bg(w,B,s);qm(w,fe);break e}}w=w.return}while(w!==null)}ex(u)}catch(Te){s=Te,It===u&&u!==null&&(It=u=u.return);continue}break}while(!0)}function Jg(){var r=yl.current;return yl.current=fl,r===null?fl:r}function Dd(){($t===0||$t===3||$t===2)&&($t=4),qt===null||(Bo&268435455)===0&&(vl&268435455)===0||ho(qt,tn)}function Nl(r,s){var u=Ke;Ke|=2;var f=Jg();(qt!==r||tn!==s)&&(Hr=null,Ho(r,s));do try{Dj();break}catch(y){Qg(r,y)}while(!0);if(Vu(),Ke=u,yl.current=f,It!==null)throw Error(n(261));return qt=null,tn=0,$t}function Dj(){for(;It!==null;)Zg(It)}function Ij(){for(;It!==null&&!ok();)Zg(It)}function Zg(r){var s=rx(r.alternate,r,_n);r.memoizedProps=r.pendingProps,s===null?ex(r):It=s,jd.current=null}function ex(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=Nj(u,s,_n),u!==null){It=u;return}}else{if(u=Cj(u,s),u!==null){u.flags&=32767,It=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{$t=6,It=null;return}}if(s=s.sibling,s!==null){It=s;return}It=s=r}while(s!==null);$t===0&&($t=5)}function Wo(r,s,u){var f=Ze,y=Yn.transition;try{Yn.transition=null,Ze=1,Oj(r,s,u,f)}finally{Yn.transition=y,Ze=f}return null}function Oj(r,s,u,f){do Ss();while(fo!==null);if((Ke&6)!==0)throw Error(n(327));u=r.finishedWork;var y=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(hk(r,w),r===qt&&(It=qt=null,tn=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||wl||(wl=!0,ox(Ta,function(){return Ss(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Yn.transition,Yn.transition=null;var C=Ze;Ze=1;var B=Ke;Ke|=4,jd.current=null,Pj(r,u),Wg(u,r),ej(Du),_a=!!Au,Du=Au=null,r.current=u,Tj(u),sk(),Ke=B,Ze=C,Yn.transition=w}else r.current=u;if(wl&&(wl=!1,fo=r,kl=y),w=r.pendingLanes,w===0&&(uo=null),lk(u.stateNode),jn(r,Tt()),s!==null)for(f=r.onRecoverableError,u=0;u<s.length;u++)y=s[u],f(y.value,{componentStack:y.stack,digest:y.digest});if(bl)throw bl=!1,r=Cd,Cd=null,r;return(kl&1)!==0&&r.tag!==0&&Ss(),w=r.pendingLanes,(w&1)!==0?r===Ed?Li++:(Li=0,Ed=r):Li=0,io(),null}function Ss(){if(fo!==null){var r=Uh(kl),s=Yn.transition,u=Ze;try{if(Yn.transition=null,Ze=16>r?16:r,fo===null)var f=!1;else{if(r=fo,fo=null,kl=0,(Ke&6)!==0)throw Error(n(331));var y=Ke;for(Ke|=4,Se=r.current;Se!==null;){var w=Se,C=w.child;if((Se.flags&16)!==0){var B=w.deletions;if(B!==null){for(var H=0;H<B.length;H++){var te=B[H];for(Se=te;Se!==null;){var ae=Se;switch(ae.tag){case 0:case 11:case 15:Di(8,ae,w)}var le=ae.child;if(le!==null)le.return=ae,Se=le;else for(;Se!==null;){ae=Se;var se=ae.sibling,ge=ae.return;if(Fg(ae),ae===te){Se=null;break}if(se!==null){se.return=ge,Se=se;break}Se=ge}}}var Ne=w.alternate;if(Ne!==null){var Ee=Ne.child;if(Ee!==null){Ne.child=null;do{var Rt=Ee.sibling;Ee.sibling=null,Ee=Rt}while(Ee!==null)}}Se=w}}if((w.subtreeFlags&2064)!==0&&C!==null)C.return=w,Se=C;else e:for(;Se!==null;){if(w=Se,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Di(9,w,w.return)}var Y=w.sibling;if(Y!==null){Y.return=w.return,Se=Y;break e}Se=w.return}}var W=r.current;for(Se=W;Se!==null;){C=Se;var J=C.child;if((C.subtreeFlags&2064)!==0&&J!==null)J.return=C,Se=J;else e:for(C=W;Se!==null;){if(B=Se,(B.flags&2048)!==0)try{switch(B.tag){case 0:case 11:case 15:xl(9,B)}}catch(Te){Nt(B,B.return,Te)}if(B===C){Se=null;break e}var fe=B.sibling;if(fe!==null){fe.return=B.return,Se=fe;break e}Se=B.return}}if(Ke=y,io(),xr&&typeof xr.onPostCommitFiberRoot=="function")try{xr.onPostCommitFiberRoot(Ra,r)}catch{}f=!0}return f}finally{Ze=u,Yn.transition=s}}return!1}function tx(r,s,u){s=bs(u,s),s=vg(r,s,1),r=lo(r,s,1),s=mn(),r!==null&&(si(r,1,s),jn(r,s))}function Nt(r,s,u){if(r.tag===3)tx(r,r,u);else for(;s!==null;){if(s.tag===3){tx(s,r,u);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(uo===null||!uo.has(f))){r=bs(u,r),r=bg(s,r,1),s=lo(s,r,1),r=mn(),s!==null&&(si(s,1,r),jn(s,r));break}}s=s.return}}function Lj(r,s,u){var f=r.pingCache;f!==null&&f.delete(s),s=mn(),r.pingedLanes|=r.suspendedLanes&u,qt===r&&(tn&u)===u&&($t===4||$t===3&&(tn&130023424)===tn&&500>Tt()-Nd?Ho(r,0):Sd|=u),jn(r,s)}function nx(r,s){s===0&&((r.mode&1)===0?s=1:(s=Da,Da<<=1,(Da&130023424)===0&&(Da=4194304)));var u=mn();r=zr(r,s),r!==null&&(si(r,s,u),jn(r,u))}function _j(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),nx(r,u)}function Mj(r,s){var u=0;switch(r.tag){case 13:var f=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),nx(r,u)}var rx;rx=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||vn.current)wn=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return wn=!1,Sj(r,s,u);wn=(r.flags&131072)!==0}else wn=!1,ft&&(s.flags&1048576)!==0&&_m(s,el,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;ml(r,s),r=s.pendingProps;var y=fs(s,ln.current);ys(s,u),y=nd(null,s,f,r,y,u);var w=rd();return s.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,bn(f)?(w=!0,Qa(s)):w=!1,s.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Yu(s),y.updater=pl,s.stateNode=y,y._reactInternals=s,cd(s,f,r,u),s=pd(null,s,f,!0,w,u)):(s.tag=0,ft&&w&&Fu(s),hn(null,s,y,u),s=s.child),s;case 16:f=s.elementType;e:{switch(ml(r,s),r=s.pendingProps,y=f._init,f=y(f._payload),s.type=f,y=s.tag=Fj(f),r=sr(f,r),y){case 0:s=fd(null,s,f,r,u);break e;case 1:s=Tg(null,s,f,r,u);break e;case 11:s=Sg(null,s,f,r,u);break e;case 14:s=Ng(null,s,f,sr(f.type,r),u);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:sr(f,y),fd(r,s,f,y,u);case 1:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:sr(f,y),Tg(r,s,f,y,u);case 3:e:{if(Rg(s),r===null)throw Error(n(387));f=s.pendingProps,w=s.memoizedState,y=w.element,Vm(r,s),il(s,f,null,u);var C=s.memoizedState;if(f=C.element,w.isDehydrated)if(w={element:f,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){y=bs(Error(n(423)),s),s=Ag(r,s,f,u,y);break e}else if(f!==y){y=bs(Error(n(424)),s),s=Ag(r,s,f,u,y);break e}else for(Ln=ro(s.stateNode.containerInfo.firstChild),On=s,ft=!0,or=null,u=Hm(s,null,f,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ms(),f===y){s=Ur(r,s,u);break e}hn(r,s,f,u)}s=s.child}return s;case 5:return Gm(s),r===null&&Uu(s),f=s.type,y=s.pendingProps,w=r!==null?r.memoizedProps:null,C=y.children,Iu(f,y)?C=null:w!==null&&Iu(f,w)&&(s.flags|=32),Pg(r,s),hn(r,s,C,u),s.child;case 6:return r===null&&Uu(s),null;case 13:return Dg(r,s,u);case 4:return Xu(s,s.stateNode.containerInfo),f=s.pendingProps,r===null?s.child=gs(s,null,f,u):hn(r,s,f,u),s.child;case 11:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:sr(f,y),Sg(r,s,f,y,u);case 7:return hn(r,s,s.pendingProps,u),s.child;case 8:return hn(r,s,s.pendingProps.children,u),s.child;case 12:return hn(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(f=s.type._context,y=s.pendingProps,w=s.memoizedProps,C=y.value,ot(rl,f._currentValue),f._currentValue=C,w!==null)if(rr(w.value,C)){if(w.children===y.children&&!vn.current){s=Ur(r,s,u);break e}}else for(w=s.child,w!==null&&(w.return=s);w!==null;){var B=w.dependencies;if(B!==null){C=w.child;for(var H=B.firstContext;H!==null;){if(H.context===f){if(w.tag===1){H=Br(-1,u&-u),H.tag=2;var te=w.updateQueue;if(te!==null){te=te.shared;var ae=te.pending;ae===null?H.next=H:(H.next=ae.next,ae.next=H),te.pending=H}}w.lanes|=u,H=w.alternate,H!==null&&(H.lanes|=u),Ku(w.return,u,s),B.lanes|=u;break}H=H.next}}else if(w.tag===10)C=w.type===s.type?null:w.child;else if(w.tag===18){if(C=w.return,C===null)throw Error(n(341));C.lanes|=u,B=C.alternate,B!==null&&(B.lanes|=u),Ku(C,u,s),C=w.sibling}else C=w.child;if(C!==null)C.return=w;else for(C=w;C!==null;){if(C===s){C=null;break}if(w=C.sibling,w!==null){w.return=C.return,C=w;break}C=C.return}w=C}hn(r,s,y.children,u),s=s.child}return s;case 9:return y=s.type,f=s.pendingProps.children,ys(s,u),y=Kn(y),f=f(y),s.flags|=1,hn(r,s,f,u),s.child;case 14:return f=s.type,y=sr(f,s.pendingProps),y=sr(f.type,y),Ng(r,s,f,y,u);case 15:return Cg(r,s,s.type,s.pendingProps,u);case 17:return f=s.type,y=s.pendingProps,y=s.elementType===f?y:sr(f,y),ml(r,s),s.tag=1,bn(f)?(r=!0,Qa(s)):r=!1,ys(s,u),xg(s,f,y),cd(s,f,y,u),pd(null,s,f,!0,r,u);case 19:return Og(r,s,u);case 22:return Eg(r,s,u)}throw Error(n(156,s.tag))};function ox(r,s){return Mh(r,s)}function $j(r,s,u,f){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=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(r,s,u,f){return new $j(r,s,u,f)}function Id(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Fj(r){if(typeof r=="function")return Id(r)?1:0;if(r!=null){if(r=r.$$typeof,r===G)return 11;if(r===M)return 14}return 2}function mo(r,s){var u=r.alternate;return u===null?(u=Xn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,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,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Cl(r,s,u,f,y,w){var C=2;if(f=r,typeof r=="function")Id(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case F:return Vo(u.children,y,w,s);case _:C=8,y|=8;break;case Q:return r=Xn(12,u,s,y|2),r.elementType=Q,r.lanes=w,r;case K:return r=Xn(13,u,s,y),r.elementType=K,r.lanes=w,r;case Z:return r=Xn(19,u,s,y),r.elementType=Z,r.lanes=w,r;case D:return El(u,y,w,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case re:C=10;break e;case U:C=9;break e;case G:C=11;break e;case M:C=14;break e;case I:C=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=Xn(C,u,s,y),s.elementType=r,s.type=f,s.lanes=w,s}function Vo(r,s,u,f){return r=Xn(7,r,f,s),r.lanes=u,r}function El(r,s,u,f){return r=Xn(22,r,f,s),r.elementType=D,r.lanes=u,r.stateNode={isHidden:!1},r}function Od(r,s,u){return r=Xn(6,r,null,s),r.lanes=u,r}function Ld(r,s,u){return s=Xn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function zj(r,s,u,f,y){this.tag=s,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=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function _d(r,s,u,f,y,w,C,B,H){return r=new zj(r,s,u,B,H),s===1?(s=1,w===!0&&(s|=8)):s=0,w=Xn(3,null,null,s),r.current=w,w.stateNode=r,w.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yu(w),r}function Bj(r,s,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:f==null?null:""+f,children:r,containerInfo:s,implementation:u}}function sx(r){if(!r)return so;r=r._reactInternals;e:{if(Io(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(bn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(bn(u))return Im(r,u,s)}return s}function ix(r,s,u,f,y,w,C,B,H){return r=_d(u,f,!0,r,y,w,C,B,H),r.context=sx(null),u=r.current,f=mn(),y=po(u),w=Br(f,y),w.callback=s??null,lo(u,w,y),r.current.lanes=y,si(r,y,f),jn(r,f),r}function Pl(r,s,u,f){var y=s.current,w=mn(),C=po(y);return u=sx(u),s.context===null?s.context=u:s.pendingContext=u,s=Br(w,C),s.payload={element:r},f=f===void 0?null:f,f!==null&&(s.callback=f),r=lo(y,s,C),r!==null&&(lr(r,y,C,w),sl(r,y,C)),C}function Tl(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 ax(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function Md(r,s){ax(r,s),(r=r.alternate)&&ax(r,s)}function Uj(){return null}var lx=typeof reportError=="function"?reportError:function(r){console.error(r)};function $d(r){this._internalRoot=r}Rl.prototype.render=$d.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Pl(r,s,null,null)},Rl.prototype.unmount=$d.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Uo(function(){Pl(null,r,null,null)}),s[_r]=null}};function Rl(r){this._internalRoot=r}Rl.prototype.unstable_scheduleHydration=function(r){if(r){var s=Vh();r={blockedOn:null,target:r,priority:s};for(var u=0;u<eo.length&&s!==0&&s<eo[u].priority;u++);eo.splice(u,0,r),u===0&&Gh(r)}};function Fd(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Al(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function cx(){}function Hj(r,s,u,f,y){if(y){if(typeof f=="function"){var w=f;f=function(){var te=Tl(C);w.call(te)}}var C=ix(s,f,r,0,null,!1,!1,"",cx);return r._reactRootContainer=C,r[_r]=C.current,vi(r.nodeType===8?r.parentNode:r),Uo(),C}for(;y=r.lastChild;)r.removeChild(y);if(typeof f=="function"){var B=f;f=function(){var te=Tl(H);B.call(te)}}var H=_d(r,0,!1,null,null,!1,!1,"",cx);return r._reactRootContainer=H,r[_r]=H.current,vi(r.nodeType===8?r.parentNode:r),Uo(function(){Pl(s,H,u,f)}),H}function Dl(r,s,u,f,y){var w=u._reactRootContainer;if(w){var C=w;if(typeof y=="function"){var B=y;y=function(){var H=Tl(C);B.call(H)}}Pl(s,C,r,y)}else C=Hj(u,s,r,y,f);return Tl(C)}Hh=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=oi(s.pendingLanes);u!==0&&(cu(s,u|1),jn(s,Tt()),(Ke&6)===0&&(js=Tt()+500,io()))}break;case 13:Uo(function(){var f=zr(r,1);if(f!==null){var y=mn();lr(f,r,1,y)}}),Md(r,1)}},uu=function(r){if(r.tag===13){var s=zr(r,134217728);if(s!==null){var u=mn();lr(s,r,134217728,u)}Md(r,134217728)}},Wh=function(r){if(r.tag===13){var s=po(r),u=zr(r,s);if(u!==null){var f=mn();lr(u,r,s,f)}Md(r,s)}},Vh=function(){return Ze},qh=function(r,s){var u=Ze;try{return Ze=r,s()}finally{Ze=u}},on=function(r,s,u){switch(s){case"input":if(lt(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var f=u[s];if(f!==r&&f.form===r.form){var y=Ya(f);if(!y)throw Error(n(90));nt(f),lt(f,y)}}}break;case"textarea":Qt(r,u);break;case"select":s=u.value,s!=null&&jt(r,!!u.multiple,s,!1)}},Zt=Rd,sn=Uo;var Wj={usingClientEntryPoint:!1,Events:[ki,us,Ya,Pt,Wt,Rd]},_i={findFiberByHostInstance:Oo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Vj={bundleType:_i.bundleType,version:_i.version,rendererPackageName:_i.rendererPackageName,rendererConfig:_i.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=Lh(r),r===null?null:r.stateNode},findFiberByHostInstance:_i.findFiberByHostInstance||Uj,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 Il=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Il.isDisabled&&Il.supportsFiber)try{Ra=Il.inject(Vj),xr=Il}catch{}}return Sn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wj,Sn.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fd(s))throw Error(n(200));return Bj(r,s,null,u)},Sn.createRoot=function(r,s){if(!Fd(r))throw Error(n(299));var u=!1,f="",y=lx;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(y=s.onRecoverableError)),s=_d(r,1,!1,null,null,u,!1,f,y),r[_r]=s.current,vi(r.nodeType===8?r.parentNode:r),new $d(s)},Sn.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Lh(s),r=r===null?null:r.stateNode,r},Sn.flushSync=function(r){return Uo(r)},Sn.hydrate=function(r,s,u){if(!Al(s))throw Error(n(200));return Dl(null,r,s,!0,u)},Sn.hydrateRoot=function(r,s,u){if(!Fd(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,y=!1,w="",C=lx;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(C=u.onRecoverableError)),s=ix(s,null,r,1,u??null,y,!1,w,C),r[_r]=s.current,vi(r),f)for(r=0;r<f.length;r++)u=f[r],y=u._getVersion,y=y(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,y]:s.mutableSourceEagerHydrationData.push(u,y);return new Rl(s)},Sn.render=function(r,s,u){if(!Al(s))throw Error(n(200));return Dl(null,r,s,!1,u)},Sn.unmountComponentAtNode=function(r){if(!Al(r))throw Error(n(40));return r._reactRootContainer?(Uo(function(){Dl(null,null,r,!1,function(){r._reactRootContainer=null,r[_r]=null})}),!0):!1},Sn.unstable_batchedUpdates=Rd,Sn.unstable_renderSubtreeIntoContainer=function(r,s,u,f){if(!Al(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Dl(r,s,u,!1,f)},Sn.version="18.3.1-next-f1338f8080-20240426",Sn}var xx;function Pv(){if(xx)return Ud.exports;xx=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(),Ud.exports=Zj(),Ud.exports}var yx;function eS(){if(yx)return Ol;yx=1;var e=Pv();return Ol.createRoot=e.createRoot,Ol.hydrateRoot=e.hydrateRoot,Ol}var tS=eS();/**
|
|
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 vx="popstate";function bx(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nS(e={}){function t(o,i){var m;let l=(m=i.state)==null?void 0:m.masked,{pathname:c,search:d,hash:p}=l||o.location;return Lf("",{pathname:c,search:d,hash:p},i.state&&i.state.usr||null,i.state&&i.state.key||"default",l?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function n(o,i){return typeof i=="string"?i:ia(i)}return oS(t,n,null,e)}function wt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ur(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rS(){return Math.random().toString(36).substring(2,10)}function wx(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 Lf(e,t,n=null,o,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ws(t):t,state:n,key:t&&t.key||o||rS(),unstable_mask:i}}function ia({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 Ws(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let o=e.indexOf("?");o>=0&&(t.search=e.substring(o),e=e.substring(0,o)),e&&(t.pathname=e)}return t}function oS(e,t,n,o={}){let{window:i=document.defaultView,v5Compat:l=!1}=o,c=i.history,d="POP",p=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,p&&p({action:d,location:k.location,delta:S})}function v(j,S){d="PUSH";let R=bx(j)?j:Lf(k.location,j,S);m=h()+1;let E=wx(R,m),A=k.createHref(R.unstable_mask||R);try{c.pushState(E,"",A)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;i.location.assign(A)}l&&p&&p({action:d,location:k.location,delta:1})}function b(j,S){d="REPLACE";let R=bx(j)?j:Lf(k.location,j,S);m=h();let E=wx(R,m),A=k.createHref(R.unstable_mask||R);c.replaceState(E,"",A),l&&p&&p({action:d,location:k.location,delta:0})}function N(j){return sS(j)}let k={get action(){return d},get location(){return e(i,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return i.addEventListener(vx,x),p=j,()=>{i.removeEventListener(vx,x),p=null}},createHref(j){return t(i,j)},createURL:N,encodeLocation(j){let S=N(j);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:b,go(j){return c.go(j)}};return k}function sS(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),wt(n,"No window.location.(origin|href) available to create URL");let o=typeof e=="string"?e:ia(e);return o=o.replace(/ $/,"%20"),!t&&o.startsWith("//")&&(o=n+o),new URL(o,n)}function Tv(e,t,n="/"){return iS(e,t,n,!1)}function iS(e,t,n,o){let i=typeof t=="string"?Ws(t):t,l=qr(i.pathname||"/",n);if(l==null)return null;let c=Rv(e);aS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=yS(l);d=gS(c[p],m,o)}return d}function Rv(e,t=[],n=[],o="",i=!1){let l=(c,d,p=i,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(o)&&p)return;wt(h.relativePath.startsWith(o),`Absolute route path "${h.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(o.length)}let x=Cr([o,h.relativePath]),v=n.concat(h);c.children&&c.children.length>0&&(wt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),Rv(c.children,t,v,x,p)),!(c.path==null&&!c.index)&&t.push({path:x,score:hS(x,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))l(c,d);else for(let m of Av(c.path))l(c,d,!0,m)}),t}function Av(e){let t=e.split("/");if(t.length===0)return[];let[n,...o]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(o.length===0)return i?[l,""]:[l];let c=Av(o.join("/")),d=[];return d.push(...c.map(p=>p===""?l:[l,p].join("/"))),i&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function aS(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mS(t.routesMeta.map(o=>o.childrenIndex),n.routesMeta.map(o=>o.childrenIndex)))}var lS=/^:[\w-]+$/,cS=3,uS=2,dS=1,fS=10,pS=-2,kx=e=>e==="*";function hS(e,t){let n=e.split("/"),o=n.length;return n.some(kx)&&(o+=pS),t&&(o+=uS),n.filter(i=>!kx(i)).reduce((i,l)=>i+(lS.test(l)?cS:l===""?dS:fS),o)}function mS(e,t){return e.length===t.length&&e.slice(0,-1).every((o,i)=>o===t[i])?e[e.length-1]-t[t.length-1]:0}function gS(e,t,n=!1){let{routesMeta:o}=e,i={},l="/",c=[];for(let d=0;d<o.length;++d){let p=o[d],m=d===o.length-1,h=l==="/"?t:t.slice(l.length)||"/",x=ic({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},h),v=p.route;if(!x&&m&&n&&!o[o.length-1].route.index&&(x=ic({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},h)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:Cr([l,x.pathname]),pathnameBase:kS(Cr([l,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(l=Cr([l,x.pathnameBase]))}return c}function ic(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,o]=xS(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],c=l.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:o.reduce((m,{paramName:h,isOptional:x},v)=>{if(h==="*"){let N=d[v]||"";c=l.slice(0,l.length-N.length).replace(/(.)\/+$/,"$1")}const b=d[v];return x&&!b?m[h]=void 0:m[h]=(b||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:c,pattern:e}}function xS(e,t=!1,n=!0){ur(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 o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p,m,h)=>{if(o.push({paramName:d,isOptional:p!=null}),p){let x=h.charAt(m+c.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function yS(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ur(!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 qr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,o=e.charAt(n);return o&&o!=="/"?null:e.slice(n)||"/"}var vS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function bS(e,t="/"){let{pathname:n,search:o="",hash:i=""}=typeof e=="string"?Ws(e):e,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=jx(n.substring(1),"/"):l=jx(n,t)):l=t,{pathname:l,search:jS(o),hash:SS(i)}}function jx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Vd(e,t,n,o){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(o)}]. 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 wS(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Dv(e){let t=wS(e);return t.map((n,o)=>o===t.length-1?n.pathname:n.pathnameBase)}function yp(e,t,n,o=!1){let i;typeof e=="string"?i=Ws(e):(i={...e},wt(!i.pathname||!i.pathname.includes("?"),Vd("?","pathname","search",i)),wt(!i.pathname||!i.pathname.includes("#"),Vd("#","pathname","hash",i)),wt(!i.search||!i.search.includes("#"),Vd("#","search","hash",i)));let l=e===""||i.pathname==="",c=l?"/":i.pathname,d;if(c==null)d=n;else{let x=t.length-1;if(!o&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),x-=1;i.pathname=v.join("/")}d=x>=0?t[x]:"/"}let p=bS(i,d),m=c&&c!=="/"&&c.endsWith("/"),h=(l||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(m||h)&&(p.pathname+="/"),p}var Cr=e=>e.join("/").replace(/\/\/+/g,"/"),kS=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jS=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,SS=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,NS=class{constructor(e,t,n,o=!1){this.status=e,this.statusText=t||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function CS(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ES(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Iv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ov(e,t){let n=e;if(typeof n!="string"||!vS.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let o=n,i=!1;if(Iv)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=qr(c.pathname,t);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:i=!0}catch{ur(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Lv=["POST","PUT","PATCH","DELETE"];new Set(Lv);var PS=["GET",...Lv];new Set(PS);var Vs=g.createContext(null);Vs.displayName="DataRouter";var Sc=g.createContext(null);Sc.displayName="DataRouterState";var TS=g.createContext(!1),_v=g.createContext({isTransitioning:!1});_v.displayName="ViewTransition";var RS=g.createContext(new Map);RS.displayName="Fetchers";var AS=g.createContext(null);AS.displayName="Await";var Zn=g.createContext(null);Zn.displayName="Navigation";var pa=g.createContext(null);pa.displayName="Location";var hr=g.createContext({outlet:null,matches:[],isDataRoute:!1});hr.displayName="Route";var vp=g.createContext(null);vp.displayName="RouteError";var Mv="REACT_ROUTER_ERROR",DS="REDIRECT",IS="ROUTE_ERROR_RESPONSE";function OS(e){if(e.startsWith(`${Mv}:${DS}:{`))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 LS(e){if(e.startsWith(`${Mv}:${IS}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new NS(t.status,t.statusText,t.data)}catch{}}function _S(e,{relative:t}={}){wt(ha(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:o}=g.useContext(Zn),{hash:i,pathname:l,search:c}=ma(e,{relative:t}),d=l;return n!=="/"&&(d=l==="/"?n:Cr([n,l])),o.createHref({pathname:d,search:c,hash:i})}function ha(){return g.useContext(pa)!=null}function gn(){return wt(ha(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(pa).location}var $v="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fv(e){g.useContext(Zn).static||g.useLayoutEffect(e)}function Ut(){let{isDataRoute:e}=g.useContext(hr);return e?QS():MS()}function MS(){wt(ha(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(Vs),{basename:t,navigator:n}=g.useContext(Zn),{matches:o}=g.useContext(hr),{pathname:i}=gn(),l=JSON.stringify(Dv(o)),c=g.useRef(!1);return Fv(()=>{c.current=!0}),g.useCallback((p,m={})=>{if(ur(c.current,$v),!c.current)return;if(typeof p=="number"){n.go(p);return}let h=yp(p,JSON.parse(l),i,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Cr([t,h.pathname])),(m.replace?n.replace:n.push)(h,m.state,m)},[t,n,l,i,e])}var $S=g.createContext(null);function FS(e){let t=g.useContext(hr).outlet;return g.useMemo(()=>t&&g.createElement($S.Provider,{value:e},t),[t,e])}function At(){let{matches:e}=g.useContext(hr),t=e[e.length-1];return t?t.params:{}}function ma(e,{relative:t}={}){let{matches:n}=g.useContext(hr),{pathname:o}=gn(),i=JSON.stringify(Dv(n));return g.useMemo(()=>yp(e,JSON.parse(i),o,t==="path"),[e,i,o,t])}function zS(e,t){return zv(e,t)}function zv(e,t,n){var j;wt(ha(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Zn),{matches:i}=g.useContext(hr),l=i[i.length-1],c=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",m=l&&l.route;{let S=m&&m.path||"";Uv(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=gn(),x;if(t){let S=typeof t=="string"?Ws(t):t;wt(p==="/"||((j=S.pathname)==null?void 0:j.startsWith(p)),`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 "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),x=S}else x=h;let v=x.pathname||"/",b=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");b="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let N=Tv(e,{pathname:b});ur(m||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),ur(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.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=VS(N&&N.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Cr([p,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:Cr([p,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,n);return t&&k?g.createElement(pa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},k):k}function BS(){let e=XS(),t=CS(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:o},l={padding:"2px 4px",backgroundColor:o},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:i},n):null,c)}var US=g.createElement(BS,null),Bv=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=LS(e.digest);n&&(e=n)}let t=e!==void 0?g.createElement(hr.Provider,{value:this.props.routeContext},g.createElement(vp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(HS,{error:e},t):t}};Bv.contextType=TS;var qd=new WeakMap;function HS({children:e,error:t}){let{basename:n}=g.useContext(Zn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=OS(t.digest);if(o){let i=qd.get(t);if(i)throw i;let l=Ov(o.location,n);if(Iv&&!qd.get(t))if(l.isExternal||o.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:o.replace}));throw qd.set(t,c),c}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function WS({routeContext:e,match:t,children:n}){let o=g.useContext(Vs);return o&&o.static&&o.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(hr.Provider,{value:e},n)}function VS(e,t=[],n){let o=n==null?void 0:n.state;if(e==null){if(!o)return null;if(o.errors)e=o.matches;else if(t.length===0&&!o.initialized&&o.matches.length>0)e=o.matches;else return null}let i=e,l=o==null?void 0:o.errors;if(l!=null){let h=i.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);wt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,h+1))}let c=!1,d=-1;if(n&&o){c=o.renderFallback;for(let h=0;h<i.length;h++){let x=i[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(d=h),x.route.id){let{loaderData:v,errors:b}=o,N=x.route.loader&&!v.hasOwnProperty(x.route.id)&&(!b||b[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(c=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let p=n==null?void 0:n.onError,m=o&&p?(h,x)=>{var v,b;p(h,{location:o.location,params:((b=(v=o.matches)==null?void 0:v[0])==null?void 0:b.params)??{},unstable_pattern:ES(o.matches),errorInfo:x})}:void 0;return i.reduceRight((h,x,v)=>{let b,N=!1,k=null,j=null;o&&(b=l&&x.route.id?l[x.route.id]:void 0,k=x.route.errorElement||US,c&&(d<0&&v===0?(Uv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,j=null):d===v&&(N=!0,j=x.route.hydrateFallbackElement||null)));let S=t.concat(i.slice(0,v+1)),R=()=>{let E;return b?E=k:N?E=j:x.route.Component?E=g.createElement(x.route.Component,null):x.route.element?E=x.route.element:E=h,g.createElement(WS,{match:x,routeContext:{outlet:h,matches:S,isDataRoute:o!=null},children:E})};return o&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?g.createElement(Bv,{location:o.location,revalidation:o.revalidation,component:k,error:b,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:m}):R()},null)}function bp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qS(e){let t=g.useContext(Vs);return wt(t,bp(e)),t}function KS(e){let t=g.useContext(Sc);return wt(t,bp(e)),t}function GS(e){let t=g.useContext(hr);return wt(t,bp(e)),t}function wp(e){let t=GS(e),n=t.matches[t.matches.length-1];return wt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function YS(){return wp("useRouteId")}function XS(){var o;let e=g.useContext(vp),t=KS("useRouteError"),n=wp("useRouteError");return e!==void 0?e:(o=t.errors)==null?void 0:o[n]}function QS(){let{router:e}=qS("useNavigate"),t=wp("useNavigate"),n=g.useRef(!1);return Fv(()=>{n.current=!0}),g.useCallback(async(i,l={})=>{ur(n.current,$v),n.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...l}))},[e,t])}var Sx={};function Uv(e,t,n){!t&&!Sx[e]&&(Sx[e]=!0,ur(!1,n))}g.memo(JS);function JS({routes:e,future:t,state:n,isStatic:o,onError:i}){return zv(e,void 0,{state:n,isStatic:o,onError:i})}function ZS(e){return FS(e.context)}function Le(e){wt(!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 eN({basename:e="/",children:t=null,location:n,navigationType:o="POP",navigator:i,static:l=!1,unstable_useTransitions:c}){wt(!ha(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=g.useMemo(()=>({basename:d,navigator:i,static:l,unstable_useTransitions:c,future:{}}),[d,i,l,c]);typeof n=="string"&&(n=Ws(n));let{pathname:m="/",search:h="",hash:x="",state:v=null,key:b="default",unstable_mask:N}=n,k=g.useMemo(()=>{let j=qr(m,d);return j==null?null:{location:{pathname:j,search:h,hash:x,state:v,key:b,unstable_mask:N},navigationType:o}},[d,m,h,x,v,b,o,N]);return ur(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(Zn.Provider,{value:p},g.createElement(pa.Provider,{children:t,value:k}))}function tN({children:e,location:t}){return zS(_f(e),t)}function _f(e,t=[]){let n=[];return g.Children.forEach(e,(o,i)=>{if(!g.isValidElement(o))return;let l=[...t,i];if(o.type===g.Fragment){n.push.apply(n,_f(o.props.children,l));return}wt(o.type===Le,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),wt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let c={id:o.props.id||l.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(c.children=_f(o.props.children,l)),n.push(c)}),n}var Yl="get",Xl="application/x-www-form-urlencoded";function Nc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function nN(e){return Nc(e)&&e.tagName.toLowerCase()==="button"}function rN(e){return Nc(e)&&e.tagName.toLowerCase()==="form"}function oN(e){return Nc(e)&&e.tagName.toLowerCase()==="input"}function sN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function iN(e,t){return e.button===0&&(!t||t==="_self")&&!sN(e)}function Mf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let o=e[n];return t.concat(Array.isArray(o)?o.map(i=>[n,i]):[[n,o]])},[]))}function aN(e,t){let n=Mf(e);return t&&t.forEach((o,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}var Ll=null;function lN(){if(Ll===null)try{new FormData(document.createElement("form"),0),Ll=!1}catch{Ll=!0}return Ll}var cN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kd(e){return e!=null&&!cN.has(e)?(ur(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Xl}"`),null):e}function uN(e,t){let n,o,i,l,c;if(rN(e)){let d=e.getAttribute("action");o=d?qr(d,t):null,n=e.getAttribute("method")||Yl,i=Kd(e.getAttribute("enctype"))||Xl,l=new FormData(e)}else if(nN(e)||oN(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 p=e.getAttribute("formaction")||d.getAttribute("action");if(o=p?qr(p,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Yl,i=Kd(e.getAttribute("formenctype"))||Kd(d.getAttribute("enctype"))||Xl,l=new FormData(d,e),!lN()){let{name:m,type:h,value:x}=e;if(h==="image"){let v=m?`${m}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else m&&l.append(m,x)}}else{if(Nc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Yl,o=null,i=Xl,c=e}return l&&i==="text/plain"&&(c=l,l=void 0),{action:o,method:n.toLowerCase(),encType:i,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function kp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function dN(e,t,n,o){let i=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${o}`:i.pathname=`${i.pathname}.${o}`:i.pathname==="/"?i.pathname=`_root.${o}`:t&&qr(i.pathname,t)==="/"?i.pathname=`${t.replace(/\/$/,"")}/_root.${o}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${o}`,i}async function fN(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 pN(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 o=await Promise.all(e.map(async i=>{let l=t.routes[i.route.id];if(l){let c=await fN(l,n);return c.links?c.links():[]}return[]}));return yN(o.flat(1).filter(pN).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Nx(e,t,n,o,i,l){let c=(p,m)=>n[m]?p.route.id!==n[m].route.id:!0,d=(p,m)=>{var h;return n[m].pathname!==p.pathname||((h=n[m].route.path)==null?void 0:h.endsWith("*"))&&n[m].params["*"]!==p.params["*"]};return l==="assets"?t.filter((p,m)=>c(p,m)||d(p,m)):l==="data"?t.filter((p,m)=>{var x;let h=o.routes[p.route.id];if(!h||!h.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let v=p.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function mN(e,t,{includeHydrateFallback:n}={}){return gN(e.map(o=>{let i=t.routes[o.route.id];if(!i)return[];let l=[i.module];return i.clientActionModule&&(l=l.concat(i.clientActionModule)),i.clientLoaderModule&&(l=l.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(l=l.concat(i.hydrateFallbackModule)),i.imports&&(l=l.concat(i.imports)),l}).flat(1))}function gN(e){return[...new Set(e)]}function xN(e){let t={},n=Object.keys(e).sort();for(let o of n)t[o]=e[o];return t}function yN(e,t){let n=new Set;return new Set(t),e.reduce((o,i)=>{let l=JSON.stringify(xN(i));return n.has(l)||(n.add(l),o.push({key:l,link:i})),o},[])}function Hv(){let e=g.useContext(Vs);return kp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vN(){let e=g.useContext(Sc);return kp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jp=g.createContext(void 0);jp.displayName="FrameworkContext";function Wv(){let e=g.useContext(jp);return kp(e,"You must render this element inside a <HydratedRouter> element"),e}function bN(e,t){let n=g.useContext(jp),[o,i]=g.useState(!1),[l,c]=g.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:h,onTouchStart:x}=t,v=g.useRef(null);g.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=S=>{S.forEach(R=>{c(R.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return v.current&&j.observe(v.current),()=>{j.disconnect()}}},[e]),g.useEffect(()=>{if(o){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[o]);let b=()=>{i(!0)},N=()=>{i(!1),c(!1)};return n?e!=="intent"?[l,v,{}]:[l,v,{onFocus:$i(d,b),onBlur:$i(p,N),onMouseEnter:$i(m,b),onMouseLeave:$i(h,N),onTouchStart:$i(x,b)}]:[!1,v,{}]}function $i(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function wN({page:e,...t}){let{router:n}=Hv(),o=g.useMemo(()=>Tv(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?g.createElement(jN,{page:e,matches:o,...t}):null}function kN(e){let{manifest:t,routeModules:n}=Wv(),[o,i]=g.useState([]);return g.useEffect(()=>{let l=!1;return hN(e,t,n).then(c=>{l||i(c)}),()=>{l=!0}},[e,t,n]),o}function jN({page:e,matches:t,...n}){let o=gn(),{future:i,manifest:l,routeModules:c}=Wv(),{basename:d}=Hv(),{loaderData:p,matches:m}=vN(),h=g.useMemo(()=>Nx(e,t,m,l,o,"data"),[e,t,m,l,o]),x=g.useMemo(()=>Nx(e,t,m,l,o,"assets"),[e,t,m,l,o]),v=g.useMemo(()=>{if(e===o.pathname+o.search+o.hash)return[];let k=new Set,j=!1;if(t.forEach(R=>{var A;let E=l.routes[R.route.id];!E||!E.hasLoader||(!h.some(L=>L.route.id===R.route.id)&&R.route.id in p&&((A=c[R.route.id])!=null&&A.shouldRevalidate)||E.hasClientLoader?j=!0:k.add(R.route.id))}),k.size===0)return[];let S=dN(e,d,i.unstable_trailingSlashAwareDataRequests,"data");return j&&k.size>0&&S.searchParams.set("_routes",t.filter(R=>k.has(R.route.id)).map(R=>R.route.id).join(",")),[S.pathname+S.search]},[d,i.unstable_trailingSlashAwareDataRequests,p,o,l,h,t,e,c]),b=g.useMemo(()=>mN(x,l),[x,l]),N=kN(x);return g.createElement(g.Fragment,null,v.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})),N.map(({key:k,link:j})=>g.createElement("link",{key:k,nonce:n.nonce,...j,crossOrigin:j.crossOrigin??n.crossOrigin})))}function SN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var NN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{NN&&(window.__reactRouterVersion="7.13.1")}catch{}function CN({basename:e,children:t,unstable_useTransitions:n,window:o}){let i=g.useRef();i.current==null&&(i.current=nS({window:o,v5Compat:!0}));let l=i.current,[c,d]=g.useState({action:l.action,location:l.location}),p=g.useCallback(m=>{n===!1?d(m):g.startTransition(()=>d(m))},[n]);return g.useLayoutEffect(()=>l.listen(p),[l,p]),g.createElement(eN,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var Vv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Re=g.forwardRef(function({onClick:t,discover:n="render",prefetch:o="none",relative:i,reloadDocument:l,replace:c,unstable_mask:d,state:p,target:m,to:h,preventScrollReset:x,viewTransition:v,unstable_defaultShouldRevalidate:b,...N},k){let{basename:j,navigator:S,unstable_useTransitions:R}=g.useContext(Zn),E=typeof h=="string"&&Vv.test(h),A=Ov(h,j);h=A.to;let L=_S(h,{relative:i}),P=gn(),F=null;if(d){let M=yp(d,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);j!=="/"&&(M.pathname=M.pathname==="/"?j:Cr([j,M.pathname])),F=S.createHref(M)}let[_,Q,re]=bN(o,N),U=RN(h,{replace:c,unstable_mask:d,state:p,target:m,preventScrollReset:x,relative:i,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:R});function G(M){t&&t(M),M.defaultPrevented||U(M)}let K=!(A.isExternal||l),Z=g.createElement("a",{...N,...re,href:(K?F:void 0)||A.absoluteURL||L,onClick:K?G:t,ref:SN(k,Q),target:m,"data-discover":!E&&n==="render"?"true":void 0});return _&&!E?g.createElement(g.Fragment,null,Z,g.createElement(wN,{page:L})):Z});Re.displayName="Link";var EN=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:o="",end:i=!1,style:l,to:c,viewTransition:d,children:p,...m},h){let x=ma(c,{relative:m.relative}),v=gn(),b=g.useContext(Sc),{navigator:N,basename:k}=g.useContext(Zn),j=b!=null&&LN(x)&&d===!0,S=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,R=v.pathname,E=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(R=R.toLowerCase(),E=E?E.toLowerCase():null,S=S.toLowerCase()),E&&k&&(E=qr(E,k)||E);const A=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let L=R===S||!i&&R.startsWith(S)&&R.charAt(A)==="/",P=E!=null&&(E===S||!i&&E.startsWith(S)&&E.charAt(S.length)==="/"),F={isActive:L,isPending:P,isTransitioning:j},_=L?t:void 0,Q;typeof o=="function"?Q=o(F):Q=[o,L?"active":null,P?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let re=typeof l=="function"?l(F):l;return g.createElement(Re,{...m,"aria-current":_,className:Q,ref:h,style:re,to:c,viewTransition:d},typeof p=="function"?p(F):p)});EN.displayName="NavLink";var PN=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:o,replace:i,state:l,method:c=Yl,action:d,onSubmit:p,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v,...b},N)=>{let{unstable_useTransitions:k}=g.useContext(Zn),j=IN(),S=ON(d,{relative:m}),R=c.toLowerCase()==="get"?"get":"post",E=typeof d=="string"&&Vv.test(d),A=L=>{if(p&&p(L),L.defaultPrevented)return;L.preventDefault();let P=L.nativeEvent.submitter,F=(P==null?void 0:P.getAttribute("formmethod"))||c,_=()=>j(P||L.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:i,state:l,relative:m,preventScrollReset:h,viewTransition:x,unstable_defaultShouldRevalidate:v});k&&n!==!1?g.startTransition(()=>_()):_()};return g.createElement("form",{ref:N,method:R,action:S,onSubmit:o?p:A,...b,"data-discover":!E&&e==="render"?"true":void 0})});PN.displayName="Form";function TN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qv(e){let t=g.useContext(Vs);return wt(t,TN(e)),t}function RN(e,{target:t,replace:n,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m}={}){let h=Ut(),x=gn(),v=ma(e,{relative:c});return g.useCallback(b=>{if(iN(b,t)){b.preventDefault();let N=n!==void 0?n:ia(x)===ia(v),k=()=>h(e,{replace:N,unstable_mask:o,state:i,preventScrollReset:l,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});m?g.startTransition(()=>k()):k()}},[x,h,v,n,o,i,t,e,l,c,d,p,m])}function Po(e){ur(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(Mf(e)),n=g.useRef(!1),o=gn(),i=g.useMemo(()=>aN(o.search,n.current?null:t.current),[o.search]),l=Ut(),c=g.useCallback((d,p)=>{const m=Mf(typeof d=="function"?d(new URLSearchParams(i)):d);n.current=!0,l("?"+m,p)},[l,i]);return[i,c]}var AN=0,DN=()=>`__${String(++AN)}__`;function IN(){let{router:e}=qv("useSubmit"),{basename:t}=g.useContext(Zn),n=YS(),o=e.fetch,i=e.navigate;return g.useCallback(async(l,c={})=>{let{action:d,method:p,encType:m,formData:h,body:x}=uN(l,t);if(c.navigate===!1){let v=c.fetcherKey||DN();await o(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await i(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:h,body:x,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[o,i,t,n])}function ON(e,{relative:t}={}){let{basename:n}=g.useContext(Zn),o=g.useContext(hr);wt(o,"useFormAction must be used inside a RouteContext");let[i]=o.matches.slice(-1),l={...ma(e||".",{relative:t})},c=gn();if(e==null){l.search=c.search;let d=new URLSearchParams(l.search),p=d.getAll("index");if(p.some(h=>h==="")){d.delete("index"),p.filter(x=>x).forEach(x=>d.append("index",x));let h=d.toString();l.search=h?`?${h}`:""}}return(!e||e===".")&&i.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Cr([n,l.pathname])),ia(l)}function LN(e,{relative:t}={}){let n=g.useContext(_v);wt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=qv("useViewTransitionState"),i=ma(e,{relative:t});if(!n.isTransitioning)return!1;let l=qr(n.currentLocation.pathname,o)||n.currentLocation.pathname,c=qr(n.nextLocation.pathname,o)||n.nextLocation.pathname;return ic(i.pathname,c)!=null||ic(i.pathname,l)!=null}var jo=Pv();const _N=jc(jo);/**
|
|
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 MN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kv=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.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 $N={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 FN=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:l,iconNode:c,...d},p)=>g.createElement("svg",{ref:p,...$N,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Kv("lucide",i),...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 ve=(e,t)=>{const n=g.forwardRef(({className:o,...i},l)=>g.createElement(FN,{ref:l,iconNode:t,className:Kv(`lucide-${MN(e)}`,o),...i}));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 Cc=ve("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 Gv=ve("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 zN=ve("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
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 ac=ve("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
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 BN=ve("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"}]]);/**
|
|
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 Yv=ve("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"}]]);/**
|
|
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 ga=ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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 aa=ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 UN=ve("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
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 Xv=ve("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
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 $f=ve("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"}]]);/**
|
|
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 Sp=ve("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 Ff=ve("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
|
|
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 HN=ve("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
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 WN=ve("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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 VN=ve("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"}]]);/**
|
|
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 qN=ve("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);/**
|
|
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 KN=ve("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
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 GN=ve("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"}]]);/**
|
|
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 Ec=ve("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"}]]);/**
|
|
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 YN=ve("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"}]]);/**
|
|
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 XN=ve("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"}]]);/**
|
|
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 Qv=ve("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"}]]);/**
|
|
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 Cx=ve("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"}]]);/**
|
|
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 QN=ve("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"}]]);/**
|
|
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 JN=ve("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"}]]);/**
|
|
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 ZN=ve("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"}]]);/**
|
|
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 eC=ve("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"}]]);/**
|
|
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 Np=ve("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"}]]);/**
|
|
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=ve("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
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 Jv=ve("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"}]]);/**
|
|
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 Zv=ve("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"}]]);/**
|
|
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 nC=ve("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"}]]);/**
|
|
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 rC=ve("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"}]]);/**
|
|
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 eb=ve("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 zf=ve("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"}]]);/**
|
|
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 oC=ve("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"}]]);/**
|
|
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 sC=ve("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"}]]);/**
|
|
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 iC=ve("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"}]]);/**
|
|
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 tb=ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 aC=ve("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"}]]);/**
|
|
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 Cp=ve("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"}]]);/**
|
|
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 lC=ve("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"}]]);/**
|
|
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 Gd=ve("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"}]]);/**
|
|
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 cC=ve("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"}]]);/**
|
|
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 uC=ve("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"}]]);/**
|
|
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 Un=ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 nb=ve("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"}]]);/**
|
|
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 dC=ve("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
|
|
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 Bf=ve("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"}]]);/**
|
|
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 Ep=ve("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"}]]);/**
|
|
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 fC=ve("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"}]]);/**
|
|
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 qs=ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 pC=ve("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"}]]);/**
|
|
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 hC=ve("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"}]]);/**
|
|
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 mC=ve("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"}]]);/**
|
|
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 gC=ve("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"}]]);/**
|
|
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 zn=ve("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"}]]);/**
|
|
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 Ex=ve("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"}]]);/**
|
|
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 rb=ve("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
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 xC=ve("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"}]]);/**
|
|
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 ob=ve("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"}]]);/**
|
|
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 yC=ve("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
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 To=ve("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"}]]);/**
|
|
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 Ks=ve("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"}]]);/**
|
|
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 vC=ve("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"}]]);/**
|
|
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 Pp=ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function sb(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=sb(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function bC(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sb(e))&&(o&&(o+=" "),o+=t);return o}const Tp="-",wC=e=>{const t=jC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{const d=c.split(Tp);return d[0]===""&&d.length!==1&&d.shift(),ib(d,t)||kC(c)},getConflictingClassGroupIds:(c,d)=>{const p=n[c]||[];return d&&o[c]?[...p,...o[c]]:p}}},ib=(e,t)=>{var c;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),i=o?ib(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;const l=e.join(Tp);return(c=t.validators.find(({validator:d})=>d(l)))==null?void 0:c.classGroupId},Px=/^\[(.+)\]$/,kC=e=>{if(Px.test(e)){const t=Px.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jC=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return NC(Object.entries(e.classGroups),n).forEach(([l,c])=>{Uf(c,o,l,t)}),o},Uf=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){const l=i===""?t:Tx(t,i);l.classGroupId=n;return}if(typeof i=="function"){if(SC(i)){Uf(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{Uf(c,Tx(t,l),n,o)})})},Tx=(e,t)=>{let n=e;return t.split(Tp).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},SC=e=>e.isThemeGetter,NC=(e,t)=>t?e.map(([n,o])=>{const i=o.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,d])=>[t+c,d])):l);return[n,i]}):e,CC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const i=(l,c)=>{n.set(l,c),t++,t>e&&(t=0,o=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=o.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},ab="!",EC=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],l=t.length,c=d=>{const p=[];let m=0,h=0,x;for(let j=0;j<d.length;j++){let S=d[j];if(m===0){if(S===i&&(o||d.slice(j,j+l)===t)){p.push(d.slice(h,j)),h=j+l;continue}if(S==="/"){x=j;continue}}S==="["?m++:S==="]"&&m--}const v=p.length===0?d:d.substring(h),b=v.startsWith(ab),N=b?v.substring(1):v,k=x&&x>h?x-h:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:k}};return n?d=>n({className:d,parseClassName:c}):c},PC=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},TC=e=>({cache:CC(e.cacheSize),parseClassName:EC(e),...wC(e)}),RC=/\s+/,AC=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,l=[],c=e.trim().split(RC);let d="";for(let p=c.length-1;p>=0;p-=1){const m=c[p],{modifiers:h,hasImportantModifier:x,baseClassName:v,maybePostfixModifierPosition:b}=n(m);let N=!!b,k=o(N?v.substring(0,b):v);if(!k){if(!N){d=m+(d.length>0?" "+d:d);continue}if(k=o(v),!k){d=m+(d.length>0?" "+d:d);continue}N=!1}const j=PC(h).join(":"),S=x?j+ab:j,R=S+k;if(l.includes(R))continue;l.push(R);const E=i(k,N);for(let A=0;A<E.length;++A){const L=E[A];l.push(S+L)}d=m+(d.length>0?" "+d:d)}return d};function DC(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=lb(t))&&(o&&(o+=" "),o+=n);return o}const lb=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=lb(e[o]))&&(n&&(n+=" "),n+=t);return n};function IC(e,...t){let n,o,i,l=c;function c(p){const m=t.reduce((h,x)=>x(h),e());return n=TC(m),o=n.cache.get,i=n.cache.set,l=d,d(p)}function d(p){const m=o(p);if(m)return m;const h=AC(p,n);return i(p,h),h}return function(){return l(DC.apply(null,arguments))}}const dt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cb=/^\[(?:([a-z-]+):)?(.+)\]$/i,OC=/^\d+\/\d+$/,LC=new Set(["px","full","screen"]),_C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MC=/\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$/,$C=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wr=e=>Ds(e)||LC.has(e)||OC.test(e),xo=e=>Gs(e,"length",GC),Ds=e=>!!e&&!Number.isNaN(Number(e)),Yd=e=>Gs(e,"number",Ds),Fi=e=>!!e&&Number.isInteger(Number(e)),BC=e=>e.endsWith("%")&&Ds(e.slice(0,-1)),ze=e=>cb.test(e),yo=e=>_C.test(e),UC=new Set(["length","size","percentage"]),HC=e=>Gs(e,UC,ub),WC=e=>Gs(e,"position",ub),VC=new Set(["image","url"]),qC=e=>Gs(e,VC,XC),KC=e=>Gs(e,"",YC),zi=()=>!0,Gs=(e,t,n)=>{const o=cb.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},GC=e=>MC.test(e)&&!$C.test(e),ub=()=>!1,YC=e=>FC.test(e),XC=e=>zC.test(e),QC=()=>{const e=dt("colors"),t=dt("spacing"),n=dt("blur"),o=dt("brightness"),i=dt("borderColor"),l=dt("borderRadius"),c=dt("borderSpacing"),d=dt("borderWidth"),p=dt("contrast"),m=dt("grayscale"),h=dt("hueRotate"),x=dt("invert"),v=dt("gap"),b=dt("gradientColorStops"),N=dt("gradientColorStopPositions"),k=dt("inset"),j=dt("margin"),S=dt("opacity"),R=dt("padding"),E=dt("saturate"),A=dt("scale"),L=dt("sepia"),P=dt("skew"),F=dt("space"),_=dt("translate"),Q=()=>["auto","contain","none"],re=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",ze,t],G=()=>[ze,t],K=()=>["",Wr,xo],Z=()=>["auto",Ds,ze],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],q=()=>["","0",ze],T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[Ds,ze];return{cacheSize:500,separator:":",theme:{colors:[zi],spacing:[Wr,xo],blur:["none","",yo,ze],brightness:z(),borderColor:[e],borderRadius:["none","","full",yo,ze],borderSpacing:G(),borderWidth:K(),contrast:z(),grayscale:q(),hueRotate:z(),invert:q(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[BC,xo],inset:U(),margin:U(),opacity:z(),padding:G(),saturate:z(),scale:z(),sepia:q(),skew:z(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",ze]}],container:["container"],columns:[{columns:[yo]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:[...M(),ze]}],overflow:[{overflow:re()}],"overflow-x":[{"overflow-x":re()}],"overflow-y":[{"overflow-y":re()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],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",Fi,ze]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ze]}],grow:[{grow:q()}],shrink:[{shrink:q()}],order:[{order:["first","last","none",Fi,ze]}],"grid-cols":[{"grid-cols":[zi]}],"col-start-end":[{col:["auto",{span:["full",Fi,ze]},ze]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[zi]}],"row-start-end":[{row:["auto",{span:[Fi,ze]},ze]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ze]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ze]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],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":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ze,t]}],"min-w":[{"min-w":[ze,t,"min","max","fit"]}],"max-w":[{"max-w":[ze,t,"none","full","min","max","fit","prose",{screen:[yo]},yo]}],h:[{h:[ze,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ze,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ze,t,"auto","min","max","fit"]}],"font-size":[{text:["base",yo,xo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yd]}],"font-family":[{font:[zi]}],"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",ze]}],"line-clamp":[{"line-clamp":["none",Ds,Yd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wr,ze]}],"list-image":[{"list-image":["none",ze]}],"list-style-type":[{list:["none","disc","decimal",ze]}],"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:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wr,xo]}],"underline-offset":[{"underline-offset":["auto",Wr,ze]}],"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:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze]}],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",ze]}],"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:[...M(),WC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",HC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qC]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"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:[...I(),"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:I()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Wr,ze]}],"outline-w":[{outline:[Wr,xo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Wr,xo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yo,KC]}],"shadow-color":[{shadow:[zi]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",yo,ze]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[x]}],saturate:[{saturate:[E]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"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":[E]}],"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",ze]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",ze]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ze]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Fi,ze]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ze]}],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",ze]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ze]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wr,xo,Yd]}],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"]}}},JC=IC(QC);function Ue(...e){return JC(bC(e))}function So(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 Er(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 ZC(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function eE(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 tE(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 o=Math.floor(n/60);if(o<60)return`${o}m ago`;const i=Math.floor(o/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function En(e){return e.split(/[_\s-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function db(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1):e}function nE(e){let t=db(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("/agent-sessions")?"/agent-sessions":t.startsWith("/playbooks")?"/playbooks":t.startsWith("/todos")?"/todos":t.startsWith("/attention")?"/attention":t.startsWith("/help")?"/help":t.startsWith("/settings")?"/settings":null}function fb(e,t){return nE(e)===t}function pb(e){let n=db(e).split("/").filter(Boolean);const o=[];let i="Overview",l=null,c="";return n[0]==="w"&&n[1]&&(c=`/w/${n[1]}`,o.push({label:En(n[1]),path:`${c}/projects`}),n=n.slice(2)),n.length===0?{title:i,breadcrumbs:o,projectSlug:l}:(n[0]==="projects"?(o.push({label:"Projects",path:`${c}/projects`}),i="Projects",n[1]&&(l=n[1],o.push({label:En(n[1]),path:`${c}/projects/${n[1]}`}),i=En(n[1])),n[2]==="edit"?i="Edit Project":n[2]==="create"&&n[3]==="assignment"?i="Create Assignment":n[2]==="assignments"&&n[3]&&(o.push({label:En(n[3]),path:`${c}/projects/${n[1]}/assignments/${n[3]}`}),i=En(n[3]),n[4]==="edit"?i="Edit Assignment":n[4]==="plan"&&n[5]==="edit"?i="Edit Plan":n[4]==="scratchpad"&&n[5]==="edit"?i="Edit Scratchpad":n[4]==="handoff"&&n[5]==="edit"?i="Append Handoff":n[4]==="decision-record"&&n[5]==="edit"&&(i="Append Decision"))):n[0]==="servers"?(i="Servers",o.push({label:"Servers",path:`${c}/servers`})):n[0]==="agent-sessions"?(i="Agent Sessions",o.push({label:"Agent Sessions",path:`${c}/agent-sessions`})):n[0]==="attention"?(i="Attention",o.push({label:"Attention",path:"/attention"})):n[0]==="assignments"?(i="Assignments",o.push({label:"Assignments",path:`${c}/assignments`})):n[0]==="playbooks"?(o.push({label:"Playbooks",path:"/playbooks"}),i="Playbooks",n[1]==="create"?i="Create Playbook":n[1]&&n[2]==="edit"?(o.push({label:En(n[1]),path:`/playbooks/${n[1]}`}),i="Edit Playbook"):n[1]&&(o.push({label:En(n[1]),path:`/playbooks/${n[1]}`}),i=En(n[1]))):n[0]==="todos"?(i="Todos",o.push({label:"Todos",path:`${c}/todos`})):n[0]==="help"?(i="Help",o.push({label:"Help",path:"/help"})):n[0]==="settings"?(i="Settings",o.push({label:"Settings",path:"/settings"})):n[0]==="create"&&n[1]==="project"&&(i="Create Project",o.push({label:"Create Project",path:`${c}/create/project`})),{title:i,breadcrumbs:o,projectSlug:l})}function Rx({items:e,onNavigate:t}){const n=gn();return a.jsx("nav",{className:"space-y-1",children:e.map(o=>{const i=o.icon,l=fb(n.pathname,o.to)&&!n.pathname.startsWith("/w/");return a.jsxs(Re,{to:o.to,onClick:t,className:Ue("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:[a.jsx(i,{className:"h-4 w-4"}),a.jsx("span",{children:o.label})]},o.to)})})}const hb=[{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)"}}],rE=hb.map(e=>e.slug),lc="default";function mb(e){return typeof e=="string"&&rE.includes(e)}const gb={preset:lc,custom:!1};let Gi=null,Ns=null;function Rp(e){if(!e||typeof e!="object")return gb;const t=e;return{preset:mb(t.preset)?t.preset:lc,custom:t.custom===!0}}function oE(){return Gi?Promise.resolve(Gi):Ns||(Ns=fetch("/api/config/theme").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{const t=Rp(e);return Gi=t,Ns=null,t}).catch(()=>(Ns=null,gb)),Ns)}async function sE(e){const t=await fetch("/api/config/theme",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preset:e})});if(!t.ok){const o=await t.json().catch(()=>({error:`HTTP ${t.status}`}));throw new Error(o.error??"Failed to save theme")}const n=Rp(await t.json());return Gi=n,n}async function iE(){const e=await fetch("/api/config/theme",{method:"DELETE"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=Rp(await e.json());return Gi=t,t}const Hf="syntaur-theme",Ql="syntaur-preset",xb=g.createContext(null);function Wf(){try{const e=window.localStorage.getItem(Hf);return e==="light"||e==="dark"?e:null}catch{return null}}function yb(){try{const e=window.localStorage.getItem(Ql);return mb(e)?e:lc}catch{return lc}}function vb(){return typeof window>"u"||!window.matchMedia?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function bb(e){document.documentElement.classList.toggle("dark",e==="dark")}function wb(e){document.documentElement.dataset.theme=e}function aE(){typeof document>"u"||(bb(Wf()??vb()),wb(yb()))}function lE({children:e}){const[t,n]=g.useState(()=>Wf()),[o,i]=g.useState(()=>Wf()??vb()),[l,c]=g.useState(()=>yb());g.useEffect(()=>{bb(o)},[o]),g.useEffect(()=>{wb(l)},[l]),g.useEffect(()=>{let h=!1;return oE().then(x=>{if(!h&&x.preset!==l){c(x.preset);try{window.localStorage.setItem(Ql,x.preset)}catch{}}}),()=>{h=!0}},[]),g.useEffect(()=>{if(!window.matchMedia)return;const h=window.matchMedia("(prefers-color-scheme: dark)"),x=()=>{t||i(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(Ql,h)}catch{}await sE(h)}async function p(){const h=await iE();c(h.preset);try{window.localStorage.setItem(Ql,h.preset)}catch{}}const m={resolvedTheme:o,explicitTheme:t,setTheme:h=>{window.localStorage.setItem(Hf,h),n(h),i(h)},toggleTheme:()=>{const h=o==="dark"?"light":"dark";window.localStorage.setItem(Hf,h),n(h),i(h)},preset:l,setPreset:d,resetPreset:p};return a.jsx(xb.Provider,{value:m,children:e})}function Ap(){const e=g.useContext(xb);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Jl=new Set;let Cn=null,Is=null;function cE(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function kb(){Cn&&(Cn.readyState===WebSocket.OPEN||Cn.readyState===WebSocket.CONNECTING)||(Cn=new WebSocket(cE()),Cn.onmessage=e=>{try{const t=JSON.parse(e.data);for(const n of Jl)n(t)}catch{}},Cn.onclose=()=>{Cn=null,Is&&clearTimeout(Is),Is=setTimeout(kb,2e3)},Cn.onerror=()=>{Cn==null||Cn.close()})}function Pc(e){const t=g.useRef(e);t.current=e,g.useEffect(()=>{const n=o=>t.current(o);return Jl.add(n),kb(),()=>{Jl.delete(n),Jl.size===0&&Cn&&(Is&&clearTimeout(Is),Is=null,Cn.close(),Cn=null)}},[])}function xn(e,t){const[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(null),[p,m]=g.useState(0),h=g.useCallback(()=>{m(x=>x+1)},[]);return g.useEffect(()=>{if(!e){l(!1),o(null);return}let x=!1;return l(!0),d(null),fetch(e).then(async v=>{if(!v.ok){const b=await v.json().catch(()=>null);throw new Error((b==null?void 0:b.error)||`HTTP ${v.status}`)}return v.json()}).then(v=>{x||(o(v),l(!1))}).catch(v=>{x||(d(v.message),l(!1))}),()=>{x=!0}},[e,p]),Pc(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())}),{data:n,loading:i,error:c,refetch:h}}function Tc(){return xn("/api/projects","projects")}function Dp(){return xn("/api/workspaces","projects")}function Lt(){const{workspace:e}=At();return e?`/w/${e}`:""}function uE(){return xn("/api/overview","overview")}function jb(){return xn("/api/assignments","assignments")}function dE(){return xn("/api/attention","attention")}function Sb(){return xn("/api/help")}function Nb(e){const t=e?`/api/projects/${e}`:null;return xn(t,"project")}function fE(e,t){const n=e&&t?`/api/projects/${e}/assignments/${t}`:null;return xn(n,"assignment")}function pE(e){const t=e?`/api/assignments/${e}`:null;return xn(t,"assignment")}function Cb(e){return xn(e)}function Ip(){return xn("/api/servers","servers")}function hE(){return xn("/api/agent-sessions","agent-sessions")}function mE(e,t){const n=e&&t?`/api/agent-sessions/${e}?assignment=${t}`:null;return xn(n,"agent-sessions")}function Eb(){return xn("/api/playbooks","playbooks")}function gE(e){const t=e?`/api/playbooks/${e}`:null;return xn(t,"playbooks")}const Rc=["new-workspace","new-project","new-todo","new-assignment"];function xE(e){return typeof e=="string"&&Rc.includes(e)}const yE=["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","[","]"],vE=["mod","ctrl","alt","shift"];function Pn(e){if(typeof e!="string")return"";const t=e.trim();if(!t)return"";if(/\s/.test(t)&&!t.includes("+"))return t.split(/\s+/).map(Pn).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 o=n[n.length-1].toLowerCase(),i=n.slice(0,-1).map(d=>d.toLowerCase()),l=new Set,c=[];for(const d of vE)i.includes(d)&&!l.has(d)&&(c.push(d),l.add(d));for(const d of i)l.has(d)||(c.push(d),l.add(d));return[...c,o].join("+")}function bE(e){const t=Pn(e);return t?yE.includes(t):!1}const wE={"new-workspace":Pn("Mod+Shift+Alt+w"),"new-project":Pn("Mod+Shift+Alt+p"),"new-todo":Pn("Mod+Shift+Alt+t"),"new-assignment":Pn("Mod+Shift+Alt+a")};function kE(e){const t={...wE};for(const n of Rc){const o=e[n];typeof o=="string"&&o.length>0&&(t[n]=o)}return t}function Yo(){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 jE(e){const t=e.split("+").map(i=>i.trim()),n=t[t.length-1]??"",o=new Set(t.slice(0,-1).map(i=>i.toLowerCase()));return{key:n.toLowerCase(),mod:o.has("mod"),shift:o.has("shift"),alt:o.has("alt"),ctrl:o.has("ctrl")}}function _l(e,t){const n=jE(t);if(e.key.toLowerCase()!==n.key)return!1;const i=Yo()?e.metaKey:e.ctrlKey;return!(n.mod&&!i||!n.mod&&!n.ctrl&&i||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 Pb(e){const t=[],n=Yo()?e.metaKey:e.ctrlKey;n&&t.push("mod"),e.ctrlKey&&!n&&t.push("ctrl"),e.altKey&&t.push("alt");const o=e.key;let i;o===" "||o==="Spacebar"?i="space":(o.length,i=o.toLowerCase());const l=i.length===1&&/^[a-z0-9]$/.test(i);e.shiftKey&&l&&t.push("shift");const c=[...t,i].join("+");return Pn(c)}function Pr(e){return e.split("+").map(n=>{const o=n.toLowerCase();return o==="mod"?Yo()?"⌘":"Ctrl":o==="shift"?Yo()?"⇧":"Shift":o==="alt"?Yo()?"⌥":"Alt":o==="ctrl"?Yo()?"⌃":"Ctrl":o==="enter"?"↵":o==="escape"?"Esc":o==="arrowup"?"↑":o==="arrowdown"?"↓":n.length===1?n.toUpperCase():n}).join(Yo()?"":"+")}function SE(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{try{const p=await fetch(`/api/todos/${encodeURIComponent(e)}`);if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),Pc(p=>{p.type==="todos-updated"&&!p.projectSlug&&d()}),{data:t,loading:o,error:l,refetch:d}}function Op(){const[e,t]=g.useState(null),[n,o]=g.useState(!0),[i,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{o(!1)}},[]);return g.useEffect(()=>{c()},[c]),Pc(d=>{d.type==="todos-updated"&&!d.projectSlug&&c()}),{data:e,loading:n,error:i,refetch:c}}async function Lp(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 Tb(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 Rb(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 Ab(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 Db(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function NE(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function Ib(e,t){await fetch(`/api/todos/${encodeURIComponent(e)}/${t}`,{method:"DELETE"})}const CE=new Set(["/projects","/assignments","/servers","/todos"]);function Zl(e,t){return CE.has(e)?`${t}${e}`:e}const EE=[{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-settings",title:"Settings",basePath:"/settings",keywords:[]},{id:"page-help",title:"Help",basePath:"/help",keywords:["shortcuts"]}];function PE(e){const t=[];for(const n of EE)t.push({type:"page",id:n.id,title:n.title,keywords:[...n.keywords],route:Zl(n.basePath,e.wsPrefix)});for(const n of e.projects??[]){const o=n.workspace?`/w/${n.workspace}`:"";t.push({type:"project",id:`project-${n.slug}`,title:n.title,subtitle:n.slug,keywords:n.tags,route:`${o}/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:`${o}/projects/${n.slug}?tab=todos`})}for(const n of e.assignments??[]){const o=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(i=>!!i),route:n.projectSlug===null?`/assignments/${n.id}`:`${o}/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:`${Zl("/servers",e.wsPrefix)}#server-${encodeURIComponent(n.name)}`});for(const n of e.todos??[]){const o=n.workspace&&n.workspace!=="_ungrouped"?`/w/${n.workspace}`:e.wsPrefix,i=Zl("/todos",o);t.push({type:"todo",id:`todo-${n.id}`,title:n.description,subtitle:n.status,keywords:n.tags,route:`${i}?focus=${encodeURIComponent(n.id)}`})}return t}function cr(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function Xd(e){return/^[a-z0-9]+(-[a-z0-9]+)*$/.test(e)}async function TE(e,t,n){const o=t?"disable":"enable",i=await fetch(`/api/playbooks/${encodeURIComponent(e)}/${o}`,{method:"POST"});if(!i.ok){const l=await i.json().catch(()=>({}));throw new Error(l.error||`Failed to ${o} playbook`)}n()}async function Qd(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 o=await n.json().catch(()=>({}));throw new Error(o.error||`Failed to create todo (HTTP ${n.status})`)}}async function Ax(){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 Dx(){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 Jd(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 qo(e,t,n){const o=e.match(/^(---\n)([\s\S]*?)(\n---)/);if(!o)return`---
|
|
407
|
+
${t}: ${JSON.stringify(n)}
|
|
408
|
+
---
|
|
409
|
+
${e}`;const i=o[1],l=o[2],c=o[3],d=e.slice(o[0].length),p=JSON.stringify(n),m=new RegExp(`^${t}:\\s*.*$`,"m");let h;return m.test(l)?h=l.replace(m,`${t}: ${p}`):h=`${l}
|
|
410
|
+
${t}: ${p}`,`${i}${h}${c}${d}`}const RE=/^[a-z0-9][a-z0-9-]*$/;function AE(e){const{playbooks:t,projectSlug:n,currentProjectTitle:o,currentProjectWorkspace:i,wsPrefix:l,refetchPlaybooks:c,navigate:d,toggleTheme:p}=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:RE,message:"Use lowercase letters, digits, and hyphens (e.g. acme-app). Must start with a letter or digit."}}],submit:async(h,x)=>{const v=(h.name??"").trim();if(!v)throw new Error("Name is required");const b=await fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:v})});if(!b.ok){const N=await b.json().catch(()=>({}));throw new Error(N.error||`Failed to create workspace (HTTP ${b.status})`)}x.navigate(`/w/${v}/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 Ax(),v=[{value:"_ungrouped",label:"Ungrouped",hint:"no workspace"}];for(const b of h)v.push({value:b,label:b,hint:"workspace"});return v}},{kind:"text",id:"title",label:"Project title",placeholder:"e.g. Marketing site rebuild",required:!0}],submit:async(h,x)=>{const v=(h.workspace??"").trim(),b=(h.title??"").trim();if(!b)throw new Error("Title is required");const N=cr(b);if(!N)throw new Error("Title must contain at least one alphanumeric character");let k=await Jd("/api/templates/project");k=qo(k,"slug",N),k=qo(k,"title",b),v&&v!=="_ungrouped"&&(k=qo(k,"workspace",v));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 R=v&&v!=="_ungrouped"?`/w/${v}/projects/${S.slug??N}`:`/projects/${S.slug??N}`;x.navigate(R)}}}),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([Ax(),Dx()]),v=[{value:"_ungrouped",label:"Global",hint:"no workspace"}];for(const b of h)v.push({value:b,label:b,hint:"workspace"});for(const b of x){const N=b.workspace??"_ungrouped";v.push({value:N,label:`${b.title}`,hint:`project · ${b.workspace??"ungrouped"}`})}return v}},{kind:"text",id:"description",label:"Description",placeholder:"Describe the todo…",required:!0}],submit:async h=>{const x=(h.scope??"_ungrouped").trim()||"_ungrouped",v=(h.description??"").trim();if(!v)throw new Error("Description is required");await Lp(x,v)}}}),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 Dx(),x=[{value:"_standalone",label:"Standalone",hint:"one-off / not in a project"}];for(const v of h)x.push({value:v.slug,label:v.title,hint:v.workspace?`workspace · ${v.workspace}`:"ungrouped"});return x}},{kind:"text",id:"title",label:"Assignment title",placeholder:"What needs to get done?",required:!0}],submit:async(h,x)=>{var E;const v=(h.project??"_standalone").trim()||"_standalone",b=(h.title??"").trim();if(!b)throw new Error("Title is required");const N=cr(b);if(!N)throw new Error("Title must contain at least one alphanumeric character");if(v==="_standalone"){let A=await Jd("/api/templates/assignment?standalone=1");A=qo(A,"slug",N),A=qo(A,"title",b);const L=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:A})}),P=await L.json().catch(()=>({}));if(!L.ok)throw new Error(P.error||`Failed to create assignment (HTTP ${L.status})`);const F=((E=P==null?void 0:P.assignment)==null?void 0:E.id)??(P==null?void 0:P.id);F?x.navigate(`/assignments/${F}`):x.navigate("/assignments");return}let k=await Jd("/api/templates/assignment");k=qo(k,"slug",N),k=qo(k,"title",b);const j=await fetch(`/api/projects/${encodeURIComponent(v)}/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 R=S.slug??N;x.navigate(`/projects/${v}/assignments/${R}`)}}}),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 ${o??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 Qd("_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 v=x.trim();v&&await Qd(h,v)}}})}n&&i&&m.push({id:`create-todo-project-${n}`,title:`New Todo in project ${o??n}`,subtitle:`${n} · workspace ${i}`,group:"Create",keywords:["new","create","todo","project",n,i],requiresInput:{placeholder:`Describe the todo for project ${o??n}…`,runWithInput:async h=>{const x=h.trim();x&&await Qd(i,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:()=>TE(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:()=>p()}),m}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Ix(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ac(...e){return t=>{let n=!1;const o=e.map(i=>{const l=Ix(i,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():Ix(e[i],null)}}}}function fn(...e){return g.useCallback(Ac(...e),e)}function DE(e,t){const n=g.createContext(t),o=l=>{const{children:c,...d}=l,p=g.useMemo(()=>d,Object.values(d));return a.jsx(n.Provider,{value:p,children:c})};o.displayName=e+"Provider";function i(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[o,i]}function Zo(e,t=[]){let n=[];function o(l,c){const d=g.createContext(c),p=n.length;n=[...n,c];const m=x=>{var S;const{scope:v,children:b,...N}=x,k=((S=v==null?void 0:v[e])==null?void 0:S[p])||d,j=g.useMemo(()=>N,Object.values(N));return a.jsx(k.Provider,{value:j,children:b})};m.displayName=l+"Provider";function h(x,v){var k;const b=((k=v==null?void 0:v[e])==null?void 0:k[p])||d,N=g.useContext(b);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${x}\` must be used within \`${l}\``)}return[m,h]}const i=()=>{const l=n.map(c=>g.createContext(c));return function(d){const p=(d==null?void 0:d[e])||l;return g.useMemo(()=>({[`__scope${e}`]:{...d,[e]:p}}),[d,p])}};return i.scopeName=e,[o,IE(i,...t)]}function IE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const c=o.reduce((d,{useScope:p,scopeName:m})=>{const x=p(l)[`__scope${m}`];return{...d,...x}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var No=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},OE=Ev[" useId ".trim().toString()]||(()=>{}),LE=0;function Os(e){const[t,n]=g.useState(OE());return No(()=>{n(o=>o??String(LE++))},[e]),t?`radix-${t}`:""}var _E=Ev[" useInsertionEffect ".trim().toString()]||No;function Dc({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,l,c]=ME({defaultProp:t,onChange:n}),d=e!==void 0,p=d?e:i;{const h=g.useRef(e!==void 0);g.useEffect(()=>{const x=h.current;x!==d&&console.warn(`${o} 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,o])}const m=g.useCallback(h=>{var x;if(d){const v=$E(h)?h(e):h;v!==e&&((x=c.current)==null||x.call(c,v))}else l(h)},[d,e,l,c]);return[p,m]}function ME({defaultProp:e,onChange:t}){const[n,o]=g.useState(e),i=g.useRef(n),l=g.useRef(t);return _E(()=>{l.current=t},[t]),g.useEffect(()=>{var c;i.current!==n&&((c=l.current)==null||c.call(l,n),i.current=n)},[n,i]),[n,o,l]}function $E(e){return typeof e=="function"}function FE(e){const t=zE(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(UE);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function zE(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=WE(i),d=HE(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Ac(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var BE=Symbol("radix.slottable");function UE(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===BE}function HE(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function WE(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var VE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=VE.reduce((e,t)=>{const n=FE(`Primitive.${t}`),o=g.forwardRef((i,l)=>{const{asChild:c,...d}=i,p=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(p,{...d,ref:l})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function qE(e,t){e&&jo.flushSync(()=>e.dispatchEvent(t))}function Xo(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function KE(e,t=globalThis==null?void 0:globalThis.document){const n=Xo(e);g.useEffect(()=>{const o=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var GE="DismissableLayer",Vf="dismissableLayer.update",YE="dismissableLayer.pointerDownOutside",XE="dismissableLayer.focusOutside",Ox,Ob=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_p=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:d,...p}=e,m=g.useContext(Ob),[h,x]=g.useState(null),v=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=g.useState({}),N=fn(t,F=>x(F)),k=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(j),R=h?k.indexOf(h):-1,E=m.layersWithOutsidePointerEventsDisabled.size>0,A=R>=S,L=ZE(F=>{const _=F.target,Q=[...m.branches].some(re=>re.contains(_));!A||Q||(i==null||i(F),c==null||c(F),F.defaultPrevented||d==null||d())},v),P=e2(F=>{const _=F.target;[...m.branches].some(re=>re.contains(_))||(l==null||l(F),c==null||c(F),F.defaultPrevented||d==null||d())},v);return KE(F=>{R===m.layers.size-1&&(o==null||o(F),!F.defaultPrevented&&d&&(F.preventDefault(),d()))},v),g.useEffect(()=>{if(h)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ox=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),Lx(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Ox)}},[h,v,n,m]),g.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),Lx())},[h,m]),g.useEffect(()=>{const F=()=>b({});return document.addEventListener(Vf,F),()=>document.removeEventListener(Vf,F)},[]),a.jsx(_t.div,{...p,ref:N,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,P.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,L.onPointerDownCapture)})});_p.displayName=GE;var QE="DismissableLayerBranch",JE=g.forwardRef((e,t)=>{const n=g.useContext(Ob),o=g.useRef(null),i=fn(t,o);return g.useEffect(()=>{const l=o.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),a.jsx(_t.div,{...e,ref:i})});JE.displayName=QE;function ZE(e,t=globalThis==null?void 0:globalThis.document){const n=Xo(e),o=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const l=d=>{if(d.target&&!o.current){let p=function(){Lb(YE,n,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=p,t.addEventListener("click",i.current,{once:!0})):p()}else t.removeEventListener("click",i.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function e2(e,t=globalThis==null?void 0:globalThis.document){const n=Xo(e),o=g.useRef(!1);return g.useEffect(()=>{const i=l=>{l.target&&!o.current&&Lb(XE,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Lx(){const e=new CustomEvent(Vf);document.dispatchEvent(e)}function Lb(e,t,n,{discrete:o}){const i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?qE(i,l):i.dispatchEvent(l)}var Zd="focusScope.autoFocusOnMount",ef="focusScope.autoFocusOnUnmount",_x={bubbles:!1,cancelable:!0},t2="FocusScope",_b=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...c}=e,[d,p]=g.useState(null),m=Xo(i),h=Xo(l),x=g.useRef(null),v=fn(t,k=>p(k)),b=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(o){let k=function(E){if(b.paused||!d)return;const A=E.target;d.contains(A)?x.current=A:wo(x.current,{select:!0})},j=function(E){if(b.paused||!d)return;const A=E.relatedTarget;A!==null&&(d.contains(A)||wo(x.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const L of E)L.removedNodes.length>0&&wo(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",j);const R=new MutationObserver(S);return d&&R.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",j),R.disconnect()}}},[o,d,b.paused]),g.useEffect(()=>{if(d){$x.add(b);const k=document.activeElement;if(!d.contains(k)){const S=new CustomEvent(Zd,_x);d.addEventListener(Zd,m),d.dispatchEvent(S),S.defaultPrevented||(n2(a2(Mb(d)),{select:!0}),document.activeElement===k&&wo(d))}return()=>{d.removeEventListener(Zd,m),setTimeout(()=>{const S=new CustomEvent(ef,_x);d.addEventListener(ef,h),d.dispatchEvent(S),S.defaultPrevented||wo(k??document.body,{select:!0}),d.removeEventListener(ef,h),$x.remove(b)},0)}}},[d,m,h,b]);const N=g.useCallback(k=>{if(!n&&!o||b.paused)return;const j=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,S=document.activeElement;if(j&&S){const R=k.currentTarget,[E,A]=r2(R);E&&A?!k.shiftKey&&S===A?(k.preventDefault(),n&&wo(E,{select:!0})):k.shiftKey&&S===E&&(k.preventDefault(),n&&wo(A,{select:!0})):S===R&&k.preventDefault()}},[n,o,b.paused]);return a.jsx(_t.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});_b.displayName=t2;function n2(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(wo(o,{select:t}),document.activeElement!==n)return}function r2(e){const t=Mb(e),n=Mx(t,e),o=Mx(t.reverse(),e);return[n,o]}function Mb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mx(e,t){for(const n of e)if(!o2(n,{upTo:t}))return n}function o2(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 s2(e){return e instanceof HTMLInputElement&&"select"in e}function wo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&s2(e)&&t&&e.select()}}var $x=i2();function i2(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fx(e,t),e.unshift(t)},remove(t){var n;e=Fx(e,t),(n=e[0])==null||n.resume()}}}function Fx(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function a2(e){return e.filter(t=>t.tagName!=="A")}var l2="Portal",Mp=g.forwardRef((e,t)=>{var d;const{container:n,...o}=e,[i,l]=g.useState(!1);No(()=>l(!0),[]);const c=n||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return c?_N.createPortal(a.jsx(_t.div,{...o,ref:t}),c):null});Mp.displayName=l2;function c2(e,t){return g.useReducer((n,o)=>t[n][o]??n,e)}var es=e=>{const{present:t,children:n}=e,o=u2(t),i=typeof n=="function"?n({present:o.isPresent}):g.Children.only(n),l=fn(o.ref,d2(i));return typeof n=="function"||o.isPresent?g.cloneElement(i,{ref:l}):null};es.displayName="Presence";function u2(e){const[t,n]=g.useState(),o=g.useRef(null),i=g.useRef(e),l=g.useRef("none"),c=e?"mounted":"unmounted",[d,p]=c2(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const m=Ml(o.current);l.current=d==="mounted"?m:"none"},[d]),No(()=>{const m=o.current,h=i.current;if(h!==e){const v=l.current,b=Ml(m);e?p("MOUNT"):b==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(h&&v!==b?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,p]),No(()=>{if(t){let m;const h=t.ownerDocument.defaultView??window,x=b=>{const k=Ml(o.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(p("ANIMATION_END"),!i.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",m=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},v=b=>{b.target===t&&(l.current=Ml(o.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",x),t.addEventListener("animationend",x),()=>{h.clearTimeout(m),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",x),t.removeEventListener("animationend",x)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(m=>{o.current=m?getComputedStyle(m):null,n(m)},[])}}function Ml(e){return(e==null?void 0:e.animationName)||"none"}function d2(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tf=0;function f2(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zx()),document.body.insertAdjacentElement("beforeend",e[1]??zx()),tf++,()=>{tf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),tf--}},[])}function zx(){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 jr=function(){return jr=Object.assign||function(t){for(var n,o=1,i=arguments.length;o<i;o++){n=arguments[o];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},jr.apply(this,arguments)};function $b(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]]);return n}function p2(e,t,n){if(n||arguments.length===2)for(var o=0,i=t.length,l;o<i;o++)(l||!(o in t))&&(l||(l=Array.prototype.slice.call(t,0,o)),l[o]=t[o]);return e.concat(l||Array.prototype.slice.call(t))}var ec="right-scroll-bar-position",tc="width-before-scroll-bar",h2="with-scroll-bars-hidden",m2="--removed-body-scroll-bar-size";function nf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function g2(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var i=n.value;i!==o&&(n.value=o,n.callback(o,i))}}}})[0];return n.callback=t,n.facade}var x2=typeof window<"u"?g.useLayoutEffect:g.useEffect,Bx=new WeakMap;function y2(e,t){var n=g2(null,function(o){return e.forEach(function(i){return nf(i,o)})});return x2(function(){var o=Bx.get(n);if(o){var i=new Set(o),l=new Set(e),c=n.current;i.forEach(function(d){l.has(d)||nf(d,null)}),l.forEach(function(d){i.has(d)||nf(d,c)})}Bx.set(n,e)},[e]),n}function v2(e){return e}function b2(e,t){t===void 0&&(t=v2);var n=[],o=!1,i={read:function(){if(o)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,o);return n.push(c),function(){n=n.filter(function(d){return d!==c})}},assignSyncMedium:function(l){for(o=!0;n.length;){var c=n;n=[],c.forEach(l)}n={push:function(d){return l(d)},filter:function(){return n}}},assignMedium:function(l){o=!0;var c=[];if(n.length){var d=n;n=[],d.forEach(l),c=n}var p=function(){var h=c;c=[],h.forEach(l)},m=function(){return Promise.resolve().then(p)};m(),n={push:function(h){c.push(h),m()},filter:function(h){return c=c.filter(h),n}}}};return i}function w2(e){e===void 0&&(e={});var t=b2(null);return t.options=jr({async:!0,ssr:!1},e),t}var Fb=function(e){var t=e.sideCar,n=$b(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return g.createElement(o,jr({},n))};Fb.isSideCarExport=!0;function k2(e,t){return e.useMedium(t),Fb}var zb=w2(),rf=function(){},Ic=g.forwardRef(function(e,t){var n=g.useRef(null),o=g.useState({onScrollCapture:rf,onWheelCapture:rf,onTouchMoveCapture:rf}),i=o[0],l=o[1],c=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,h=e.enabled,x=e.shards,v=e.sideCar,b=e.noRelative,N=e.noIsolation,k=e.inert,j=e.allowPinchZoom,S=e.as,R=S===void 0?"div":S,E=e.gapMode,A=$b(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=v,P=y2([n,t]),F=jr(jr({},A),i);return g.createElement(g.Fragment,null,h&&g.createElement(L,{sideCar:zb,removeScrollBar:m,shards:x,noRelative:b,noIsolation:N,inert:k,setCallbacks:l,allowPinchZoom:!!j,lockRef:n,gapMode:E}),c?g.cloneElement(g.Children.only(d),jr(jr({},F),{ref:P})):g.createElement(R,jr({},F,{className:p,ref:P}),d))});Ic.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ic.classNames={fullWidth:tc,zeroRight:ec};var j2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function S2(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=j2();return t&&e.setAttribute("nonce",t),e}function N2(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C2(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var E2=function(){var e=0,t=null;return{add:function(n){e==0&&(t=S2())&&(N2(t,n),C2(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},P2=function(){var e=E2();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bb=function(){var e=P2(),t=function(n){var o=n.styles,i=n.dynamic;return e(o,i),null};return t},T2={left:0,top:0,right:0,gap:0},of=function(e){return parseInt(e||"",10)||0},R2=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[of(n),of(o),of(i)]},A2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return T2;var t=R2(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},D2=Bb(),Ls="data-scroll-locked",I2=function(e,t,n,o){var i=e.left,l=e.top,c=e.right,d=e.gap;return n===void 0&&(n="margin"),`
|
|
411
|
+
.`.concat(h2,` {
|
|
412
|
+
overflow: hidden `).concat(o,`;
|
|
413
|
+
padding-right: `).concat(d,"px ").concat(o,`;
|
|
414
|
+
}
|
|
415
|
+
body[`).concat(Ls,`] {
|
|
416
|
+
overflow: hidden `).concat(o,`;
|
|
417
|
+
overscroll-behavior: contain;
|
|
418
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
419
|
+
padding-left: `.concat(i,`px;
|
|
420
|
+
padding-top: `).concat(l,`px;
|
|
421
|
+
padding-right: `).concat(c,`px;
|
|
422
|
+
margin-left:0;
|
|
423
|
+
margin-top:0;
|
|
424
|
+
margin-right: `).concat(d,"px ").concat(o,`;
|
|
425
|
+
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.`).concat(ec,` {
|
|
429
|
+
right: `).concat(d,"px ").concat(o,`;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.`).concat(tc,` {
|
|
433
|
+
margin-right: `).concat(d,"px ").concat(o,`;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.`).concat(ec," .").concat(ec,` {
|
|
437
|
+
right: 0 `).concat(o,`;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.`).concat(tc," .").concat(tc,` {
|
|
441
|
+
margin-right: 0 `).concat(o,`;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
body[`).concat(Ls,`] {
|
|
445
|
+
`).concat(m2,": ").concat(d,`px;
|
|
446
|
+
}
|
|
447
|
+
`)},Ux=function(){var e=parseInt(document.body.getAttribute(Ls)||"0",10);return isFinite(e)?e:0},O2=function(){g.useEffect(function(){return document.body.setAttribute(Ls,(Ux()+1).toString()),function(){var e=Ux()-1;e<=0?document.body.removeAttribute(Ls):document.body.setAttribute(Ls,e.toString())}},[])},L2=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;O2();var l=g.useMemo(function(){return A2(i)},[i]);return g.createElement(D2,{styles:I2(l,!t,i,n?"":"!important")})},qf=!1;if(typeof window<"u")try{var $l=Object.defineProperty({},"passive",{get:function(){return qf=!0,!0}});window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{qf=!1}var Cs=qf?{passive:!1}:!1,_2=function(e){return e.tagName==="TEXTAREA"},Ub=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_2(e)&&n[t]==="visible")},M2=function(e){return Ub(e,"overflowY")},$2=function(e){return Ub(e,"overflowX")},Hx=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=Hb(e,o);if(i){var l=Wb(e,o),c=l[1],d=l[2];if(c>d)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},F2=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},z2=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},Hb=function(e,t){return e==="v"?M2(t):$2(t)},Wb=function(e,t){return e==="v"?F2(t):z2(t)},B2=function(e,t){return e==="h"&&t==="rtl"?-1:1},U2=function(e,t,n,o,i){var l=B2(e,window.getComputedStyle(t).direction),c=l*o,d=n.target,p=t.contains(d),m=!1,h=c>0,x=0,v=0;do{if(!d)break;var b=Wb(e,d),N=b[0],k=b[1],j=b[2],S=k-j-l*N;(N||S)&&Hb(e,d)&&(x+=S,v+=N);var R=d.parentNode;d=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!p&&d!==document.body||p&&(t.contains(d)||t===d));return(h&&Math.abs(x)<1||!h&&Math.abs(v)<1)&&(m=!0),m},Fl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wx=function(e){return[e.deltaX,e.deltaY]},Vx=function(e){return e&&"current"in e?e.current:e},H2=function(e,t){return e[0]===t[0]&&e[1]===t[1]},W2=function(e){return`
|
|
448
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
449
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
450
|
+
`)},V2=0,Es=[];function q2(e){var t=g.useRef([]),n=g.useRef([0,0]),o=g.useRef(),i=g.useState(V2++)[0],l=g.useState(Bb)[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(i));var k=p2([e.lockRef.current],(e.shards||[]).map(Vx),!0).filter(Boolean);return k.forEach(function(j){return j.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),k.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(i))})}}},[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=Fl(k),R=n.current,E="deltaX"in k?k.deltaX:R[0]-S[0],A="deltaY"in k?k.deltaY:R[1]-S[1],L,P=k.target,F=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in k&&F==="h"&&P.type==="range")return!1;var _=window.getSelection(),Q=_&&_.anchorNode,re=Q?Q===P||Q.contains(P):!1;if(re)return!1;var U=Hx(F,P);if(!U)return!0;if(U?L=F:(L=F==="v"?"h":"v",U=Hx(F,P)),!U)return!1;if(!o.current&&"changedTouches"in k&&(E||A)&&(o.current=L),!L)return!0;var G=o.current||L;return U2(G,j,k,G==="h"?E:A)},[]),p=g.useCallback(function(k){var j=k;if(!(!Es.length||Es[Es.length-1]!==l)){var S="deltaY"in j?Wx(j):Fl(j),R=t.current.filter(function(L){return L.name===j.type&&(L.target===j.target||j.target===L.shadowParent)&&H2(L.delta,S)})[0];if(R&&R.should){j.cancelable&&j.preventDefault();return}if(!R){var E=(c.current.shards||[]).map(Vx).filter(Boolean).filter(function(L){return L.contains(j.target)}),A=E.length>0?d(j,E[0]):!c.current.noIsolation;A&&j.cancelable&&j.preventDefault()}}},[]),m=g.useCallback(function(k,j,S,R){var E={name:k,delta:j,target:S,should:R,shadowParent:K2(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(A){return A!==E})},1)},[]),h=g.useCallback(function(k){n.current=Fl(k),o.current=void 0},[]),x=g.useCallback(function(k){m(k.type,Wx(k),k.target,d(k,e.lockRef.current))},[]),v=g.useCallback(function(k){m(k.type,Fl(k),k.target,d(k,e.lockRef.current))},[]);g.useEffect(function(){return Es.push(l),e.setCallbacks({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:v}),document.addEventListener("wheel",p,Cs),document.addEventListener("touchmove",p,Cs),document.addEventListener("touchstart",h,Cs),function(){Es=Es.filter(function(k){return k!==l}),document.removeEventListener("wheel",p,Cs),document.removeEventListener("touchmove",p,Cs),document.removeEventListener("touchstart",h,Cs)}},[]);var b=e.removeScrollBar,N=e.inert;return g.createElement(g.Fragment,null,N?g.createElement(l,{styles:W2(i)}):null,b?g.createElement(L2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function K2(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const G2=k2(zb,q2);var Vb=g.forwardRef(function(e,t){return g.createElement(Ic,jr({},e,{ref:t,sideCar:G2}))});Vb.classNames=Ic.classNames;var Y2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ps=new WeakMap,zl=new WeakMap,Bl={},sf=0,qb=function(e){return e&&(e.host||qb(e.parentNode))},X2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=qb(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Q2=function(e,t,n,o){var i=X2(t,Array.isArray(e)?e:[e]);Bl[n]||(Bl[n]=new WeakMap);var l=Bl[n],c=[],d=new Set,p=new Set(i),m=function(x){!x||d.has(x)||(d.add(x),m(x.parentNode))};i.forEach(m);var h=function(x){!x||p.has(x)||Array.prototype.forEach.call(x.children,function(v){if(d.has(v))h(v);else try{var b=v.getAttribute(o),N=b!==null&&b!=="false",k=(Ps.get(v)||0)+1,j=(l.get(v)||0)+1;Ps.set(v,k),l.set(v,j),c.push(v),k===1&&N&&zl.set(v,!0),j===1&&v.setAttribute(n,"true"),N||v.setAttribute(o,"true")}catch(S){console.error("aria-hidden: cannot operate on ",v,S)}})};return h(t),d.clear(),sf++,function(){c.forEach(function(x){var v=Ps.get(x)-1,b=l.get(x)-1;Ps.set(x,v),l.set(x,b),v||(zl.has(x)||x.removeAttribute(o),zl.delete(x)),b||x.removeAttribute(n)}),sf--,sf||(Ps=new WeakMap,Ps=new WeakMap,zl=new WeakMap,Bl={})}},J2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=Y2(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),Q2(o,i,n,"aria-hidden")):function(){return null}};function Z2(e){const t=eP(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(nP);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function eP(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=oP(i),d=rP(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Ac(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tP=Symbol("radix.slottable");function nP(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tP}function rP(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function oP(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Oc="Dialog",[Kb,Gb]=Zo(Oc),[sP,mr]=Kb(Oc),Yb=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,d=g.useRef(null),p=g.useRef(null),[m,h]=Dc({prop:o,defaultProp:i??!1,onChange:l,caller:Oc});return a.jsx(sP,{scope:t,triggerRef:d,contentRef:p,contentId:Os(),titleId:Os(),descriptionId:Os(),open:m,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(x=>!x),[h]),modal:c,children:n})};Yb.displayName=Oc;var Xb="DialogTrigger",Qb=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=mr(Xb,n),l=fn(t,i.triggerRef);return a.jsx(_t.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":zp(i.open),...o,ref:l,onClick:mt(e.onClick,i.onOpenToggle)})});Qb.displayName=Xb;var $p="DialogPortal",[iP,Jb]=Kb($p,{forceMount:void 0}),Zb=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:i}=e,l=mr($p,t);return a.jsx(iP,{scope:t,forceMount:n,children:g.Children.map(o,c=>a.jsx(es,{present:n||l.open,children:a.jsx(Mp,{asChild:!0,container:i,children:c})}))})};Zb.displayName=$p;var cc="DialogOverlay",ew=g.forwardRef((e,t)=>{const n=Jb(cc,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=mr(cc,e.__scopeDialog);return l.modal?a.jsx(es,{present:o||l.open,children:a.jsx(lP,{...i,ref:t})}):null});ew.displayName=cc;var aP=Z2("DialogOverlay.RemoveScroll"),lP=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=mr(cc,n);return a.jsx(Vb,{as:aP,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(_t.div,{"data-state":zp(i.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Qo="DialogContent",tw=g.forwardRef((e,t)=>{const n=Jb(Qo,e.__scopeDialog),{forceMount:o=n.forceMount,...i}=e,l=mr(Qo,e.__scopeDialog);return a.jsx(es,{present:o||l.open,children:l.modal?a.jsx(cP,{...i,ref:t}):a.jsx(uP,{...i,ref:t})})});tw.displayName=Qo;var cP=g.forwardRef((e,t)=>{const n=mr(Qo,e.__scopeDialog),o=g.useRef(null),i=fn(t,n.contentRef,o);return g.useEffect(()=>{const l=o.current;if(l)return J2(l)},[]),a.jsx(nw,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,l=>{var c;l.preventDefault(),(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&l.preventDefault()}),onFocusOutside:mt(e.onFocusOutside,l=>l.preventDefault())})}),uP=g.forwardRef((e,t)=>{const n=mr(Qo,e.__scopeDialog),o=g.useRef(!1),i=g.useRef(!1);return a.jsx(nw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var c,d;(c=e.onCloseAutoFocus)==null||c.call(e,l),l.defaultPrevented||(o.current||(d=n.triggerRef.current)==null||d.focus(),l.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:l=>{var p,m;(p=e.onInteractOutside)==null||p.call(e,l),l.defaultPrevented||(o.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=l.target;((m=n.triggerRef.current)==null?void 0:m.contains(c))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),nw=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,...c}=e,d=mr(Qo,n),p=g.useRef(null),m=fn(t,p);return f2(),a.jsxs(a.Fragment,{children:[a.jsx(_b,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:l,children:a.jsx(_p,{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)})}),a.jsxs(a.Fragment,{children:[a.jsx(fP,{titleId:d.titleId}),a.jsx(hP,{contentRef:p,descriptionId:d.descriptionId})]})]})}),Fp="DialogTitle",rw=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=mr(Fp,n);return a.jsx(_t.h2,{id:i.titleId,...o,ref:t})});rw.displayName=Fp;var ow="DialogDescription",sw=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=mr(ow,n);return a.jsx(_t.p,{id:i.descriptionId,...o,ref:t})});sw.displayName=ow;var iw="DialogClose",aw=g.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,i=mr(iw,n);return a.jsx(_t.button,{type:"button",...o,ref:t,onClick:mt(e.onClick,()=>i.onOpenChange(!1))})});aw.displayName=iw;function zp(e){return e?"open":"closed"}var lw="DialogTitleWarning",[dP,cw]=DE(lw,{contentName:Qo,titleName:Fp,docsSlug:"dialog"}),fP=({titleId:e})=>{const t=cw(lw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
451
|
+
|
|
452
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
453
|
+
|
|
454
|
+
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},pP="DialogDescriptionWarning",hP=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cw(pP).contentName}}.`;return g.useEffect(()=>{var l;const i=(l=e.current)==null?void 0:l.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},uw=Yb,mP=Qb,dw=Zb,Bp=ew,Up=tw,Hp=rw,Wp=sw,fw=aw;const Lc=uw,gP=dw,pw=g.forwardRef(({className:e,...t},n)=>a.jsx(Bp,{ref:n,className:Ue("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));pw.displayName=Bp.displayName;const xa=g.forwardRef(({className:e,children:t,...n},o)=>a.jsxs(gP,{children:[a.jsx(pw,{}),a.jsx(Up,{ref:o,className:Ue("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 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...n,children:t})]}));xa.displayName=Up.displayName;function xP({className:e,...t}){return a.jsx("div",{className:Ue("flex flex-col space-y-2 text-left",e),...t})}function yP({className:e,...t}){return a.jsx("div",{className:Ue("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const ya=g.forwardRef(({className:e,...t},n)=>a.jsx(Hp,{ref:n,className:Ue("text-lg font-semibold tracking-tight text-foreground",e),...t}));ya.displayName=Hp.displayName;const Vp=g.forwardRef(({className:e,...t},n)=>a.jsx(Wp,{ref:n,className:Ue("text-sm leading-6 text-muted-foreground",e),...t}));Vp.displayName=Wp.displayName;const vP=-1,bP=-40;function af(e,t){if(e.length===0)return 0;if(t.length===0)return-1/0;let n=0,o=0,i=-2,l=0;for(let c=0;c<e.length;c++){const d=e[c];let p=!1;for(;o<t.length;)if(t[o]===d){if(n+=100,o===i+1&&(n+=20),o===0)n+=30;else{const m=t[o-1];(m===" "||m==="-"||m==="_"||m==="/")&&(n+=15)}l>0&&(n+=Math.max(bP,l*vP)),i=o,l=0,o++,p=!0;break}else l++,o++;if(!p)return-1/0}return n}const qx={page:0,project:1,assignment:2,playbook:3,server:4,todo:5};function qp(e,t,n=50){const o=e.toLowerCase();if(!o)return t.slice(0,n).map(c=>({...c,score:0}));const l=t.map(c=>{var x;const d=af(o,c.title.toLowerCase())*1,p=c.subtitle?af(o,c.subtitle.toLowerCase())*.5:-1/0,m=(x=c.keywords)!=null&&x.length?af(o,c.keywords.join(" ").toLowerCase())*.3:-1/0,h=Math.max(d,p,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:(qx[c.type]??99)-(qx[d.type]??99)),l.slice(0,n)}const wP={page:"Page",project:"Project",assignment:"Assignment",playbook:"Playbook",server:"Server",todo:"Todo"};function kP({entries:e}){const{paletteOpen:t,closePalette:n}=Ro(),o=Ut(),[i,l]=g.useState(""),[c,d]=g.useState(0),p=g.useRef(null),m=g.useMemo(()=>qp(i,e,50),[i,e]);g.useEffect(()=>{d(0)},[i,t]),g.useEffect(()=>{t||l("")},[t]),g.useEffect(()=>{var b;const v=(b=p.current)==null?void 0:b.querySelector(`[data-palette-idx="${c}"]`);v==null||v.scrollIntoView({block:"nearest"})},[c]);function h(v){o(v.route),n()}function x(v){if(v.key==="ArrowDown")v.preventDefault(),d(b=>Math.min(m.length-1,b+1));else if(v.key==="ArrowUp")v.preventDefault(),d(b=>Math.max(0,b-1));else if(v.key==="Enter"){v.preventDefault();const b=m[c];b&&h(b)}}return a.jsx(Lc,{open:t,onOpenChange:v=>v?null:n(),children:a.jsxs(xa,{className:"max-w-xl p-0 gap-0",children:[a.jsx(ya,{className:"sr-only",children:"Command palette"}),a.jsx("input",{autoFocus:!0,type:"text",value:i,onChange:v=>l(v.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"}),a.jsx("div",{ref:p,className:"max-h-[60vh] overflow-y-auto p-1",children:m.length===0?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:i?"No matches":"Start typing to search"}):m.map((v,b)=>{const N=b===c;return a.jsxs("button",{type:"button","data-palette-idx":b,onClick:()=>h(v),onMouseEnter:()=>d(b),className:`flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors ${N?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[a.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:wP[v.type]??v.type}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:v.title}),v.subtitle?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:v.subtitle}):null]},v.id)})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," open ","·"," Esc close"]}),a.jsxs("span",{children:[m.length," result",m.length===1?"":"s"]})]})]})})}function jP({label:e,onBack:t,disabled:n,stepCounter:o}){return a.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-3 py-2",children:[a.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:[a.jsx(UN,{className:"h-3.5 w-3.5","aria-hidden":"true"}),a.jsx("span",{children:"Back"})]}),a.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e}),o?a.jsxs("span",{className:"ml-auto text-[10px] text-muted-foreground/80",children:["step ",o.current," of ",o.total]}):null]})}function SP({step:e,initialValue:t,disabled:n,onSubmit:o}){const[i,l]=g.useState(t??""),[c,d]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{var N;(N=p.current)==null||N.focus()},[]);const m=i.trim(),h=e.required!==!1,x=e.pattern&&m.length>0&&!e.pattern.regex.test(m),v=!n&&(!h||m.length>0)&&!x;function b(N){if(N.key==="Enter"){if(N.preventDefault(),!v){d(!0);return}o(m)}}return a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:p,type:"text",value:i,onChange:N=>{l(N.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?a.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 NP({step:e,disabled:t,onSubmit:n}){const[o,i]=g.useState({phase:"loading"}),[l,c]=g.useState(""),[d,p]=g.useState(0),[m,h]=g.useState(0),x=g.useRef(null),v=g.useRef(null);g.useEffect(()=>{var k;(k=x.current)==null||k.focus()},[]),g.useEffect(()=>{let k=!1;return i({phase:"loading"}),Promise.resolve().then(()=>e.loadOptions()).then(j=>{k||i({phase:"loaded",options:j})}).catch(j=>{if(k)return;const S=j instanceof Error?j.message:"Failed to load options";i({phase:"error",message:S})}),()=>{k=!0}},[e,m]);const b=g.useMemo(()=>{if(o.phase!=="loaded")return[];const k=o.options.map(j=>({type:"option",title:j.label,subtitle:j.hint,keywords:[j.value],option:j}));return qp(l,k,100)},[o,l]);g.useEffect(()=>{p(0)},[b.length]),g.useEffect(()=>{var j;const k=(j=v.current)==null?void 0:j.querySelector(`[data-picker-idx="${d}"]`);k==null||k.scrollIntoView({block:"nearest"})},[d]);function N(k){if(o.phase==="loaded"){if(k.key==="ArrowDown")k.preventDefault(),p(j=>Math.min(b.length-1,j+1));else if(k.key==="ArrowUp")k.preventDefault(),p(j=>Math.max(0,j-1));else if(k.key==="Enter"){k.preventDefault();const j=b[d];j&&n(j.option.value)}}}return a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:x,type:"text",value:l,onChange:k=>c(k.target.value),onKeyDown:N,placeholder:`Filter ${e.label.toLowerCase()}…`,disabled:t||o.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"}),a.jsx("div",{ref:v,className:"max-h-[60vh] min-h-[120px] overflow-y-auto p-1",children:o.phase==="loading"?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Loading…"}):o.phase==="error"?a.jsxs("div",{className:"px-4 py-4 text-sm",children:[a.jsxs("div",{className:"mb-2 text-destructive",children:["Failed to load: ",o.message]}),a.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?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:o.options.length===0?e.emptyMessage??"No options available":"No matches"}):b.map((k,j)=>{const S=j===d;return a.jsxs("button",{type:"button","data-picker-idx":j,onClick:()=>n(k.option.value),onMouseEnter:()=>p(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:[a.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.option.label}),k.option.hint?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:k.option.hint}):null]},k.option.value)})})]})}function CP({entries:e}){var pe,Ce;const t=Ut(),{actionsPaletteOpen:n,closeActionsPalette:o,customBindings:i,bindAction:l,findConflict:c,pendingActionKind:d,consumePendingActionKind:p}=Ro(),[m,h]=g.useState(""),[x,v]=g.useState(0),[b,N]=g.useState(null),[k,j]=g.useState(""),[S,R]=g.useState(null),[E,A]=g.useState(null),[L,P]=g.useState(!1),[F,_]=g.useState(null),Q=g.useRef(null),re=g.useMemo(()=>e.map(ee=>({type:ee.group.toLowerCase(),title:ee.title,subtitle:ee.subtitle,keywords:ee.keywords,action:ee})),[e]),U=g.useMemo(()=>qp(m,re,50),[m,re]);g.useEffect(()=>{v(0)},[m,n]),g.useEffect(()=>{n||(h(""),N(null),j(""),R(null),A(null),P(!1),_(null))},[n]),g.useEffect(()=>{if(!n||!d)return;const ee=p();if(!ee)return;const de=e.find(xe=>xe.bindableKind===ee);de&&G(de)},[n,d]),g.useEffect(()=>{var de;const ee=(de=Q.current)==null?void 0:de.querySelector(`[data-palette-idx="${x}"]`);ee==null||ee.scrollIntoView({block:"nearest"})},[x]);async function G(ee){if(!L){if(ee.flow&&ee.flow.steps.length>0){R({action:ee,stepIndex:0,values:{}}),_(null);return}if(ee.requiresInput){N(ee),j(""),_(null);return}if(ee.run){P(!0),_(null);try{await ee.run(),o()}catch(de){_(de instanceof Error?de.message:"Action failed")}finally{P(!1)}}}}async function K(ee){if(!S)return;const de=S.action.flow.steps[S.stepIndex],xe={...S.values,[de.id]:ee};if(S.stepIndex+1<S.action.flow.steps.length){R({action:S.action,stepIndex:S.stepIndex+1,values:xe});return}P(!0),_(null);try{await S.action.flow.submit(xe,{navigate:t}),o()}catch(be){_(be instanceof Error?be.message:"Action failed")}finally{P(!1)}}function Z(){if(S&&!L){if(S.stepIndex===0){R(null),_(null);return}R({action:S.action,stepIndex:S.stepIndex-1,values:S.values}),_(null)}}async function M(){if(L||!(b!=null&&b.requiresInput))return;const ee=k.trim();if(ee){P(!0),_(null);try{await b.requiresInput.runWithInput(ee),o()}catch(de){_(de instanceof Error?de.message:"Action failed")}finally{P(!1)}}}function I(ee){if(ee.key==="ArrowDown")ee.preventDefault(),v(de=>Math.min(U.length-1,de+1));else if(ee.key==="ArrowUp")ee.preventDefault(),v(de=>Math.max(0,de-1));else if(ee.key==="Enter"&&(ee.metaKey||ee.ctrlKey)){ee.preventDefault();const de=U[x];de!=null&&de.action.bindableKind&&A({action:de.action,combo:null,conflict:null,saving:!1,error:null})}else if(ee.key==="Enter"){ee.preventDefault();const de=U[x];de&&G(de.action)}}function D(ee){ee.key==="Enter"?(ee.preventDefault(),M()):ee.key==="Escape"&&(ee.preventDefault(),N(null),j(""))}function $(ee){if(!E||ee.key==="Escape"||ee.key==="Enter"&&!E.combo)return;ee.preventDefault(),ee.stopPropagation();const de=Pb(ee.nativeEvent);if(!de)return;const xe=c(de,E.action.bindableKind);A({...E,combo:de,conflict:xe,error:null})}async function q(){var ee;if(!(!E||!E.combo||!E.action.bindableKind)){if((ee=E.conflict)!=null&&ee.description){A({...E,error:`Reserved: ${E.conflict.description}`});return}A({...E,saving:!0,error:null});try{await l(E.action.bindableKind,E.combo),A(null)}catch(de){A({...E,saving:!1,error:de instanceof Error?de.message:"Failed to save binding"})}}}const T=b!==null,z=S!==null,X=E!==null,O=S?S.action.flow.steps[S.stepIndex]:null;return a.jsx(Lc,{open:n,onOpenChange:ee=>ee?null:o(),children:a.jsxs(xa,{className:"max-w-xl p-0 gap-0",onEscapeKeyDown:ee=>{if(!L){if(X){ee.preventDefault(),A(null);return}if(z){ee.preventDefault(),Z();return}T&&(ee.preventDefault(),N(null),j(""),_(null))}},children:[a.jsx(ya,{className:"sr-only",children:"Actions palette"}),X&&E?a.jsxs("div",{onKeyDown:$,tabIndex:-1,autoFocus:!0,children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-4 py-3",children:[a.jsx(zf,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),a.jsxs("span",{className:"text-sm text-foreground",children:["Bind hotkey for ",E.action.title]})]}),a.jsx("div",{className:"px-4 py-6 text-center",children:E.combo?a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"text-2xl font-semibold tracking-wide text-foreground",children:Pr(E.combo)}),(pe=E.conflict)!=null&&pe.description?a.jsxs("div",{className:"text-sm text-destructive",children:["Reserved: ",E.conflict.description," (cannot bind)"]}):(Ce=E.conflict)!=null&&Ce.kind?a.jsxs("div",{className:"text-sm text-amber-500 dark:text-amber-400",children:['Already bound to "',E.conflict.kind,'". Press Enter to overwrite.']}):a.jsx("div",{className:"text-sm text-muted-foreground",children:"Press Enter to save, or another key to retry."}),E.error?a.jsx("div",{className:"text-sm text-destructive",children:E.error}):null]}):a.jsx("div",{className:"text-sm text-muted-foreground",children:"Press the key combination you want to bind…"})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsx("span",{children:"any key records · Enter saves · Esc cancels"}),a.jsx("span",{children:E.saving?"Saving…":""})]}),a.jsx("button",{type:"button",className:"sr-only",onClick:()=>void q(),"data-bind-confirm":!0}),a.jsx("input",{type:"hidden",onKeyDown:ee=>{ee.key==="Enter"&&q()}})]}):z&&O&&S?a.jsxs(a.Fragment,{children:[a.jsx(jP,{label:`${S.action.title} · ${O.label}`,onBack:Z,disabled:L,stepCounter:{current:S.stepIndex+1,total:S.action.flow.steps.length}}),O.kind==="text"?a.jsx(SP,{step:O,initialValue:S.values[O.id],disabled:L,onSubmit:K}):a.jsx(NP,{step:O,disabled:L,onSubmit:K}),F?a.jsx("div",{className:"border-t border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:F}):null,a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsx("span",{children:"↵ next · ← back · Esc back"}),a.jsx("span",{children:L?"Running…":""})]})]}):T?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-2 border-b border-border/70 px-4 py-3",children:[a.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}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b.title})]}),a.jsx("input",{autoFocus:!0,type:"text",value:k,onChange:ee=>j(ee.target.value),onKeyDown:D,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"}),F?a.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:F}):null,a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↵"," submit ","·"," Esc back"]}),a.jsx("span",{children:L?"Running…":""})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{autoFocus:!0,type:"text",value:m,onChange:ee=>h(ee.target.value),onKeyDown:I,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"}),F?a.jsx("div",{className:"border-b border-border/70 bg-destructive/10 px-4 py-2 text-xs text-destructive",children:F}):null,a.jsx("div",{ref:Q,className:"max-h-[60vh] overflow-y-auto p-1",children:U.length===0?a.jsx("div",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:m?"No matches":"Start typing to search actions"}):U.map((ee,de)=>{const xe=de===x,be=ee.action.bindableKind,we=be?i[be]:void 0;return a.jsxs("button",{type:"button","data-palette-idx":de,onClick:()=>G(ee.action),onMouseEnter:()=>v(de),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 ${xe?"bg-accent text-accent-foreground":"hover:bg-accent/50 text-foreground"}`,children:[a.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:ee.action.group}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:ee.action.title}),ee.action.subtitle?a.jsx("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:ee.action.subtitle}):null,we?a.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:Pr(we)}):null,be?a.jsx("span",{role:"button",tabIndex:-1,"aria-label":"Bind hotkey",onClick:Je=>{Je.preventDefault(),Je.stopPropagation(),A({action:ee.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 ${xe?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:a.jsx(zf,{className:"h-3.5 w-3.5","aria-hidden":"true"})}):null]},ee.action.id)})}),a.jsxs("div",{className:"flex items-center justify-between border-t border-border/70 px-3 py-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:["↑↓"," navigate ","·"," ","↵"," run ","·"," ⌘↵ bind ","·"," Esc close"]}),a.jsx("span",{children:L?"Running…":`${U.length} action${U.length===1?"":"s"}`})]})]})]})})}const EP=[{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 PP(e){const t=Pn(e);return t?EP.find(n=>n.combo===t)??null:null}const Bi={"new-workspace":"New Workspace","new-project":"New Project","new-todo":"New Todo","new-assignment":"New Assignment"},TP={global:"Global","list:projects":"Projects list","list:assignments":"Assignments list","list:todos":"Todos list",assignment:"Assignment detail",project:"Project detail"},RP=["global","list:projects","list:assignments","list:todos","project","assignment"];function Kx(e){if(e.includes(" ")){const[t,n]=e.split(" ");return`${Pr(t)} then ${Pr(n)}`}return Pr(e)}function AP(){const{cheatsheetOpen:e,closeCheatsheet:t,listBindings:n,customBindings:o,actionEntries:i}=Ro(),l=g.useMemo(()=>{const p=new Set;for(const m of Object.values(o))typeof m=="string"&&m&&p.add(Pn(m));return p},[o]),c=g.useMemo(()=>{if(!e)return new Map;const p=n(),m=new Map;for(const h of p){if(l.has(Pn(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 p=[];for(const[m,h]of Object.entries(o)){if(!h)continue;const x=i.find(v=>v.bindableKind===m);p.push({kind:m,combo:h,title:x?x.title:m})}return p},[o,i]);return a.jsx(Lc,{open:e,onOpenChange:p=>p?null:t(),children:a.jsxs(xa,{className:"max-w-2xl",children:[a.jsx(ya,{children:"Keyboard shortcuts"}),a.jsxs(Vp,{children:["Press Esc to close. ",Pr("Mod+k")," opens the command palette. Press g twice to restart the chord timer."]}),a.jsxs("div",{className:"mt-2 max-h-[60vh] space-y-4 overflow-y-auto pr-1",children:[RP.map(p=>{const m=c.get(p);return!m||m.length===0?null:a.jsxs("section",{children:[a.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:TP[p]}),a.jsx("ul",{className:"space-y-1",children:m.map((h,x)=>a.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:[a.jsx("span",{className:"text-foreground",children:h.description}),a.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:Kx(h.keys)})]},`${p}-${h.keys}-${x}`))})]},p)}),d.length>0?a.jsxs("section",{children:[a.jsx("h3",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Custom bindings"}),a.jsx("ul",{className:"space-y-1",children:d.map(p=>a.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:[a.jsx("span",{className:"text-foreground",children:p.title}),a.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:Kx(p.combo)})]},`custom-${p.kind}`))})]}):null]})]})})}const Kp={bindings:{},custom:!1};let Yi=null,Ts=null;const Kf=new Set;function hw(e){Yi=e;for(const t of Kf)t(e)}function Gp(e){if(!e||typeof e!="object")return Kp;const t=e,n={};if(t.bindings&&typeof t.bindings=="object"&&!Array.isArray(t.bindings))for(const[o,i]of Object.entries(t.bindings)){if(!xE(o)||typeof i!="string"||i.trim()==="")continue;const l=Pn(i);l&&(n[o]=l)}return{bindings:n,custom:t.custom===!0}}function DP(){return Yi?Promise.resolve(Yi):Ts||(Ts=fetch("/api/config/hotkeys").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{const t=Gp(e);return Yi=t,Ts=null,t}).catch(()=>(Ts=null,Kp)),Ts)}function IP(){const[e,t]=g.useState(()=>Yi??Kp);return g.useEffect(()=>{let n=!1;return DP().then(o=>{n||t(o)}),Kf.add(t),()=>{n=!0,Kf.delete(t)}},[]),e}async function Gx(e){const t={};for(const i of Rc){const l=e[i];if(typeof l!="string")continue;const c=Pn(l);c&&(t[i]=c)}const n=await fetch("/api/config/hotkeys",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({bindings:t})});if(!n.ok){const i=await n.json().catch(()=>({error:`HTTP ${n.status}`}));throw new Error(i.error??"Failed to save hotkey bindings")}const o=Gp(await n.json());return hw(o),o}async function OP(){const e=await fetch("/api/config/hotkeys",{method:"DELETE"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=Gp(await e.json());return hw(t),t}const Yx=1500;function LP(e){const t=e.match(/^\/w\/([^/]+)(?:\/|$)/);return t?`/w/${t[1]}`:""}const mw=g.createContext(null);function _P({children:e}){const{toggleTheme:t}=Ap(),n=gn(),o=Ut(),i=LP(n.pathname),l=Tc(),c=jb(),d=Eb(),p=Ip(),m=Op(),h=g.useMemo(()=>{var qe,Qe,jt,St;const he=l.data??[],ke=((qe=c.data)==null?void 0:qe.assignments)??[],$e=((Qe=d.data)==null?void 0:Qe.playbooks)??[],He=((jt=p.data)==null?void 0:jt.sessions)??[],Oe=(((St=m.data)==null?void 0:St.workspaces)??[]).flatMap(Dt=>Dt.items.map(Qt=>({...Qt,workspace:Dt.workspace})));return PE({projects:he,assignments:ke,playbooks:$e,servers:He,todos:Oe,wsPrefix:i})},[l.data,c.data,d.data,p.data,m.data,i]),v=g.useMemo(()=>pb(n.pathname),[n.pathname]).projectSlug,b=g.useMemo(()=>{var he;return v?((he=l.data)==null?void 0:he.find(ke=>ke.slug===v))??null:null},[l.data,v]),N=(b==null?void 0:b.title)??null,k=(b==null?void 0:b.workspace)??null,j=g.useMemo(()=>{var he;return AE({playbooks:((he=d.data)==null?void 0:he.playbooks)??[],projectSlug:v,currentProjectTitle:N,currentProjectWorkspace:k,wsPrefix:i,refetchPlaybooks:d.refetch,navigate:o,toggleTheme:t})},[d.data,d.refetch,v,N,k,i,o,t]),S=g.useRef(new Map),R=g.useRef(["global"]),E=g.useRef({phase:"idle"}),A=g.useRef(null),L=g.useRef(1),[P,F]=g.useState(!1),[_,Q]=g.useState(!1),[re,U]=g.useState(!1),[G,K]=g.useState(null),{bindings:Z}=IP(),M=g.useMemo(()=>kE(Z),[Z]),I=g.useCallback(he=>{const ke=L.current++;return S.current.set(ke,{...he,id:ke}),ke},[]),D=g.useCallback(he=>{S.current.delete(he)},[]),$=g.useCallback(he=>{R.current.push(he)},[]),q=g.useCallback(he=>{const ke=R.current;for(let $e=ke.length-1;$e>=0;$e--)if(ke[$e]===he){ke.splice($e,1);return}},[]),T=g.useCallback(()=>F(!0),[]),z=g.useCallback(()=>F(!1),[]),X=g.useCallback(()=>Q(!0),[]),O=g.useCallback(()=>Q(!1),[]),pe=g.useCallback(()=>U(!0),[]),Ce=g.useCallback(()=>{U(!1),K(null)},[]),ee=g.useCallback(()=>Array.from(S.current.values()),[]),de=g.useCallback(()=>{let he=null;return K(ke=>(he=ke,null)),he},[]),xe=g.useCallback(he=>{K(he),U(!0)},[]),be=g.useCallback((he,ke)=>{const $e=Pn(he);if(!$e)return null;if(bE($e)){const He=PP($e);return{description:(He==null?void 0:He.description)??"Reserved built-in shortcut"}}for(const[He,lt]of Object.entries(M))if(!(ke&&He===ke)&<===$e)return{kind:He};return null},[M]),we=g.useCallback(async(he,ke)=>{const $e=Pn(ke);if(!$e)throw new Error("Empty combo");const He=be($e,he);if(He){const Oe=He.description?`Reserved: ${He.description}`:`Already bound to "${He.kind}"`;throw new Error(Oe)}const lt={...Z,[he]:$e};return await Gx(lt),$e},[Z,be]),Je=g.useCallback(async he=>{if(!Z[he])return;const ke={...Z};delete ke[he],await Gx(ke)},[Z]);g.useEffect(()=>{E.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[n.pathname]),g.useEffect(()=>{function he(Oe){if(!(Oe instanceof HTMLElement))return!1;const qe=Oe.tagName;return!!(qe==="INPUT"||qe==="TEXTAREA"||qe==="SELECT"||Oe.isContentEditable||Oe.closest('[role="combobox"], [role="textbox"]'))}function ke(){return!!(document.querySelector('[role="dialog"][data-state="open"]')||document.querySelector('[role="alertdialog"][data-state="open"]'))}function $e(){const Oe=R.current;return Oe[Oe.length-1]??"global"}function He(Oe){return Oe.scope==="global"?!0:Oe.scope===$e()}function lt(Oe){const qe=_l(Oe,"Mod+k"),Qe=_l(Oe,"Mod+Shift+k"),jt=Oe.key==="Escape",St=qe||Qe||jt;if(ke()&&!St||he(Oe.target)&&!St)return;const Dt=E.current;if(Dt.phase==="awaiting-second")if(Date.now()-Dt.startedAt>Yx)E.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null);else{const oe=Array.from(S.current.values());for(const ie of oe){if(!He(ie))continue;const me=ie.keys.split(" ");if(!(me.length!==2||me[0]!=="g")&&_l(Oe,me[1])&&!(ie.when&&!ie.when())){Oe.preventDefault(),E.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null),ie.handler(Oe);return}}E.current={phase:"idle"},A.current!==null&&(window.clearTimeout(A.current),A.current=null)}const Qt=Array.from(S.current.values());for(const Et of Qt){if(!He(Et))continue;const oe=Et.keys.split(" ");if(oe.length===1&&_l(Oe,oe[0])&&!(Et.when&&!Et.when())){Oe.preventDefault(),Et.handler(Oe);return}}Oe.key==="g"&&!Oe.metaKey&&!Oe.ctrlKey&&!Oe.altKey&&!Oe.shiftKey&&Array.from(S.current.values()).some(oe=>He(oe)&&oe.keys.startsWith("g "))&&(Oe.preventDefault(),E.current={phase:"awaiting-second",startedAt:Date.now()},A.current!==null&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>{E.current={phase:"idle"},A.current=null},Yx))}return window.addEventListener("keydown",lt),()=>{window.removeEventListener("keydown",lt),A.current!==null&&(window.clearTimeout(A.current),A.current=null)}},[]),g.useEffect(()=>{const he=I({keys:"Shift+t",handler:()=>t(),scope:"global",description:"Toggle light/dark theme"});return()=>D(he)},[I,D,t]),g.useEffect(()=>{const he=I({keys:"?",scope:"global",description:"Show keyboard shortcuts",handler:()=>X()});return()=>D(he)},[I,D,X]),g.useEffect(()=>{const he=I({keys:"Mod+k",scope:"global",description:"Open command palette",handler:()=>{if(P){z();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||T()}});return()=>D(he)},[I,D,T,z,P]),g.useEffect(()=>{const he=I({keys:"Mod+Shift+k",scope:"global",description:"Open actions palette",handler:()=>{if(re){Ce();return}document.querySelector('[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"]')||pe()}});return()=>D(he)},[I,D,pe,Ce,re]),g.useEffect(()=>{const ke=[{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($e=>I({keys:`g ${$e.suffix}`,scope:"global",description:$e.desc,handler:()=>o(Zl($e.basePath,i))}));return()=>ke.forEach(D)},[I,D,o,i]),g.useEffect(()=>{const he=[];for(const[ke,$e]of Object.entries(M)){if(!$e)continue;const He=j.find(Oe=>Oe.bindableKind===ke),lt=He?`Custom: ${He.title}`:`Custom: ${ke}`;he.push(I({keys:$e,scope:"global",description:lt,handler:()=>{K(ke),U(!0)}}))}return()=>he.forEach(D)},[I,D,M,j]);const nt=g.useMemo(()=>({register:I,unregister:D,pushScope:$,popScope:q,openPalette:T,closePalette:z,paletteOpen:P,openCheatsheet:X,closeCheatsheet:O,cheatsheetOpen:_,openActionsPalette:pe,closeActionsPalette:Ce,actionsPaletteOpen:re,listBindings:ee,wsPrefix:i,paletteEntries:h,actionEntries:j,userBindings:Z,customBindings:M,bindAction:we,unbindAction:Je,findConflict:be,openActionsPaletteWithAction:xe,pendingActionKind:G,consumePendingActionKind:de}),[I,D,$,q,T,z,P,X,O,_,pe,Ce,re,ee,i,h,j,Z,M,we,Je,be,xe,G,de]);return a.jsxs(mw.Provider,{value:nt,children:[e,a.jsx(kP,{entries:h}),a.jsx(CP,{entries:j}),a.jsx(AP,{})]})}function Ro(){const e=g.useContext(mw);if(!e)throw new Error("useHotkeyContext must be used within HotkeyProvider");return e}function ht({keys:e,handler:t,scope:n="global",description:o,when:i,enabled:l=!0}){const{register:c,unregister:d}=Ro(),p=g.useRef(t),m=g.useRef(i);g.useEffect(()=>{p.current=t,m.current=i},[t,i]),g.useEffect(()=>{if(!l)return;const h=c({keys:e,handler:x=>p.current(x),scope:n,description:o,when:m.current?()=>m.current():void 0});return()=>d(h)},[c,d,e,n,o,l])}function ts(e){const{pushScope:t,popScope:n}=Ro();g.useEffect(()=>(t(e),()=>n(e)),[t,n,e])}function va(e,t){const[n,o]=g.useState(e.length===0?-1:0),i=gn();g.useEffect(()=>{o(e.length===0?-1:0)},[i.pathname]),g.useEffect(()=>{o(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 p=Number(d.getAttribute("data-hotkey-row-index"));d.setAttribute("data-hotkey-selected",p===n?"true":"false")}),n>=0){const d=document.querySelector(`[data-hotkey-row-index="${n}"]`);d==null||d.scrollIntoView({block:"nearest"})}},[n,e.length]),ht({keys:"j",scope:t.scope,description:"Select next row",handler:()=>o(c=>e.length===0?-1:Math.min(e.length-1,c<0?0:c+1))}),ht({keys:"k",scope:t.scope,description:"Select previous row",handler:()=>o(c=>e.length===0?-1:Math.max(0,c<0?0:c-1))}),ht({keys:"Enter",scope:t.scope,description:"Open selected row",handler:()=>{n>=0&&n<e.length&&t.onOpen(e[n],n)}}),ht({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 MP({title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:o}){const i=Lt(),{resolvedTheme:l,toggleTheme:c}=Ap(),{openPalette:d}=Ro();return a.jsx("header",{className:"sticky top-0 z-30 border-b border-border/70 bg-background/85 backdrop-blur",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-2.5 lg:px-6",children:[a.jsx("button",{type:"button",onClick:o,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:a.jsx(aC,{className:"h-4 w-4"})}),a.jsx("div",{className:"min-w-0 flex-1",children:a.jsxs("div",{className:"flex items-center gap-2",children:[t.length>1?a.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((p,m)=>a.jsxs("span",{className:"flex items-center gap-1.5",children:[m>0?a.jsx("span",{children:"/"}):null,a.jsx(Re,{to:p.path,className:"hover:text-foreground",children:p.label})]},p.path)),a.jsx("span",{children:"/"})]}):null,a.jsx("h1",{className:"truncate text-base font-semibold text-foreground",children:e})]})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:d,className:"shell-action","aria-label":"Open command palette",children:[a.jsx(qs,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline font-mono text-xs",children:Pr("Mod+k")})]}),a.jsx(Re,{className:"shell-action",to:"/help",children:"Help"}),a.jsxs(Re,{className:"shell-action",to:`${i}/create/project`,children:[a.jsx(Un,{className:"h-4 w-4"}),a.jsx("span",{children:"New Project"})]}),n?a.jsxs(Re,{className:"shell-action",to:`${i}/projects/${n}/create/assignment`,children:[a.jsx(Un,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}):null,a.jsxs("button",{type:"button",onClick:c,className:"shell-action","aria-label":"Toggle theme",children:[l==="dark"?a.jsx(xC,{className:"h-4 w-4"}):a.jsx(lC,{className:"h-4 w-4"}),a.jsx("span",{children:l==="dark"?"Light":"Dark"})]})]})]})})}const $P=[{to:"/",label:"Overview",icon:GN},{to:"/attention",label:"Attention",icon:Ks},{to:"/playbooks",label:"Playbooks",icon:Yv},{to:"/todos",label:"Todos",icon:zn}],FP=[{suffix:"/projects",label:"Projects",icon:Np},{suffix:"/assignments",label:"Assignments",icon:iC},{suffix:"/servers",label:"Servers",icon:Cp},{suffix:"/agent-sessions",label:"Agent Sessions",icon:Cc},{suffix:"/todos",label:"Todos",icon:zn}],zP=[{to:"/help",label:"Help",icon:oC},{to:"/settings",label:"Settings",icon:mC}],Xx="syntaur.dashboard.sourceFirstNoticeDismissed";function BP({title:e,breadcrumbs:t,projectSlug:n,workspace:o,children:i}){const[l,c]=g.useState(!1);ht({keys:"Escape",scope:"global",description:"Close mobile navigation",enabled:l,handler:()=>c(!1)});const[d,p]=g.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem(Xx)==="1"}catch{return!1}});function m(){if(p(!0),!(typeof window>"u"))try{window.localStorage.setItem(Xx,"1")}catch{}}return a.jsx("div",{className:"min-h-screen bg-background",children:a.jsxs("div",{className:"relative grid min-h-screen lg:grid-cols-[240px_minmax(0,1fr)]",children:[a.jsx("aside",{className:"hidden max-h-screen sticky top-0 overflow-y-auto border-r border-border/70 bg-sidebar/90 px-4 py-4 backdrop-blur lg:flex lg:flex-col",children:a.jsx(Qx,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o})}),l?a.jsx("div",{className:"fixed inset-0 z-40 bg-overlay/40 lg:hidden",children:a.jsxs("div",{className:"h-full max-w-xs border-r border-border/70 bg-sidebar p-4 shadow-2xl",children:[a.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[a.jsx(Re,{to:"/",className:"text-lg font-semibold text-foreground",onClick:()=>c(!1),children:"Syntaur"}),a.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:a.jsx(Pp,{className:"h-4 w-4"})})]}),a.jsx(Qx,{sourceNoticeDismissed:d,onDismissSourceNotice:m,activeWorkspace:o,onNavigate:()=>c(!1)})]})}):null,a.jsxs("div",{className:"min-w-0",children:[a.jsx(MP,{title:e,breadcrumbs:t,projectSlug:n,onOpenMobileNav:()=>c(!0)}),a.jsx("main",{className:"mx-auto w-full max-w-[1480px] px-4 py-4 lg:px-6 lg:py-5",children:i})]})]})})}function Qx({sourceNoticeDismissed:e,onDismissSourceNotice:t,activeWorkspace:n,onNavigate:o}){const{data:i}=Dp(),l=(i==null?void 0:i.workspaces)??[],c=(i==null?void 0:i.hasUngrouped)??!1,d=gn(),[p,m]=g.useState(new Set),[h,x]=g.useState(!1),[v,b]=g.useState(""),N=Ut();function k(S){m(R=>{const E=new Set(R);return E.has(S)?E.delete(S):E.add(S),E})}const j=[...l,...c?["_ungrouped"]:[]];return a.jsxs("div",{className:"flex h-full flex-col gap-3",children:[a.jsx("div",{className:"space-y-3",children:a.jsxs(Re,{to:"/",className:"inline-flex items-center gap-3",onClick:o,children:[a.jsx("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-lg bg-card text-background shadow-sm ring-1 ring-border/60",children:a.jsx("img",{src:"/syntaur-logo.svg",alt:"Syntaur",width:20,height:20,className:"h-5 w-5"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Syntaur"}),a.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Local-first project control"})]})]})}),a.jsx(Rx,{items:$P,onNavigate:o}),a.jsx("div",{className:"border-t border-border/40"}),a.jsxs("div",{className:"flex-1 space-y-1 overflow-y-auto",children:[j.length===0&&!h&&a.jsx("p",{className:"px-3 py-2 text-xs text-muted-foreground/60",children:"No workspaces yet"}),j.map(S=>{const R=S==="_ungrouped",E=R?"Ungrouped":En(S),A=R?"/w/_ungrouped":`/w/${S}`,L=p.has(S),P=n===S||n===null&&R&&d.pathname.startsWith("/w/_ungrouped");return a.jsxs("div",{children:[a.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 ${P?"text-foreground":"text-muted-foreground/70 hover:text-muted-foreground"}`,children:[a.jsx(aa,{className:`h-3 w-3 transition-transform ${L?"-rotate-90":""}`}),E]}),!L&&a.jsx("nav",{className:"ml-2 space-y-0.5",children:FP.map(F=>{const _=`${A}${F.suffix}`,Q=fb(d.pathname,F.suffix)&&d.pathname.startsWith(A),re=F.icon;return a.jsxs(Re,{to:_,onClick:o,className:`flex items-center gap-3 rounded-md px-3 py-1.5 text-sm font-medium transition ${Q?"bg-foreground text-background shadow-sm":"text-muted-foreground hover:bg-background/80 hover:text-foreground"}`,children:[a.jsx(re,{className:"h-4 w-4"}),a.jsx("span",{children:F.label})]},_)})})]},S)}),h?a.jsx("form",{className:"px-3 py-1.5",onSubmit:S=>{S.preventDefault();const R=v.trim().toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");R&&(x(!1),b(""),fetch("/api/workspaces",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:R})}).then(()=>{o==null||o(),N(`/w/${R}/projects`)}))},children:a.jsx("input",{autoFocus:!0,type:"text",value:v,onChange:S=>b(S.target.value),onKeyDown:S=>{S.key==="Escape"&&(x(!1),b(""))},onBlur:()=>{v.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"})}):a.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:[a.jsx(Un,{className:"h-3 w-3"}),"New Workspace"]})]}),a.jsx("div",{className:"border-t border-border/40"}),a.jsx(Rx,{items:zP,onNavigate:o}),e?null:a.jsx("div",{className:"rounded-lg border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Source-first dashboard"}),a.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."})]}),a.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:a.jsx(Pp,{className:"h-4 w-4"})})]})})]})}function UP(){const e=gn(),{workspace:t}=At(),{title:n,breadcrumbs:o,projectSlug:i}=pb(e.pathname);return a.jsx(BP,{title:n,breadcrumbs:o,projectSlug:i,workspace:t??null,children:a.jsx(ZS,{})})}const Gf="border-status-pending-foreground/30 bg-status-pending text-status-pending-foreground",Jx="border-status-in-progress-foreground/30 bg-status-in-progress text-status-in-progress-foreground",HP="border-status-blocked-foreground/30 bg-status-blocked text-status-blocked-foreground",WP="border-status-review-foreground/30 bg-status-review text-status-review-foreground",VP="border-status-completed-foreground/30 bg-status-completed text-status-completed-foreground",qP="border-status-failed-foreground/30 bg-status-failed text-status-failed-foreground",KP="border-status-archived-foreground/30 bg-status-archived text-status-archived-foreground",uc={pending:{label:"Pending",description:"Waiting to start or waiting on dependencies.",className:Gf,icon:qN},in_progress:{label:"In Progress",description:"Actively being worked on.",className:Jx,icon:tb},blocked:{label:"Blocked",description:"Blocked by an explicit obstacle that needs intervention.",className:HP,icon:$f},review:{label:"Review",description:"Ready for inspection or approval.",className:WP,icon:fC},completed:{label:"Completed",description:"Finished successfully.",className:VP,icon:Sp},failed:{label:"Failed",description:"Could not be completed as planned.",className:qP,icon:$f},active:{label:"Active",description:"The project has active or review work in flight.",className:Jx,icon:Ff},stopped:{label:"Stopped",description:"Session ended without completing.",className:Gf,icon:HN},archived:{label:"Archived",description:"Archived by a human override.",className:KP,icon:Ff}};function Xt({status:e,className:t,showIcon:n=!0,progress:o}){const i=uc[e]??{label:e.replace(/_/g," ").replace(/\b\w/g,h=>h.toUpperCase()),description:`Status: ${e}`,className:Gf,icon:Ff},l=i.icon,c=o&&o.total>0,d=c?Math.min(1,Math.max(0,o.checked/o.total)):0,p=c?`${i.description} (${o.checked}/${o.total} criteria)`:i.description,m=n?c?a.jsxs("span",{className:"relative inline-flex h-3.5 w-3.5 items-center justify-center",children:[a.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 16 16",className:"absolute inset-0 h-full w-full -rotate-90",children:[a.jsx("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"1.5"}),a.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)})]}),a.jsx(l,{className:"h-2.5 w-2.5"})]}):a.jsx(l,{className:"h-3.5 w-3.5"}):null;return a.jsxs("span",{title:p,className:Ue("inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold tracking-wide",i.className,t),children:[m,a.jsx("span",{children:i.label})]})}function gw(e){var t;return((t=uc[e])==null?void 0:t.description)??`Status: ${e}`}const GP={default:"border-border/70 bg-card/90",info:"border-primary/30 bg-primary/5 dark:border-primary/40 dark:bg-primary/10",warn:"border-warning-foreground/30 bg-warning",danger:"border-error-foreground/30 bg-error",success:"border-success-foreground/30 bg-success"};function et({label:e,value:t,description:n,icon:o,tone:i="default",to:l}){const c=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.1em] text-muted-foreground",children:e}),a.jsx("p",{className:"text-2xl font-semibold text-foreground",children:t})]}),o?a.jsx("span",{className:"rounded-md border border-border/60 bg-background/80 p-1.5 text-muted-foreground",children:a.jsx(o,{className:"h-5 w-5"})}):null]}),n?a.jsx("p",{className:"mt-2 text-sm leading-5 text-muted-foreground",children:n}):null]}),d=Ue("rounded-lg border p-3 shadow-sm",GP[i],l?"block transition hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40":"");return l?a.jsx(Re,{to:l,className:d,children:c}):a.jsx("article",{className:d,children:c})}function Ae({title:e,description:t,children:n,className:o,actions:i}){return a.jsxs("section",{className:Ue("surface-panel space-y-3",o),children:[e||i?a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[e?a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e}):null,t?a.jsx("p",{className:"text-sm text-muted-foreground",children:t}):null]}),i]}):null,n]})}function kt({label:e="Loading dashboard data…"}){return a.jsx("div",{className:"flex min-h-[240px] items-center justify-center",children:a.jsx("div",{className:"rounded-lg border border-border/70 bg-card/90 px-4 py-3 shadow-sm",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:e})})})}function gt({title:e="Something went wrong",error:t,action:n}){return a.jsx("div",{className:"rounded-lg border border-error-foreground/30 bg-error px-4 py-5",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-lg font-semibold text-error-foreground",children:e}),a.jsx("p",{className:"text-sm leading-6 text-error-foreground/90",children:t}),n?a.jsx("div",{className:"pt-2",children:n}):null]})})}function tt({title:e,description:t,actions:n}){return a.jsx("div",{className:"rounded-lg border border-dashed border-border/80 bg-muted/30 px-4 py-6 text-center",children:a.jsxs("div",{className:"mx-auto max-w-xl space-y-2",children:[a.jsx("h3",{className:"text-base font-semibold text-foreground",children:e}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:t}),n?a.jsx("div",{className:"flex flex-wrap justify-center gap-3 pt-2",children:n}):null]})})}function nc({command:e,description:t,example:n}){return a.jsxs("div",{className:"rounded-lg border border-border/70 bg-code px-3 py-3 text-code-foreground shadow-sm",children:[a.jsx("code",{className:"block overflow-x-auto font-mono text-sm",children:e}),t?a.jsx("p",{className:"mt-2 text-sm text-code-foreground/80",children:t}):null,n?a.jsx("p",{className:"mt-2 font-mono text-xs text-code-foreground/60",children:n}):null]})}function YP({help:e,compact:t=!1}){const n=t?(e==null?void 0:e.firstProjectChecklist.slice(0,3))??[]:(e==null?void 0:e.firstProjectChecklist)??[];return a.jsx(Ae,{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:a.jsx(Re,{className:"text-sm font-semibold text-primary hover:underline",to:"/help",children:"Open full help"}),children:a.jsx("div",{className:"space-y-3",children:n.map((o,i)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-xs font-semibold text-background",children:i+1}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:o.detail}),o.command?a.jsx(nc,{command:o.command.command,example:o.command.example}):null]})]})},o.title))})})}function XP(){var c;const{data:e,loading:t,error:n}=uE(),{data:o}=Sb(),{data:i}=Op(),l=i!=null&&i.workspaces?i.workspaces.reduce((d,p)=>d+p.counts.open+p.counts.in_progress,0):0;return t?a.jsx(kt,{label:"Loading overview…"}):n||!e?a.jsx(gt,{error:n||"Overview data is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(160px,1fr))]",children:[a.jsx(et,{label:"Active Projects",value:e.stats.activeProjects,icon:Np,to:"/projects"}),a.jsx(et,{label:"In Progress",value:e.stats.inProgressAssignments,icon:tC,tone:"info",to:"/assignments?status=in_progress"}),a.jsx(et,{label:"Blocked",value:e.stats.blockedAssignments,icon:Ks,tone:"warn",to:"/assignments?status=blocked"}),a.jsx(et,{label:"Review",value:e.stats.reviewAssignments,icon:VN,tone:"info",to:"/assignments?status=review"}),a.jsx(et,{label:"Failed",value:e.stats.failedAssignments,icon:cC,tone:"danger",to:"/assignments?status=failed"}),a.jsx(et,{label:"Stale",value:e.stats.staleAssignments,icon:Cc,to:"/assignments?stale=1"}),a.jsx(et,{label:"Open Todos",value:l,icon:zn,to:"/todos"}),a.jsx(et,{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:Cp,tone:(c=e.serverStats)!=null&&c.deadSessions?"warn":"default",to:"/servers"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1.1fr)_minmax(360px,0.9fr)]",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsx(Ae,{title:"Needs Attention Now",description:"Blocked, failed, review, and stale work from the source files.",children:e.attention.length===0?a.jsx(tt,{title:"Nothing urgent right now",description:"The attention queue is empty. Overview will surface blocked, failed, review, and stale assignments here."}):a.jsx("div",{className:"space-y-3",children:e.attention.map(d=>a.jsxs(Re,{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:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:d.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.projectTitle})]}),a.jsx(Xt,{status:d.status})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:d.reason}),a.jsxs("p",{className:"mt-2 text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:["Updated ",Er(d.updated)]})]},d.id))})}),a.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[a.jsx(Ae,{title:"Recently Updated Projects",children:e.recentProjects.length===0?a.jsx(tt,{title:"No projects yet",description:"Create your first project to populate the project directory, recent activity, and attention queue.",actions:a.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:"/create/project",children:"Create Project"})}):a.jsx("div",{className:"space-y-3",children:e.recentProjects.map(d=>a.jsx(Re,{to:`/projects/${d.slug}`,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:Er(d.updated)})]}),a.jsx(Xt,{status:d.status})]})},d.slug))})}),a.jsx(Ae,{title:"Recent Activity",children:e.recentActivity.length===0?a.jsx(tt,{title:"No activity yet",description:"Once projects and assignments exist, Overview will show activity based on parsed source timestamps instead of file mtimes."}):a.jsx("div",{className:"space-y-3",children:e.recentActivity.map(d=>a.jsxs(Re,{to:d.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:d.summary})]}),a.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.1em] text-muted-foreground",children:En(d.type)})]}),a.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:Er(d.updated)})]},d.id))})})]})]}),e.firstRun&&a.jsx(YP,{help:o})]})]})}function QP(){const{data:e,loading:t,error:n}=dE();return t?a.jsx(kt,{label:"Loading attention queue…"}):n||!e?a.jsx(gt,{error:n||"Attention queue is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[a.jsx(et,{label:"Critical",value:e.summary.critical,icon:eC,tone:"danger"}),a.jsx(et,{label:"High",value:e.summary.high,icon:Ks,tone:"warn"}),a.jsx(et,{label:"Medium",value:e.summary.medium,icon:gC,tone:"info"}),a.jsx(et,{label:"Low",value:e.summary.low,icon:rC})]}),a.jsx(Ae,{title:"Attention Queue",description:"Ordered by severity, then by the latest parsed source update.",children:e.items.length===0?a.jsx(tt,{title:"Attention queue is clear",description:"No blocked, failed, review, or stale assignments are currently surfacing from the source files."}):a.jsx("div",{className:"space-y-3",children:e.items.map(o=>a.jsxs(Re,{to:o.href,className:"block rounded-md border border-border/60 bg-background/80 p-3 transition hover:border-primary/40",children:[a.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:o.assignmentTitle}),a.jsx("p",{className:"text-sm text-muted-foreground",children:o.projectTitle})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.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:o.severity}),a.jsx(Xt,{status:o.status})]})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:o.reason}),a.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Updated ",Er(o.updated)]})]},o.id))})})]})}function JP({term:e,description:t}){return a.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 ZP(){const{data:e,loading:t,error:n}=Sb(),{openCheatsheet:o}=Ro();return t?a.jsx(kt,{label:"Loading help…"}):n||!e?a.jsx(gt,{error:n||"Help content is unavailable."}):a.jsxs("div",{className:"space-y-5",children:[a.jsx(Ae,{title:"Keyboard Shortcuts",description:"Navigate the dashboard without reaching for the mouse.",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx("button",{type:"button",onClick:o,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"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["or press ",a.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-1.5 py-0.5 font-mono text-[11px]",children:"?"})," ","anywhere. ",Pr("Mod+k")," opens the command palette."]})]})}),a.jsx(Ae,{title:"What Syntaur Is",description:e.whatIsSyntaur.summary,children:a.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:e.whatIsSyntaur.bullets.map(i=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3 text-sm leading-6 text-muted-foreground",children:i},i))})}),a.jsx(Ae,{title:"Getting Started",children:a.jsx("div",{className:"space-y-3",children:e.workflow.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.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}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(nc,{command:i.command.command,description:i.command.description,example:i.command.example}):null,i.href?a.jsx(Re,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsxs(Ae,{title:"Core Concepts",children:[a.jsx("div",{className:"flex flex-wrap gap-2",children:e.coreConcepts.map(i=>a.jsx(JP,{term:i.term,description:i.description},i.term))}),a.jsx("div",{className:"grid gap-3 pt-2",children:e.coreConcepts.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.term}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.term))})]}),a.jsx(Ae,{title:"Status Guide",children:a.jsx("div",{className:"space-y-3",children:e.statusGuide.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Xt,{status:i.status}),a.jsx("p",{className:"font-semibold text-foreground",children:i.meaning})]}),a.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:i.useWhen})]},i.status))})})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Ae,{title:"Ownership And File Rules",children:a.jsx("div",{className:"space-y-3",children:e.ownershipRules.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description}),a.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:i.files.map(l=>a.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))})]},i.label))})}),a.jsx(Ae,{title:"How To Navigate The Dashboard",children:a.jsx("div",{className:"space-y-3",children:e.navigation.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.label}),a.jsx(Re,{className:"text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open"})]}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.description})]},i.label))})})]}),a.jsx(Ae,{title:"CLI Quick Reference",children:a.jsx("div",{className:"grid gap-3 xl:grid-cols-2",children:e.commands.map(i=>a.jsx(nc,{command:i.command,description:i.description,example:i.example},i.command))})}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[a.jsx(Ae,{title:"FAQ",children:a.jsx("div",{className:"space-y-3",children:e.faq.map(i=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.question}),a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:i.answer})]},i.question))})}),a.jsx(Ae,{title:"First Project Checklist",children:a.jsx("div",{className:"space-y-3",children:e.firstProjectChecklist.map((i,l)=>a.jsx("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.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}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:i.title}),a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:i.detail}),i.command?a.jsx(nc,{command:i.command.command,example:i.command.example}):null,i.href?a.jsx(Re,{className:"inline-flex text-sm font-semibold text-primary hover:underline",to:i.href,children:"Open the related surface"}):null]})]})},i.title))})})]})]})}function Yp({children:e}){return a.jsx("div",{className:"flex flex-col gap-2 rounded-lg border border-border/60 bg-card/80 p-2.5 shadow-sm md:flex-row md:flex-wrap md:items-center",children:e})}const _c=g.forwardRef(({value:e,onChange:t,placeholder:n="Search"},o)=>a.jsxs("label",{className:"relative flex min-w-[220px] flex-1 items-center",children:[a.jsx(qs,{className:"pointer-events-none absolute left-3 h-4 w-4 text-muted-foreground"}),a.jsx("input",{ref:o,value:e,onChange:i=>t(i.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"})]}));_c.displayName="SearchInput";function Xp({value:e,options:t,onChange:n}){return a.jsx("div",{className:"inline-flex rounded-md border border-border/60 bg-background/80 p-1",children:t.map(o=>a.jsx("button",{type:"button",onClick:()=>n(o.value),className:Ue("rounded-sm px-2.5 py-1.5 text-sm font-medium transition",e===o.value?"bg-foreground text-background":"text-muted-foreground hover:text-foreground"),children:o.label},o.value))})}function xw({columns:e,items:t,getItemId:n,getColumnId:o,renderCard:i,canDrop:l,onMove:c,emptyMessage:d="No cards in this column."}){const[p,m]=g.useState(null),[h,x]=g.useState(null),v=g.useRef(null),b=g.useMemo(()=>new Map(t.map(L=>[n(L),L])),[n,t]),N=g.useMemo(()=>e.map(L=>({column:L,items:t.filter(P=>o(P)===L.id)})),[e,o,t]),k=p?b.get(p)??null:null;function j(L){if(!k)return{allowed:!1};const P=o(k);return(l==null?void 0:l({item:k,fromColumnId:P,toColumnId:L}))??{allowed:!0}}function S(){m(null),x(null)}function R(L,P){c&&(L.dataTransfer.effectAllowed="move",L.dataTransfer.setData("text/plain",P),m(P))}function E(L,P,F){!c||!k||!j(P).allowed||(L.preventDefault(),L.dataTransfer.dropEffect="move",x(Q=>(Q==null?void 0:Q.columnId)===P&&Q.index===F?Q:{columnId:P,index:F}))}async function A(L,P,F){var G;if(L.preventDefault(),!c||!k){S();return}const _=o(k),re=(((G=N.find(K=>K.column.id===_))==null?void 0:G.items)??[]).findIndex(K=>n(K)===n(k));if(!j(P).allowed||re<0){S();return}if(_===P&&(F===re||F===re+1)){S();return}try{await c({item:k,fromColumnId:_,toColumnId:P,fromIndex:re,toIndex:F})}finally{S()}}return a.jsx("div",{className:"relative overflow-x-auto pb-2",style:{scrollbarColor:"oklch(var(--border)) transparent",scrollbarWidth:"thin"},children:a.jsx("div",{className:"grid min-w-max auto-cols-[minmax(260px,320px)] grid-flow-col gap-4",children:N.map(({column:L,items:P})=>{const F=j(L.id),_=(h==null?void 0:h.columnId)===L.id;return a.jsxs("section",{className:Ue("flex min-h-[320px] flex-col rounded-lg border border-border/60 bg-card/85 p-3 shadow-sm",k&&!F.allowed?"border-dashed opacity-65":"",k&&F.allowed?"border-primary/30 bg-accent/30":"",_?"ring-2 ring-ring/30":""),title:k&&!F.allowed?F.reason:void 0,children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-sm font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:L.title}),L.description?a.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:L.description}):null]}),a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs font-semibold text-foreground",children:P.length})]}),a.jsxs("div",{className:"flex flex-1 flex-col gap-3",onDragOver:Q=>E(Q,L.id,P.length),onDrop:Q=>A(Q,L.id,P.length),children:[P.length===0?a.jsx(eT,{active:(h==null?void 0:h.columnId)===L.id&&h.index===0,disabled:!!k&&!F.allowed,children:typeof d=="function"?d(L):d}):null,P.map((Q,re)=>{const U=n(Q),G=p===U;return a.jsxs(g.Fragment,{children:[a.jsx("div",{className:Ue("h-2 rounded-full transition",(h==null?void 0:h.columnId)===L.id&&h.index===re?"bg-primary/70":"bg-transparent"),onDragOver:K=>E(K,L.id,re),onDrop:K=>A(K,L.id,re)}),a.jsx("div",{draggable:!!c,onMouseDown:K=>{v.current=K.target},onDragStart:K=>{const Z=v.current;if(Z!=null&&Z.closest("a, button")){K.preventDefault();return}R(K,U)},onDragEnd:S,className:Ue("transition",c?"cursor-grab active:cursor-grabbing":"",G?"scale-[0.98] opacity-50":""),children:i(Q,{dragging:G})})]},U)}),P.length>0?a.jsx("div",{className:Ue("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===P.length?"border-primary/50 bg-primary/10 text-foreground":"border-border/60",k&&!F.allowed?"opacity-40":""),children:"Drop here to place at the end"}):null]})]},L.id)})})})}function eT({active:e,disabled:t,children:n}){return a.jsx("div",{className:Ue("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 yw={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 Xi=null,Go=null;function tT(){return Xi?Promise.resolve(Xi):Go||(Go=fetch("/api/config/statuses").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>(Xi=e,Go=null,e)).catch(()=>(Go=null,yw)),Go)}function Mc(){const[e,t]=g.useState(()=>Xi??yw);return g.useEffect(()=>{tT().then(t)},[]),e}function Zx(){Xi=null,Go=null}function nT(e,t){const n=e.statuses.find(o=>o.id===t);return(n==null?void 0:n.label)??t.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())}const rT={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"},ey=["bg-primary","bg-secondary","bg-accent-coral","bg-accent-teal","bg-accent-amber"];function dc({progress:e,className:t,showLegend:n=!1}){const o=Mc(),i=g.useMemo(()=>{let c=0;return(o.order.length>0?o.order:Object.keys(e).filter(p=>p!=="total")).map(p=>({key:p,className:rT[p]??ey[c++%ey.length]}))},[o.order,e]),l=i.filter(c=>(e[c.key]??0)>0);return a.jsxs("div",{className:Ue("space-y-2",t),children:[a.jsx("div",{className:"flex h-1.5 w-full overflow-hidden rounded-lg border border-border/70 bg-muted/60",children:e.total===0?a.jsx("div",{className:"h-full w-full bg-muted"}):l.map(c=>a.jsx("div",{className:c.className,style:{width:`${(e[c.key]??0)/e.total*100}%`},title:`${En(c.key)}: ${e[c.key]??0}`},c.key))}),n?a.jsx("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:i.map(c=>a.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full border border-border/60 bg-background/80 px-2 py-1",children:[a.jsx("span",{className:Ue("h-2 w-2 rounded-full",c.className)}),a.jsx("span",{children:En(c.key)}),a.jsx("span",{className:"font-medium text-foreground",children:e[c.key]??0})]},c.key))}):null]})}const oT=["pending","active","blocked","failed","completed","archived"],Qp=oT,sT=["pending","in_progress","blocked","review","completed","failed"];function iT(e){return e&&e.length>0?e:[...sT]}function aT(e,t,n){if(t<0||t>=e.length)return e;const o=[...e],[i]=o.splice(t,1),l=t<n?n-1:n;return o.splice(Math.max(0,Math.min(l,o.length)),0,i),o}function ty(){const{workspace:e}=At(),t=Lt(),n=Ut(),{data:o,loading:i,error:l,refetch:c}=Tc(),d=g.useRef(null);ts("list:projects");const[p,m]=g.useState(""),[h,x]=g.useState("all"),[v,b]=g.useState("active"),[N,k]=g.useState("all"),[j,S]=g.useState("updated"),[R,E]=Po(),A=R.get("view"),L=A==="table"||A==="kanban"?A:"cards",P=I=>{E(D=>{const $=new URLSearchParams(D);return I==="cards"?$.delete("view"):$.set("view",I),$})},[F,_]=g.useState({}),Q=g.useMemo(()=>o?o.filter(I=>{if(e){if(e==="_ungrouped"){if(I.workspace!==null)return!1}else if(I.workspace!==e)return!1}return v==="active"&&I.archived||v==="archived"&&!I.archived||h!=="all"&&I.status!==h||N!=="all"&&!I.tags.includes(N)?!1:p.trim()?`${I.title} ${I.tags.join(" ")} ${I.slug}`.toLowerCase().includes(p.toLowerCase()):!0}).sort((I,D)=>uT(I,D,j)):[],[o,p,h,v,N,j,e]),re=Q.map(I=>`${I.slug}:${I.status}`).join("|");g.useEffect(()=>{_(dT(Q))},[re,j]);const U=g.useMemo(()=>{const I=new Map(Q.map(D=>[D.slug,D]));return Qp.flatMap(D=>(F[D]??Q.filter(q=>q.status===D).map(q=>q.slug)).map(q=>I.get(q)).filter(q=>!!q))},[Q,F]),{visibleItems:G,visibleIndexByKey:K}=g.useMemo(()=>{const I=L==="kanban"?U:Q,D=new Map;return I.forEach(($,q)=>D.set($.slug,q)),{visibleItems:I,visibleIndexByKey:D}},[L,Q,U]),{hotkeyRowProps:Z}=va(G,{scope:"list:projects",onOpen:I=>n(`${t}/projects/${I.slug}`)});if(ht({keys:"/",scope:"list:projects",description:"Focus filter",handler:()=>{var I;return(I=d.current)==null?void 0:I.focus()}}),ht({keys:"r",scope:"list:projects",description:"Refresh",handler:()=>c()}),i)return a.jsx(kt,{label:"Loading projects…"});if(l||!o)return a.jsx(gt,{error:l||"Project list is unavailable."});const M=Array.from(new Set(o.flatMap(I=>I.tags))).sort();return a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Yp,{children:[a.jsx(_c,{ref:d,value:p,onChange:m,placeholder:"Search by project title or tag"}),a.jsxs("select",{value:h,onChange:I=>x(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"active",children:"Active"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"failed",children:"Failed"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"archived",children:"Archived"})]}),a.jsxs("select",{value:v,onChange:I=>b(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"active",children:"Hide archived"}),a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"archived",children:"Archived only"})]}),a.jsxs("select",{value:N,onChange:I=>k(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All tags"}),M.map(I=>a.jsx("option",{value:I,children:I},I))]}),a.jsxs("select",{value:j,onChange:I=>S(I.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"updated",children:"Sort: Updated"}),a.jsx("option",{value:"created",children:"Sort: Created"}),a.jsx("option",{value:"title",children:"Sort: Title"}),a.jsx("option",{value:"attention",children:"Sort: Attention"})]}),a.jsx(Xp,{value:L,onChange:I=>P(I),options:[{value:"cards",label:"Cards"},{value:"table",label:"Table"},{value:"kanban",label:"Kanban"}]})]}),Q.length===0?a.jsx(tt,{title:o.length===0?"No projects yet":"No projects match these filters",description:o.length===0?"A project is the high-level objective that groups assignments, resources, and memories. Create one to start the dashboard flow.":"Adjust the current search and filters or create a new project.",actions:a.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/create/project`,children:"Create Project"})}):L==="cards"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2 2xl:grid-cols-3",children:Q.map((I,D)=>a.jsxs(Re,{to:`${t}/projects/${I.slug}`,className:"block rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm transition hover:border-primary/40 hover:shadow-md",...Z(D),children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:I.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",So(I.updated)]})]}),a.jsx(Xt,{status:I.status})]}),a.jsxs("div",{className:"mt-4 space-y-3",children:[a.jsx(dc,{progress:I.progress,showLegend:!0}),a.jsx("div",{className:"flex flex-wrap gap-2",children:I.tags.map($=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:$},$))}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Needs attention"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:I.needsAttention.blockedCount+I.needsAttention.failedCount})]}),a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("p",{className:"text-muted-foreground",children:"Assignments"}),a.jsx("p",{className:"mt-1 font-semibold text-foreground",children:I.progress.total})]})]})]})]},I.slug))}):L==="table"?a.jsx(Ae,{title:`${Q.length} project${Q.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Project"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Progress"}),a.jsx("th",{className:"pb-3 font-medium",children:"Attention"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:Q.map((I,D)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...Z(D),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Re,{to:`${t}/projects/${I.slug}`,className:"font-semibold text-foreground hover:text-primary",children:I.title}),a.jsx("div",{className:"mt-1 flex flex-wrap gap-2",children:I.tags.map($=>a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:$},$))})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx(Xt,{status:I.status})}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("div",{className:"min-w-[220px]",children:a.jsx(dc,{progress:I.progress})})}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:I.needsAttention.blockedCount+I.needsAttention.failedCount}),a.jsx("td",{className:"py-4 text-muted-foreground",children:So(I.updated)})]},I.slug))})]})})}):a.jsx(xw,{columns:cT,items:U,getItemId:I=>I.slug,getColumnId:I=>I.status,canDrop:({fromColumnId:I,toColumnId:D})=>({allowed:!0,reason:I===D?void 0:"This will set a manual status override on the project."}),onMove:({item:I,fromColumnId:D,toColumnId:$,fromIndex:q,toIndex:T})=>{if(D===$){const z=F[D]??Q.filter(X=>X.status===D).map(X=>X.slug);_(X=>({...X,[D]:aT(z,q,T)}));return}fetch(`/api/projects/${I.slug}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:$})}).then(()=>{window.location.reload()})},emptyMessage:I=>`No ${I.title.toLowerCase()} projects.`,renderCard:(I,{dragging:D})=>{const $=K.get(I.slug)??-1;return a.jsx("div",{...$>=0?Z($):{},children:a.jsx(fT,{project:I,dragging:D})})}}),a.jsx("div",{className:"rounded-lg border border-border/60 bg-card/80 p-3 text-sm text-muted-foreground",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(eb,{className:"mt-0.5 h-4 w-4"}),a.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 lT={pending:"Pending",active:"Active",blocked:"Blocked",failed:"Failed",completed:"Completed",archived:"Archived"},cT=Qp.map(e=>({id:e,title:lT[e],description:gw(e)}));function uT(e,t,n){switch(n){case"created":return t.created.localeCompare(e.created);case"title":return e.title.localeCompare(t.title);case"attention":return ny(t)-ny(e);case"updated":default:return t.updated.localeCompare(e.updated)}}function ny(e){return e.needsAttention.failedCount*10+e.needsAttention.blockedCount*5+e.needsAttention.openQuestions}function dT(e){return Object.fromEntries(Qp.map(t=>[t,e.filter(n=>n.status===t).map(n=>n.slug)]))}function fT({project:e,dragging:t}){const n=Lt();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(Re,{to:`${n}/projects/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",So(e.updated)]})]}),a.jsx(Xt,{status:e.status})]}),a.jsx("div",{className:"mt-4",children:a.jsx(dc,{progress:e.progress})}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[e.tags.map(o=>a.jsx("span",{className:"rounded-full border border-border/60 bg-background/80 px-2.5 py-1 text-xs text-foreground",children:o},o)),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.progress.total," assignments"]}),a.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"]})]}),a.jsx("div",{className:"mt-4 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:t?"Reordering within status":"Derived project lane"})]})}function Vr({value:e}){const[t,n]=g.useState(!1);function o(){navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}return a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-foreground",title:t?"Copied!":`Copy: ${e}`,children:t?a.jsx(ga,{className:"h-3 w-3 text-status-completed-foreground"}):a.jsx(Ec,{className:"h-3 w-3"})})}function ry(e){const t=pT(e),n=g.forwardRef((o,i)=>{const{children:l,...c}=o,d=g.Children.toArray(l),p=d.find(mT);if(p){const m=p.props.children,h=d.map(x=>x===p?g.Children.count(m)>1?g.Children.only(null):g.isValidElement(m)?m.props.children:null:x);return a.jsx(t,{...c,ref:i,children:g.isValidElement(m)?g.cloneElement(m,void 0,h):null})}return a.jsx(t,{...c,ref:i,children:l})});return n.displayName=`${e}.Slot`,n}function pT(e){const t=g.forwardRef((n,o)=>{const{children:i,...l}=n;if(g.isValidElement(i)){const c=xT(i),d=gT(l,i.props);return i.type!==g.Fragment&&(d.ref=o?Ac(o,c):c),g.cloneElement(i,d)}return g.Children.count(i)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hT=Symbol("radix.slottable");function mT(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hT}function gT(e,t){const n={...t};for(const o in t){const i=e[o],l=t[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...d)=>{const p=l(...d);return i(...d),p}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...e,...n}}function xT(e){var o,i;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yT(e){const t=e+"CollectionProvider",[n,o]=Zo(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=k=>{const{scope:j,children:S}=k,R=Ct.useRef(null),E=Ct.useRef(new Map).current;return a.jsx(i,{scope:j,itemMap:E,collectionRef:R,children:S})};c.displayName=t;const d=e+"CollectionSlot",p=ry(d),m=Ct.forwardRef((k,j)=>{const{scope:S,children:R}=k,E=l(d,S),A=fn(j,E.collectionRef);return a.jsx(p,{ref:A,children:R})});m.displayName=d;const h=e+"CollectionItemSlot",x="data-radix-collection-item",v=ry(h),b=Ct.forwardRef((k,j)=>{const{scope:S,children:R,...E}=k,A=Ct.useRef(null),L=fn(j,A),P=l(h,S);return Ct.useEffect(()=>(P.itemMap.set(A,{ref:A,...E}),()=>void P.itemMap.delete(A))),a.jsx(v,{[x]:"",ref:L,children:R})});b.displayName=h;function N(k){const j=l(e+"CollectionConsumer",k);return Ct.useCallback(()=>{const R=j.collectionRef.current;if(!R)return[];const E=Array.from(R.querySelectorAll(`[${x}]`));return Array.from(j.itemMap.values()).sort((P,F)=>E.indexOf(P.ref.current)-E.indexOf(F.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:m,ItemSlot:b},N,o]}var vT=g.createContext(void 0);function vw(e){const t=g.useContext(vT);return e||t||"ltr"}var lf="rovingFocusGroup.onEntryFocus",bT={bubbles:!1,cancelable:!0},ba="RovingFocusGroup",[Yf,bw,wT]=yT(ba),[kT,ww]=Zo(ba,[wT]),[jT,ST]=kT(ba),kw=g.forwardRef((e,t)=>a.jsx(Yf.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Yf.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(NT,{...e,ref:t})})}));kw.displayName=ba;var NT=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:h=!1,...x}=e,v=g.useRef(null),b=fn(t,v),N=vw(l),[k,j]=Dc({prop:c,defaultProp:d??null,onChange:p,caller:ba}),[S,R]=g.useState(!1),E=Xo(m),A=bw(n),L=g.useRef(!1),[P,F]=g.useState(0);return g.useEffect(()=>{const _=v.current;if(_)return _.addEventListener(lf,E),()=>_.removeEventListener(lf,E)},[E]),a.jsx(jT,{scope:n,orientation:o,dir:N,loop:i,currentTabStopId:k,onItemFocus:g.useCallback(_=>j(_),[j]),onItemShiftTab:g.useCallback(()=>R(!0),[]),onFocusableItemAdd:g.useCallback(()=>F(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>F(_=>_-1),[]),children:a.jsx(_t.div,{tabIndex:S||P===0?-1:0,"data-orientation":o,...x,ref:b,style:{outline:"none",...e.style},onMouseDown:mt(e.onMouseDown,()=>{L.current=!0}),onFocus:mt(e.onFocus,_=>{const Q=!L.current;if(_.target===_.currentTarget&&Q&&!S){const re=new CustomEvent(lf,bT);if(_.currentTarget.dispatchEvent(re),!re.defaultPrevented){const U=A().filter(I=>I.focusable),G=U.find(I=>I.active),K=U.find(I=>I.id===k),M=[G,K,...U].filter(Boolean).map(I=>I.ref.current);Nw(M,h)}}L.current=!1}),onBlur:mt(e.onBlur,()=>R(!1))})})}),jw="RovingFocusGroupItem",Sw=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:l,children:c,...d}=e,p=Os(),m=l||p,h=ST(jw,n),x=h.currentTabStopId===m,v=bw(n),{onFocusableItemAdd:b,onFocusableItemRemove:N,currentTabStopId:k}=h;return g.useEffect(()=>{if(o)return b(),()=>N()},[o,b,N]),a.jsx(Yf.ItemSlot,{scope:n,id:m,focusable:o,active:i,children:a.jsx(_t.span,{tabIndex:x?0:-1,"data-orientation":h.orientation,...d,ref:t,onMouseDown:mt(e.onMouseDown,j=>{o?h.onItemFocus(m):j.preventDefault()}),onFocus:mt(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:mt(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){h.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=PT(j,h.orientation,h.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let E=v().filter(A=>A.focusable).map(A=>A.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const A=E.indexOf(j.currentTarget);E=h.loop?TT(E,A+1):E.slice(A+1)}setTimeout(()=>Nw(E))}}),children:typeof c=="function"?c({isCurrentTabStop:x,hasTabStop:k!=null}):c})})});Sw.displayName=jw;var CT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ET(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PT(e,t,n){const o=ET(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return CT[o]}function Nw(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function TT(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var RT=kw,AT=Sw,$c="Tabs",[DT]=Zo($c,[ww]),Cw=ww(),[IT,Jp]=DT($c),Ew=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:i,defaultValue:l,orientation:c="horizontal",dir:d,activationMode:p="automatic",...m}=e,h=vw(d),[x,v]=Dc({prop:o,onChange:i,defaultProp:l??"",caller:$c});return a.jsx(IT,{scope:n,baseId:Os(),value:x,onValueChange:v,orientation:c,dir:h,activationMode:p,children:a.jsx(_t.div,{dir:h,"data-orientation":c,...m,ref:t})})});Ew.displayName=$c;var Pw="TabsList",Tw=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...i}=e,l=Jp(Pw,n),c=Cw(n);return a.jsx(RT,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:o,children:a.jsx(_t.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:t})})});Tw.displayName=Pw;var Rw="TabsTrigger",Aw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:i=!1,...l}=e,c=Jp(Rw,n),d=Cw(n),p=Ow(c.baseId,o),m=Lw(c.baseId,o),h=o===c.value;return a.jsx(AT,{asChild:!0,...d,focusable:!i,active:h,children:a.jsx(_t.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":m,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...l,ref:t,onMouseDown:mt(e.onMouseDown,x=>{!i&&x.button===0&&x.ctrlKey===!1?c.onValueChange(o):x.preventDefault()}),onKeyDown:mt(e.onKeyDown,x=>{[" ","Enter"].includes(x.key)&&c.onValueChange(o)}),onFocus:mt(e.onFocus,()=>{const x=c.activationMode!=="manual";!h&&!i&&x&&c.onValueChange(o)})})})});Aw.displayName=Rw;var Dw="TabsContent",Iw=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:i,children:l,...c}=e,d=Jp(Dw,n),p=Ow(d.baseId,o),m=Lw(d.baseId,o),h=o===d.value,x=g.useRef(h);return g.useEffect(()=>{const v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(es,{present:i||h,children:({present:v})=>a.jsx(_t.div,{"data-state":h?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":p,hidden:!v,id:m,tabIndex:0,...c,ref:t,style:{...e.style,animationDuration:x.current?"0s":void 0},children:v&&l})})});Iw.displayName=Dw;function Ow(e,t){return`${e}-trigger-${t}`}function Lw(e,t){return`${e}-content-${t}`}var OT=Ew,LT=Tw,_T=Aw,MT=Iw;function Zp({value:e,onValueChange:t,items:n,className:o}){return a.jsxs(OT,{value:e,onValueChange:t,className:o,children:[a.jsx(LT,{className:"scrollbar-none flex gap-2 overflow-x-auto rounded-md border border-border/70 bg-card/80 p-1",children:n.map(i=>a.jsxs(_T,{value:i.value,className:Ue("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:[a.jsx("span",{children:i.label}),typeof i.count=="number"?a.jsx("span",{className:"rounded-full bg-background/20 px-2 py-0.5 text-xs data-[state=active]:bg-background/20",children:i.count}):null]},i.value))}),n.map(i=>a.jsx(MT,{value:i.value,className:"pt-3",children:i.content},i.value))]})}const $T="modulepreload",FT=function(e){return"/"+e},oy={},zT=function(t,n,o){let i=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]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));i=c(n.map(m=>{if(m=FT(m),m in oy)return;oy[m]=!0;const h=m.endsWith(".css"),x=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${x}`))return;const v=document.createElement("link");if(v.rel=h?"stylesheet":$T,h||(v.as="script"),v.crossOrigin="",v.href=m,p&&v.setAttribute("nonce",p),document.head.appendChild(v),h)return new Promise((b,N)=>{v.addEventListener("load",b),v.addEventListener("error",()=>N(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 i.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return t().catch(l)})};function BT({definition:e,className:t,nodeRoutes:n={}}){const o=g.useRef(null),[i,l]=g.useState(null),[c,d]=g.useState(!0),p=Ut(),m=document.documentElement.classList.contains("dark")?"dark":"default";return g.useEffect(()=>{let h=!1;async function x(){if(o.current)try{const v=(await zT(async()=>{const{default:k}=await import("./mermaid.core-CYbhqlNy.js").then(j=>j.bF);return{default:k}},[])).default;if(v.initialize({startOnLoad:!1,theme:m}),h)return;const b=`mermaid-${Date.now()}`,{svg:N}=await v.render(b,e);if(h||!o.current)return;o.current.innerHTML=N,UT(o.current,n,p),d(!1)}catch(v){h||(l(v instanceof Error?v.message:"Failed to render graph"),d(!1))}}return d(!0),l(null),x(),()=>{h=!0}},[e,p,n,m]),i?a.jsxs("div",{className:Ue("rounded-lg border border-border bg-card p-4",t),children:[a.jsxs("p",{className:"text-sm text-error-foreground",children:["Failed to render dependency graph: ",i]}),a.jsx("pre",{className:"mt-2 text-xs text-muted-foreground overflow-auto",children:e})]}):a.jsxs("div",{className:Ue("rounded-lg border border-border bg-card p-4",t),children:[c&&a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."}),a.jsx("div",{ref:o,className:"overflow-auto"})]})}function UT(e,t,n){var o;for(const i of e.querySelectorAll(".node")){const l=((o=i.textContent)==null?void 0:o.replace(/\s+/g," ").trim())??"",c=t[l];if(!c)continue;i.style.cursor="pointer",i.setAttribute("role","link"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label",`Open ${l}`);const d=()=>n(c);i.addEventListener("click",d),i.addEventListener("keydown",p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),d())})}}function HT(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const WT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qT={};function sy(e,t){return(qT.jsx?VT:WT).test(e)}const KT=/[ \t\n\f\r]/g;function GT(e){return typeof e=="object"?e.type==="text"?iy(e.value):!1:iy(e)}function iy(e){return e.replace(KT,"")===""}class wa{constructor(t,n,o){this.normal=n,this.property=t,o&&(this.space=o)}}wa.prototype.normal={};wa.prototype.property={};wa.prototype.space=void 0;function _w(e,t){const n={},o={};for(const i of e)Object.assign(n,i.property),Object.assign(o,i.normal);return new wa(n,o,t)}function Xf(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let YT=0;const Be=ns(),Ot=ns(),Qf=ns(),ue=ns(),it=ns(),_s=ns(),Mn=ns();function ns(){return 2**++YT}const Jf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:Ot,commaOrSpaceSeparated:Mn,commaSeparated:_s,number:ue,overloadedBoolean:Qf,spaceSeparated:it},Symbol.toStringTag,{value:"Module"})),cf=Object.keys(Jf);class eh extends Rn{constructor(t,n,o,i){let l=-1;if(super(t,n),ay(this,"space",i),typeof o=="number")for(;++l<cf.length;){const c=cf[l];ay(this,cf[l],(o&Jf[c])===Jf[c])}}}eh.prototype.defined=!0;function ay(e,t,n){n&&(e[t]=n)}function Ys(e){const t={},n={};for(const[o,i]of Object.entries(e.properties)){const l=new eh(o,e.transform(e.attributes||{},o),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(o)&&(l.mustUseProperty=!0),t[o]=l,n[Xf(o)]=o,n[Xf(l.attribute)]=o}return new wa(t,n,e.space)}const Mw=Ys({properties:{ariaActiveDescendant:null,ariaAtomic:Ot,ariaAutoComplete:null,ariaBusy:Ot,ariaChecked:Ot,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:it,ariaCurrent:null,ariaDescribedBy:it,ariaDetails:null,ariaDisabled:Ot,ariaDropEffect:it,ariaErrorMessage:null,ariaExpanded:Ot,ariaFlowTo:it,ariaGrabbed:Ot,ariaHasPopup:null,ariaHidden:Ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:it,ariaLevel:ue,ariaLive:null,ariaModal:Ot,ariaMultiLine:Ot,ariaMultiSelectable:Ot,ariaOrientation:null,ariaOwns:it,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Ot,ariaReadOnly:Ot,ariaRelevant:null,ariaRequired:Ot,ariaRoleDescription:it,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Ot,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function $w(e,t){return t in e?e[t]:t}function Fw(e,t){return $w(e,t.toLowerCase())}const XT=Ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_s,acceptCharset:it,accessKey:it,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:it,autoFocus:Be,autoPlay:Be,blocking:it,capture:null,charSet:null,checked:Be,cite:null,className:it,cols:ue,colSpan:null,content:null,contentEditable:Ot,controls:Be,controlsList:it,coords:ue|_s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:Qf,draggable:Ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:it,height:ue,hidden:Qf,high:ue,href:null,hrefLang:null,htmlFor:it,httpEquiv:it,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:it,itemRef:it,itemScope:Be,itemType:it,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:ue,pattern:null,ping:it,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:it,required:Be,reversed:Be,rows:ue,rowSpan:ue,sandbox:it,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:Ot,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:it,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Ot,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:Fw}),QT=Ys({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:Mn,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:it,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:_s,g2:_s,glyphName:_s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:it,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Mn,rev:Mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Mn,requiredFeatures:Mn,requiredFonts:Mn,requiredFormats:Mn,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Mn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$w}),zw=Ys({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()}}),Bw=Ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Fw}),Uw=Ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),JT={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"},ZT=/[A-Z]/g,ly=/-[a-z]/g,eR=/^data[-\w.:]+$/i;function tR(e,t){const n=Xf(t);let o=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&eR.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(ly,rR);o="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!ly.test(l)){let c=l.replace(ZT,nR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}i=eh}return new i(o,t)}function nR(e){return"-"+e.toLowerCase()}function rR(e){return e.charAt(1).toUpperCase()}const oR=_w([Mw,XT,zw,Bw,Uw],"html"),th=_w([Mw,QT,zw,Bw,Uw],"svg");function sR(e){return e.join(" ").trim()}var Rs={},uf,cy;function iR(){if(cy)return uf;cy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
455
|
+
`,m="/",h="*",x="",v="comment",b="declaration";function N(j,S){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];S=S||{};var R=1,E=1;function A(Z){var M=Z.match(t);M&&(R+=M.length);var I=Z.lastIndexOf(p);E=~I?Z.length-I:E+Z.length}function L(){var Z={line:R,column:E};return function(M){return M.position=new P(Z),Q(),M}}function P(Z){this.start=Z,this.end={line:R,column:E},this.source=S.source}P.prototype.content=j;function F(Z){var M=new Error(S.source+":"+R+":"+E+": "+Z);if(M.reason=Z,M.filename=S.source,M.line=R,M.column=E,M.source=j,!S.silent)throw M}function _(Z){var M=Z.exec(j);if(M){var I=M[0];return A(I),j=j.slice(I.length),M}}function Q(){_(n)}function re(Z){var M;for(Z=Z||[];M=U();)M!==!1&&Z.push(M);return Z}function U(){var Z=L();if(!(m!=j.charAt(0)||h!=j.charAt(1))){for(var M=2;x!=j.charAt(M)&&(h!=j.charAt(M)||m!=j.charAt(M+1));)++M;if(M+=2,x===j.charAt(M-1))return F("End of comment missing");var I=j.slice(2,M-2);return E+=2,A(I),j=j.slice(M),E+=2,Z({type:v,comment:I})}}function G(){var Z=L(),M=_(o);if(M){if(U(),!_(i))return F("property missing ':'");var I=_(l),D=Z({type:b,property:k(M[0].replace(e,x)),value:I?k(I[0].replace(e,x)):x});return _(c),D}}function K(){var Z=[];re(Z);for(var M;M=G();)M!==!1&&(Z.push(M),re(Z));return Z}return Q(),K()}function k(j){return j?j.replace(d,x):x}return uf=N,uf}var uy;function aR(){if(uy)return Rs;uy=1;var e=Rs&&Rs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=n;const t=e(iR());function n(o,i){let l=null;if(!o||typeof o!="string")return l;const c=(0,t.default)(o),d=typeof i=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:h}=p;d?i(m,h,p):h&&(l=l||{},l[m]=h)}),l}return Rs}var Ui={},dy;function lR(){if(dy)return Ui;dy=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(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,"-")},p=function(m,h){return h===void 0&&(h={}),l(m)?m:(m=m.toLowerCase(),h.reactCompat?m=m.replace(i,d):m=m.replace(o,d),m.replace(t,c))};return Ui.camelCase=p,Ui}var Hi,fy;function cR(){if(fy)return Hi;fy=1;var e=Hi&&Hi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(aR()),n=lR();function o(i,l){var c={};return!i||typeof i!="string"||(0,t.default)(i,function(d,p){d&&p&&(c[(0,n.camelCase)(d,l)]=p)}),c}return o.default=o,Hi=o,Hi}var uR=cR();const dR=jc(uR),Hw=Ww("end"),nh=Ww("start");function Ww(e){return t;function t(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function fR(e){const t=nh(e),n=Hw(e);if(t&&n)return{start:t,end:n}}function Qi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?py(e.position):"start"in e||"end"in e?py(e):"line"in e||"column"in e?Zf(e):""}function Zf(e){return hy(e&&e.line)+":"+hy(e&&e.column)}function py(e){return Zf(e&&e.start)+"-"+Zf(e&&e.end)}function hy(e){return e&&typeof e=="number"?e:1}class pn extends Error{constructor(t,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let i="",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"?i=t:!l.cause&&t&&(c=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof o=="string"){const p=o.indexOf(":");p===-1?l.ruleId=o:(l.source=o.slice(0,p),l.ruleId=o.slice(p+1))}if(!l.place&&l.ancestors&&l.ancestors){const p=l.ancestors[l.ancestors.length-1];p&&(l.place=p.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=i,this.line=d?d.line:void 0,this.name=Qi(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}}pn.prototype.file="";pn.prototype.name="";pn.prototype.reason="";pn.prototype.message="";pn.prototype.stack="";pn.prototype.column=void 0;pn.prototype.line=void 0;pn.prototype.ancestors=void 0;pn.prototype.cause=void 0;pn.prototype.fatal=void 0;pn.prototype.place=void 0;pn.prototype.ruleId=void 0;pn.prototype.source=void 0;const rh={}.hasOwnProperty,pR=new Map,hR=/[A-Z]/g,mR=new Set(["table","tbody","thead","tfoot","tr"]),gR=new Set(["td","th"]),Vw="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 o;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=NR(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");o=SR(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,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"?th:oR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=qw(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function qw(e,t,n){if(t.type==="element")return yR(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return vR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wR(e,t,n);if(t.type==="mdxjsEsm")return bR(e,t);if(t.type==="root")return kR(e,t,n);if(t.type==="text")return jR(e,t)}function yR(e,t,n){const o=e.schema;let i=o;t.tagName.toLowerCase()==="svg"&&o.space==="html"&&(i=th,e.schema=i),e.ancestors.push(t);const l=Gw(e,t.tagName,!1),c=CR(e,t);let d=sh(e,t);return mR.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!GT(p):!0})),Kw(e,c,l,t),oh(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function vR(e,t){if(t.data&&t.data.estree&&e.evaluater){const o=t.data.estree.body[0];return o.type,e.evaluater.evaluateExpression(o.expression)}la(e,t.position)}function bR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);la(e,t.position)}function wR(e,t,n){const o=e.schema;let i=o;t.name==="svg"&&o.space==="html"&&(i=th,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:Gw(e,t.name,!0),c=ER(e,t),d=sh(e,t);return Kw(e,c,l,t),oh(c,d),e.ancestors.pop(),e.schema=o,e.create(t,l,c,n)}function kR(e,t,n){const o={};return oh(o,sh(e,t)),e.create(t,e.Fragment,o,n)}function jR(e,t){return t.value}function Kw(e,t,n,o){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=o)}function oh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function SR(e,t,n){return o;function o(i,l,c,d){const m=Array.isArray(c.children)?n:t;return d?m(l,c,d):m(l,c)}}function NR(e,t){return n;function n(o,i,l,c){const d=Array.isArray(l.children),p=nh(o);return t(i,l,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function CR(e,t){const n={};let o,i;for(i in t.properties)if(i!=="children"&&rh.call(t.properties,i)){const l=PR(e,i,t.properties[i]);if(l){const[c,d]=l;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&gR.has(t.tagName)?o=d:n[c]=d}}if(o){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return n}function ER(e,t){const n={};for(const o of t.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&e.evaluater){const l=o.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 la(e,t.position);else{const i=o.name;let l;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&e.evaluater){const d=o.value.data.estree.body[0];d.type,l=e.evaluater.evaluateExpression(d.expression)}else la(e,t.position);else l=o.value===null?!0:o.value;n[i]=l}return n}function sh(e,t){const n=[];let o=-1;const i=e.passKeys?new Map:pR;for(;++o<t.children.length;){const l=t.children[o];let c;if(e.passKeys){const p=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(p){const m=i.get(p)||0;c=p+"-"+m,i.set(p,m+1)}}const d=qw(e,l,c);d!==void 0&&n.push(d)}return n}function PR(e,t,n){const o=tR(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=o.commaSeparated?HT(n):sR(n)),o.property==="style"){let i=typeof n=="object"?n:TR(e,String(n));return e.stylePropertyNameCase==="css"&&(i=RR(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&o.space?JT[o.property]||o.property:o.attribute,n]}}function TR(e,t){try{return dR(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const o=n,i=new pn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Vw+"#cannot-parse-style-attribute",i}}function Gw(e,t,n){let o;if(!n)o={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,c;for(;++l<i.length;){const d=sy(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(l&&d.type==="Literal"),optional:!1}:d}o=c}else o=sy(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(o.type==="Literal"){const i=o.value;return rh.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(o);la(e)}function la(e,t){const n=new pn("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=Vw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function RR(e){const t={};let n;for(n in e)rh.call(e,n)&&(t[AR(n)]=e[n]);return t}function AR(e){let t=e.replace(hR,DR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function DR(e){return"-"+e.toLowerCase()}const df={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"]},IR={};function OR(e,t){const n=IR,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Yw(e,o,i)}function Yw(e,t,n){if(LR(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 my(e.children,t,n)}return Array.isArray(e)?my(e,t,n):""}function my(e,t,n){const o=[];let i=-1;for(;++i<e.length;)o[i]=Yw(e[i],t,n);return o.join("")}function LR(e){return!!(e&&typeof e=="object")}const gy=document.createElement("i");function ih(e){const t="&"+e+";";gy.innerHTML=t;const n=gy.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rr(e,t,n,o){const i=e.length;let l=0,c;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,o.length<1e4)c=Array.from(o),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);l<o.length;)c=o.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Jn(e,t){return e.length>0?(Rr(e,e.length,0,t),e):t}const xy={}.hasOwnProperty;function _R(e){const t={};let n=-1;for(;++n<e.length;)MR(t,e[n]);return t}function MR(e,t){let n;for(n in t){const i=(xy.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let c;if(l)for(c in l){xy.call(i,c)||(i[c]=[]);const d=l[c];$R(i[c],Array.isArray(d)?d:d?[d]:[])}}}function $R(e,t){let n=-1;const o=[];for(;++n<t.length;)(t[n].add==="after"?e:o).push(t[n]);Rr(e,0,0,o)}function Xw(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 Ms(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sr=Ao(/[A-Za-z]/),Fn=Ao(/[\dA-Za-z]/),FR=Ao(/[#-'*+\--9=?A-Z^-~]/);function ep(e){return e!==null&&(e<32||e===127)}const tp=Ao(/\d/),zR=Ao(/[\dA-Fa-f]/),BR=Ao(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function Tn(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const UR=Ao(new RegExp("\\p{P}|\\p{S}","u")),HR=Ao(/\s/);function Ao(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Xs(e){const t=[];let n=-1,o=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let c="";if(l===37&&Fn(e.charCodeAt(n+1))&&Fn(e.charCodeAt(n+2)))i=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),i=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(o,n),encodeURIComponent(c)),o=n+i+1,c=""),i&&(n+=i,i=0)}return t.join("")+e.slice(o)}function at(e,t,n,o){const i=o?o-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(p){return Xe(p)?(e.enter(n),d(p)):t(p)}function d(p){return Xe(p)&&l++<i?(e.consume(p),d):(e.exit(n),t(p))}}const WR={tokenize:VR};function VR(e){const t=e.attempt(this.parser.constructs.contentInitial,o,i);let n;return t;function o(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),at(e,t,"linePrefix")}function i(d){return e.enter("paragraph"),l(d)}function l(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Me(d)?(e.consume(d),e.exit("chunkText"),l):(e.consume(d),c)}}const qR={tokenize:KR},yy={tokenize:GR};function KR(e){const t=this,n=[];let o=0,i,l,c;return d;function d(E){if(o<n.length){const A=n[o];return t.containerState=A[1],e.attempt(A[0].continuation,p,m)(E)}return m(E)}function p(E){if(o++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&R();const A=t.events.length;let L=A,P;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){P=t.events[L][1].end;break}S(o);let F=A;for(;F<t.events.length;)t.events[F][1].end={...P},F++;return Rr(t.events,L+1,0,t.events.slice(A)),t.events.length=F,m(E)}return d(E)}function m(E){if(o===n.length){if(!i)return v(E);if(i.currentConstruct&&i.currentConstruct.concrete)return N(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(yy,h,x)(E)}function h(E){return i&&R(),S(o),v(E)}function x(E){return t.parser.lazy[t.now().line]=o!==n.length,c=t.now().offset,N(E)}function v(E){return t.containerState={},e.attempt(yy,b,N)(E)}function b(E){return o++,n.push([t.currentConstruct,t.containerState]),v(E)}function N(E){if(E===null){i&&R(),S(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),k(E)}function k(E){if(E===null){j(e.exit("chunkFlow"),!0),S(0),e.consume(E);return}return Me(E)?(e.consume(E),j(e.exit("chunkFlow")),o=0,t.interrupt=void 0,d):(e.consume(E),k)}function j(E,A){const L=t.sliceStream(E);if(A&&L.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(L),t.parser.lazy[E.start.line]){let P=i.events.length;for(;P--;)if(i.events[P][1].start.offset<c&&(!i.events[P][1].end||i.events[P][1].end.offset>c))return;const F=t.events.length;let _=F,Q,re;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(Q){re=t.events[_][1].end;break}Q=!0}for(S(o),P=F;P<t.events.length;)t.events[P][1].end={...re},P++;Rr(t.events,_+1,0,t.events.slice(F)),t.events.length=P}}function S(E){let A=n.length;for(;A-- >E;){const L=n[A];t.containerState=L[1],L[0].exit.call(t,e)}n.length=E}function R(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function GR(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vy(e){if(e===null||Tn(e)||HR(e))return 1;if(UR(e))return 2}function ah(e,t,n){const o=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!o.includes(l)&&(t=l(t,n),o.push(l))}return t}const np={name:"attention",resolveAll:YR,tokenize:XR};function YR(e,t){let n=-1,o,i,l,c,d,p,m,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(o=n;o--;)if(e[o][0]==="exit"&&e[o][1].type==="attentionSequence"&&e[o][1]._open&&t.sliceSerialize(e[o][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[o][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[o][1].end.offset-e[o][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;p=e[o][1].end.offset-e[o][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const x={...e[o][1].end},v={...e[n][1].start};by(x,-p),by(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:x,end:{...e[o][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},l={type:p>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},i={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[o][1].end={...c.start},e[n][1].start={...d.end},m=[],e[o][1].end.offset-e[o][1].start.offset&&(m=Jn(m,[["enter",e[o][1],t],["exit",e[o][1],t]])),m=Jn(m,[["enter",i,t],["enter",c,t],["exit",c,t],["enter",l,t]]),m=Jn(m,ah(t.parser.constructs.insideSpan.null,e.slice(o+1,n),t)),m=Jn(m,[["exit",l,t],["enter",d,t],["exit",d,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,m=Jn(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Rr(e,o-1,n-o+3,m),n=o+m.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function XR(e,t){const n=this.parser.constructs.attentionMarkers.null,o=this.previous,i=vy(o);let l;return c;function c(p){return l=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===l)return e.consume(p),d;const m=e.exit("attentionSequence"),h=vy(p),x=!h||h===2&&i||n.includes(p),v=!i||i===2&&h||n.includes(o);return m._open=!!(l===42?x:x&&(i||!v)),m._close=!!(l===42?v:v&&(h||!x)),t(p)}}function by(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QR={name:"autolink",tokenize:JR};function JR(e,t,n){let o=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(b){return Sr(b)?(e.consume(b),c):b===64?n(b):m(b)}function c(b){return b===43||b===45||b===46||Fn(b)?(o=1,d(b)):m(b)}function d(b){return b===58?(e.consume(b),o=0,p):(b===43||b===45||b===46||Fn(b))&&o++<32?(e.consume(b),d):(o=0,m(b))}function p(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||ep(b)?n(b):(e.consume(b),p)}function m(b){return b===64?(e.consume(b),h):FR(b)?(e.consume(b),m):n(b)}function h(b){return Fn(b)?x(b):n(b)}function x(b){return b===46?(e.consume(b),o=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):v(b)}function v(b){if((b===45||Fn(b))&&o++<63){const N=b===45?v:x;return e.consume(b),N}return n(b)}}const Fc={partial:!0,tokenize:ZR};function ZR(e,t,n){return o;function o(l){return Xe(l)?at(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||Me(l)?t(l):n(l)}}const Qw={continuation:{tokenize:tA},exit:nA,name:"blockQuote",tokenize:eA};function eA(e,t,n){const o=this;return i;function i(c){if(c===62){const d=o.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 Xe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function tA(e,t,n){const o=this;return i;function i(c){return Xe(c)?at(e,l,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(Qw,t,n)(c)}}function nA(e){e.exit("blockQuote")}const Jw={name:"characterEscape",tokenize:rA};function rA(e,t,n){return o;function o(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return BR(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Zw={name:"characterReference",tokenize:oA};function oA(e,t,n){const o=this;let i=0,l,c;return d;function d(x){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),p}function p(x){return x===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(x),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,c=Fn,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=zR,h):(e.enter("characterReferenceValue"),l=7,c=tp,h(x))}function h(x){if(x===59&&i){const v=e.exit("characterReferenceValue");return c===Fn&&!ih(o.sliceSerialize(v))?n(x):(e.enter("characterReferenceMarker"),e.consume(x),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(x)&&i++<l?(e.consume(x),h):n(x)}}const wy={partial:!0,tokenize:iA},ky={concrete:!0,name:"codeFenced",tokenize:sA};function sA(e,t,n){const o=this,i={partial:!0,tokenize:L};let l=0,c=0,d;return p;function p(P){return m(P)}function m(P){const F=o.events[o.events.length-1];return l=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,d=P,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(P)}function h(P){return P===d?(c++,e.consume(P),h):c<3?n(P):(e.exit("codeFencedFenceSequence"),Xe(P)?at(e,x,"whitespace")(P):x(P))}function x(P){return P===null||Me(P)?(e.exit("codeFencedFence"),o.interrupt?t(P):e.check(wy,k,A)(P)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Me(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),x(P)):Xe(P)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,b,"whitespace")(P)):P===96&&P===d?n(P):(e.consume(P),v)}function b(P){return P===null||Me(P)?x(P):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(P))}function N(P){return P===null||Me(P)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),x(P)):P===96&&P===d?n(P):(e.consume(P),N)}function k(P){return e.attempt(i,A,j)(P)}function j(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),S}function S(P){return l>0&&Xe(P)?at(e,R,"linePrefix",l+1)(P):R(P)}function R(P){return P===null||Me(P)?e.check(wy,k,A)(P):(e.enter("codeFlowValue"),E(P))}function E(P){return P===null||Me(P)?(e.exit("codeFlowValue"),R(P)):(e.consume(P),E)}function A(P){return e.exit("codeFenced"),t(P)}function L(P,F,_){let Q=0;return re;function re(M){return P.enter("lineEnding"),P.consume(M),P.exit("lineEnding"),U}function U(M){return P.enter("codeFencedFence"),Xe(M)?at(P,G,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):G(M)}function G(M){return M===d?(P.enter("codeFencedFenceSequence"),K(M)):_(M)}function K(M){return M===d?(Q++,P.consume(M),K):Q>=c?(P.exit("codeFencedFenceSequence"),Xe(M)?at(P,Z,"whitespace")(M):Z(M)):_(M)}function Z(M){return M===null||Me(M)?(P.exit("codeFencedFence"),F(M)):_(M)}}}function iA(e,t,n){const o=this;return i;function i(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}const ff={name:"codeIndented",tokenize:lA},aA={partial:!0,tokenize:cA};function lA(e,t,n){const o=this;return i;function i(m){return e.enter("codeIndented"),at(e,l,"linePrefix",5)(m)}function l(m){const h=o.events[o.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?p(m):Me(m)?e.attempt(aA,c,p)(m):(e.enter("codeFlowValue"),d(m))}function d(m){return m===null||Me(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),d)}function p(m){return e.exit("codeIndented"),t(m)}}function cA(e,t,n){const o=this;return i;function i(c){return o.parser.lazy[o.now().line]?n(c):Me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),i):at(e,l,"linePrefix",5)(c)}function l(c){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):Me(c)?i(c):n(c)}}const uA={name:"codeText",previous:fA,resolve:dA,tokenize:pA};function dA(e){let t=e.length-4,n=3,o,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(o=n;++o<t;)if(e[o][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(o=n-1,t++;++o<=t;)i===void 0?o!==t&&e[o][1].type!=="lineEnding"&&(i=o):(o===t||e[o][1].type==="lineEnding")&&(e[i][1].type="codeTextData",o!==i+2&&(e[i][1].end=e[o-1][1].end,e.splice(i+2,o-i-2),t-=o-i-2,o=i+2),i=void 0);return e}function fA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pA(e,t,n){let o=0,i,l;return c;function c(x){return e.enter("codeText"),e.enter("codeTextSequence"),d(x)}function d(x){return x===96?(e.consume(x),o++,d):(e.exit("codeTextSequence"),p(x))}function p(x){return x===null?n(x):x===32?(e.enter("space"),e.consume(x),e.exit("space"),p):x===96?(l=e.enter("codeTextSequence"),i=0,h(x)):Me(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||Me(x)?(e.exit("codeTextData"),p(x)):(e.consume(x),m)}function h(x){return x===96?(e.consume(x),i++,h):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(x)):(l.type="codeTextData",m(x))}}class hA{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 o=n??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(t,o):t>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(t,n,o){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return o&&Wi(this.left,o),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),Wi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wi(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);Wi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wi(this.left,n.reverse())}}}function Wi(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 e0(e){const t={};let n=-1,o,i,l,c,d,p,m;const h=new hA(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(o=h.get(n),n&&o[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(p=o[1]._tokenizer.events,l=0,l<p.length&&p[l][1].type==="lineEndingBlank"&&(l+=2),l<p.length&&p[l][1].type==="content"))for(;++l<p.length&&p[l][1].type!=="content";)p[l][1].type==="chunkText"&&(p[l][1]._isInFirstContentOfListItem=!0,l++);if(o[0]==="enter")o[1].contentType&&(Object.assign(t,mA(h,n)),n=t[n],m=!0);else if(o[1]._container){for(l=n,i=void 0;l--;)if(c=h.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),c[1].type="lineEnding",i=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;i&&(o[1].end={...h.get(i)[1].start},d=h.slice(i,n),d.unshift(o),h.splice(i,n-i+1,d))}}return Rr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!m}function mA(e,t){const n=e.get(t)[1],o=e.get(t)[2];let i=t-1;const l=[];let c=n._tokenizer;c||(c=o.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let h,x,v=-1,b=n,N=0,k=0;const j=[k];for(;b;){for(;e.get(++i)[1]!==b;);l.push(i),b._tokenizer||(h=o.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;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(k=v+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(),v=j.length;v--;){const S=d.slice(j[v],j[v+1]),R=l.pop();p.push([R,R+S.length-1]),e.splice(R,2,S)}for(p.reverse(),v=-1;++v<p.length;)m[N+p[v][0]]=N+p[v][1],N+=p[v][1]-p[v][0]-1;return m}const gA={resolve:yA,tokenize:vA},xA={partial:!0,tokenize:bA};function yA(e){return e0(e),e}function vA(e,t){let n;return o;function o(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(d)}function i(d){return d===null?l(d):Me(d)?e.check(xA,c,l)(d):(e.consume(d),i)}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,i}}function bA(e,t,n){const o=this;return i;function i(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),at(e,l,"linePrefix")}function l(c){if(c===null||Me(c))return n(c);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(o.parser.constructs.flow,n,t)(c)}}function t0(e,t,n,o,i,l,c,d,p){const m=p||Number.POSITIVE_INFINITY;let h=0;return x;function x(S){return S===60?(e.enter(o),e.enter(i),e.enter(l),e.consume(S),e.exit(l),v):S===null||S===32||S===41||ep(S)?n(S):(e.enter(o),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(S))}function v(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(i),e.exit(o),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(e.exit("chunkString"),e.exit(d),v(S)):S===null||S===60||Me(S)?n(S):(e.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(e.consume(S),b):b(S)}function k(S){return!h&&(S===null||S===41||Tn(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(o),t(S)):h<m&&S===40?(e.consume(S),h++,k):S===41?(e.consume(S),h--,k):S===null||S===32||S===40||ep(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 n0(e,t,n,o,i,l){const c=this;let d=0,p;return m;function m(b){return e.enter(o),e.enter(i),e.consume(b),e.exit(i),e.enter(l),h}function h(b){return d>999||b===null||b===91||b===93&&!p||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?n(b):b===93?(e.exit(l),e.enter(i),e.consume(b),e.exit(i),e.exit(o),t):Me(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||Me(b)||d++>999?(e.exit("chunkString"),h(b)):(e.consume(b),p||(p=!Xe(b)),b===92?v:x)}function v(b){return b===91||b===92||b===93?(e.consume(b),d++,x):x(b)}}function r0(e,t,n,o,i,l){let c;return d;function d(v){return v===34||v===39||v===40?(e.enter(o),e.enter(i),e.consume(v),e.exit(i),c=v===40?41:v,p):n(v)}function p(v){return v===c?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),t):(e.enter(l),m(v))}function m(v){return v===c?(e.exit(l),p(c)):v===null?n(v):Me(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),at(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===c||v===null||Me(v)?(e.exit("chunkString"),m(v)):(e.consume(v),v===92?x:h)}function x(v){return v===c||v===92?(e.consume(v),h):h(v)}}function Ji(e,t){let n;return o;function o(i){return Me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,o):Xe(i)?at(e,o,n?"linePrefix":"lineSuffix")(i):t(i)}}const wA={name:"definition",tokenize:jA},kA={partial:!0,tokenize:SA};function jA(e,t,n){const o=this;let i;return l;function l(b){return e.enter("definition"),c(b)}function c(b){return n0.call(o,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return i=Ms(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):n(b)}function p(b){return Tn(b)?Ji(e,m)(b):m(b)}function m(b){return t0(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(kA,x,x)(b)}function x(b){return Xe(b)?at(e,v,"whitespace")(b):v(b)}function v(b){return b===null||Me(b)?(e.exit("definition"),o.parser.defined.push(i),t(b)):n(b)}}function SA(e,t,n){return o;function o(d){return Tn(d)?Ji(e,i)(d):n(d)}function i(d){return r0(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function l(d){return Xe(d)?at(e,c,"whitespace")(d):c(d)}function c(d){return d===null||Me(d)?t(d):n(d)}}const NA={name:"hardBreakEscape",tokenize:CA};function CA(e,t,n){return o;function o(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return Me(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const EA={name:"headingAtx",resolve:PA,tokenize:TA};function PA(e,t){let n=e.length-2,o=3,i,l;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(i={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},l={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Rr(e,o,n-o+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function TA(e,t,n){let o=0;return i;function i(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),c(h)}function c(h){return h===35&&o++<6?(e.consume(h),c):h===null||Tn(h)?(e.exit("atxHeadingSequence"),d(h)):n(h)}function d(h){return h===35?(e.enter("atxHeadingSequence"),p(h)):h===null||Me(h)?(e.exit("atxHeading"),t(h)):Xe(h)?at(e,d,"whitespace")(h):(e.enter("atxHeadingText"),m(h))}function p(h){return h===35?(e.consume(h),p):(e.exit("atxHeadingSequence"),d(h))}function m(h){return h===null||h===35||Tn(h)?(e.exit("atxHeadingText"),d(h)):(e.consume(h),m)}}const RA=["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"],jy=["pre","script","style","textarea"],AA={concrete:!0,name:"htmlFlow",resolveTo:OA,tokenize:LA},DA={partial:!0,tokenize:MA},IA={partial:!0,tokenize:_A};function OA(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 LA(e,t,n){const o=this;let i,l,c,d,p;return m;function m(O){return h(O)}function h(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),x}function x(O){return O===33?(e.consume(O),v):O===47?(e.consume(O),l=!0,k):O===63?(e.consume(O),i=3,o.interrupt?t:T):Sr(O)?(e.consume(O),c=String.fromCharCode(O),j):n(O)}function v(O){return O===45?(e.consume(O),i=2,b):O===91?(e.consume(O),i=5,d=0,N):Sr(O)?(e.consume(O),i=4,o.interrupt?t:T):n(O)}function b(O){return O===45?(e.consume(O),o.interrupt?t:T):n(O)}function N(O){const pe="CDATA[";return O===pe.charCodeAt(d++)?(e.consume(O),d===pe.length?o.interrupt?t:G:N):n(O)}function k(O){return Sr(O)?(e.consume(O),c=String.fromCharCode(O),j):n(O)}function j(O){if(O===null||O===47||O===62||Tn(O)){const pe=O===47,Ce=c.toLowerCase();return!pe&&!l&&jy.includes(Ce)?(i=1,o.interrupt?t(O):G(O)):RA.includes(c.toLowerCase())?(i=6,pe?(e.consume(O),S):o.interrupt?t(O):G(O)):(i=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(O):l?R(O):E(O))}return O===45||Fn(O)?(e.consume(O),c+=String.fromCharCode(O),j):n(O)}function S(O){return O===62?(e.consume(O),o.interrupt?t:G):n(O)}function R(O){return Xe(O)?(e.consume(O),R):re(O)}function E(O){return O===47?(e.consume(O),re):O===58||O===95||Sr(O)?(e.consume(O),A):Xe(O)?(e.consume(O),E):re(O)}function A(O){return O===45||O===46||O===58||O===95||Fn(O)?(e.consume(O),A):L(O)}function L(O){return O===61?(e.consume(O),P):Xe(O)?(e.consume(O),L):E(O)}function P(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),p=O,F):Xe(O)?(e.consume(O),P):_(O)}function F(O){return O===p?(e.consume(O),p=null,Q):O===null||Me(O)?n(O):(e.consume(O),F)}function _(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||Tn(O)?L(O):(e.consume(O),_)}function Q(O){return O===47||O===62||Xe(O)?E(O):n(O)}function re(O){return O===62?(e.consume(O),U):n(O)}function U(O){return O===null||Me(O)?G(O):Xe(O)?(e.consume(O),U):n(O)}function G(O){return O===45&&i===2?(e.consume(O),I):O===60&&i===1?(e.consume(O),D):O===62&&i===4?(e.consume(O),z):O===63&&i===3?(e.consume(O),T):O===93&&i===5?(e.consume(O),q):Me(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(DA,X,K)(O)):O===null||Me(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),G)}function K(O){return e.check(IA,Z,X)(O)}function Z(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),M}function M(O){return O===null||Me(O)?K(O):(e.enter("htmlFlowData"),G(O))}function I(O){return O===45?(e.consume(O),T):G(O)}function D(O){return O===47?(e.consume(O),c="",$):G(O)}function $(O){if(O===62){const pe=c.toLowerCase();return jy.includes(pe)?(e.consume(O),z):G(O)}return Sr(O)&&c.length<8?(e.consume(O),c+=String.fromCharCode(O),$):G(O)}function q(O){return O===93?(e.consume(O),T):G(O)}function T(O){return O===62?(e.consume(O),z):O===45&&i===2?(e.consume(O),T):G(O)}function z(O){return O===null||Me(O)?(e.exit("htmlFlowData"),X(O)):(e.consume(O),z)}function X(O){return e.exit("htmlFlow"),t(O)}}function _A(e,t,n){const o=this;return i;function i(c){return Me(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):n(c)}function l(c){return o.parser.lazy[o.now().line]?n(c):t(c)}}function MA(e,t,n){return o;function o(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Fc,t,n)}}const $A={name:"htmlText",tokenize:FA};function FA(e,t,n){const o=this;let i,l,c;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),p}function p(T){return T===33?(e.consume(T),m):T===47?(e.consume(T),L):T===63?(e.consume(T),E):Sr(T)?(e.consume(T),_):n(T)}function m(T){return T===45?(e.consume(T),h):T===91?(e.consume(T),l=0,N):Sr(T)?(e.consume(T),R):n(T)}function h(T){return T===45?(e.consume(T),b):n(T)}function x(T){return T===null?n(T):T===45?(e.consume(T),v):Me(T)?(c=x,D(T)):(e.consume(T),x)}function v(T){return T===45?(e.consume(T),b):x(T)}function b(T){return T===62?I(T):T===45?v(T):x(T)}function N(T){const z="CDATA[";return T===z.charCodeAt(l++)?(e.consume(T),l===z.length?k:N):n(T)}function k(T){return T===null?n(T):T===93?(e.consume(T),j):Me(T)?(c=k,D(T)):(e.consume(T),k)}function j(T){return T===93?(e.consume(T),S):k(T)}function S(T){return T===62?I(T):T===93?(e.consume(T),S):k(T)}function R(T){return T===null||T===62?I(T):Me(T)?(c=R,D(T)):(e.consume(T),R)}function E(T){return T===null?n(T):T===63?(e.consume(T),A):Me(T)?(c=E,D(T)):(e.consume(T),E)}function A(T){return T===62?I(T):E(T)}function L(T){return Sr(T)?(e.consume(T),P):n(T)}function P(T){return T===45||Fn(T)?(e.consume(T),P):F(T)}function F(T){return Me(T)?(c=F,D(T)):Xe(T)?(e.consume(T),F):I(T)}function _(T){return T===45||Fn(T)?(e.consume(T),_):T===47||T===62||Tn(T)?Q(T):n(T)}function Q(T){return T===47?(e.consume(T),I):T===58||T===95||Sr(T)?(e.consume(T),re):Me(T)?(c=Q,D(T)):Xe(T)?(e.consume(T),Q):I(T)}function re(T){return T===45||T===46||T===58||T===95||Fn(T)?(e.consume(T),re):U(T)}function U(T){return T===61?(e.consume(T),G):Me(T)?(c=U,D(T)):Xe(T)?(e.consume(T),U):Q(T)}function G(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),i=T,K):Me(T)?(c=G,D(T)):Xe(T)?(e.consume(T),G):(e.consume(T),Z)}function K(T){return T===i?(e.consume(T),i=void 0,M):T===null?n(T):Me(T)?(c=K,D(T)):(e.consume(T),K)}function Z(T){return T===null||T===34||T===39||T===60||T===61||T===96?n(T):T===47||T===62||Tn(T)?Q(T):(e.consume(T),Z)}function M(T){return T===47||T===62||Tn(T)?Q(T):n(T)}function I(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):n(T)}function D(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),$}function $(T){return Xe(T)?at(e,q,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):q(T)}function q(T){return e.enter("htmlTextData"),c(T)}}const lh={name:"labelEnd",resolveAll:HA,resolveTo:WA,tokenize:VA},zA={tokenize:qA},BA={tokenize:KA},UA={tokenize:GA};function HA(e){let t=-1;const n=[];for(;++t<e.length;){const o=e[t][1];if(n.push(e[t]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const i=o.type==="labelImage"?4:2;o.type="data",t+=i}}return e.length!==n.length&&Rr(e,0,e.length,n),e}function WA(e,t){let n=e.length,o=0,i,l,c,d;for(;n--;)if(i=e[n][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=n,i.type!=="labelLink")){o=2;break}}else i.type==="labelEnd"&&(c=n);const p={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+o+2][1].end},end:{...e[c-2][1].start}};return d=[["enter",p,t],["enter",m,t]],d=Jn(d,e.slice(l+1,l+o+3)),d=Jn(d,[["enter",h,t]]),d=Jn(d,ah(t.parser.constructs.insideSpan.null,e.slice(l+o+4,c-3),t)),d=Jn(d,[["exit",h,t],e[c-2],e[c-1],["exit",m,t]]),d=Jn(d,e.slice(c+1)),d=Jn(d,[["exit",p,t]]),Rr(e,l,e.length,d),e}function VA(e,t,n){const o=this;let i=o.events.length,l,c;for(;i--;)if((o.events[i][1].type==="labelImage"||o.events[i][1].type==="labelLink")&&!o.events[i][1]._balanced){l=o.events[i][1];break}return d;function d(v){return l?l._inactive?x(v):(c=o.parser.defined.includes(Ms(o.sliceSerialize({start:l.end,end:o.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):n(v)}function p(v){return v===40?e.attempt(zA,h,c?h:x)(v):v===91?e.attempt(BA,h,c?m:x)(v):c?h(v):x(v)}function m(v){return e.attempt(UA,h,x)(v)}function h(v){return t(v)}function x(v){return l._balanced=!0,n(v)}}function qA(e,t,n){return o;function o(x){return e.enter("resource"),e.enter("resourceMarker"),e.consume(x),e.exit("resourceMarker"),i}function i(x){return Tn(x)?Ji(e,l)(x):l(x)}function l(x){return x===41?h(x):t0(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function c(x){return Tn(x)?Ji(e,p)(x):h(x)}function d(x){return n(x)}function p(x){return x===34||x===39||x===40?r0(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):h(x)}function m(x){return Tn(x)?Ji(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 KA(e,t,n){const o=this;return i;function i(d){return n0.call(o,e,l,c,"reference","referenceMarker","referenceString")(d)}function l(d){return o.parser.defined.includes(Ms(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function GA(e,t,n){return o;function o(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const YA={name:"labelStartImage",resolveAll:lh.resolveAll,tokenize:XA};function XA(e,t,n){const o=this;return i;function i(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 o.parser.constructs?n(d):t(d)}}const QA={name:"labelStartLink",resolveAll:lh.resolveAll,tokenize:JA};function JA(e,t,n){const o=this;return i;function i(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 o.parser.constructs?n(c):t(c)}}const pf={name:"lineEnding",tokenize:ZA};function ZA(e,t){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),at(e,t,"linePrefix")}}const rc={name:"thematicBreak",tokenize:e3};function e3(e,t,n){let o=0,i;return l;function l(m){return e.enter("thematicBreak"),c(m)}function c(m){return i=m,d(m)}function d(m){return m===i?(e.enter("thematicBreakSequence"),p(m)):o>=3&&(m===null||Me(m))?(e.exit("thematicBreak"),t(m)):n(m)}function p(m){return m===i?(e.consume(m),o++,p):(e.exit("thematicBreakSequence"),Xe(m)?at(e,d,"whitespace")(m):d(m))}}const Nn={continuation:{tokenize:o3},exit:i3,name:"list",tokenize:r3},t3={partial:!0,tokenize:a3},n3={partial:!0,tokenize:s3};function r3(e,t,n){const o=this,i=o.events[o.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,c=0;return d;function d(b){const N=o.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!o.containerState.marker||b===o.containerState.marker:tp(b)){if(o.containerState.type||(o.containerState.type=N,e.enter(N,{_container:!0})),N==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(rc,n,m)(b):m(b);if(!o.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return n(b)}function p(b){return tp(b)&&++c<10?(e.consume(b),p):(!o.interrupt||c<2)&&(o.containerState.marker?b===o.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"),o.containerState.marker=o.containerState.marker||b,e.check(Fc,o.interrupt?n:h,e.attempt(t3,v,x))}function h(b){return o.containerState.initialBlankLine=!0,l++,v(b)}function x(b){return Xe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),v):n(b)}function v(b){return o.containerState.size=l+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function o3(e,t,n){const o=this;return o.containerState._closeFlow=void 0,e.check(Fc,i,l);function i(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,at(e,t,"listItemIndent",o.containerState.size+1)(d)}function l(d){return o.containerState.furtherBlankLines||!Xe(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,c(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(n3,t,c)(d))}function c(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,at(e,e.attempt(Nn,t,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function s3(e,t,n){const o=this;return at(e,i,"listItemIndent",o.containerState.size+1);function i(l){const c=o.events[o.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===o.containerState.size?t(l):n(l)}}function i3(e){e.exit(this.containerState.type)}function a3(e,t,n){const o=this;return at(e,i,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const c=o.events[o.events.length-1];return!Xe(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Sy={name:"setextUnderline",resolveTo:l3,tokenize:c3};function l3(e,t){let n=e.length,o,i,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(i=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[o][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",c,t]),e.splice(l+1,0,["exit",e[o][1],t]),e[o][1].end={...e[l][1].end}):e[o][1]=c,e.push(["exit",c,t]),e}function c3(e,t,n){const o=this;let i;return l;function l(m){let h=o.events.length,x;for(;h--;)if(o.events[h][1].type!=="lineEnding"&&o.events[h][1].type!=="linePrefix"&&o.events[h][1].type!=="content"){x=o.events[h][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(e.enter("setextHeadingLine"),i=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===i?(e.consume(m),d):(e.exit("setextHeadingLineSequence"),Xe(m)?at(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Me(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const u3={tokenize:d3};function d3(e){const t=this,n=e.attempt(Fc,o,e.attempt(this.parser.constructs.flowInitial,i,at(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gA,i)),"linePrefix")));return n;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const f3={resolveAll:s0()},p3=o0("string"),h3=o0("text");function o0(e){return{resolveAll:s0(e==="text"?m3:void 0),tokenize:t};function t(n){const o=this,i=this.parser.constructs[e],l=n.attempt(i,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),p}function p(h){return m(h)?(n.exit("data"),l(h)):(n.consume(h),p)}function m(h){if(h===null)return!0;const x=i[h];let v=-1;if(x)for(;++v<x.length;){const b=x[v];if(!b.previous||b.previous.call(o,o.previous))return!0}return!1}}}function s0(e){return t;function t(n,o){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,o):n}}function m3(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 o=e[n-1][1],i=t.sliceStream(o);let l=i.length,c=-1,d=0,p;for(;l--;){const m=i[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)p=!0,d++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const m={type:n===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:o.start._bufferIndex+c,_index:o.start._index+l,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...m.start},o.start.offset===o.end.offset?Object.assign(o,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const g3={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Qw},x3={91:wA},y3={[-2]:ff,[-1]:ff,32:ff},v3={35:EA,42:rc,45:[Sy,rc],60:AA,61:Sy,95:rc,96:ky,126:ky},b3={38:Zw,92:Jw},w3={[-5]:pf,[-4]:pf,[-3]:pf,33:YA,38:Zw,42:np,60:[QR,$A],91:QA,92:[NA,Jw],93:lh,95:np,96:uA},k3={null:[np,f3]},j3={null:[42,95]},S3={null:[]},N3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:j3,contentInitial:x3,disable:S3,document:g3,flow:v3,flowInitial:y3,insideSpan:k3,string:b3,text:w3},Symbol.toStringTag,{value:"Module"}));function C3(e,t,n){let o={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let c=[],d=[];const p={attempt:F(L),check:F(P),consume:R,enter:E,exit:A,interrupt:F(P,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:e,previous:null,sliceSerialize:v,sliceStream:b,write:x};let h=t.tokenize.call(m,p);return t.resolveAll&&l.push(t),m;function x(U){return c=Jn(c,U),j(),c[c.length-1]!==null?[]:(_(t,0),m.events=ah(l,m.events,m),m.events)}function v(U,G){return P3(b(U),G)}function b(U){return E3(c,U)}function N(){const{_bufferIndex:U,_index:G,line:K,column:Z,offset:M}=o;return{_bufferIndex:U,_index:G,line:K,column:Z,offset:M}}function k(U){i[U.line]=U.column,re()}function j(){let U;for(;o._index<c.length;){const G=c[o._index];if(typeof G=="string")for(U=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===U&&o._bufferIndex<G.length;)S(G.charCodeAt(o._bufferIndex));else S(G)}}function S(U){h=h(U)}function R(U){Me(U)?(o.line++,o.column=1,o.offset+=U===-3?2:1,re()):U!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===c[o._index].length&&(o._bufferIndex=-1,o._index++)),m.previous=U}function E(U,G){const K=G||{};return K.type=U,K.start=N(),m.events.push(["enter",K,m]),d.push(K),K}function A(U){const G=d.pop();return G.end=N(),m.events.push(["exit",G,m]),G}function L(U,G){_(U,G.from)}function P(U,G){G.restore()}function F(U,G){return K;function K(Z,M,I){let D,$,q,T;return Array.isArray(Z)?X(Z):"tokenize"in Z?X([Z]):z(Z);function z(ee){return de;function de(xe){const be=xe!==null&&ee[xe],we=xe!==null&&ee.null,Je=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(we)?we:we?[we]:[]];return X(Je)(xe)}}function X(ee){return D=ee,$=0,ee.length===0?I:O(ee[$])}function O(ee){return de;function de(xe){return T=Q(),q=ee,ee.partial||(m.currentConstruct=ee),ee.name&&m.parser.constructs.disable.null.includes(ee.name)?Ce():ee.tokenize.call(G?Object.assign(Object.create(m),G):m,p,pe,Ce)(xe)}}function pe(ee){return U(q,T),M}function Ce(ee){return T.restore(),++$<D.length?O(D[$]):I}}}function _(U,G){U.resolveAll&&!l.includes(U)&&l.push(U),U.resolve&&Rr(m.events,G,m.events.length-G,U.resolve(m.events.slice(G),m)),U.resolveTo&&(m.events=U.resolveTo(m.events,m))}function Q(){const U=N(),G=m.previous,K=m.currentConstruct,Z=m.events.length,M=Array.from(d);return{from:Z,restore:I};function I(){o=U,m.previous=G,m.currentConstruct=K,m.events.length=Z,d=M,re()}}function re(){o.line in i&&o.column<2&&(o.column=i[o.line],o.offset+=i[o.line]-1)}}function E3(e,t){const n=t.start._index,o=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let c;if(n===i)c=[e[n].slice(o,l)];else{if(c=e.slice(n,i),o>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(o):c.shift()}l>0&&c.push(e[i].slice(0,l))}return c}function P3(e,t){let n=-1;const o=[];let i;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=`
|
|
456
|
+
`;break}case-3:{c=`\r
|
|
457
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&i)continue;c=" ";break}default:c=String.fromCharCode(l)}i=l===-2,o.push(c)}return o.join("")}function T3(e){const o={constructs:_R([N3,...(e||{}).extensions||[]]),content:i(WR),defined:[],document:i(qR),flow:i(u3),lazy:{},string:i(p3),text:i(h3)};return o;function i(l){return c;function c(d){return C3(o,l,d)}}}function R3(e){for(;!e0(e););return e}const Ny=/[\0\t\n\r]/g;function A3(){let e=1,t="",n=!0,o;return i;function i(l,c,d){const p=[];let m,h,x,v,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(Ny.lastIndex=x,m=Ny.exec(l),v=m&&m.index!==void 0?m.index:l.length,b=l.charCodeAt(v),!m){t=l.slice(x);break}if(b===10&&x===v&&o)p.push(-3),o=void 0;else switch(o&&(p.push(-5),o=void 0),x<v&&(p.push(l.slice(x,v)),e+=v-x),b){case 0:{p.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,p.push(-2);e++<h;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:o=!0,e=1}x=v+1}return d&&(o&&p.push(-5),t&&p.push(t),p.push(null)),p}}const D3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function I3(e){return e.replace(D3,O3)}function O3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return Xw(n.slice(l?2:1),l?16:10)}return ih(n)||e}const i0={}.hasOwnProperty;function L3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),_3(n)(R3(T3(n).document().write(A3()(e,t,!0))))}function _3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(qe),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:l($e),blockQuote:l(we),characterEscape:Q,characterReference:Q,codeFenced:l(Je),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(Je,c),codeText:l(nt,c),codeTextData:Q,data:Q,codeFlowValue:Q,definition:l(he),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(ke),hardBreakEscape:l(He),hardBreakTrailing:l(He),htmlFlow:l(lt,c),htmlFlowData:Q,htmlText:l(lt,c),htmlTextData:Q,image:l(Oe),label:c,link:l(qe),listItem:l(jt),listItemValue:v,listOrdered:l(Qe,x),listUnordered:l(Qe),paragraph:l(St),reference:O,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l($e),strong:l(Dt),thematicBreak:l(Et)},exit:{atxHeading:p(),atxHeadingSequence:L,autolink:p(),autolinkEmail:be,autolinkProtocol:xe,blockQuote:p(),characterEscapeValue:re,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:ee,characterReference:de,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:re,codeIndented:p(S),codeText:p(M),codeTextData:re,data:re,definition:p(),definitionDestinationString:A,definitionLabelString:R,definitionTitleString:E,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(K),htmlFlowData:re,htmlText:p(Z),htmlTextData:re,image:p(D),label:q,labelText:$,lineEnding:U,link:p(I),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:pe,resourceDestinationString:T,resourceTitleString:z,resource:X,setextHeading:p(_),setextHeadingLineSequence:F,setextHeadingText:P,strong:p(),thematicBreak:p()}};a0(t,(e||{}).mdastExtensions||[]);const n={};return o;function o(oe){let ie={type:"root",children:[]};const me={stack:[ie],tokenStack:[],config:t,enter:d,exit:m,buffer:c,resume:h,data:n},ne=[];let ye=-1;for(;++ye<oe.length;)if(oe[ye][1].type==="listOrdered"||oe[ye][1].type==="listUnordered")if(oe[ye][0]==="enter")ne.push(ye);else{const Pe=ne.pop();ye=i(oe,Pe,ye)}for(ye=-1;++ye<oe.length;){const Pe=t[oe[ye][0]];i0.call(Pe,oe[ye][1].type)&&Pe[oe[ye][1].type].call(Object.assign({sliceSerialize:oe[ye][2].sliceSerialize},me),oe[ye][1])}if(me.tokenStack.length>0){const Pe=me.tokenStack[me.tokenStack.length-1];(Pe[1]||Cy).call(me,void 0,Pe[0])}for(ie.position={start:vo(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:vo(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},ye=-1;++ye<t.transforms.length;)ie=t.transforms[ye](ie)||ie;return ie}function i(oe,ie,me){let ne=ie-1,ye=-1,Pe=!1,Ht,rn,Jt,V;for(;++ne<=me;){const ce=oe[ne];switch(ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ce[0]==="enter"?ye++:ye--,V=void 0;break}case"lineEndingBlank":{ce[0]==="enter"&&(Ht&&!V&&!ye&&!Jt&&(Jt=ne),V=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:V=void 0}if(!ye&&ce[0]==="enter"&&ce[1].type==="listItemPrefix"||ye===-1&&ce[0]==="exit"&&(ce[1].type==="listUnordered"||ce[1].type==="listOrdered")){if(Ht){let je=ne;for(rn=void 0;je--;){const Fe=oe[je];if(Fe[1].type==="lineEnding"||Fe[1].type==="lineEndingBlank"){if(Fe[0]==="exit")continue;rn&&(oe[rn][1].type="lineEndingBlank",Pe=!0),Fe[1].type="lineEnding",rn=je}else if(!(Fe[1].type==="linePrefix"||Fe[1].type==="blockQuotePrefix"||Fe[1].type==="blockQuotePrefixWhitespace"||Fe[1].type==="blockQuoteMarker"||Fe[1].type==="listItemIndent"))break}Jt&&(!rn||Jt<rn)&&(Ht._spread=!0),Ht.end=Object.assign({},rn?oe[rn][1].start:ce[1].end),oe.splice(rn||ne,0,["exit",Ht,ce[2]]),ne++,me++}if(ce[1].type==="listItemPrefix"){const je={type:"listItem",_spread:!1,start:Object.assign({},ce[1].start),end:void 0};Ht=je,oe.splice(ne,0,["enter",je,ce[2]]),ne++,me++,Jt=void 0,V=!0}}}return oe[ie][1]._spread=Pe,me}function l(oe,ie){return me;function me(ne){d.call(this,oe(ne),ne),ie&&ie.call(this,ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(oe,ie,me){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([ie,me||void 0]),oe.position={start:vo(ie.start),end:void 0}}function p(oe){return ie;function ie(me){oe&&oe.call(this,me),m.call(this,me)}}function m(oe,ie){const me=this.stack.pop(),ne=this.tokenStack.pop();if(ne)ne[0].type!==oe.type&&(ie?ie.call(this,oe,ne[0]):(ne[1]||Cy).call(this,oe,ne[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Qi({start:oe.start,end:oe.end})+"): it’s not open");me.position.end=vo(oe.end)}function h(){return OR(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(oe){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function b(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=oe}function N(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=oe}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.value=oe.replace(/(\r?\n|\r)$/g,"")}function R(oe){const ie=this.resume(),me=this.stack[this.stack.length-1];me.label=ie,me.identifier=Ms(this.sliceSerialize(oe)).toLowerCase()}function E(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.title=oe}function A(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.url=oe}function L(oe){const ie=this.stack[this.stack.length-1];if(!ie.depth){const me=this.sliceSerialize(oe).length;ie.depth=me}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function F(oe){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function Q(oe){const me=this.stack[this.stack.length-1].children;let ne=me[me.length-1];(!ne||ne.type!=="text")&&(ne=Qt(),ne.position={start:vo(oe.start),end:void 0},me.push(ne)),this.stack.push(ne)}function re(oe){const ie=this.stack.pop();ie.value+=this.sliceSerialize(oe),ie.position.end=vo(oe.end)}function U(oe){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=ie.children[ie.children.length-1];me.position.end=vo(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(Q.call(this,oe),re.call(this,oe))}function G(){this.data.atHardBreak=!0}function K(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.value=oe}function Z(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.value=oe}function M(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.value=oe}function I(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=ie,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function D(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=ie,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function $(oe){const ie=this.sliceSerialize(oe),me=this.stack[this.stack.length-2];me.label=I3(ie),me.identifier=Ms(ie).toLowerCase()}function q(){const oe=this.stack[this.stack.length-1],ie=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ne=oe.children;me.children=ne}else me.alt=ie}function T(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.url=oe}function z(){const oe=this.resume(),ie=this.stack[this.stack.length-1];ie.title=oe}function X(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function pe(oe){const ie=this.resume(),me=this.stack[this.stack.length-1];me.label=ie,me.identifier=Ms(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Ce(oe){this.data.characterReferenceType=oe.type}function ee(oe){const ie=this.sliceSerialize(oe),me=this.data.characterReferenceType;let ne;me?(ne=Xw(ie,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ne=ih(ie);const ye=this.stack[this.stack.length-1];ye.value+=ne}function de(oe){const ie=this.stack.pop();ie.position.end=vo(oe.end)}function xe(oe){re.call(this,oe);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(oe)}function be(oe){re.call(this,oe);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(oe)}function we(){return{type:"blockquote",children:[]}}function Je(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function he(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function He(){return{type:"break"}}function lt(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function qe(){return{type:"link",title:null,url:"",children:[]}}function Qe(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function jt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function St(){return{type:"paragraph",children:[]}}function Dt(){return{type:"strong",children:[]}}function Qt(){return{type:"text",value:""}}function Et(){return{type:"thematicBreak"}}}function vo(e){return{line:e.line,column:e.column,offset:e.offset}}function a0(e,t){let n=-1;for(;++n<t.length;){const o=t[n];Array.isArray(o)?a0(e,o):M3(e,o)}}function M3(e,t){let n;for(n in t)if(i0.call(t,n))switch(n){case"canContainEols":{const o=t[n];o&&e[n].push(...o);break}case"transforms":{const o=t[n];o&&e[n].push(...o);break}case"enter":case"exit":{const o=t[n];o&&Object.assign(e[n],o);break}}}function Cy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qi({start:t.start,end:t.end})+") is still open")}function $3(e){const t=this;t.parser=n;function n(o){return L3(o,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function F3(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 z3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
458
|
+
`}]}function B3(e,t){const n=t.value?t.value+`
|
|
459
|
+
`:"",o={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(o.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:o,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 U3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function H3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function W3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(t.identifier).toUpperCase(),i=Xs(o.toLowerCase()),l=e.footnoteOrder.indexOf(o);let c,d=e.footnoteCounts.get(o);d===void 0?(d=0,e.footnoteOrder.push(o),c=e.footnoteOrder.length):c=l+1,d+=1,e.footnoteCounts.set(o,d);const p={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function V3(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 q3(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 o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+o}];const i=e.all(t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const c=i[i.length-1];return c&&c.type==="text"?c.value+=o:i.push({type:"text",value:o}),i}function K3(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return l0(e,t);const i={src:Xs(o.url||""),alt:t.alt};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)}function G3(e,t){const n={src:Xs(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 o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function Y3(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,o),e.applyData(t,o)}function X3(e,t){const n=String(t.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return l0(e,t);const i={href:Xs(o.url||"")};o.title!==null&&o.title!==void 0&&(i.title=o.title);const l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Q3(e,t){const n={href:Xs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function J3(e,t,n){const o=e.all(t),i=n?Z3(n):c0(t),l={},c=[];if(typeof t.checked=="boolean"){const h=o[0];let x;h&&h.type==="element"&&h.tagName==="p"?x=h:(x={type:"element",tagName:"p",properties:{},children:[]},o.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<o.length;){const h=o[d];(i||d!==0||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
460
|
+
`}),h.type==="element"&&h.tagName==="p"&&!i?c.push(...h.children):c.push(h)}const p=o[o.length-1];p&&(i||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
461
|
+
`});const m={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,m),e.applyData(t,m)}function Z3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let o=-1;for(;!t&&++o<n.length;)t=c0(n[o])}return t}function c0(e){const t=e.spread;return t??e.children.length>1}function eD(e,t){const n={},o=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<o.length;){const c=o[i];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(o,!0)};return e.patch(t,l),e.applyData(t,l)}function tD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nD(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rD(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oD(e,t){const n=e.all(t),o=n.shift(),i=[];if(o){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],c),i.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},d=nh(t.children[1]),p=Hw(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),i.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function sD(e,t,n){const o=n?n.children:void 0,l=(o?o.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,d=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<d;){const x=t.children[p],v={},b=c?c[p]:void 0;b&&(v.align=b);let N={type:"element",tagName:l,properties:v,children:[]};x&&(N.children=e.all(x),e.patch(x,N),N=e.applyData(x,N)),m.push(N)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,h),e.applyData(t,h)}function iD(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ey=9,Py=32;function aD(e){const t=String(e),n=/\r?\n|\r/g;let o=n.exec(t),i=0;const l=[];for(;o;)l.push(Ty(t.slice(i,o.index),i>0,!0),o[0]),i=o.index+o[0].length,o=n.exec(t);return l.push(Ty(t.slice(i),i>0,!1)),l.join("")}function Ty(e,t,n){let o=0,i=e.length;if(t){let l=e.codePointAt(o);for(;l===Ey||l===Py;)o++,l=e.codePointAt(o)}if(n){let l=e.codePointAt(i-1);for(;l===Ey||l===Py;)i--,l=e.codePointAt(i-1)}return i>o?e.slice(o,i):""}function lD(e,t){const n={type:"text",value:aD(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cD(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const uD={blockquote:F3,break:z3,code:B3,delete:U3,emphasis:H3,footnoteReference:W3,heading:V3,html:q3,imageReference:K3,image:G3,inlineCode:Y3,linkReference:X3,link:Q3,listItem:J3,list:eD,paragraph:tD,root:nD,strong:rD,table:oD,tableCell:iD,tableRow:sD,text:lD,thematicBreak:cD,toml:Ul,yaml:Ul,definition:Ul,footnoteDefinition:Ul};function Ul(){}const u0=-1,zc=0,Zi=1,fc=2,ch=3,uh=4,dh=5,fh=6,d0=7,f0=8,Ry=typeof self=="object"?self:globalThis,dD=(e,t)=>{const n=(i,l)=>(e.set(l,i),i),o=i=>{if(e.has(i))return e.get(i);const[l,c]=t[i];switch(l){case zc:case u0:return n(c,i);case Zi:{const d=n([],i);for(const p of c)d.push(o(p));return d}case fc:{const d=n({},i);for(const[p,m]of c)d[o(p)]=o(m);return d}case ch:return n(new Date(c),i);case uh:{const{source:d,flags:p}=c;return n(new RegExp(d,p),i)}case dh:{const d=n(new Map,i);for(const[p,m]of c)d.set(o(p),o(m));return d}case fh:{const d=n(new Set,i);for(const p of c)d.add(o(p));return d}case d0:{const{name:d,message:p}=c;return n(new Ry[d](p),i)}case f0:return n(BigInt(c),i);case"BigInt":return n(Object(BigInt(c)),i);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 Ry[l](c),i)};return o},Ay=e=>dD(new Map,e)(0),As="",{toString:fD}={},{keys:pD}=Object,Vi=e=>{const t=typeof e;if(t!=="object"||!e)return[zc,t];const n=fD.call(e).slice(8,-1);switch(n){case"Array":return[Zi,As];case"Object":return[fc,As];case"Date":return[ch,As];case"RegExp":return[uh,As];case"Map":return[dh,As];case"Set":return[fh,As];case"DataView":return[Zi,n]}return n.includes("Array")?[Zi,n]:n.includes("Error")?[d0,n]:[fc,n]},Hl=([e,t])=>e===zc&&(t==="function"||t==="symbol"),hD=(e,t,n,o)=>{const i=(c,d)=>{const p=o.push(c)-1;return n.set(d,p),p},l=c=>{if(n.has(c))return n.get(c);let[d,p]=Vi(c);switch(d){case zc:{let h=c;switch(p){case"bigint":d=f0,h=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);h=null;break;case"undefined":return i([u0],c)}return i([d,h],c)}case Zi:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),i([p,[...v]],c)}const h=[],x=i([d,h],c);for(const v of c)h.push(l(v));return x}case fc:{if(p)switch(p){case"BigInt":return i([p,c.toString()],c);case"Boolean":case"Number":case"String":return i([p,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const h=[],x=i([d,h],c);for(const v of pD(c))(e||!Hl(Vi(c[v])))&&h.push([l(v),l(c[v])]);return x}case ch:return i([d,c.toISOString()],c);case uh:{const{source:h,flags:x}=c;return i([d,{source:h,flags:x}],c)}case dh:{const h=[],x=i([d,h],c);for(const[v,b]of c)(e||!(Hl(Vi(v))||Hl(Vi(b))))&&h.push([l(v),l(b)]);return x}case fh:{const h=[],x=i([d,h],c);for(const v of c)(e||!Hl(Vi(v)))&&h.push(l(v));return x}}const{message:m}=c;return i([d,{name:p,message:m}],c)};return l},Dy=(e,{json:t,lossy:n}={})=>{const o=[];return hD(!(t||n),!!t,new Map,o)(e),o},pc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ay(Dy(e,t)):structuredClone(e):(e,t)=>Ay(Dy(e,t));function mD(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 gD(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function xD(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mD,o=e.options.footnoteBackLabel||gD,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const h=e.all(m),x=String(m.identifier).toUpperCase(),v=Xs(x.toLowerCase());let b=0;const N=[],k=e.footnoteCounts.get(x);for(;k!==void 0&&++b<=k;){N.length>0&&N.push({type:"text",value:" "});let R=typeof n=="string"?n:n(p,b);typeof R=="string"&&(R={type:"text",value:R}),N.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(p,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const j=h[h.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const R=j.children[j.children.length-1];R&&R.type==="text"?R.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...N)}else h.push(...N);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},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:{...pc(c),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
462
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
463
|
+
`}]}}const p0=(function(e){if(e==null)return wD;if(typeof e=="function")return Bc(e);if(typeof e=="object")return Array.isArray(e)?yD(e):vD(e);if(typeof e=="string")return bD(e);throw new Error("Expected function, string, or object as test")});function yD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=p0(e[n]);return Bc(o);function o(...i){let l=-1;for(;++l<t.length;)if(t[l].apply(this,i))return!0;return!1}}function vD(e){const t=e;return Bc(n);function n(o){const i=o;let l;for(l in e)if(i[l]!==t[l])return!1;return!0}}function bD(e){return Bc(t);function t(n){return n&&n.type===e}}function Bc(e){return t;function t(n,o,i){return!!(kD(n)&&e.call(this,n,typeof o=="number"?o:void 0,i||void 0))}}function wD(){return!0}function kD(e){return e!==null&&typeof e=="object"&&"type"in e}const h0=[],jD=!0,Iy=!1,SD="skip";function ND(e,t,n,o){let i;typeof t=="function"&&typeof n!="function"?(o=n,n=t):i=t;const l=p0(i),c=o?-1:1;d(e,void 0,[])();function d(p,m,h){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const b=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return v;function v(){let b=h0,N,k,j;if((!t||l(p,m,h[h.length-1]||void 0))&&(b=CD(n(p,h)),b[0]===Iy))return b;if("children"in p&&p.children){const S=p;if(S.children&&b[0]!==SD)for(k=(o?S.children.length:-1)+c,j=h.concat(S);k>-1&&k<S.children.length;){const R=S.children[k];if(N=d(R,k,j)(),N[0]===Iy)return N;k=typeof N[1]=="number"?N[1]:k+c}}return b}}}function CD(e){return Array.isArray(e)?e:typeof e=="number"?[jD,e]:e==null?h0:[e]}function m0(e,t,n,o){let i,l,c;typeof t=="function"&&typeof n!="function"?(l=void 0,c=t,i=n):(l=t,c=n,i=o),ND(e,l,d,i);function d(p,m){const h=m[m.length-1],x=h?h.children.indexOf(p):void 0;return c(p,x,h)}}const rp={}.hasOwnProperty,ED={};function PD(e,t){const n=t||ED,o=new Map,i=new Map,l=new Map,c={...uD,...n.handlers},d={all:m,applyData:RD,definitionById:o,footnoteById:i,footnoteCounts:l,footnoteOrder:[],handlers:c,one:p,options:n,patch:TD,wrap:DD};return m0(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const x=h.type==="definition"?o:i,v=String(h.identifier).toUpperCase();x.has(v)||x.set(v,h)}}),d;function p(h,x){const v=h.type,b=d.handlers[v];if(rp.call(d.handlers,v)&&b)return b(d,h,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in h){const{children:k,...j}=h,S=pc(j);return S.children=d.all(h),S}return pc(h)}return(d.options.unknownHandler||AD)(d,h,x)}function m(h){const x=[];if("children"in h){const v=h.children;let b=-1;for(;++b<v.length;){const N=d.one(v[b],h);if(N){if(b&&v[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=Oy(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=Oy(k.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function TD(e,t){e.position&&(t.position=fR(e))}function RD(e,t){let n=t;if(e&&e.data){const o=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;if(typeof o=="string")if(n.type==="element")n.tagName=o;else{const c="children"in n?n.children:[n];n={type:"element",tagName:o,properties:{},children:c}}n.type==="element"&&l&&Object.assign(n.properties,pc(l)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function AD(e,t){const n=t.data||{},o="value"in t&&!(rp.call(n,"hProperties")||rp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function DD(e,t){const n=[];let o=-1;for(t&&n.push({type:"text",value:`
|
|
464
|
+
`});++o<e.length;)o&&n.push({type:"text",value:`
|
|
465
|
+
`}),n.push(e[o]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
466
|
+
`}),n}function Oy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ly(e,t){const n=PD(e,t),o=n.one(e,void 0),i=xD(n),l=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return i&&l.children.push({type:"text",value:`
|
|
467
|
+
`},i),l}function ID(e,t){return e&&"run"in e?async function(n,o){const i=Ly(n,{file:o,...t});await e.run(i,o)}:function(n,o){return Ly(n,{file:o,...e||t})}}function _y(e){if(e)throw e}var hf,My;function OD(){if(My)return hf;My=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=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 v;for(v in m);return typeof v>"u"||e.call(m,v)},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(o)return o(m,h).value}else return;return m[h]};return hf=function p(){var m,h,x,v,b,N,k=arguments[0],j=1,S=arguments.length,R=!1;for(typeof k=="boolean"&&(R=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),v=d(m,h),k!==v&&(R&&v&&(l(v)||(b=i(v)))?(b?(b=!1,N=x&&i(x)?x:[]):N=x&&l(x)?x:{},c(k,{name:h,newValue:p(R,N,v)})):typeof v<"u"&&c(k,{name:h,newValue:v}));return k},hf}var LD=OD();const mf=jc(LD);function op(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 _D(){const e=[],t={run:n,use:o};return t;function n(...i){let l=-1;const c=i.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...i);function d(p,...m){const h=e[++l];let x=-1;if(p){c(p);return}for(;++x<i.length;)(m[x]===null||m[x]===void 0)&&(m[x]=i[x]);i=m,h?MD(h,d)(...m):c(null,...m)}}function o(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function MD(e,t){let n;return o;function o(...c){const d=e.length>c.length;let p;d&&c.push(i);try{p=e.apply(this,c)}catch(m){const h=m;if(d&&n)throw h;return i(h)}d||(p&&p.then&&typeof p.then=="function"?p.then(l,i):p instanceof Error?i(p):l(p))}function i(c,...d){n||(n=!0,t(c,...d))}function l(c){i(null,c)}}const kr={basename:$D,dirname:FD,extname:zD,join:BD,sep:"/"};function $D(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ka(e);let n=0,o=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else o<0&&(l=!0,o=i+1);return o<0?"":e.slice(n,o)}if(t===e)return"";let c=-1,d=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(l){n=i+1;break}}else c<0&&(l=!0,c=i+1),d>-1&&(e.codePointAt(i)===t.codePointAt(d--)?d<0&&(o=i):(d=-1,o=c));return n===o?o=c:o<0&&(o=e.length),e.slice(n,o)}function FD(e){if(ka(e),e.length===0)return".";let t=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){t=n;break}}else o||(o=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zD(e){ka(e);let t=e.length,n=-1,o=0,i=-1,l=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){o=t+1;break}continue}n<0&&(c=!0,n=t+1),d===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===o+1?"":e.slice(i,n)}function BD(...e){let t=-1,n;for(;++t<e.length;)ka(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":UD(n)}function UD(e){ka(e);const t=e.codePointAt(0)===47;let n=HD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HD(e,t){let n="",o=0,i=-1,l=0,c=-1,d,p;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(i===c-1||l===1))if(i!==c-1&&l===2){if(n.length<2||o!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",o=0):(n=n.slice(0,p),o=n.length-1-n.lastIndexOf("/")),i=c,l=0;continue}}else if(n.length>0){n="",o=0,i=c,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(i+1,c):n=e.slice(i+1,c),o=c-i-1;i=c,l=0}else d===46&&l>-1?l++:l=-1}return n}function ka(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const WD={cwd:VD};function VD(){return"/"}function sp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qD(e){if(typeof e=="string")e=new URL(e);else if(!sp(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 KD(e)}function KD(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const o=t.codePointAt(n+2);if(o===70||o===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const gf=["history","path","basename","stem","extname","dirname"];class g0{constructor(t){let n;t?sp(t)?n={path:t}:typeof t=="string"||GD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":WD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<gf.length;){const l=gf[o];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let i;for(i in n)gf.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?kr.basename(this.path):void 0}set basename(t){yf(t,"basename"),xf(t,"basename"),this.path=kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?kr.dirname(this.path):void 0}set dirname(t){$y(this.basename,"dirname"),this.path=kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?kr.extname(this.path):void 0}set extname(t){if(xf(t,"extname"),$y(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=kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sp(t)&&(t=qD(t)),yf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?kr.basename(this.path,this.extname):void 0}set stem(t){yf(t,"stem"),xf(t,"stem"),this.path=kr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,o){const i=this.message(t,n,o);throw i.fatal=!0,i}info(t,n,o){const i=this.message(t,n,o);return i.fatal=void 0,i}message(t,n,o){const i=new pn(t,n,o);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function xf(e,t){if(e&&e.includes(kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kr.sep+"`")}function yf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function $y(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YD=(function(e){const o=this.constructor.prototype,i=o[e],l=function(){return i.apply(l,arguments)};return Object.setPrototypeOf(l,o),l}),XD={}.hasOwnProperty;class ph extends YD{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=_D()}copy(){const t=new ph;let n=-1;for(;++n<this.attachers.length;){const o=this.attachers[n];t.use(...o)}return t.data(mf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(wf("data",this.frozen),this.namespace[t]=n,this):XD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(wf("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,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const i=n.call(t,...o);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Wl(t),o=this.parser||this.Parser;return vf("parse",o),o(String(n),n)}process(t,n){const o=this;return this.freeze(),vf("process",this.parser||this.Parser),bf("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(l,c){const d=Wl(t),p=o.parse(d);o.run(p,d,function(h,x,v){if(h||!x||!v)return m(h);const b=x,N=o.stringify(b,v);ZD(N)?v.value=N:v.result=N,m(h,v)});function m(h,x){h||!x?c(h):l?l(x):n(void 0,x)}}}processSync(t){let n=!1,o;return this.freeze(),vf("processSync",this.parser||this.Parser),bf("processSync",this.compiler||this.Compiler),this.process(t,i),zy("processSync","process",n),o;function i(l,c){n=!0,_y(l),o=c}}run(t,n,o){Fy(t),this.freeze();const i=this.transformers;return!o&&typeof n=="function"&&(o=n,n=void 0),o?l(void 0,o):new Promise(l);function l(c,d){const p=Wl(n);i.run(t,p,m);function m(h,x,v){const b=x||t;h?d(h):c?c(b):o(void 0,b,v)}}}runSync(t,n){let o=!1,i;return this.run(t,n,l),zy("runSync","run",o),i;function l(c,d){_y(c),i=d,o=!0}}stringify(t,n){this.freeze();const o=Wl(n),i=this.compiler||this.Compiler;return bf("stringify",i),Fy(t),i(t,o)}use(t,...n){const o=this.attachers,i=this.namespace;if(wf("use",this.frozen),t!=null)if(typeof t=="function")p(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")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[h,...x]=m;p(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&&(i.settings=mf(!0,i.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 p(m,h){let x=-1,v=-1;for(;++x<o.length;)if(o[x][0]===m){v=x;break}if(v===-1)o.push([m,...h]);else if(h.length>0){let[b,...N]=h;const k=o[v][1];op(k)&&op(b)&&(b=mf(!0,k,b)),o[v]=[m,b,...N]}}}}const QD=new ph().freeze();function vf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function wf(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 Fy(e){if(!op(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wl(e){return JD(e)?e:new g0(e)}function JD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZD(e){return typeof e=="string"||e4(e)}function e4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",By=[],Uy={allowDangerousHtml:!0},n4=/^(https?|ircs?|mailto|xmpp)$/i,r4=[{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 o4(e){const t=s4(e),n=i4(e);return a4(t.runSync(t.parse(n),n),e)}function s4(e){const t=e.rehypePlugins||By,n=e.remarkPlugins||By,o=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Uy}:Uy;return QD().use($3).use(n).use(ID,o).use(t)}function i4(e){const t=e.children||"",n=new g0;return typeof t=="string"&&(n.value=t),n}function a4(e,t){const n=t.allowedElements,o=t.allowElement,i=t.components,l=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,p=t.urlTransform||l4;for(const h of r4)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+t4+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),m0(e,m),xR(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function m(h,x,v){if(h.type==="raw"&&v&&typeof x=="number")return c?v.children.splice(x,1):v.children[x]={type:"text",value:h.value},x;if(h.type==="element"){let b;for(b in df)if(Object.hasOwn(df,b)&&Object.hasOwn(h.properties,b)){const N=h.properties[b],k=df[b];(k===null||k.includes(h.tagName))&&(h.properties[b]=p(String(N||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):l?l.includes(h.tagName):!1;if(!b&&o&&typeof x=="number"&&(b=!o(h,x,v)),b&&v&&typeof x=="number")return d&&h.children?v.children.splice(x,1,...h.children):v.children.splice(x,1),x}}}function l4(e){const t=e.indexOf(":"),n=e.indexOf("?"),o=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||o!==-1&&t>o||n4.test(e.slice(0,t))?e:""}function Yt({content:e,className:t,emptyState:n="No markdown content yet."}){const o=e.replace(/<!--[\s\S]*?-->/g,"");return o.trim()?a.jsx("div",{className:Ue("prose-syntaur max-w-none",t),children:a.jsx(o4,{children:o})}):a.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 c4(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>o=>{t.forEach(i=>i(o))},t)}const Uc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qs(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function hh(e){return"nodeType"in e}function An(e){var t,n;return e?Qs(e)?e:hh(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mh(e){const{Document:t}=An(e);return e instanceof t}function ja(e){return Qs(e)?!1:e instanceof An(e).HTMLElement}function x0(e){return e instanceof An(e).SVGElement}function Js(e){return e?Qs(e)?e.document:hh(e)?mh(e)?e:ja(e)||x0(e)?e.ownerDocument:document:document:document}const Ar=Uc?g.useLayoutEffect:g.useEffect;function gh(e){const t=g.useRef(e);return Ar(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function u4(){const e=g.useRef(null),t=g.useCallback((o,i)=>{e.current=setInterval(o,i)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ca(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Ar(()=>{n.current!==e&&(n.current=e)},t),n}function Sa(e,t){const n=g.useRef();return g.useMemo(()=>{const o=e(n.current);return n.current=o,o},[...t])}function hc(e){const t=gh(e),n=g.useRef(null),o=g.useCallback(i=>{i!==n.current&&(t==null||t(i,n.current)),n.current=i},[]);return[n,o]}function ip(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let kf={};function Na(e,t){return g.useMemo(()=>{if(t)return t;const n=kf[e]==null?0:kf[e]+1;return kf[e]=n,e+"-"+n},[e,t])}function y0(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((l,c)=>{const d=Object.entries(c);for(const[p,m]of d){const h=l[p];h!=null&&(l[p]=h+e*m)}return l},{...t})}}const $s=y0(1),mc=y0(-1);function d4(e){return"clientX"in e&&"clientY"in e}function xh(e){if(!e)return!1;const{KeyboardEvent:t}=An(e.target);return t&&e instanceof t}function f4(e){if(!e)return!1;const{TouchEvent:t}=An(e.target);return t&&e instanceof t}function ap(e){if(f4(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 d4(e)?{x:e.clientX,y:e.clientY}:null}const Bs=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[Bs.Translate.toString(e),Bs.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),Hy="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function p4(e){return e.matches(Hy)?e:e.querySelector(Hy)}const h4={display:"none"};function m4(e){let{id:t,value:n}=e;return Ct.createElement("div",{id:t,style:h4},n)}function g4(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;const i={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 Ct.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},n)}function x4(){const[e,t]=g.useState("");return{announce:g.useCallback(o=>{o!=null&&t(o)},[]),announcement:e}}const v0=g.createContext(null);function y4(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 v4(){const[e]=g.useState(()=>new Set),t=g.useCallback(o=>(e.add(o),()=>e.delete(o)),[e]);return[g.useCallback(o=>{let{type:i,event:l}=o;e.forEach(c=>{var d;return(d=c[i])==null?void 0:d.call(c,l)})},[e]),t]}const b4={draggable:`
|
|
468
|
+
To pick up a draggable item, press the space bar.
|
|
469
|
+
While dragging, use the arrow keys to move the item.
|
|
470
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
471
|
+
`},w4={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 k4(e){let{announcements:t=w4,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=b4}=e;const{announce:l,announcement:c}=x4(),d=Na("DndLiveRegion"),[p,m]=g.useState(!1);if(g.useEffect(()=>{m(!0)},[]),y4(g.useMemo(()=>({onDragStart(x){let{active:v}=x;l(t.onDragStart({active:v}))},onDragMove(x){let{active:v,over:b}=x;t.onDragMove&&l(t.onDragMove({active:v,over:b}))},onDragOver(x){let{active:v,over:b}=x;l(t.onDragOver({active:v,over:b}))},onDragEnd(x){let{active:v,over:b}=x;l(t.onDragEnd({active:v,over:b}))},onDragCancel(x){let{active:v,over:b}=x;l(t.onDragCancel({active:v,over:b}))}}),[l,t])),!p)return null;const h=Ct.createElement(Ct.Fragment,null,Ct.createElement(m4,{id:o,value:i.draggable}),Ct.createElement(g4,{id:d,announcement:c}));return n?jo.createPortal(h,n):h}var Ft;(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"})(Ft||(Ft={}));function gc(){}function xc(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function b0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const dr=Object.freeze({x:0,y:0});function j4(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function S4(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function N4(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function C4(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Wy(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 w0=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=Wy(t,t.left,t.top),l=[];for(const c of o){const{id:d}=c,p=n.get(d);if(p){const m=j4(Wy(p),i);l.push({id:d,data:{droppableContainer:c,value:m}})}}return l.sort(S4)};function E4(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),c=i-o,d=l-n;if(o<i&&n<l){const p=t.width*t.height,m=e.width*e.height,h=c*d,x=h/(p+m-h);return Number(x.toFixed(4))}return 0}const P4=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const l of o){const{id:c}=l,d=n.get(c);if(d){const p=E4(d,t);p>0&&i.push({id:c,data:{droppableContainer:l,value:p}})}}return i.sort(N4)};function T4(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function k0(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:dr}function R4(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),l=1;l<o;l++)i[l-1]=arguments[l];return i.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 A4=R4(1);function D4(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 I4(e,t,n){const o=D4(t);if(!o)return e;const{scaleX:i,scaleY:l,x:c,y:d}=o,p=e.left-c-(1-i)*parseFloat(n),m=e.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),h=i?e.width/i:e.width,x=l?e.height/l:e.height;return{width:h,height:x,top:m,right:p+h,bottom:m+x,left:p}}const O4={ignoreTransform:!1};function Zs(e,t){t===void 0&&(t=O4);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:m,transformOrigin:h}=An(e).getComputedStyle(e);m&&(n=I4(n,m,h))}const{top:o,left:i,width:l,height:c,bottom:d,right:p}=n;return{top:o,left:i,width:l,height:c,bottom:d,right:p}}function Vy(e){return Zs(e,{ignoreTransform:!0})}function L4(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function _4(e,t){return t===void 0&&(t=An(e).getComputedStyle(e)),t.position==="fixed"}function M4(e,t){t===void 0&&(t=An(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const l=t[i];return typeof l=="string"?n.test(l):!1})}function yh(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(mh(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ja(i)||x0(i)||n.includes(i))return n;const l=An(e).getComputedStyle(i);return i!==e&&M4(i,l)&&n.push(i),_4(i,l)?n:o(i.parentNode)}return e?o(e):n}function j0(e){const[t]=yh(e,1);return t??null}function jf(e){return!Uc||!e?null:Qs(e)?e:hh(e)?mh(e)||e===Js(e).scrollingElement?window:ja(e)?e:null:null}function S0(e){return Qs(e)?e.scrollX:e.scrollLeft}function N0(e){return Qs(e)?e.scrollY:e.scrollTop}function lp(e){return{x:S0(e),y:N0(e)}}var Gt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Gt||(Gt={}));function C0(e){return!Uc||!e?!1:e===document.scrollingElement}function E0(e){const t={x:0,y:0},n=C0(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,c=e.scrollTop>=o.y,d=e.scrollLeft>=o.x;return{isTop:i,isLeft:l,isBottom:c,isRight:d,maxScroll:o,minScroll:t}}const $4={x:.2,y:.2};function F4(e,t,n,o,i){let{top:l,left:c,right:d,bottom:p}=n;o===void 0&&(o=10),i===void 0&&(i=$4);const{isTop:m,isBottom:h,isLeft:x,isRight:v}=E0(e),b={x:0,y:0},N={x:0,y:0},k={height:t.height*i.y,width:t.width*i.x};return!m&&l<=t.top+k.height?(b.y=Gt.Backward,N.y=o*Math.abs((t.top+k.height-l)/k.height)):!h&&p>=t.bottom-k.height&&(b.y=Gt.Forward,N.y=o*Math.abs((t.bottom-k.height-p)/k.height)),!v&&d>=t.right-k.width?(b.x=Gt.Forward,N.x=o*Math.abs((t.right-k.width-d)/k.width)):!x&&c<=t.left+k.width&&(b.x=Gt.Backward,N.x=o*Math.abs((t.left+k.width-c)/k.width)),{direction:b,speed:N}}function z4(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:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function P0(e){return e.reduce((t,n)=>$s(t,lp(n)),dr)}function B4(e){return e.reduce((t,n)=>t+S0(n),0)}function U4(e){return e.reduce((t,n)=>t+N0(n),0)}function H4(e,t){if(t===void 0&&(t=Zs),!e)return;const{top:n,left:o,bottom:i,right:l}=t(e);j0(e)&&(i<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const W4=[["x",["left","right"],B4],["y",["top","bottom"],U4]];class vh{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 o=yh(n),i=P0(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,c,d]of W4)for(const p of c)Object.defineProperty(this,p,{get:()=>{const m=d(o),h=i[l]-m;return this.rect[p]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class ea{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function V4(e){const{EventTarget:t}=An(e);return e instanceof t?e:Js(e)}function Sf(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Qn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Qn||(Qn={}));function qy(e){e.preventDefault()}function q4(e){e.stopPropagation()}var Ye;(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"})(Ye||(Ye={}));const T0={start:[Ye.Space,Ye.Enter],cancel:[Ye.Esc],end:[Ye.Space,Ye.Enter,Ye.Tab]},K4=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ye.Right:return{...n,x:n.x+25};case Ye.Left:return{...n,x:n.x-25};case Ye.Down:return{...n,y:n.y+25};case Ye.Up:return{...n,y:n.y-25}}};class Hc{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 ea(Js(n)),this.windowListeners=new ea(An(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Qn.Resize,this.handleCancel),this.windowListeners.add(Qn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Qn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&H4(o),n(dr)}handleKeyDown(t){if(xh(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:l=T0,coordinateGetter:c=K4,scrollBehavior:d="smooth"}=i,{code:p}=t;if(l.end.includes(p)){this.handleEnd(t);return}if(l.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:m}=o.current,h=m?{x:m.left,y:m.top}:dr;this.referenceCoordinates||(this.referenceCoordinates=h);const x=c(t,{active:n,context:o.current,currentCoordinates:h});if(x){const v=mc(x,h),b={x:0,y:0},{scrollableAncestors:N}=o.current;for(const k of N){const j=t.code,{isTop:S,isRight:R,isLeft:E,isBottom:A,maxScroll:L,minScroll:P}=E0(k),F=z4(k),_={x:Math.min(j===Ye.Right?F.right-F.width/2:F.right,Math.max(j===Ye.Right?F.left:F.left+F.width/2,x.x)),y:Math.min(j===Ye.Down?F.bottom-F.height/2:F.bottom,Math.max(j===Ye.Down?F.top:F.top+F.height/2,x.y))},Q=j===Ye.Right&&!R||j===Ye.Left&&!E,re=j===Ye.Down&&!A||j===Ye.Up&&!S;if(Q&&_.x!==x.x){const U=k.scrollLeft+v.x,G=j===Ye.Right&&U<=L.x||j===Ye.Left&&U>=P.x;if(G&&!v.y){k.scrollTo({left:U,behavior:d});return}G?b.x=k.scrollLeft-U:b.x=j===Ye.Right?k.scrollLeft-L.x:k.scrollLeft-P.x,b.x&&k.scrollBy({left:-b.x,behavior:d});break}else if(re&&_.y!==x.y){const U=k.scrollTop+v.y,G=j===Ye.Down&&U<=L.y||j===Ye.Up&&U>=P.y;if(G&&!v.x){k.scrollTo({top:U,behavior:d});return}G?b.y=k.scrollTop-U:b.y=j===Ye.Down?k.scrollTop-L.y:k.scrollTop-P.y,b.y&&k.scrollBy({top:-b.y,behavior:d});break}}this.handleMove(t,$s(mc(x,this.referenceCoordinates),b))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(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()}}Hc.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=T0,onActivation:i}=t,{active:l}=n;const{code:c}=e.nativeEvent;if(o.start.includes(c)){const d=l.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function Ky(e){return!!(e&&"distance"in e)}function Gy(e){return!!(e&&"delay"in e)}class bh{constructor(t,n,o){var i;o===void 0&&(o=V4(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=Js(c),this.documentListeners=new ea(this.document),this.listeners=new ea(o),this.windowListeners=new ea(An(c)),this.initialCoordinates=(i=ap(l))!=null?i:dr,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:o}}}=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(Qn.Resize,this.handleCancel),this.windowListeners.add(Qn.DragStart,qy),this.windowListeners.add(Qn.VisibilityChange,this.handleCancel),this.windowListeners.add(Qn.ContextMenu,qy),this.documentListeners.add(Qn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Gy(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ky(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:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Qn.Click,q4,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Qn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:l}=this,{onMove:c,options:{activationConstraint:d}}=l;if(!i)return;const p=(n=ap(t))!=null?n:dr,m=mc(i,p);if(!o&&d){if(Ky(d)){if(d.tolerance!=null&&Sf(m,d.tolerance))return this.handleCancel();if(Sf(m,d.distance))return this.handleStart()}if(Gy(d)&&Sf(m,d.tolerance))return this.handleCancel();this.handlePending(d,m);return}t.cancelable&&t.preventDefault(),c(p)}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===Ye.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const G4={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wc extends bh{constructor(t){const{event:n}=t,o=Js(n.target);super(t,G4,o)}}Wc.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const Y4={move:{name:"mousemove"},end:{name:"mouseup"}};var cp;(function(e){e[e.RightClick=2]="RightClick"})(cp||(cp={}));class X4 extends bh{constructor(t){super(t,Y4,Js(t.event.target))}}X4.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===cp.RightClick?!1:(o==null||o({event:n}),!0)}}];const Nf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Q4 extends bh{constructor(t){super(t,Nf)}static setup(){return window.addEventListener(Nf.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Nf.move.name,t)};function t(){}}}Q4.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var ta;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ta||(ta={}));var yc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(yc||(yc={}));function J4(e){let{acceleration:t,activator:n=ta.Pointer,canScroll:o,draggingRect:i,enabled:l,interval:c=5,order:d=yc.TreeOrder,pointerCoordinates:p,scrollableAncestors:m,scrollableAncestorRects:h,delta:x,threshold:v}=e;const b=eI({delta:x,disabled:!l}),[N,k]=u4(),j=g.useRef({x:0,y:0}),S=g.useRef({x:0,y:0}),R=g.useMemo(()=>{switch(n){case ta.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case ta.DraggableRect:return i}},[n,i,p]),E=g.useRef(null),A=g.useCallback(()=>{const P=E.current;if(!P)return;const F=j.current.x*S.current.x,_=j.current.y*S.current.y;P.scrollBy(F,_)},[]),L=g.useMemo(()=>d===yc.TreeOrder?[...m].reverse():m,[d,m]);g.useEffect(()=>{if(!l||!m.length||!R){k();return}for(const P of L){if((o==null?void 0:o(P))===!1)continue;const F=m.indexOf(P),_=h[F];if(!_)continue;const{direction:Q,speed:re}=F4(P,_,R,t,v);for(const U of["x","y"])b[U][Q[U]]||(re[U]=0,Q[U]=0);if(re.x>0||re.y>0){k(),E.current=P,N(A,c),j.current=re,S.current=Q;return}}j.current={x:0,y:0},S.current={x:0,y:0},k()},[t,A,o,k,l,c,JSON.stringify(R),JSON.stringify(b),N,m,L,h,JSON.stringify(v)])}const Z4={x:{[Gt.Backward]:!1,[Gt.Forward]:!1},y:{[Gt.Backward]:!1,[Gt.Forward]:!1}};function eI(e){let{delta:t,disabled:n}=e;const o=ip(t);return Sa(i=>{if(n||!o||!i)return Z4;const l={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Gt.Backward]:i.x[Gt.Backward]||l.x===-1,[Gt.Forward]:i.x[Gt.Forward]||l.x===1},y:{[Gt.Backward]:i.y[Gt.Backward]||l.y===-1,[Gt.Forward]:i.y[Gt.Forward]||l.y===1}}},[n,t,o])}function tI(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return Sa(i=>{var l;return t==null?null:(l=o??i)!=null?l:null},[o,t])}function nI(e,t){return g.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,l=i.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,o)}));return[...n,...l]},[]),[e,t])}var ua;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ua||(ua={}));var up;(function(e){e.Optimized="optimized"})(up||(up={}));const Yy=new Map;function rI(e,t){let{dragging:n,dependencies:o,config:i}=t;const[l,c]=g.useState(null),{frequency:d,measure:p,strategy:m}=i,h=g.useRef(e),x=j(),v=ca(x),b=g.useCallback(function(S){S===void 0&&(S=[]),!v.current&&c(R=>R===null?S:R.concat(S.filter(E=>!R.includes(E))))},[v]),N=g.useRef(null),k=Sa(S=>{if(x&&!n)return Yy;if(!S||S===Yy||h.current!==e||l!=null){const R=new Map;for(let E of e){if(!E)continue;if(l&&l.length>0&&!l.includes(E.id)&&E.rect.current){R.set(E.id,E.rect.current);continue}const A=E.node.current,L=A?new vh(p(A),A):null;E.rect.current=L,L&&R.set(E.id,L)}return R}return S},[e,l,n,x,p]);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"||N.current!==null||(N.current=setTimeout(()=>{b(),N.current=null},d))},[d,x,b,...o]),{droppableRects:k,measureDroppableContainers:b,measuringScheduled:l!=null};function j(){switch(m){case ua.Always:return!1;case ua.BeforeDragging:return n;default:return!n}}}function R0(e,t){return Sa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function oI(e,t){return R0(e,t)}function sI(e){let{callback:t,disabled:n}=e;const o=gh(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(o)},[o,n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function Vc(e){let{callback:t,disabled:n}=e;const o=gh(t),i=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(o)},[n]);return g.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function iI(e){return new vh(Zs(e),e)}function Xy(e,t,n){t===void 0&&(t=iI);const[o,i]=g.useState(null);function l(){i(p=>{if(!e)return null;if(e.isConnected===!1){var m;return(m=p??n)!=null?m:null}const h=t(e);return JSON.stringify(p)===JSON.stringify(h)?p:h})}const c=sI({callback(p){if(e)for(const m of p){const{type:h,target:x}=m;if(h==="childList"&&x instanceof HTMLElement&&x.contains(e)){l();break}}}}),d=Vc({callback:l});return Ar(()=>{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]),o}function aI(e){const t=R0(e);return k0(e,t)}const Qy=[];function lI(e){const t=g.useRef(e),n=Sa(o=>e?o&&o!==Qy&&e&&t.current&&e.parentNode===t.current.parentNode?o:yh(e):Qy,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function cI(e){const[t,n]=g.useState(null),o=g.useRef(e),i=g.useCallback(l=>{const c=jf(l.target);c&&n(d=>d?(d.set(c,lp(c)),new Map(d)):null)},[]);return g.useEffect(()=>{const l=o.current;if(e!==l){c(l);const d=e.map(p=>{const m=jf(p);return m?(m.addEventListener("scroll",i,{passive:!0}),[m,lp(m)]):null}).filter(p=>p!=null);n(d.length?new Map(d):null),o.current=e}return()=>{c(e),c(l)};function c(d){d.forEach(p=>{const m=jf(p);m==null||m.removeEventListener("scroll",i)})}},[i,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,c)=>$s(l,c),dr):P0(e):dr,[e,t])}function Jy(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const o=e!==dr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?mc(e,n.current):dr}function uI(e){g.useEffect(()=>{if(!Uc)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function dI(e,t){return g.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:l}=o;return n[i]=c=>{l(c,t)},n},{}),[e,t])}function A0(e){return g.useMemo(()=>e?L4(e):null,[e])}const Zy=[];function fI(e,t){t===void 0&&(t=Zs);const[n]=e,o=A0(n?An(n):null),[i,l]=g.useState(Zy);function c(){l(()=>e.length?e.map(p=>C0(p)?o:new vh(t(p),p)):Zy)}const d=Vc({callback:c});return Ar(()=>{d==null||d.disconnect(),c(),e.forEach(p=>d==null?void 0:d.observe(p))},[e]),i}function pI(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ja(t)?t:e}function hI(e){let{measure:t}=e;const[n,o]=g.useState(null),i=g.useCallback(m=>{for(const{target:h}of m)if(ja(h)){o(x=>{const v=t(h);return x?{...x,width:v.width,height:v.height}:v});break}},[t]),l=Vc({callback:i}),c=g.useCallback(m=>{const h=pI(m);l==null||l.disconnect(),h&&(l==null||l.observe(h)),o(h?t(h):null)},[t,l]),[d,p]=hc(c);return g.useMemo(()=>({nodeRef:d,rect:n,setRef:p}),[n,d,p])}const mI=[{sensor:Wc,options:{}},{sensor:Hc,options:{}}],gI={current:{}},oc={draggable:{measure:Vy},droppable:{measure:Vy,strategy:ua.WhileDragging,frequency:up.Optimized},dragOverlay:{measure:Zs}};class na 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,o;return(n=(o=this.get(t))==null?void 0:o.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 na,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:oc,measureDroppableContainers:gc,windowRect:null,measuringScheduled:!1},yI={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gc,draggableNodes:new Map,over:null,measureDroppableContainers:gc},qc=g.createContext(yI),D0=g.createContext(xI);function vI(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new na}}}function bI(e,t){switch(t.type){case Ft.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ft.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 Ft.DragEnd:case Ft.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ft.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new na(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case Ft.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const c=new na(e.droppable.containers);return c.set(n,{...l,disabled:i}),{...e,droppable:{...e.droppable,containers:c}}}case Ft.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const l=new na(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function wI(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=g.useContext(qc),l=ip(o),c=ip(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!o&&l&&c!=null){if(!xh(l)||document.activeElement===l.target)return;const d=i.get(c);if(!d)return;const{activatorNode:p,node:m}=d;if(!p.current&&!m.current)return;requestAnimationFrame(()=>{for(const h of[p.current,m.current]){if(!h)continue;const x=p4(h);if(x){x.focus();break}}})}},[o,t,i,c,l]),null}function kI(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,l)=>l({transform:i,...o}),n):n}function jI(e){return g.useMemo(()=>({draggable:{...oc.draggable,...e==null?void 0:e.draggable},droppable:{...oc.droppable,...e==null?void 0:e.droppable},dragOverlay:{...oc.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 SI(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const l=g.useRef(!1),{x:c,y:d}=typeof i=="boolean"?{x:i,y:i}:i;Ar(()=>{if(!c&&!d||!t){l.current=!1;return}if(l.current||!o)return;const m=t==null?void 0:t.node.current;if(!m||m.isConnected===!1)return;const h=n(m),x=k0(h,o);if(c||(x.x=0),d||(x.y=0),l.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){const v=j0(m);v&&v.scrollBy({top:x.y,left:x.x})}},[t,c,d,o,n])}const I0=g.createContext({...dr,scaleX:1,scaleY:1});var ko;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ko||(ko={}));const O0=g.memo(function(t){var n,o,i,l;let{id:c,accessibility:d,autoScroll:p=!0,children:m,sensors:h=mI,collisionDetection:x=P4,measuring:v,modifiers:b,...N}=t;const k=g.useReducer(bI,void 0,vI),[j,S]=k,[R,E]=v4(),[A,L]=g.useState(ko.Uninitialized),P=A===ko.Initialized,{draggable:{active:F,nodes:_,translate:Q},droppable:{containers:re}}=j,U=F!=null?_.get(F):null,G=g.useRef({initial:null,translated:null}),K=g.useMemo(()=>{var We;return F!=null?{id:F,data:(We=U==null?void 0:U.data)!=null?We:gI,rect:G}:null},[F,U]),Z=g.useRef(null),[M,I]=g.useState(null),[D,$]=g.useState(null),q=ca(N,Object.values(N)),T=Na("DndDescribedBy",c),z=g.useMemo(()=>re.getEnabled(),[re]),X=jI(v),{droppableRects:O,measureDroppableContainers:pe,measuringScheduled:Ce}=rI(z,{dragging:P,dependencies:[Q.x,Q.y],config:X.droppable}),ee=tI(_,F),de=g.useMemo(()=>D?ap(D):null,[D]),xe=xt(),be=oI(ee,X.draggable.measure);SI({activeNode:F!=null?_.get(F):null,config:xe.layoutShiftCompensation,initialRect:be,measure:X.draggable.measure});const we=Xy(ee,X.draggable.measure,be),Je=Xy(ee?ee.parentElement:null),nt=g.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:O,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:re,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),he=re.getNodeFor((n=nt.current.over)==null?void 0:n.id),ke=hI({measure:X.dragOverlay.measure}),$e=(o=ke.nodeRef.current)!=null?o:ee,He=P?(i=ke.rect)!=null?i:we:null,lt=!!(ke.nodeRef.current&&ke.rect),Oe=aI(lt?null:we),qe=A0($e?An($e):null),Qe=lI(P?he??ee:null),jt=fI(Qe),St=kI(b,{transform:{x:Q.x-Oe.x,y:Q.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:D,active:K,activeNodeRect:we,containerNodeRect:Je,draggingNodeRect:He,over:nt.current.over,overlayNodeRect:ke.rect,scrollableAncestors:Qe,scrollableAncestorRects:jt,windowRect:qe}),Dt=de?$s(de,Q):null,Qt=cI(Qe),Et=Jy(Qt),oe=Jy(Qt,[we]),ie=$s(St,Et),me=He?A4(He,St):null,ne=K&&me?x({active:K,collisionRect:me,droppableRects:O,droppableContainers:z,pointerCoordinates:Dt}):null,ye=C4(ne,"id"),[Pe,Ht]=g.useState(null),rn=lt?St:$s(St,oe),Jt=T4(rn,(l=Pe==null?void 0:Pe.rect)!=null?l:null,we),V=g.useRef(null),ce=g.useCallback((We,rt)=>{let{sensor:Pt,options:Wt}=rt;if(Z.current==null)return;const Zt=_.get(Z.current);if(!Zt)return;const sn=We.nativeEvent,yn=new Pt({active:Z.current,activeNode:Zt,event:sn,options:Wt,context:nt,onAbort(yt){if(!_.get(yt))return;const{onDragAbort:an}=q.current,er={id:yt};an==null||an(er),R({type:"onDragAbort",event:er})},onPending(yt,Wn,an,er){if(!_.get(yt))return;const{onDragPending:gr}=q.current,Dn={id:yt,constraint:Wn,initialCoordinates:an,offset:er};gr==null||gr(Dn),R({type:"onDragPending",event:Dn})},onStart(yt){const Wn=Z.current;if(Wn==null)return;const an=_.get(Wn);if(!an)return;const{onDragStart:er}=q.current,tr={activatorEvent:sn,active:{id:Wn,data:an.data,rect:G}};jo.unstable_batchedUpdates(()=>{er==null||er(tr),L(ko.Initializing),S({type:Ft.DragStart,initialCoordinates:yt,active:Wn}),R({type:"onDragStart",event:tr}),I(V.current),$(sn)})},onMove(yt){S({type:Ft.DragMove,coordinates:yt})},onEnd:Or(Ft.DragEnd),onCancel:Or(Ft.DragCancel)});V.current=yn;function Or(yt){return async function(){const{active:an,collisions:er,over:tr,scrollAdjustedTranslate:gr}=nt.current;let Dn=null;if(an&&gr){const{cancelDrop:Lr}=q.current;Dn={activatorEvent:sn,active:an,collisions:er,delta:gr,over:tr},yt===Ft.DragEnd&&typeof Lr=="function"&&await Promise.resolve(Lr(Dn))&&(yt=Ft.DragCancel)}Z.current=null,jo.unstable_batchedUpdates(()=>{S({type:yt}),L(ko.Uninitialized),Ht(null),I(null),$(null),V.current=null;const Lr=yt===Ft.DragEnd?"onDragEnd":"onDragCancel";if(Dn){const ri=q.current[Lr];ri==null||ri(Dn),R({type:Lr,event:Dn})}})}}},[_]),je=g.useCallback((We,rt)=>(Pt,Wt)=>{const Zt=Pt.nativeEvent,sn=_.get(Wt);if(Z.current!==null||!sn||Zt.dndKit||Zt.defaultPrevented)return;const yn={active:sn};We(Pt,rt.options,yn)===!0&&(Zt.dndKit={capturedBy:rt.sensor},Z.current=Wt,ce(Pt,rt))},[_,ce]),Fe=nI(h,je);uI(h),Ar(()=>{we&&A===ko.Initializing&&L(ko.Initialized)},[we,A]),g.useEffect(()=>{const{onDragMove:We}=q.current,{active:rt,activatorEvent:Pt,collisions:Wt,over:Zt}=nt.current;if(!rt||!Pt)return;const sn={active:rt,activatorEvent:Pt,collisions:Wt,delta:{x:ie.x,y:ie.y},over:Zt};jo.unstable_batchedUpdates(()=>{We==null||We(sn),R({type:"onDragMove",event:sn})})},[ie.x,ie.y]),g.useEffect(()=>{const{active:We,activatorEvent:rt,collisions:Pt,droppableContainers:Wt,scrollAdjustedTranslate:Zt}=nt.current;if(!We||Z.current==null||!rt||!Zt)return;const{onDragOver:sn}=q.current,yn=Wt.get(ye),Or=yn&&yn.rect.current?{id:yn.id,rect:yn.rect.current,data:yn.data,disabled:yn.disabled}:null,yt={active:We,activatorEvent:rt,collisions:Pt,delta:{x:Zt.x,y:Zt.y},over:Or};jo.unstable_batchedUpdates(()=>{Ht(Or),sn==null||sn(yt),R({type:"onDragOver",event:yt})})},[ye]),Ar(()=>{nt.current={activatorEvent:D,active:K,activeNode:ee,collisionRect:me,collisions:ne,droppableRects:O,draggableNodes:_,draggingNode:$e,draggingNodeRect:He,droppableContainers:re,over:Pe,scrollableAncestors:Qe,scrollAdjustedTranslate:ie},G.current={initial:He,translated:me}},[K,ee,ne,me,_,$e,He,O,re,Pe,Qe,ie]),J4({...xe,delta:Q,draggingRect:me,pointerCoordinates:Dt,scrollableAncestors:Qe,scrollableAncestorRects:jt});const Hn=g.useMemo(()=>({active:K,activeNode:ee,activeNodeRect:we,activatorEvent:D,collisions:ne,containerNodeRect:Je,dragOverlay:ke,draggableNodes:_,droppableContainers:re,droppableRects:O,over:Pe,measureDroppableContainers:pe,scrollableAncestors:Qe,scrollableAncestorRects:jt,measuringConfiguration:X,measuringScheduled:Ce,windowRect:qe}),[K,ee,we,D,ne,Je,ke,_,re,O,Pe,pe,Qe,jt,X,Ce,qe]),on=g.useMemo(()=>({activatorEvent:D,activators:Fe,active:K,activeNodeRect:we,ariaDescribedById:{draggable:T},dispatch:S,draggableNodes:_,over:Pe,measureDroppableContainers:pe}),[D,Fe,K,we,S,T,_,Pe,pe]);return Ct.createElement(v0.Provider,{value:E},Ct.createElement(qc.Provider,{value:on},Ct.createElement(D0.Provider,{value:Hn},Ct.createElement(I0.Provider,{value:Jt},m)),Ct.createElement(wI,{disabled:(d==null?void 0:d.restoreFocus)===!1})),Ct.createElement(k4,{...d,hiddenTextDescribedById:T}));function xt(){const We=(M==null?void 0:M.autoScrollEnabled)===!1,rt=typeof p=="object"?p.enabled===!1:p===!1,Pt=P&&!We&&!rt;return typeof p=="object"?{...p,enabled:Pt}:{enabled:Pt}}}),NI=g.createContext(null),ev="button",CI="Draggable";function EI(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const l=Na(CI),{activators:c,activatorEvent:d,active:p,activeNodeRect:m,ariaDescribedById:h,draggableNodes:x,over:v}=g.useContext(qc),{role:b=ev,roleDescription:N="draggable",tabIndex:k=0}=i??{},j=(p==null?void 0:p.id)===t,S=g.useContext(j?I0:NI),[R,E]=hc(),[A,L]=hc(),P=dI(c,t),F=ca(n);Ar(()=>(x.set(t,{id:t,key:l,node:R,activatorNode:A,data:F}),()=>{const Q=x.get(t);Q&&Q.key===l&&x.delete(t)}),[x,t]);const _=g.useMemo(()=>({role:b,tabIndex:k,"aria-disabled":o,"aria-pressed":j&&b===ev?!0:void 0,"aria-roledescription":N,"aria-describedby":h.draggable}),[o,b,k,j,N,h.draggable]);return{active:p,activatorEvent:d,activeNodeRect:m,attributes:_,isDragging:j,listeners:o?void 0:P,node:R,over:v,setNodeRef:E,setActivatorNodeRef:L,transform:S}}function PI(){return g.useContext(D0)}const TI="Droppable",RI={timeout:25};function AI(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const l=Na(TI),{active:c,dispatch:d,over:p,measureDroppableContainers:m}=g.useContext(qc),h=g.useRef({disabled:n}),x=g.useRef(!1),v=g.useRef(null),b=g.useRef(null),{disabled:N,updateMeasurementsFor:k,timeout:j}={...RI,...i},S=ca(k??o),R=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]),E=Vc({callback:R,disabled:N||!c}),A=g.useCallback((_,Q)=>{E&&(Q&&(E.unobserve(Q),x.current=!1),_&&E.observe(_))},[E]),[L,P]=hc(A),F=ca(t);return g.useEffect(()=>{!E||!L.current||(E.disconnect(),x.current=!1,E.observe(L.current))},[L,E]),g.useEffect(()=>(d({type:Ft.RegisterDroppable,element:{id:o,key:l,disabled:n,node:L,rect:v,data:F}}),()=>d({type:Ft.UnregisterDroppable,key:l,id:o})),[o]),g.useEffect(()=>{n!==h.current.disabled&&(d({type:Ft.SetDroppableDisabled,id:o,key:l,disabled:n}),h.current.disabled=n)},[o,l,n,d]),{active:c,rect:v,isOver:(p==null?void 0:p.id)===o,node:L,over:p,setNodeRef:P}}function Kc(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function DI(e,t){return e.reduce((n,o,i)=>{const l=t.get(o);return l&&(n[i]=l),n},Array(e.length))}function Vl(e){return e!==null&&e>=0}function II(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 OI(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const L0=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const l=Kc(t,o,n),c=t[i],d=l[i];return!d||!c?null:{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}},ql={scaleX:1,scaleY:1},_0=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:l,overIndex:c}=e;const d=(t=l[n])!=null?t:o;if(!d)return null;if(i===n){const m=l[c];return m?{x:0,y:n<c?m.top+m.height-(d.top+d.height):m.top-d.top,...ql}:null}const p=LI(l,i,n);return i>n&&i<=c?{x:0,y:-d.height-p,...ql}:i<n&&i>=c?{x:0,y:d.height+p,...ql}:{x:0,y:0,...ql}};function LI(e,t,n){const o=e[t],i=e[t-1],l=e[t+1];return o?n<t?i?o.top-(i.top+i.height):l?l.top-(o.top+o.height):0:l?l.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const M0="Sortable",$0=Ct.createContext({activeIndex:-1,containerId:M0,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:L0,disabled:{draggable:!1,droppable:!1}});function F0(e){let{children:t,id:n,items:o,strategy:i=L0,disabled:l=!1}=e;const{active:c,dragOverlay:d,droppableRects:p,over:m,measureDroppableContainers:h}=PI(),x=Na(M0,n),v=d.rect!==null,b=g.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),N=c!=null,k=c?b.indexOf(c.id):-1,j=m?b.indexOf(m.id):-1,S=g.useRef(b),R=!II(b,S.current),E=j!==-1&&k===-1||R,A=OI(l);Ar(()=>{R&&N&&h(b)},[R,b,N,h]),g.useEffect(()=>{S.current=b},[b]);const L=g.useMemo(()=>({activeIndex:k,containerId:x,disabled:A,disableTransforms:E,items:b,overIndex:j,useDragOverlay:v,sortedRects:DI(b,p),strategy:i}),[k,x,A.draggable,A.droppable,E,b,j,p,v,i]);return Ct.createElement($0.Provider,{value:L},t)}const _I=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return Kc(n,o,i).indexOf(t)},MI=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:l,newIndex:c,previousItems:d,previousContainerId:p,transition:m}=e;return!m||!o||d!==l&&i===c?!1:n?!0:c!==i&&t===p},$I={duration:200,easing:"ease"},z0="transform",FI=Bs.Transition.toString({property:z0,duration:0,easing:"linear"}),zI={roleDescription:"sortable"};function BI(e){let{disabled:t,index:n,node:o,rect:i}=e;const[l,c]=g.useState(null),d=g.useRef(n);return Ar(()=>{if(!t&&n!==d.current&&o.current){const p=i.current;if(p){const m=Zs(o.current,{ignoreTransform:!0}),h={x:p.left-m.left,y:p.top-m.top,scaleX:p.width/m.width,scaleY:p.height/m.height};(h.x||h.y)&&c(h)}}n!==d.current&&(d.current=n)},[t,n,o,i]),g.useEffect(()=>{l&&c(null)},[l]),l}function B0(e){let{animateLayoutChanges:t=MI,attributes:n,disabled:o,data:i,getNewIndex:l=_I,id:c,strategy:d,resizeObserverConfig:p,transition:m=$I}=e;const{items:h,containerId:x,activeIndex:v,disabled:b,disableTransforms:N,sortedRects:k,overIndex:j,useDragOverlay:S,strategy:R}=g.useContext($0),E=UI(o,b),A=h.indexOf(c),L=g.useMemo(()=>({sortable:{containerId:x,index:A,items:h},...i}),[x,i,A,h]),P=g.useMemo(()=>h.slice(h.indexOf(c)),[h,c]),{rect:F,node:_,isOver:Q,setNodeRef:re}=AI({id:c,data:L,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...p}}),{active:U,activatorEvent:G,activeNodeRect:K,attributes:Z,setNodeRef:M,listeners:I,isDragging:D,over:$,setActivatorNodeRef:q,transform:T}=EI({id:c,data:L,attributes:{...zI,...n},disabled:E.draggable}),z=c4(re,M),X=!!U,O=X&&!N&&Vl(v)&&Vl(j),pe=!S&&D,Ce=pe&&O?T:null,de=O?Ce??(d??R)({rects:k,activeNodeRect:K,activeIndex:v,overIndex:j,index:A}):null,xe=Vl(v)&&Vl(j)?l({id:c,items:h,activeIndex:v,overIndex:j}):A,be=U==null?void 0:U.id,we=g.useRef({activeId:be,items:h,newIndex:xe,containerId:x}),Je=h!==we.current.items,nt=t({active:U,containerId:x,isDragging:D,isSorting:X,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}),he=BI({disabled:!nt,index:A,node:_,rect:F});return g.useEffect(()=>{X&&we.current.newIndex!==xe&&(we.current.newIndex=xe),x!==we.current.containerId&&(we.current.containerId=x),h!==we.current.items&&(we.current.items=h)},[X,xe,x,h]),g.useEffect(()=>{if(be===we.current.activeId)return;if(be!=null&&we.current.activeId==null){we.current.activeId=be;return}const $e=setTimeout(()=>{we.current.activeId=be},50);return()=>clearTimeout($e)},[be]),{active:U,activeIndex:v,attributes:Z,data:L,rect:F,index:A,newIndex:xe,items:h,isOver:Q,isSorting:X,isDragging:D,listeners:I,node:_,overIndex:j,over:$,setNodeRef:z,setActivatorNodeRef:q,setDroppableNodeRef:re,setDraggableNodeRef:M,transform:he??de,transition:ke()};function ke(){if(he||Je&&we.current.newIndex===A)return FI;if(!(pe&&!xh(G)||!m)&&(X||nt))return Bs.Transition.toString({...m,property:z0})}}function UI(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}Ye.Down,Ye.Right,Ye.Up,Ye.Left;function Do(e){return`/api/projects/${encodeURIComponent(e)}/todos`}function HI(e){const[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(null),d=g.useCallback(async()=>{if(e)try{const p=await fetch(Do(e));if(!p.ok)throw new Error(`HTTP ${p.status}`);n(await p.json()),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to fetch todos")}finally{i(!1)}},[e]);return g.useEffect(()=>{d()},[d]),Pc(p=>{p.type==="todos-updated"&&p.projectSlug===e&&d()}),{data:t,loading:o,error:l,refetch:d}}async function WI(e,t,n){await fetch(Do(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:t,tags:n})})}async function VI(e,t,n){await fetch(`${Do(e)}/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({summary:"Completed."})})}async function qI(e,t,n){await fetch(`${Do(e)}/${t}/block`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:n})})}async function KI(e,t,n){await fetch(`${Do(e)}/${t}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:n})})}async function GI(e,t){await fetch(`${Do(e)}/${t}/reopen`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function YI(e,t){await fetch(`${Do(e)}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:t})})}async function XI(e,t){await fetch(`${Do(e)}/${t}`,{method:"DELETE"})}const tv=[{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 wh({status:e,onChange:t}){const[n,o]=g.useState(!1),i=g.useRef(null);g.useEffect(()=>{if(!n)return;function c(d){i.current&&!i.current.contains(d.target)&&o(!1)}return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]);const l=tv.find(c=>c.value===e);return a.jsxs("div",{className:"relative",ref:i,onClick:c=>c.stopPropagation(),children:[a.jsx("button",{onClick:()=>o(!n),className:`text-lg leading-none ${l.color} hover:opacity-70 transition`,title:l.label,children:l.icon}),n&&a.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:tv.filter(c=>c.value!==e).map(c=>a.jsxs("button",{onClick:()=>{t(c.value),o(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm hover:bg-foreground/5 transition ${c.color}`,children:[a.jsx("span",{className:"text-base leading-none",children:c.icon}),a.jsx("span",{children:c.label})]},c.value))})]})}function QI({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=B0({id:e.id,disabled:c}),k={transform:Bs.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:h,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Zv,{className:"h-4 w-4"})}),a.jsx(wh,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(ga,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(Ec,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(To,{className:"h-3 w-3"})})]})]})}function JI({projectId:e}){const{data:t,loading:n,error:o,refetch:i}=HI(e),[l,c]=g.useState(""),[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState(null),k=g.useRef(null);ts("list:todos");const j=!!(l.trim()||d||m),S=b0(xc(Wc,{activationConstraint:{distance:8}}),xc(Hc));function R(I,D){I.stopPropagation(),navigator.clipboard.writeText(D),N(D),setTimeout(()=>N($=>$===D?null:$),1500)}const E=g.useMemo(()=>{if(!(t!=null&&t.items))return[];const I=new Set;for(const D of t.items)for(const $ of D.tags)I.add($);return Array.from(I).sort()},[t]),A=g.useMemo(()=>{if(!(t!=null&&t.items))return[];let I=t.items;if(l.trim()){const D=l.toLowerCase();I=I.filter($=>$.description.toLowerCase().includes(D)||$.tags.some(q=>q.toLowerCase().includes(D))||$.id.includes(D))}return d&&(I=I.filter(D=>D.status===d)),m&&(I=I.filter(D=>D.tags.includes(m))),I},[t,l,d,m]);async function L(){x.trim()&&(await WI(e,x.trim()),v(""),i())}const P={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function F(I,D){Q(I,P[D]||"open")}async function _(I,D,$){I.stopPropagation(),window.confirm(`Delete "${$}"? This can't be undone.`)&&(await XI(e,D),i())}async function Q(I,D){switch(D){case"open":await GI(e,I);break;case"in_progress":await KI(e,I);break;case"completed":await VI(e,I);break;case"blocked":await qI(e,I);break}i()}const{hotkeyRowProps:re}=va(A,{scope:"list:todos",bindO:!1,onOpen:I=>F(I.id,I.status)});ht({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var I;return(I=k.current)==null?void 0:I.focus()}}),ht({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>i()});const[U,G]=Po(),K=U.get("focus");g.useEffect(()=>{if(!K)return;const I=document.querySelector(`[data-todo-id="${window.CSS.escape(K)}"]`);if(!I)return;I.scrollIntoView({block:"nearest"}),I.classList.add("ring-2","ring-primary/60");const D=window.setTimeout(()=>{I.classList.remove("ring-2","ring-primary/60"),G($=>{const q=new URLSearchParams($);return q.delete("focus"),q},{replace:!0})},1500);return()=>window.clearTimeout(D)},[K,A.length,G]);async function Z(I){const{active:D,over:$}=I;if(!$||D.id===$.id||!(t!=null&&t.items))return;const q=t.items.findIndex(X=>X.id===D.id),T=t.items.findIndex(X=>X.id===$.id);if(q===-1||T===-1)return;const z=Kc(t.items,q,T);await YI(e,z.map(X=>X.id)),i()}if(n)return a.jsx(kt,{label:"Loading todos..."});if(o)return a.jsx(gt,{error:o});const M=(t==null?void 0:t.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(et,{label:"Open",value:M.open,icon:zn}),a.jsx(et,{label:"In Progress",value:M.in_progress,icon:zn,tone:"info"}),a.jsx(et,{label:"Blocked",value:M.blocked,icon:Ks,tone:"warn"}),a.jsx(et,{label:"Total",value:M.total,icon:zn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:I=>v(I.target.value),onKeyDown:I=>I.key==="Enter"&&L(),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"}),a.jsxs("button",{onClick:L,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:[a.jsx(Un,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(qs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:k,type:"text",placeholder:"Search...",value:l,onChange:I=>c(I.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"})]}),a.jsxs("select",{value:d,onChange:I=>p(I.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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),E.length>0&&a.jsxs("select",{value:m,onChange:I=>h(I.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:[a.jsx("option",{value:"",children:"All tags"}),E.map(I=>a.jsxs("option",{value:I,children:["#",I]},I))]})]}),A.length===0?a.jsx(tt,{title:"No todos",description:"Add your first todo above."}):a.jsx(O0,{sensors:S,collisionDetection:w0,onDragEnd:Z,children:a.jsx(F0,{items:A.map(I=>I.id),strategy:_0,children:a.jsx("div",{className:"space-y-1",children:A.map((I,D)=>a.jsx(QI,{item:I,copiedId:b,onCycleStatus:F,onStatusChange:Q,onCopyId:R,onDelete:_,disabled:j,hotkeyRowProps:re(D)},I.id))})})})]})}const ZI=new Set(["overview","assignments","todos","dependencies","knowledge"]);function nv(){const{slug:e}=At(),t=Lt(),n=Ut();ts("project"),ht({keys:"a",scope:"project",description:"Create assignment",handler:()=>n(`${t}/projects/${e}/create/assignment`)}),ht({keys:"e",scope:"project",description:"Edit project",handler:()=>n(`${t}/projects/${e}/edit`)});const{data:o,loading:i,error:l,refetch:c}=Nb(e),d=Mc(),{data:p}=Dp(),[m,h]=Po(),x=m.get("tab"),v=x&&ZI.has(x)?x:"overview";function b(U){h(G=>{const K=new URLSearchParams(G);return U==="overview"?K.delete("tab"):K.set("tab",U),K},{replace:!0})}const[N,k]=g.useState("board"),[j,S]=g.useState("all"),[R,E]=g.useState("all"),[A,L]=g.useState("all"),P=g.useMemo(()=>o?Object.fromEntries(o.assignments.flatMap(U=>{const G=`${t}/projects/${o.slug}/assignments/${U.slug}`;return[[U.slug,G],[U.title,G]]})):{},[o]);async function F(U){await fetch(`/api/projects/${e}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:U})}),c()}async function _(U){await fetch(`/api/projects/${e}/move-workspace`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:U})}),c()}if(i)return a.jsx(kt,{label:"Loading project workspace…"});if(l||!o)return a.jsx(gt,{error:l||"Project not found."});const Q=Array.from(new Set(o.assignments.map(U=>U.assignee).filter(Boolean))).sort(),re=o.assignments.filter(U=>!(j!=="all"&&U.status!==j||R!=="all"&&U.assignee!==R||A!=="all"&&U.priority!==A));return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Xt,{status:o.status}),o.statusOverride&&a.jsx("button",{type:"button",className:"shell-action border-warning-foreground/40 text-warning-foreground",onClick:()=>F(null),title:"Clear manual status override and return to derived status",children:"Clear Override"}),a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:U=>{U.target.value&&F(U.target.value)},title:"Override project status",children:[a.jsx("option",{value:"",children:"Set Status…"}),d.statuses.map(U=>a.jsx("option",{value:U.id,children:U.label},U.id)),a.jsx("option",{value:"active",children:"Active"})]}),p&&p.workspaces.length>0&&a.jsxs("select",{className:"shell-action appearance-none bg-transparent text-sm",value:"",onChange:U=>{U.target.value==="_ungrouped"?_(null):U.target.value&&_(U.target.value)},title:"Move project to a different workspace",children:[a.jsx("option",{value:"",children:"Move to Workspace…"}),p.workspaces.filter(U=>U!==o.workspace).map(U=>a.jsx("option",{value:U,children:U},U)),o.workspace&&a.jsx("option",{value:"_ungrouped",children:"Ungrouped"})]}),a.jsxs(Re,{className:"shell-action",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(Ex,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Project"})]}),a.jsxs(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Un,{className:"h-4 w-4"}),a.jsx("span",{children:"New Assignment"})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Created ",So(o.created),". Last source update ",Er(o.updated),"."]})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:[a.jsx(et,{label:"Assignments",value:o.progress.total}),a.jsx(et,{label:"In Progress",value:o.progress.in_progress??0,tone:"info"}),a.jsx(et,{label:"Review",value:o.progress.review??0,tone:"info"}),a.jsx(et,{label:"Blocked",value:o.progress.blocked??0,tone:"warn"}),a.jsx(et,{label:"Completed",value:o.progress.completed??0,tone:"success"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx(Zp,{value:v,onValueChange:b,items:[{value:"overview",label:"Overview",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Ae,{title:"Project Overview",children:a.jsx(Yt,{content:o.body,emptyState:"This project does not have overview content yet."})})})},{value:"assignments",label:"Assignments",count:o.assignments.length,content:a.jsx("div",{className:"space-y-5",children:a.jsx(Ae,{title:"Assignment Queue",description:"Board and table views over the source assignment files.",actions:a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("select",{value:j,onChange:U=>S(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),d.statuses.map(U=>a.jsx("option",{value:U.id,children:U.label},U.id))]}),a.jsxs("select",{value:R,onChange:U=>E(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),Q.map(U=>a.jsx("option",{value:U??"",children:U},U))]}),a.jsxs("select",{value:A,onChange:U=>L(U.target.value),className:"editor-input max-w-[170px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]}),a.jsx(Xp,{value:N,onChange:U=>k(U),options:[{value:"board",label:"Board"},{value:"table",label:"Table"}]})]}),children:re.length===0?a.jsx(tt,{title:"No assignments match these filters",description:"Clear the current filters or create a new assignment for this project.",actions:a.jsx(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects/${o.slug}/create/assignment`,children:"Create Assignment"})}):N==="board"?a.jsx("div",{className:"grid gap-3 lg:grid-cols-2",children:re.map(U=>a.jsx(eO,{projectSlug:o.slug,assignment:U},U.slug))}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx("th",{className:"pb-3 font-medium",children:"Assignment"}),a.jsx("th",{className:"pb-3 font-medium",children:"Status"}),a.jsx("th",{className:"pb-3 font-medium",children:"Priority"}),a.jsx("th",{className:"pb-3 font-medium",children:"Assignee"}),a.jsx("th",{className:"pb-3 font-medium",children:"Updated"})]})}),a.jsx("tbody",{children:re.map(U=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",children:[a.jsx("td",{className:"py-4",children:a.jsx(Re,{to:`${t}/projects/${o.slug}/assignments/${U.slug}`,className:"font-semibold text-foreground hover:text-primary",children:U.title})}),a.jsx("td",{className:"py-4",children:a.jsx(Xt,{status:U.status})}),a.jsx("td",{className:"py-4 capitalize text-muted-foreground",children:U.priority}),a.jsx("td",{className:"py-4 text-muted-foreground",children:U.assignee??"—"}),a.jsx("td",{className:"py-4 text-muted-foreground",children:So(U.updated)})]},U.slug))})]})})})})},{value:"todos",label:"Todos",content:a.jsx(JI,{projectId:o.slug})},{value:"dependencies",label:"Dependencies",content:o.dependencyGraph?a.jsx(Ae,{title:"Dependency Graph",description:"Rendered from the derived graph when available, with a source-based fallback.",children:a.jsx(BT,{definition:o.dependencyGraph,nodeRoutes:P})}):a.jsx(tt,{title:"No dependency graph yet",description:"Dependencies appear here once assignments declare dependsOn relationships."})},{value:"knowledge",label:"Knowledge",content:a.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[a.jsx(Ae,{title:"Resources",description:"Shared project references.",children:o.resources.length===0?a.jsx(tt,{title:"No resources yet",description:"Resources live at the project level and stay available to every assignment."}):a.jsx("div",{className:"space-y-3",children:o.resources.map(U=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:U.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[U.category," · ",U.source]})]},U.slug))})}),a.jsx(Ae,{title:"Memories",description:"Learnings and patterns captured during the project.",children:o.memories.length===0?a.jsx(tt,{title:"No memories yet",description:"Memories capture patterns discovered during execution so later assignments can reuse them."}):a.jsx("div",{className:"space-y-3",children:o.memories.map(U=>a.jsxs("div",{className:"rounded-md border border-border/60 bg-background/80 p-3",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:U.name}),a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:[U.scope," · ",U.source]})]},U.slug))})})]})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Ae,{title:"Progress Summary",children:a.jsx(dc,{progress:o.progress,showLegend:!0})}),a.jsx(Ae,{title:"Attention",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Blocked"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.blockedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Failed"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.failedCount})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("dt",{className:"text-muted-foreground",children:"Unanswered questions"}),a.jsx("dd",{className:"font-semibold text-foreground",children:o.needsAttention.openQuestions})]})]})}),a.jsx(Ae,{title:"Quick Links",children:a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/edit`,children:[a.jsx(Ex,{className:"h-4 w-4"}),"Edit project source"]}),a.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:`${t}/projects/${o.slug}/create/assignment`,children:[a.jsx(Un,{className:"h-4 w-4"}),"Create assignment"]}),a.jsxs(Re,{className:"flex items-center gap-2 text-primary hover:underline",to:"/help",children:[a.jsx(BN,{className:"h-4 w-4"}),"Review project rules"]}),a.jsxs("button",{type:"button",onClick:()=>b("dependencies"),className:"flex items-center gap-2 text-primary hover:underline",children:[a.jsx(Jv,{className:"h-4 w-4"}),"Jump to dependencies"]})]})}),o.archived?a.jsxs(Ae,{title:"Archive Metadata",children:[a.jsxs("p",{className:"text-sm leading-6 text-muted-foreground",children:["Archived ",o.archivedAt?Er(o.archivedAt):"with no timestamp recorded","."]}),o.archivedReason?a.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:o.archivedReason}):null]}):null]})]})]})}function eO({projectSlug:e,assignment:t}){const n=Lt();return a.jsxs(Re,{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:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx("h3",{className:"font-semibold text-foreground",children:t.title}),a.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),a.jsx("span",{onClick:o=>{o.preventDefault(),o.stopPropagation()},children:a.jsx(Vr,{value:t.id})})]}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Updated ",So(t.updated)]})]}),a.jsx(Xt,{status:t.status})]}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:t.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:t.assignee??"Unassigned"}),a.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 U0({open:e,action:t,assignmentTitle:n,loading:o=!1,onConfirm:i,onOpenChange:l}){const[c,d]=g.useState("");g.useEffect(()=>{e||d("")},[e,t==null?void 0:t.command]);const p=g.useMemo(()=>t&&t.command==="block"?"Blocked Reason":"Reason",[t]);if(!t)return null;const m=`${t.label} "${n}"`,h=o?"Applying...":t.label,x=c.trim()||void 0;return a.jsx(Lc,{open:e,onOpenChange:v=>o?void 0:l(v),children:a.jsx(xa,{className:"max-w-xl",children:a.jsxs("form",{className:"space-y-5",onSubmit:v=>{v.preventDefault(),i(x)},children:[a.jsxs(xP,{children:[a.jsx(ya,{children:m}),a.jsx(Vp,{children:t.description})]}),t.warning?a.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,a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground",children:p}),a.jsx("textarea",{value:c,onChange:v=>d(v.target.value),autoFocus:!0,rows:4,disabled:o,placeholder:"Optional context for why this assignment is blocked.",className:"editor-textarea min-h-[120px] bg-background/95 font-sans"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave this blank to continue without a written reason."})]}),a.jsxs(yP,{children:[a.jsx("button",{type:"button",onClick:()=>l(!1),disabled:o,className:"shell-action disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:o,className:"shell-action bg-foreground text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",children:h})]})]})})})}var tO=Symbol("radix.slottable");function nO(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=tO,t}var H0="AlertDialog",[rO]=Zo(H0,[Gb]),Yr=Gb(),W0=e=>{const{__scopeAlertDialog:t,...n}=e,o=Yr(t);return a.jsx(uw,{...o,...n,modal:!0})};W0.displayName=H0;var oO="AlertDialogTrigger",sO=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Yr(n);return a.jsx(mP,{...i,...o,ref:t})});sO.displayName=oO;var iO="AlertDialogPortal",V0=e=>{const{__scopeAlertDialog:t,...n}=e,o=Yr(t);return a.jsx(dw,{...o,...n})};V0.displayName=iO;var aO="AlertDialogOverlay",q0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Yr(n);return a.jsx(Bp,{...i,...o,ref:t})});q0.displayName=aO;var Fs="AlertDialogContent",[lO,cO]=rO(Fs),uO=nO("AlertDialogContent"),K0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...i}=e,l=Yr(n),c=g.useRef(null),d=fn(t,c),p=g.useRef(null);return a.jsx(dP,{contentName:Fs,titleName:G0,docsSlug:"alert-dialog",children:a.jsx(lO,{scope:n,cancelRef:p,children:a.jsxs(Up,{role:"alertdialog",...l,...i,ref:d,onOpenAutoFocus:mt(i.onOpenAutoFocus,m=>{var h;m.preventDefault(),(h=p.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[a.jsx(uO,{children:o}),a.jsx(fO,{contentRef:c})]})})})});K0.displayName=Fs;var G0="AlertDialogTitle",Y0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Yr(n);return a.jsx(Hp,{...i,...o,ref:t})});Y0.displayName=G0;var X0="AlertDialogDescription",Q0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Yr(n);return a.jsx(Wp,{...i,...o,ref:t})});Q0.displayName=X0;var dO="AlertDialogAction",J0=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,i=Yr(n);return a.jsx(fw,{...i,...o,ref:t})});J0.displayName=dO;var Z0="AlertDialogCancel",e1=g.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:i}=cO(Z0,n),l=Yr(n),c=fn(t,i);return a.jsx(fw,{...l,...o,ref:c})});e1.displayName=Z0;var fO=({contentRef:e})=>{const t=`\`${Fs}\` requires a description for the component to be accessible for screen reader users.
|
|
472
|
+
|
|
473
|
+
You can add a description to the \`${Fs}\` by passing a \`${X0}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
474
|
+
|
|
475
|
+
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 \`${Fs}\`. 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.
|
|
476
|
+
|
|
477
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var o;document.getElementById((o=e.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},pO=W0,hO=V0,t1=q0,n1=K0,r1=J0,o1=e1,s1=Y0,i1=Q0;const mO=pO,gO=hO,a1=g.forwardRef(({className:e,...t},n)=>a.jsx(t1,{ref:n,className:Ue("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",e),...t}));a1.displayName=t1.displayName;const l1=g.forwardRef(({className:e,...t},n)=>a.jsxs(gO,{children:[a.jsx(a1,{}),a.jsx(n1,{ref:n,className:Ue("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 rounded-xl border border-border/70 bg-card p-6 shadow-2xl outline-none",e),...t})]}));l1.displayName=n1.displayName;function xO({className:e,...t}){return a.jsx("div",{className:Ue("flex flex-col space-y-2 text-left",e),...t})}function yO({className:e,...t}){return a.jsx("div",{className:Ue("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}const c1=g.forwardRef(({className:e,...t},n)=>a.jsx(s1,{ref:n,className:Ue("text-lg font-semibold tracking-tight text-foreground",e),...t}));c1.displayName=s1.displayName;const u1=g.forwardRef(({className:e,...t},n)=>a.jsx(i1,{ref:n,className:Ue("text-sm leading-6 text-muted-foreground",e),...t}));u1.displayName=i1.displayName;const d1=g.forwardRef(({className:e,...t},n)=>a.jsx(r1,{ref:n,className:Ue(e),...t}));d1.displayName=r1.displayName;const f1=g.forwardRef(({className:e,...t},n)=>a.jsx(o1,{ref:n,className:Ue(e),...t}));f1.displayName=o1.displayName;function p1({open:e,title:t,description:n,confirmLabel:o,cancelLabel:i="Cancel",loading:l=!1,destructive:c=!1,onConfirm:d,onOpenChange:p}){return a.jsx(mO,{open:e,onOpenChange:m=>l?void 0:p(m),children:a.jsxs(l1,{children:[a.jsxs(xO,{children:[a.jsx(c1,{children:t}),a.jsx(u1,{children:n})]}),a.jsxs(yO,{children:[a.jsx(f1,{disabled:l,className:"shell-action mt-0 disabled:cursor-not-allowed disabled:opacity-50",children:i}),a.jsx(d1,{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...":o})]})]})})}const vO=["top","right","bottom","left"],Co=Math.min,$n=Math.max,vc=Math.round,Kl=Math.floor,Tr=e=>({x:e,y:e}),bO={left:"right",right:"left",bottom:"top",top:"bottom"};function dp(e,t,n){return $n(e,Co(t,n))}function Kr(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function ei(e){return e.split("-")[1]}function kh(e){return e==="x"?"y":"x"}function jh(e){return e==="y"?"height":"width"}function Nr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Sh(e){return kh(Nr(e))}function wO(e,t,n){n===void 0&&(n=!1);const o=ei(e),i=Sh(e),l=jh(i);let c=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=bc(c)),[c,bc(c)]}function kO(e){const t=bc(e);return[fp(e),t,fp(t)]}function fp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const rv=["left","right"],ov=["right","left"],jO=["top","bottom"],SO=["bottom","top"];function NO(e,t,n){switch(e){case"top":case"bottom":return n?t?ov:rv:t?rv:ov;case"left":case"right":return t?jO:SO;default:return[]}}function CO(e,t,n,o){const i=ei(e);let l=NO(Gr(e),n==="start",o);return i&&(l=l.map(c=>c+"-"+i),t&&(l=l.concat(l.map(fp)))),l}function bc(e){const t=Gr(e);return bO[t]+e.slice(t.length)}function EO(e){return{top:0,right:0,bottom:0,left:0,...e}}function h1(e){return typeof e!="number"?EO(e):{top:e,right:e,bottom:e,left:e}}function wc(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function sv(e,t,n){let{reference:o,floating:i}=e;const l=Nr(t),c=Sh(t),d=jh(c),p=Gr(t),m=l==="y",h=o.x+o.width/2-i.width/2,x=o.y+o.height/2-i.height/2,v=o[d]/2-i[d]/2;let b;switch(p){case"top":b={x:h,y:o.y-i.height};break;case"bottom":b={x:h,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:x};break;case"left":b={x:o.x-i.width,y:x};break;default:b={x:o.x,y:o.y}}switch(ei(t)){case"start":b[c]-=v*(n&&m?-1:1);break;case"end":b[c]+=v*(n&&m?-1:1);break}return b}async function PO(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:l,rects:c,elements:d,strategy:p}=e,{boundary:m="clippingAncestors",rootBoundary:h="viewport",elementContext:x="floating",altBoundary:v=!1,padding:b=0}=Kr(t,e),N=h1(b),j=d[v?x==="floating"?"reference":"floating":x],S=wc(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:p})),R=x==="floating"?{x:o,y:i,width:c.floating.width,height:c.floating.height}:c.reference,E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(E))?await(l.getScale==null?void 0:l.getScale(E))||{x:1,y:1}:{x:1,y:1},L=wc(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:R,offsetParent:E,strategy:p}):R);return{top:(S.top-L.top+N.top)/A.y,bottom:(L.bottom-S.bottom+N.bottom)/A.y,left:(S.left-L.left+N.left)/A.x,right:(L.right-S.right+N.right)/A.x}}const TO=50,RO=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:l=[],platform:c}=n,d=c.detectOverflow?c:{...c,detectOverflow:PO},p=await(c.isRTL==null?void 0:c.isRTL(t));let m=await c.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:x}=sv(m,o,p),v=o,b=0;const N={};for(let k=0;k<l.length;k++){const j=l[k];if(!j)continue;const{name:S,fn:R}=j,{x:E,y:A,data:L,reset:P}=await R({x:h,y:x,initialPlacement:o,placement:v,strategy:i,middlewareData:N,rects:m,platform:d,elements:{reference:e,floating:t}});h=E??h,x=A??x,N[S]={...N[S],...L},P&&b<TO&&(b++,typeof P=="object"&&(P.placement&&(v=P.placement),P.rects&&(m=P.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:i}):P.rects),{x:h,y:x}=sv(m,v,p)),k=-1)}return{x:h,y:x,placement:v,strategy:i,middlewareData:N}},AO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:l,platform:c,elements:d,middlewareData:p}=t,{element:m,padding:h=0}=Kr(e,t)||{};if(m==null)return{};const x=h1(h),v={x:n,y:o},b=Sh(i),N=jh(b),k=await c.getDimensions(m),j=b==="y",S=j?"top":"left",R=j?"bottom":"right",E=j?"clientHeight":"clientWidth",A=l.reference[N]+l.reference[b]-v[b]-l.floating[N],L=v[b]-l.reference[b],P=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m));let F=P?P[E]:0;(!F||!await(c.isElement==null?void 0:c.isElement(P)))&&(F=d.floating[E]||l.floating[N]);const _=A/2-L/2,Q=F/2-k[N]/2-1,re=Co(x[S],Q),U=Co(x[R],Q),G=re,K=F-k[N]-U,Z=F/2-k[N]/2+_,M=dp(G,Z,K),I=!p.arrow&&ei(i)!=null&&Z!==M&&l.reference[N]/2-(Z<G?re:U)-k[N]/2<0,D=I?Z<G?Z-G:Z-K:0;return{[b]:v[b]+D,data:{[b]:M,centerOffset:Z-M-D,...I&&{alignmentOffset:D}},reset:I}}}),DO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:l,rects:c,initialPlacement:d,platform:p,elements:m}=t,{mainAxis:h=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:k=!0,...j}=Kr(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const S=Gr(i),R=Nr(d),E=Gr(d)===d,A=await(p.isRTL==null?void 0:p.isRTL(m.floating)),L=v||(E||!k?[bc(d)]:kO(d)),P=N!=="none";!v&&P&&L.push(...CO(d,k,N,A));const F=[d,...L],_=await p.detectOverflow(t,j),Q=[];let re=((o=l.flip)==null?void 0:o.overflows)||[];if(h&&Q.push(_[S]),x){const Z=wO(i,c,A);Q.push(_[Z[0]],_[Z[1]])}if(re=[...re,{placement:i,overflows:Q}],!Q.every(Z=>Z<=0)){var U,G;const Z=(((U=l.flip)==null?void 0:U.index)||0)+1,M=F[Z];if(M&&(!(x==="alignment"?R!==Nr(M):!1)||re.every($=>Nr($.placement)===R?$.overflows[0]>0:!0)))return{data:{index:Z,overflows:re},reset:{placement:M}};let I=(G=re.filter(D=>D.overflows[0]<=0).sort((D,$)=>D.overflows[1]-$.overflows[1])[0])==null?void 0:G.placement;if(!I)switch(b){case"bestFit":{var K;const D=(K=re.filter($=>{if(P){const q=Nr($.placement);return q===R||q==="y"}return!0}).map($=>[$.placement,$.overflows.filter(q=>q>0).reduce((q,T)=>q+T,0)]).sort(($,q)=>$[1]-q[1])[0])==null?void 0:K[0];D&&(I=D);break}case"initialPlacement":I=d;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function iv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function av(e){return vO.some(t=>e[t]>=0)}const IO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:i="referenceHidden",...l}=Kr(e,t);switch(i){case"referenceHidden":{const c=await o.detectOverflow(t,{...l,elementContext:"reference"}),d=iv(c,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:av(d)}}}case"escaped":{const c=await o.detectOverflow(t,{...l,altBoundary:!0}),d=iv(c,n.floating);return{data:{escapedOffsets:d,escaped:av(d)}}}default:return{}}}}},m1=new Set(["left","top"]);async function OO(e,t){const{placement:n,platform:o,elements:i}=e,l=await(o.isRTL==null?void 0:o.isRTL(i.floating)),c=Gr(n),d=ei(n),p=Nr(n)==="y",m=m1.has(c)?-1:1,h=l&&p?-1:1,x=Kr(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:N}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return d&&typeof N=="number"&&(b=d==="end"?N*-1:N),p?{x:b*h,y:v*m}:{x:v*m,y:b*h}}const LO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:l,placement:c,middlewareData:d}=t,p=await OO(t,e);return c===((n=d.offset)==null?void 0:n.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:i+p.x,y:l+p.y,data:{...p,placement:c}}}}},_O=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:l}=t,{mainAxis:c=!0,crossAxis:d=!1,limiter:p={fn:S=>{let{x:R,y:E}=S;return{x:R,y:E}}},...m}=Kr(e,t),h={x:n,y:o},x=await l.detectOverflow(t,m),v=Nr(Gr(i)),b=kh(v);let N=h[b],k=h[v];if(c){const S=b==="y"?"top":"left",R=b==="y"?"bottom":"right",E=N+x[S],A=N-x[R];N=dp(E,N,A)}if(d){const S=v==="y"?"top":"left",R=v==="y"?"bottom":"right",E=k+x[S],A=k-x[R];k=dp(E,k,A)}const j=p.fn({...t,[b]:N,[v]:k});return{...j,data:{x:j.x-n,y:j.y-o,enabled:{[b]:c,[v]:d}}}}}},MO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:l,middlewareData:c}=t,{offset:d=0,mainAxis:p=!0,crossAxis:m=!0}=Kr(e,t),h={x:n,y:o},x=Nr(i),v=kh(x);let b=h[v],N=h[x];const k=Kr(d,t),j=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(p){const E=v==="y"?"height":"width",A=l.reference[v]-l.floating[E]+j.mainAxis,L=l.reference[v]+l.reference[E]-j.mainAxis;b<A?b=A:b>L&&(b=L)}if(m){var S,R;const E=v==="y"?"width":"height",A=m1.has(Gr(i)),L=l.reference[x]-l.floating[E]+(A&&((S=c.offset)==null?void 0:S[x])||0)+(A?0:j.crossAxis),P=l.reference[x]+l.reference[E]+(A?0:((R=c.offset)==null?void 0:R[x])||0)-(A?j.crossAxis:0);N<L?N=L:N>P&&(N=P)}return{[v]:b,[x]:N}}}},$O=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:l,platform:c,elements:d}=t,{apply:p=()=>{},...m}=Kr(e,t),h=await c.detectOverflow(t,m),x=Gr(i),v=ei(i),b=Nr(i)==="y",{width:N,height:k}=l.floating;let j,S;x==="top"||x==="bottom"?(j=x,S=v===(await(c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(S=x,j=v==="end"?"top":"bottom");const R=k-h.top-h.bottom,E=N-h.left-h.right,A=Co(k-h[j],R),L=Co(N-h[S],E),P=!t.middlewareData.shift;let F=A,_=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=E),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(F=R),P&&!v){const re=$n(h.left,0),U=$n(h.right,0),G=$n(h.top,0),K=$n(h.bottom,0);b?_=N-2*(re!==0||U!==0?re+U:$n(h.left,h.right)):F=k-2*(G!==0||K!==0?G+K:$n(h.top,h.bottom))}await p({...t,availableWidth:_,availableHeight:F});const Q=await c.getDimensions(d.floating);return N!==Q.width||k!==Q.height?{reset:{rects:!0}}:{}}}};function Gc(){return typeof window<"u"}function ti(e){return g1(e)?(e.nodeName||"").toLowerCase():"#document"}function Bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dr(e){var t;return(t=(g1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function g1(e){return Gc()?e instanceof Node||e instanceof Bn(e).Node:!1}function fr(e){return Gc()?e instanceof Element||e instanceof Bn(e).Element:!1}function Xr(e){return Gc()?e instanceof HTMLElement||e instanceof Bn(e).HTMLElement:!1}function lv(e){return!Gc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Bn(e).ShadowRoot}function Ca(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&i!=="inline"&&i!=="contents"}function FO(e){return/^(table|td|th)$/.test(ti(e))}function Yc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const zO=/transform|translate|scale|rotate|perspective|filter/,BO=/paint|layout|strict|content/,Ko=e=>!!e&&e!=="none";let Cf;function Nh(e){const t=fr(e)?pr(e):e;return Ko(t.transform)||Ko(t.translate)||Ko(t.scale)||Ko(t.rotate)||Ko(t.perspective)||!Ch()&&(Ko(t.backdropFilter)||Ko(t.filter))||zO.test(t.willChange||"")||BO.test(t.contain||"")}function UO(e){let t=Eo(e);for(;Xr(t)&&!Us(t);){if(Nh(t))return t;if(Yc(t))return null;t=Eo(t)}return null}function Ch(){return Cf==null&&(Cf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cf}function Us(e){return/^(html|body|#document)$/.test(ti(e))}function pr(e){return Bn(e).getComputedStyle(e)}function Xc(e){return fr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Eo(e){if(ti(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lv(e)&&e.host||Dr(e);return lv(t)?t.host:t}function x1(e){const t=Eo(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xr(t)&&Ca(t)?t:x1(t)}function da(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=x1(e),l=i===((o=e.ownerDocument)==null?void 0:o.body),c=Bn(i);if(l){const d=pp(c);return t.concat(c,c.visualViewport||[],Ca(i)?i:[],d&&n?da(d):[])}else return t.concat(i,da(i,[],n))}function pp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function y1(e){const t=pr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=Xr(e),l=i?e.offsetWidth:n,c=i?e.offsetHeight:o,d=vc(n)!==l||vc(o)!==c;return d&&(n=l,o=c),{width:n,height:o,$:d}}function Eh(e){return fr(e)?e:e.contextElement}function zs(e){const t=Eh(e);if(!Xr(t))return Tr(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:l}=y1(t);let c=(l?vc(n.width):n.width)/o,d=(l?vc(n.height):n.height)/i;return(!c||!Number.isFinite(c))&&(c=1),(!d||!Number.isFinite(d))&&(d=1),{x:c,y:d}}const HO=Tr(0);function v1(e){const t=Bn(e);return!Ch()||!t.visualViewport?HO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bn(e)?!1:t}function Jo(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=Eh(e);let c=Tr(1);t&&(o?fr(o)&&(c=zs(o)):c=zs(e));const d=WO(l,n,o)?v1(l):Tr(0);let p=(i.left+d.x)/c.x,m=(i.top+d.y)/c.y,h=i.width/c.x,x=i.height/c.y;if(l){const v=Bn(l),b=o&&fr(o)?Bn(o):o;let N=v,k=pp(N);for(;k&&o&&b!==N;){const j=zs(k),S=k.getBoundingClientRect(),R=pr(k),E=S.left+(k.clientLeft+parseFloat(R.paddingLeft))*j.x,A=S.top+(k.clientTop+parseFloat(R.paddingTop))*j.y;p*=j.x,m*=j.y,h*=j.x,x*=j.y,p+=E,m+=A,N=Bn(k),k=pp(N)}}return wc({width:h,height:x,x:p,y:m})}function Qc(e,t){const n=Xc(e).scrollLeft;return t?t.left+n:Jo(Dr(e)).left+n}function b1(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Qc(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function VO(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const l=i==="fixed",c=Dr(o),d=t?Yc(t.floating):!1;if(o===c||d&&l)return n;let p={scrollLeft:0,scrollTop:0},m=Tr(1);const h=Tr(0),x=Xr(o);if((x||!x&&!l)&&((ti(o)!=="body"||Ca(c))&&(p=Xc(o)),x)){const b=Jo(o);m=zs(o),h.x=b.x+o.clientLeft,h.y=b.y+o.clientTop}const v=c&&!x&&!l?b1(c,p):Tr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-p.scrollLeft*m.x+h.x+v.x,y:n.y*m.y-p.scrollTop*m.y+h.y+v.y}}function qO(e){return Array.from(e.getClientRects())}function KO(e){const t=Dr(e),n=Xc(e),o=e.ownerDocument.body,i=$n(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),l=$n(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let c=-n.scrollLeft+Qc(e);const d=-n.scrollTop;return pr(o).direction==="rtl"&&(c+=$n(t.clientWidth,o.clientWidth)-i),{width:i,height:l,x:c,y:d}}const cv=25;function GO(e,t){const n=Bn(e),o=Dr(e),i=n.visualViewport;let l=o.clientWidth,c=o.clientHeight,d=0,p=0;if(i){l=i.width,c=i.height;const h=Ch();(!h||h&&t==="fixed")&&(d=i.offsetLeft,p=i.offsetTop)}const m=Qc(o);if(m<=0){const h=o.ownerDocument,x=h.body,v=getComputedStyle(x),b=h.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,N=Math.abs(o.clientWidth-x.clientWidth-b);N<=cv&&(l-=N)}else m<=cv&&(l+=m);return{width:l,height:c,x:d,y:p}}function YO(e,t){const n=Jo(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,l=Xr(e)?zs(e):Tr(1),c=e.clientWidth*l.x,d=e.clientHeight*l.y,p=i*l.x,m=o*l.y;return{width:c,height:d,x:p,y:m}}function uv(e,t,n){let o;if(t==="viewport")o=GO(e,n);else if(t==="document")o=KO(Dr(e));else if(fr(t))o=YO(t,n);else{const i=v1(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return wc(o)}function w1(e,t){const n=Eo(e);return n===t||!fr(n)||Us(n)?!1:pr(n).position==="fixed"||w1(n,t)}function XO(e,t){const n=t.get(e);if(n)return n;let o=da(e,[],!1).filter(d=>fr(d)&&ti(d)!=="body"),i=null;const l=pr(e).position==="fixed";let c=l?Eo(e):e;for(;fr(c)&&!Us(c);){const d=pr(c),p=Nh(c);!p&&d.position==="fixed"&&(i=null),(l?!p&&!i:!p&&d.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ca(c)&&!p&&w1(e,c))?o=o.filter(h=>h!==c):i=d,c=Eo(c)}return t.set(e,o),o}function QO(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const c=[...n==="clippingAncestors"?Yc(t)?[]:XO(t,this._c):[].concat(n),o],d=uv(t,c[0],i);let p=d.top,m=d.right,h=d.bottom,x=d.left;for(let v=1;v<c.length;v++){const b=uv(t,c[v],i);p=$n(b.top,p),m=Co(b.right,m),h=Co(b.bottom,h),x=$n(b.left,x)}return{width:m-x,height:h-p,x,y:p}}function JO(e){const{width:t,height:n}=y1(e);return{width:t,height:n}}function ZO(e,t,n){const o=Xr(t),i=Dr(t),l=n==="fixed",c=Jo(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const p=Tr(0);function m(){p.x=Qc(i)}if(o||!o&&!l)if((ti(t)!=="body"||Ca(i))&&(d=Xc(t)),o){const b=Jo(t,!0,l,t);p.x=b.x+t.clientLeft,p.y=b.y+t.clientTop}else i&&m();l&&!o&&i&&m();const h=i&&!o&&!l?b1(i,d):Tr(0),x=c.left+d.scrollLeft-p.x-h.x,v=c.top+d.scrollTop-p.y-h.y;return{x,y:v,width:c.width,height:c.height}}function Ef(e){return pr(e).position==="static"}function dv(e,t){if(!Xr(e)||pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Dr(e)===n&&(n=n.ownerDocument.body),n}function k1(e,t){const n=Bn(e);if(Yc(e))return n;if(!Xr(e)){let i=Eo(e);for(;i&&!Us(i);){if(fr(i)&&!Ef(i))return i;i=Eo(i)}return n}let o=dv(e,t);for(;o&&FO(o)&&Ef(o);)o=dv(o,t);return o&&Us(o)&&Ef(o)&&!Nh(o)?n:o||UO(e)||n}const eL=async function(e){const t=this.getOffsetParent||k1,n=this.getDimensions,o=await n(e.floating);return{reference:ZO(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function tL(e){return pr(e).direction==="rtl"}const nL={convertOffsetParentRelativeRectToViewportRelativeRect:VO,getDocumentElement:Dr,getClippingRect:QO,getOffsetParent:k1,getElementRects:eL,getClientRects:qO,getDimensions:JO,getScale:zs,isElement:fr,isRTL:tL};function j1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rL(e,t){let n=null,o;const i=Dr(e);function l(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function c(d,p){d===void 0&&(d=!1),p===void 0&&(p=1),l();const m=e.getBoundingClientRect(),{left:h,top:x,width:v,height:b}=m;if(d||t(),!v||!b)return;const N=Kl(x),k=Kl(i.clientWidth-(h+v)),j=Kl(i.clientHeight-(x+b)),S=Kl(h),E={rootMargin:-N+"px "+-k+"px "+-j+"px "+-S+"px",threshold:$n(0,Co(1,p))||1};let A=!0;function L(P){const F=P[0].intersectionRatio;if(F!==p){if(!A)return c();F?c(!1,F):o=setTimeout(()=>{c(!1,1e-7)},1e3)}F===1&&!j1(m,e.getBoundingClientRect())&&c(),A=!1}try{n=new IntersectionObserver(L,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(L,E)}n.observe(e)}return c(!0),l}function oL(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:p=!1}=o,m=Eh(e),h=i||l?[...m?da(m):[],...t?da(t):[]]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),l&&S.addEventListener("resize",n)});const x=m&&d?rL(m,n):null;let v=-1,b=null;c&&(b=new ResizeObserver(S=>{let[R]=S;R&&R.target===m&&b&&t&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=b)==null||E.observe(t)})),n()}),m&&!p&&b.observe(m),t&&b.observe(t));let N,k=p?Jo(e):null;p&&j();function j(){const S=Jo(e);k&&!j1(k,S)&&n(),k=S,N=requestAnimationFrame(j)}return n(),()=>{var S;h.forEach(R=>{i&&R.removeEventListener("scroll",n),l&&R.removeEventListener("resize",n)}),x==null||x(),(S=b)==null||S.disconnect(),b=null,p&&cancelAnimationFrame(N)}}const sL=LO,iL=_O,aL=DO,lL=$O,cL=IO,fv=AO,uL=MO,dL=(e,t,n)=>{const o=new Map,i={platform:nL,...n},l={...i.platform,_c:o};return RO(e,t,{...i,platform:l})};var fL=typeof document<"u",pL=function(){},sc=fL?g.useLayoutEffect:pL;function kc(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,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!kc(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const l=i[o];if(!(l==="_owner"&&e.$$typeof)&&!kc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function S1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pv(e,t){const n=S1(e);return Math.round(t*n)/n}function Pf(e){const t=g.useRef(e);return sc(()=>{t.current=e}),t}function hL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:d=!0,whileElementsMounted:p,open:m}=e,[h,x]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,b]=g.useState(o);kc(v,o)||b(o);const[N,k]=g.useState(null),[j,S]=g.useState(null),R=g.useCallback($=>{$!==P.current&&(P.current=$,k($))},[]),E=g.useCallback($=>{$!==F.current&&(F.current=$,S($))},[]),A=l||N,L=c||j,P=g.useRef(null),F=g.useRef(null),_=g.useRef(h),Q=p!=null,re=Pf(p),U=Pf(i),G=Pf(m),K=g.useCallback(()=>{if(!P.current||!F.current)return;const $={placement:t,strategy:n,middleware:v};U.current&&($.platform=U.current),dL(P.current,F.current,$).then(q=>{const T={...q,isPositioned:G.current!==!1};Z.current&&!kc(_.current,T)&&(_.current=T,jo.flushSync(()=>{x(T)}))})},[v,t,n,U,G]);sc(()=>{m===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,x($=>({...$,isPositioned:!1})))},[m]);const Z=g.useRef(!1);sc(()=>(Z.current=!0,()=>{Z.current=!1}),[]),sc(()=>{if(A&&(P.current=A),L&&(F.current=L),A&&L){if(re.current)return re.current(A,L,K);K()}},[A,L,K,re,Q]);const M=g.useMemo(()=>({reference:P,floating:F,setReference:R,setFloating:E}),[R,E]),I=g.useMemo(()=>({reference:A,floating:L}),[A,L]),D=g.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const q=pv(I.floating,h.x),T=pv(I.floating,h.y);return d?{...$,transform:"translate("+q+"px, "+T+"px)",...S1(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:q,top:T}},[n,d,I.floating,h.x,h.y]);return g.useMemo(()=>({...h,update:K,refs:M,elements:I,floatingStyles:D}),[h,K,M,I,D])}const mL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:i}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?fv({element:o.current,padding:i}).fn(n):{}:o?fv({element:o,padding:i}).fn(n):{}}}},gL=(e,t)=>{const n=sL(e);return{name:n.name,fn:n.fn,options:[e,t]}},xL=(e,t)=>{const n=iL(e);return{name:n.name,fn:n.fn,options:[e,t]}},yL=(e,t)=>({fn:uL(e).fn,options:[e,t]}),vL=(e,t)=>{const n=aL(e);return{name:n.name,fn:n.fn,options:[e,t]}},bL=(e,t)=>{const n=lL(e);return{name:n.name,fn:n.fn,options:[e,t]}},wL=(e,t)=>{const n=cL(e);return{name:n.name,fn:n.fn,options:[e,t]}},kL=(e,t)=>{const n=mL(e);return{name:n.name,fn:n.fn,options:[e,t]}};var jL="Arrow",N1=g.forwardRef((e,t)=>{const{children:n,width:o=10,height:i=5,...l}=e;return a.jsx(_t.svg,{...l,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});N1.displayName=jL;var SL=N1;function NL(e){const[t,n]=g.useState(void 0);return No(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let c,d;if("borderBoxSize"in l){const p=l.borderBoxSize,m=Array.isArray(p)?p[0]:p;c=m.inlineSize,d=m.blockSize}else c=e.offsetWidth,d=e.offsetHeight;n({width:c,height:d})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ph="Popper",[C1,E1]=Zo(Ph),[CL,P1]=C1(Ph),T1=e=>{const{__scopePopper:t,children:n}=e,[o,i]=g.useState(null);return a.jsx(CL,{scope:t,anchor:o,onAnchorChange:i,children:n})};T1.displayName=Ph;var R1="PopperAnchor",A1=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...i}=e,l=P1(R1,n),c=g.useRef(null),d=fn(t,c),p=g.useRef(null);return g.useEffect(()=>{const m=p.current;p.current=(o==null?void 0:o.current)||c.current,m!==p.current&&l.onAnchorChange(p.current)}),o?null:a.jsx(_t.div,{...i,ref:d})});A1.displayName=R1;var Th="PopperContent",[EL,PL]=C1(Th),D1=g.forwardRef((e,t)=>{var de,xe,be,we,Je,nt;const{__scopePopper:n,side:o="bottom",sideOffset:i=0,align:l="center",alignOffset:c=0,arrowPadding:d=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:N,...k}=e,j=P1(Th,n),[S,R]=g.useState(null),E=fn(t,he=>R(he)),[A,L]=g.useState(null),P=NL(A),F=(P==null?void 0:P.width)??0,_=(P==null?void 0:P.height)??0,Q=o+(l!=="center"?"-"+l:""),re=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},U=Array.isArray(m)?m:[m],G=U.length>0,K={padding:re,boundary:U.filter(RL),altBoundary:G},{refs:Z,floatingStyles:M,placement:I,isPositioned:D,middlewareData:$}=hL({strategy:"fixed",placement:Q,whileElementsMounted:(...he)=>oL(...he,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[gL({mainAxis:i+_,alignmentAxis:c}),p&&xL({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?yL():void 0,...K}),p&&vL({...K}),bL({...K,apply:({elements:he,rects:ke,availableWidth:$e,availableHeight:He})=>{const{width:lt,height:Oe}=ke.reference,qe=he.floating.style;qe.setProperty("--radix-popper-available-width",`${$e}px`),qe.setProperty("--radix-popper-available-height",`${He}px`),qe.setProperty("--radix-popper-anchor-width",`${lt}px`),qe.setProperty("--radix-popper-anchor-height",`${Oe}px`)}}),A&&kL({element:A,padding:d}),AL({arrowWidth:F,arrowHeight:_}),v&&wL({strategy:"referenceHidden",...K})]}),[q,T]=L1(I),z=Xo(N);No(()=>{D&&(z==null||z())},[D,z]);const X=(de=$.arrow)==null?void 0:de.x,O=(xe=$.arrow)==null?void 0:xe.y,pe=((be=$.arrow)==null?void 0:be.centerOffset)!==0,[Ce,ee]=g.useState();return No(()=>{S&&ee(window.getComputedStyle(S).zIndex)},[S]),a.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[(we=$.transformOrigin)==null?void 0:we.x,(Je=$.transformOrigin)==null?void 0:Je.y].join(" "),...((nt=$.hide)==null?void 0:nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(EL,{scope:n,placedSide:q,onArrowChange:L,arrowX:X,arrowY:O,shouldHideArrow:pe,children:a.jsx(_t.div,{"data-side":q,"data-align":T,...k,ref:E,style:{...k.style,animation:D?void 0:"none"}})})})});D1.displayName=Th;var I1="PopperArrow",TL={top:"bottom",right:"left",bottom:"top",left:"right"},O1=g.forwardRef(function(t,n){const{__scopePopper:o,...i}=t,l=PL(I1,o),c=TL[l.placedSide];return a.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:a.jsx(SL,{...i,ref:n,style:{...i.style,display:"block"}})})});O1.displayName=I1;function RL(e){return e!==null}var AL=e=>({name:"transformOrigin",options:e,fn(t){var j,S,R;const{placement:n,rects:o,middlewareData:i}=t,c=((j=i.arrow)==null?void 0:j.centerOffset)!==0,d=c?0:e.arrowWidth,p=c?0:e.arrowHeight,[m,h]=L1(n),x={start:"0%",center:"50%",end:"100%"}[h],v=(((S=i.arrow)==null?void 0:S.x)??0)+d/2,b=(((R=i.arrow)==null?void 0:R.y)??0)+p/2;let N="",k="";return m==="bottom"?(N=c?x:`${v}px`,k=`${-p}px`):m==="top"?(N=c?x:`${v}px`,k=`${o.floating.height+p}px`):m==="right"?(N=`${-p}px`,k=c?x:`${b}px`):m==="left"&&(N=`${o.floating.width+p}px`,k=c?x:`${b}px`),{data:{x:N,y:k}}}});function L1(e){const[t,n="center"]=e.split("-");return[t,n]}var DL=T1,IL=A1,OL=D1,LL=O1,_L=Symbol("radix.slottable");function ML(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_L,t}var $L=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"}),FL="VisuallyHidden",_1=g.forwardRef((e,t)=>a.jsx(_t.span,{...e,ref:t,style:{...$L,...e.style}}));_1.displayName=FL;var zL=_1,[Jc]=Zo("Tooltip",[E1]),Zc=E1(),M1="TooltipProvider",BL=700,hp="tooltip.open",[UL,Rh]=Jc(M1),$1=e=>{const{__scopeTooltip:t,delayDuration:n=BL,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:l}=e,c=g.useRef(!0),d=g.useRef(!1),p=g.useRef(0);return g.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),a.jsx(UL,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(p.current),c.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>c.current=!0,o)},[o]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(m=>{d.current=m},[]),disableHoverableContent:i,children:l})};$1.displayName=M1;var fa="Tooltip",[HL,Ea]=Jc(fa),F1=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:l,disableHoverableContent:c,delayDuration:d}=e,p=Rh(fa,e.__scopeTooltip),m=Zc(t),[h,x]=g.useState(null),v=Os(),b=g.useRef(0),N=c??p.disableHoverableContent,k=d??p.delayDuration,j=g.useRef(!1),[S,R]=Dc({prop:o,defaultProp:i??!1,onChange:F=>{F?(p.onOpen(),document.dispatchEvent(new CustomEvent(hp))):p.onClose(),l==null||l(F)},caller:fa}),E=g.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),A=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,j.current=!1,R(!0)},[R]),L=g.useCallback(()=>{window.clearTimeout(b.current),b.current=0,R(!1)},[R]),P=g.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{j.current=!0,R(!0),b.current=0},k)},[k,R]);return g.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),a.jsx(DL,{...m,children:a.jsx(HL,{scope:t,contentId:v,open:S,stateAttribute:E,trigger:h,onTriggerChange:x,onTriggerEnter:g.useCallback(()=>{p.isOpenDelayedRef.current?P():A()},[p.isOpenDelayedRef,P,A]),onTriggerLeave:g.useCallback(()=>{N?L():(window.clearTimeout(b.current),b.current=0)},[L,N]),onOpen:A,onClose:L,disableHoverableContent:N,children:n})})};F1.displayName=fa;var mp="TooltipTrigger",z1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Ea(mp,n),l=Rh(mp,n),c=Zc(n),d=g.useRef(null),p=fn(t,d,i.onTriggerChange),m=g.useRef(!1),h=g.useRef(!1),x=g.useCallback(()=>m.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),a.jsx(IL,{asChild:!0,...c,children:a.jsx(_t.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:p,onPointerMove:mt(e.onPointerMove,v=>{v.pointerType!=="touch"&&!h.current&&!l.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:mt(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:mt(e.onPointerDown,()=>{i.open&&i.onClose(),m.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:mt(e.onFocus,()=>{m.current||i.onOpen()}),onBlur:mt(e.onBlur,i.onClose),onClick:mt(e.onClick,i.onClose)})})});z1.displayName=mp;var Ah="TooltipPortal",[WL,VL]=Jc(Ah,{forceMount:void 0}),B1=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:i}=e,l=Ea(Ah,t);return a.jsx(WL,{scope:t,forceMount:n,children:a.jsx(es,{present:n||l.open,children:a.jsx(Mp,{asChild:!0,container:i,children:o})})})};B1.displayName=Ah;var Hs="TooltipContent",U1=g.forwardRef((e,t)=>{const n=VL(Hs,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...l}=e,c=Ea(Hs,e.__scopeTooltip);return a.jsx(es,{present:o||c.open,children:c.disableHoverableContent?a.jsx(H1,{side:i,...l,ref:t}):a.jsx(qL,{side:i,...l,ref:t})})}),qL=g.forwardRef((e,t)=>{const n=Ea(Hs,e.__scopeTooltip),o=Rh(Hs,e.__scopeTooltip),i=g.useRef(null),l=fn(t,i),[c,d]=g.useState(null),{trigger:p,onClose:m}=n,h=i.current,{onPointerInTransitChange:x}=o,v=g.useCallback(()=>{d(null),x(!1)},[x]),b=g.useCallback((N,k)=>{const j=N.currentTarget,S={x:N.clientX,y:N.clientY},R=QL(S,j.getBoundingClientRect()),E=JL(S,R),A=ZL(k.getBoundingClientRect()),L=t_([...E,...A]);d(L),x(!0)},[x]);return g.useEffect(()=>()=>v(),[v]),g.useEffect(()=>{if(p&&h){const N=j=>b(j,h),k=j=>b(j,p);return p.addEventListener("pointerleave",N),h.addEventListener("pointerleave",k),()=>{p.removeEventListener("pointerleave",N),h.removeEventListener("pointerleave",k)}}},[p,h,b,v]),g.useEffect(()=>{if(c){const N=k=>{const j=k.target,S={x:k.clientX,y:k.clientY},R=(p==null?void 0:p.contains(j))||(h==null?void 0:h.contains(j)),E=!e_(S,c);R?v():E&&(v(),m())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[p,h,c,m,v]),a.jsx(H1,{...e,ref:l})}),[KL,GL]=Jc(fa,{isInside:!1}),YL=ML("TooltipContent"),H1=g.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:c,...d}=e,p=Ea(Hs,n),m=Zc(n),{onClose:h}=p;return g.useEffect(()=>(document.addEventListener(hp,h),()=>document.removeEventListener(hp,h)),[h]),g.useEffect(()=>{if(p.trigger){const x=v=>{const b=v.target;b!=null&&b.contains(p.trigger)&&h()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[p.trigger,h]),a.jsx(_p,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:x=>x.preventDefault(),onDismiss:h,children:a.jsxs(OL,{"data-state":p.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:[a.jsx(YL,{children:o}),a.jsx(KL,{scope:n,isInside:!0,children:a.jsx(zL,{id:p.contentId,role:"tooltip",children:i||o})})]})})});U1.displayName=Hs;var W1="TooltipArrow",XL=g.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,i=Zc(n);return GL(W1,n).isInside?null:a.jsx(LL,{...i,...o,ref:t})});XL.displayName=W1;function QL(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,o,i,l)){case l:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function JL(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function ZL(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function e_(e,t){const{x:n,y:o}=e;let i=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const d=t[l],p=t[c],m=d.x,h=d.y,x=p.x,v=p.y;h>o!=v>o&&n<(x-m)*(o-h)/(v-h)+m&&(i=!i)}return i}function t_(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),n_(t)}function n_(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const i=e[o];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const l=n[n.length-1],c=n[n.length-2];if((l.x-c.x)*(i.y-c.y)>=(l.y-c.y)*(i.x-c.x))n.pop();else break}n.push(i)}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 r_=$1,o_=F1,s_=z1,i_=B1,V1=U1;const q1=r_,K1=o_,G1=s_,Dh=g.forwardRef(({className:e,sideOffset:t=4,...n},o)=>a.jsx(i_,{children:a.jsx(V1,{ref:o,sideOffset:t,className:Ue("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})}));Dh.displayName=V1.displayName;function a_({items:e,align:t="end"}){const[n,o]=g.useState(!1),i=g.useRef(null);return g.useEffect(()=>{if(!n)return;function l(d){i.current&&!i.current.contains(d.target)&&o(!1)}function c(d){d.key==="Escape"&&o(!1)}return document.addEventListener("mousedown",l),document.addEventListener("keydown",c),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c)}},[n]),e.length===0?null:a.jsxs("div",{className:"relative",ref:i,children:[a.jsx("button",{type:"button",onClick:()=>o(l=>!l),className:"shell-action",title:"More actions","aria-haspopup":"true","aria-expanded":n,children:a.jsx(XN,{className:"h-4 w-4"})}),n&&a.jsx("div",{className:Ue("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:a.jsx(q1,{delayDuration:200,children:e.map(l=>{const c=l.icon,d=Ue("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"),p=a.jsxs(a.Fragment,{children:[c?a.jsx(c,{className:"h-4 w-4 shrink-0"}):null,a.jsx("span",{className:"truncate",children:l.label})]});if(l.disabled){const m=a.jsx("span",{tabIndex:0,className:"inline-block w-full outline-none focus-visible:ring-1 focus-visible:ring-ring",children:a.jsx("button",{type:"button",disabled:!0,className:d,children:p})});return l.disabledReason?a.jsxs(K1,{children:[a.jsx(G1,{asChild:!0,children:m}),a.jsx(Dh,{side:"left",children:l.disabledReason})]},l.key):a.jsx("div",{children:m},l.key)}return l.href?a.jsx(Re,{to:l.href,className:d,onClick:()=>o(!1),children:p},l.key):a.jsx("button",{type:"button",className:d,onClick:()=>{var m;(m=l.onSelect)==null||m.call(l),o(!1)},children:p},l.key)})})})]})}async function Y1(e,t,n,o){const i=await fetch(`/api/projects/${e}/assignments/${t}/transitions/${n.command}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{reason:o}:{})}),l=await i.json().catch(()=>null);if(!i.ok)throw new Error((l==null?void 0:l.error)||`HTTP ${i.status}`);return l.assignment}async function X1(e,t,n){const o=await fetch(`/api/projects/${e}/assignments/${t}/status-override`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})}),i=await o.json().catch(()=>null);if(!o.ok)throw new Error((i==null?void 0:i.error)||`HTTP ${o.status}`);return i.assignment}async function l_(e,t){const n=await fetch(`/api/projects/${e}/assignments/${t}`,{method:"DELETE"}),o=await n.json().catch(()=>null);if(!n.ok)throw new Error((o==null?void 0:o.error)||`HTTP ${n.status}`)}function Q1(e){return e.requiresReason||e.command==="block"}function c_(e){const t=e.split(`
|
|
478
|
+
`),n=t.findIndex(c=>/^##\s+Acceptance Criteria\s*$/i.test(c.trim()));if(n===-1)return{acceptanceCriteria:[],summaryBody:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).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(o)].join(`
|
|
479
|
+
`).replace(/\n{3,}/g,`
|
|
480
|
+
|
|
481
|
+
`).trim();return{acceptanceCriteria:i,summaryBody:l}}function u_(e){const t=e.split(`
|
|
482
|
+
`),n=t.findIndex(c=>/^##\s+Todos\s*$/i.test(c.trim()));if(n===-1)return{hasSection:!1,todosMarkdown:"",remaining:e};let o=t.length;for(let c=n+1;c<t.length;c+=1)if(/^#{1,2}\s+\S/.test(t[c].trim())){o=c;break}const i=t.slice(n+1,o).join(`
|
|
483
|
+
`).replace(/<!--[\s\S]*?-->/g,"").replace(/\n{3,}/g,`
|
|
484
|
+
|
|
485
|
+
`).trim(),l=[...t.slice(0,n),...t.slice(o)].join(`
|
|
486
|
+
`).replace(/\n{3,}/g,`
|
|
487
|
+
|
|
488
|
+
`).trim();return{hasSection:!0,todosMarkdown:i,remaining:l}}function d_({projectSlug:e,dependencies:t,blockedReason:n}){const[o,i]=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&&!o?a.jsxs("button",{type:"button",onClick:()=>i(!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:[a.jsx(Sp,{className:"h-4 w-4 shrink-0 text-success-foreground"}),a.jsxs("span",{className:"text-sm font-medium text-success-foreground",children:["All ",t.length," ",t.length===1?"dependency":"dependencies"," resolved"]}),a.jsx(aa,{className:"ml-auto h-4 w-4 text-success-foreground"})]}):a.jsxs("div",{className:"space-y-3",children:[l.length>0&&a.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-warning-foreground/30 bg-warning px-4 py-3",children:[a.jsx($f,{className:"mt-0.5 h-4 w-4 shrink-0 text-warning-foreground"}),a.jsxs("div",{className:"text-sm text-warning-foreground",children:[a.jsxs("strong",{children:[l.length," ",l.length===1?"dependency is":"dependencies are"," not yet completed."]}),n&&a.jsxs("p",{className:"mt-1 text-warning-foreground/80",children:["Blocked reason: ",n]})]})]}),a.jsx(Ae,{title:"Dependencies",description:`${t.length-l.length} of ${t.length} resolved`,actions:c?a.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-xs text-muted-foreground hover:text-foreground",children:"Collapse"}):void 0,children:a.jsx("div",{className:"divide-y divide-border/40",children:t.map(d=>a.jsxs(Re,{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:[a.jsx(Xt,{status:d.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:d.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:d.slug})]}),d.assignee&&a.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:d.assignee}),a.jsx(ac,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},d.slug))})})]})}function f_({links:e}){const t=Lt();if(e.length===0)return null;const n=e.filter(i=>!i.isReverse),o=e.filter(i=>i.isReverse);return a.jsx(Ae,{title:"Linked Assignments",description:`${e.length} ${e.length===1?"link":"links"}`,children:a.jsxs("div",{className:"divide-y divide-border/40",children:[n.map(i=>a.jsxs(Re,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[a.jsx(zN,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Xt,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(ac,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`fwd-${i.slug}`)),o.map(i=>a.jsxs(Re,{to:`${t}/projects/${i.projectSlug}/assignments/${i.assignmentSlug}`,className:"flex items-center gap-3 px-1 py-2.5 transition hover:bg-muted/40 first:pt-0 last:pb-0",children:[a.jsx(Gv,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),a.jsx(Xt,{status:i.status}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:i.title}),a.jsx("p",{className:"truncate text-xs text-muted-foreground",children:i.slug})]}),a.jsx(ac,{className:"h-4 w-4 shrink-0 text-muted-foreground"})]},`rev-${i.slug}`))]})})}function p_(e){const t=new Map;for(const o of e)t.set(o.id,{entry:o,replies:[]});const n=[];for(const o of e){const i=t.get(o.id);o.replyTo&&t.has(o.replyTo)?t.get(o.replyTo).replies.push(i):n.push(i)}return n}function h_(e,t){return e===null?`/api/assignments/${encodeURIComponent(t)}/comments`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments`}function J1({projectSlug:e,assignmentSlug:t,entries:n}){const[o,i]=g.useState(n);g.useEffect(()=>{i(n)},[n]);const l=g.useMemo(()=>p_(o),[o]),[c,d]=g.useState(""),[p,m]=g.useState("note"),[h,x]=g.useState(!1),[v,b]=g.useState(null);async function N(j){var E;if(j.preventDefault(),!c.trim())return;x(!0),b(null);const S=`tmp-${Date.now()}`,R={id:S,timestamp:new Date().toISOString(),author:"human",type:p,body:c,resolved:p==="question"?!1:void 0};i(A=>[...A,R]);try{const A=await fetch(h_(e,t),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:c,type:p})});if(!A.ok){const F=await A.text();throw new Error(F||`HTTP ${A.status}`)}const L=await A.json().catch(()=>null),P=(E=L==null?void 0:L.comment)==null?void 0:E.id;i(F=>F.map(_=>_.id===S?{..._,id:P??_.id}:_)),d(""),window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(A){b(A instanceof Error?A.message:String(A)),i(L=>L.filter(P=>P.id!==S))}finally{x(!1)}}async function k(j,S){i(R=>R.map(E=>E.id===j?{...E,resolved:S}:E));try{const R=e===null?`/api/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`:`/api/projects/${encodeURIComponent(e)}/assignments/${encodeURIComponent(t)}/comments/${encodeURIComponent(j)}/resolved`,E=await fetch(R,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({resolved:S})});if(!E.ok)throw new Error(`HTTP ${E.status}`);window.dispatchEvent(new CustomEvent("syntaur-refresh"))}catch(R){b(R instanceof Error?R.message:String(R)),i(E=>E.map(A=>A.id===j?{...A,resolved:!S}:A))}}return a.jsx(Ae,{title:"Comments",description:"Threaded questions, notes, and feedback. Questions can be resolved once answered.",children:a.jsxs("div",{className:"space-y-4",children:[l.map(j=>a.jsx(Z1,{node:j,onToggleResolved:k,depth:0},j.entry.id)),a.jsxs("form",{onSubmit:N,className:"mt-6 space-y-2 border-t border-border pt-4",children:[a.jsx("label",{className:"block text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Add comment"}),a.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…"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("select",{value:p,onChange:j=>m(j.target.value),className:"rounded border border-border bg-background px-2 py-1 text-xs",children:[a.jsx("option",{value:"note",children:"note"}),a.jsx("option",{value:"question",children:"question"}),a.jsx("option",{value:"feedback",children:"feedback"})]}),a.jsx("button",{type:"submit",disabled:h||!c.trim(),className:"shell-action",children:h?"Posting…":"Post comment"}),v?a.jsx("span",{className:"text-xs text-error-foreground",children:v}):null]})]})]})})}function Z1({node:e,depth:t,onToggleResolved:n}){const{entry:o,replies:i}=e,l=o.type==="question";return a.jsxs("div",{className:Ue("space-y-2",t>0&&"ml-4 border-l border-border pl-4"),children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-mono",children:o.id}),a.jsx("span",{children:"·"}),a.jsx("span",{children:o.timestamp}),a.jsx("span",{children:"·"}),a.jsx("span",{className:"font-medium text-foreground",children:o.author}),a.jsx("span",{children:"·"}),a.jsx("span",{className:Ue("rounded px-1.5 py-0.5 font-mono text-[10px] uppercase",l&&"bg-warning text-warning-foreground",o.type==="feedback"&&"bg-info text-info-foreground",o.type==="note"&&"bg-muted text-muted-foreground"),children:o.type}),l?a.jsxs("button",{type:"button",onClick:()=>n(o.id,!o.resolved),className:Ue("inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium",o.resolved?"bg-success text-success-foreground hover:bg-success/80":"bg-muted text-muted-foreground hover:bg-muted/80"),title:o.resolved?"Mark unresolved":"Mark resolved",children:[o.resolved?a.jsx(Sp,{className:"h-3 w-3"}):a.jsx(WN,{className:"h-3 w-3"}),o.resolved?"resolved":"open"]}):null,o.replyTo?a.jsxs("span",{className:"inline-flex items-center gap-1 text-muted-foreground",children:[a.jsx(dC,{className:"h-3 w-3"}),o.replyTo]}):null]}),a.jsx(Yt,{content:o.body}),i.length>0?a.jsx("div",{className:"space-y-2",children:i.map(c=>a.jsx(Z1,{node:c,depth:t+1,onToggleResolved:n},c.entry.id))}):null]})}const m_=["review","complete","unblock","start","block","fail","reopen"];function hv(){var Dt,Qt,Et,oe,ie,me;const{slug:e,aslug:t}=At(),n=Ut(),o=Lt(),[i,l]=Po(),[c,d]=g.useState(null),[p,m]=g.useState(null),[h,x]=g.useState(null),[v,b]=g.useState(null),[N,k]=g.useState(null),[j,S]=g.useState(!1),[R,E]=g.useState(!1),[A,L]=g.useState(0),P=i.get("tab")??"summary",F=Mc(),{data:_,loading:Q,error:re,refetch:U}=fE(e,t),{data:G}=Nb(e),{data:K}=Ip(),{data:Z}=mE(e,t),M=g.useMemo(()=>{if(!_||!G)return[];const ne=new Map(G.assignments.map(ye=>[ye.slug,ye]));return _.dependsOn.map(ye=>{const Pe=ne.get(ye);return{slug:ye,title:(Pe==null?void 0:Pe.title)??ye,status:(Pe==null?void 0:Pe.status)??"pending",priority:(Pe==null?void 0:Pe.priority)??"medium",assignee:(Pe==null?void 0:Pe.assignee)??null}})},[_,G]),I=M.filter(ne=>ne.status!=="completed"&&ne.status!=="review");ts("assignment");const D=g.useMemo(()=>((G==null?void 0:G.assignments)??[]).map(ne=>ne.slug),[G]),$=t?D.indexOf(t):-1,q=$>0?D[$-1]:null,T=$>=0&&$<D.length-1?D[$+1]:null,z=`${o}/projects/${e}/assignments/${t}`;ht({keys:"e",scope:"assignment",description:"Edit assignment",handler:()=>n(`${z}/edit`)}),ht({keys:"p",scope:"assignment",description:"Edit plan",handler:()=>n(`${z}/plan/edit`)}),ht({keys:"h",scope:"assignment",description:"Append handoff",handler:()=>n(`${z}/handoff/edit`)}),ht({keys:"d",scope:"assignment",description:"Append decision record",handler:()=>n(`${z}/decision-record/edit`)}),ht({keys:"s",scope:"assignment",description:"Edit scratchpad",handler:()=>n(`${z}/scratchpad/edit`)}),ht({keys:"[",scope:"assignment",description:"Previous assignment in project",enabled:!!q,handler:()=>q&&n(`${o}/projects/${e}/assignments/${q}`)}),ht({keys:"]",scope:"assignment",description:"Next assignment in project",enabled:!!T,handler:()=>T&&n(`${o}/projects/${e}/assignments/${T}`)});const X=g.useMemo(()=>_?c_(_.body):{acceptanceCriteria:[],summaryBody:""},[_]),O=g.useMemo(()=>u_(X.summaryBody),[X.summaryBody]),pe=X.acceptanceCriteria,Ce=pe.filter(ne=>ne.checked).length,ee=pe.length>0&&Ce===pe.length,de=g.useRef(ee),xe=g.useRef(!1);if(g.useEffect(()=>{if(_){if(!xe.current){de.current=ee,xe.current=!0;return}ee&&!de.current&&L(ne=>ne+1),de.current=ee}},[ee,_]),Q)return a.jsx(kt,{label:"Loading assignment workspace…"});if(re||!_||!e||!t)return a.jsx(gt,{error:re||"Assignment not found."});const be=e,we=t,Je=pe.length>0?{checked:Ce,total:pe.length}:void 0,nt=_.availableTransitions??[],he=nt.filter(ne=>!ne.disabled&&ne.targetStatus!==_.status),ke=m_.map(ne=>he.find(ye=>ye.command===ne)).find(Boolean)??he[0]??null,$e=[];if(K!=null&&K.sessions)for(const ne of K.sessions)for(const ye of ne.windows)for(const Pe of ye.panes)((Dt=Pe.assignment)==null?void 0:Dt.project)===e&&((Qt=Pe.assignment)==null?void 0:Qt.slug)===t&&$e.push({sessionName:ne.name,command:Pe.command,urls:Pe.urls});async function He(ne){d(null);try{await X1(be,we,ne),U()}catch(ye){d(ye.message)}}async function lt(){E(!0);try{await l_(be,we),n(`${o}/projects/${be}`)}catch(ne){d(ne.message),E(!1),S(!1)}}async function Oe(ne,ye){d(null),m(ne.command);try{return await Y1(be,we,ne,ye),U(),!0}catch(Pe){return d(Pe.message),!1}finally{m(null)}}function qe(ne){if(Q1(ne)){x(ne);return}Oe(ne)}async function Qe(ne,ye){b(null),k(ne);try{const Pe=await fetch(`/api/projects/${be}/assignments/${we}/acceptance-criteria/${ne}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({checked:ye})}),Ht=await Pe.json();if(!Pe.ok)throw new Error(Ht.error||`HTTP ${Pe.status}`);U()}catch(Pe){b(Pe.message)}finally{k(null)}}const jt=[...he.filter(ne=>ne!==ke).map(ne=>({key:`transition-${ne.command}`,label:ne.label,onSelect:()=>qe(ne),disabled:p===ne.command})),...nt.filter(ne=>ne.disabled||ne.targetStatus===_.status).map(ne=>({key:`transition-${ne.command}`,label:ne.label,disabled:!0,disabledReason:ne.targetStatus===_.status?`Already ${_.status.replace(/_/g," ")}`:ne.disabledReason??ne.warning??ne.description})),...F.statuses.map(ne=>({key:`override-${ne.id}`,label:`Override → ${ne.label}`,onSelect:()=>He(ne.id),disabled:ne.id===_.status,disabledReason:ne.id===_.status?"Already in this status":void 0})),{key:"edit-assignment",label:"Edit assignment source",icon:JN,href:`${o}/projects/${e}/assignments/${t}/edit`},{key:"edit-plan",label:"Edit plan",icon:pC,href:`${o}/projects/${e}/assignments/${t}/plan/edit`},{key:"edit-scratchpad",label:"Edit scratchpad",icon:Gd,href:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`},{key:"append-handoff",label:"Append handoff",icon:ac,href:`${o}/projects/${e}/assignments/${t}/handoff/edit`},{key:"append-decision",label:"Append decision",icon:nC,href:`${o}/projects/${e}/assignments/${t}/decision-record/edit`},{key:"delete",label:"Delete assignment",icon:To,destructive:!0,onSelect:()=>S(!0)}],St=(ke==null?void 0:ke.command)==="review";return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"sticky top-12 z-20 rounded-lg border border-border/60 bg-card/90 p-3 shadow-sm backdrop-blur",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Xt,{status:_.status,progress:Je}),a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:_.title}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Updated ",tE(_.updated)]}),I.length>0&&a.jsxs("span",{className:"text-xs text-warning-foreground",children:["⚠ ",I.length," unmet dep",I.length===1?"":"s"]}),a.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[ke&&a.jsx("button",{type:"button",title:ke.warning||ke.description,disabled:p===ke.command,onClick:()=>qe(ke),className:Ue("shell-action disabled:cursor-not-allowed disabled:opacity-50",ke.warning&&"border-warning-foreground/40",St&&A>0&&"send-to-review-glow"),children:a.jsx("span",{children:p===ke.command?"Working…":ke.label})},St?`review-${A}`:ke.command),a.jsx(a_,{items:jt,align:"end"})]})]}),c?a.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,_.blockedReason?a.jsxs("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:[a.jsx("strong",{children:"Blocked reason:"})," ",_.blockedReason]}):null]}),M.length>0&&a.jsx(d_,{projectSlug:e,dependencies:M,blockedReason:_.blockedReason}),_.enrichedLinks&&_.enrichedLinks.length>0&&a.jsx(f_,{links:_.enrichedLinks}),_.referencedBy&&_.referencedBy.length>0&&a.jsx(Ae,{title:"Referenced by",description:"Other assignments whose Todos, progress, comments, or handoffs link to this one.",children:a.jsx("ul",{className:"space-y-2",children:_.referencedBy.map(ne=>{const ye=ne.sourceProjectSlug===null?`/assignments/${ne.sourceId}`:`${o}/projects/${ne.sourceProjectSlug}/assignments/${ne.sourceSlug}`;return a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Re,{to:ye,className:"text-foreground hover:text-primary",children:ne.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",ne.mentions," mention",ne.mentions===1?"":"s",")"]}),ne.sourceProjectSlug===null?a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"}):null]},ne.sourceId)})})}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_280px]",children:[a.jsx("div",{className:"space-y-4",children:a.jsx(Zp,{value:P,onValueChange:ne=>l({tab:ne}),items:[{value:"summary",label:"Summary",content:a.jsxs("div",{className:"space-y-5",children:[X.acceptanceCriteria.length>0?a.jsx(Ae,{title:"Acceptance Criteria",description:"These checkboxes update the source assignment markdown.",children:a.jsxs("div",{className:"space-y-3",children:[v?a.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:v}):null,X.acceptanceCriteria.map((ne,ye)=>{const Pe=N!==null;return a.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border/60 bg-background/80 px-3 py-3",children:[a.jsx("input",{type:"checkbox",checked:ne.checked,disabled:Pe,onChange:Ht=>Qe(ye,Ht.target.checked),className:"mt-1 h-4 w-4 rounded border-border text-primary"}),a.jsx("span",{className:"criterion-label text-sm leading-6","data-checked":ne.checked,children:ne.text})]},`${ye}-${ne.text}`)})]})}):null,O.hasSection?a.jsx(Ae,{title:"Todos",description:"Checklist of work items from assignment.md. Links point to plan files.",children:a.jsx(Yt,{content:O.todosMarkdown,emptyState:"No todos yet."})}):null,a.jsx(Ae,{title:"Assignment Summary",children:a.jsx(Yt,{content:O.remaining,emptyState:X.acceptanceCriteria.length>0||O.hasSection?"No additional summary markdown beyond the acceptance criteria and todos.":"This assignment does not have summary markdown yet."})})]})},{value:"plan",label:"Plan",count:_.plan?1:0,content:_.plan?a.jsx("div",{className:"space-y-5",children:a.jsxs(Ae,{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:a.jsxs(Re,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/plan/edit`,children:[a.jsx(Gd,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Plan"})]}),children:[a.jsx("div",{className:"mb-4",children:a.jsx(Xt,{status:_.plan.status})}),a.jsx(Yt,{content:_.plan.body,emptyState:"No plan content yet."})]})}):a.jsx(tt,{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:_.scratchpad?1:0,content:_.scratchpad?a.jsx(Ae,{title:"Scratchpad",actions:a.jsxs(Re,{className:"shell-action",to:`${o}/projects/${e}/assignments/${t}/scratchpad/edit`,children:[a.jsx(Gd,{className:"h-4 w-4"}),a.jsx("span",{children:"Edit Scratchpad"})]}),children:a.jsx(Yt,{content:_.scratchpad.body,emptyState:"Scratchpad is empty."})}):a.jsx(tt,{title:"No scratchpad yet",description:"Scratchpad notes appear here when you use the Edit Scratchpad action."})},{value:"handoff",label:"Handoff",count:((Et=_.handoff)==null?void 0:Et.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.handoff?a.jsx(Ae,{children:a.jsx(Yt,{content:_.handoff.body,emptyState:"No handoff history yet."})}):a.jsx(tt,{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:((oe=_.progress)==null?void 0:oe.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.progress&&_.progress.entries.length>0?a.jsx(Ae,{title:"Progress",description:"Reverse-chronological log of work done on this assignment. Agents append entries via progress.md.",children:a.jsx("ol",{className:"space-y-4",children:_.progress.entries.map((ne,ye)=>a.jsxs("li",{className:"border-l-2 border-border pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:ne.timestamp}),a.jsx(Yt,{content:ne.body})]},`${ne.timestamp}-${ye}`))})}):a.jsx(tt,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((ie=_.comments)==null?void 0:ie.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.comments&&_.comments.entries.length>0?a.jsx(J1,{projectSlug:e,assignmentSlug:t,entries:_.comments.entries}):a.jsx(tt,{title:"No comments yet",description:"Comments appear here when agents or humans post via `syntaur comment` or the dashboard."})})},{value:"decisions",label:"Decisions",count:((me=_.decisionRecord)==null?void 0:me.decisionCount)??0,content:a.jsx("div",{className:"space-y-5",children:_.decisionRecord?a.jsx(Ae,{children:a.jsx(Yt,{content:_.decisionRecord.body,emptyState:"No decision history yet."})}):a.jsx(tt,{title:"No decision record yet",description:"Decision records appear here when you append one via the Append Decision action."})})}]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsx(Ae,{title:"Details",children:a.jsxs("dl",{className:"space-y-3 text-sm",children:[a.jsx(bo,{label:"ID",value:_.id,copyable:!0}),a.jsx(bo,{label:"Priority",value:_.priority}),_.assignee&&a.jsx(bo,{label:"Assignee",value:_.assignee}),a.jsx(bo,{label:"Updated",value:`${eE(_.updated)} · Created ${ZC(_.created)}`}),_.workspace.repository&&a.jsx(bo,{label:"Repository",value:_.workspace.repository,copyable:!0}),_.workspace.worktreePath&&a.jsx(bo,{label:"Worktree",value:_.workspace.worktreePath,copyable:!0}),_.workspace.branch&&a.jsx(bo,{label:"Branch",value:_.workspace.branch,copyable:!0}),_.workspace.parentBranch&&a.jsx(bo,{label:"Parent branch",value:_.workspace.parentBranch,copyable:!0})]})}),$e.length>0&&a.jsx(Ae,{title:"Servers",children:a.jsx("div",{className:"space-y-2",children:$e.map((ne,ye)=>a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:ne.command}),a.jsx("span",{className:"text-xs text-muted-foreground",children:ne.sessionName}),ne.urls.map(Pe=>a.jsxs("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[Pe.replace("http://localhost:",":"),a.jsx(Qv,{className:"h-2.5 w-2.5"})]},Pe))]},ye))})}),Z&&Z.sessions.length>0&&a.jsx(Ae,{title:"Agent Sessions",children:a.jsx("div",{className:"space-y-2",children:Z.sessions.map(ne=>a.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Cc,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),a.jsx("span",{className:"font-medium text-foreground",children:ne.agent}),a.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground",title:ne.sessionId,children:[ne.sessionId.slice(0,8),a.jsx(Vr,{value:ne.sessionId})]})]}),a.jsxs("span",{className:"flex items-center gap-2",children:[a.jsx(Xt,{status:ne.status}),a.jsx("span",{className:"text-xs text-muted-foreground",children:Er(ne.started)})]})]},ne.sessionId))})})]})]}),a.jsx(U0,{open:h!==null,action:h,assignmentTitle:_.title,loading:p===(h==null?void 0:h.command),onOpenChange:ne=>{ne||x(null)},onConfirm:async ne=>{if(!h)return;await Oe(h,ne)&&x(null)}}),a.jsx(p1,{open:j,title:"Delete assignment?",description:`This will permanently delete "${_.title}" and all its files (plan, scratchpad, handoff, decision record). This cannot be undone.`,confirmLabel:"Delete Assignment",destructive:!0,loading:R,onOpenChange:ne=>{ne||S(!1)},onConfirm:lt})]})}function bo({label:e,value:t,copyable:n}){return a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsx("dt",{className:"text-muted-foreground",children:e}),a.jsxs("dd",{className:"flex items-center gap-1.5 max-w-[60%] text-right text-foreground break-all",children:[a.jsx("span",{className:"truncate",title:t,children:t}),n&&t!=="—"&&a.jsx(Vr,{value:t})]})]})}function g_(){var d,p,m,h,x;const{id:e}=At(),[t,n]=Po(),o=t.get("tab")??"summary",{data:i,loading:l,error:c}=pE(e);return l?a.jsx(kt,{}):c?a.jsx(gt,{error:c}):i?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("header",{className:"space-y-2",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx(Xt,{status:i.status}),a.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:i.id}),a.jsx(Re,{to:`/assignments/${i.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"})]}),a.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:i.title}),i.blockedReason?a.jsxs("p",{className:"text-sm text-warning-foreground",children:["Blocked: ",i.blockedReason]}):null]}),i.referencedBy&&i.referencedBy.length>0?a.jsx(Ae,{title:"Referenced by",description:"Other assignments whose bodies link to this one.",children:a.jsx("ul",{className:"space-y-2",children:i.referencedBy.map(v=>a.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[a.jsx(Re,{to:v.sourceProjectSlug===null?`/assignments/${v.sourceId}`:`/projects/${v.sourceProjectSlug}/assignments/${v.sourceSlug}`,className:"text-foreground hover:text-primary",children:v.sourceTitle}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",v.mentions," mention",v.mentions===1?"":"s",")"]})]},v.sourceId))})}):null,a.jsx(Zp,{value:o,onValueChange:v=>n({tab:v}),items:[{value:"summary",label:"Summary",content:a.jsx("div",{className:"space-y-5",children:a.jsx(Ae,{title:"Assignment",children:a.jsx(Yt,{content:i.body,emptyState:"This assignment does not have summary markdown yet."})})})},{value:"progress",label:"Progress",count:((d=i.progress)==null?void 0:d.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.progress&&i.progress.entries.length>0?a.jsx(Ae,{title:"Progress",description:"Reverse-chronological log of work done on this assignment.",children:a.jsx("ol",{className:"space-y-4",children:i.progress.entries.map((v,b)=>a.jsxs("li",{className:"border-l-2 border-border pl-3",children:[a.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:v.timestamp}),a.jsx(Yt,{content:v.body})]},`${v.timestamp}-${b}`))})}):a.jsx(tt,{title:"No progress entries yet",description:"Progress entries appear here as the agent appends them to progress.md."})})},{value:"comments",label:"Comments",count:((p=i.comments)==null?void 0:p.entryCount)??0,content:a.jsx("div",{className:"space-y-5",children:a.jsx(J1,{projectSlug:null,assignmentSlug:i.id,entries:((m=i.comments)==null?void 0:m.entries)??[]})})},{value:"plan",label:"Plan",content:a.jsx("div",{className:"space-y-5",children:i.plan?a.jsxs(Ae,{children:[a.jsx(Yt,{content:i.plan.body,emptyState:"Plan file exists but is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Re,{to:`/assignments/${i.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"})})]}):a.jsx(tt,{title:"No plan file yet",description:"Create one via the CLI or `/plan-assignment`."})})},{value:"scratchpad",label:"Scratchpad",content:a.jsx("div",{className:"space-y-5",children:i.scratchpad?a.jsxs(Ae,{children:[a.jsx(Yt,{content:i.scratchpad.body,emptyState:"Scratchpad is empty."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Re,{to:`/assignments/${i.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"})})]}):a.jsx(tt,{title:"No scratchpad yet",description:"Scratchpad is scaffolded at assignment creation time."})})},{value:"handoff",label:"Handoff",count:((h=i.handoff)==null?void 0:h.handoffCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.handoff?a.jsxs(Ae,{children:[a.jsx(Yt,{content:i.handoff.body,emptyState:"No handoff history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Re,{to:`/assignments/${i.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"})})]}):a.jsx(tt,{title:"No handoff log yet",description:"Handoffs appear here when an agent appends one."})})},{value:"decisions",label:"Decisions",count:((x=i.decisionRecord)==null?void 0:x.decisionCount)??0,content:a.jsx("div",{className:"space-y-5",children:i.decisionRecord?a.jsxs(Ae,{children:[a.jsx(Yt,{content:i.decisionRecord.body,emptyState:"No decision history yet."}),a.jsx("div",{className:"mt-3 flex justify-end",children:a.jsx(Re,{to:`/assignments/${i.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"})})]}):a.jsx(tt,{title:"No decision record yet",description:"Decision records appear here once appended."})})}]})]}):a.jsx(gt,{error:"Assignment not found"})}const x_=["table","list","kanban"],mv={critical:0,high:1,medium:2,low:3};function gv(e){return e==="1"?"stale":e==="0"?"fresh":"all"}function y_(e,t){return e.toString()===t.toString()}function xv(e){const t=Date.parse(e);return Number.isNaN(t)?!1:Date.now()-t>10080*60*1e3}function v_(e,t,n){return[...e].sort((i,l)=>{let c=0;switch(t){case"title":c=i.title.localeCompare(l.title);break;case"status":c=i.status.localeCompare(l.status);break;case"priority":c=(mv[i.priority]??99)-(mv[l.priority]??99);break;case"assignee":c=(i.assignee??"").localeCompare(l.assignee??"");break;case"dependencies":c=i.dependsOn.length-l.dependsOn.length;break;case"updated":c=i.updated.localeCompare(l.updated);break}return n==="asc"?c:-c})}function yv(){const{workspace:e}=At(),t=Lt(),n=Ut(),o=g.useRef(null);ts("list:assignments");const{data:i,loading:l,error:c,refetch:d}=jb(),p=Mc(),[m,h]=Po(),x=g.useMemo(()=>iT(p.order),[p]),v=g.useMemo(()=>{const V={};for(const ce of x)V[ce]=nT(p,ce);return V},[x,p]),b=g.useMemo(()=>x.map(V=>({id:V,title:v[V]??V,description:gw(V)})),[x,v]),N=g.useMemo(()=>new Set(["all",...x]),[x]),k=m.get("view"),j=m.get("status"),S=m.get("stale"),R=k&&x_.includes(k)?k:"kanban";function E(V){return!V||!N.has(V)?"all":V}const A=g.useCallback(V=>{h(ce=>{const je=new URLSearchParams(ce);return V==="kanban"?je.delete("view"):je.set("view",V),je})},[h]),[L,P]=g.useState(""),[F,_]=g.useState(()=>E(j)),[Q,re]=g.useState("all"),[U,G]=g.useState("all"),[K,Z]=g.useState("all"),[M,I]=g.useState(()=>gv(S)),[D,$]=g.useState("updated"),[q,T]=g.useState("desc"),[z,X]=g.useState(()=>new Set(x)),[O,pe]=g.useState([]),[Ce,ee]=g.useState(null),[de,xe]=g.useState(null),[be,we]=g.useState(null),[Je,nt]=g.useState(null),[he,ke]=g.useState(null);g.useEffect(()=>{pe((i==null?void 0:i.assignments)??[])},[i]),g.useEffect(()=>{const V=E(j);V!==F&&_(V);const ce=gv(S);ce!==M&&I(ce)},[M,S,F,j]),g.useEffect(()=>{h(V=>{const ce=new URLSearchParams(V);return F==="all"?ce.delete("status"):ce.set("status",F),M==="all"?ce.delete("stale"):M==="stale"?ce.set("stale","1"):ce.set("stale","0"),y_(V,ce)?V:ce})},[M,h,F]);const $e=g.useMemo(()=>Array.from(new Set(O.map(V=>V.status))).sort(),[O]),He=g.useMemo(()=>Array.from(new Set(O.map(V=>V.priority))).sort(),[O]),lt=g.useMemo(()=>Array.from(new Set(O.map(V=>V.assignee??"__unassigned__"))).sort(),[O]),Oe=g.useMemo(()=>Array.from(new Map(O.filter(V=>V.projectSlug!==null).map(V=>[V.projectSlug,V.projectTitle]))).sort(([,V],[,ce])=>V.localeCompare(ce)),[O]),qe=g.useMemo(()=>O.filter(V=>{if(e){if(e==="_ungrouped"){if(V.projectWorkspace!==null)return!1}else if(V.projectWorkspace!==e)return!1}if(F!=="all"&&V.status!==F||Q!=="all"&&V.priority!==Q||M==="stale"&&!xv(V.updated)||M==="fresh"&&xv(V.updated)||U!=="all"&&(V.assignee??"__unassigned__")!==U)return!1;if(K!=="all"){if(K==="__standalone__"){if(V.projectSlug!==null)return!1}else if(V.projectSlug!==K)return!1}const ce=L.trim().toLowerCase();return!(ce&&!`${V.title} ${V.slug} ${V.projectTitle??"standalone"} ${V.projectSlug??""}`.toLowerCase().includes(ce))}),[M,O,L,F,Q,U,K,e]),Qe=g.useMemo(()=>v_(qe,D,q),[qe,D,q]),{visibleItems:jt,visibleIndexByKey:St}=g.useMemo(()=>{const V=R==="table"?Qe:x.flatMap(je=>qe.filter(Fe=>Fe.status===je)),ce=new Map;return V.forEach((je,Fe)=>ce.set(nn(je),Fe)),{visibleItems:V,visibleIndexByKey:ce}},[R,Qe,qe,x]),{hotkeyRowProps:Dt}=va(jt,{scope:"list:assignments",onOpen:V=>{if(V.projectSlug===null){n(`/assignments/${V.id}`);return}const ce=V.projectWorkspace?`/w/${V.projectWorkspace}`:t;n(`${ce}/projects/${V.projectSlug}/assignments/${V.slug}`)}});if(ht({keys:"/",scope:"list:assignments",description:"Focus filter",handler:()=>{var V;return(V=o.current)==null?void 0:V.focus()}}),ht({keys:"r",scope:"list:assignments",description:"Refresh",handler:()=>d()}),l)return a.jsx(kt,{label:"Loading assignments board…"});if(c||!i)return a.jsx(gt,{error:c||"Assignments board is unavailable."});async function Qt({item:V,toColumnId:ce,action:je,reason:Fe}){ee(null),xe(nn(V));const Hn=O;pe(on=>on.map(xt=>nn(xt)===nn(V)?{...xt,status:ce,blockedReason:ce==="blocked"?Fe??xt.blockedReason:null}:xt));try{if(V.projectSlug===null){if(!je)throw new Error("Standalone assignments require a transition action, not status override.");const xt=await fetch(`/api/assignments/${encodeURIComponent(V.id)}/transitions/${encodeURIComponent(je.command)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Fe?{reason:Fe}:{})});if(!xt.ok)throw new Error((await xt.json()).error??`HTTP ${xt.status}`);const rt=(await xt.json()).assignment;pe(Pt=>Pt.map(Wt=>nn(Wt)===nn(V)?{...Wt,status:rt.status,blockedReason:rt.blockedReason,availableTransitions:rt.availableTransitions,updated:rt.updated}:Wt));return}const on=je?await Y1(V.projectSlug,V.slug,je,Fe):await X1(V.projectSlug,V.slug,ce);return pe(xt=>xt.map(We=>nn(We)===nn(V)?{...We,status:on.status,blockedReason:on.blockedReason,availableTransitions:on.availableTransitions,updated:on.updated}:We)),d(),!0}catch(on){return pe(Hn),ee(on.message),!1}finally{xe(null)}}async function Et({item:V,toColumnId:ce}){if(V.status===ce)return;const je=qi(V,ce);if(je!=null&&je.disabled){ee(je.disabledReason||`Cannot move this assignment to ${ce}.`);return}if(je&&Q1(je)){ke({item:V,toColumnId:ce,action:je});return}await Qt({item:V,toColumnId:ce,action:je})}function oe(V){X(ce=>{const je=new Set(ce);return je.has(V)?je.delete(V):je.add(V),je})}function ie(V){D===V?T(ce=>ce==="asc"?"desc":"asc"):($(V),T("asc"))}const me=be?O.find(V=>nn(V)===be)??null:null;function ne(V,ce){V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/plain",ce),we(ce)}function ye(){we(null),nt(null)}function Pe(V,ce){if(!me)return;const je=qi(me,ce);me.status===ce||je!=null&&je.disabled||(V.preventDefault(),V.dataTransfer.dropEffect="move",nt(ce))}function Ht(V,ce){Je===ce&&!V.currentTarget.contains(V.relatedTarget)&&nt(null)}function rn(V,ce){if(V.preventDefault(),!me||me.status===ce){ye();return}ye(),Et({item:me,toColumnId:ce})}function Jt({field:V,children:ce}){const je=D===V;return a.jsx("th",{className:"pb-3 font-medium",children:a.jsxs("button",{type:"button",onClick:()=>ie(V),className:"inline-flex items-center gap-1 hover:text-foreground",children:[ce,je?q==="asc"?a.jsx(Xv,{className:"h-3 w-3"}):a.jsx(aa,{className:"h-3 w-3"}):null]})})}return a.jsxs("div",{className:"space-y-5",children:[a.jsx("div",{className:"flex items-center justify-end",children:a.jsxs(Re,{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:[a.jsx(Un,{className:"h-4 w-4"}),"New Assignment"]})}),a.jsxs(Yp,{children:[a.jsx(_c,{ref:o,value:L,onChange:P,placeholder:"Search assignments or projects"}),a.jsxs("select",{value:F,onChange:V=>_(E(V.target.value)),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All statuses"}),$e.map(V=>a.jsx("option",{value:V,children:v[V]??V},V))]}),a.jsxs("select",{value:Q,onChange:V=>re(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All priorities"}),He.map(V=>a.jsx("option",{value:V,className:"capitalize",children:V},V))]}),a.jsxs("select",{value:U,onChange:V=>G(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All assignees"}),lt.map(V=>a.jsx("option",{value:V,children:V==="__unassigned__"?"Unassigned":V},V))]}),a.jsxs("select",{value:K,onChange:V=>Z(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All projects"}),a.jsx("option",{value:"__standalone__",children:"Standalone"}),Oe.map(([V,ce])=>a.jsx("option",{value:V,children:ce},V))]}),a.jsxs("select",{value:M,onChange:V=>I(V.target.value),className:"editor-input max-w-[180px]",children:[a.jsx("option",{value:"all",children:"All activity"}),a.jsx("option",{value:"stale",children:"Stale only"}),a.jsx("option",{value:"fresh",children:"Fresh only"})]}),a.jsx(Xp,{value:R,onChange:V=>A(V),options:[{value:"table",label:"Table"},{value:"list",label:"List"},{value:"kanban",label:"Kanban"}]})]}),Ce?a.jsx("div",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:Ce}):null,i.assignments.length===0?a.jsx(tt,{title:"No assignments yet",description:"Assignments appear here once projects contain concrete work items.",actions:a.jsxs(Re,{className:"shell-action bg-foreground text-background hover:opacity-90",to:`${t}/projects`,children:[a.jsx(Np,{className:"h-4 w-4"}),a.jsx("span",{children:"Browse Projects"})]})}):qe.length===0?a.jsx(tt,{title:"No assignments match these filters",description:"Adjust the search term or filters to show assignments across all projects again."}):R==="table"?a.jsx(Ae,{title:`${Qe.length} assignment${Qe.length===1?"":"s"}`,children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[760px] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/60 text-muted-foreground",children:[a.jsx(Jt,{field:"title",children:"Assignment"}),a.jsx(Jt,{field:"status",children:"Status"}),a.jsx(Jt,{field:"priority",children:"Priority"}),a.jsx(Jt,{field:"assignee",children:"Assignee"}),a.jsx(Jt,{field:"dependencies",children:"Dependencies"}),a.jsx(Jt,{field:"updated",children:"Updated"})]})}),a.jsx("tbody",{children:Qe.map((V,ce)=>a.jsxs("tr",{className:"border-b border-border/50 last:border-0",...Dt(ce),children:[a.jsxs("td",{className:"py-4 pr-4",children:[a.jsx(Re,{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}),a.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:V.projectTitle??a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),a.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),a.jsx(Vr,{value:V.id})]})]}),a.jsx("td",{className:"py-4 pr-4",children:a.jsx("select",{value:V.status,disabled:de===nn(V),onChange:je=>Et({item:V,toColumnId:je.target.value}),className:Ue("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")]`,(uc[V.status]??uc.pending).className,de===nn(V)&&"animate-pulse opacity-60"),children:x.map(je=>{const Fe=V.status===je?void 0:qi(V,je),Hn=(Fe==null?void 0:Fe.disabled)??!1;return a.jsx("option",{value:je,disabled:Hn,title:Hn?(Fe==null?void 0:Fe.disabledReason)??void 0:void 0,children:v[je]},je)})})}),a.jsx("td",{className:"py-4 pr-4 capitalize text-muted-foreground",children:V.priority}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.assignee??"Unassigned"}),a.jsx("td",{className:"py-4 pr-4 text-muted-foreground",children:V.dependsOn.length}),a.jsx("td",{className:"py-4 text-muted-foreground",children:So(V.updated)})]},nn(V)))})]})})}):R==="list"?a.jsx("div",{className:"space-y-3",children:x.map(V=>{var xt;const ce=qe.filter(We=>We.status===V);if(ce.length===0&&!me)return null;const je=z.has(V),Fe=me?me.status!==V&&!((xt=qi(me,V))!=null&&xt.disabled):!1,Hn=me?me.status!==V&&!Fe:!1,on=Je===V;return a.jsxs("div",{className:Ue("rounded-lg border border-border/60 bg-card/90 transition",on&&Fe&&"ring-2 ring-ring/30",Hn&&"border-dashed opacity-65"),onDragOver:We=>Pe(We,V),onDragLeave:We=>Ht(We,V),onDrop:We=>rn(We,V),children:[a.jsxs("button",{type:"button",onClick:()=>oe(V),className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[a.jsx(aa,{className:`h-4 w-4 text-muted-foreground transition-transform ${je?"":"-rotate-90"}`}),a.jsx("span",{className:"font-semibold text-foreground",children:v[V]}),a.jsx("span",{className:"rounded-full border border-border/60 px-2 py-0.5 text-xs text-muted-foreground",children:ce.length})]}),je&&ce.length>0&&a.jsx("div",{className:"space-y-3 px-4 pb-4",children:ce.map(We=>{const rt=nn(We),Pt=be===rt,Wt=St.get(rt)??-1;return a.jsx("div",{draggable:!0,onDragStart:Zt=>ne(Zt,rt),onDragEnd:ye,...Wt>=0?Dt(Wt):{},className:Ue("cursor-grab transition active:cursor-grabbing",Pt&&"scale-[0.98] opacity-50"),children:a.jsx(vv,{assignment:We,dragging:Pt,transitioning:de===rt})},rt)})})]},V)})}):a.jsx(xw,{columns:b,items:qe,getItemId:nn,getColumnId:V=>V.status,canDrop:({item:V,fromColumnId:ce,toColumnId:je})=>{if(ce===je)return{allowed:!0};const Fe=qi(V,je);return Fe!=null&&Fe.disabled?{allowed:!1,reason:Fe.disabledReason||Fe.description}:{allowed:!0,reason:Fe?Fe.warning||Fe.description:`Move to ${je} (direct status change).`}},onMove:({item:V,toColumnId:ce})=>Et({item:V,toColumnId:ce}),emptyMessage:V=>`No ${V.title.toLowerCase()} assignments.`,renderCard:(V,{dragging:ce})=>{const je=St.get(nn(V))??-1;return a.jsx("div",{...je>=0?Dt(je):{},children:a.jsx(vv,{assignment:V,dragging:ce,transitioning:de===nn(V)})})}}),a.jsx(U0,{open:he!==null,action:(he==null?void 0:he.action)??null,assignmentTitle:(he==null?void 0:he.item.title)??"Assignment",loading:de===(he?nn(he.item):null),onOpenChange:V=>{V||ke(null)},onConfirm:async V=>{if(!he)return;const ce=he;await Qt({item:ce.item,toColumnId:ce.toColumnId,action:ce.action,reason:V})&&ke(null)}})]})}function vv({assignment:e,dragging:t,transitioning:n}){var i;const o=Lt();return a.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/85 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(Re,{to:e.projectSlug===null?`/assignments/${e.id}`:`${o}/projects/${e.projectSlug}/assignments/${e.slug}`,className:"text-base font-semibold text-foreground hover:text-primary",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.projectTitle??a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] uppercase text-muted-foreground",children:"Standalone"})}),a.jsxs("p",{className:"inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground/70",title:e.id??"",children:[(i=e.id)==null?void 0:i.slice(0,8),e.id&&a.jsx(Vr,{value:e.id})]})]}),a.jsx(Xt,{status:e.status})]}),e.blockedReason?a.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,a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs capitalize text-muted-foreground",children:e.priority}),a.jsx("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:e.assignee??"Unassigned"}),a.jsxs("span",{className:"rounded-full border border-border/60 px-2.5 py-1 text-xs text-muted-foreground",children:[e.dependsOn.length," dependencies"]})]}),a.jsxs("div",{className:"mt-4 flex items-center justify-between gap-3 text-xs uppercase tracking-[0.08em] text-muted-foreground",children:[a.jsx("span",{children:n?"Updating":t?"Dragging":"Source-first"}),a.jsx("span",{children:So(e.updated)})]})]})}function qi(e,t){return e.availableTransitions.find(n=>n.targetStatus===t)}function nn(e){return e.id||e.slug||"unknown"}function Ir(e){const t=e.match(/^---\n([\s\S]*?)\n---\n?/);if(!t)return{order:[],blocks:new Map,body:e};const n=t[1],o=e.slice(t[0].length),i=n.split(`
|
|
489
|
+
`),l=[],c=new Map;let d=null,p=[];const m=()=>{d&&(l.push(d),c.set(d,p))};for(const h of i){const x=h.match(/^([A-Za-z_][A-Za-z0-9_-]*):/);if(x&&!h.startsWith(" ")){m(),d=x[1],p=[h];continue}d&&p.push(h)}return m(),{order:l,blocks:c,body:o}}function Pa(e){return`---
|
|
490
|
+
${e.order.map(n=>e.blocks.get(n)).filter(n=>!!n).flat().join(`
|
|
491
|
+
`)}
|
|
492
|
+
---
|
|
493
|
+
|
|
494
|
+
${e.body.replace(/^\n+/,"")}`}function zt(e,t){const n=e.blocks.get(t);if(!(n!=null&&n[0]))return"";const o=n[0].match(/^[^:]+:\s*(.*)$/);if(!o)return"";const i=o[1].trim();return i==="null"?"":i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'")?i.slice(1,-1):i}function b_(e,t){return zt(e,t)==="true"}function ra(e,t){const n=e.blocks.get(t);return n!=null&&n.length?n[0].trim().endsWith("[]")?[]:n.slice(1).map(o=>o.trim()).filter(o=>o.startsWith("- ")).map(o=>o.slice(2).trim()):[]}function w_(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 Bt(e,t,n){e.blocks.has(t)||e.order.push(t),e.blocks.set(t,[`${t}: ${w_(n)}`])}function oa(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(o=>` - ${o}`)])}function sa(e){return e.split(",").map(t=>t.trim()).filter(Boolean)}function eu(e){const t=Ir(e);return{title:zt(t,"title"),slug:zt(t,"slug"),workspace:zt(t,"workspace"),archived:b_(t,"archived"),archivedAt:zt(t,"archivedAt"),archivedReason:zt(t,"archivedReason"),tags:ra(t,"tags").join(", "),body:t.body}}function k_(e,t){const n=Ir(e),o={...eu(e),...t};return Bt(n,"title",o.title),Bt(n,"slug",o.slug),Bt(n,"workspace",o.workspace||null),Bt(n,"archived",o.archived),Bt(n,"archivedAt",o.archivedAt||null),Bt(n,"archivedReason",o.archivedReason||null),oa(n,"tags",sa(o.tags)),n.body=o.body,Pa(n)}function tu(e){const t=Ir(e);return{title:zt(t,"title"),slug:zt(t,"slug"),status:zt(t,"status"),priority:zt(t,"priority")||"medium",assignee:zt(t,"assignee"),dependsOn:ra(t,"dependsOn").join(", "),links:ra(t,"links").join(", "),blockedReason:zt(t,"blockedReason"),tags:ra(t,"tags").join(", "),body:t.body}}function j_(e,t){const n=Ir(e),o={...tu(e),...t};return Bt(n,"title",o.title),Bt(n,"slug",o.slug),Bt(n,"status",o.status),Bt(n,"priority",o.priority),Bt(n,"assignee",o.assignee||null),oa(n,"dependsOn",sa(o.dependsOn)),oa(n,"links",sa(o.links)),Bt(n,"blockedReason",o.blockedReason||null),oa(n,"tags",sa(o.tags)),n.body=o.body,Pa(n)}function nu(e){const t=Ir(e);return{assignment:zt(t,"assignment"),status:zt(t,"status"),body:t.body}}function S_(e,t){const n=Ir(e),o={...nu(e),...t};return Bt(n,"assignment",o.assignment),Bt(n,"status",o.status),n.body=o.body,Pa(n)}function ru(e){const t=Ir(e);return{assignment:zt(t,"assignment"),body:t.body}}function N_(e,t){const n=Ir(e),o={...ru(e),...t};return Bt(n,"assignment",o.assignment),n.body=o.body,Pa(n)}function ou(e){const t=Ir(e);return{name:zt(t,"name"),slug:zt(t,"slug"),description:zt(t,"description"),whenToUse:zt(t,"when_to_use"),tags:ra(t,"tags").join(", "),body:t.body}}function C_(e,t){const n=Ir(e),o={...ou(e),...t};return Bt(n,"name",o.name),Bt(n,"slug",o.slug),Bt(n,"description",o.description||null),Bt(n,"when_to_use",o.whenToUse||null),oa(n,"tags",sa(o.tags)),n.body=o.body,Pa(n)}function pt(e,t,n){switch(e){case"project":return k_(t,n);case"assignment":return j_(t,n);case"plan":return S_(t,n);case"scratchpad":return N_(t,n);case"playbook":return C_(t,n);default:return t}}function ni({initialContent:e,documentType:t,mode:n="edit",onSave:o,saving:i,error:l,title:c,description:d,onCancel:p,helpTitle:m,helpBody:h,allowSlugEdit:x=!1}){const[v,b]=g.useState(e),[N,k]=g.useState(!1),[j,S]=g.useState("edit");g.useEffect(()=>{b(e)},[e]);const R=R_(t,v),E=v!==e,A=T_(t,v),L=E?"Unsaved changes":n==="create"?"Draft":"Saved";return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"rounded-lg border border-border/70 bg-card/90 p-3 shadow-sm",children:[a.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-lg font-semibold text-foreground",children:c}),a.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?a.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:d}):null]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("button",{type:"button",onClick:p,className:"shell-action",children:[a.jsx(Gv,{className:"h-4 w-4"}),a.jsx("span",{children:"Back"})]}),a.jsxs("button",{type:"button",onClick:()=>k(P=>!P),className:"shell-action",children:[a.jsx(QN,{className:"h-4 w-4"}),a.jsx("span",{children:N?"Structured":"Raw Markdown"})]}),a.jsxs("button",{type:"button",onClick:()=>o(v),disabled:i||R.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:[a.jsx(Ep,{className:"h-4 w-4"}),a.jsx("span",{children:i?"Saving…":"Save"})]})]})]}),l?a.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,R.length>0?a.jsx("div",{className:"mt-4 rounded-md border border-warning-foreground/30 bg-warning px-4 py-3 text-sm text-warning-foreground",children:a.jsx("ul",{className:"space-y-1",children:R.map(P=>a.jsx("li",{children:P},P))})}):null]}),a.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[a.jsx("button",{type:"button",onClick:()=>S("edit"),className:`shell-action ${j==="edit"?"bg-foreground text-background":""}`,children:"Edit"}),a.jsxs("button",{type:"button",onClick:()=>S("preview"),className:`shell-action ${j==="preview"?"bg-foreground text-background":""}`,children:[a.jsx(Cx,{className:"h-4 w-4"}),"Preview"]})]}),a.jsxs("div",{className:"grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_minmax(320px,0.8fr)]",children:[a.jsx("div",{className:j==="preview"?"hidden md:block":"",children:a.jsx("div",{className:"surface-panel space-y-3",children:N?a.jsx("textarea",{value:v,onChange:P=>b(P.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}):a.jsx(E_,{documentType:t,content:v,onChange:b,allowSlugEdit:x})})}),a.jsx("div",{className:j==="edit"?"hidden md:block":"",children:a.jsxs("div",{className:"surface-panel sticky top-16 space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Cx,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:"Preview"})]}),a.jsx(Yt,{content:A,emptyState:"Write markdown body content to preview it here."})]})})]})]})}function E_({documentType:e,content:t,onChange:n,allowSlugEdit:o}){if(e==="project"){const l=eu(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ki,{children:[a.jsx(st,{label:"Project title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===cr(l.title)||!l.slug.trim())&&(p.slug=cr(d)),n(pt(e,t,p))},className:"editor-input"})}),a.jsx(st,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(pt(e,t,{slug:cr(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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."})]})}),a.jsx(st,{label:"Tags",children:a.jsx("input",{value:l.tags,onChange:c=>n(pt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(P_,{value:l.workspace,onChange:c=>n(pt(e,t,{workspace:c}))})]}),a.jsx(st,{label:"Project body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(pt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="assignment"){const l=tu(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ki,{children:[a.jsx(st,{label:"Assignment title",children:a.jsx("input",{value:l.title,onChange:c=>{const d=c.target.value,p={title:d};o&&(l.slug===cr(l.title)||!l.slug.trim())&&(p.slug=cr(d)),n(pt(e,t,p))},className:"editor-input"})}),a.jsx(st,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:l.slug,disabled:!o,onChange:c=>n(pt(e,t,{slug:cr(c.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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."})]})}),a.jsx(st,{label:"Status",children:a.jsxs("select",{value:l.status,onChange:c=>n(pt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"pending",children:"Pending"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"blocked",children:"Blocked"}),a.jsx("option",{value:"review",children:"Review"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"failed",children:"Failed"})]})}),a.jsx(st,{label:"Priority",children:a.jsxs("select",{value:l.priority,onChange:c=>n(pt(e,t,{priority:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"low",children:"Low"}),a.jsx("option",{value:"medium",children:"Medium"}),a.jsx("option",{value:"high",children:"High"}),a.jsx("option",{value:"critical",children:"Critical"})]})}),a.jsx(st,{label:"Assignee",children:a.jsx("input",{value:l.assignee,onChange:c=>n(pt(e,t,{assignee:c.target.value})),placeholder:"Agent name",className:"editor-input"})}),a.jsx(st,{label:"Depends on",className:"md:col-span-2",children:a.jsx("input",{value:l.dependsOn,onChange:c=>n(pt(e,t,{dependsOn:c.target.value})),placeholder:"Comma-separated assignment slugs",className:"editor-input"})}),a.jsx(st,{label:"Links",className:"md:col-span-2",children:a.jsx("input",{value:l.links,onChange:c=>n(pt(e,t,{links:c.target.value})),placeholder:"Comma-separated: projectSlug/assignmentSlug",className:"editor-input"})}),a.jsx(st,{label:"Blocked reason",className:"md:col-span-2",children:a.jsx("input",{value:l.blockedReason,onChange:c=>n(pt(e,t,{blockedReason:c.target.value})),placeholder:"Read-only unless the assignment is actually blocked",className:"editor-input"})}),a.jsx(st,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:l.tags,onChange:c=>n(pt(e,t,{tags:c.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})})]}),a.jsx(st,{label:"Assignment body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(pt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="plan"){const l=nu(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ki,{children:[a.jsx(st,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})}),a.jsx(st,{label:"Plan status",children:a.jsxs("select",{value:l.status,onChange:c=>n(pt(e,t,{status:c.target.value})),className:"editor-input",children:[a.jsx("option",{value:"draft",children:"Draft"}),a.jsx("option",{value:"approved",children:"Approved"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"})]})})]}),a.jsx(st,{label:"Plan body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(pt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}if(e==="scratchpad"){const l=ru(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsx(Ki,{children:a.jsx(st,{label:"Assignment",children:a.jsx("input",{value:l.assignment,disabled:!0,className:"editor-input editor-input-disabled"})})}),a.jsx(st,{label:"Scratchpad body",children:a.jsx("textarea",{value:l.body,onChange:c=>n(pt(e,t,{body:c.target.value})),className:"editor-textarea",spellCheck:!1})})]})}const i=ou(t);return a.jsxs("div",{className:"space-y-3",children:[a.jsxs(Ki,{children:[a.jsx(st,{label:"Playbook name",children:a.jsx("input",{value:i.name,onChange:l=>{const c=l.target.value,d={name:c};o&&(i.slug===cr(i.name)||!i.slug.trim())&&(d.slug=cr(c)),n(pt(e,t,d))},className:"editor-input"})}),a.jsx(st,{label:"Slug",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx("input",{value:i.slug,disabled:!o,onChange:l=>n(pt(e,t,{slug:cr(l.target.value)})),className:`editor-input ${o?"":"editor-input-disabled"}`}),a.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:o?"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."})]})}),a.jsx(st,{label:"Description",className:"md:col-span-2",children:a.jsx("input",{value:i.description,onChange:l=>n(pt(e,t,{description:l.target.value})),placeholder:"One-line description of what this playbook does",className:"editor-input"})}),a.jsx(st,{label:"Tags",className:"md:col-span-2",children:a.jsx("input",{value:i.tags,onChange:l=>n(pt(e,t,{tags:l.target.value})),placeholder:"Comma-separated tags",className:"editor-input"})}),a.jsx(st,{label:"When to use",className:"md:col-span-2",children:a.jsx("input",{value:i.whenToUse,onChange:l=>n(pt(e,t,{whenToUse:l.target.value})),placeholder:"Describe when agents should apply this playbook",className:"editor-input"})})]}),a.jsx(st,{label:"Playbook rules",children:a.jsx("textarea",{value:i.body,onChange:l=>n(pt(e,t,{body:l.target.value})),className:"editor-textarea",spellCheck:!1})})]})}function Ki({children:e}){return a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:e})}function st({label:e,children:t,className:n}){return a.jsxs("label",{className:`block space-y-2 ${n??""}`,children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t]})}function P_({value:e,onChange:t}){const{data:n}=Dp(),o=(n==null?void 0:n.workspaces)??[];return a.jsx(st,{label:"Workspace",children:a.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"editor-input",children:[a.jsx("option",{value:"",children:"Ungrouped"}),o.map(i=>a.jsx("option",{value:i,children:i},i))]})})}function T_(e,t){switch(e){case"project":return eu(t).body;case"assignment":return tu(t).body;case"plan":return nu(t).body;case"scratchpad":return ru(t).body;case"playbook":return ou(t).body}}function R_(e,t){switch(e){case"project":{const n=eu(t);return[n.title.trim()?null:"Project title is required.",n.slug.trim()?null:"Project slug is required.",n.slug.trim()&&!Xd(n.slug)?"Project slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"assignment":{const n=tu(t);return[n.title.trim()?null:"Assignment title is required.",n.slug.trim()?null:"Assignment slug is required.",n.slug.trim()&&!Xd(n.slug)?"Assignment slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}case"plan":return nu(t).assignment.trim()?[]:["Plan assignment is required."];case"scratchpad":return ru(t).assignment.trim()?[]:["Scratchpad assignment is required."];case"playbook":{const n=ou(t);return[n.name.trim()?null:"Playbook name is required.",n.slug.trim()?null:"Playbook slug is required.",n.slug.trim()&&!Xd(n.slug)?"Playbook slug must be lowercase letters, numbers, and hyphens only.":null].filter(o=>!!o)}}}function bv(){const e=Ut(),{workspace:t}=At(),n=Lt(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/project").then(v=>v.json()).then(v=>{let b=v.content;t&&t!=="_ungrouped"&&(b=b.replace(/^(tags: \[\])$/m,`$1
|
|
495
|
+
workspace: ${t}`)),i(b),c(!1)}).catch(v=>{h(v.message),c(!1)})},[t]);async function x(v){p(!0),h(null);try{const b=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}e(`${n}/projects/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return l?a.jsx(kt,{label:"Loading project template…"}):m&&!o?a.jsx(gt,{error:m}):a.jsx(ni,{initialContent:o||"",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 wv(){const{slug:e}=At(),t=Lt(),n=Ut(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{fetch("/api/templates/assignment").then(v=>v.json()).then(v=>{i(v.content),c(!1)}).catch(v=>{h(v.message),c(!1)})},[]);async function x(v){if(!e){h("Project slug is required.");return}p(!0),h(null);try{const b=await fetch(`/api/projects/${e}/assignments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),N=await b.json();if(!b.ok){h(N.error||`HTTP ${b.status}`),p(!1);return}n(`${t}/projects/${e}/assignments/${N.slug}`)}catch(b){h(b.message),p(!1);return}p(!1)}return l?a.jsx(kt,{label:"Loading assignment template…"}):m&&!o?a.jsx(gt,{error:m}):a.jsx(ni,{initialContent:o||"",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 kv(){const{workspace:e}=At(),t=Lt(),n=Ut(),[o,i]=g.useState(null),[l,c]=g.useState(!0),[d,p]=g.useState(!1),[m,h]=g.useState(null);g.useEffect(()=>{const v=new URLSearchParams({standalone:"1"});e&&v.set("workspace",e),fetch(`/api/templates/assignment?${v.toString()}`).then(b=>b.json()).then(b=>{i(b.content),c(!1)}).catch(b=>{h(b.message),c(!1)})},[e]);async function x(v){var b;p(!0),h(null);try{const N=await fetch("/api/assignments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:v})}),k=await N.json();if(!N.ok){h(k.error||`HTTP ${N.status}`),p(!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."),p(!1);return}n(`/assignments/${j}`)}catch(N){h(N.message),p(!1);return}p(!1)}return l?a.jsx(kt,{label:"Loading assignment template…"}):m&&!o?a.jsx(gt,{error:m}):a.jsx(ni,{initialContent:o||"",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 su({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,documentType:l,helpTitle:c,helpBody:d}){const p=Ut(),{data:m,loading:h,error:x}=Cb(e),[v,b]=g.useState(!1),[N,k]=g.useState(null);async function j(S){b(!0),k(null);try{const R=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:S})}),E=await R.json();if(!R.ok){k(E.error||`HTTP ${R.status}`),b(!1);return}p(n)}catch(R){k(R.message),b(!1);return}b(!1)}return h?a.jsx(kt,{label:`Loading ${o.toLowerCase()}…`}):x||!m?a.jsx(gt,{error:x||`${o} is unavailable.`}):a.jsx(ni,{initialContent:m.content,documentType:l,onSave:j,saving:v,error:N,title:o,description:i,onCancel:()=>p(n),helpTitle:c,helpBody:d})}function jv(){const{slug:e}=At(),t=Lt(),n=e??"";return a.jsx(su,{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 Tf(){const{slug:e,aslug:t,id:n}=At(),o=Lt(),i=!!n,l=i?`/api/assignments/${n}/edit`:`/api/projects/${e}/assignments/${t}/edit`,c=i?`/api/assignments/${n}`:`/api/projects/${e}/assignments/${t}`,d=i?`/assignments/${n}`:`${o}/projects/${e}/assignments/${t}`;return a.jsx(su,{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 Rf(){const{slug:e,aslug:t,id:n}=At(),o=Lt(),i=!!n,l=i?`/api/assignments/${n}/plan/edit`:`/api/projects/${e}/assignments/${t}/plan/edit`,c=i?`/api/assignments/${n}/plan`:`/api/projects/${e}/assignments/${t}/plan`,d=i?`/assignments/${n}?tab=plan`:`${o}/projects/${e}/assignments/${t}?tab=plan`;return a.jsx(su,{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 Af(){const{slug:e,aslug:t,id:n}=At(),o=Lt(),i=!!n,l=i?`/api/assignments/${n}/scratchpad/edit`:`/api/projects/${e}/assignments/${t}/scratchpad/edit`,c=i?`/api/assignments/${n}/scratchpad`:`/api/projects/${e}/assignments/${t}/scratchpad`,d=i?`/assignments/${n}?tab=scratchpad`:`${o}/projects/${e}/assignments/${t}?tab=scratchpad`;return a.jsx(su,{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 ek({loadUrl:e,saveUrl:t,redirectTo:n,title:o,description:i,helpTitle:l,helpBody:c}){const d=Ut(),{data:p,loading:m,error:h}=Cb(e),[x,v]=g.useState(""),[b,N]=g.useState(""),[k,j]=g.useState(!1),[S,R]=g.useState(null);async function E(){j(!0),R(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){R(L.error||`HTTP ${A.status}`),j(!1);return}d(n)}catch(A){R(A.message),j(!1);return}j(!1)}return m?a.jsx(kt,{label:`Loading ${o.toLowerCase()}…`}):h||!p?a.jsx(gt,{error:h||`${o} is unavailable.`}):a.jsxs("div",{className:"space-y-4",children:[a.jsx(Ae,{title:o,description:i,children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry title"}),a.jsx("input",{value:x,onChange:A=>v(A.target.value),placeholder:"Optional title",className:"editor-input"})]}),a.jsxs("label",{className:"block space-y-2",children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Entry body"}),a.jsx("textarea",{value:b,onChange:A=>N(A.target.value),className:"editor-textarea",spellCheck:!1})]}),S?a.jsx("p",{className:"rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:S}):null,a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",onClick:()=>d(n),className:"shell-action",children:"Cancel"}),a.jsx("button",{type:"button",onClick:E,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"})]})]})}),a.jsx(Ae,{title:"Current Document",children:a.jsx(Yt,{content:p.content.replace(/^---[\s\S]*?---\n?/,""),emptyState:"No existing content."})})]})}function Df(){const{slug:e,aslug:t,id:n}=At(),o=Lt(),i=!!n,l=i?`/api/assignments/${n}/handoff/edit`:`/api/projects/${e}/assignments/${t}/handoff/edit`,c=i?`/api/assignments/${n}/handoff/entries`:`/api/projects/${e}/assignments/${t}/handoff/entries`,d=i?`/assignments/${n}?tab=handoff`:`${o}/projects/${e}/assignments/${t}?tab=handoff`;return a.jsx(ek,{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 If(){const{slug:e,aslug:t,id:n}=At(),o=Lt(),i=!!n,l=i?`/api/assignments/${n}/decision-record/edit`:`/api/projects/${e}/assignments/${t}/decision-record/edit`,c=i?`/api/assignments/${n}/decision-record/entries`:`/api/projects/${e}/assignments/${t}/decision-record/entries`,d=i?`/assignments/${n}?tab=decisions`:`${o}/projects/${e}/assignments/${t}?tab=decisions`;return a.jsx(ek,{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 Sv(){const{workspace:e}=At(),{data:t}=Tc(),{data:n,loading:o,error:i,refetch:l}=Ip(),[c,d]=g.useState(!1),[p,m]=g.useState(""),[h,x]=g.useState(!1),v=gn();g.useEffect(()=>{const R=v.hash.match(/^#server-(.+)/);if(!R)return;const E=decodeURIComponent(R[1]),A=document.querySelector(`[data-server-name="${window.CSS.escape(E)}"]`);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)},[v.hash,n]);const b=(()=>{if(!e||!n)return(n==null?void 0:n.sessions)??[];if(!t)return[];const R=new Set(t.filter(E=>e==="_ungrouped"?E.workspace===null:E.workspace===e).map(E=>E.slug));return n.sessions.filter(E=>E.windows.some(A=>A.panes.some(L=>L.assignment&&L.assignment.project!==null&&R.has(L.assignment.project))))})();async function N(R){if(R.preventDefault(),!!p.trim())try{await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.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(R){await fetch(`/api/servers/${encodeURIComponent(R)}`,{method:"DELETE"}),l()}async function S(R){await fetch(`/api/servers/${encodeURIComponent(R)}/refresh`,{method:"POST"}),l()}return o?a.jsx(kt,{label:"Loading servers…"}):i?a.jsx(gt,{error:i}):n?n.tmuxAvailable?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c?a.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[a.jsx("input",{type:"text",value:p,onChange:R=>m(R.target.value),placeholder:"tmux session name",className:"editor-input text-sm",autoFocus:!0}),a.jsx("button",{type:"submit",className:"shell-action",children:"Add"}),a.jsx("button",{type:"button",className:"shell-action",onClick:()=>d(!1),children:"Cancel"})]}):a.jsxs("button",{className:"shell-action",onClick:()=>d(!0),children:[a.jsx(Un,{className:"h-3.5 w-3.5"}),"Track Session"]}),a.jsxs("button",{className:"shell-action",onClick:k,disabled:h,children:[a.jsx(nb,{className:`h-3.5 w-3.5 ${h?"animate-spin":""}`}),"Refresh All"]})]}),b.length===0?a.jsx(tt,{title:"No sessions tracked",description:"Register a tmux session to start tracking your dev servers."}):a.jsx("div",{className:"mt-4 space-y-4",children:b.map(R=>a.jsx(A_,{session:R,onRefresh:()=>S(R.name),onRemove:()=>j(R.name),onRefetch:l},R.name))})]}):a.jsx(a.Fragment,{children:a.jsxs("div",{className:"surface-panel mt-4 flex flex-col items-center gap-3 py-12 text-center",children:[a.jsx(yC,{className:"h-10 w-10 text-muted-foreground/40"}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:"tmux is not installed"}),a.jsxs("p",{className:"max-w-md text-sm text-muted-foreground",children:["Server tracking requires tmux. Install it with ",a.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"brew install tmux"})," to get started."]})]})}):null}function A_({session:e,onRefresh:t,onRemove:n,onRefetch:o}){return a.jsxs("div",{className:"surface-panel","data-server-name":e.name,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Cp,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-semibold text-foreground",children:e.name}),a.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"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Last refreshed: ",new Date(e.lastRefreshed).toLocaleString()]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{className:"shell-action",onClick:t,title:"Refresh",children:a.jsx(nb,{className:"h-3.5 w-3.5"})}),a.jsx("button",{className:"shell-action",onClick:n,title:"Remove",children:a.jsx(To,{className:"h-3.5 w-3.5"})})]})]}),e.alive&&e.windows.length>0&&a.jsx("div",{className:"mt-3 space-y-3",children:e.windows.map(i=>a.jsxs("div",{children:[a.jsxs("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:["Window ",i.index,": ",i.name]}),a.jsx("div",{className:"space-y-1.5",children:i.panes.map(l=>a.jsx(D_,{pane:l,sessionName:e.name,windowIndex:i.index,onRefetch:o},`${i.index}:${l.index}`))})]},i.index))}),!e.alive&&a.jsxs("div",{className:"mt-3 flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(hC,{className:"h-4 w-4"}),a.jsx("span",{children:e.kind==="process"?"Process no longer running":"Session no longer exists"})]})]})}function D_({pane:e,sessionName:t,windowIndex:n,onRefetch:o}){const i=Lt(),l=e.cwd.replace(/^\/Users\/[^/]+/,"~");return a.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsxs("span",{className:"shrink-0 font-mono text-xs text-muted-foreground/60",children:[":",e.index]}),a.jsx("span",{className:"shrink-0 rounded bg-muted/60 px-1.5 py-0.5 font-mono text-xs",children:e.command}),a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx("span",{className:"truncate",title:e.cwd,children:l}),a.jsx(Vr,{value:e.cwd})]}),e.branch&&a.jsxs("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Jv,{className:"h-3 w-3"}),e.branch,e.worktree&&a.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&&a.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:e.urls.map(c=>a.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:",":"),a.jsx(Qv,{className:"h-2.5 w-2.5"})]},c))}),a.jsx("div",{className:"ml-auto shrink-0",children:e.assignment?a.jsxs(Re,{to:e.assignment.project===null?`/assignments/${e.assignment.slug}`:`${i}/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:[a.jsx(sC,{className:"h-2.5 w-2.5"}),e.assignment.title,e.assignment.project===null?a.jsx("span",{className:"ml-1 rounded bg-muted px-1 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground",children:"Standalone"}):null]}):a.jsx("span",{className:"text-xs text-muted-foreground/40",children:"unlinked"})})]})}function Nv(){const{workspace:e}=At(),{data:t}=Tc(),{data:n,loading:o,error:i}=hE(),[l,c]=g.useState(""),[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState("started_desc"),[b,N]=g.useState(0),[k,j]=g.useState(new Set),[S,R]=g.useState(!1),[E,A]=g.useState(null),[L,P]=g.useState(null),F=(n==null?void 0:n.sessions.some(K=>K.status==="active"))??!1;g.useEffect(()=>{if(!F)return;const K=window.setInterval(()=>N(Z=>Z+1),3e4);return()=>window.clearInterval(K)},[F]),g.useEffect(()=>{j(K=>{if(K.size===0)return K;const Z=new Set((n==null?void 0:n.sessions.map(I=>I.sessionId))??[]),M=new Set([...K].filter(I=>Z.has(I)));return M.size===K.size?K:M})},[n]);const _=g.useMemo(()=>{if(!n)return[];if(e&&!t)return[];const K=l.trim().toLowerCase();return[...n.sessions.filter(M=>{var $;if(e&&t){const q=(($=t.find(T=>T.slug===M.projectSlug))==null?void 0:$.workspace)??null;if(e==="_ungrouped"){if(q!==null)return!1}else if(q!==e)return!1}const I=O_(M.started);return d&&(!I||I<d)||m&&(!I||I>m)?!1:K?[M.projectSlug??"",M.assignmentSlug??"",M.agent,M.sessionId,M.path,M.description??"",M.transcriptPath??""].join(" ").toLowerCase().includes(K):!0})].sort((M,I)=>L_(M,I,x))},[n,l,x,d,m,b,e,t]);function Q(K){j(Z=>{const M=new Set(Z);return M.has(K)?M.delete(K):M.add(K),M})}function re(){k.size===_.length&&_.length>0?j(new Set):j(new Set(_.map(K=>K.sessionId)))}async function U(K){A(null),R(!0);try{const Z=await fetch("/api/agent-sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionIds:K})}),M=await Z.json().catch(()=>null);if(!Z.ok)throw new Error((M==null?void 0:M.error)||`HTTP ${Z.status}`);j(I=>new Set([...I].filter(D=>!K.includes(D)))),P(null)}catch(Z){A(Z.message)}finally{R(!1)}}if(o)return a.jsx(kt,{label:"Loading agent sessions..."});if(i)return a.jsx(gt,{error:i});if(!n)return null;const G=n.sessions.length>0;return a.jsxs(a.Fragment,{children:[a.jsxs(Yp,{children:[a.jsx(_c,{value:l,onChange:c,placeholder:"Search project, assignment, agent, session ID, path, or description"}),a.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",a.jsx("input",{type:"date",value:d,onChange:K=>p(K.target.value),className:"editor-input min-w-[150px]"})]}),a.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",a.jsx("input",{type:"date",value:m,onChange:K=>h(K.target.value),className:"editor-input min-w-[150px]"})]}),a.jsxs("select",{value:x,onChange:K=>v(K.target.value),className:"editor-input max-w-[200px]",children:[a.jsx("option",{value:"started_desc",children:"Newest first"}),a.jsx("option",{value:"started_asc",children:"Oldest first"}),a.jsx("option",{value:"assignment_asc",children:"Assignment A-Z"}),a.jsx("option",{value:"agent_asc",children:"Agent A-Z"})]})]}),E?a.jsx("div",{className:"mt-4 rounded-md border border-error-foreground/30 bg-error px-4 py-3 text-sm text-error-foreground",children:E}):null,k.size>0&&a.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:[a.jsxs("span",{className:"text-muted-foreground",children:[k.size," session",k.size!==1?"s":""," selected"]}),a.jsxs("button",{className:"shell-action text-destructive",onClick:()=>P({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:[a.jsx(To,{className:"mr-1 inline h-3.5 w-3.5"}),"Delete Selected"]}),a.jsx("button",{className:"shell-action",onClick:()=>j(new Set),children:"Clear Selection"})]}),G?_.length===0?a.jsx(tt,{title:"No agent sessions match these filters",description:"Adjust the status, search term, date range, or sorting controls to show sessions again."}):a.jsx("div",{className:"surface-panel mt-4 overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[1040px] text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/40 text-left text-xs uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"w-8 pb-2 pr-3",children:a.jsx("button",{onClick:re,className:"text-muted-foreground hover:text-foreground",children:k.size===_.length&&_.length>0?a.jsx(zn,{className:"h-4 w-4"}):a.jsx(rb,{className:"h-4 w-4"})})}),a.jsx("th",{className:"pb-2 pr-3",children:"Project"}),a.jsx("th",{className:"pb-2 pr-3",children:"Assignment"}),a.jsx("th",{className:"pb-2 pr-3",children:"Description"}),a.jsx("th",{className:"pb-2 pr-3",children:"Agent"}),a.jsx("th",{className:"pb-2 pr-3",children:"Session ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Started"}),a.jsx("th",{className:"pb-2 pr-3",children:"Path"}),a.jsx("th",{className:"pb-2 pr-3",children:"Transcript"}),a.jsx("th",{className:"w-8 pb-2"})]})}),a.jsx("tbody",{children:_.map(K=>a.jsx(I_,{session:K,selected:k.has(K.sessionId),onToggle:()=>Q(K.sessionId),onDelete:()=>P({sessionIds:[K.sessionId],title:`Delete session ${K.sessionId.slice(0,8)}...?`,description:`Remove this ${K.agent} session record${K.assignmentSlug?` for ${K.assignmentSlug}`:""}. This cannot be undone.`,confirmLabel:"Delete Session"})},K.sessionId))})]})}):a.jsx(tt,{title:"No agent sessions",description:"No agent sessions have been registered yet. Use /grab-assignment or syntaur track-session to register one."}),a.jsx(p1,{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:K=>{K||P(null)},onConfirm:async()=>{L&&await U(L.sessionIds)}})]})}function I_({session:e,selected:t,onToggle:n,onDelete:o}){const i=Lt(),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 a.jsxs("tr",{className:"border-b border-border/20 last:border-0",children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:t?a.jsx(zn,{className:"h-4 w-4"}):a.jsx(rb,{className:"h-4 w-4"})})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug?a.jsx(Re,{to:`${i}/projects/${e.projectSlug}`,className:"text-primary hover:underline",children:En(e.projectSlug)}):e.assignmentSlug?a.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-mono uppercase tracking-wide text-muted-foreground",children:"Standalone"}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:e.projectSlug&&e.assignmentSlug?a.jsx(Re,{to:`${i}/projects/${e.projectSlug}/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline",children:En(e.assignmentSlug)}):e.assignmentSlug?a.jsx(Re,{to:`/assignments/${e.assignmentSlug}`,className:"text-primary hover:underline font-mono",children:e.assignmentSlug}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"max-w-[200px] py-2 pr-3",children:e.description?a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.description,children:e.description.length>60?e.description.slice(0,57)+"...":e.description}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(Cc,{className:"h-3 w-3 text-muted-foreground"}),e.agent]})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"font-mono text-xs text-muted-foreground",title:e.sessionId,children:l}),a.jsx(Vr,{value:e.sessionId})]})}),a.jsx("td",{className:"py-2 pr-3 text-xs text-muted-foreground",children:Er(e.started)}),a.jsx("td",{className:"max-w-[240px] py-2 pr-3",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate text-xs text-muted-foreground",title:e.path,children:c}),e.path&&a.jsx(Vr,{value:e.path})]})}),a.jsx("td",{className:"max-w-[260px] py-2 pr-3",children:e.transcriptPath?a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate font-mono text-xs text-muted-foreground",title:e.transcriptPath,children:d}),a.jsx(Vr,{value:e.transcriptPath})]}):a.jsx("span",{className:"text-muted-foreground",children:"—"})}),a.jsx("td",{className:"py-2",children:a.jsx("button",{onClick:o,className:"text-muted-foreground hover:text-destructive",title:"Delete session",children:a.jsx(To,{className:"h-3.5 w-3.5"})})})]})}function O_(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return null;const n=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${n}-${o}-${i}`}function Gl(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 L_(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 Gl(e)-Gl(t);case"duration_desc":return Gl(t)-Gl(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 __(){const{data:e,loading:t,error:n,refetch:o}=Eb(),[i,l]=g.useState(""),[c,d]=g.useState(null),p=g.useMemo(()=>{if(!(e!=null&&e.playbooks))return[];if(!i.trim())return e.playbooks;const h=i.toLowerCase();return e.playbooks.filter(x=>x.name.toLowerCase().includes(h)||x.description.toLowerCase().includes(h)||x.slug.toLowerCase().includes(h)||x.tags.some(v=>v.toLowerCase().includes(h)))},[e,i]);async function m(h,x,v){if(h.preventDefault(),h.stopPropagation(),!c){d(x);try{const b=v?"disable":"enable",N=await fetch(`/api/playbooks/${encodeURIComponent(x)}/${b}`,{method:"POST"});if(!N.ok){const k=await N.json().catch(()=>({}));throw new Error(k.error||`Failed to ${b} playbook`)}o()}catch(b){console.error(b),alert(b instanceof Error?b.message:"Failed to update playbook")}finally{d(null)}}}return t?a.jsx(kt,{label:"Loading playbooks..."}):n?a.jsx(gt,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between gap-4",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(qs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{type:"text",placeholder:"Search playbooks...",value:i,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"})]}),a.jsxs(Re,{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:[a.jsx(Un,{className:"h-4 w-4"}),"Create Playbook"]})]}),a.jsxs(Re,{to:"/playbooks/manifest",className:"surface-panel group flex items-center gap-3 p-3 transition hover:border-foreground/20",children:[a.jsx(ZN,{className:"h-5 w-5 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:"Playbook Manifest"}),a.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"})]}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Index of all playbooks with descriptions. Include ",a.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."]})]})]}),p.length===0?a.jsx(tt,{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?a.jsxs(Re,{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:[a.jsx(Un,{className:"h-4 w-4"}),"Create Playbook"]}):void 0}):a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p.map(h=>{const x=c===h.slug;return a.jsxs("div",{className:`surface-panel relative flex flex-col gap-2 p-4 transition hover:border-foreground/20 ${h.enabled?"":"opacity-75"}`,children:[a.jsxs(Re,{to:`/playbooks/${h.slug}`,className:"group flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Yv,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground group-hover:underline",children:h.name}),h.description?a.jsx("p",{className:"mt-1 text-xs leading-5 text-muted-foreground line-clamp-2",children:h.description}):null]})]}),a.jsx("div",{className:"flex items-center gap-2 pt-1 pr-20",children:a.jsxs("div",{className:"flex flex-wrap gap-1",children:[h.tags.slice(0,3).map(v=>a.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:[a.jsx(ob,{className:"h-2.5 w-2.5"}),v]},v)),h.tags.length>3?a.jsxs("span",{className:"text-[10px] text-muted-foreground/60",children:["+",h.tags.length-3]}):null]})})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":h.enabled,"aria-label":h.enabled?"Disable playbook":"Enable playbook",onClick:v=>m(v,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:a.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 M_(){const{slug:e}=At(),t=Ut(),{data:n,loading:o,error:i,refetch:l}=gE(e),[c,d]=g.useState(!1),[p,m]=g.useState(!1),[h,x]=g.useState(!1),v=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 N(){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 o?a.jsx(kt,{label:"Loading playbook..."}):i?a.jsx(gt,{error:i}):n?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h2",{className:"text-lg font-semibold text-foreground",children:v?"Playbook Manifest":n.name}),v?a.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]}),!v&&n.description?a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description}):null,v?a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This file is rebuilt automatically when playbooks are added or removed. Include"," ",a.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,!v&&n.whenToUse?a.jsxs("p",{className:"mt-2 text-sm text-muted-foreground italic",children:["When to use: ",n.whenToUse]}):null,a.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-3 text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Created ",Er(n.created)]}),a.jsxs("span",{children:["Updated ",Er(n.updated)]})]}),n.tags.length>0?a.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:n.tags.map(k=>a.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:[a.jsx(ob,{className:"h-3 w-3"}),k]},k))}):null]}),v?null:a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.enabled?"Enabled":"Disabled"}),a.jsx("button",{type:"button",role:"switch","aria-checked":n.enabled,"aria-label":n.enabled?"Disable playbook":"Enable playbook",onClick:N,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:a.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"}`})})]}),a.jsxs(Re,{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:[a.jsx(uC,{className:"h-3 w-3"}),"Edit"]}),c?a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",onClick:b,disabled:p,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:p?"Deleting...":"Confirm"}),a.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"})]}):a.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:[a.jsx(To,{className:"h-3 w-3"}),"Delete"]})]})]}),a.jsx("div",{className:"surface-panel p-4",children:a.jsx(Yt,{content:n.body})})]}):null}function $_(){const e=Ut(),[t,n]=g.useState(null),[o,i]=g.useState(!0),[l,c]=g.useState(!1),[d,p]=g.useState(null);g.useEffect(()=>{fetch("/api/playbooks/template/new").then(h=>h.json()).then(h=>{n(h.content),i(!1)}).catch(h=>{p(h.message),i(!1)})},[]);async function m(h){c(!0),p(null);try{const x=await fetch("/api/playbooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:h})}),v=await x.json();if(!x.ok){p(v.error||`HTTP ${x.status}`),c(!1);return}e(`/playbooks/${v.slug}`)}catch(x){p(x.message),c(!1);return}c(!1)}return o?a.jsx(kt,{label:"Loading playbook template..."}):d&&!t?a.jsx(gt,{error:d}):a.jsx(ni,{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 F_(){const{slug:e}=At(),t=Ut(),[n,o]=g.useState(null),[i,l]=g.useState(!0),[c,d]=g.useState(!1),[p,m]=g.useState(null);g.useEffect(()=>{e&&fetch(`/api/playbooks/${e}/edit`).then(x=>x.json()).then(x=>{o(x.content),l(!1)}).catch(x=>{m(x.message),l(!1)})},[e]);async function h(x){if(e){d(!0),m(null);try{const v=await fetch(`/api/playbooks/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:x})}),b=await v.json();if(!v.ok){m(b.error||`HTTP ${v.status}`),d(!1);return}t(`/playbooks/${e}`)}catch(v){m(v.message),d(!1);return}d(!1)}}return i?a.jsx(kt,{label:"Loading playbook..."}):p&&!n?a.jsx(gt,{error:p}):a.jsx(ni,{initialContent:n||"",documentType:"playbook",mode:"edit",onSave:h,saving:c,error:p,title:"Edit Playbook",onCancel:()=>t(`/playbooks/${e}`)})}function z_({value:e,onChange:t}){return a.jsxs("div",{className:"flex items-center gap-2",children:[a.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"}),a.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 gp=["projects","playbooks","todos","servers","config"];function B_(e){const t=new Set;for(const n of e.split(",").map(o=>o.trim()))gp.includes(n)&&t.add(n);return t}function Cv(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function U_(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(""),[c,d]=g.useState(new Set(gp)),[p,m]=g.useState(!1),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(null),j=g.useCallback(async()=>{try{const P=await fetch("/api/backup");if(!P.ok)throw new Error(`HTTP ${P.status}`);const F=await P.json();o(F),l(F.repo??""),d(B_(F.categories)),m(!1)}catch(P){k({type:"error",message:`Failed to load backup config: ${P instanceof Error?P.message:String(P)}`})}finally{t(!1)}},[]);g.useEffect(()=>{j()},[j]);function S(P){d(F=>{const _=new Set(F);return _.has(P)?_.delete(P):_.add(P),_}),m(!0)}async function R(){x(!0),k(null);try{const P=Array.from(c),F=await fetch("/api/backup/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({repo:i.trim()||null,categories:P})}),_=await F.json();if(!F.ok)throw new Error(_.error||`HTTP ${F.status}`);o(_),m(!1),k({type:"success",message:"Backup configuration saved."})}catch(P){k({type:"error",message:`Save failed: ${P instanceof Error?P.message:String(P)}`})}finally{x(!1)}}async function E(){b("push"),k(null);try{const P=await fetch("/api/backup/push",{method:"POST"}),F=await P.json();if(!P.ok||F.success===!1)throw new Error(F.error||F.message||`HTTP ${P.status}`);k({type:"success",message:F.message||"Backup complete."}),await j()}catch(P){k({type:"error",message:`Backup failed: ${P instanceof Error?P.message:String(P)}`})}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 F=await fetch("/api/backup/pull",{method:"POST"}),_=await F.json();if(!F.ok||_.success===!1)throw new Error(_.error||_.message||`HTTP ${F.status}`);k({type:"success",message:_.message||"Restore complete."}),await j()}catch(F){k({type:"error",message:`Restore failed: ${F instanceof Error?F.message:String(F)}`})}finally{b(null)}}}if(e)return a.jsx(Ae,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})});const L=!!i.trim()&&c.size>0&&!v&&!p;return a.jsx(Ae,{title:"GitHub Backup",description:"Back up Syntaur files to a GitHub repository and restore from it",children:a.jsxs("div",{className:"space-y-4",children:[N&&a.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${N.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:N.message}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Repository URL"}),a.jsx("input",{type:"text",value:i,onChange:P=>{l(P.target.value),m(!0)},placeholder:"git@github.com:you/syntaur-backup.git",className:"editor-input w-full text-sm"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["SSH or HTTPS URL. Requires ",a.jsx("code",{className:"rounded bg-muted px-1",children:"git"})," installed and credentials configured locally."]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Categories to back up"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:gp.map(P=>{const F=c.has(P);return a.jsxs("button",{type:"button",onClick:()=>S(P),className:`shell-action text-xs ${F?"bg-primary/10 text-primary hover:bg-primary/20":"bg-muted/30 text-muted-foreground hover:bg-muted/60"}`,children:[a.jsx("span",{className:`mr-1 inline-block h-2 w-2 rounded-full ${F?"bg-primary":"bg-muted-foreground/40"}`}),P]},P)})})]}),a.jsxs("div",{className:"grid grid-cols-1 gap-2 text-xs text-muted-foreground sm:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last backup: "}),Cv((n==null?void 0:n.lastBackup)??null)]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-foreground",children:"Last restore: "}),Cv((n==null?void 0:n.lastRestore)??null)]}),(n==null?void 0:n.locked)&&a.jsx("div",{className:"sm:col-span-2 text-warning-foreground",children:"⚠ A backup operation is in progress or the lock file is stale."})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:R,disabled:h||!p,children:[a.jsx(Ep,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Config"]}),a.jsxs("button",{className:"shell-action",onClick:E,disabled:!L,title:L?"Back up now":p?"Save config first":"Set repo and pick categories",children:[a.jsx(vC,{className:"h-3.5 w-3.5"}),v==="push"?"Backing up...":"Back Up Now"]}),a.jsxs("button",{className:"shell-action",onClick:A,disabled:!L,title:L?"Restore from backup":p?"Save config first":"Set repo and pick categories",children:[a.jsx(YN,{className:"h-3.5 w-3.5"}),v==="pull"?"Restoring...":"Restore"]}),p&&a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]}),a.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:[a.jsx(KN,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),a.jsxs("span",{children:["Restore never overwrites ",a.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 H_(){const{customBindings:e,userBindings:t,actionEntries:n,findConflict:o,bindAction:i,unbindAction:l}=Ro(),[c,d]=g.useState(null),[p,m]=g.useState(null),[h,x]=g.useState(!1),v=Object.values(t).some(E=>typeof E=="string"&&E.length>0);function b(E,A){m({type:E,message:A}),setTimeout(()=>m(null),2500)}function N(E){d({kind:E,combo:null,conflict:null,saving:!1,error:null})}function k(E){if(!c||E.key==="Escape")return;if(E.key==="Enter"&&c.combo){E.preventDefault(),j();return}if(E.key==="Enter")return;E.preventDefault(),E.stopPropagation();const A=Pb(E.nativeEvent);if(!A)return;const L=o(A,c.kind);d({...c,combo:A,conflict:L,error:null})}async function j(){var E;if(c!=null&&c.combo){if((E=c.conflict)!=null&&E.description){d({...c,error:`Reserved: ${c.conflict.description}`});return}d({...c,saving:!0,error:null});try{await i(c.kind,c.combo),d(null),b("success",`Bound ${Bi[c.kind]}`)}catch(A){d({...c,saving:!1,error:A instanceof Error?A.message:"Failed to save"})}}}async function S(E){try{await l(E),b("success",`Cleared ${Bi[E]} binding`)}catch(A){b("error",A instanceof Error?A.message:"Failed to clear binding")}}async function R(){if(!h){x(!0);try{await OP(),b("success","All hotkey bindings cleared")}catch(E){b("error",E instanceof Error?E.message:"Failed to reset bindings")}finally{x(!1)}}}return a.jsxs(Ae,{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:v?a.jsxs("button",{className:"shell-action text-xs",onClick:()=>void R(),disabled:h,children:[a.jsx(Bf,{className:"h-3 w-3"}),"Restore defaults"]}):void 0,children:[p?a.jsx("div",{className:`mb-3 rounded-md border px-3 py-1.5 text-xs ${p.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:p.message}):null,a.jsx("ul",{className:"space-y-2",children:Rc.map(E=>{var _,Q;const A=n.find(re=>re.bindableKind===E),L=e[E],P=typeof t[E]=="string"&&!!t[E],F=(c==null?void 0:c.kind)===E;return a.jsxs("li",{className:"flex flex-wrap items-center gap-3 rounded-md border border-border/40 bg-background/60 px-3 py-2",children:[a.jsx(zf,{className:"h-4 w-4 text-muted-foreground","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-foreground",children:(A==null?void 0:A.title)??Bi[E]}),A!=null&&A.subtitle?a.jsx("div",{className:"text-xs text-muted-foreground",children:A.subtitle}):null]}),L?a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[a.jsx("kbd",{className:"rounded border border-border/70 bg-muted px-2 py-0.5 font-mono text-xs text-foreground",children:Pr(L)}),a.jsx("span",{className:`text-[10px] uppercase tracking-wide ${P?"text-primary":"text-muted-foreground"}`,children:P?"custom":"default"})]}):a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:"unbound"}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("button",{type:"button",className:"shell-action text-xs",onClick:()=>N(E),children:L?"Rebind":"Bind"}),P?a.jsxs("button",{type:"button",className:"shell-action text-xs",onClick:()=>void S(E),"aria-label":`Restore default ${Bi[E]} binding`,children:[a.jsx(Pp,{className:"h-3 w-3"}),"Restore default"]}):null]}),F?a.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)===E&&!c.saving&&d(null)},children:c!=null&&c.combo?a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"text-base font-semibold tracking-wide text-foreground",children:Pr(c.combo)}),(_=c.conflict)!=null&&_.description?a.jsxs("div",{className:"text-xs text-destructive",children:["Reserved: ",c.conflict.description]}):(Q=c.conflict)!=null&&Q.kind?a.jsxs("div",{className:"text-xs text-amber-500 dark:text-amber-400",children:['Already bound to "',Bi[c.conflict.kind],'". Press Enter to overwrite.']}):a.jsx("div",{className:"text-xs text-muted-foreground",children:"Press Enter to save, Esc to cancel, any other key to retry."}),c.error?a.jsx("div",{className:"text-xs text-destructive",children:c.error}):null]}):a.jsx("div",{className:"text-xs text-muted-foreground",children:"Press the key combination you want to bind…"})}):null]},E)})})]})}function Of(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 W_(){const[e,t]=g.useState(!0),[n,o]=g.useState(null),[i,l]=g.useState(!1),[c,d]=g.useState([]),[p,m]=g.useState([]),[h,x]=g.useState(!1),[v,b]=g.useState(null),[N,k]=g.useState(!1),{preset:j,setPreset:S,resetPreset:R}=Ap(),[E,A]=g.useState(!1),[L,P]=g.useState(null);async function F(D){if(!(D===j||E)){A(!0),P(null);try{await S(D),P({type:"success",message:"Theme updated"}),setTimeout(()=>P(null),2e3)}catch($){P({type:"error",message:$ instanceof Error?$.message:"Failed to save theme"})}finally{A(!1)}}}async function _(){A(!0),P(null);try{await R(),P({type:"success",message:"Theme reset to default"}),setTimeout(()=>P(null),2e3)}catch(D){P({type:"error",message:D instanceof Error?D.message:"Failed to reset theme"})}finally{A(!1)}}const Q=g.useCallback(async()=>{try{const D=await fetch("/api/config/statuses");if(!D.ok)throw new Error(`HTTP ${D.status}`);const $=await D.json(),q=Of($);d(q.statuses),m(q.order),l($.custom),k(!1),o(null)}catch(D){o(D instanceof Error?D.message:"Failed to load config")}finally{t(!1)}},[]);g.useEffect(()=>{Q()},[Q]);function re(){setTimeout(()=>b(null),3e3)}async function U(){x(!0),b(null);try{const D={statuses:c.map(z=>({id:z.id,label:z.label,...z.description?{description:z.description}:{},...z.color?{color:z.color}:{},...z.terminal?{terminal:!0}:{}})),order:p,transitions:[]},$=await fetch("/api/config/statuses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(D)});if(!$.ok){const z=await $.json().catch(()=>({error:"Unknown error"}));throw new Error(z.error??"Save failed")}const q=await $.json(),T=Of(q);d(T.statuses),m(T.order),l(q.custom),k(!1),Zx(),b({type:"success",message:"Status config saved"}),re()}catch(D){b({type:"error",message:D instanceof Error?D.message:"Save failed"})}finally{x(!1)}}async function G(){x(!0),b(null);try{const D=await fetch("/api/config/statuses",{method:"DELETE"});if(!D.ok)throw new Error("Reset failed");const $=await D.json(),q=Of($);d(q.statuses),m(q.order),l($.custom),k(!1),Zx(),b({type:"success",message:"Reset to defaults"}),re()}catch(D){b({type:"error",message:D instanceof Error?D.message:"Reset failed"})}finally{x(!1)}}function K(D,$,q){d(T=>{const z=[...T];if(z[D]={...z[D],[$]:q},$==="id"&&typeof q=="string"){const X=T[D].id;m(O=>O.map(pe=>pe===X?q:pe))}return z}),k(!0)}function Z(){const D=`status_${c.length+1}`;d($=>[...$,{id:D,label:"New Status",description:"",color:"",terminal:!1}]),m($=>[...$,D]),k(!0)}function M(D){const $=c[D].id;d(q=>q.filter((T,z)=>z!==D)),m(q=>q.filter(T=>T!==$)),k(!0)}function I(D,$){const q=D+$;q<0||q>=p.length||(m(T=>{const z=[...T];return[z[D],z[q]]=[z[q],z[D]],z}),k(!0))}return e?a.jsx(kt,{label:"Loading settings..."}):n?a.jsx(gt,{error:n}):a.jsx(q1,{children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs(Ae,{title:"Theme",description:"Pick a color theme for the dashboard. The default is the Syntaur brand.",actions:j!=="default"?a.jsxs("button",{className:"shell-action text-xs",onClick:_,disabled:E,children:[a.jsx(Bf,{className:"h-3 w-3"}),"Reset"]}):void 0,children:[L&&a.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}),a.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:hb.map(D=>{const $=D.slug===j;return a.jsxs("button",{type:"button",onClick:()=>F(D.slug),disabled:E,"aria-pressed":$,className:`group relative flex flex-col gap-2 rounded-lg border bg-card/95 p-3 text-left transition disabled:opacity-60 ${$?"border-primary ring-2 ring-primary/40":"border-border/60 hover:border-primary/40"}`,children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:D.swatches.primary}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:D.swatches.secondary}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:D.swatches.coral}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:D.swatches.teal}}),a.jsx("span",{className:"h-5 w-5 rounded-full ring-1 ring-border/60",style:{background:D.swatches.amber}}),$&&a.jsx("span",{className:"ml-auto inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-primary-foreground",children:a.jsx(ga,{className:"h-3 w-3"})})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-foreground",children:D.label}),a.jsx("div",{className:"text-xs text-muted-foreground",children:D.description})]})]},D.slug)})})]}),a.jsx(H_,{}),a.jsxs("div",{className:`flex items-center justify-between rounded-lg border px-4 py-3 text-sm ${i?"border-primary/30 bg-primary/5 text-primary":"border-border/60 bg-muted/30 text-muted-foreground"}`,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(eb,{className:"h-4 w-4"}),i?"Using custom status configuration from ~/.syntaur/config.md":"Using default status configuration"]}),a.jsxs("button",{className:"shell-action text-xs",onClick:G,disabled:h||!i&&!N,children:[a.jsx(Bf,{className:"h-3 w-3"}),"Reset to Defaults"]})]}),v&&a.jsx("div",{className:`rounded-lg border px-4 py-2 text-sm ${v.type==="success"?"border-success-foreground/30 bg-success text-success-foreground":"border-error-foreground/30 bg-error text-error-foreground"}`,children:v.message}),a.jsx(Ae,{title:"Status Definitions",description:"Define the statuses assignments can have",actions:a.jsxs("button",{className:"shell-action text-xs",onClick:Z,children:[a.jsx(Un,{className:"h-3 w-3"}),"Add Status"]}),children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/50 text-left text-xs font-medium uppercase tracking-wider text-muted-foreground",children:[a.jsx("th",{className:"pb-2 pr-3",children:"ID"}),a.jsx("th",{className:"pb-2 pr-3",children:"Label"}),a.jsx("th",{className:"pb-2 pr-3",children:"Color"}),a.jsx("th",{className:"pb-2 pr-3",children:a.jsxs(K1,{children:[a.jsx(G1,{asChild:!0,children:a.jsx("span",{className:"cursor-help underline decoration-dotted underline-offset-4",children:"Done State"})}),a.jsx(Dh,{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.'})]})}),a.jsx("th",{className:"pb-2 w-10"})]})}),a.jsx("tbody",{className:"divide-y divide-border/30",children:c.map((D,$)=>a.jsxs("tr",{children:[a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:D.id,onChange:q=>K($,"id",q.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("input",{type:"text",value:D.label,onChange:q=>K($,"label",q.target.value),className:"editor-input w-full text-sm"})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx(z_,{value:D.color,onChange:q=>K($,"color",q)})}),a.jsx("td",{className:"py-2 pr-3",children:a.jsx("button",{type:"button",role:"switch","aria-checked":D.terminal,onClick:()=>K($,"terminal",!D.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 ${D.terminal?"bg-primary":"bg-muted"}`,children:a.jsx("span",{className:`pointer-events-none inline-block h-4 w-4 rounded-full bg-background shadow-sm ring-0 transition-transform ${D.terminal?"translate-x-4":"translate-x-0"}`})})}),a.jsx("td",{className:"py-2",children:a.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:()=>M($),title:"Remove status",children:a.jsx(To,{className:"h-3.5 w-3.5"})})})]},$))})]})})}),a.jsx(Ae,{title:"Status Order",description:"Controls display order in the dashboard (Kanban columns, progress bars, dropdowns)",children:a.jsx("div",{className:"space-y-1",children:p.map((D,$)=>{var T;const q=((T=c.find(z=>z.id===D))==null?void 0:T.label)??D;return a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border/40 bg-background/60 px-3 py-2 text-sm",children:[a.jsx("span",{className:"mr-1 font-mono text-xs text-muted-foreground/60",children:$+1}),a.jsx("span",{className:"flex-1 font-medium",children:q}),a.jsx("span",{className:"text-xs text-muted-foreground",children:D}),a.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:()=>I($,-1),disabled:$===0,title:"Move up",children:a.jsx(Xv,{className:"h-3.5 w-3.5"})}),a.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:()=>I($,1),disabled:$===p.length-1,title:"Move down",children:a.jsx(aa,{className:"h-3.5 w-3.5"})})]},$)})})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("button",{className:"shell-action bg-primary/10 text-primary hover:bg-primary/20",onClick:U,disabled:h||!N,children:[a.jsx(Ep,{className:"h-3.5 w-3.5"}),h?"Saving...":"Save Configuration"]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"shell-action text-xs",onClick:()=>{t(!0),Q()},disabled:h,children:"Discard Changes"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Unsaved changes"})]})]}),a.jsx(U_,{})]})})}function V_(){const{data:e,loading:t,error:n,refetch:o}=Op(),[i,l]=g.useState(""),c=g.useRef(null);ts("list:todos");const[d,p]=g.useState(""),[m,h]=g.useState(""),[x,v]=g.useState(""),[b,N]=g.useState("_global"),[k,j]=g.useState(null);function S(M,I){M.stopPropagation(),navigator.clipboard.writeText(I),j(I),setTimeout(()=>j(D=>D===I?null:D),1500)}const R=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return[];const M=[];for(const I of e.workspaces)for(const D of I.items)M.push({...D,workspace:I.workspace});return M},[e]),E=g.useMemo(()=>{const M=new Set;for(const I of R)for(const D of I.tags)M.add(D);return Array.from(M).sort()},[R]),A=g.useMemo(()=>{let M=R;if(i.trim()){const I=i.toLowerCase();M=M.filter(D=>D.description.toLowerCase().includes(I)||D.tags.some($=>$.toLowerCase().includes(I))||D.id.includes(I))}return d&&(M=M.filter(I=>I.status===d)),m&&(M=M.filter(I=>I.tags.includes(m))),M},[R,i,d,m]),L=g.useMemo(()=>{if(!(e!=null&&e.workspaces))return{open:0,in_progress:0,completed:0,blocked:0,total:0};const M={open:0,in_progress:0,completed:0,blocked:0,total:0};for(const I of e.workspaces)M.open+=I.counts.open,M.in_progress+=I.counts.in_progress,M.completed+=I.counts.completed,M.blocked+=I.counts.blocked,M.total+=I.counts.total;return M},[e]);async function P(){x.trim()&&(await Lp(b,x.trim()),v(""),o())}const F={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function _(M,I,D){Q(M,I,F[D]||"open")}async function Q(M,I,D){switch(D){case"open":await Db(M,I);break;case"in_progress":await Ab(M,I);break;case"completed":await Tb(M,I);break;case"blocked":await Rb(M,I);break}o()}async function re(M,I){await Ib(M,I),o()}const{hotkeyRowProps:U}=va(A,{scope:"list:todos",bindO:!1,onOpen:M=>_(M.workspace,M.id,M.status)});ht({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var M;return(M=c.current)==null?void 0:M.focus()}}),ht({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>o()});const[G,K]=Po(),Z=G.get("focus");return g.useEffect(()=>{if(!Z)return;const M=document.querySelector(`[data-todo-id="${CSS.escape(Z)}"]`);if(!M)return;M.scrollIntoView({block:"nearest"}),M.classList.add("ring-2","ring-primary/60");const I=window.setTimeout(()=>{M.classList.remove("ring-2","ring-primary/60"),K(D=>{const $=new URLSearchParams(D);return $.delete("focus"),$})},1500);return()=>window.clearTimeout(I)},[Z,A.length,K]),t?a.jsx(kt,{label:"Loading todos..."}):n?a.jsx(gt,{error:n}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(et,{label:"Open",value:L.open,icon:zn}),a.jsx(et,{label:"In Progress",value:L.in_progress,icon:tb,tone:"info"}),a.jsx(et,{label:"Blocked",value:L.blocked,icon:Ks,tone:"warn"}),a.jsx(et,{label:"Completed",value:L.completed,icon:zn,tone:"default"})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("select",{value:b,onChange:M=>N(M.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:[a.jsx("option",{value:"_global",children:"Global"}),e==null?void 0:e.workspaces.filter(M=>M.workspace!=="_global").map(M=>a.jsx("option",{value:M.workspace,children:M.workspace},M.workspace))]}),a.jsx("input",{type:"text",placeholder:"Add a todo...",value:x,onChange:M=>v(M.target.value),onKeyDown:M=>M.key==="Enter"&&P(),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"}),a.jsxs("button",{onClick:P,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:[a.jsx(Un,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(qs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:c,type:"text",placeholder:"Search todos...",value:i,onChange:M=>l(M.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"})]}),a.jsxs("select",{value:d,onChange:M=>p(M.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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),E.length>0&&a.jsxs("select",{value:m,onChange:M=>h(M.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:[a.jsx("option",{value:"",children:"All tags"}),E.map(M=>a.jsxs("option",{value:M,children:["#",M]},M))]})]}),A.length===0?a.jsx(tt,{title:"No todos",description:"Add your first todo above or use the CLI: syntaur todo add"}):a.jsx("div",{className:"space-y-1",children:A.map((M,I)=>a.jsxs("div",{"data-todo-id":M.id,...U(I),className:"surface-panel flex items-center gap-3 px-3 py-2 group cursor-pointer hover:bg-foreground/[0.03] transition",onClick:()=>_(M.workspace,M.id,M.status),children:[a.jsx(wh,{status:M.status,onChange:D=>Q(M.workspace,M.id,D)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${M.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:M.description}),M.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:M.tags.map(D=>`#${D}`).join(" ")})]}),a.jsx("span",{className:"text-xs text-muted-foreground/60 font-mono",children:M.workspace!=="_global"&&a.jsx(Re,{to:`/w/${M.workspace}/todos`,className:"hover:text-foreground transition mr-2",onClick:D=>D.stopPropagation(),children:M.workspace})}),k===M.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(ga,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:D=>S(D,M.id),children:["t:",M.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:D=>S(D,M.id),children:a.jsx(Ec,{className:"h-3 w-3"})})]}),a.jsx("button",{onClick:()=>re(M.workspace,M.id),className:"text-xs text-muted-foreground/40 hover:text-destructive transition opacity-0 group-hover:opacity-100",children:"delete"})]},`${M.workspace}-${M.id}`))})]})}function q_({item:e,copiedId:t,onCycleStatus:n,onStatusChange:o,onCopyId:i,onDelete:l,disabled:c,hotkeyRowProps:d}){const{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:x,transform:v,transition:b,isDragging:N}=B0({id:e.id,disabled:c}),k={transform:Bs.Transform.toString(v),transition:b,zIndex:N?50:void 0,position:N?"relative":void 0};return a.jsxs("div",{ref:h,style:k,"data-todo-id":e.id,...d??{},className:`surface-panel flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-foreground/[0.03] transition ${N?"opacity-50 shadow-lg":""}`,onClick:()=>n(e.id,e.status),children:[!c&&a.jsx("button",{ref:x,...p,...m,className:"cursor-grab active:cursor-grabbing text-muted-foreground/40 hover:text-muted-foreground transition touch-none",onClick:j=>j.stopPropagation(),children:a.jsx(Zv,{className:"h-4 w-4"})}),a.jsx(wh,{status:e.status,onChange:j=>o(e.id,j)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("span",{className:`text-sm ${e.status==="completed"?"line-through text-muted-foreground":"text-foreground"}`,children:e.description}),e.tags.length>0&&a.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:e.tags.map(j=>`#${j}`).join(" ")}),e.session&&a.jsxs("span",{className:"ml-2 text-xs text-info-foreground/70 font-mono",children:["session:",e.session.slice(0,8)]})]}),t===e.id?a.jsxs("span",{className:"text-xs text-status-completed-foreground flex items-center gap-1",children:[a.jsx(ga,{className:"h-3 w-3"})," Copied to clipboard"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"text-xs text-muted-foreground/60 font-mono hover:text-foreground transition",onClick:j=>i(j,e.id),children:["t:",e.id]}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-foreground transition",title:"Copy ID",onClick:j=>i(j,e.id),children:a.jsx(Ec,{className:"h-3 w-3"})}),a.jsx("button",{className:"text-muted-foreground/40 hover:text-destructive transition",title:"Delete todo",onClick:j=>l(j,e.id,e.description),children:a.jsx(To,{className:"h-3 w-3"})})]})]})}function K_(){const{workspace:e}=At(),t=e||"_global",{data:n,loading:o,error:i,refetch:l}=SE(t),[c,d]=g.useState(""),[p,m]=g.useState(""),[h,x]=g.useState(""),[v,b]=g.useState(""),[N,k]=g.useState(null),j=g.useRef(null);ts("list:todos");const S=!!(c.trim()||p||h),R=b0(xc(Wc,{activationConstraint:{distance:8}}),xc(Hc));function E(D,$){D.stopPropagation(),navigator.clipboard.writeText($),k($),setTimeout(()=>k(q=>q===$?null:q),1500)}const A=g.useMemo(()=>{if(!(n!=null&&n.items))return[];const D=new Set;for(const $ of n.items)for(const q of $.tags)D.add(q);return Array.from(D).sort()},[n]),L=g.useMemo(()=>{if(!(n!=null&&n.items))return[];let D=n.items;if(c.trim()){const $=c.toLowerCase();D=D.filter(q=>q.description.toLowerCase().includes($)||q.tags.some(T=>T.toLowerCase().includes($))||q.id.includes($))}return p&&(D=D.filter($=>$.status===p)),h&&(D=D.filter($=>$.tags.includes(h))),D},[n,c,p,h]);async function P(){v.trim()&&(await Lp(t,v.trim()),b(""),l())}const F={open:"in_progress",in_progress:"completed",completed:"open",blocked:"open"};function _(D,$){re(D,F[$]||"open")}async function Q(D,$,q){D.stopPropagation(),window.confirm(`Delete "${q}"? This can't be undone.`)&&(await Ib(t,$),l())}async function re(D,$){switch($){case"open":await Db(t,D);break;case"in_progress":await Ab(t,D);break;case"completed":await Tb(t,D);break;case"blocked":await Rb(t,D);break}l()}const{hotkeyRowProps:U}=va(L,{scope:"list:todos",bindO:!1,onOpen:D=>_(D.id,D.status)});ht({keys:"/",scope:"list:todos",description:"Focus filter",handler:()=>{var D;return(D=j.current)==null?void 0:D.focus()}}),ht({keys:"r",scope:"list:todos",description:"Refresh",handler:()=>l()});const[G,K]=Po(),Z=G.get("focus");g.useEffect(()=>{if(!Z)return;const D=document.querySelector(`[data-todo-id="${window.CSS.escape(Z)}"]`);if(!D)return;D.scrollIntoView({block:"nearest"}),D.classList.add("ring-2","ring-primary/60");const $=window.setTimeout(()=>{D.classList.remove("ring-2","ring-primary/60"),K(q=>{const T=new URLSearchParams(q);return T.delete("focus"),T})},1500);return()=>window.clearTimeout($)},[Z,L.length,K]);async function M(D){const{active:$,over:q}=D;if(!q||$.id===q.id||!(n!=null&&n.items))return;const T=n.items.findIndex(O=>O.id===$.id),z=n.items.findIndex(O=>O.id===q.id);if(T===-1||z===-1)return;const X=Kc(n.items,T,z);await NE(t,X.map(O=>O.id)),l()}if(o)return a.jsx(kt,{label:"Loading todos..."});if(i)return a.jsx(gt,{error:i});const I=(n==null?void 0:n.counts)||{open:0,in_progress:0,blocked:0,total:0};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]",children:[a.jsx(et,{label:"Open",value:I.open,icon:zn}),a.jsx(et,{label:"In Progress",value:I.in_progress,icon:zn,tone:"info"}),a.jsx(et,{label:"Blocked",value:I.blocked,icon:Ks,tone:"warn"}),a.jsx(et,{label:"Total",value:I.total,icon:zn})]}),a.jsx("div",{className:"surface-panel p-3",children:a.jsxs("div",{className:"flex gap-2",children:[a.jsx("input",{type:"text",placeholder:"Add a todo...",value:v,onChange:D=>b(D.target.value),onKeyDown:D=>D.key==="Enter"&&P(),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"}),a.jsxs("button",{onClick:P,disabled:!v.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:[a.jsx(Un,{className:"h-4 w-4"}),"Add"]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1 max-w-sm",children:[a.jsx(qs,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx("input",{ref:j,type:"text",placeholder:"Search...",value:c,onChange:D=>d(D.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"})]}),a.jsxs("select",{value:p,onChange:D=>m(D.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:[a.jsx("option",{value:"",children:"All statuses"}),a.jsx("option",{value:"open",children:"Open"}),a.jsx("option",{value:"in_progress",children:"In Progress"}),a.jsx("option",{value:"completed",children:"Completed"}),a.jsx("option",{value:"blocked",children:"Blocked"})]}),A.length>0&&a.jsxs("select",{value:h,onChange:D=>x(D.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:[a.jsx("option",{value:"",children:"All tags"}),A.map(D=>a.jsxs("option",{value:D,children:["#",D]},D))]})]}),L.length===0?a.jsx(tt,{title:"No todos",description:"Add your first todo above."}):a.jsx(O0,{sensors:R,collisionDetection:w0,onDragEnd:M,children:a.jsx(F0,{items:L.map(D=>D.id),strategy:_0,children:a.jsx("div",{className:"space-y-1",children:L.map((D,$)=>a.jsx(q_,{item:D,copiedId:N,onCycleStatus:_,onStatusChange:re,onCopyId:E,onDelete:Q,disabled:S,hotkeyRowProps:U($)},D.id))})})})]})}function G_(){return a.jsx(CN,{children:a.jsx(_P,{children:a.jsx(tN,{children:a.jsxs(Le,{element:a.jsx(UP,{}),children:[a.jsx(Le,{path:"/",element:a.jsx(XP,{})}),a.jsx(Le,{path:"/projects",element:a.jsx(ty,{})}),a.jsx(Le,{path:"/assignments",element:a.jsx(yv,{})}),a.jsx(Le,{path:"/assignments/new",element:a.jsx(kv,{})}),a.jsx(Le,{path:"/assignments/:id",element:a.jsx(g_,{})}),a.jsx(Le,{path:"/assignments/:id/edit",element:a.jsx(Tf,{})}),a.jsx(Le,{path:"/assignments/:id/plan/edit",element:a.jsx(Rf,{})}),a.jsx(Le,{path:"/assignments/:id/scratchpad/edit",element:a.jsx(Af,{})}),a.jsx(Le,{path:"/assignments/:id/handoff/edit",element:a.jsx(Df,{})}),a.jsx(Le,{path:"/assignments/:id/decision-record/edit",element:a.jsx(If,{})}),a.jsx(Le,{path:"/attention",element:a.jsx(QP,{})}),a.jsx(Le,{path:"/servers",element:a.jsx(Sv,{})}),a.jsx(Le,{path:"/agent-sessions",element:a.jsx(Nv,{})}),a.jsx(Le,{path:"/playbooks",element:a.jsx(__,{})}),a.jsx(Le,{path:"/playbooks/create",element:a.jsx($_,{})}),a.jsx(Le,{path:"/playbooks/:slug",element:a.jsx(M_,{})}),a.jsx(Le,{path:"/playbooks/:slug/edit",element:a.jsx(F_,{})}),a.jsx(Le,{path:"/todos",element:a.jsx(V_,{})}),a.jsx(Le,{path:"/help",element:a.jsx(ZP,{})}),a.jsx(Le,{path:"/settings",element:a.jsx(W_,{})}),a.jsx(Le,{path:"/create/project",element:a.jsx(bv,{})}),a.jsx(Le,{path:"/projects/:slug",element:a.jsx(nv,{})}),a.jsx(Le,{path:"/projects/:slug/edit",element:a.jsx(jv,{})}),a.jsx(Le,{path:"/projects/:slug/create/assignment",element:a.jsx(wv,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug",element:a.jsx(hv,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug/edit",element:a.jsx(Tf,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(Rf,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(Af,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(Df,{})}),a.jsx(Le,{path:"/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(If,{})}),a.jsx(Le,{path:"/w/:workspace/projects",element:a.jsx(ty,{})}),a.jsx(Le,{path:"/w/:workspace/assignments",element:a.jsx(yv,{})}),a.jsx(Le,{path:"/w/:workspace/assignments/new",element:a.jsx(kv,{})}),a.jsx(Le,{path:"/w/:workspace/servers",element:a.jsx(Sv,{})}),a.jsx(Le,{path:"/w/:workspace/agent-sessions",element:a.jsx(Nv,{})}),a.jsx(Le,{path:"/w/:workspace/todos",element:a.jsx(K_,{})}),a.jsx(Le,{path:"/w/:workspace/create/project",element:a.jsx(bv,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug",element:a.jsx(nv,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/edit",element:a.jsx(jv,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/create/assignment",element:a.jsx(wv,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug",element:a.jsx(hv,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/edit",element:a.jsx(Tf,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/plan/edit",element:a.jsx(Rf,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/scratchpad/edit",element:a.jsx(Af,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/handoff/edit",element:a.jsx(Df,{})}),a.jsx(Le,{path:"/w/:workspace/projects/:slug/assignments/:aslug/decision-record/edit",element:a.jsx(If,{})})]})})})})}aE();tS.createRoot(document.getElementById("root")).render(a.jsx(g.StrictMode,{children:a.jsx(lE,{children:a.jsx(G_,{})})}));export{zT as _,Y_ as a,jc as g};
|