claudecto 0.1.8 → 0.2.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.
|
@@ -0,0 +1,1628 @@
|
|
|
1
|
+
var B1=e=>{throw TypeError(e)};var Mp=(e,t,n)=>t.has(e)||B1("Cannot "+n);var H=(e,t,n)=>(Mp(e,t,"read from private field"),n?n.call(e):t.get(e)),Re=(e,t,n)=>t.has(e)?B1("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),je=(e,t,n,i)=>(Mp(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ge=(e,t,n)=>(Mp(e,t,"access private method"),n);var Ud=(e,t,n,i)=>({set _(l){je(e,t,l,n)},get _(){return H(e,t,i)}});function dT(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in e)){const c=Object.getOwnPropertyDescriptor(i,l);c&&Object.defineProperty(e,l,c.get?c:{enumerable:!0,get:()=>i[l]})}}}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 l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(l){if(l.ep)return;l.ep=!0;const c=n(l);fetch(l.href,c)}})();function If(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dp={exports:{}},Rc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var F1;function fT(){if(F1)return Rc;F1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:e,type:i,key:u,ref:l!==void 0?l:null,props:c}}return Rc.Fragment=t,Rc.jsx=n,Rc.jsxs=n,Rc}var H1;function mT(){return H1||(H1=1,Dp.exports=fT()),Dp.exports}var a=mT(),Op={exports:{}},Be={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var q1;function hT(){if(q1)return Be;q1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function w(U){return U===null||typeof U!="object"?null:(U=b&&U[b]||U["@@iterator"],typeof U=="function"?U:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,E={};function N(U,P,A){this.props=U,this.context=P,this.refs=E,this.updater=A||S}N.prototype.isReactComponent={},N.prototype.setState=function(U,P){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,P,"setState")},N.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function T(){}T.prototype=N.prototype;function k(U,P,A){this.props=U,this.context=P,this.refs=E,this.updater=A||S}var R=k.prototype=new T;R.constructor=k,j(R,N.prototype),R.isPureReactComponent=!0;var z=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function q(U,P,A){var J=A.ref;return{$$typeof:e,type:U,key:P,ref:J!==void 0?J:null,props:A}}function L(U,P){return q(U.type,P,U.props)}function ne(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function X(U){var P={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(A){return P[A]})}var ue=/\/+/g;function ie(U,P){return typeof U=="object"&&U!==null&&U.key!=null?X(""+U.key):P.toString(36)}function te(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(D,D):(U.status="pending",U.then(function(P){U.status==="pending"&&(U.status="fulfilled",U.value=P)},function(P){U.status==="pending"&&(U.status="rejected",U.reason=P)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function I(U,P,A,J,ae){var fe=typeof U;(fe==="undefined"||fe==="boolean")&&(U=null);var se=!1;if(U===null)se=!0;else switch(fe){case"bigint":case"string":case"number":se=!0;break;case"object":switch(U.$$typeof){case e:case t:se=!0;break;case g:return se=U._init,I(se(U._payload),P,A,J,ae)}}if(se)return ae=ae(U),se=J===""?"."+ie(U,0):J,z(ae)?(A="",se!=null&&(A=se.replace(ue,"$&/")+"/"),I(ae,P,A,"",function(Ae){return Ae})):ae!=null&&(ne(ae)&&(ae=L(ae,A+(ae.key==null||U&&U.key===ae.key?"":(""+ae.key).replace(ue,"$&/")+"/")+se)),P.push(ae)),1;se=0;var pe=J===""?".":J+":";if(z(U))for(var ve=0;ve<U.length;ve++)J=U[ve],fe=pe+ie(J,ve),se+=I(J,P,A,fe,ae);else if(ve=w(U),typeof ve=="function")for(U=ve.call(U),ve=0;!(J=U.next()).done;)J=J.value,fe=pe+ie(J,ve++),se+=I(J,P,A,fe,ae);else if(fe==="object"){if(typeof U.then=="function")return I(te(U),P,A,J,ae);throw P=String(U),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return se}function Q(U,P,A){if(U==null)return U;var J=[],ae=0;return I(U,J,"","",function(fe){return P.call(A,fe,ae++)}),J}function Y(U){if(U._status===-1){var P=U._result;P=P(),P.then(function(A){(U._status===0||U._status===-1)&&(U._status=1,U._result=A)},function(A){(U._status===0||U._status===-1)&&(U._status=2,U._result=A)}),U._status===-1&&(U._status=0,U._result=P)}if(U._status===1)return U._result.default;throw U._result}var $=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},_={map:Q,forEach:function(U,P,A){Q(U,function(){P.apply(this,arguments)},A)},count:function(U){var P=0;return Q(U,function(){P++}),P},toArray:function(U){return Q(U,function(P){return P})||[]},only:function(U){if(!ne(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Be.Activity=p,Be.Children=_,Be.Component=N,Be.Fragment=n,Be.Profiler=l,Be.PureComponent=k,Be.StrictMode=i,Be.Suspense=h,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Be.__COMPILER_RUNTIME={__proto__:null,c:function(U){return O.H.useMemoCache(U)}},Be.cache=function(U){return function(){return U.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(U,P,A){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var J=j({},U.props),ae=U.key;if(P!=null)for(fe in P.key!==void 0&&(ae=""+P.key),P)!B.call(P,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&P.ref===void 0||(J[fe]=P[fe]);var fe=arguments.length-2;if(fe===1)J.children=A;else if(1<fe){for(var se=Array(fe),pe=0;pe<fe;pe++)se[pe]=arguments[pe+2];J.children=se}return q(U.type,ae,J)},Be.createContext=function(U){return U={$$typeof:u,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:c,_context:U},U},Be.createElement=function(U,P,A){var J,ae={},fe=null;if(P!=null)for(J in P.key!==void 0&&(fe=""+P.key),P)B.call(P,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ae[J]=P[J]);var se=arguments.length-2;if(se===1)ae.children=A;else if(1<se){for(var pe=Array(se),ve=0;ve<se;ve++)pe[ve]=arguments[ve+2];ae.children=pe}if(U&&U.defaultProps)for(J in se=U.defaultProps,se)ae[J]===void 0&&(ae[J]=se[J]);return q(U,fe,ae)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(U){return{$$typeof:f,render:U}},Be.isValidElement=ne,Be.lazy=function(U){return{$$typeof:g,_payload:{_status:-1,_result:U},_init:Y}},Be.memo=function(U,P){return{$$typeof:m,type:U,compare:P===void 0?null:P}},Be.startTransition=function(U){var P=O.T,A={};O.T=A;try{var J=U(),ae=O.S;ae!==null&&ae(A,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(D,$)}catch(fe){$(fe)}finally{P!==null&&A.types!==null&&(P.types=A.types),O.T=P}},Be.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Be.use=function(U){return O.H.use(U)},Be.useActionState=function(U,P,A){return O.H.useActionState(U,P,A)},Be.useCallback=function(U,P){return O.H.useCallback(U,P)},Be.useContext=function(U){return O.H.useContext(U)},Be.useDebugValue=function(){},Be.useDeferredValue=function(U,P){return O.H.useDeferredValue(U,P)},Be.useEffect=function(U,P){return O.H.useEffect(U,P)},Be.useEffectEvent=function(U){return O.H.useEffectEvent(U)},Be.useId=function(){return O.H.useId()},Be.useImperativeHandle=function(U,P,A){return O.H.useImperativeHandle(U,P,A)},Be.useInsertionEffect=function(U,P){return O.H.useInsertionEffect(U,P)},Be.useLayoutEffect=function(U,P){return O.H.useLayoutEffect(U,P)},Be.useMemo=function(U,P){return O.H.useMemo(U,P)},Be.useOptimistic=function(U,P){return O.H.useOptimistic(U,P)},Be.useReducer=function(U,P,A){return O.H.useReducer(U,P,A)},Be.useRef=function(U){return O.H.useRef(U)},Be.useState=function(U){return O.H.useState(U)},Be.useSyncExternalStore=function(U,P,A){return O.H.useSyncExternalStore(U,P,A)},Be.useTransition=function(){return O.H.useTransition()},Be.version="19.2.4",Be}var V1;function Ex(){return V1||(V1=1,Op.exports=hT()),Op.exports}var y=Ex();const xe=If(y),Tx=dT({__proto__:null,default:xe},[y]);var _p={exports:{}},Mc={},Pp={exports:{}},zp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var $1;function pT(){return $1||($1=1,(function(e){function t(I,Q){var Y=I.length;I.push(Q);e:for(;0<Y;){var $=Y-1>>>1,_=I[$];if(0<l(_,Q))I[$]=Q,I[Y]=_,Y=$;else break e}}function n(I){return I.length===0?null:I[0]}function i(I){if(I.length===0)return null;var Q=I[0],Y=I.pop();if(Y!==Q){I[0]=Y;e:for(var $=0,_=I.length,U=_>>>1;$<U;){var P=2*($+1)-1,A=I[P],J=P+1,ae=I[J];if(0>l(A,Y))J<_&&0>l(ae,A)?(I[$]=ae,I[J]=Y,$=J):(I[$]=A,I[P]=Y,$=P);else if(J<_&&0>l(ae,Y))I[$]=ae,I[J]=Y,$=J;else break e}}return Q}function l(I,Q){var Y=I.sortIndex-Q.sortIndex;return Y!==0?Y:I.id-Q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],m=[],g=1,p=null,b=3,w=!1,S=!1,j=!1,E=!1,N=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function R(I){for(var Q=n(m);Q!==null;){if(Q.callback===null)i(m);else if(Q.startTime<=I)i(m),Q.sortIndex=Q.expirationTime,t(h,Q);else break;Q=n(m)}}function z(I){if(j=!1,R(I),!S)if(n(h)!==null)S=!0,D||(D=!0,X());else{var Q=n(m);Q!==null&&te(z,Q.startTime-I)}}var D=!1,O=-1,B=5,q=-1;function L(){return E?!0:!(e.unstable_now()-q<B)}function ne(){if(E=!1,D){var I=e.unstable_now();q=I;var Q=!0;try{e:{S=!1,j&&(j=!1,T(O),O=-1),w=!0;var Y=b;try{t:{for(R(I),p=n(h);p!==null&&!(p.expirationTime>I&&L());){var $=p.callback;if(typeof $=="function"){p.callback=null,b=p.priorityLevel;var _=$(p.expirationTime<=I);if(I=e.unstable_now(),typeof _=="function"){p.callback=_,R(I),Q=!0;break t}p===n(h)&&i(h),R(I)}else i(h);p=n(h)}if(p!==null)Q=!0;else{var U=n(m);U!==null&&te(z,U.startTime-I),Q=!1}}break e}finally{p=null,b=Y,w=!1}Q=void 0}}finally{Q?X():D=!1}}}var X;if(typeof k=="function")X=function(){k(ne)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ie=ue.port2;ue.port1.onmessage=ne,X=function(){ie.postMessage(null)}}else X=function(){N(ne,0)};function te(I,Q){O=N(function(){I(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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(I){switch(b){case 1:case 2:case 3:var Q=3;break;default:Q=b}var Y=b;b=Q;try{return I()}finally{b=Y}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,Q){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var Y=b;b=I;try{return Q()}finally{b=Y}},e.unstable_scheduleCallback=function(I,Q,Y){var $=e.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?$+Y:$):Y=$,I){case 1:var _=-1;break;case 2:_=250;break;case 5:_=1073741823;break;case 4:_=1e4;break;default:_=5e3}return _=Y+_,I={id:g++,callback:Q,priorityLevel:I,startTime:Y,expirationTime:_,sortIndex:-1},Y>$?(I.sortIndex=Y,t(m,I),n(h)===null&&I===n(m)&&(j?(T(O),O=-1):j=!0,te(z,Y-$))):(I.sortIndex=_,t(h,I),S||w||(S=!0,D||(D=!0,X()))),I},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(I){var Q=b;return function(){var Y=b;b=Q;try{return I.apply(this,arguments)}finally{b=Y}}}})(zp)),zp}var G1;function gT(){return G1||(G1=1,Pp.exports=pT()),Pp.exports}var Lp={exports:{}},vn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Y1;function xT(){if(Y1)return vn;Y1=1;var e=Ex();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},l=Symbol.for("react.portal");function c(h,m,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:p==null?null:""+p,children:h,containerInfo:m,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,vn.createPortal=function(h,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return c(h,m,null,g)},vn.flushSync=function(h){var m=u.T,g=i.p;try{if(u.T=null,i.p=2,h)return h()}finally{u.T=m,i.p=g,i.d.f()}},vn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(h,m))},vn.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},vn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?i.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:w}):g==="script"&&i.d.X(h,{crossOrigin:p,integrity:b,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},vn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=f(m.as,m.crossOrigin);i.d.M(h,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&i.d.M(h)},vn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,p=f(g,m.crossOrigin);i.d.L(h,g,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},vn.preloadModule=function(h,m){if(typeof h=="string")if(m){var g=f(m.as,m.crossOrigin);i.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else i.d.m(h)},vn.requestFormReset=function(h){i.d.r(h)},vn.unstable_batchedUpdates=function(h,m){return h(m)},vn.useFormState=function(h,m,g){return u.H.useFormState(h,m,g)},vn.useFormStatus=function(){return u.H.useHostTransitionStatus()},vn.version="19.2.4",vn}var K1;function xN(){if(K1)return Lp.exports;K1=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(),Lp.exports=xT(),Lp.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Q1;function yT(){if(Q1)return Mc;Q1=1;var e=gT(),t=Ex(),n=xN();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o])}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."}function l(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function c(r){var s=r,o=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(o=s.return),r=s.return;while(r)}return s.tag===3?o:null}function u(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 f(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function h(r){if(c(r)!==r)throw Error(i(188))}function m(r){var s=r.alternate;if(!s){if(s=c(r),s===null)throw Error(i(188));return s!==r?null:r}for(var o=r,d=s;;){var x=o.return;if(x===null)break;var v=x.alternate;if(v===null){if(d=x.return,d!==null){o=d;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===o)return h(x),r;if(v===d)return h(x),s;v=v.sibling}throw Error(i(188))}if(o.return!==d.return)o=x,d=v;else{for(var C=!1,M=x.child;M;){if(M===o){C=!0,o=x,d=v;break}if(M===d){C=!0,d=x,o=v;break}M=M.sibling}if(!C){for(M=v.child;M;){if(M===o){C=!0,o=v,d=x;break}if(M===d){C=!0,d=v,o=x;break}M=M.sibling}if(!C)throw Error(i(189))}}if(o.alternate!==d)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?r:s}function g(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=g(r),s!==null)return s;r=r.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function X(r){return r===null||typeof r!="object"?null:(r=ne&&r[ne]||r["@@iterator"],typeof r=="function"?r:null)}var ue=Symbol.for("react.client.reference");function ie(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===ue?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case j:return"Fragment";case N:return"Profiler";case E:return"StrictMode";case z:return"Suspense";case D:return"SuspenseList";case q:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case k:return r.displayName||"Context";case T:return(r._context.displayName||"Context")+".Consumer";case R:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case O:return s=r.displayName||null,s!==null?s:ie(r.type)||"Memo";case B:s=r._payload,r=r._init;try{return ie(r(s))}catch{}}return null}var te=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},$=[],_=-1;function U(r){return{current:r}}function P(r){0>_||(r.current=$[_],$[_]=null,_--)}function A(r,s){_++,$[_]=r.current,r.current=s}var J=U(null),ae=U(null),fe=U(null),se=U(null);function pe(r,s){switch(A(fe,s),A(ae,r),A(J,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?c1(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=c1(s),r=u1(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}P(J),A(J,r)}function ve(){P(J),P(ae),P(fe)}function Ae(r){r.memoizedState!==null&&A(se,r);var s=J.current,o=u1(s,r.type);s!==o&&(A(ae,r),A(J,o))}function ze(r){ae.current===r&&(P(J),P(ae)),se.current===r&&(P(se),kc._currentValue=Y)}var Le,It;function wt(r){if(Le===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);Le=s&&s[1]||"",It=-1<o.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Le+r+It}var On=!1;function kn(r,s){if(!r||On)return"";On=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(re){var ee=re}Reflect.construct(r,[],de)}else{try{de.call()}catch(re){ee=re}r.call(de.prototype)}}else{try{throw Error()}catch(re){ee=re}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(re){if(re&&ee&&typeof re.stack=="string")return[re.stack,ee.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=d.DetermineComponentFrameRoot(),C=v[0],M=v[1];if(C&&M){var F=C.split(`
|
|
44
|
+
`),Z=M.split(`
|
|
45
|
+
`);for(x=d=0;d<F.length&&!F[d].includes("DetermineComponentFrameRoot");)d++;for(;x<Z.length&&!Z[x].includes("DetermineComponentFrameRoot");)x++;if(d===F.length||x===Z.length)for(d=F.length-1,x=Z.length-1;1<=d&&0<=x&&F[d]!==Z[x];)x--;for(;1<=d&&0<=x;d--,x--)if(F[d]!==Z[x]){if(d!==1||x!==1)do if(d--,x--,0>x||F[d]!==Z[x]){var le=`
|
|
46
|
+
`+F[d].replace(" at new "," at ");return r.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",r.displayName)),le}while(1<=d&&0<=x);break}}}finally{On=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?wt(o):""}function pn(r,s){switch(r.tag){case 26:case 27:case 5:return wt(r.type);case 16:return wt("Lazy");case 13:return r.child!==s&&s!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return kn(r.type,!1);case 11:return kn(r.type.render,!1);case 1:return kn(r.type,!0);case 31:return wt("Activity");default:return""}}function ka(r){try{var s="",o=null;do s+=pn(r,o),o=r,r=r.return;while(r);return s}catch(d){return`
|
|
47
|
+
Error generating stack: `+d.message+`
|
|
48
|
+
`+d.stack}}var Ot=Object.prototype.hasOwnProperty,ls=e.unstable_scheduleCallback,ri=e.unstable_cancelCallback,en=e.unstable_shouldYield,ea=e.unstable_requestPaint,tn=e.unstable_now,Bo=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,qe=e.unstable_LowPriority,Ke=e.unstable_IdlePriority,gn=e.log,xn=e.unstable_setDisableYieldValue,nn=null,_t=null;function rn(r){if(typeof gn=="function"&&xn(r),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(nn,r)}catch{}}var ot=Math.clz32?Math.clz32:na,ta=Math.log,En=Math.LN2;function na(r){return r>>>=0,r===0?32:31-(ta(r)/En|0)|0}var tl=256,nl=262144,ai=4194304;function ra(r){var s=r&42;if(s!==0)return s;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Ie(r,s,o){var d=r.pendingLanes;if(d===0)return 0;var x=0,v=r.suspendedLanes,C=r.pingedLanes;r=r.warmLanes;var M=d&134217727;return M!==0?(d=M&~v,d!==0?x=ra(d):(C&=M,C!==0?x=ra(C):o||(o=M&~r,o!==0&&(x=ra(o))))):(M=d&~v,M!==0?x=ra(M):C!==0?x=ra(C):o||(o=d&~r,o!==0&&(x=ra(o)))),x===0?0:s!==0&&s!==x&&(s&v)===0&&(v=x&-x,o=s&-s,v>=o||v===32&&(o&4194048)!==0)?s:x}function jt(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Qt(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yn(){var r=ai;return ai<<=1,(ai&62914560)===0&&(ai=4194304),r}function os(r){for(var s=[],o=0;31>o;o++)s.push(r);return s}function kt(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function _n(r,s,o,d,x,v){var C=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var M=r.entanglements,F=r.expirationTimes,Z=r.hiddenUpdates;for(o=C&~o;0<o;){var le=31-ot(o),de=1<<le;M[le]=0,F[le]=-1;var ee=Z[le];if(ee!==null)for(Z[le]=null,le=0;le<ee.length;le++){var re=ee[le];re!==null&&(re.lane&=-536870913)}o&=~de}d!==0&&si(r,d,0),v!==0&&x===0&&r.tag!==0&&(r.suspendedLanes|=v&~(C&~s))}function si(r,s,o){r.pendingLanes|=s,r.suspendedLanes&=~s;var d=31-ot(s);r.entangledLanes|=s,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function Pn(r,s){var o=r.entangledLanes|=s;for(r=r.entanglements;o;){var d=31-ot(o),x=1<<d;x&s|r[d]&s&&(r[d]|=s),o&=~x}}function zn(r,s){var o=s&-s;return o=(o&42)!==0?1:rl(o),(o&(r.suspendedLanes|s))!==0?0:o}function rl(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Ir(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function wm(){var r=Q.p;return r!==0?r:(r=window.event,r===void 0?32:O1(r.type))}function Qy(r,s){var o=Q.p;try{return Q.p=r,s()}finally{Q.p=o}}var cs=Math.random().toString(36).slice(2),an="__reactFiber$"+cs,Ln="__reactProps$"+cs,al="__reactContainer$"+cs,jm="__reactEvents$"+cs,eE="__reactListeners$"+cs,tE="__reactHandles$"+cs,Xy="__reactResources$"+cs,Fo="__reactMarker$"+cs;function Nm(r){delete r[an],delete r[Ln],delete r[jm],delete r[eE],delete r[tE]}function sl(r){var s=r[an];if(s)return s;for(var o=r.parentNode;o;){if(s=o[al]||o[an]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(r=x1(r);r!==null;){if(o=r[an])return o;r=x1(r)}return s}r=o,o=r.parentNode}return null}function il(r){if(r=r[an]||r[al]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function Ho(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function ll(r){var s=r[Xy];return s||(s=r[Xy]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Xt(r){r[Fo]=!0}var Wy=new Set,Zy={};function ii(r,s){ol(r,s),ol(r+"Capture",s)}function ol(r,s){for(Zy[r]=s,r=0;r<s.length;r++)Wy.add(s[r])}var nE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jy={},ev={};function rE(r){return Ot.call(ev,r)?!0:Ot.call(Jy,r)?!1:nE.test(r)?ev[r]=!0:(Jy[r]=!0,!1)}function Eu(r,s,o){if(rE(s))if(o===null)r.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+o)}}function Tu(r,s,o){if(o===null)r.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+o)}}function Ea(r,s,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(s,o,""+d)}}function yr(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function tv(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function aE(r,s,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,v=d.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return x.call(this)},set:function(C){o=""+C,v.call(this,C)}}),Object.defineProperty(r,s,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(C){o=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Sm(r){if(!r._valueTracker){var s=tv(r)?"checked":"value";r._valueTracker=aE(r,s,""+r[s])}}function nv(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var o=s.getValue(),d="";return r&&(d=tv(r)?r.checked?"true":"false":r.value),r=d,r!==o?(s.setValue(r),!0):!1}function Au(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}}var sE=/[\n"\\]/g;function vr(r){return r.replace(sE,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Cm(r,s,o,d,x,v,C,M){r.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?r.type=C:r.removeAttribute("type"),s!=null?C==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+yr(s)):r.value!==""+yr(s)&&(r.value=""+yr(s)):C!=="submit"&&C!=="reset"||r.removeAttribute("value"),s!=null?km(r,C,yr(s)):o!=null?km(r,C,yr(o)):d!=null&&r.removeAttribute("value"),x==null&&v!=null&&(r.defaultChecked=!!v),x!=null&&(r.checked=x&&typeof x!="function"&&typeof x!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?r.name=""+yr(M):r.removeAttribute("name")}function rv(r,s,o,d,x,v,C,M){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(r.type=v),s!=null||o!=null){if(!(v!=="submit"&&v!=="reset"||s!=null)){Sm(r);return}o=o!=null?""+yr(o):"",s=s!=null?""+yr(s):o,M||s===r.value||(r.value=s),r.defaultValue=s}d=d??x,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=M?r.checked:!!d,r.defaultChecked=!!d,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(r.name=C),Sm(r)}function km(r,s,o){s==="number"&&Au(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function cl(r,s,o,d){if(r=r.options,s){s={};for(var x=0;x<o.length;x++)s["$"+o[x]]=!0;for(o=0;o<r.length;o++)x=s.hasOwnProperty("$"+r[o].value),r[o].selected!==x&&(r[o].selected=x),x&&d&&(r[o].defaultSelected=!0)}else{for(o=""+yr(o),s=null,x=0;x<r.length;x++){if(r[x].value===o){r[x].selected=!0,d&&(r[x].defaultSelected=!0);return}s!==null||r[x].disabled||(s=r[x])}s!==null&&(s.selected=!0)}}function av(r,s,o){if(s!=null&&(s=""+yr(s),s!==r.value&&(r.value=s),o==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=o!=null?""+yr(o):""}function sv(r,s,o,d){if(s==null){if(d!=null){if(o!=null)throw Error(i(92));if(te(d)){if(1<d.length)throw Error(i(93));d=d[0]}o=d}o==null&&(o=""),s=o}o=yr(s),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),Sm(r)}function ul(r,s){if(s){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=s;return}}r.textContent=s}var iE=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function iv(r,s,o){var d=s.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":d?r.setProperty(s,o):typeof o!="number"||o===0||iE.has(s)?s==="float"?r.cssFloat=o:r[s]=(""+o).trim():r[s]=o+"px"}function lv(r,s,o){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var x in s)d=s[x],s.hasOwnProperty(x)&&o[x]!==d&&iv(r,x,d)}else for(var v in s)s.hasOwnProperty(v)&&iv(r,v,s[v])}function Em(r){if(r.indexOf("-")===-1)return!1;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 lE=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),oE=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ru(r){return oE.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Ta(){}var Tm=null;function Am(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var dl=null,fl=null;function ov(r){var s=il(r);if(s&&(r=s.stateNode)){var o=r[Ln]||null;e:switch(r=s.stateNode,s.type){case"input":if(Cm(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),s=o.name,o.type==="radio"&&s!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+vr(""+s)+'"][type="radio"]'),s=0;s<o.length;s++){var d=o[s];if(d!==r&&d.form===r.form){var x=d[Ln]||null;if(!x)throw Error(i(90));Cm(d,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<o.length;s++)d=o[s],d.form===r.form&&nv(d)}break e;case"textarea":av(r,o.value,o.defaultValue);break e;case"select":s=o.value,s!=null&&cl(r,!!o.multiple,s,!1)}}}var Rm=!1;function cv(r,s,o){if(Rm)return r(s,o);Rm=!0;try{var d=r(s);return d}finally{if(Rm=!1,(dl!==null||fl!==null)&&(xd(),dl&&(s=dl,r=fl,fl=dl=null,ov(s),r)))for(s=0;s<r.length;s++)ov(r[s])}}function qo(r,s){var o=r.stateNode;if(o===null)return null;var d=o[Ln]||null;if(d===null)return null;o=d[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":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(i(231,s,typeof o));return o}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mm=!1;if(Aa)try{var Vo={};Object.defineProperty(Vo,"passive",{get:function(){Mm=!0}}),window.addEventListener("test",Vo,Vo),window.removeEventListener("test",Vo,Vo)}catch{Mm=!1}var us=null,Dm=null,Mu=null;function uv(){if(Mu)return Mu;var r,s=Dm,o=s.length,d,x="value"in us?us.value:us.textContent,v=x.length;for(r=0;r<o&&s[r]===x[r];r++);var C=o-r;for(d=1;d<=C&&s[o-d]===x[v-d];d++);return Mu=x.slice(r,1<d?1-d:void 0)}function Du(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 Ou(){return!0}function dv(){return!1}function In(r){function s(o,d,x,v,C){this._reactName=o,this._targetInst=x,this.type=d,this.nativeEvent=v,this.target=C,this.currentTarget=null;for(var M in r)r.hasOwnProperty(M)&&(o=r[M],this[M]=o?o(v):v[M]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Ou:dv,this.isPropagationStopped=dv,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Ou)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ou)},persist:function(){},isPersistent:Ou}),s}var li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_u=In(li),$o=p({},li,{view:0,detail:0}),cE=In($o),Om,_m,Go,Pu=p({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zm,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!==Go&&(Go&&r.type==="mousemove"?(Om=r.screenX-Go.screenX,_m=r.screenY-Go.screenY):_m=Om=0,Go=r),Om)},movementY:function(r){return"movementY"in r?r.movementY:_m}}),fv=In(Pu),uE=p({},Pu,{dataTransfer:0}),dE=In(uE),fE=p({},$o,{relatedTarget:0}),Pm=In(fE),mE=p({},li,{animationName:0,elapsedTime:0,pseudoElement:0}),hE=In(mE),pE=p({},li,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),gE=In(pE),xE=p({},li,{data:0}),mv=In(xE),yE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vE={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"},bE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wE(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=bE[r])?!!s[r]:!1}function zm(){return wE}var jE=p({},$o,{key:function(r){if(r.key){var s=yE[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Du(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?vE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zm,charCode:function(r){return r.type==="keypress"?Du(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Du(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),NE=In(jE),SE=p({},Pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hv=In(SE),CE=p({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zm}),kE=In(CE),EE=p({},li,{propertyName:0,elapsedTime:0,pseudoElement:0}),TE=In(EE),AE=p({},Pu,{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}),RE=In(AE),ME=p({},li,{newState:0,oldState:0}),DE=In(ME),OE=[9,13,27,32],Lm=Aa&&"CompositionEvent"in window,Yo=null;Aa&&"documentMode"in document&&(Yo=document.documentMode);var _E=Aa&&"TextEvent"in window&&!Yo,pv=Aa&&(!Lm||Yo&&8<Yo&&11>=Yo),gv=" ",xv=!1;function yv(r,s){switch(r){case"keyup":return OE.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ml=!1;function PE(r,s){switch(r){case"compositionend":return vv(s);case"keypress":return s.which!==32?null:(xv=!0,gv);case"textInput":return r=s.data,r===gv&&xv?null:r;default:return null}}function zE(r,s){if(ml)return r==="compositionend"||!Lm&&yv(r,s)?(r=uv(),Mu=Dm=us=null,ml=!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 pv&&s.locale!=="ko"?null:s.data;default:return null}}var LE={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 bv(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!LE[r.type]:s==="textarea"}function wv(r,s,o,d){dl?fl?fl.push(d):fl=[d]:dl=d,s=Sd(s,"onChange"),0<s.length&&(o=new _u("onChange","change",null,o,d),r.push({event:o,listeners:s}))}var Ko=null,Qo=null;function IE(r){r1(r,0)}function zu(r){var s=Ho(r);if(nv(s))return r}function jv(r,s){if(r==="change")return s}var Nv=!1;if(Aa){var Im;if(Aa){var Um="oninput"in document;if(!Um){var Sv=document.createElement("div");Sv.setAttribute("oninput","return;"),Um=typeof Sv.oninput=="function"}Im=Um}else Im=!1;Nv=Im&&(!document.documentMode||9<document.documentMode)}function Cv(){Ko&&(Ko.detachEvent("onpropertychange",kv),Qo=Ko=null)}function kv(r){if(r.propertyName==="value"&&zu(Qo)){var s=[];wv(s,Qo,r,Am(r)),cv(IE,s)}}function UE(r,s,o){r==="focusin"?(Cv(),Ko=s,Qo=o,Ko.attachEvent("onpropertychange",kv)):r==="focusout"&&Cv()}function BE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return zu(Qo)}function FE(r,s){if(r==="click")return zu(s)}function HE(r,s){if(r==="input"||r==="change")return zu(s)}function qE(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var er=typeof Object.is=="function"?Object.is:qE;function Xo(r,s){if(er(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var o=Object.keys(r),d=Object.keys(s);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var x=o[d];if(!Ot.call(s,x)||!er(r[x],s[x]))return!1}return!0}function Ev(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Tv(r,s){var o=Ev(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=s&&d>=s)return{node:o,offset:s-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Ev(o)}}function Av(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Av(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function Rv(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Au(r.document);s instanceof r.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)r=s.contentWindow;else break;s=Au(r.document)}return s}function Bm(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")}var VE=Aa&&"documentMode"in document&&11>=document.documentMode,hl=null,Fm=null,Wo=null,Hm=!1;function Mv(r,s,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Hm||hl==null||hl!==Au(d)||(d=hl,"selectionStart"in d&&Bm(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Wo&&Xo(Wo,d)||(Wo=d,d=Sd(Fm,"onSelect"),0<d.length&&(s=new _u("onSelect","select",null,s,o),r.push({event:s,listeners:d}),s.target=hl)))}function oi(r,s){var o={};return o[r.toLowerCase()]=s.toLowerCase(),o["Webkit"+r]="webkit"+s,o["Moz"+r]="moz"+s,o}var pl={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},qm={},Dv={};Aa&&(Dv=document.createElement("div").style,"AnimationEvent"in window||(delete pl.animationend.animation,delete pl.animationiteration.animation,delete pl.animationstart.animation),"TransitionEvent"in window||delete pl.transitionend.transition);function ci(r){if(qm[r])return qm[r];if(!pl[r])return r;var s=pl[r],o;for(o in s)if(s.hasOwnProperty(o)&&o in Dv)return qm[r]=s[o];return r}var Ov=ci("animationend"),_v=ci("animationiteration"),Pv=ci("animationstart"),$E=ci("transitionrun"),GE=ci("transitionstart"),YE=ci("transitioncancel"),zv=ci("transitionend"),Lv=new Map,Vm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vm.push("scrollEnd");function Ur(r,s){Lv.set(r,s),ii(s,[r])}var Lu=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},br=[],gl=0,$m=0;function Iu(){for(var r=gl,s=$m=gl=0;s<r;){var o=br[s];br[s++]=null;var d=br[s];br[s++]=null;var x=br[s];br[s++]=null;var v=br[s];if(br[s++]=null,d!==null&&x!==null){var C=d.pending;C===null?x.next=x:(x.next=C.next,C.next=x),d.pending=x}v!==0&&Iv(o,x,v)}}function Uu(r,s,o,d){br[gl++]=r,br[gl++]=s,br[gl++]=o,br[gl++]=d,$m|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Gm(r,s,o,d){return Uu(r,s,o,d),Bu(r)}function ui(r,s){return Uu(r,null,null,s),Bu(r)}function Iv(r,s,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var x=!1,v=r.return;v!==null;)v.childLanes|=o,d=v.alternate,d!==null&&(d.childLanes|=o),v.tag===22&&(r=v.stateNode,r===null||r._visibility&1||(x=!0)),r=v,v=v.return;return r.tag===3?(v=r.stateNode,x&&s!==null&&(x=31-ot(o),r=v.hiddenUpdates,d=r[x],d===null?r[x]=[s]:d.push(s),s.lane=o|536870912),v):null}function Bu(r){if(50<vc)throw vc=0,tp=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var xl={};function KE(r,s,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(r,s,o,d){return new KE(r,s,o,d)}function Ym(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Ra(r,s){var o=r.alternate;return o===null?(o=tr(r.tag,s,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=s,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,s=r.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function Uv(r,s){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,s=o.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function Fu(r,s,o,d,x,v){var C=0;if(d=r,typeof r=="function")Ym(r)&&(C=1);else if(typeof r=="string")C=J4(r,o,J.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case q:return r=tr(31,o,s,x),r.elementType=q,r.lanes=v,r;case j:return di(o.children,x,v,s);case E:C=8,x|=24;break;case N:return r=tr(12,o,s,x|2),r.elementType=N,r.lanes=v,r;case z:return r=tr(13,o,s,x),r.elementType=z,r.lanes=v,r;case D:return r=tr(19,o,s,x),r.elementType=D,r.lanes=v,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case k:C=10;break e;case T:C=9;break e;case R:C=11;break e;case O:C=14;break e;case B:C=16,d=null;break e}C=29,o=Error(i(130,r===null?"null":typeof r,"")),d=null}return s=tr(C,o,s,x),s.elementType=r,s.type=d,s.lanes=v,s}function di(r,s,o,d){return r=tr(7,r,d,s),r.lanes=o,r}function Km(r,s,o){return r=tr(6,r,null,s),r.lanes=o,r}function Bv(r){var s=tr(18,null,null,0);return s.stateNode=r,s}function Qm(r,s,o){return s=tr(4,r.children!==null?r.children:[],r.key,s),s.lanes=o,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var Fv=new WeakMap;function wr(r,s){if(typeof r=="object"&&r!==null){var o=Fv.get(r);return o!==void 0?o:(s={value:r,source:s,stack:ka(s)},Fv.set(r,s),s)}return{value:r,source:s,stack:ka(s)}}var yl=[],vl=0,Hu=null,Zo=0,jr=[],Nr=0,ds=null,aa=1,sa="";function Ma(r,s){yl[vl++]=Zo,yl[vl++]=Hu,Hu=r,Zo=s}function Hv(r,s,o){jr[Nr++]=aa,jr[Nr++]=sa,jr[Nr++]=ds,ds=r;var d=aa;r=sa;var x=32-ot(d)-1;d&=~(1<<x),o+=1;var v=32-ot(s)+x;if(30<v){var C=x-x%5;v=(d&(1<<C)-1).toString(32),d>>=C,x-=C,aa=1<<32-ot(s)+x|o<<x|d,sa=v+r}else aa=1<<v|o<<x|d,sa=r}function Xm(r){r.return!==null&&(Ma(r,1),Hv(r,1,0))}function Wm(r){for(;r===Hu;)Hu=yl[--vl],yl[vl]=null,Zo=yl[--vl],yl[vl]=null;for(;r===ds;)ds=jr[--Nr],jr[Nr]=null,sa=jr[--Nr],jr[Nr]=null,aa=jr[--Nr],jr[Nr]=null}function qv(r,s){jr[Nr++]=aa,jr[Nr++]=sa,jr[Nr++]=ds,aa=s.id,sa=s.overflow,ds=r}var sn=null,vt=null,tt=!1,fs=null,Sr=!1,Zm=Error(i(519));function ms(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jo(wr(s,r)),Zm}function Vv(r){var s=r.stateNode,o=r.type,d=r.memoizedProps;switch(s[an]=r,s[Ln]=d,o){case"dialog":Xe("cancel",s),Xe("close",s);break;case"iframe":case"object":case"embed":Xe("load",s);break;case"video":case"audio":for(o=0;o<wc.length;o++)Xe(wc[o],s);break;case"source":Xe("error",s);break;case"img":case"image":case"link":Xe("error",s),Xe("load",s);break;case"details":Xe("toggle",s);break;case"input":Xe("invalid",s),rv(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Xe("invalid",s);break;case"textarea":Xe("invalid",s),sv(s,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||s.textContent===""+o||d.suppressHydrationWarning===!0||l1(s.textContent,o)?(d.popover!=null&&(Xe("beforetoggle",s),Xe("toggle",s)),d.onScroll!=null&&Xe("scroll",s),d.onScrollEnd!=null&&Xe("scrollend",s),d.onClick!=null&&(s.onclick=Ta),s=!0):s=!1,s||ms(r,!0)}function $v(r){for(sn=r.return;sn;)switch(sn.tag){case 5:case 31:case 13:Sr=!1;return;case 27:case 3:Sr=!0;return;default:sn=sn.return}}function bl(r){if(r!==sn)return!1;if(!tt)return $v(r),tt=!0,!1;var s=r.tag,o;if((o=s!==3&&s!==27)&&((o=s===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||gp(r.type,r.memoizedProps)),o=!o),o&&vt&&ms(r),$v(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));vt=g1(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));vt=g1(r)}else s===27?(s=vt,Es(r.type)?(r=wp,wp=null,vt=r):vt=s):vt=sn?kr(r.stateNode.nextSibling):null;return!0}function fi(){vt=sn=null,tt=!1}function Jm(){var r=fs;return r!==null&&(Hn===null?Hn=r:Hn.push.apply(Hn,r),fs=null),r}function Jo(r){fs===null?fs=[r]:fs.push(r)}var eh=U(null),mi=null,Da=null;function hs(r,s,o){A(eh,s._currentValue),s._currentValue=o}function Oa(r){r._currentValue=eh.current,P(eh)}function th(r,s,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===o)break;r=r.return}}function nh(r,s,o,d){var x=r.child;for(x!==null&&(x.return=r);x!==null;){var v=x.dependencies;if(v!==null){var C=x.child;v=v.firstContext;e:for(;v!==null;){var M=v;v=x;for(var F=0;F<s.length;F++)if(M.context===s[F]){v.lanes|=o,M=v.alternate,M!==null&&(M.lanes|=o),th(v.return,o,r),d||(C=null);break e}v=M.next}}else if(x.tag===18){if(C=x.return,C===null)throw Error(i(341));C.lanes|=o,v=C.alternate,v!==null&&(v.lanes|=o),th(C,o,r),C=null}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===r){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}}function wl(r,s,o,d){r=null;for(var x=s,v=!1;x!==null;){if(!v){if((x.flags&524288)!==0)v=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var C=x.alternate;if(C===null)throw Error(i(387));if(C=C.memoizedProps,C!==null){var M=x.type;er(x.pendingProps.value,C.value)||(r!==null?r.push(M):r=[M])}}else if(x===se.current){if(C=x.alternate,C===null)throw Error(i(387));C.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(r!==null?r.push(kc):r=[kc])}x=x.return}r!==null&&nh(s,r,o,d),s.flags|=262144}function qu(r){for(r=r.firstContext;r!==null;){if(!er(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function hi(r){mi=r,Da=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function ln(r){return Gv(mi,r)}function Vu(r,s){return mi===null&&hi(r),Gv(r,s)}function Gv(r,s){var o=s._currentValue;if(s={context:s,memoizedValue:o,next:null},Da===null){if(r===null)throw Error(i(308));Da=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else Da=Da.next=s;return o}var QE=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){s.aborted=!0,r.forEach(function(o){return o()})}},XE=e.unstable_scheduleCallback,WE=e.unstable_NormalPriority,Ut={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rh(){return{controller:new QE,data:new Map,refCount:0}}function ec(r){r.refCount--,r.refCount===0&&XE(WE,function(){r.controller.abort()})}var tc=null,ah=0,jl=0,Nl=null;function ZE(r,s){if(tc===null){var o=tc=[];ah=0,jl=lp(),Nl={status:"pending",value:void 0,then:function(d){o.push(d)}}}return ah++,s.then(Yv,Yv),s}function Yv(){if(--ah===0&&tc!==null){Nl!==null&&(Nl.status="fulfilled");var r=tc;tc=null,jl=0,Nl=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function JE(r,s){var o=[],d={status:"pending",value:null,reason:null,then:function(x){o.push(x)}};return r.then(function(){d.status="fulfilled",d.value=s;for(var x=0;x<o.length;x++)(0,o[x])(s)},function(x){for(d.status="rejected",d.reason=x,x=0;x<o.length;x++)(0,o[x])(void 0)}),d}var Kv=I.S;I.S=function(r,s){Mb=tn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&ZE(r,s),Kv!==null&&Kv(r,s)};var pi=U(null);function sh(){var r=pi.current;return r!==null?r:gt.pooledCache}function $u(r,s){s===null?A(pi,pi.current):A(pi,s.pool)}function Qv(){var r=sh();return r===null?null:{parent:Ut._currentValue,pool:r}}var Sl=Error(i(460)),ih=Error(i(474)),Gu=Error(i(542)),Yu={then:function(){}};function Xv(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Wv(r,s,o){switch(o=r[o],o===void 0?r.push(s):o!==s&&(s.then(Ta,Ta),s=o),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Jv(r),r;default:if(typeof s.status=="string")s.then(Ta,Ta);else{if(r=gt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(d){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=d}},function(d){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Jv(r),r}throw xi=s,Sl}}function gi(r){try{var s=r._init;return s(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(xi=o,Sl):o}}var xi=null;function Zv(){if(xi===null)throw Error(i(459));var r=xi;return xi=null,r}function Jv(r){if(r===Sl||r===Gu)throw Error(i(483))}var Cl=null,nc=0;function Ku(r){var s=nc;return nc+=1,Cl===null&&(Cl=[]),Wv(Cl,r,s)}function rc(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function Qu(r,s){throw s.$$typeof===b?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function e0(r){function s(K,V){if(r){var W=K.deletions;W===null?(K.deletions=[V],K.flags|=16):W.push(V)}}function o(K,V){if(!r)return null;for(;V!==null;)s(K,V),V=V.sibling;return null}function d(K){for(var V=new Map;K!==null;)K.key!==null?V.set(K.key,K):V.set(K.index,K),K=K.sibling;return V}function x(K,V){return K=Ra(K,V),K.index=0,K.sibling=null,K}function v(K,V,W){return K.index=W,r?(W=K.alternate,W!==null?(W=W.index,W<V?(K.flags|=67108866,V):W):(K.flags|=67108866,V)):(K.flags|=1048576,V)}function C(K){return r&&K.alternate===null&&(K.flags|=67108866),K}function M(K,V,W,ce){return V===null||V.tag!==6?(V=Km(W,K.mode,ce),V.return=K,V):(V=x(V,W),V.return=K,V)}function F(K,V,W,ce){var Me=W.type;return Me===j?le(K,V,W.props.children,ce,W.key):V!==null&&(V.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===B&&gi(Me)===V.type)?(V=x(V,W.props),rc(V,W),V.return=K,V):(V=Fu(W.type,W.key,W.props,null,K.mode,ce),rc(V,W),V.return=K,V)}function Z(K,V,W,ce){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=Qm(W,K.mode,ce),V.return=K,V):(V=x(V,W.children||[]),V.return=K,V)}function le(K,V,W,ce,Me){return V===null||V.tag!==7?(V=di(W,K.mode,ce,Me),V.return=K,V):(V=x(V,W),V.return=K,V)}function de(K,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Km(""+V,K.mode,W),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return W=Fu(V.type,V.key,V.props,null,K.mode,W),rc(W,V),W.return=K,W;case S:return V=Qm(V,K.mode,W),V.return=K,V;case B:return V=gi(V),de(K,V,W)}if(te(V)||X(V))return V=di(V,K.mode,W,null),V.return=K,V;if(typeof V.then=="function")return de(K,Ku(V),W);if(V.$$typeof===k)return de(K,Vu(K,V),W);Qu(K,V)}return null}function ee(K,V,W,ce){var Me=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Me!==null?null:M(K,V,""+W,ce);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case w:return W.key===Me?F(K,V,W,ce):null;case S:return W.key===Me?Z(K,V,W,ce):null;case B:return W=gi(W),ee(K,V,W,ce)}if(te(W)||X(W))return Me!==null?null:le(K,V,W,ce,null);if(typeof W.then=="function")return ee(K,V,Ku(W),ce);if(W.$$typeof===k)return ee(K,V,Vu(K,W),ce);Qu(K,W)}return null}function re(K,V,W,ce,Me){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return K=K.get(W)||null,M(V,K,""+ce,Me);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case w:return K=K.get(ce.key===null?W:ce.key)||null,F(V,K,ce,Me);case S:return K=K.get(ce.key===null?W:ce.key)||null,Z(V,K,ce,Me);case B:return ce=gi(ce),re(K,V,W,ce,Me)}if(te(ce)||X(ce))return K=K.get(W)||null,le(V,K,ce,Me,null);if(typeof ce.then=="function")return re(K,V,W,Ku(ce),Me);if(ce.$$typeof===k)return re(K,V,W,Vu(V,ce),Me);Qu(V,ce)}return null}function Se(K,V,W,ce){for(var Me=null,st=null,Ee=V,Ve=V=0,et=null;Ee!==null&&Ve<W.length;Ve++){Ee.index>Ve?(et=Ee,Ee=null):et=Ee.sibling;var it=ee(K,Ee,W[Ve],ce);if(it===null){Ee===null&&(Ee=et);break}r&&Ee&&it.alternate===null&&s(K,Ee),V=v(it,V,Ve),st===null?Me=it:st.sibling=it,st=it,Ee=et}if(Ve===W.length)return o(K,Ee),tt&&Ma(K,Ve),Me;if(Ee===null){for(;Ve<W.length;Ve++)Ee=de(K,W[Ve],ce),Ee!==null&&(V=v(Ee,V,Ve),st===null?Me=Ee:st.sibling=Ee,st=Ee);return tt&&Ma(K,Ve),Me}for(Ee=d(Ee);Ve<W.length;Ve++)et=re(Ee,K,Ve,W[Ve],ce),et!==null&&(r&&et.alternate!==null&&Ee.delete(et.key===null?Ve:et.key),V=v(et,V,Ve),st===null?Me=et:st.sibling=et,st=et);return r&&Ee.forEach(function(Ds){return s(K,Ds)}),tt&&Ma(K,Ve),Me}function _e(K,V,W,ce){if(W==null)throw Error(i(151));for(var Me=null,st=null,Ee=V,Ve=V=0,et=null,it=W.next();Ee!==null&&!it.done;Ve++,it=W.next()){Ee.index>Ve?(et=Ee,Ee=null):et=Ee.sibling;var Ds=ee(K,Ee,it.value,ce);if(Ds===null){Ee===null&&(Ee=et);break}r&&Ee&&Ds.alternate===null&&s(K,Ee),V=v(Ds,V,Ve),st===null?Me=Ds:st.sibling=Ds,st=Ds,Ee=et}if(it.done)return o(K,Ee),tt&&Ma(K,Ve),Me;if(Ee===null){for(;!it.done;Ve++,it=W.next())it=de(K,it.value,ce),it!==null&&(V=v(it,V,Ve),st===null?Me=it:st.sibling=it,st=it);return tt&&Ma(K,Ve),Me}for(Ee=d(Ee);!it.done;Ve++,it=W.next())it=re(Ee,K,Ve,it.value,ce),it!==null&&(r&&it.alternate!==null&&Ee.delete(it.key===null?Ve:it.key),V=v(it,V,Ve),st===null?Me=it:st.sibling=it,st=it);return r&&Ee.forEach(function(uT){return s(K,uT)}),tt&&Ma(K,Ve),Me}function ht(K,V,W,ce){if(typeof W=="object"&&W!==null&&W.type===j&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case w:e:{for(var Me=W.key;V!==null;){if(V.key===Me){if(Me=W.type,Me===j){if(V.tag===7){o(K,V.sibling),ce=x(V,W.props.children),ce.return=K,K=ce;break e}}else if(V.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===B&&gi(Me)===V.type){o(K,V.sibling),ce=x(V,W.props),rc(ce,W),ce.return=K,K=ce;break e}o(K,V);break}else s(K,V);V=V.sibling}W.type===j?(ce=di(W.props.children,K.mode,ce,W.key),ce.return=K,K=ce):(ce=Fu(W.type,W.key,W.props,null,K.mode,ce),rc(ce,W),ce.return=K,K=ce)}return C(K);case S:e:{for(Me=W.key;V!==null;){if(V.key===Me)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){o(K,V.sibling),ce=x(V,W.children||[]),ce.return=K,K=ce;break e}else{o(K,V);break}else s(K,V);V=V.sibling}ce=Qm(W,K.mode,ce),ce.return=K,K=ce}return C(K);case B:return W=gi(W),ht(K,V,W,ce)}if(te(W))return Se(K,V,W,ce);if(X(W)){if(Me=X(W),typeof Me!="function")throw Error(i(150));return W=Me.call(W),_e(K,V,W,ce)}if(typeof W.then=="function")return ht(K,V,Ku(W),ce);if(W.$$typeof===k)return ht(K,V,Vu(K,W),ce);Qu(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(o(K,V.sibling),ce=x(V,W),ce.return=K,K=ce):(o(K,V),ce=Km(W,K.mode,ce),ce.return=K,K=ce),C(K)):o(K,V)}return function(K,V,W,ce){try{nc=0;var Me=ht(K,V,W,ce);return Cl=null,Me}catch(Ee){if(Ee===Sl||Ee===Gu)throw Ee;var st=tr(29,Ee,null,K.mode);return st.lanes=ce,st.return=K,st}finally{}}}var yi=e0(!0),t0=e0(!1),ps=!1;function lh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function gs(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function xs(r,s,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(lt&2)!==0){var x=d.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),d.pending=s,s=Bu(r),Iv(r,null,o),s}return Uu(r,d,s,o),Bu(r)}function ac(r,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194048)!==0)){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,Pn(r,o)}}function ch(r,s){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var x=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};v===null?x=v=C:v=v.next=C,o=o.next}while(o!==null);v===null?x=v=s:v=v.next=s}else x=v=s;o={baseState:d.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=s:r.next=s,o.lastBaseUpdate=s}var uh=!1;function sc(){if(uh){var r=Nl;if(r!==null)throw r}}function ic(r,s,o,d){uh=!1;var x=r.updateQueue;ps=!1;var v=x.firstBaseUpdate,C=x.lastBaseUpdate,M=x.shared.pending;if(M!==null){x.shared.pending=null;var F=M,Z=F.next;F.next=null,C===null?v=Z:C.next=Z,C=F;var le=r.alternate;le!==null&&(le=le.updateQueue,M=le.lastBaseUpdate,M!==C&&(M===null?le.firstBaseUpdate=Z:M.next=Z,le.lastBaseUpdate=F))}if(v!==null){var de=x.baseState;C=0,le=Z=F=null,M=v;do{var ee=M.lane&-536870913,re=ee!==M.lane;if(re?(Je&ee)===ee:(d&ee)===ee){ee!==0&&ee===jl&&(uh=!0),le!==null&&(le=le.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Se=r,_e=M;ee=s;var ht=o;switch(_e.tag){case 1:if(Se=_e.payload,typeof Se=="function"){de=Se.call(ht,de,ee);break e}de=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=_e.payload,ee=typeof Se=="function"?Se.call(ht,de,ee):Se,ee==null)break e;de=p({},de,ee);break e;case 2:ps=!0}}ee=M.callback,ee!==null&&(r.flags|=64,re&&(r.flags|=8192),re=x.callbacks,re===null?x.callbacks=[ee]:re.push(ee))}else re={lane:ee,tag:M.tag,payload:M.payload,callback:M.callback,next:null},le===null?(Z=le=re,F=de):le=le.next=re,C|=ee;if(M=M.next,M===null){if(M=x.shared.pending,M===null)break;re=M,M=re.next,re.next=null,x.lastBaseUpdate=re,x.shared.pending=null}}while(!0);le===null&&(F=de),x.baseState=F,x.firstBaseUpdate=Z,x.lastBaseUpdate=le,v===null&&(x.shared.lanes=0),js|=C,r.lanes=C,r.memoizedState=de}}function n0(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function r0(r,s){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)n0(o[r],s)}var kl=U(null),Xu=U(0);function a0(r,s){r=Ha,A(Xu,r),A(kl,s),Ha=r|s.baseLanes}function dh(){A(Xu,Ha),A(kl,kl.current)}function fh(){Ha=Xu.current,P(kl),P(Xu)}var nr=U(null),Cr=null;function ys(r){var s=r.alternate;A(Pt,Pt.current&1),A(nr,r),Cr===null&&(s===null||kl.current!==null||s.memoizedState!==null)&&(Cr=r)}function mh(r){A(Pt,Pt.current),A(nr,r),Cr===null&&(Cr=r)}function s0(r){r.tag===22?(A(Pt,Pt.current),A(nr,r),Cr===null&&(Cr=r)):vs()}function vs(){A(Pt,Pt.current),A(nr,nr.current)}function rr(r){P(nr),Cr===r&&(Cr=null),P(Pt)}var Pt=U(0);function Wu(r){for(var s=r;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||vp(o)||bp(o)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===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 _a=0,He=null,ft=null,Bt=null,Zu=!1,El=!1,vi=!1,Ju=0,lc=0,Tl=null,e4=0;function At(){throw Error(i(321))}function hh(r,s){if(s===null)return!1;for(var o=0;o<s.length&&o<r.length;o++)if(!er(r[o],s[o]))return!1;return!0}function ph(r,s,o,d,x,v){return _a=v,He=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,I.H=r===null||r.memoizedState===null?H0:Rh,vi=!1,v=o(d,x),vi=!1,El&&(v=l0(s,o,d,x)),i0(r),v}function i0(r){I.H=uc;var s=ft!==null&&ft.next!==null;if(_a=0,Bt=ft=He=null,Zu=!1,lc=0,Tl=null,s)throw Error(i(300));r===null||Ft||(r=r.dependencies,r!==null&&qu(r)&&(Ft=!0))}function l0(r,s,o,d){He=r;var x=0;do{if(El&&(Tl=null),lc=0,El=!1,25<=x)throw Error(i(301));if(x+=1,Bt=ft=null,r.updateQueue!=null){var v=r.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}I.H=q0,v=s(o,d)}while(El);return v}function t4(){var r=I.H,s=r.useState()[0];return s=typeof s.then=="function"?oc(s):s,r=r.useState()[0],(ft!==null?ft.memoizedState:null)!==r&&(He.flags|=1024),s}function gh(){var r=Ju!==0;return Ju=0,r}function xh(r,s,o){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~o}function yh(r){if(Zu){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Zu=!1}_a=0,Bt=ft=He=null,El=!1,lc=Ju=0,Tl=null}function Tn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?He.memoizedState=Bt=r:Bt=Bt.next=r,Bt}function zt(){if(ft===null){var r=He.alternate;r=r!==null?r.memoizedState:null}else r=ft.next;var s=Bt===null?He.memoizedState:Bt.next;if(s!==null)Bt=s,ft=r;else{if(r===null)throw He.alternate===null?Error(i(467)):Error(i(310));ft=r,r={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Bt===null?He.memoizedState=Bt=r:Bt=Bt.next=r}return Bt}function ed(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oc(r){var s=lc;return lc+=1,Tl===null&&(Tl=[]),r=Wv(Tl,r,s),s=He,(Bt===null?s.memoizedState:Bt.next)===null&&(s=s.alternate,I.H=s===null||s.memoizedState===null?H0:Rh),r}function td(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return oc(r);if(r.$$typeof===k)return ln(r)}throw Error(i(438,String(r)))}function vh(r){var s=null,o=He.updateQueue;if(o!==null&&(s=o.memoCache),s==null){var d=He.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),o===null&&(o=ed(),He.updateQueue=o),o.memoCache=s,o=s.data[s.index],o===void 0)for(o=s.data[s.index]=Array(r),d=0;d<r;d++)o[d]=L;return s.index++,o}function Pa(r,s){return typeof s=="function"?s(r):s}function nd(r){var s=zt();return bh(s,ft,r)}function bh(r,s,o){var d=r.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=o;var x=r.baseQueue,v=d.pending;if(v!==null){if(x!==null){var C=x.next;x.next=v.next,v.next=C}s.baseQueue=x=v,d.pending=null}if(v=r.baseState,x===null)r.memoizedState=v;else{s=x.next;var M=C=null,F=null,Z=s,le=!1;do{var de=Z.lane&-536870913;if(de!==Z.lane?(Je&de)===de:(_a&de)===de){var ee=Z.revertLane;if(ee===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),de===jl&&(le=!0);else if((_a&ee)===ee){Z=Z.next,ee===jl&&(le=!0);continue}else de={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},F===null?(M=F=de,C=v):F=F.next=de,He.lanes|=ee,js|=ee;de=Z.action,vi&&o(v,de),v=Z.hasEagerState?Z.eagerState:o(v,de)}else ee={lane:de,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},F===null?(M=F=ee,C=v):F=F.next=ee,He.lanes|=de,js|=de;Z=Z.next}while(Z!==null&&Z!==s);if(F===null?C=v:F.next=M,!er(v,r.memoizedState)&&(Ft=!0,le&&(o=Nl,o!==null)))throw o;r.memoizedState=v,r.baseState=C,r.baseQueue=F,d.lastRenderedState=v}return x===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function wh(r){var s=zt(),o=s.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=r;var d=o.dispatch,x=o.pending,v=s.memoizedState;if(x!==null){o.pending=null;var C=x=x.next;do v=r(v,C.action),C=C.next;while(C!==x);er(v,s.memoizedState)||(Ft=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),o.lastRenderedState=v}return[v,d]}function o0(r,s,o){var d=He,x=zt(),v=tt;if(v){if(o===void 0)throw Error(i(407));o=o()}else o=s();var C=!er((ft||x).memoizedState,o);if(C&&(x.memoizedState=o,Ft=!0),x=x.queue,Sh(d0.bind(null,d,x,r),[r]),x.getSnapshot!==s||C||Bt!==null&&Bt.memoizedState.tag&1){if(d.flags|=2048,Al(9,{destroy:void 0},u0.bind(null,d,x,o,s),null),gt===null)throw Error(i(349));v||(_a&127)!==0||c0(d,s,o)}return o}function c0(r,s,o){r.flags|=16384,r={getSnapshot:s,value:o},s=He.updateQueue,s===null?(s=ed(),He.updateQueue=s,s.stores=[r]):(o=s.stores,o===null?s.stores=[r]:o.push(r))}function u0(r,s,o,d){s.value=o,s.getSnapshot=d,f0(s)&&m0(r)}function d0(r,s,o){return o(function(){f0(s)&&m0(r)})}function f0(r){var s=r.getSnapshot;r=r.value;try{var o=s();return!er(r,o)}catch{return!0}}function m0(r){var s=ui(r,2);s!==null&&qn(s,r,2)}function jh(r){var s=Tn();if(typeof r=="function"){var o=r;if(r=o(),vi){rn(!0);try{o()}finally{rn(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:r},s}function h0(r,s,o,d){return r.baseState=o,bh(r,ft,typeof d=="function"?d:Pa)}function n4(r,s,o,d,x){if(sd(r))throw Error(i(485));if(r=s.action,r!==null){var v={payload:x,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){v.listeners.push(C)}};I.T!==null?o(!0):v.isTransition=!1,d(v),o=s.pending,o===null?(v.next=s.pending=v,p0(s,v)):(v.next=o.next,s.pending=o.next=v)}}function p0(r,s){var o=s.action,d=s.payload,x=r.state;if(s.isTransition){var v=I.T,C={};I.T=C;try{var M=o(x,d),F=I.S;F!==null&&F(C,M),g0(r,s,M)}catch(Z){Nh(r,s,Z)}finally{v!==null&&C.types!==null&&(v.types=C.types),I.T=v}}else try{v=o(x,d),g0(r,s,v)}catch(Z){Nh(r,s,Z)}}function g0(r,s,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){x0(r,s,d)},function(d){return Nh(r,s,d)}):x0(r,s,o)}function x0(r,s,o){s.status="fulfilled",s.value=o,y0(s),r.state=o,s=r.pending,s!==null&&(o=s.next,o===s?r.pending=null:(o=o.next,s.next=o,p0(r,o)))}function Nh(r,s,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=o,y0(s),s=s.next;while(s!==d)}r.action=null}function y0(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function v0(r,s){return s}function b0(r,s){if(tt){var o=gt.formState;if(o!==null){e:{var d=He;if(tt){if(vt){t:{for(var x=vt,v=Sr;x.nodeType!==8;){if(!v){x=null;break t}if(x=kr(x.nextSibling),x===null){x=null;break t}}v=x.data,x=v==="F!"||v==="F"?x:null}if(x){vt=kr(x.nextSibling),d=x.data==="F!";break e}}ms(d)}d=!1}d&&(s=o[0])}}return o=Tn(),o.memoizedState=o.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:v0,lastRenderedState:s},o.queue=d,o=U0.bind(null,He,d),d.dispatch=o,d=jh(!1),v=Ah.bind(null,He,!1,d.queue),d=Tn(),x={state:s,dispatch:null,action:r,pending:null},d.queue=x,o=n4.bind(null,He,x,v,o),x.dispatch=o,d.memoizedState=r,[s,o,!1]}function w0(r){var s=zt();return j0(s,ft,r)}function j0(r,s,o){if(s=bh(r,s,v0)[0],r=nd(Pa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=oc(s)}catch(C){throw C===Sl?Gu:C}else d=s;s=zt();var x=s.queue,v=x.dispatch;return o!==s.memoizedState&&(He.flags|=2048,Al(9,{destroy:void 0},r4.bind(null,x,o),null)),[d,v,r]}function r4(r,s){r.action=s}function N0(r){var s=zt(),o=ft;if(o!==null)return j0(s,o,r);zt(),s=s.memoizedState,o=zt();var d=o.queue.dispatch;return o.memoizedState=r,[s,d,!1]}function Al(r,s,o,d){return r={tag:r,create:o,deps:d,inst:s,next:null},s=He.updateQueue,s===null&&(s=ed(),He.updateQueue=s),o=s.lastEffect,o===null?s.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,s.lastEffect=r),r}function S0(){return zt().memoizedState}function rd(r,s,o,d){var x=Tn();He.flags|=r,x.memoizedState=Al(1|s,{destroy:void 0},o,d===void 0?null:d)}function ad(r,s,o,d){var x=zt();d=d===void 0?null:d;var v=x.memoizedState.inst;ft!==null&&d!==null&&hh(d,ft.memoizedState.deps)?x.memoizedState=Al(s,v,o,d):(He.flags|=r,x.memoizedState=Al(1|s,v,o,d))}function C0(r,s){rd(8390656,8,r,s)}function Sh(r,s){ad(2048,8,r,s)}function a4(r){He.flags|=4;var s=He.updateQueue;if(s===null)s=ed(),He.updateQueue=s,s.events=[r];else{var o=s.events;o===null?s.events=[r]:o.push(r)}}function k0(r){var s=zt().memoizedState;return a4({ref:s,nextImpl:r}),function(){if((lt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function E0(r,s){return ad(4,2,r,s)}function T0(r,s){return ad(4,4,r,s)}function A0(r,s){if(typeof s=="function"){r=r();var o=s(r);return function(){typeof o=="function"?o():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function R0(r,s,o){o=o!=null?o.concat([r]):null,ad(4,4,A0.bind(null,s,r),o)}function Ch(){}function M0(r,s){var o=zt();s=s===void 0?null:s;var d=o.memoizedState;return s!==null&&hh(s,d[1])?d[0]:(o.memoizedState=[r,s],r)}function D0(r,s){var o=zt();s=s===void 0?null:s;var d=o.memoizedState;if(s!==null&&hh(s,d[1]))return d[0];if(d=r(),vi){rn(!0);try{r()}finally{rn(!1)}}return o.memoizedState=[d,s],d}function kh(r,s,o){return o===void 0||(_a&1073741824)!==0&&(Je&261930)===0?r.memoizedState=s:(r.memoizedState=o,r=Ob(),He.lanes|=r,js|=r,o)}function O0(r,s,o,d){return er(o,s)?o:kl.current!==null?(r=kh(r,o,d),er(r,s)||(Ft=!0),r):(_a&42)===0||(_a&1073741824)!==0&&(Je&261930)===0?(Ft=!0,r.memoizedState=o):(r=Ob(),He.lanes|=r,js|=r,s)}function _0(r,s,o,d,x){var v=Q.p;Q.p=v!==0&&8>v?v:8;var C=I.T,M={};I.T=M,Ah(r,!1,s,o);try{var F=x(),Z=I.S;if(Z!==null&&Z(M,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var le=JE(F,d);cc(r,s,le,ir(r))}else cc(r,s,d,ir(r))}catch(de){cc(r,s,{then:function(){},status:"rejected",reason:de},ir())}finally{Q.p=v,C!==null&&M.types!==null&&(C.types=M.types),I.T=C}}function s4(){}function Eh(r,s,o,d){if(r.tag!==5)throw Error(i(476));var x=P0(r).queue;_0(r,x,s,Y,o===null?s4:function(){return z0(r),o(d)})}function P0(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:Y},next:null};var o={};return s.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pa,lastRenderedState:o},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function z0(r){var s=P0(r);s.next===null&&(s=r.alternate.memoizedState),cc(r,s.next.queue,{},ir())}function Th(){return ln(kc)}function L0(){return zt().memoizedState}function I0(){return zt().memoizedState}function i4(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var o=ir();r=gs(o);var d=xs(s,r,o);d!==null&&(qn(d,s,o),ac(d,s,o)),s={cache:rh()},r.payload=s;return}s=s.return}}function l4(r,s,o){var d=ir();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},sd(r)?B0(s,o):(o=Gm(r,s,o,d),o!==null&&(qn(o,r,d),F0(o,s,d)))}function U0(r,s,o){var d=ir();cc(r,s,o,d)}function cc(r,s,o,d){var x={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(sd(r))B0(s,x);else{var v=r.alternate;if(r.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var C=s.lastRenderedState,M=v(C,o);if(x.hasEagerState=!0,x.eagerState=M,er(M,C))return Uu(r,s,x,0),gt===null&&Iu(),!1}catch{}finally{}if(o=Gm(r,s,x,d),o!==null)return qn(o,r,d),F0(o,s,d),!0}return!1}function Ah(r,s,o,d){if(d={lane:2,revertLane:lp(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},sd(r)){if(s)throw Error(i(479))}else s=Gm(r,o,d,2),s!==null&&qn(s,r,2)}function sd(r){var s=r.alternate;return r===He||s!==null&&s===He}function B0(r,s){El=Zu=!0;var o=r.pending;o===null?s.next=s:(s.next=o.next,o.next=s),r.pending=s}function F0(r,s,o){if((o&4194048)!==0){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,Pn(r,o)}}var uc={readContext:ln,use:td,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};uc.useEffectEvent=At;var H0={readContext:ln,use:td,useCallback:function(r,s){return Tn().memoizedState=[r,s===void 0?null:s],r},useContext:ln,useEffect:C0,useImperativeHandle:function(r,s,o){o=o!=null?o.concat([r]):null,rd(4194308,4,A0.bind(null,s,r),o)},useLayoutEffect:function(r,s){return rd(4194308,4,r,s)},useInsertionEffect:function(r,s){rd(4,2,r,s)},useMemo:function(r,s){var o=Tn();s=s===void 0?null:s;var d=r();if(vi){rn(!0);try{r()}finally{rn(!1)}}return o.memoizedState=[d,s],d},useReducer:function(r,s,o){var d=Tn();if(o!==void 0){var x=o(s);if(vi){rn(!0);try{o(s)}finally{rn(!1)}}}else x=s;return d.memoizedState=d.baseState=x,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:x},d.queue=r,r=r.dispatch=l4.bind(null,He,r),[d.memoizedState,r]},useRef:function(r){var s=Tn();return r={current:r},s.memoizedState=r},useState:function(r){r=jh(r);var s=r.queue,o=U0.bind(null,He,s);return s.dispatch=o,[r.memoizedState,o]},useDebugValue:Ch,useDeferredValue:function(r,s){var o=Tn();return kh(o,r,s)},useTransition:function(){var r=jh(!1);return r=_0.bind(null,He,r.queue,!0,!1),Tn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,o){var d=He,x=Tn();if(tt){if(o===void 0)throw Error(i(407));o=o()}else{if(o=s(),gt===null)throw Error(i(349));(Je&127)!==0||c0(d,s,o)}x.memoizedState=o;var v={value:o,getSnapshot:s};return x.queue=v,C0(d0.bind(null,d,v,r),[r]),d.flags|=2048,Al(9,{destroy:void 0},u0.bind(null,d,v,o,s),null),o},useId:function(){var r=Tn(),s=gt.identifierPrefix;if(tt){var o=sa,d=aa;o=(d&~(1<<32-ot(d)-1)).toString(32)+o,s="_"+s+"R_"+o,o=Ju++,0<o&&(s+="H"+o.toString(32)),s+="_"}else o=e4++,s="_"+s+"r_"+o.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:Th,useFormState:b0,useActionState:b0,useOptimistic:function(r){var s=Tn();s.memoizedState=s.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=o,s=Ah.bind(null,He,!0,o),o.dispatch=s,[r,s]},useMemoCache:vh,useCacheRefresh:function(){return Tn().memoizedState=i4.bind(null,He)},useEffectEvent:function(r){var s=Tn(),o={impl:r};return s.memoizedState=o,function(){if((lt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},Rh={readContext:ln,use:td,useCallback:M0,useContext:ln,useEffect:Sh,useImperativeHandle:R0,useInsertionEffect:E0,useLayoutEffect:T0,useMemo:D0,useReducer:nd,useRef:S0,useState:function(){return nd(Pa)},useDebugValue:Ch,useDeferredValue:function(r,s){var o=zt();return O0(o,ft.memoizedState,r,s)},useTransition:function(){var r=nd(Pa)[0],s=zt().memoizedState;return[typeof r=="boolean"?r:oc(r),s]},useSyncExternalStore:o0,useId:L0,useHostTransitionStatus:Th,useFormState:w0,useActionState:w0,useOptimistic:function(r,s){var o=zt();return h0(o,ft,r,s)},useMemoCache:vh,useCacheRefresh:I0};Rh.useEffectEvent=k0;var q0={readContext:ln,use:td,useCallback:M0,useContext:ln,useEffect:Sh,useImperativeHandle:R0,useInsertionEffect:E0,useLayoutEffect:T0,useMemo:D0,useReducer:wh,useRef:S0,useState:function(){return wh(Pa)},useDebugValue:Ch,useDeferredValue:function(r,s){var o=zt();return ft===null?kh(o,r,s):O0(o,ft.memoizedState,r,s)},useTransition:function(){var r=wh(Pa)[0],s=zt().memoizedState;return[typeof r=="boolean"?r:oc(r),s]},useSyncExternalStore:o0,useId:L0,useHostTransitionStatus:Th,useFormState:N0,useActionState:N0,useOptimistic:function(r,s){var o=zt();return ft!==null?h0(o,ft,r,s):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:vh,useCacheRefresh:I0};q0.useEffectEvent=k0;function Mh(r,s,o,d){s=r.memoizedState,o=o(d,s),o=o==null?s:p({},s,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var Dh={enqueueSetState:function(r,s,o){r=r._reactInternals;var d=ir(),x=gs(d);x.payload=s,o!=null&&(x.callback=o),s=xs(r,x,d),s!==null&&(qn(s,r,d),ac(s,r,d))},enqueueReplaceState:function(r,s,o){r=r._reactInternals;var d=ir(),x=gs(d);x.tag=1,x.payload=s,o!=null&&(x.callback=o),s=xs(r,x,d),s!==null&&(qn(s,r,d),ac(s,r,d))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var o=ir(),d=gs(o);d.tag=2,s!=null&&(d.callback=s),s=xs(r,d,o),s!==null&&(qn(s,r,o),ac(s,r,o))}};function V0(r,s,o,d,x,v,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,v,C):s.prototype&&s.prototype.isPureReactComponent?!Xo(o,d)||!Xo(x,v):!0}function $0(r,s,o,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,d),s.state!==r&&Dh.enqueueReplaceState(s,s.state,null)}function bi(r,s){var o=s;if("ref"in s){o={};for(var d in s)d!=="ref"&&(o[d]=s[d])}if(r=r.defaultProps){o===s&&(o=p({},o));for(var x in r)o[x]===void 0&&(o[x]=r[x])}return o}function G0(r){Lu(r)}function Y0(r){console.error(r)}function K0(r){Lu(r)}function id(r,s){try{var o=r.onUncaughtError;o(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function Q0(r,s,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function Oh(r,s,o){return o=gs(o),o.tag=3,o.payload={element:null},o.callback=function(){id(r,s)},o}function X0(r){return r=gs(r),r.tag=3,r}function W0(r,s,o,d){var x=o.type.getDerivedStateFromError;if(typeof x=="function"){var v=d.value;r.payload=function(){return x(v)},r.callback=function(){Q0(s,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(r.callback=function(){Q0(s,o,d),typeof x!="function"&&(Ns===null?Ns=new Set([this]):Ns.add(this));var M=d.stack;this.componentDidCatch(d.value,{componentStack:M!==null?M:""})})}function o4(r,s,o,d,x){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=o.alternate,s!==null&&wl(s,o,x,!0),o=nr.current,o!==null){switch(o.tag){case 31:case 13:return Cr===null?yd():o.alternate===null&&Rt===0&&(Rt=3),o.flags&=-257,o.flags|=65536,o.lanes=x,d===Yu?o.flags|=16384:(s=o.updateQueue,s===null?o.updateQueue=new Set([d]):s.add(d),ap(r,d,x)),!1;case 22:return o.flags|=65536,d===Yu?o.flags|=16384:(s=o.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=s):(o=s.retryQueue,o===null?s.retryQueue=new Set([d]):o.add(d)),ap(r,d,x)),!1}throw Error(i(435,o.tag))}return ap(r,d,x),yd(),!1}if(tt)return s=nr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,d!==Zm&&(r=Error(i(422),{cause:d}),Jo(wr(r,o)))):(d!==Zm&&(s=Error(i(423),{cause:d}),Jo(wr(s,o))),r=r.current.alternate,r.flags|=65536,x&=-x,r.lanes|=x,d=wr(d,o),x=Oh(r.stateNode,d,x),ch(r,x),Rt!==4&&(Rt=2)),!1;var v=Error(i(520),{cause:d});if(v=wr(v,o),yc===null?yc=[v]:yc.push(v),Rt!==4&&(Rt=2),s===null)return!0;d=wr(d,o),o=s;do{switch(o.tag){case 3:return o.flags|=65536,r=x&-x,o.lanes|=r,r=Oh(o.stateNode,d,r),ch(o,r),!1;case 1:if(s=o.type,v=o.stateNode,(o.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Ns===null||!Ns.has(v))))return o.flags|=65536,x&=-x,o.lanes|=x,x=X0(x),W0(x,r,o,d),ch(o,x),!1}o=o.return}while(o!==null);return!1}var _h=Error(i(461)),Ft=!1;function on(r,s,o,d){s.child=r===null?t0(s,null,o,d):yi(s,r.child,o,d)}function Z0(r,s,o,d,x){o=o.render;var v=s.ref;if("ref"in d){var C={};for(var M in d)M!=="ref"&&(C[M]=d[M])}else C=d;return hi(s),d=ph(r,s,o,C,v,x),M=gh(),r!==null&&!Ft?(xh(r,s,x),za(r,s,x)):(tt&&M&&Xm(s),s.flags|=1,on(r,s,d,x),s.child)}function J0(r,s,o,d,x){if(r===null){var v=o.type;return typeof v=="function"&&!Ym(v)&&v.defaultProps===void 0&&o.compare===null?(s.tag=15,s.type=v,eb(r,s,v,d,x)):(r=Fu(o.type,null,d,s,s.mode,x),r.ref=s.ref,r.return=s,s.child=r)}if(v=r.child,!Hh(r,x)){var C=v.memoizedProps;if(o=o.compare,o=o!==null?o:Xo,o(C,d)&&r.ref===s.ref)return za(r,s,x)}return s.flags|=1,r=Ra(v,d),r.ref=s.ref,r.return=s,s.child=r}function eb(r,s,o,d,x){if(r!==null){var v=r.memoizedProps;if(Xo(v,d)&&r.ref===s.ref)if(Ft=!1,s.pendingProps=d=v,Hh(r,x))(r.flags&131072)!==0&&(Ft=!0);else return s.lanes=r.lanes,za(r,s,x)}return Ph(r,s,o,d,x)}function tb(r,s,o,d){var x=d.children,v=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(v=v!==null?v.baseLanes|o:o,r!==null){for(d=s.child=r.child,x=0;d!==null;)x=x|d.lanes|d.childLanes,d=d.sibling;d=x&~v}else d=0,s.child=null;return nb(r,s,v,o,d)}if((o&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&$u(s,v!==null?v.cachePool:null),v!==null?a0(s,v):dh(),s0(s);else return d=s.lanes=536870912,nb(r,s,v!==null?v.baseLanes|o:o,o,d)}else v!==null?($u(s,v.cachePool),a0(s,v),vs(),s.memoizedState=null):(r!==null&&$u(s,null),dh(),vs());return on(r,s,x,o),s.child}function dc(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function nb(r,s,o,d,x){var v=sh();return v=v===null?null:{parent:Ut._currentValue,pool:v},s.memoizedState={baseLanes:o,cachePool:v},r!==null&&$u(s,null),dh(),s0(s),r!==null&&wl(r,s,d,!0),s.childLanes=x,null}function ld(r,s){return s=cd({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function rb(r,s,o){return yi(s,r.child,null,o),r=ld(s,s.pendingProps),r.flags|=2,rr(s),s.memoizedState=null,r}function c4(r,s,o){var d=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(tt){if(d.mode==="hidden")return r=ld(s,d),s.lanes=536870912,dc(null,r);if(mh(s),(r=vt)?(r=p1(r,Sr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:ds!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},o=Bv(r),o.return=s,s.child=o,sn=s,vt=null)):r=null,r===null)throw ms(s);return s.lanes=536870912,null}return ld(s,d)}var v=r.memoizedState;if(v!==null){var C=v.dehydrated;if(mh(s),x)if(s.flags&256)s.flags&=-257,s=rb(r,s,o);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(Ft||wl(r,s,o,!1),x=(o&r.childLanes)!==0,Ft||x){if(d=gt,d!==null&&(C=zn(d,o),C!==0&&C!==v.retryLane))throw v.retryLane=C,ui(r,C),qn(d,r,C),_h;yd(),s=rb(r,s,o)}else r=v.treeContext,vt=kr(C.nextSibling),sn=s,tt=!0,fs=null,Sr=!1,r!==null&&qv(s,r),s=ld(s,d),s.flags|=4096;return s}return r=Ra(r.child,{mode:d.mode,children:d.children}),r.ref=s.ref,s.child=r,r.return=s,r}function od(r,s){var o=s.ref;if(o===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(r===null||r.ref!==o)&&(s.flags|=4194816)}}function Ph(r,s,o,d,x){return hi(s),o=ph(r,s,o,d,void 0,x),d=gh(),r!==null&&!Ft?(xh(r,s,x),za(r,s,x)):(tt&&d&&Xm(s),s.flags|=1,on(r,s,o,x),s.child)}function ab(r,s,o,d,x,v){return hi(s),s.updateQueue=null,o=l0(s,d,o,x),i0(r),d=gh(),r!==null&&!Ft?(xh(r,s,v),za(r,s,v)):(tt&&d&&Xm(s),s.flags|=1,on(r,s,o,v),s.child)}function sb(r,s,o,d,x){if(hi(s),s.stateNode===null){var v=xl,C=o.contextType;typeof C=="object"&&C!==null&&(v=ln(C)),v=new o(d,v),s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Dh,s.stateNode=v,v._reactInternals=s,v=s.stateNode,v.props=d,v.state=s.memoizedState,v.refs={},lh(s),C=o.contextType,v.context=typeof C=="object"&&C!==null?ln(C):xl,v.state=s.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(Mh(s,o,C,d),v.state=s.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(C=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),C!==v.state&&Dh.enqueueReplaceState(v,v.state,null),ic(s,d,v,x),sc(),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(r===null){v=s.stateNode;var M=s.memoizedProps,F=bi(o,M);v.props=F;var Z=v.context,le=o.contextType;C=xl,typeof le=="object"&&le!==null&&(C=ln(le));var de=o.getDerivedStateFromProps;le=typeof de=="function"||typeof v.getSnapshotBeforeUpdate=="function",M=s.pendingProps!==M,le||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(M||Z!==C)&&$0(s,v,d,C),ps=!1;var ee=s.memoizedState;v.state=ee,ic(s,d,v,x),sc(),Z=s.memoizedState,M||ee!==Z||ps?(typeof de=="function"&&(Mh(s,o,de,d),Z=s.memoizedState),(F=ps||V0(s,o,F,d,ee,Z,C))?(le||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(s.flags|=4194308)):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=Z),v.props=d,v.state=Z,v.context=C,d=F):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{v=s.stateNode,oh(r,s),C=s.memoizedProps,le=bi(o,C),v.props=le,de=s.pendingProps,ee=v.context,Z=o.contextType,F=xl,typeof Z=="object"&&Z!==null&&(F=ln(Z)),M=o.getDerivedStateFromProps,(Z=typeof M=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(C!==de||ee!==F)&&$0(s,v,d,F),ps=!1,ee=s.memoizedState,v.state=ee,ic(s,d,v,x),sc();var re=s.memoizedState;C!==de||ee!==re||ps||r!==null&&r.dependencies!==null&&qu(r.dependencies)?(typeof M=="function"&&(Mh(s,o,M,d),re=s.memoizedState),(le=ps||V0(s,o,le,d,ee,re,F)||r!==null&&r.dependencies!==null&&qu(r.dependencies))?(Z||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(d,re,F),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(d,re,F)),typeof v.componentDidUpdate=="function"&&(s.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof v.componentDidUpdate!="function"||C===r.memoizedProps&&ee===r.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ee===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=re),v.props=d,v.state=re,v.context=F,d=le):(typeof v.componentDidUpdate!="function"||C===r.memoizedProps&&ee===r.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ee===r.memoizedState||(s.flags|=1024),d=!1)}return v=d,od(r,s),d=(s.flags&128)!==0,v||d?(v=s.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:v.render(),s.flags|=1,r!==null&&d?(s.child=yi(s,r.child,null,x),s.child=yi(s,null,o,x)):on(r,s,o,x),s.memoizedState=v.state,r=s.child):r=za(r,s,x),r}function ib(r,s,o,d){return fi(),s.flags|=256,on(r,s,o,d),s.child}var zh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lh(r){return{baseLanes:r,cachePool:Qv()}}function Ih(r,s,o){return r=r!==null?r.childLanes&~o:0,s&&(r|=sr),r}function lb(r,s,o){var d=s.pendingProps,x=!1,v=(s.flags&128)!==0,C;if((C=v)||(C=r!==null&&r.memoizedState===null?!1:(Pt.current&2)!==0),C&&(x=!0,s.flags&=-129),C=(s.flags&32)!==0,s.flags&=-33,r===null){if(tt){if(x?ys(s):vs(),(r=vt)?(r=p1(r,Sr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:ds!==null?{id:aa,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},o=Bv(r),o.return=s,s.child=o,sn=s,vt=null)):r=null,r===null)throw ms(s);return bp(r)?s.lanes=32:s.lanes=536870912,null}var M=d.children;return d=d.fallback,x?(vs(),x=s.mode,M=cd({mode:"hidden",children:M},x),d=di(d,x,o,null),M.return=s,d.return=s,M.sibling=d,s.child=M,d=s.child,d.memoizedState=Lh(o),d.childLanes=Ih(r,C,o),s.memoizedState=zh,dc(null,d)):(ys(s),Uh(s,M))}var F=r.memoizedState;if(F!==null&&(M=F.dehydrated,M!==null)){if(v)s.flags&256?(ys(s),s.flags&=-257,s=Bh(r,s,o)):s.memoizedState!==null?(vs(),s.child=r.child,s.flags|=128,s=null):(vs(),M=d.fallback,x=s.mode,d=cd({mode:"visible",children:d.children},x),M=di(M,x,o,null),M.flags|=2,d.return=s,M.return=s,d.sibling=M,s.child=d,yi(s,r.child,null,o),d=s.child,d.memoizedState=Lh(o),d.childLanes=Ih(r,C,o),s.memoizedState=zh,s=dc(null,d));else if(ys(s),bp(M)){if(C=M.nextSibling&&M.nextSibling.dataset,C)var Z=C.dgst;C=Z,d=Error(i(419)),d.stack="",d.digest=C,Jo({value:d,source:null,stack:null}),s=Bh(r,s,o)}else if(Ft||wl(r,s,o,!1),C=(o&r.childLanes)!==0,Ft||C){if(C=gt,C!==null&&(d=zn(C,o),d!==0&&d!==F.retryLane))throw F.retryLane=d,ui(r,d),qn(C,r,d),_h;vp(M)||yd(),s=Bh(r,s,o)}else vp(M)?(s.flags|=192,s.child=r.child,s=null):(r=F.treeContext,vt=kr(M.nextSibling),sn=s,tt=!0,fs=null,Sr=!1,r!==null&&qv(s,r),s=Uh(s,d.children),s.flags|=4096);return s}return x?(vs(),M=d.fallback,x=s.mode,F=r.child,Z=F.sibling,d=Ra(F,{mode:"hidden",children:d.children}),d.subtreeFlags=F.subtreeFlags&65011712,Z!==null?M=Ra(Z,M):(M=di(M,x,o,null),M.flags|=2),M.return=s,d.return=s,d.sibling=M,s.child=d,dc(null,d),d=s.child,M=r.child.memoizedState,M===null?M=Lh(o):(x=M.cachePool,x!==null?(F=Ut._currentValue,x=x.parent!==F?{parent:F,pool:F}:x):x=Qv(),M={baseLanes:M.baseLanes|o,cachePool:x}),d.memoizedState=M,d.childLanes=Ih(r,C,o),s.memoizedState=zh,dc(r.child,d)):(ys(s),o=r.child,r=o.sibling,o=Ra(o,{mode:"visible",children:d.children}),o.return=s,o.sibling=null,r!==null&&(C=s.deletions,C===null?(s.deletions=[r],s.flags|=16):C.push(r)),s.child=o,s.memoizedState=null,o)}function Uh(r,s){return s=cd({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function cd(r,s){return r=tr(22,r,null,s),r.lanes=0,r}function Bh(r,s,o){return yi(s,r.child,null,o),r=Uh(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function ob(r,s,o){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),th(r.return,s,o)}function Fh(r,s,o,d,x,v){var C=r.memoizedState;C===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:x,treeForkCount:v}:(C.isBackwards=s,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=x,C.treeForkCount=v)}function cb(r,s,o){var d=s.pendingProps,x=d.revealOrder,v=d.tail;d=d.children;var C=Pt.current,M=(C&2)!==0;if(M?(C=C&1|2,s.flags|=128):C&=1,A(Pt,C),on(r,s,d,o),d=tt?Zo:0,!M&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&ob(r,o,s);else if(r.tag===19)ob(r,o,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}switch(x){case"forwards":for(o=s.child,x=null;o!==null;)r=o.alternate,r!==null&&Wu(r)===null&&(x=o),o=o.sibling;o=x,o===null?(x=s.child,s.child=null):(x=o.sibling,o.sibling=null),Fh(s,!1,x,o,v,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,x=s.child,s.child=null;x!==null;){if(r=x.alternate,r!==null&&Wu(r)===null){s.child=x;break}r=x.sibling,x.sibling=o,o=x,x=r}Fh(s,!0,o,null,v,d);break;case"together":Fh(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function za(r,s,o){if(r!==null&&(s.dependencies=r.dependencies),js|=s.lanes,(o&s.childLanes)===0)if(r!==null){if(wl(r,s,o,!1),(o&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,o=Ra(r,r.pendingProps),s.child=o,o.return=s;r.sibling!==null;)r=r.sibling,o=o.sibling=Ra(r,r.pendingProps),o.return=s;o.sibling=null}return s.child}function Hh(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&qu(r)))}function u4(r,s,o){switch(s.tag){case 3:pe(s,s.stateNode.containerInfo),hs(s,Ut,r.memoizedState.cache),fi();break;case 27:case 5:Ae(s);break;case 4:pe(s,s.stateNode.containerInfo);break;case 10:hs(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,mh(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(ys(s),s.flags|=128,null):(o&s.child.childLanes)!==0?lb(r,s,o):(ys(s),r=za(r,s,o),r!==null?r.sibling:null);ys(s);break;case 19:var x=(r.flags&128)!==0;if(d=(o&s.childLanes)!==0,d||(wl(r,s,o,!1),d=(o&s.childLanes)!==0),x){if(d)return cb(r,s,o);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),A(Pt,Pt.current),d)break;return null;case 22:return s.lanes=0,tb(r,s,o,s.pendingProps);case 24:hs(s,Ut,r.memoizedState.cache)}return za(r,s,o)}function ub(r,s,o){if(r!==null)if(r.memoizedProps!==s.pendingProps)Ft=!0;else{if(!Hh(r,o)&&(s.flags&128)===0)return Ft=!1,u4(r,s,o);Ft=(r.flags&131072)!==0}else Ft=!1,tt&&(s.flags&1048576)!==0&&Hv(s,Zo,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(r=gi(s.elementType),s.type=r,typeof r=="function")Ym(r)?(d=bi(r,d),s.tag=1,s=sb(null,s,r,d,o)):(s.tag=0,s=Ph(null,s,r,d,o));else{if(r!=null){var x=r.$$typeof;if(x===R){s.tag=11,s=Z0(null,s,r,d,o);break e}else if(x===O){s.tag=14,s=J0(null,s,r,d,o);break e}}throw s=ie(r)||r,Error(i(306,s,""))}}return s;case 0:return Ph(r,s,s.type,s.pendingProps,o);case 1:return d=s.type,x=bi(d,s.pendingProps),sb(r,s,d,x,o);case 3:e:{if(pe(s,s.stateNode.containerInfo),r===null)throw Error(i(387));d=s.pendingProps;var v=s.memoizedState;x=v.element,oh(r,s),ic(s,d,null,o);var C=s.memoizedState;if(d=C.cache,hs(s,Ut,d),d!==v.cache&&nh(s,[Ut],o,!0),sc(),d=C.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:C.cache},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){s=ib(r,s,d,o);break e}else if(d!==x){x=wr(Error(i(424)),s),Jo(x),s=ib(r,s,d,o);break e}else{switch(r=s.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(vt=kr(r.firstChild),sn=s,tt=!0,fs=null,Sr=!0,o=t0(s,null,d,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(fi(),d===x){s=za(r,s,o);break e}on(r,s,d,o)}s=s.child}return s;case 26:return od(r,s),r===null?(o=w1(s.type,null,s.pendingProps,null))?s.memoizedState=o:tt||(o=s.type,r=s.pendingProps,d=Cd(fe.current).createElement(o),d[an]=s,d[Ln]=r,cn(d,o,r),Xt(d),s.stateNode=d):s.memoizedState=w1(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return Ae(s),r===null&&tt&&(d=s.stateNode=y1(s.type,s.pendingProps,fe.current),sn=s,Sr=!0,x=vt,Es(s.type)?(wp=x,vt=kr(d.firstChild)):vt=x),on(r,s,s.pendingProps.children,o),od(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&tt&&((x=d=vt)&&(d=B4(d,s.type,s.pendingProps,Sr),d!==null?(s.stateNode=d,sn=s,vt=kr(d.firstChild),Sr=!1,x=!0):x=!1),x||ms(s)),Ae(s),x=s.type,v=s.pendingProps,C=r!==null?r.memoizedProps:null,d=v.children,gp(x,v)?d=null:C!==null&&gp(x,C)&&(s.flags|=32),s.memoizedState!==null&&(x=ph(r,s,t4,null,null,o),kc._currentValue=x),od(r,s),on(r,s,d,o),s.child;case 6:return r===null&&tt&&((r=o=vt)&&(o=F4(o,s.pendingProps,Sr),o!==null?(s.stateNode=o,sn=s,vt=null,r=!0):r=!1),r||ms(s)),null;case 13:return lb(r,s,o);case 4:return pe(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=yi(s,null,d,o):on(r,s,d,o),s.child;case 11:return Z0(r,s,s.type,s.pendingProps,o);case 7:return on(r,s,s.pendingProps,o),s.child;case 8:return on(r,s,s.pendingProps.children,o),s.child;case 12:return on(r,s,s.pendingProps.children,o),s.child;case 10:return d=s.pendingProps,hs(s,s.type,d.value),on(r,s,d.children,o),s.child;case 9:return x=s.type._context,d=s.pendingProps.children,hi(s),x=ln(x),d=d(x),s.flags|=1,on(r,s,d,o),s.child;case 14:return J0(r,s,s.type,s.pendingProps,o);case 15:return eb(r,s,s.type,s.pendingProps,o);case 19:return cb(r,s,o);case 31:return c4(r,s,o);case 22:return tb(r,s,o,s.pendingProps);case 24:return hi(s),d=ln(Ut),r===null?(x=sh(),x===null&&(x=gt,v=rh(),x.pooledCache=v,v.refCount++,v!==null&&(x.pooledCacheLanes|=o),x=v),s.memoizedState={parent:d,cache:x},lh(s),hs(s,Ut,x)):((r.lanes&o)!==0&&(oh(r,s),ic(s,null,null,o),sc()),x=r.memoizedState,v=s.memoizedState,x.parent!==d?(x={parent:d,cache:d},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),hs(s,Ut,d)):(d=v.cache,hs(s,Ut,d),d!==x.cache&&nh(s,[Ut],o,!0))),on(r,s,s.pendingProps.children,o),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function La(r){r.flags|=4}function qh(r,s,o,d,x){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(x&335544128)===x)if(r.stateNode.complete)r.flags|=8192;else if(Lb())r.flags|=8192;else throw xi=Yu,ih}else r.flags&=-16777217}function db(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!k1(s))if(Lb())r.flags|=8192;else throw xi=Yu,ih}function ud(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?yn():536870912,r.lanes|=s,Ol|=s)}function fc(r,s){if(!tt)switch(r.tailMode){case"hidden":s=r.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function bt(r){var s=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(s)for(var x=r.child;x!==null;)o|=x.lanes|x.childLanes,d|=x.subtreeFlags&65011712,d|=x.flags&65011712,x.return=r,x=x.sibling;else for(x=r.child;x!==null;)o|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,x.return=r,x=x.sibling;return r.subtreeFlags|=d,r.childLanes=o,s}function d4(r,s,o){var d=s.pendingProps;switch(Wm(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(s),null;case 1:return bt(s),null;case 3:return o=s.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Oa(Ut),ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(bl(s)?La(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Jm())),bt(s),null;case 26:var x=s.type,v=s.memoizedState;return r===null?(La(s),v!==null?(bt(s),db(s,v)):(bt(s),qh(s,x,null,d,o))):v?v!==r.memoizedState?(La(s),bt(s),db(s,v)):(bt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==d&&La(s),bt(s),qh(s,x,r,d,o)),null;case 27:if(ze(s),o=fe.current,x=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==d&&La(s);else{if(!d){if(s.stateNode===null)throw Error(i(166));return bt(s),null}r=J.current,bl(s)?Vv(s):(r=y1(x,d,o),s.stateNode=r,La(s))}return bt(s),null;case 5:if(ze(s),x=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==d&&La(s);else{if(!d){if(s.stateNode===null)throw Error(i(166));return bt(s),null}if(v=J.current,bl(s))Vv(s);else{var C=Cd(fe.current);switch(v){case 1:v=C.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:v=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":v=C.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":v=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":v=C.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof d.is=="string"?C.createElement("select",{is:d.is}):C.createElement("select"),d.multiple?v.multiple=!0:d.size&&(v.size=d.size);break;default:v=typeof d.is=="string"?C.createElement(x,{is:d.is}):C.createElement(x)}}v[an]=s,v[Ln]=d;e:for(C=s.child;C!==null;){if(C.tag===5||C.tag===6)v.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===s)break e;for(;C.sibling===null;){if(C.return===null||C.return===s)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}s.stateNode=v;e:switch(cn(v,x,d),x){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&La(s)}}return bt(s),qh(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,o),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==d&&La(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(i(166));if(r=fe.current,bl(s)){if(r=s.stateNode,o=s.memoizedProps,d=null,x=sn,x!==null)switch(x.tag){case 27:case 5:d=x.memoizedProps}r[an]=s,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||l1(r.nodeValue,o)),r||ms(s,!0)}else r=Cd(r).createTextNode(d),r[an]=s,s.stateNode=r}return bt(s),null;case 31:if(o=s.memoizedState,r===null||r.memoizedState!==null){if(d=bl(s),o!==null){if(r===null){if(!d)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[an]=s}else fi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;bt(s),r=!1}else o=Jm(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return s.flags&256?(rr(s),s):(rr(s),null);if((s.flags&128)!==0)throw Error(i(558))}return bt(s),null;case 13:if(d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(x=bl(s),d!==null&&d.dehydrated!==null){if(r===null){if(!x)throw Error(i(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(i(317));x[an]=s}else fi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;bt(s),x=!1}else x=Jm(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(rr(s),s):(rr(s),null)}return rr(s),(s.flags&128)!==0?(s.lanes=o,s):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=s.child,x=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(x=d.alternate.memoizedState.cachePool.pool),v=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(v=d.memoizedState.cachePool.pool),v!==x&&(d.flags|=2048)),o!==r&&o&&(s.child.flags|=8192),ud(s,s.updateQueue),bt(s),null);case 4:return ve(),r===null&&dp(s.stateNode.containerInfo),bt(s),null;case 10:return Oa(s.type),bt(s),null;case 19:if(P(Pt),d=s.memoizedState,d===null)return bt(s),null;if(x=(s.flags&128)!==0,v=d.rendering,v===null)if(x)fc(d,!1);else{if(Rt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(v=Wu(r),v!==null){for(s.flags|=128,fc(d,!1),r=v.updateQueue,s.updateQueue=r,ud(s,r),s.subtreeFlags=0,r=o,o=s.child;o!==null;)Uv(o,r),o=o.sibling;return A(Pt,Pt.current&1|2),tt&&Ma(s,d.treeForkCount),s.child}r=r.sibling}d.tail!==null&&tn()>pd&&(s.flags|=128,x=!0,fc(d,!1),s.lanes=4194304)}else{if(!x)if(r=Wu(v),r!==null){if(s.flags|=128,x=!0,r=r.updateQueue,s.updateQueue=r,ud(s,r),fc(d,!0),d.tail===null&&d.tailMode==="hidden"&&!v.alternate&&!tt)return bt(s),null}else 2*tn()-d.renderingStartTime>pd&&o!==536870912&&(s.flags|=128,x=!0,fc(d,!1),s.lanes=4194304);d.isBackwards?(v.sibling=s.child,s.child=v):(r=d.last,r!==null?r.sibling=v:s.child=v,d.last=v)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=tn(),r.sibling=null,o=Pt.current,A(Pt,x?o&1|2:o&1),tt&&Ma(s,d.treeForkCount),r):(bt(s),null);case 22:case 23:return rr(s),fh(),d=s.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(o&536870912)!==0&&(s.flags&128)===0&&(bt(s),s.subtreeFlags&6&&(s.flags|=8192)):bt(s),o=s.updateQueue,o!==null&&ud(s,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==o&&(s.flags|=2048),r!==null&&P(pi),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),s.memoizedState.cache!==o&&(s.flags|=2048),Oa(Ut),bt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function f4(r,s){switch(Wm(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Oa(Ut),ve(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return ze(s),null;case 31:if(s.memoizedState!==null){if(rr(s),s.alternate===null)throw Error(i(340));fi()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(rr(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));fi()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return P(Pt),null;case 4:return ve(),null;case 10:return Oa(s.type),null;case 22:case 23:return rr(s),fh(),r!==null&&P(pi),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return Oa(Ut),null;case 25:return null;default:return null}}function fb(r,s){switch(Wm(s),s.tag){case 3:Oa(Ut),ve();break;case 26:case 27:case 5:ze(s);break;case 4:ve();break;case 31:s.memoizedState!==null&&rr(s);break;case 13:rr(s);break;case 19:P(Pt);break;case 10:Oa(s.type);break;case 22:case 23:rr(s),fh(),r!==null&&P(pi);break;case 24:Oa(Ut)}}function mc(r,s){try{var o=s.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var x=d.next;o=x;do{if((o.tag&r)===r){d=void 0;var v=o.create,C=o.inst;d=v(),C.destroy=d}o=o.next}while(o!==x)}}catch(M){dt(s,s.return,M)}}function bs(r,s,o){try{var d=s.updateQueue,x=d!==null?d.lastEffect:null;if(x!==null){var v=x.next;d=v;do{if((d.tag&r)===r){var C=d.inst,M=C.destroy;if(M!==void 0){C.destroy=void 0,x=s;var F=o,Z=M;try{Z()}catch(le){dt(x,F,le)}}}d=d.next}while(d!==v)}}catch(le){dt(s,s.return,le)}}function mb(r){var s=r.updateQueue;if(s!==null){var o=r.stateNode;try{r0(s,o)}catch(d){dt(r,r.return,d)}}}function hb(r,s,o){o.props=bi(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){dt(r,s,d)}}function hc(r,s){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(x){dt(r,s,x)}}function ia(r,s){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(x){dt(r,s,x)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(x){dt(r,s,x)}else o.current=null}function pb(r){var s=r.type,o=r.memoizedProps,d=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(x){dt(r,r.return,x)}}function Vh(r,s,o){try{var d=r.stateNode;_4(d,r.type,o,s),d[Ln]=s}catch(x){dt(r,r.return,x)}}function gb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Es(r.type)||r.tag===4}function $h(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||gb(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.tag===27&&Es(r.type)||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 Gh(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,s):(s=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,s.appendChild(r),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=Ta));else if(d!==4&&(d===27&&Es(r.type)&&(o=r.stateNode,s=null),r=r.child,r!==null))for(Gh(r,s,o),r=r.sibling;r!==null;)Gh(r,s,o),r=r.sibling}function dd(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.insertBefore(r,s):o.appendChild(r);else if(d!==4&&(d===27&&Es(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(dd(r,s,o),r=r.sibling;r!==null;)dd(r,s,o),r=r.sibling}function xb(r){var s=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);cn(s,d,o),s[an]=r,s[Ln]=o}catch(v){dt(r,r.return,v)}}var Ia=!1,Ht=!1,Yh=!1,yb=typeof WeakSet=="function"?WeakSet:Set,Wt=null;function m4(r,s){if(r=r.containerInfo,hp=Dd,r=Rv(r),Bm(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var x=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var C=0,M=-1,F=-1,Z=0,le=0,de=r,ee=null;t:for(;;){for(var re;de!==o||x!==0&&de.nodeType!==3||(M=C+x),de!==v||d!==0&&de.nodeType!==3||(F=C+d),de.nodeType===3&&(C+=de.nodeValue.length),(re=de.firstChild)!==null;)ee=de,de=re;for(;;){if(de===r)break t;if(ee===o&&++Z===x&&(M=C),ee===v&&++le===d&&(F=C),(re=de.nextSibling)!==null)break;de=ee,ee=de.parentNode}de=re}o=M===-1||F===-1?null:{start:M,end:F}}else o=null}o=o||{start:0,end:0}}else o=null;for(pp={focusedElem:r,selectionRange:o},Dd=!1,Wt=s;Wt!==null;)if(s=Wt,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Wt=r;else for(;Wt!==null;){switch(s=Wt,v=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)x=r[o],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&v!==null){r=void 0,o=s,x=v.memoizedProps,v=v.memoizedState,d=o.stateNode;try{var Se=bi(o.type,x);r=d.getSnapshotBeforeUpdate(Se,v),d.__reactInternalSnapshotBeforeUpdate=r}catch(_e){dt(o,o.return,_e)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,o=r.nodeType,o===9)yp(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":yp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,Wt=r;break}Wt=s.return}}function vb(r,s,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Ba(r,o),d&4&&mc(5,o);break;case 1:if(Ba(r,o),d&4)if(r=o.stateNode,s===null)try{r.componentDidMount()}catch(C){dt(o,o.return,C)}else{var x=bi(o.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(x,s,r.__reactInternalSnapshotBeforeUpdate)}catch(C){dt(o,o.return,C)}}d&64&&mb(o),d&512&&hc(o,o.return);break;case 3:if(Ba(r,o),d&64&&(r=o.updateQueue,r!==null)){if(s=null,o.child!==null)switch(o.child.tag){case 27:case 5:s=o.child.stateNode;break;case 1:s=o.child.stateNode}try{r0(r,s)}catch(C){dt(o,o.return,C)}}break;case 27:s===null&&d&4&&xb(o);case 26:case 5:Ba(r,o),s===null&&d&4&&pb(o),d&512&&hc(o,o.return);break;case 12:Ba(r,o);break;case 31:Ba(r,o),d&4&&jb(r,o);break;case 13:Ba(r,o),d&4&&Nb(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=j4.bind(null,o),H4(r,o))));break;case 22:if(d=o.memoizedState!==null||Ia,!d){s=s!==null&&s.memoizedState!==null||Ht,x=Ia;var v=Ht;Ia=d,(Ht=s)&&!v?Fa(r,o,(o.subtreeFlags&8772)!==0):Ba(r,o),Ia=x,Ht=v}break;case 30:break;default:Ba(r,o)}}function bb(r){var s=r.alternate;s!==null&&(r.alternate=null,bb(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&Nm(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Nt=null,Un=!1;function Ua(r,s,o){for(o=o.child;o!==null;)wb(r,s,o),o=o.sibling}function wb(r,s,o){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(nn,o)}catch{}switch(o.tag){case 26:Ht||ia(o,s),Ua(r,s,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ht||ia(o,s);var d=Nt,x=Un;Es(o.type)&&(Nt=o.stateNode,Un=!1),Ua(r,s,o),Nc(o.stateNode),Nt=d,Un=x;break;case 5:Ht||ia(o,s);case 6:if(d=Nt,x=Un,Nt=null,Ua(r,s,o),Nt=d,Un=x,Nt!==null)if(Un)try{(Nt.nodeType===9?Nt.body:Nt.nodeName==="HTML"?Nt.ownerDocument.body:Nt).removeChild(o.stateNode)}catch(v){dt(o,s,v)}else try{Nt.removeChild(o.stateNode)}catch(v){dt(o,s,v)}break;case 18:Nt!==null&&(Un?(r=Nt,m1(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Fl(r)):m1(Nt,o.stateNode));break;case 4:d=Nt,x=Un,Nt=o.stateNode.containerInfo,Un=!0,Ua(r,s,o),Nt=d,Un=x;break;case 0:case 11:case 14:case 15:bs(2,o,s),Ht||bs(4,o,s),Ua(r,s,o);break;case 1:Ht||(ia(o,s),d=o.stateNode,typeof d.componentWillUnmount=="function"&&hb(o,s,d)),Ua(r,s,o);break;case 21:Ua(r,s,o);break;case 22:Ht=(d=Ht)||o.memoizedState!==null,Ua(r,s,o),Ht=d;break;default:Ua(r,s,o)}}function jb(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Fl(r)}catch(o){dt(s,s.return,o)}}}function Nb(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Fl(r)}catch(o){dt(s,s.return,o)}}function h4(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new yb),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new yb),s;default:throw Error(i(435,r.tag))}}function fd(r,s){var o=h4(r);s.forEach(function(d){if(!o.has(d)){o.add(d);var x=N4.bind(null,r,d);d.then(x,x)}})}function Bn(r,s){var o=s.deletions;if(o!==null)for(var d=0;d<o.length;d++){var x=o[d],v=r,C=s,M=C;e:for(;M!==null;){switch(M.tag){case 27:if(Es(M.type)){Nt=M.stateNode,Un=!1;break e}break;case 5:Nt=M.stateNode,Un=!1;break e;case 3:case 4:Nt=M.stateNode.containerInfo,Un=!0;break e}M=M.return}if(Nt===null)throw Error(i(160));wb(v,C,x),Nt=null,Un=!1,v=x.alternate,v!==null&&(v.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Sb(s,r),s=s.sibling}var Br=null;function Sb(r,s){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Bn(s,r),Fn(r),d&4&&(bs(3,r,r.return),mc(3,r),bs(5,r,r.return));break;case 1:Bn(s,r),Fn(r),d&512&&(Ht||o===null||ia(o,o.return)),d&64&&Ia&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var x=Br;if(Bn(s,r),Fn(r),d&512&&(Ht||o===null||ia(o,o.return)),d&4){var v=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){e:{d=r.type,o=r.memoizedProps,x=x.ownerDocument||x;t:switch(d){case"title":v=x.getElementsByTagName("title")[0],(!v||v[Fo]||v[an]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=x.createElement(d),x.head.insertBefore(v,x.querySelector("head > title"))),cn(v,d,o),v[an]=r,Xt(v),d=v;break e;case"link":var C=S1("link","href",x).get(d+(o.href||""));if(C){for(var M=0;M<C.length;M++)if(v=C[M],v.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&v.getAttribute("rel")===(o.rel==null?null:o.rel)&&v.getAttribute("title")===(o.title==null?null:o.title)&&v.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){C.splice(M,1);break t}}v=x.createElement(d),cn(v,d,o),x.head.appendChild(v);break;case"meta":if(C=S1("meta","content",x).get(d+(o.content||""))){for(M=0;M<C.length;M++)if(v=C[M],v.getAttribute("content")===(o.content==null?null:""+o.content)&&v.getAttribute("name")===(o.name==null?null:o.name)&&v.getAttribute("property")===(o.property==null?null:o.property)&&v.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&v.getAttribute("charset")===(o.charSet==null?null:o.charSet)){C.splice(M,1);break t}}v=x.createElement(d),cn(v,d,o),x.head.appendChild(v);break;default:throw Error(i(468,d))}v[an]=r,Xt(v),d=v}r.stateNode=d}else C1(x,r.type,r.stateNode);else r.stateNode=N1(x,d,r.memoizedProps);else v!==d?(v===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):v.count--,d===null?C1(x,r.type,r.stateNode):N1(x,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Vh(r,r.memoizedProps,o.memoizedProps)}break;case 27:Bn(s,r),Fn(r),d&512&&(Ht||o===null||ia(o,o.return)),o!==null&&d&4&&Vh(r,r.memoizedProps,o.memoizedProps);break;case 5:if(Bn(s,r),Fn(r),d&512&&(Ht||o===null||ia(o,o.return)),r.flags&32){x=r.stateNode;try{ul(x,"")}catch(Se){dt(r,r.return,Se)}}d&4&&r.stateNode!=null&&(x=r.memoizedProps,Vh(r,x,o!==null?o.memoizedProps:x)),d&1024&&(Yh=!0);break;case 6:if(Bn(s,r),Fn(r),d&4){if(r.stateNode===null)throw Error(i(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(Se){dt(r,r.return,Se)}}break;case 3:if(Td=null,x=Br,Br=kd(s.containerInfo),Bn(s,r),Br=x,Fn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Fl(s.containerInfo)}catch(Se){dt(r,r.return,Se)}Yh&&(Yh=!1,Cb(r));break;case 4:d=Br,Br=kd(r.stateNode.containerInfo),Bn(s,r),Fn(r),Br=d;break;case 12:Bn(s,r),Fn(r);break;case 31:Bn(s,r),Fn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fd(r,d)));break;case 13:Bn(s,r),Fn(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(hd=tn()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fd(r,d)));break;case 22:x=r.memoizedState!==null;var F=o!==null&&o.memoizedState!==null,Z=Ia,le=Ht;if(Ia=Z||x,Ht=le||F,Bn(s,r),Ht=le,Ia=Z,Fn(r),d&8192)e:for(s=r.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(o===null||F||Ia||Ht||wi(r)),o=null,s=r;;){if(s.tag===5||s.tag===26){if(o===null){F=o=s;try{if(v=F.stateNode,x)C=v.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{M=F.stateNode;var de=F.memoizedProps.style,ee=de!=null&&de.hasOwnProperty("display")?de.display:null;M.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Se){dt(F,F.return,Se)}}}else if(s.tag===6){if(o===null){F=s;try{F.stateNode.nodeValue=x?"":F.memoizedProps}catch(Se){dt(F,F.return,Se)}}}else if(s.tag===18){if(o===null){F=s;try{var re=F.stateNode;x?h1(re,!0):h1(F.stateNode,!1)}catch(Se){dt(F,F.return,Se)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;o===s&&(o=null),s=s.return}o===s&&(o=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,fd(r,o))));break;case 19:Bn(s,r),Fn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,fd(r,d)));break;case 30:break;case 21:break;default:Bn(s,r),Fn(r)}}function Fn(r){var s=r.flags;if(s&2){try{for(var o,d=r.return;d!==null;){if(gb(d)){o=d;break}d=d.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var x=o.stateNode,v=$h(r);dd(r,v,x);break;case 5:var C=o.stateNode;o.flags&32&&(ul(C,""),o.flags&=-33);var M=$h(r);dd(r,M,C);break;case 3:case 4:var F=o.stateNode.containerInfo,Z=$h(r);Gh(r,Z,F);break;default:throw Error(i(161))}}catch(le){dt(r,r.return,le)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Cb(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;Cb(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function Ba(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)vb(r,s.alternate,s),s=s.sibling}function wi(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:bs(4,s,s.return),wi(s);break;case 1:ia(s,s.return);var o=s.stateNode;typeof o.componentWillUnmount=="function"&&hb(s,s.return,o),wi(s);break;case 27:Nc(s.stateNode);case 26:case 5:ia(s,s.return),wi(s);break;case 22:s.memoizedState===null&&wi(s);break;case 30:wi(s);break;default:wi(s)}r=r.sibling}}function Fa(r,s,o){for(o=o&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,x=r,v=s,C=v.flags;switch(v.tag){case 0:case 11:case 15:Fa(x,v,o),mc(4,v);break;case 1:if(Fa(x,v,o),d=v,x=d.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(Z){dt(d,d.return,Z)}if(d=v,x=d.updateQueue,x!==null){var M=d.stateNode;try{var F=x.shared.hiddenCallbacks;if(F!==null)for(x.shared.hiddenCallbacks=null,x=0;x<F.length;x++)n0(F[x],M)}catch(Z){dt(d,d.return,Z)}}o&&C&64&&mb(v),hc(v,v.return);break;case 27:xb(v);case 26:case 5:Fa(x,v,o),o&&d===null&&C&4&&pb(v),hc(v,v.return);break;case 12:Fa(x,v,o);break;case 31:Fa(x,v,o),o&&C&4&&jb(x,v);break;case 13:Fa(x,v,o),o&&C&4&&Nb(x,v);break;case 22:v.memoizedState===null&&Fa(x,v,o),hc(v,v.return);break;case 30:break;default:Fa(x,v,o)}s=s.sibling}}function Kh(r,s){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&ec(o))}function Qh(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&ec(r))}function Fr(r,s,o,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)kb(r,s,o,d),s=s.sibling}function kb(r,s,o,d){var x=s.flags;switch(s.tag){case 0:case 11:case 15:Fr(r,s,o,d),x&2048&&mc(9,s);break;case 1:Fr(r,s,o,d);break;case 3:Fr(r,s,o,d),x&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&ec(r)));break;case 12:if(x&2048){Fr(r,s,o,d),r=s.stateNode;try{var v=s.memoizedProps,C=v.id,M=v.onPostCommit;typeof M=="function"&&M(C,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(F){dt(s,s.return,F)}}else Fr(r,s,o,d);break;case 31:Fr(r,s,o,d);break;case 13:Fr(r,s,o,d);break;case 23:break;case 22:v=s.stateNode,C=s.alternate,s.memoizedState!==null?v._visibility&2?Fr(r,s,o,d):pc(r,s):v._visibility&2?Fr(r,s,o,d):(v._visibility|=2,Rl(r,s,o,d,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Kh(C,s);break;case 24:Fr(r,s,o,d),x&2048&&Qh(s.alternate,s);break;default:Fr(r,s,o,d)}}function Rl(r,s,o,d,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var v=r,C=s,M=o,F=d,Z=C.flags;switch(C.tag){case 0:case 11:case 15:Rl(v,C,M,F,x),mc(8,C);break;case 23:break;case 22:var le=C.stateNode;C.memoizedState!==null?le._visibility&2?Rl(v,C,M,F,x):pc(v,C):(le._visibility|=2,Rl(v,C,M,F,x)),x&&Z&2048&&Kh(C.alternate,C);break;case 24:Rl(v,C,M,F,x),x&&Z&2048&&Qh(C.alternate,C);break;default:Rl(v,C,M,F,x)}s=s.sibling}}function pc(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var o=r,d=s,x=d.flags;switch(d.tag){case 22:pc(o,d),x&2048&&Kh(d.alternate,d);break;case 24:pc(o,d),x&2048&&Qh(d.alternate,d);break;default:pc(o,d)}s=s.sibling}}var gc=8192;function Ml(r,s,o){if(r.subtreeFlags&gc)for(r=r.child;r!==null;)Eb(r,s,o),r=r.sibling}function Eb(r,s,o){switch(r.tag){case 26:Ml(r,s,o),r.flags&gc&&r.memoizedState!==null&&eT(o,Br,r.memoizedState,r.memoizedProps);break;case 5:Ml(r,s,o);break;case 3:case 4:var d=Br;Br=kd(r.stateNode.containerInfo),Ml(r,s,o),Br=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=gc,gc=16777216,Ml(r,s,o),gc=d):Ml(r,s,o));break;default:Ml(r,s,o)}}function Tb(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function xc(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var o=0;o<s.length;o++){var d=s[o];Wt=d,Rb(d,r)}Tb(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Ab(r),r=r.sibling}function Ab(r){switch(r.tag){case 0:case 11:case 15:xc(r),r.flags&2048&&bs(9,r,r.return);break;case 3:xc(r);break;case 12:xc(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,md(r)):xc(r);break;default:xc(r)}}function md(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var o=0;o<s.length;o++){var d=s[o];Wt=d,Rb(d,r)}Tb(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:bs(8,s,s.return),md(s);break;case 22:o=s.stateNode,o._visibility&2&&(o._visibility&=-3,md(s));break;default:md(s)}r=r.sibling}}function Rb(r,s){for(;Wt!==null;){var o=Wt;switch(o.tag){case 0:case 11:case 15:bs(8,o,s);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:ec(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,Wt=d;else e:for(o=r;Wt!==null;){d=Wt;var x=d.sibling,v=d.return;if(bb(d),d===o){Wt=null;break e}if(x!==null){x.return=v,Wt=x;break e}Wt=v}}}var p4={getCacheForType:function(r){var s=ln(Ut),o=s.data.get(r);return o===void 0&&(o=r(),s.data.set(r,o)),o},cacheSignal:function(){return ln(Ut).controller.signal}},g4=typeof WeakMap=="function"?WeakMap:Map,lt=0,gt=null,Qe=null,Je=0,ut=0,ar=null,ws=!1,Dl=!1,Xh=!1,Ha=0,Rt=0,js=0,ji=0,Wh=0,sr=0,Ol=0,yc=null,Hn=null,Zh=!1,hd=0,Mb=0,pd=1/0,gd=null,Ns=null,Gt=0,Ss=null,_l=null,qa=0,Jh=0,ep=null,Db=null,vc=0,tp=null;function ir(){return(lt&2)!==0&&Je!==0?Je&-Je:I.T!==null?lp():wm()}function Ob(){if(sr===0)if((Je&536870912)===0||tt){var r=nl;nl<<=1,(nl&3932160)===0&&(nl=262144),sr=r}else sr=536870912;return r=nr.current,r!==null&&(r.flags|=32),sr}function qn(r,s,o){(r===gt&&(ut===2||ut===9)||r.cancelPendingCommit!==null)&&(Pl(r,0),Cs(r,Je,sr,!1)),kt(r,o),((lt&2)===0||r!==gt)&&(r===gt&&((lt&2)===0&&(ji|=o),Rt===4&&Cs(r,Je,sr,!1)),la(r))}function _b(r,s,o){if((lt&6)!==0)throw Error(i(327));var d=!o&&(s&127)===0&&(s&r.expiredLanes)===0||jt(r,s),x=d?v4(r,s):rp(r,s,!0),v=d;do{if(x===0){Dl&&!d&&Cs(r,s,0,!1);break}else{if(o=r.current.alternate,v&&!x4(o)){x=rp(r,s,!1),v=!1;continue}if(x===2){if(v=s,r.errorRecoveryDisabledLanes&v)var C=0;else C=r.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){s=C;e:{var M=r;x=yc;var F=M.current.memoizedState.isDehydrated;if(F&&(Pl(M,C).flags|=256),C=rp(M,C,!1),C!==2){if(Xh&&!F){M.errorRecoveryDisabledLanes|=v,ji|=v,x=4;break e}v=Hn,Hn=x,v!==null&&(Hn===null?Hn=v:Hn.push.apply(Hn,v))}x=C}if(v=!1,x!==2)continue}}if(x===1){Pl(r,0),Cs(r,s,0,!0);break}e:{switch(d=r,v=x,v){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:Cs(d,s,sr,!ws);break e;case 2:Hn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(x=hd+300-tn(),10<x)){if(Cs(d,s,sr,!ws),Ie(d,0,!0)!==0)break e;qa=s,d.timeoutHandle=d1(Pb.bind(null,d,o,Hn,gd,Zh,s,sr,ji,Ol,ws,v,"Throttled",-0,0),x);break e}Pb(d,o,Hn,gd,Zh,s,sr,ji,Ol,ws,v,null,-0,0)}}break}while(!0);la(r)}function Pb(r,s,o,d,x,v,C,M,F,Z,le,de,ee,re){if(r.timeoutHandle=-1,de=s.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},Eb(s,v,de);var Se=(v&62914560)===v?hd-tn():(v&4194048)===v?Mb-tn():0;if(Se=tT(de,Se),Se!==null){qa=v,r.cancelPendingCommit=Se(qb.bind(null,r,s,v,o,d,x,C,M,F,le,de,null,ee,re)),Cs(r,v,C,!Z);return}}qb(r,s,v,o,d,x,C,M,F)}function x4(r){for(var s=r;;){var o=s.tag;if((o===0||o===11||o===15)&&s.flags&16384&&(o=s.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var x=o[d],v=x.getSnapshot;x=x.value;try{if(!er(v(),x))return!1}catch{return!1}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;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 Cs(r,s,o,d){s&=~Wh,s&=~ji,r.suspendedLanes|=s,r.pingedLanes&=~s,d&&(r.warmLanes|=s),d=r.expirationTimes;for(var x=s;0<x;){var v=31-ot(x),C=1<<v;d[v]=-1,x&=~C}o!==0&&si(r,o,s)}function xd(){return(lt&6)===0?(bc(0),!1):!0}function np(){if(Qe!==null){if(ut===0)var r=Qe.return;else r=Qe,Da=mi=null,yh(r),Cl=null,nc=0,r=Qe;for(;r!==null;)fb(r.alternate,r),r=r.return;Qe=null}}function Pl(r,s){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,L4(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),qa=0,np(),gt=r,Qe=o=Ra(r.current,null),Je=s,ut=0,ar=null,ws=!1,Dl=jt(r,s),Xh=!1,Ol=sr=Wh=ji=js=Rt=0,Hn=yc=null,Zh=!1,(s&8)!==0&&(s|=s&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=s;0<d;){var x=31-ot(d),v=1<<x;s|=r[x],d&=~v}return Ha=s,Iu(),o}function zb(r,s){He=null,I.H=uc,s===Sl||s===Gu?(s=Zv(),ut=3):s===ih?(s=Zv(),ut=4):ut=s===_h?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,ar=s,Qe===null&&(Rt=1,id(r,wr(s,r.current)))}function Lb(){var r=nr.current;return r===null?!0:(Je&4194048)===Je?Cr===null:(Je&62914560)===Je||(Je&536870912)!==0?r===Cr:!1}function Ib(){var r=I.H;return I.H=uc,r===null?uc:r}function Ub(){var r=I.A;return I.A=p4,r}function yd(){Rt=4,ws||(Je&4194048)!==Je&&nr.current!==null||(Dl=!0),(js&134217727)===0&&(ji&134217727)===0||gt===null||Cs(gt,Je,sr,!1)}function rp(r,s,o){var d=lt;lt|=2;var x=Ib(),v=Ub();(gt!==r||Je!==s)&&(gd=null,Pl(r,s)),s=!1;var C=Rt;e:do try{if(ut!==0&&Qe!==null){var M=Qe,F=ar;switch(ut){case 8:np(),C=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(s=!0);var Z=ut;if(ut=0,ar=null,zl(r,M,F,Z),o&&Dl){C=0;break e}break;default:Z=ut,ut=0,ar=null,zl(r,M,F,Z)}}y4(),C=Rt;break}catch(le){zb(r,le)}while(!0);return s&&r.shellSuspendCounter++,Da=mi=null,lt=d,I.H=x,I.A=v,Qe===null&&(gt=null,Je=0,Iu()),C}function y4(){for(;Qe!==null;)Bb(Qe)}function v4(r,s){var o=lt;lt|=2;var d=Ib(),x=Ub();gt!==r||Je!==s?(gd=null,pd=tn()+500,Pl(r,s)):Dl=jt(r,s);e:do try{if(ut!==0&&Qe!==null){s=Qe;var v=ar;t:switch(ut){case 1:ut=0,ar=null,zl(r,s,v,1);break;case 2:case 9:if(Xv(v)){ut=0,ar=null,Fb(s);break}s=function(){ut!==2&&ut!==9||gt!==r||(ut=7),la(r)},v.then(s,s);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:Xv(v)?(ut=0,ar=null,Fb(s)):(ut=0,ar=null,zl(r,s,v,7));break;case 5:var C=null;switch(Qe.tag){case 26:C=Qe.memoizedState;case 5:case 27:var M=Qe;if(C?k1(C):M.stateNode.complete){ut=0,ar=null;var F=M.sibling;if(F!==null)Qe=F;else{var Z=M.return;Z!==null?(Qe=Z,vd(Z)):Qe=null}break t}}ut=0,ar=null,zl(r,s,v,5);break;case 6:ut=0,ar=null,zl(r,s,v,6);break;case 8:np(),Rt=6;break e;default:throw Error(i(462))}}b4();break}catch(le){zb(r,le)}while(!0);return Da=mi=null,I.H=d,I.A=x,lt=o,Qe!==null?0:(gt=null,Je=0,Iu(),Rt)}function b4(){for(;Qe!==null&&!en();)Bb(Qe)}function Bb(r){var s=ub(r.alternate,r,Ha);r.memoizedProps=r.pendingProps,s===null?vd(r):Qe=s}function Fb(r){var s=r,o=s.alternate;switch(s.tag){case 15:case 0:s=ab(o,s,s.pendingProps,s.type,void 0,Je);break;case 11:s=ab(o,s,s.pendingProps,s.type.render,s.ref,Je);break;case 5:yh(s);default:fb(o,s),s=Qe=Uv(s,Ha),s=ub(o,s,Ha)}r.memoizedProps=r.pendingProps,s===null?vd(r):Qe=s}function zl(r,s,o,d){Da=mi=null,yh(s),Cl=null,nc=0;var x=s.return;try{if(o4(r,x,s,o,Je)){Rt=1,id(r,wr(o,r.current)),Qe=null;return}}catch(v){if(x!==null)throw Qe=x,v;Rt=1,id(r,wr(o,r.current)),Qe=null;return}s.flags&32768?(tt||d===1?r=!0:Dl||(Je&536870912)!==0?r=!1:(ws=r=!0,(d===2||d===9||d===3||d===6)&&(d=nr.current,d!==null&&d.tag===13&&(d.flags|=16384))),Hb(s,r)):vd(s)}function vd(r){var s=r;do{if((s.flags&32768)!==0){Hb(s,ws);return}r=s.return;var o=d4(s.alternate,s,Ha);if(o!==null){Qe=o;return}if(s=s.sibling,s!==null){Qe=s;return}Qe=s=r}while(s!==null);Rt===0&&(Rt=5)}function Hb(r,s){do{var o=f4(r.alternate,r);if(o!==null){o.flags&=32767,Qe=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!s&&(r=r.sibling,r!==null)){Qe=r;return}Qe=r=o}while(r!==null);Rt=6,Qe=null}function qb(r,s,o,d,x,v,C,M,F){r.cancelPendingCommit=null;do bd();while(Gt!==0);if((lt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(v=s.lanes|s.childLanes,v|=$m,_n(r,o,v,C,M,F),r===gt&&(Qe=gt=null,Je=0),_l=s,Ss=r,qa=o,Jh=v,ep=x,Db=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,S4(Oe,function(){return Kb(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=I.T,I.T=null,x=Q.p,Q.p=2,C=lt,lt|=4;try{m4(r,s,o)}finally{lt=C,Q.p=x,I.T=d}}Gt=1,Vb(),$b(),Gb()}}function Vb(){if(Gt===1){Gt=0;var r=Ss,s=_l,o=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||o){o=I.T,I.T=null;var d=Q.p;Q.p=2;var x=lt;lt|=4;try{Sb(s,r);var v=pp,C=Rv(r.containerInfo),M=v.focusedElem,F=v.selectionRange;if(C!==M&&M&&M.ownerDocument&&Av(M.ownerDocument.documentElement,M)){if(F!==null&&Bm(M)){var Z=F.start,le=F.end;if(le===void 0&&(le=Z),"selectionStart"in M)M.selectionStart=Z,M.selectionEnd=Math.min(le,M.value.length);else{var de=M.ownerDocument||document,ee=de&&de.defaultView||window;if(ee.getSelection){var re=ee.getSelection(),Se=M.textContent.length,_e=Math.min(F.start,Se),ht=F.end===void 0?_e:Math.min(F.end,Se);!re.extend&&_e>ht&&(C=ht,ht=_e,_e=C);var K=Tv(M,_e),V=Tv(M,ht);if(K&&V&&(re.rangeCount!==1||re.anchorNode!==K.node||re.anchorOffset!==K.offset||re.focusNode!==V.node||re.focusOffset!==V.offset)){var W=de.createRange();W.setStart(K.node,K.offset),re.removeAllRanges(),_e>ht?(re.addRange(W),re.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),re.addRange(W))}}}}for(de=[],re=M;re=re.parentNode;)re.nodeType===1&&de.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<de.length;M++){var ce=de[M];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Dd=!!hp,pp=hp=null}finally{lt=x,Q.p=d,I.T=o}}r.current=s,Gt=2}}function $b(){if(Gt===2){Gt=0;var r=Ss,s=_l,o=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||o){o=I.T,I.T=null;var d=Q.p;Q.p=2;var x=lt;lt|=4;try{vb(r,s.alternate,s)}finally{lt=x,Q.p=d,I.T=o}}Gt=3}}function Gb(){if(Gt===4||Gt===3){Gt=0,ea();var r=Ss,s=_l,o=qa,d=Db;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Gt=5:(Gt=0,_l=Ss=null,Yb(r,r.pendingLanes));var x=r.pendingLanes;if(x===0&&(Ns=null),Ir(o),s=s.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(nn,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=I.T,x=Q.p,Q.p=2,I.T=null;try{for(var v=r.onRecoverableError,C=0;C<d.length;C++){var M=d[C];v(M.value,{componentStack:M.stack})}}finally{I.T=s,Q.p=x}}(qa&3)!==0&&bd(),la(r),x=r.pendingLanes,(o&261930)!==0&&(x&42)!==0?r===tp?vc++:(vc=0,tp=r):vc=0,bc(0)}}function Yb(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,ec(s)))}function bd(){return Vb(),$b(),Gb(),Kb()}function Kb(){if(Gt!==5)return!1;var r=Ss,s=Jh;Jh=0;var o=Ir(qa),d=I.T,x=Q.p;try{Q.p=32>o?32:o,I.T=null,o=ep,ep=null;var v=Ss,C=qa;if(Gt=0,_l=Ss=null,qa=0,(lt&6)!==0)throw Error(i(331));var M=lt;if(lt|=4,Ab(v.current),kb(v,v.current,C,o),lt=M,bc(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(nn,v)}catch{}return!0}finally{Q.p=x,I.T=d,Yb(r,s)}}function Qb(r,s,o){s=wr(o,s),s=Oh(r.stateNode,s,2),r=xs(r,s,2),r!==null&&(kt(r,2),la(r))}function dt(r,s,o){if(r.tag===3)Qb(r,r,o);else for(;s!==null;){if(s.tag===3){Qb(s,r,o);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ns===null||!Ns.has(d))){r=wr(o,r),o=X0(2),d=xs(s,o,2),d!==null&&(W0(o,d,s,r),kt(d,2),la(d));break}}s=s.return}}function ap(r,s,o){var d=r.pingCache;if(d===null){d=r.pingCache=new g4;var x=new Set;d.set(s,x)}else x=d.get(s),x===void 0&&(x=new Set,d.set(s,x));x.has(o)||(Xh=!0,x.add(o),r=w4.bind(null,r,s,o),s.then(r,r))}function w4(r,s,o){var d=r.pingCache;d!==null&&d.delete(s),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,gt===r&&(Je&o)===o&&(Rt===4||Rt===3&&(Je&62914560)===Je&&300>tn()-hd?(lt&2)===0&&Pl(r,0):Wh|=o,Ol===Je&&(Ol=0)),la(r)}function Xb(r,s){s===0&&(s=yn()),r=ui(r,s),r!==null&&(kt(r,s),la(r))}function j4(r){var s=r.memoizedState,o=0;s!==null&&(o=s.retryLane),Xb(r,o)}function N4(r,s){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,x=r.memoizedState;x!==null&&(o=x.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(s),Xb(r,o)}function S4(r,s){return ls(r,s)}var wd=null,Ll=null,sp=!1,jd=!1,ip=!1,ks=0;function la(r){r!==Ll&&r.next===null&&(Ll===null?wd=Ll=r:Ll=Ll.next=r),jd=!0,sp||(sp=!0,k4())}function bc(r,s){if(!ip&&jd){ip=!0;do for(var o=!1,d=wd;d!==null;){if(r!==0){var x=d.pendingLanes;if(x===0)var v=0;else{var C=d.suspendedLanes,M=d.pingedLanes;v=(1<<31-ot(42|r)+1)-1,v&=x&~(C&~M),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(o=!0,e1(d,v))}else v=Je,v=Ie(d,d===gt?v:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(v&3)===0||jt(d,v)||(o=!0,e1(d,v));d=d.next}while(o);ip=!1}}function C4(){Wb()}function Wb(){jd=sp=!1;var r=0;ks!==0&&z4()&&(r=ks);for(var s=tn(),o=null,d=wd;d!==null;){var x=d.next,v=Zb(d,s);v===0?(d.next=null,o===null?wd=x:o.next=x,x===null&&(Ll=o)):(o=d,(r!==0||(v&3)!==0)&&(jd=!0)),d=x}Gt!==0&&Gt!==5||bc(r),ks!==0&&(ks=0)}function Zb(r,s){for(var o=r.suspendedLanes,d=r.pingedLanes,x=r.expirationTimes,v=r.pendingLanes&-62914561;0<v;){var C=31-ot(v),M=1<<C,F=x[C];F===-1?((M&o)===0||(M&d)!==0)&&(x[C]=Qt(M,s)):F<=s&&(r.expiredLanes|=M),v&=~M}if(s=gt,o=Je,o=Ie(r,r===s?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===s&&(ut===2||ut===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&ri(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||jt(r,o)){if(s=o&-o,s===r.callbackPriority)return s;switch(d!==null&&ri(d),Ir(o)){case 2:case 8:o=ye;break;case 32:o=Oe;break;case 268435456:o=Ke;break;default:o=Oe}return d=Jb.bind(null,r),o=ls(o,d),r.callbackPriority=s,r.callbackNode=o,s}return d!==null&&d!==null&&ri(d),r.callbackPriority=2,r.callbackNode=null,2}function Jb(r,s){if(Gt!==0&&Gt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(bd()&&r.callbackNode!==o)return null;var d=Je;return d=Ie(r,r===gt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(_b(r,d,s),Zb(r,tn()),r.callbackNode!=null&&r.callbackNode===o?Jb.bind(null,r):null)}function e1(r,s){if(bd())return null;_b(r,s,!0)}function k4(){I4(function(){(lt&6)!==0?ls(oe,C4):Wb()})}function lp(){if(ks===0){var r=jl;r===0&&(r=tl,tl<<=1,(tl&261888)===0&&(tl=256)),ks=r}return ks}function t1(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ru(""+r)}function n1(r,s){var o=s.ownerDocument.createElement("input");return o.name=s.name,o.value=s.value,r.id&&o.setAttribute("form",r.id),s.parentNode.insertBefore(o,s),r=new FormData(r),o.parentNode.removeChild(o),r}function E4(r,s,o,d,x){if(s==="submit"&&o&&o.stateNode===x){var v=t1((x[Ln]||null).action),C=d.submitter;C&&(s=(s=C[Ln]||null)?t1(s.formAction):C.getAttribute("formAction"),s!==null&&(v=s,C=null));var M=new _u("action","action",null,d,x);r.push({event:M,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ks!==0){var F=C?n1(x,C):new FormData(x);Eh(o,{pending:!0,data:F,method:x.method,action:v},null,F)}}else typeof v=="function"&&(M.preventDefault(),F=C?n1(x,C):new FormData(x),Eh(o,{pending:!0,data:F,method:x.method,action:v},v,F))},currentTarget:x}]})}}for(var op=0;op<Vm.length;op++){var cp=Vm[op],T4=cp.toLowerCase(),A4=cp[0].toUpperCase()+cp.slice(1);Ur(T4,"on"+A4)}Ur(Ov,"onAnimationEnd"),Ur(_v,"onAnimationIteration"),Ur(Pv,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur($E,"onTransitionRun"),Ur(GE,"onTransitionStart"),Ur(YE,"onTransitionCancel"),Ur(zv,"onTransitionEnd"),ol("onMouseEnter",["mouseout","mouseover"]),ol("onMouseLeave",["mouseout","mouseover"]),ol("onPointerEnter",["pointerout","pointerover"]),ol("onPointerLeave",["pointerout","pointerover"]),ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ii("onBeforeInput",["compositionend","keypress","textInput","paste"]),ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wc="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(" "),R4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wc));function r1(r,s){s=(s&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],x=d.event;d=d.listeners;e:{var v=void 0;if(s)for(var C=d.length-1;0<=C;C--){var M=d[C],F=M.instance,Z=M.currentTarget;if(M=M.listener,F!==v&&x.isPropagationStopped())break e;v=M,x.currentTarget=Z;try{v(x)}catch(le){Lu(le)}x.currentTarget=null,v=F}else for(C=0;C<d.length;C++){if(M=d[C],F=M.instance,Z=M.currentTarget,M=M.listener,F!==v&&x.isPropagationStopped())break e;v=M,x.currentTarget=Z;try{v(x)}catch(le){Lu(le)}x.currentTarget=null,v=F}}}}function Xe(r,s){var o=s[jm];o===void 0&&(o=s[jm]=new Set);var d=r+"__bubble";o.has(d)||(a1(s,r,2,!1),o.add(d))}function up(r,s,o){var d=0;s&&(d|=4),a1(o,r,d,s)}var Nd="_reactListening"+Math.random().toString(36).slice(2);function dp(r){if(!r[Nd]){r[Nd]=!0,Wy.forEach(function(o){o!=="selectionchange"&&(R4.has(o)||up(o,!1,r),up(o,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Nd]||(s[Nd]=!0,up("selectionchange",!1,s))}}function a1(r,s,o,d){switch(O1(s)){case 2:var x=aT;break;case 8:x=sT;break;default:x=kp}o=x.bind(null,s,o,r),x=void 0,!Mm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),d?x!==void 0?r.addEventListener(s,o,{capture:!0,passive:x}):r.addEventListener(s,o,!0):x!==void 0?r.addEventListener(s,o,{passive:x}):r.addEventListener(s,o,!1)}function fp(r,s,o,d,x){var v=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var C=d.tag;if(C===3||C===4){var M=d.stateNode.containerInfo;if(M===x)break;if(C===4)for(C=d.return;C!==null;){var F=C.tag;if((F===3||F===4)&&C.stateNode.containerInfo===x)return;C=C.return}for(;M!==null;){if(C=sl(M),C===null)return;if(F=C.tag,F===5||F===6||F===26||F===27){d=v=C;continue e}M=M.parentNode}}d=d.return}cv(function(){var Z=v,le=Am(o),de=[];e:{var ee=Lv.get(r);if(ee!==void 0){var re=_u,Se=r;switch(r){case"keypress":if(Du(o)===0)break e;case"keydown":case"keyup":re=NE;break;case"focusin":Se="focus",re=Pm;break;case"focusout":Se="blur",re=Pm;break;case"beforeblur":case"afterblur":re=Pm;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=fv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=dE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=kE;break;case Ov:case _v:case Pv:re=hE;break;case zv:re=TE;break;case"scroll":case"scrollend":re=cE;break;case"wheel":re=RE;break;case"copy":case"cut":case"paste":re=gE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=hv;break;case"toggle":case"beforetoggle":re=DE}var _e=(s&4)!==0,ht=!_e&&(r==="scroll"||r==="scrollend"),K=_e?ee!==null?ee+"Capture":null:ee;_e=[];for(var V=Z,W;V!==null;){var ce=V;if(W=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||W===null||K===null||(ce=qo(V,K),ce!=null&&_e.push(jc(V,ce,W))),ht)break;V=V.return}0<_e.length&&(ee=new re(ee,Se,null,o,le),de.push({event:ee,listeners:_e}))}}if((s&7)===0){e:{if(ee=r==="mouseover"||r==="pointerover",re=r==="mouseout"||r==="pointerout",ee&&o!==Tm&&(Se=o.relatedTarget||o.fromElement)&&(sl(Se)||Se[al]))break e;if((re||ee)&&(ee=le.window===le?le:(ee=le.ownerDocument)?ee.defaultView||ee.parentWindow:window,re?(Se=o.relatedTarget||o.toElement,re=Z,Se=Se?sl(Se):null,Se!==null&&(ht=c(Se),_e=Se.tag,Se!==ht||_e!==5&&_e!==27&&_e!==6)&&(Se=null)):(re=null,Se=Z),re!==Se)){if(_e=fv,ce="onMouseLeave",K="onMouseEnter",V="mouse",(r==="pointerout"||r==="pointerover")&&(_e=hv,ce="onPointerLeave",K="onPointerEnter",V="pointer"),ht=re==null?ee:Ho(re),W=Se==null?ee:Ho(Se),ee=new _e(ce,V+"leave",re,o,le),ee.target=ht,ee.relatedTarget=W,ce=null,sl(le)===Z&&(_e=new _e(K,V+"enter",Se,o,le),_e.target=W,_e.relatedTarget=ht,ce=_e),ht=ce,re&&Se)t:{for(_e=M4,K=re,V=Se,W=0,ce=K;ce;ce=_e(ce))W++;ce=0;for(var Me=V;Me;Me=_e(Me))ce++;for(;0<W-ce;)K=_e(K),W--;for(;0<ce-W;)V=_e(V),ce--;for(;W--;){if(K===V||V!==null&&K===V.alternate){_e=K;break t}K=_e(K),V=_e(V)}_e=null}else _e=null;re!==null&&s1(de,ee,re,_e,!1),Se!==null&&ht!==null&&s1(de,ht,Se,_e,!0)}}e:{if(ee=Z?Ho(Z):window,re=ee.nodeName&&ee.nodeName.toLowerCase(),re==="select"||re==="input"&&ee.type==="file")var st=jv;else if(bv(ee))if(Nv)st=HE;else{st=BE;var Ee=UE}else re=ee.nodeName,!re||re.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?Z&&Em(Z.elementType)&&(st=jv):st=FE;if(st&&(st=st(r,Z))){wv(de,st,o,le);break e}Ee&&Ee(r,ee,Z),r==="focusout"&&Z&&ee.type==="number"&&Z.memoizedProps.value!=null&&km(ee,"number",ee.value)}switch(Ee=Z?Ho(Z):window,r){case"focusin":(bv(Ee)||Ee.contentEditable==="true")&&(hl=Ee,Fm=Z,Wo=null);break;case"focusout":Wo=Fm=hl=null;break;case"mousedown":Hm=!0;break;case"contextmenu":case"mouseup":case"dragend":Hm=!1,Mv(de,o,le);break;case"selectionchange":if(VE)break;case"keydown":case"keyup":Mv(de,o,le)}var Ve;if(Lm)e:{switch(r){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else ml?yv(r,o)&&(et="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(et="onCompositionStart");et&&(pv&&o.locale!=="ko"&&(ml||et!=="onCompositionStart"?et==="onCompositionEnd"&&ml&&(Ve=uv()):(us=le,Dm="value"in us?us.value:us.textContent,ml=!0)),Ee=Sd(Z,et),0<Ee.length&&(et=new mv(et,r,null,o,le),de.push({event:et,listeners:Ee}),Ve?et.data=Ve:(Ve=vv(o),Ve!==null&&(et.data=Ve)))),(Ve=_E?PE(r,o):zE(r,o))&&(et=Sd(Z,"onBeforeInput"),0<et.length&&(Ee=new mv("onBeforeInput","beforeinput",null,o,le),de.push({event:Ee,listeners:et}),Ee.data=Ve)),E4(de,r,Z,o,le)}r1(de,s)})}function jc(r,s,o){return{instance:r,listener:s,currentTarget:o}}function Sd(r,s){for(var o=s+"Capture",d=[];r!==null;){var x=r,v=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||v===null||(x=qo(r,o),x!=null&&d.unshift(jc(r,x,v)),x=qo(r,s),x!=null&&d.push(jc(r,x,v))),r.tag===3)return d;r=r.return}return[]}function M4(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function s1(r,s,o,d,x){for(var v=s._reactName,C=[];o!==null&&o!==d;){var M=o,F=M.alternate,Z=M.stateNode;if(M=M.tag,F!==null&&F===d)break;M!==5&&M!==26&&M!==27||Z===null||(F=Z,x?(Z=qo(o,v),Z!=null&&C.unshift(jc(o,Z,F))):x||(Z=qo(o,v),Z!=null&&C.push(jc(o,Z,F)))),o=o.return}C.length!==0&&r.push({event:s,listeners:C})}var D4=/\r\n?/g,O4=/\u0000|\uFFFD/g;function i1(r){return(typeof r=="string"?r:""+r).replace(D4,`
|
|
49
|
+
`).replace(O4,"")}function l1(r,s){return s=i1(s),i1(r)===s}function mt(r,s,o,d,x,v){switch(o){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||ul(r,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&ul(r,""+d);break;case"className":Tu(r,"class",d);break;case"tabIndex":Tu(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Tu(r,o,d);break;case"style":lv(r,d,v);break;case"data":if(s!=="object"){Tu(r,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Ru(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(o==="formAction"?(s!=="input"&&mt(r,s,"name",x.name,x,null),mt(r,s,"formEncType",x.formEncType,x,null),mt(r,s,"formMethod",x.formMethod,x,null),mt(r,s,"formTarget",x.formTarget,x,null)):(mt(r,s,"encType",x.encType,x,null),mt(r,s,"method",x.method,x,null),mt(r,s,"target",x.target,x,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=Ru(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=Ta);break;case"onScroll":d!=null&&Xe("scroll",r);break;case"onScrollEnd":d!=null&&Xe("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(o=d.__html,o!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=Ru(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":Xe("beforetoggle",r),Xe("toggle",r),Eu(r,"popover",d);break;case"xlinkActuate":Ea(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Ea(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Ea(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Ea(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Ea(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Ea(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Ea(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Ea(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Ea(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Eu(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=lE.get(o)||o,Eu(r,o,d))}}function mp(r,s,o,d,x,v){switch(o){case"style":lv(r,d,v);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(o=d.__html,o!=null){if(x.children!=null)throw Error(i(60));r.innerHTML=o}}break;case"children":typeof d=="string"?ul(r,d):(typeof d=="number"||typeof d=="bigint")&&ul(r,""+d);break;case"onScroll":d!=null&&Xe("scroll",r);break;case"onScrollEnd":d!=null&&Xe("scrollend",r);break;case"onClick":d!=null&&(r.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zy.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(x=o.endsWith("Capture"),s=o.slice(2,x?o.length-7:void 0),v=r[Ln]||null,v=v!=null?v[o]:null,typeof v=="function"&&r.removeEventListener(s,v,x),typeof d=="function")){typeof v!="function"&&v!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(s,d,x);break e}o in r?r[o]=d:d===!0?r.setAttribute(o,""):Eu(r,o,d)}}}function cn(r,s,o){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",r),Xe("load",r);var d=!1,x=!1,v;for(v in o)if(o.hasOwnProperty(v)){var C=o[v];if(C!=null)switch(v){case"src":d=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:mt(r,s,v,C,o,null)}}x&&mt(r,s,"srcSet",o.srcSet,o,null),d&&mt(r,s,"src",o.src,o,null);return;case"input":Xe("invalid",r);var M=v=C=x=null,F=null,Z=null;for(d in o)if(o.hasOwnProperty(d)){var le=o[d];if(le!=null)switch(d){case"name":x=le;break;case"type":C=le;break;case"checked":F=le;break;case"defaultChecked":Z=le;break;case"value":v=le;break;case"defaultValue":M=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,s));break;default:mt(r,s,d,le,o,null)}}rv(r,v,M,F,Z,C,x,!1);return;case"select":Xe("invalid",r),d=C=v=null;for(x in o)if(o.hasOwnProperty(x)&&(M=o[x],M!=null))switch(x){case"value":v=M;break;case"defaultValue":C=M;break;case"multiple":d=M;default:mt(r,s,x,M,o,null)}s=v,o=C,r.multiple=!!d,s!=null?cl(r,!!d,s,!1):o!=null&&cl(r,!!d,o,!0);return;case"textarea":Xe("invalid",r),v=x=d=null;for(C in o)if(o.hasOwnProperty(C)&&(M=o[C],M!=null))switch(C){case"value":d=M;break;case"defaultValue":x=M;break;case"children":v=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(i(91));break;default:mt(r,s,C,M,o,null)}sv(r,d,x,v);return;case"option":for(F in o)if(o.hasOwnProperty(F)&&(d=o[F],d!=null))switch(F){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:mt(r,s,F,d,o,null)}return;case"dialog":Xe("beforetoggle",r),Xe("toggle",r),Xe("cancel",r),Xe("close",r);break;case"iframe":case"object":Xe("load",r);break;case"video":case"audio":for(d=0;d<wc.length;d++)Xe(wc[d],r);break;case"image":Xe("error",r),Xe("load",r);break;case"details":Xe("toggle",r);break;case"embed":case"source":case"link":Xe("error",r),Xe("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in o)if(o.hasOwnProperty(Z)&&(d=o[Z],d!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:mt(r,s,Z,d,o,null)}return;default:if(Em(s)){for(le in o)o.hasOwnProperty(le)&&(d=o[le],d!==void 0&&mp(r,s,le,d,o,void 0));return}}for(M in o)o.hasOwnProperty(M)&&(d=o[M],d!=null&&mt(r,s,M,d,o,null))}function _4(r,s,o,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,v=null,C=null,M=null,F=null,Z=null,le=null;for(re in o){var de=o[re];if(o.hasOwnProperty(re)&&de!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":F=de;default:d.hasOwnProperty(re)||mt(r,s,re,null,d,de)}}for(var ee in d){var re=d[ee];if(de=o[ee],d.hasOwnProperty(ee)&&(re!=null||de!=null))switch(ee){case"type":v=re;break;case"name":x=re;break;case"checked":Z=re;break;case"defaultChecked":le=re;break;case"value":C=re;break;case"defaultValue":M=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(i(137,s));break;default:re!==de&&mt(r,s,ee,re,d,de)}}Cm(r,C,M,F,Z,le,v,x);return;case"select":re=C=M=ee=null;for(v in o)if(F=o[v],o.hasOwnProperty(v)&&F!=null)switch(v){case"value":break;case"multiple":re=F;default:d.hasOwnProperty(v)||mt(r,s,v,null,d,F)}for(x in d)if(v=d[x],F=o[x],d.hasOwnProperty(x)&&(v!=null||F!=null))switch(x){case"value":ee=v;break;case"defaultValue":M=v;break;case"multiple":C=v;default:v!==F&&mt(r,s,x,v,d,F)}s=M,o=C,d=re,ee!=null?cl(r,!!o,ee,!1):!!d!=!!o&&(s!=null?cl(r,!!o,s,!0):cl(r,!!o,o?[]:"",!1));return;case"textarea":re=ee=null;for(M in o)if(x=o[M],o.hasOwnProperty(M)&&x!=null&&!d.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:mt(r,s,M,null,d,x)}for(C in d)if(x=d[C],v=o[C],d.hasOwnProperty(C)&&(x!=null||v!=null))switch(C){case"value":ee=x;break;case"defaultValue":re=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(i(91));break;default:x!==v&&mt(r,s,C,x,d,v)}av(r,ee,re);return;case"option":for(var Se in o)if(ee=o[Se],o.hasOwnProperty(Se)&&ee!=null&&!d.hasOwnProperty(Se))switch(Se){case"selected":r.selected=!1;break;default:mt(r,s,Se,null,d,ee)}for(F in d)if(ee=d[F],re=o[F],d.hasOwnProperty(F)&&ee!==re&&(ee!=null||re!=null))switch(F){case"selected":r.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:mt(r,s,F,ee,d,re)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var _e in o)ee=o[_e],o.hasOwnProperty(_e)&&ee!=null&&!d.hasOwnProperty(_e)&&mt(r,s,_e,null,d,ee);for(Z in d)if(ee=d[Z],re=o[Z],d.hasOwnProperty(Z)&&ee!==re&&(ee!=null||re!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(i(137,s));break;default:mt(r,s,Z,ee,d,re)}return;default:if(Em(s)){for(var ht in o)ee=o[ht],o.hasOwnProperty(ht)&&ee!==void 0&&!d.hasOwnProperty(ht)&&mp(r,s,ht,void 0,d,ee);for(le in d)ee=d[le],re=o[le],!d.hasOwnProperty(le)||ee===re||ee===void 0&&re===void 0||mp(r,s,le,ee,d,re);return}}for(var K in o)ee=o[K],o.hasOwnProperty(K)&&ee!=null&&!d.hasOwnProperty(K)&&mt(r,s,K,null,d,ee);for(de in d)ee=d[de],re=o[de],!d.hasOwnProperty(de)||ee===re||ee==null&&re==null||mt(r,s,de,ee,d,re)}function o1(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function P4(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var x=o[d],v=x.transferSize,C=x.initiatorType,M=x.duration;if(v&&M&&o1(C)){for(C=0,M=x.responseEnd,d+=1;d<o.length;d++){var F=o[d],Z=F.startTime;if(Z>M)break;var le=F.transferSize,de=F.initiatorType;le&&o1(de)&&(F=F.responseEnd,C+=le*(F<M?1:(M-Z)/(F-Z)))}if(--d,s+=8*(v+C)/(x.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var hp=null,pp=null;function Cd(r){return r.nodeType===9?r:r.ownerDocument}function c1(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function u1(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function gp(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var xp=null;function z4(){var r=window.event;return r&&r.type==="popstate"?r===xp?!1:(xp=r,!0):(xp=null,!1)}var d1=typeof setTimeout=="function"?setTimeout:void 0,L4=typeof clearTimeout=="function"?clearTimeout:void 0,f1=typeof Promise=="function"?Promise:void 0,I4=typeof queueMicrotask=="function"?queueMicrotask:typeof f1<"u"?function(r){return f1.resolve(null).then(r).catch(U4)}:d1;function U4(r){setTimeout(function(){throw r})}function Es(r){return r==="head"}function m1(r,s){var o=s,d=0;do{var x=o.nextSibling;if(r.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(x),Fl(s);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")Nc(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,Nc(o);for(var v=o.firstChild;v;){var C=v.nextSibling,M=v.nodeName;v[Fo]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&v.rel.toLowerCase()==="stylesheet"||o.removeChild(v),v=C}}else o==="body"&&Nc(r.ownerDocument.body);o=x}while(o);Fl(s)}function h1(r,s){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?s?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(s?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function yp(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var o=s;switch(s=s.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":yp(o),Nm(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function B4(r,s,o,d){for(;r.nodeType===1;){var x=o;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Fo])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(v=r.getAttribute("rel"),v==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(v!==x.rel||r.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||r.getAttribute("title")!==(x.title==null?null:x.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(v=r.getAttribute("src"),(v!==(x.src==null?null:x.src)||r.getAttribute("type")!==(x.type==null?null:x.type)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&v&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var v=x.name==null?null:""+x.name;if(x.type==="hidden"&&r.getAttribute("name")===v)return r}else return r;if(r=kr(r.nextSibling),r===null)break}return null}function F4(r,s,o){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=kr(r.nextSibling),r===null))return null;return r}function p1(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=kr(r.nextSibling),r===null))return null;return r}function vp(r){return r.data==="$?"||r.data==="$~"}function bp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function H4(r,s){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||o.readyState!=="loading")s();else{var d=function(){s(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function kr(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==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var wp=null;function g1(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(s===0)return kr(r.nextSibling);s--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||s++}r=r.nextSibling}return null}function x1(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(s===0)return r;s--}else o!=="/$"&&o!=="/&"||s++}r=r.previousSibling}return null}function y1(r,s,o){switch(s=Cd(o),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Nc(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);Nm(r)}var Er=new Map,v1=new Set;function kd(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Va=Q.d;Q.d={f:q4,r:V4,D:$4,C:G4,L:Y4,m:K4,X:X4,S:Q4,M:W4};function q4(){var r=Va.f(),s=xd();return r||s}function V4(r){var s=il(r);s!==null&&s.tag===5&&s.type==="form"?z0(s):Va.r(r)}var Il=typeof document>"u"?null:document;function b1(r,s,o){var d=Il;if(d&&typeof s=="string"&&s){var x=vr(s);x='link[rel="'+r+'"][href="'+x+'"]',typeof o=="string"&&(x+='[crossorigin="'+o+'"]'),v1.has(x)||(v1.add(x),r={rel:r,crossOrigin:o,href:s},d.querySelector(x)===null&&(s=d.createElement("link"),cn(s,"link",r),Xt(s),d.head.appendChild(s)))}}function $4(r){Va.D(r),b1("dns-prefetch",r,null)}function G4(r,s){Va.C(r,s),b1("preconnect",r,s)}function Y4(r,s,o){Va.L(r,s,o);var d=Il;if(d&&r&&s){var x='link[rel="preload"][as="'+vr(s)+'"]';s==="image"&&o&&o.imageSrcSet?(x+='[imagesrcset="'+vr(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(x+='[imagesizes="'+vr(o.imageSizes)+'"]')):x+='[href="'+vr(r)+'"]';var v=x;switch(s){case"style":v=Ul(r);break;case"script":v=Bl(r)}Er.has(v)||(r=p({rel:"preload",href:s==="image"&&o&&o.imageSrcSet?void 0:r,as:s},o),Er.set(v,r),d.querySelector(x)!==null||s==="style"&&d.querySelector(Sc(v))||s==="script"&&d.querySelector(Cc(v))||(s=d.createElement("link"),cn(s,"link",r),Xt(s),d.head.appendChild(s)))}}function K4(r,s){Va.m(r,s);var o=Il;if(o&&r){var d=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+vr(d)+'"][href="'+vr(r)+'"]',v=x;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Bl(r)}if(!Er.has(v)&&(r=p({rel:"modulepreload",href:r},s),Er.set(v,r),o.querySelector(x)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Cc(v)))return}d=o.createElement("link"),cn(d,"link",r),Xt(d),o.head.appendChild(d)}}}function Q4(r,s,o){Va.S(r,s,o);var d=Il;if(d&&r){var x=ll(d).hoistableStyles,v=Ul(r);s=s||"default";var C=x.get(v);if(!C){var M={loading:0,preload:null};if(C=d.querySelector(Sc(v)))M.loading=5;else{r=p({rel:"stylesheet",href:r,"data-precedence":s},o),(o=Er.get(v))&&jp(r,o);var F=C=d.createElement("link");Xt(F),cn(F,"link",r),F._p=new Promise(function(Z,le){F.onload=Z,F.onerror=le}),F.addEventListener("load",function(){M.loading|=1}),F.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Ed(C,s,d)}C={type:"stylesheet",instance:C,count:1,state:M},x.set(v,C)}}}function X4(r,s){Va.X(r,s);var o=Il;if(o&&r){var d=ll(o).hoistableScripts,x=Bl(r),v=d.get(x);v||(v=o.querySelector(Cc(x)),v||(r=p({src:r,async:!0},s),(s=Er.get(x))&&Np(r,s),v=o.createElement("script"),Xt(v),cn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(x,v))}}function W4(r,s){Va.M(r,s);var o=Il;if(o&&r){var d=ll(o).hoistableScripts,x=Bl(r),v=d.get(x);v||(v=o.querySelector(Cc(x)),v||(r=p({src:r,async:!0,type:"module"},s),(s=Er.get(x))&&Np(r,s),v=o.createElement("script"),Xt(v),cn(v,"link",r),o.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},d.set(x,v))}}function w1(r,s,o,d){var x=(x=fe.current)?kd(x):null;if(!x)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(s=Ul(o.href),o=ll(x).hoistableStyles,d=o.get(s),d||(d={type:"style",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Ul(o.href);var v=ll(x).hoistableStyles,C=v.get(r);if(C||(x=x.ownerDocument||x,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(r,C),(v=x.querySelector(Sc(r)))&&!v._p&&(C.instance=v,C.state.loading=5),Er.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Er.set(r,o),v||Z4(x,r,o,C.state))),s&&d===null)throw Error(i(528,""));return C}if(s&&d!==null)throw Error(i(529,""));return null;case"script":return s=o.async,o=o.src,typeof o=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Bl(o),o=ll(x).hoistableScripts,d=o.get(s),d||(d={type:"script",instance:null,count:0,state:null},o.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Ul(r){return'href="'+vr(r)+'"'}function Sc(r){return'link[rel="stylesheet"]['+r+"]"}function j1(r){return p({},r,{"data-precedence":r.precedence,precedence:null})}function Z4(r,s,o,d){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=r.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),cn(s,"link",o),Xt(s),r.head.appendChild(s))}function Bl(r){return'[src="'+vr(r)+'"]'}function Cc(r){return"script[async]"+r}function N1(r,s,o){if(s.count++,s.instance===null)switch(s.type){case"style":var d=r.querySelector('style[data-href~="'+vr(o.href)+'"]');if(d)return s.instance=d,Xt(d),d;var x=p({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),Xt(d),cn(d,"style",x),Ed(d,o.precedence,r),s.instance=d;case"stylesheet":x=Ul(o.href);var v=r.querySelector(Sc(x));if(v)return s.state.loading|=4,s.instance=v,Xt(v),v;d=j1(o),(x=Er.get(x))&&jp(d,x),v=(r.ownerDocument||r).createElement("link"),Xt(v);var C=v;return C._p=new Promise(function(M,F){C.onload=M,C.onerror=F}),cn(v,"link",d),s.state.loading|=4,Ed(v,o.precedence,r),s.instance=v;case"script":return v=Bl(o.src),(x=r.querySelector(Cc(v)))?(s.instance=x,Xt(x),x):(d=o,(x=Er.get(v))&&(d=p({},o),Np(d,x)),r=r.ownerDocument||r,x=r.createElement("script"),Xt(x),cn(x,"link",d),r.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Ed(d,o.precedence,r));return s.instance}function Ed(r,s,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=d.length?d[d.length-1]:null,v=x,C=0;C<d.length;C++){var M=d[C];if(M.dataset.precedence===s)v=M;else if(v!==x)break}v?v.parentNode.insertBefore(r,v.nextSibling):(s=o.nodeType===9?o.head:o,s.insertBefore(r,s.firstChild))}function jp(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function Np(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var Td=null;function S1(r,s,o){if(Td===null){var d=new Map,x=Td=new Map;x.set(o,d)}else x=Td,d=x.get(o),d||(d=new Map,x.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),x=0;x<o.length;x++){var v=o[x];if(!(v[Fo]||v[an]||r==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var C=v.getAttribute(s)||"";C=r+C;var M=d.get(C);M?M.push(v):d.set(C,[v])}}return d}function C1(r,s,o){r=r.ownerDocument||r,r.head.insertBefore(o,s==="title"?r.querySelector("head > title"):null)}function J4(r,s,o){if(o===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return r=s.disabled,typeof s.precedence=="string"&&r==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function k1(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function eT(r,s,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var x=Ul(d.href),v=s.querySelector(Sc(x));if(v){s=v._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=Ad.bind(r),s.then(r,r)),o.state.loading|=4,o.instance=v,Xt(v);return}v=s.ownerDocument||s,d=j1(d),(x=Er.get(x))&&jp(d,x),v=v.createElement("link"),Xt(v);var C=v;C._p=new Promise(function(M,F){C.onload=M,C.onerror=F}),cn(v,"link",d),o.instance=v}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,s),(s=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=Ad.bind(r),s.addEventListener("load",o),s.addEventListener("error",o))}}var Sp=0;function tT(r,s){return r.stylesheets&&r.count===0&&Md(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Md(r,r.stylesheets),r.unsuspend){var v=r.unsuspend;r.unsuspend=null,v()}},6e4+s);0<r.imgBytes&&Sp===0&&(Sp=62500*P4());var x=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Md(r,r.stylesheets),r.unsuspend)){var v=r.unsuspend;r.unsuspend=null,v()}},(r.imgBytes>Sp?50:800)+s);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(x)}}:null}function Ad(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Md(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Rd=null;function Md(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Rd=new Map,s.forEach(nT,r),Rd=null,Ad.call(r))}function nT(r,s){if(!(s.state.loading&4)){var o=Rd.get(r);if(o)var d=o.get(null);else{o=new Map,Rd.set(r,o);for(var x=r.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<x.length;v++){var C=x[v];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(o.set(C.dataset.precedence,C),d=C)}d&&o.set(null,d)}x=s.instance,C=x.getAttribute("data-precedence"),v=o.get(C)||d,v===d&&o.set(null,x),o.set(C,x),this.count++,d=Ad.bind(this),x.addEventListener("load",d),x.addEventListener("error",d),v?v.parentNode.insertBefore(x,v.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(x,r.firstChild)),s.state.loading|=4}}var kc={$$typeof:k,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function rT(r,s,o,d,x,v,C,M,F){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=os(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=os(0),this.hiddenUpdates=os(null),this.identifierPrefix=d,this.onUncaughtError=x,this.onCaughtError=v,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function E1(r,s,o,d,x,v,C,M,F,Z,le,de){return r=new rT(r,s,o,C,F,Z,le,de,M),s=1,v===!0&&(s|=24),v=tr(3,null,null,s),r.current=v,v.stateNode=r,s=rh(),s.refCount++,r.pooledCache=s,s.refCount++,v.memoizedState={element:d,isDehydrated:o,cache:s},lh(v),r}function T1(r){return r?(r=xl,r):xl}function A1(r,s,o,d,x,v){x=T1(x),d.context===null?d.context=x:d.pendingContext=x,d=gs(s),d.payload={element:o},v=v===void 0?null:v,v!==null&&(d.callback=v),o=xs(r,d,s),o!==null&&(qn(o,r,s),ac(o,r,s))}function R1(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<s?o:s}}function Cp(r,s){R1(r,s),(r=r.alternate)&&R1(r,s)}function M1(r){if(r.tag===13||r.tag===31){var s=ui(r,67108864);s!==null&&qn(s,r,67108864),Cp(r,67108864)}}function D1(r){if(r.tag===13||r.tag===31){var s=ir();s=rl(s);var o=ui(r,s);o!==null&&qn(o,r,s),Cp(r,s)}}var Dd=!0;function aT(r,s,o,d){var x=I.T;I.T=null;var v=Q.p;try{Q.p=2,kp(r,s,o,d)}finally{Q.p=v,I.T=x}}function sT(r,s,o,d){var x=I.T;I.T=null;var v=Q.p;try{Q.p=8,kp(r,s,o,d)}finally{Q.p=v,I.T=x}}function kp(r,s,o,d){if(Dd){var x=Ep(d);if(x===null)fp(r,s,d,Od,o),_1(r,d);else if(lT(x,r,s,o,d))d.stopPropagation();else if(_1(r,d),s&4&&-1<iT.indexOf(r)){for(;x!==null;){var v=il(x);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var C=ra(v.pendingLanes);if(C!==0){var M=v;for(M.pendingLanes|=2,M.entangledLanes|=2;C;){var F=1<<31-ot(C);M.entanglements[1]|=F,C&=~F}la(v),(lt&6)===0&&(pd=tn()+500,bc(0))}}break;case 31:case 13:M=ui(v,2),M!==null&&qn(M,v,2),xd(),Cp(v,2)}if(v=Ep(d),v===null&&fp(r,s,d,Od,o),v===x)break;x=v}x!==null&&d.stopPropagation()}else fp(r,s,d,null,o)}}function Ep(r){return r=Am(r),Tp(r)}var Od=null;function Tp(r){if(Od=null,r=sl(r),r!==null){var s=c(r);if(s===null)r=null;else{var o=s.tag;if(o===13){if(r=u(s),r!==null)return r;r=null}else if(o===31){if(r=f(s),r!==null)return r;r=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return Od=r,null}function O1(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Bo()){case oe:return 2;case ye:return 8;case Oe:case qe:return 32;case Ke:return 268435456;default:return 32}default:return 32}}var Ap=!1,Ts=null,As=null,Rs=null,Ec=new Map,Tc=new Map,Ms=[],iT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function _1(r,s){switch(r){case"focusin":case"focusout":Ts=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Rs=null;break;case"pointerover":case"pointerout":Ec.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tc.delete(s.pointerId)}}function Ac(r,s,o,d,x,v){return r===null||r.nativeEvent!==v?(r={blockedOn:s,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[x]},s!==null&&(s=il(s),s!==null&&M1(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),r)}function lT(r,s,o,d,x){switch(s){case"focusin":return Ts=Ac(Ts,r,s,o,d,x),!0;case"dragenter":return As=Ac(As,r,s,o,d,x),!0;case"mouseover":return Rs=Ac(Rs,r,s,o,d,x),!0;case"pointerover":var v=x.pointerId;return Ec.set(v,Ac(Ec.get(v)||null,r,s,o,d,x)),!0;case"gotpointercapture":return v=x.pointerId,Tc.set(v,Ac(Tc.get(v)||null,r,s,o,d,x)),!0}return!1}function P1(r){var s=sl(r.target);if(s!==null){var o=c(s);if(o!==null){if(s=o.tag,s===13){if(s=u(o),s!==null){r.blockedOn=s,Qy(r.priority,function(){D1(o)});return}}else if(s===31){if(s=f(o),s!==null){r.blockedOn=s,Qy(r.priority,function(){D1(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function _d(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var o=Ep(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Tm=d,o.target.dispatchEvent(d),Tm=null}else return s=il(o),s!==null&&M1(s),r.blockedOn=o,!1;s.shift()}return!0}function z1(r,s,o){_d(r)&&o.delete(s)}function oT(){Ap=!1,Ts!==null&&_d(Ts)&&(Ts=null),As!==null&&_d(As)&&(As=null),Rs!==null&&_d(Rs)&&(Rs=null),Ec.forEach(z1),Tc.forEach(z1)}function Pd(r,s){r.blockedOn===s&&(r.blockedOn=null,Ap||(Ap=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,oT)))}var zd=null;function L1(r){zd!==r&&(zd=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){zd===r&&(zd=null);for(var s=0;s<r.length;s+=3){var o=r[s],d=r[s+1],x=r[s+2];if(typeof d!="function"){if(Tp(d||o)===null)continue;break}var v=il(o);v!==null&&(r.splice(s,3),s-=3,Eh(v,{pending:!0,data:x,method:o.method,action:d},d,x))}}))}function Fl(r){function s(F){return Pd(F,r)}Ts!==null&&Pd(Ts,r),As!==null&&Pd(As,r),Rs!==null&&Pd(Rs,r),Ec.forEach(s),Tc.forEach(s);for(var o=0;o<Ms.length;o++){var d=Ms[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Ms.length&&(o=Ms[0],o.blockedOn===null);)P1(o),o.blockedOn===null&&Ms.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var x=o[d],v=o[d+1],C=x[Ln]||null;if(typeof v=="function")C||L1(o);else if(C){var M=null;if(v&&v.hasAttribute("formAction")){if(x=v,C=v[Ln]||null)M=C.formAction;else if(Tp(x)!==null)continue}else M=C.action;typeof M=="function"?o[d+1]=M:(o.splice(d,3),d-=3),L1(o)}}}function I1(){function r(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(C){return x=C})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,x=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function Rp(r){this._internalRoot=r}Ld.prototype.render=Rp.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var o=s.current,d=ir();A1(o,d,r,s,null,null)},Ld.prototype.unmount=Rp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;A1(r.current,2,null,r,null,null),xd(),s[al]=null}};function Ld(r){this._internalRoot=r}Ld.prototype.unstable_scheduleHydration=function(r){if(r){var s=wm();r={blockedOn:null,target:r,priority:s};for(var o=0;o<Ms.length&&s!==0&&s<Ms[o].priority;o++);Ms.splice(o,0,r),o===0&&P1(r)}};var U1=t.version;if(U1!=="19.2.4")throw Error(i(527,U1,"19.2.4"));Q.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=m(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var cT={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Id=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Id.isDisabled&&Id.supportsFiber)try{nn=Id.inject(cT),_t=Id}catch{}}return Mc.createRoot=function(r,s){if(!l(r))throw Error(i(299));var o=!1,d="",x=G0,v=Y0,C=K0;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError)),s=E1(r,1,!1,null,null,o,d,null,x,v,C,I1),r[al]=s.current,dp(r),new Rp(s)},Mc.hydrateRoot=function(r,s,o){if(!l(r))throw Error(i(299));var d=!1,x="",v=G0,C=Y0,M=K0,F=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(x=o.identifierPrefix),o.onUncaughtError!==void 0&&(v=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError),o.formState!==void 0&&(F=o.formState)),s=E1(r,1,!0,s,o??null,d,x,F,v,C,M,I1),s.context=T1(null),o=s.current,d=ir(),d=rl(d),x=gs(d),x.callback=null,xs(o,x,d),o=d,s.current.lanes=o,kt(s,o),la(s),r[al]=s.current,dp(r),new Ld(s)},Mc.version="19.2.4",Mc}var X1;function vT(){if(X1)return _p.exports;X1=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(),_p.exports=yT(),_p.exports}var bT=vT(),So=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Bs,kx,iN,jT=(iN=class{constructor(){Re(this,Bs,wT);Re(this,kx,!1)}setTimeoutProvider(e){je(this,Bs,e)}setTimeout(e,t){return H(this,Bs).setTimeout(e,t)}clearTimeout(e){H(this,Bs).clearTimeout(e)}setInterval(e,t){return H(this,Bs).setInterval(e,t)}clearInterval(e){H(this,Bs).clearInterval(e)}},Bs=new WeakMap,kx=new WeakMap,iN),Ci=new jT;function NT(e){setTimeout(e,0)}var zi=typeof window>"u"||"Deno"in globalThis;function Rn(){}function ST(e,t){return typeof e=="function"?e(t):e}function Ng(e){return typeof e=="number"&&e>=0&&e!==1/0}function yN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qs(e,t){return typeof e=="function"?e(t):e}function Ar(e,t){return typeof e=="function"?e(t):e}function W1(e,t){const{type:n="all",exact:i,fetchStatus:l,predicate:c,queryKey:u,stale:f}=e;if(u){if(i){if(t.queryHash!==Ax(u,t.options))return!1}else if(!Zc(t.queryKey,u))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||c&&!c(t))}function Z1(e,t){const{exact:n,status:i,predicate:l,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(n){if(Li(t.options.mutationKey)!==Li(c))return!1}else if(!Zc(t.options.mutationKey,c))return!1}return!(i&&t.state.status!==i||l&&!l(t))}function Ax(e,t){return((t==null?void 0:t.queryKeyHashFn)||Li)(e)}function Li(e){return JSON.stringify(e,(t,n)=>Sg(n)?Object.keys(n).sort().reduce((i,l)=>(i[l]=n[l],i),{}):n)}function Zc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Zc(e[n],t[n])):!1}var CT=Object.prototype.hasOwnProperty;function vN(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=J1(e)&&J1(t);if(!i&&!(Sg(e)&&Sg(t)))return t;const c=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),f=u.length,h=i?new Array(f):{};let m=0;for(let g=0;g<f;g++){const p=i?g:u[g],b=e[p],w=t[p];if(b===w){h[p]=b,(i?g<c:CT.call(e,p))&&m++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){h[p]=w;continue}const S=vN(b,w,n+1);h[p]=S,S===b&&m++}return c===f&&m===c?e:h}function vf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function J1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sg(e){if(!ew(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ew(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ew(e){return Object.prototype.toString.call(e)==="[object Object]"}function kT(e){return new Promise(t=>{Ci.setTimeout(t,e)})}function Cg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vN(e,t):t}function ET(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function TT(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Rx=Symbol();function bN(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Rx?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Mx(e,t){return typeof e=="function"?e(...t):!!e}function AT(e,t,n){let i=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),i||(i=!0,l.aborted?n():l.addEventListener("abort",n,{once:!0})),l)}),e}var Ei,Fs,ao,lN,RT=(lN=class extends So{constructor(){super();Re(this,Ei);Re(this,Fs);Re(this,ao);je(this,ao,t=>{if(!zi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){H(this,Fs)||this.setEventListener(H(this,ao))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,Fs))==null||t.call(this),je(this,Fs,void 0))}setEventListener(t){var n;je(this,ao,t),(n=H(this,Fs))==null||n.call(this),je(this,Fs,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){H(this,Ei)!==t&&(je(this,Ei,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof H(this,Ei)=="boolean"?H(this,Ei):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ei=new WeakMap,Fs=new WeakMap,ao=new WeakMap,lN),Dx=new RT;function kg(){let e,t;const n=new Promise((l,c)=>{e=l,t=c});n.status="pending",n.catch(()=>{});function i(l){Object.assign(n,l),delete n.resolve,delete n.reject}return n.resolve=l=>{i({status:"fulfilled",value:l}),e(l)},n.reject=l=>{i({status:"rejected",reason:l}),t(l)},n}var MT=NT;function DT(){let e=[],t=0,n=f=>{f()},i=f=>{f()},l=MT;const c=f=>{t?e.push(f):l(()=>{n(f)})},u=()=>{const f=e;e=[],f.length&&l(()=>{i(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},batchCalls:f=>(...h)=>{c(()=>{f(...h)})},schedule:c,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{l=f}}}var Kt=DT(),so,Hs,io,oN,OT=(oN=class extends So{constructor(){super();Re(this,so,!0);Re(this,Hs);Re(this,io);je(this,io,t=>{if(!zi&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){H(this,Hs)||this.setEventListener(H(this,io))}onUnsubscribe(){var t;this.hasListeners()||((t=H(this,Hs))==null||t.call(this),je(this,Hs,void 0))}setEventListener(t){var n;je(this,io,t),(n=H(this,Hs))==null||n.call(this),je(this,Hs,t(this.setOnline.bind(this)))}setOnline(t){H(this,so)!==t&&(je(this,so,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return H(this,so)}},so=new WeakMap,Hs=new WeakMap,io=new WeakMap,oN),bf=new OT;function _T(e){return Math.min(1e3*2**e,3e4)}function wN(e){return(e??"online")==="online"?bf.isOnline():!0}var Eg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jN(e){let t=!1,n=0,i;const l=kg(),c=()=>l.status!=="pending",u=j=>{var E;if(!c()){const N=new Eg(j);b(N),(E=e.onCancel)==null||E.call(e,N)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>Dx.isFocused()&&(e.networkMode==="always"||bf.isOnline())&&e.canRun(),g=()=>wN(e.networkMode)&&e.canRun(),p=j=>{c()||(i==null||i(),l.resolve(j))},b=j=>{c()||(i==null||i(),l.reject(j))},w=()=>new Promise(j=>{var E;i=N=>{(c()||m())&&j(N)},(E=e.onPause)==null||E.call(e)}).then(()=>{var j;i=void 0,c()||(j=e.onContinue)==null||j.call(e)}),S=()=>{if(c())return;let j;const E=n===0?e.initialPromise:void 0;try{j=E??e.fn()}catch(N){j=Promise.reject(N)}Promise.resolve(j).then(p).catch(N=>{var D;if(c())return;const T=e.retry??(zi?0:3),k=e.retryDelay??_T,R=typeof k=="function"?k(n,N):k,z=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,N);if(t||!z){b(N);return}n++,(D=e.onFail)==null||D.call(e,n,N),kT(R).then(()=>m()?void 0:w()).then(()=>{t?b(N):S()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(i==null||i(),l),cancelRetry:f,continueRetry:h,canStart:g,start:()=>(g()?S():w().then(S),l)}}var Ti,cN,NN=(cN=class{constructor(){Re(this,Ti)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ng(this.gcTime)&&je(this,Ti,Ci.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(zi?1/0:300*1e3))}clearGcTimeout(){H(this,Ti)&&(Ci.clearTimeout(H(this,Ti)),je(this,Ti,void 0))}},Ti=new WeakMap,cN),Ai,lo,Tr,Ri,Jt,lu,Mi,qr,Ga,uN,PT=(uN=class extends NN{constructor(t){super();Re(this,qr);Re(this,Ai);Re(this,lo);Re(this,Tr);Re(this,Ri);Re(this,Jt);Re(this,lu);Re(this,Mi);je(this,Mi,!1),je(this,lu,t.defaultOptions),this.setOptions(t.options),this.observers=[],je(this,Ri,t.client),je(this,Tr,H(this,Ri).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,je(this,Ai,nw(this.options)),this.state=t.state??H(this,Ai),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=H(this,Jt))==null?void 0:t.promise}setOptions(t){if(this.options={...H(this,lu),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=nw(this.options);n.data!==void 0&&(this.setState(tw(n.data,n.dataUpdatedAt)),je(this,Ai,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&H(this,Tr).remove(this)}setData(t,n){const i=Cg(this.state.data,t,this.options);return Ge(this,qr,Ga).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){Ge(this,qr,Ga).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,l;const n=(i=H(this,Jt))==null?void 0:i.promise;return(l=H(this,Jt))==null||l.cancel(t),n?n.then(Rn).catch(Rn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(H(this,Ai))}isActive(){return this.observers.some(t=>Ar(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rx||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Qs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!yN(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Jt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=H(this,Jt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),H(this,Tr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(H(this,Jt)&&(H(this,Mi)?H(this,Jt).cancel({revert:!0}):H(this,Jt).cancelRetry()),this.scheduleGc()),H(this,Tr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ge(this,qr,Ga).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,g,p,b,w,S,j,E,N,T,k;if(this.state.fetchStatus!=="idle"&&((h=H(this,Jt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(H(this,Jt))return H(this,Jt).continueRetry(),H(this,Jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(z=>z.options.queryFn);R&&this.setOptions(R.options)}const i=new AbortController,l=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(je(this,Mi,!0),i.signal)})},c=()=>{const R=bN(this.options,n),D=(()=>{const O={client:H(this,Ri),queryKey:this.queryKey,meta:this.meta};return l(O),O})();return je(this,Mi,!1),this.options.persister?this.options.persister(R,D,this):R(D)},f=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:H(this,Ri),state:this.state,fetchFn:c};return l(R),R})();(m=this.options.behavior)==null||m.onFetch(f,this),je(this,lo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&Ge(this,qr,Ga).call(this,{type:"fetch",meta:(p=f.fetchOptions)==null?void 0:p.meta}),je(this,Jt,jN({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:R=>{R instanceof Eg&&R.revert&&this.setState({...H(this,lo),fetchStatus:"idle"}),i.abort()},onFail:(R,z)=>{Ge(this,qr,Ga).call(this,{type:"failed",failureCount:R,error:z})},onPause:()=>{Ge(this,qr,Ga).call(this,{type:"pause"})},onContinue:()=>{Ge(this,qr,Ga).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const R=await H(this,Jt).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(w=(b=H(this,Tr).config).onSuccess)==null||w.call(b,R,this),(j=(S=H(this,Tr).config).onSettled)==null||j.call(S,R,this.state.error,this),R}catch(R){if(R instanceof Eg){if(R.silent)return H(this,Jt).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ge(this,qr,Ga).call(this,{type:"error",error:R}),(N=(E=H(this,Tr).config).onError)==null||N.call(E,R,this),(k=(T=H(this,Tr).config).onSettled)==null||k.call(T,this.state.data,R,this),R}finally{this.scheduleGc()}}},Ai=new WeakMap,lo=new WeakMap,Tr=new WeakMap,Ri=new WeakMap,Jt=new WeakMap,lu=new WeakMap,Mi=new WeakMap,qr=new WeakSet,Ga=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...SN(i.data,this.options),fetchMeta:t.meta??null};case"success":const l={...i,...tw(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return je(this,lo,t.manual?l:void 0),l;case"error":const c=t.error;return{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),Kt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),H(this,Tr).notify({query:this,type:"updated",action:t})})},uN);function SN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wN(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $n,nt,ou,An,Di,oo,Ya,qs,cu,co,uo,Oi,_i,Vs,fo,ct,Hc,Tg,Ag,Rg,Mg,Dg,Og,_g,CN,dN,zT=(dN=class extends So{constructor(t,n){super();Re(this,ct);Re(this,$n);Re(this,nt);Re(this,ou);Re(this,An);Re(this,Di);Re(this,oo);Re(this,Ya);Re(this,qs);Re(this,cu);Re(this,co);Re(this,uo);Re(this,Oi);Re(this,_i);Re(this,Vs);Re(this,fo,new Set);this.options=n,je(this,$n,t),je(this,qs,null),je(this,Ya,kg()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(H(this,nt).addObserver(this),rw(H(this,nt),this.options)?Ge(this,ct,Hc).call(this):this.updateResult(),Ge(this,ct,Mg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pg(H(this,nt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pg(H(this,nt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ge(this,ct,Dg).call(this),Ge(this,ct,Og).call(this),H(this,nt).removeObserver(this)}setOptions(t){const n=this.options,i=H(this,nt);if(this.options=H(this,$n).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ar(this.options.enabled,H(this,nt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ge(this,ct,_g).call(this),H(this,nt).setOptions(this.options),n._defaulted&&!vf(this.options,n)&&H(this,$n).getQueryCache().notify({type:"observerOptionsUpdated",query:H(this,nt),observer:this});const l=this.hasListeners();l&&aw(H(this,nt),i,this.options,n)&&Ge(this,ct,Hc).call(this),this.updateResult(),l&&(H(this,nt)!==i||Ar(this.options.enabled,H(this,nt))!==Ar(n.enabled,H(this,nt))||Qs(this.options.staleTime,H(this,nt))!==Qs(n.staleTime,H(this,nt)))&&Ge(this,ct,Tg).call(this);const c=Ge(this,ct,Ag).call(this);l&&(H(this,nt)!==i||Ar(this.options.enabled,H(this,nt))!==Ar(n.enabled,H(this,nt))||c!==H(this,Vs))&&Ge(this,ct,Rg).call(this,c)}getOptimisticResult(t){const n=H(this,$n).getQueryCache().build(H(this,$n),t),i=this.createResult(n,t);return IT(this,i)&&(je(this,An,i),je(this,oo,this.options),je(this,Di,H(this,nt).state)),i}getCurrentResult(){return H(this,An)}trackResult(t,n){return new Proxy(t,{get:(i,l)=>(this.trackProp(l),n==null||n(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&H(this,Ya).status==="pending"&&H(this,Ya).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,l))})}trackProp(t){H(this,fo).add(t)}getCurrentQuery(){return H(this,nt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=H(this,$n).defaultQueryOptions(t),i=H(this,$n).getQueryCache().build(H(this,$n),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return Ge(this,ct,Hc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),H(this,An)))}createResult(t,n){var q;const i=H(this,nt),l=this.options,c=H(this,An),u=H(this,Di),f=H(this,oo),m=t!==i?t.state:H(this,ou),{state:g}=t;let p={...g},b=!1,w;if(n._optimisticResults){const L=this.hasListeners(),ne=!L&&rw(t,n),X=L&&aw(t,i,n,l);(ne||X)&&(p={...p,...SN(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:j,status:E}=p;w=p.data;let N=!1;if(n.placeholderData!==void 0&&w===void 0&&E==="pending"){let L;c!=null&&c.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(L=c.data,N=!0):L=typeof n.placeholderData=="function"?n.placeholderData((q=H(this,uo))==null?void 0:q.state.data,H(this,uo)):n.placeholderData,L!==void 0&&(E="success",w=Cg(c==null?void 0:c.data,L,n),b=!0)}if(n.select&&w!==void 0&&!N)if(c&&w===(u==null?void 0:u.data)&&n.select===H(this,cu))w=H(this,co);else try{je(this,cu,n.select),w=n.select(w),w=Cg(c==null?void 0:c.data,w,n),je(this,co,w),je(this,qs,null)}catch(L){je(this,qs,L)}H(this,qs)&&(S=H(this,qs),w=H(this,co),j=Date.now(),E="error");const T=p.fetchStatus==="fetching",k=E==="pending",R=E==="error",z=k&&T,D=w!==void 0,B={status:E,fetchStatus:p.fetchStatus,isPending:k,isSuccess:E==="success",isError:R,isInitialLoading:z,isLoading:z,data:w,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:j,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>m.dataUpdateCount||p.errorUpdateCount>m.errorUpdateCount,isFetching:T,isRefetching:T&&!k,isLoadingError:R&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:R&&D,isStale:Ox(t,n),refetch:this.refetch,promise:H(this,Ya),isEnabled:Ar(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=B.data!==void 0,ne=B.status==="error"&&!L,X=te=>{ne?te.reject(B.error):L&&te.resolve(B.data)},ue=()=>{const te=je(this,Ya,B.promise=kg());X(te)},ie=H(this,Ya);switch(ie.status){case"pending":t.queryHash===i.queryHash&&X(ie);break;case"fulfilled":(ne||B.data!==ie.value)&&ue();break;case"rejected":(!ne||B.error!==ie.reason)&&ue();break}}return B}updateResult(){const t=H(this,An),n=this.createResult(H(this,nt),this.options);if(je(this,Di,H(this,nt).state),je(this,oo,this.options),H(this,Di).data!==void 0&&je(this,uo,H(this,nt)),vf(n,t))return;je(this,An,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!H(this,fo).size)return!0;const u=new Set(c??H(this,fo));return this.options.throwOnError&&u.add("error"),Object.keys(H(this,An)).some(f=>{const h=f;return H(this,An)[h]!==t[h]&&u.has(h)})};Ge(this,ct,CN).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ge(this,ct,Mg).call(this)}},$n=new WeakMap,nt=new WeakMap,ou=new WeakMap,An=new WeakMap,Di=new WeakMap,oo=new WeakMap,Ya=new WeakMap,qs=new WeakMap,cu=new WeakMap,co=new WeakMap,uo=new WeakMap,Oi=new WeakMap,_i=new WeakMap,Vs=new WeakMap,fo=new WeakMap,ct=new WeakSet,Hc=function(t){Ge(this,ct,_g).call(this);let n=H(this,nt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Rn)),n},Tg=function(){Ge(this,ct,Dg).call(this);const t=Qs(this.options.staleTime,H(this,nt));if(zi||H(this,An).isStale||!Ng(t))return;const i=yN(H(this,An).dataUpdatedAt,t)+1;je(this,Oi,Ci.setTimeout(()=>{H(this,An).isStale||this.updateResult()},i))},Ag=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(H(this,nt)):this.options.refetchInterval)??!1},Rg=function(t){Ge(this,ct,Og).call(this),je(this,Vs,t),!(zi||Ar(this.options.enabled,H(this,nt))===!1||!Ng(H(this,Vs))||H(this,Vs)===0)&&je(this,_i,Ci.setInterval(()=>{(this.options.refetchIntervalInBackground||Dx.isFocused())&&Ge(this,ct,Hc).call(this)},H(this,Vs)))},Mg=function(){Ge(this,ct,Tg).call(this),Ge(this,ct,Rg).call(this,Ge(this,ct,Ag).call(this))},Dg=function(){H(this,Oi)&&(Ci.clearTimeout(H(this,Oi)),je(this,Oi,void 0))},Og=function(){H(this,_i)&&(Ci.clearInterval(H(this,_i)),je(this,_i,void 0))},_g=function(){const t=H(this,$n).getQueryCache().build(H(this,$n),this.options);if(t===H(this,nt))return;const n=H(this,nt);je(this,nt,t),je(this,ou,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},CN=function(t){Kt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(H(this,An))}),H(this,$n).getQueryCache().notify({query:H(this,nt),type:"observerResultsUpdated"})})},dN);function LT(e,t){return Ar(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rw(e,t){return LT(e,t)||e.state.data!==void 0&&Pg(e,t,t.refetchOnMount)}function Pg(e,t,n){if(Ar(t.enabled,e)!==!1&&Qs(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Ox(e,t)}return!1}function aw(e,t,n,i){return(e!==t||Ar(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ox(e,n)}function Ox(e,t){return Ar(t.enabled,e)!==!1&&e.isStaleByTime(Qs(t.staleTime,e))}function IT(e,t){return!vf(e.getCurrentResult(),t)}function sw(e){return{onFetch:(t,n)=>{var g,p,b,w,S;const i=t.options,l=(b=(p=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,c=((w=t.state.data)==null?void 0:w.pages)||[],u=((S=t.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let j=!1;const E=k=>{AT(k,()=>t.signal,()=>j=!0)},N=bN(t.options,t.fetchOptions),T=async(k,R,z)=>{if(j)return Promise.reject();if(R==null&&k.pages.length)return Promise.resolve(k);const O=(()=>{const ne={client:t.client,queryKey:t.queryKey,pageParam:R,direction:z?"backward":"forward",meta:t.options.meta};return E(ne),ne})(),B=await N(O),{maxPages:q}=t.options,L=z?TT:ET;return{pages:L(k.pages,B,q),pageParams:L(k.pageParams,R,q)}};if(l&&c.length){const k=l==="backward",R=k?UT:iw,z={pages:c,pageParams:u},D=R(i,z);f=await T(z,D,k)}else{const k=e??c.length;do{const R=h===0?u[0]??i.initialPageParam:iw(i,f);if(h>0&&R==null)break;f=await T(f,R),h++}while(h<k)}return f};t.options.persister?t.fetchFn=()=>{var j,E;return(E=(j=t.options).persister)==null?void 0:E.call(j,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function iw(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function UT(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var uu,ua,bn,Pi,da,Ls,fN,BT=(fN=class extends NN{constructor(t){super();Re(this,da);Re(this,uu);Re(this,ua);Re(this,bn);Re(this,Pi);je(this,uu,t.client),this.mutationId=t.mutationId,je(this,bn,t.mutationCache),je(this,ua,[]),this.state=t.state||kN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){H(this,ua).includes(t)||(H(this,ua).push(t),this.clearGcTimeout(),H(this,bn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){je(this,ua,H(this,ua).filter(n=>n!==t)),this.scheduleGc(),H(this,bn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){H(this,ua).length||(this.state.status==="pending"?this.scheduleGc():H(this,bn).remove(this))}continue(){var t;return((t=H(this,Pi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,f,h,m,g,p,b,w,S,j,E,N,T,k,R,z,D,O;const n=()=>{Ge(this,da,Ls).call(this,{type:"continue"})},i={client:H(this,uu),meta:this.options.meta,mutationKey:this.options.mutationKey};je(this,Pi,jN({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,q)=>{Ge(this,da,Ls).call(this,{type:"failed",failureCount:B,error:q})},onPause:()=>{Ge(this,da,Ls).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>H(this,bn).canRun(this)}));const l=this.state.status==="pending",c=!H(this,Pi).canStart();try{if(l)n();else{Ge(this,da,Ls).call(this,{type:"pending",variables:t,isPaused:c}),H(this,bn).config.onMutate&&await H(this,bn).config.onMutate(t,this,i);const q=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,t,i));q!==this.state.context&&Ge(this,da,Ls).call(this,{type:"pending",context:q,variables:t,isPaused:c})}const B=await H(this,Pi).start();return await((m=(h=H(this,bn).config).onSuccess)==null?void 0:m.call(h,B,t,this.state.context,this,i)),await((p=(g=this.options).onSuccess)==null?void 0:p.call(g,B,t,this.state.context,i)),await((w=(b=H(this,bn).config).onSettled)==null?void 0:w.call(b,B,null,this.state.variables,this.state.context,this,i)),await((j=(S=this.options).onSettled)==null?void 0:j.call(S,B,null,t,this.state.context,i)),Ge(this,da,Ls).call(this,{type:"success",data:B}),B}catch(B){try{await((N=(E=H(this,bn).config).onError)==null?void 0:N.call(E,B,t,this.state.context,this,i))}catch(q){Promise.reject(q)}try{await((k=(T=this.options).onError)==null?void 0:k.call(T,B,t,this.state.context,i))}catch(q){Promise.reject(q)}try{await((z=(R=H(this,bn).config).onSettled)==null?void 0:z.call(R,void 0,B,this.state.variables,this.state.context,this,i))}catch(q){Promise.reject(q)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,B,t,this.state.context,i))}catch(q){Promise.reject(q)}throw Ge(this,da,Ls).call(this,{type:"error",error:B}),B}finally{H(this,bn).runNext(this)}}},uu=new WeakMap,ua=new WeakMap,bn=new WeakMap,Pi=new WeakMap,da=new WeakSet,Ls=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Kt.batch(()=>{H(this,ua).forEach(i=>{i.onMutationUpdate(t)}),H(this,bn).notify({mutation:this,type:"updated",action:t})})},fN);function kN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ka,Vr,du,mN,FT=(mN=class extends So{constructor(t={}){super();Re(this,Ka);Re(this,Vr);Re(this,du);this.config=t,je(this,Ka,new Set),je(this,Vr,new Map),je(this,du,0)}build(t,n,i){const l=new BT({client:t,mutationCache:this,mutationId:++Ud(this,du)._,options:t.defaultMutationOptions(n),state:i});return this.add(l),l}add(t){H(this,Ka).add(t);const n=Bd(t);if(typeof n=="string"){const i=H(this,Vr).get(n);i?i.push(t):H(this,Vr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(H(this,Ka).delete(t)){const n=Bd(t);if(typeof n=="string"){const i=H(this,Vr).get(n);if(i)if(i.length>1){const l=i.indexOf(t);l!==-1&&i.splice(l,1)}else i[0]===t&&H(this,Vr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Bd(t);if(typeof n=="string"){const i=H(this,Vr).get(n),l=i==null?void 0:i.find(c=>c.state.status==="pending");return!l||l===t}else return!0}runNext(t){var i;const n=Bd(t);if(typeof n=="string"){const l=(i=H(this,Vr).get(n))==null?void 0:i.find(c=>c!==t&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kt.batch(()=>{H(this,Ka).forEach(t=>{this.notify({type:"removed",mutation:t})}),H(this,Ka).clear(),H(this,Vr).clear()})}getAll(){return Array.from(H(this,Ka))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Z1(n,i))}findAll(t={}){return this.getAll().filter(n=>Z1(t,n))}notify(t){Kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Kt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Rn))))}},Ka=new WeakMap,Vr=new WeakMap,du=new WeakMap,mN);function Bd(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Qa,$s,Gn,Xa,ts,df,zg,hN,HT=(hN=class extends So{constructor(n,i){super();Re(this,ts);Re(this,Qa);Re(this,$s);Re(this,Gn);Re(this,Xa);je(this,Qa,n),this.setOptions(i),this.bindMethods(),Ge(this,ts,df).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var l;const i=this.options;this.options=H(this,Qa).defaultMutationOptions(n),vf(this.options,i)||H(this,Qa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:H(this,Gn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Li(i.mutationKey)!==Li(this.options.mutationKey)?this.reset():((l=H(this,Gn))==null?void 0:l.state.status)==="pending"&&H(this,Gn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=H(this,Gn))==null||n.removeObserver(this)}onMutationUpdate(n){Ge(this,ts,df).call(this),Ge(this,ts,zg).call(this,n)}getCurrentResult(){return H(this,$s)}reset(){var n;(n=H(this,Gn))==null||n.removeObserver(this),je(this,Gn,void 0),Ge(this,ts,df).call(this),Ge(this,ts,zg).call(this)}mutate(n,i){var l;return je(this,Xa,i),(l=H(this,Gn))==null||l.removeObserver(this),je(this,Gn,H(this,Qa).getMutationCache().build(H(this,Qa),this.options)),H(this,Gn).addObserver(this),H(this,Gn).execute(n)}},Qa=new WeakMap,$s=new WeakMap,Gn=new WeakMap,Xa=new WeakMap,ts=new WeakSet,df=function(){var i;const n=((i=H(this,Gn))==null?void 0:i.state)??kN();je(this,$s,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},zg=function(n){Kt.batch(()=>{var i,l,c,u,f,h,m,g;if(H(this,Xa)&&this.hasListeners()){const p=H(this,$s).variables,b=H(this,$s).context,w={client:H(this,Qa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(l=(i=H(this,Xa)).onSuccess)==null||l.call(i,n.data,p,b,w)}catch(S){Promise.reject(S)}try{(u=(c=H(this,Xa)).onSettled)==null||u.call(c,n.data,null,p,b,w)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(h=(f=H(this,Xa)).onError)==null||h.call(f,n.error,p,b,w)}catch(S){Promise.reject(S)}try{(g=(m=H(this,Xa)).onSettled)==null||g.call(m,void 0,n.error,p,b,w)}catch(S){Promise.reject(S)}}}this.listeners.forEach(p=>{p(H(this,$s))})})},hN),fa,pN,qT=(pN=class extends So{constructor(t={}){super();Re(this,fa);this.config=t,je(this,fa,new Map)}build(t,n,i){const l=n.queryKey,c=n.queryHash??Ax(l,n);let u=this.get(c);return u||(u=new PT({client:t,queryKey:l,queryHash:c,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(l)}),this.add(u)),u}add(t){H(this,fa).has(t.queryHash)||(H(this,fa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=H(this,fa).get(t.queryHash);n&&(t.destroy(),n===t&&H(this,fa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return H(this,fa).get(t)}getAll(){return[...H(this,fa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>W1(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>W1(t,i)):n}notify(t){Kt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fa=new WeakMap,pN),Mt,Gs,Ys,mo,ho,Ks,po,go,gN,VT=(gN=class{constructor(e={}){Re(this,Mt);Re(this,Gs);Re(this,Ys);Re(this,mo);Re(this,ho);Re(this,Ks);Re(this,po);Re(this,go);je(this,Mt,e.queryCache||new qT),je(this,Gs,e.mutationCache||new FT),je(this,Ys,e.defaultOptions||{}),je(this,mo,new Map),je(this,ho,new Map),je(this,Ks,0)}mount(){Ud(this,Ks)._++,H(this,Ks)===1&&(je(this,po,Dx.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,Mt).onFocus())})),je(this,go,bf.subscribe(async e=>{e&&(await this.resumePausedMutations(),H(this,Mt).onOnline())})))}unmount(){var e,t;Ud(this,Ks)._--,H(this,Ks)===0&&((e=H(this,po))==null||e.call(this),je(this,po,void 0),(t=H(this,go))==null||t.call(this),je(this,go,void 0))}isFetching(e){return H(this,Mt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return H(this,Gs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,Mt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=H(this,Mt).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Qs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return H(this,Mt).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=H(this,Mt).get(i.queryHash),c=l==null?void 0:l.state.data,u=ST(t,c);if(u!==void 0)return H(this,Mt).build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Kt.batch(()=>H(this,Mt).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=H(this,Mt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=H(this,Mt);Kt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=H(this,Mt);return Kt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Kt.batch(()=>H(this,Mt).findAll(e).map(l=>l.cancel(n)));return Promise.all(i).then(Rn).catch(Rn)}invalidateQueries(e,t={}){return Kt.batch(()=>(H(this,Mt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=Kt.batch(()=>H(this,Mt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,n);return n.throwOnError||(c=c.catch(Rn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(Rn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=H(this,Mt).build(this,t);return n.isStaleByTime(Qs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rn).catch(Rn)}fetchInfiniteQuery(e){return e.behavior=sw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rn).catch(Rn)}ensureInfiniteQueryData(e){return e.behavior=sw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bf.isOnline()?H(this,Gs).resumePausedMutations():Promise.resolve()}getQueryCache(){return H(this,Mt)}getMutationCache(){return H(this,Gs)}getDefaultOptions(){return H(this,Ys)}setDefaultOptions(e){je(this,Ys,e)}setQueryDefaults(e,t){H(this,mo).set(Li(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...H(this,mo).values()],n={};return t.forEach(i=>{Zc(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){H(this,ho).set(Li(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...H(this,ho).values()],n={};return t.forEach(i=>{Zc(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...H(this,Ys).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ax(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Rx&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...H(this,Ys).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){H(this,Mt).clear(),H(this,Gs).clear()}},Mt=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,mo=new WeakMap,ho=new WeakMap,Ks=new WeakMap,po=new WeakMap,go=new WeakMap,gN),EN=y.createContext(void 0),Sn=e=>{const t=y.useContext(EN);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$T=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(EN.Provider,{value:e,children:t})),TN=y.createContext(!1),GT=()=>y.useContext(TN);TN.Provider;function YT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var KT=y.createContext(YT()),QT=()=>y.useContext(KT),XT=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Mx(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},WT=e=>{y.useEffect(()=>{e.clearReset()},[e])},ZT=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(l&&e.data===void 0||Mx(n,[e.error,i])),JT=e=>{if(e.suspense){const n=l=>l==="static"?l:Math.max(l??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...l)=>n(i(...l)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},eA=(e,t)=>e.isLoading&&e.isFetching&&!t,tA=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,lw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function nA(e,t,n){var b,w,S,j;const i=GT(),l=QT(),c=Sn(),u=c.defaultQueryOptions(e);(w=(b=c.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||w.call(b,u);const f=c.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",JT(u),XT(u,l,f),WT(l);const h=!c.getQueryCache().get(u.queryHash),[m]=y.useState(()=>new t(c,u)),g=m.getOptimisticResult(u),p=!i&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(E=>{const N=p?m.subscribe(Kt.batchCalls(E)):Rn;return m.updateResult(),N},[m,p]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),y.useEffect(()=>{m.setOptions(u)},[u,m]),tA(u,g))throw lw(u,m,l);if(ZT({result:g,errorResetBoundary:l,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw g.error;if((j=(S=c.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||j.call(S,u,g),u.experimental_prefetchInRender&&!zi&&eA(g,i)){const E=h?lw(u,m,l):f==null?void 0:f.promise;E==null||E.catch(Rn).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function pt(e,t){return nA(e,zT)}function Tt(e,t){const n=Sn(),[i]=y.useState(()=>new HT(n,e));y.useEffect(()=>{i.setOptions(e)},[i,e]);const l=y.useSyncExternalStore(y.useCallback(u=>i.subscribe(Kt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=y.useCallback((u,f)=>{i.mutate(u,f).catch(Rn)},[i]);if(l.error&&Mx(i.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}/**
|
|
50
|
+
* react-router v7.13.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var ow="popstate";function rA(e={}){function t(i,l){let{pathname:c,search:u,hash:f}=i.location;return Lg("",{pathname:c,search:u,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(i,l){return typeof l=="string"?l:Jc(l)}return sA(t,n,null,e)}function St(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function aA(){return Math.random().toString(36).substring(2,10)}function cw(e,t){return{usr:e.state,key:e.key,idx:t}}function Lg(e,t,n=null,i){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Co(t):t,state:n,key:t&&t.key||i||aA()}}function Jc({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 Co(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function sA(e,t,n,i={}){let{window:l=document.defaultView,v5Compat:c=!1}=i,u=l.history,f="POP",h=null,m=g();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function g(){return(u.state||{idx:null}).idx}function p(){f="POP";let E=g(),N=E==null?null:E-m;m=E,h&&h({action:f,location:j.location,delta:N})}function b(E,N){f="PUSH";let T=Lg(j.location,E,N);m=g()+1;let k=cw(T,m),R=j.createHref(T);try{u.pushState(k,"",R)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;l.location.assign(R)}c&&h&&h({action:f,location:j.location,delta:1})}function w(E,N){f="REPLACE";let T=Lg(j.location,E,N);m=g();let k=cw(T,m),R=j.createHref(T);u.replaceState(k,"",R),c&&h&&h({action:f,location:j.location,delta:0})}function S(E){return iA(E)}let j={get action(){return f},get location(){return e(l,u)},listen(E){if(h)throw new Error("A history only accepts one active listener");return l.addEventListener(ow,p),h=E,()=>{l.removeEventListener(ow,p),h=null}},createHref(E){return t(l,E)},createURL:S,encodeLocation(E){let N=S(E);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:b,replace:w,go(E){return u.go(E)}};return j}function iA(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),St(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Jc(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function AN(e,t,n="/"){return lA(e,t,n,!1)}function lA(e,t,n,i){let l=typeof t=="string"?Co(t):t,c=ns(l.pathname||"/",n);if(c==null)return null;let u=RN(e);oA(u);let f=null;for(let h=0;f==null&&h<u.length;++h){let m=vA(c);f=xA(u[h],m,i)}return f}function RN(e,t=[],n=[],i="",l=!1){let c=(u,f,h=l,m)=>{let g={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&h)return;St(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let p=Za([i,g.relativePath]),b=n.concat(g);u.children&&u.children.length>0&&(St(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),RN(u.children,t,b,p,h)),!(u.path==null&&!u.index)&&t.push({path:p,score:pA(p,u.index),routesMeta:b})};return e.forEach((u,f)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))c(u,f);else for(let m of MN(u.path))c(u,f,!0,m)}),t}function MN(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,l=n.endsWith("?"),c=n.replace(/\?$/,"");if(i.length===0)return l?[c,""]:[c];let u=MN(i.join("/")),f=[];return f.push(...u.map(h=>h===""?c:[c,h].join("/"))),l&&f.push(...u),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function oA(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:gA(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var cA=/^:[\w-]+$/,uA=3,dA=2,fA=1,mA=10,hA=-2,uw=e=>e==="*";function pA(e,t){let n=e.split("/"),i=n.length;return n.some(uw)&&(i+=hA),t&&(i+=dA),n.filter(l=>!uw(l)).reduce((l,c)=>l+(cA.test(c)?uA:c===""?fA:mA),i)}function gA(e,t){return e.length===t.length&&e.slice(0,-1).every((i,l)=>i===t[l])?e[e.length-1]-t[t.length-1]:0}function xA(e,t,n=!1){let{routesMeta:i}=e,l={},c="/",u=[];for(let f=0;f<i.length;++f){let h=i[f],m=f===i.length-1,g=c==="/"?t:t.slice(c.length)||"/",p=wf({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},g),b=h.route;if(!p&&m&&n&&!i[i.length-1].route.index&&(p=wf({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},g)),!p)return null;Object.assign(l,p.params),u.push({params:l,pathname:Za([c,p.pathname]),pathnameBase:NA(Za([c,p.pathnameBase])),route:b}),p.pathnameBase!=="/"&&(c=Za([c,p.pathnameBase]))}return u}function wf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=yA(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let c=l[0],u=c.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:i.reduce((m,{paramName:g,isOptional:p},b)=>{if(g==="*"){let S=f[b]||"";u=c.slice(0,c.length-S.length).replace(/(.)\/+$/,"$1")}const w=f[b];return p&&!w?m[g]=void 0:m[g]=(w||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:u,pattern:e}}function yA(e,t=!1,n=!0){Or(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 i=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,h)=>(i.push({paramName:f,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),i]}function vA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Or(!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 ns(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var bA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function wA(e,t="/"){let{pathname:n,search:i="",hash:l=""}=typeof e=="string"?Co(e):e,c;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?c=dw(n.substring(1),"/"):c=dw(n,t)):c=t,{pathname:c,search:SA(i),hash:CA(l)}}function dw(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ip(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. 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 jA(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _x(e){let t=jA(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Px(e,t,n,i=!1){let l;typeof e=="string"?l=Co(e):(l={...e},St(!l.pathname||!l.pathname.includes("?"),Ip("?","pathname","search",l)),St(!l.pathname||!l.pathname.includes("#"),Ip("#","pathname","hash",l)),St(!l.search||!l.search.includes("#"),Ip("#","search","hash",l)));let c=e===""||l.pathname==="",u=c?"/":l.pathname,f;if(u==null)f=n;else{let p=t.length-1;if(!i&&u.startsWith("..")){let b=u.split("/");for(;b[0]==="..";)b.shift(),p-=1;l.pathname=b.join("/")}f=p>=0?t[p]:"/"}let h=wA(l,f),m=u&&u!=="/"&&u.endsWith("/"),g=(c||u===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}var Za=e=>e.join("/").replace(/\/\/+/g,"/"),NA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),SA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,CA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,kA=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function EA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function TA(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var DN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ON(e,t){let n=e;if(typeof n!="string"||!bA.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,l=!1;if(DN)try{let c=new URL(window.location.href),u=n.startsWith("//")?new URL(c.protocol+n):new URL(n),f=ns(u.pathname,t);u.origin===c.origin&&f!=null?n=f+u.search+u.hash:l=!0}catch{Or(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:l,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var _N=["POST","PUT","PATCH","DELETE"];new Set(_N);var AA=["GET",..._N];new Set(AA);var ko=y.createContext(null);ko.displayName="DataRouter";var Uf=y.createContext(null);Uf.displayName="DataRouterState";var RA=y.createContext(!1),PN=y.createContext({isTransitioning:!1});PN.displayName="ViewTransition";var MA=y.createContext(new Map);MA.displayName="Fetchers";var DA=y.createContext(null);DA.displayName="Await";var gr=y.createContext(null);gr.displayName="Navigation";var fu=y.createContext(null);fu.displayName="Location";var zr=y.createContext({outlet:null,matches:[],isDataRoute:!1});zr.displayName="Route";var zx=y.createContext(null);zx.displayName="RouteError";var zN="REACT_ROUTER_ERROR",OA="REDIRECT",_A="ROUTE_ERROR_RESPONSE";function PA(e){if(e.startsWith(`${zN}:${OA}:{`))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 zA(e){if(e.startsWith(`${zN}:${_A}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new kA(t.status,t.statusText,t.data)}catch{}}function LA(e,{relative:t}={}){St(Eo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=y.useContext(gr),{hash:l,pathname:c,search:u}=mu(e,{relative:t}),f=c;return n!=="/"&&(f=c==="/"?n:Za([n,c])),i.createHref({pathname:f,search:u,hash:l})}function Eo(){return y.useContext(fu)!=null}function va(){return St(Eo(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(fu).location}var LN="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function IN(e){y.useContext(gr).static||y.useLayoutEffect(e)}function Bf(){let{isDataRoute:e}=y.useContext(zr);return e?ZA():IA()}function IA(){St(Eo(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(ko),{basename:t,navigator:n}=y.useContext(gr),{matches:i}=y.useContext(zr),{pathname:l}=va(),c=JSON.stringify(_x(i)),u=y.useRef(!1);return IN(()=>{u.current=!0}),y.useCallback((h,m={})=>{if(Or(u.current,LN),!u.current)return;if(typeof h=="number"){n.go(h);return}let g=Px(h,JSON.parse(c),l,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Za([t,g.pathname])),(m.replace?n.replace:n.push)(g,m.state,m)},[t,n,c,l,e])}var UA=y.createContext(null);function BA(e){let t=y.useContext(zr).outlet;return y.useMemo(()=>t&&y.createElement(UA.Provider,{value:e},t),[t,e])}function UN(){let{matches:e}=y.useContext(zr),t=e[e.length-1];return t?t.params:{}}function mu(e,{relative:t}={}){let{matches:n}=y.useContext(zr),{pathname:i}=va(),l=JSON.stringify(_x(n));return y.useMemo(()=>Px(e,JSON.parse(l),i,t==="path"),[e,l,i,t])}function FA(e,t){return BN(e,t)}function BN(e,t,n,i,l){var T;St(Eo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=y.useContext(gr),{matches:u}=y.useContext(zr),f=u[u.length-1],h=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",p=f&&f.route;{let k=p&&p.path||"";HN(m,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${k}">) 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.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let b=va(),w;if(t){let k=typeof t=="string"?Co(t):t;St(g==="/"||((T=k.pathname)==null?void 0:T.startsWith(g)),`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 "${g}" but pathname "${k.pathname}" was given in the \`location\` prop.`),w=k}else w=b;let S=w.pathname||"/",j=S;if(g!=="/"){let k=g.replace(/^\//,"").split("/");j="/"+S.replace(/^\//,"").split("/").slice(k.length).join("/")}let E=AN(e,{pathname:j});Or(p||E!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Or(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.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 N=GA(E&&E.map(k=>Object.assign({},k,{params:Object.assign({},h,k.params),pathname:Za([g,c.encodeLocation?c.encodeLocation(k.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?g:Za([g,c.encodeLocation?c.encodeLocation(k.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),u,n,i,l);return t&&N?y.createElement(fu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},N):N}function HA(){let e=WA(),t=EA(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:c},"ErrorBoundary")," or"," ",y.createElement("code",{style:c},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:l},n):null,u)}var qA=y.createElement(HA,null),FN=class extends y.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=zA(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(zr.Provider,{value:this.props.routeContext},y.createElement(zx.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement(VA,{error:e},t):t}};FN.contextType=RA;var Up=new WeakMap;function VA({children:e,error:t}){let{basename:n}=y.useContext(gr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=PA(t.digest);if(i){let l=Up.get(t);if(l)throw l;let c=ON(i.location,n);if(DN&&!Up.get(t))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw Up.set(t,u),u}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return e}function $A({routeContext:e,match:t,children:n}){let i=y.useContext(ko);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(zr.Provider,{value:e},n)}function GA(e,t=[],n=null,i=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let c=e,u=n==null?void 0:n.errors;if(u!=null){let g=c.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);St(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,g+1))}let f=!1,h=-1;if(n)for(let g=0;g<c.length;g++){let p=c[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=g),p.route.id){let{loaderData:b,errors:w}=n,S=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||S){f=!0,h>=0?c=c.slice(0,h+1):c=[c[0]];break}}}let m=n&&i?(g,p)=>{var b,w;i(g,{location:n.location,params:((w=(b=n.matches)==null?void 0:b[0])==null?void 0:w.params)??{},unstable_pattern:TA(n.matches),errorInfo:p})}:void 0;return c.reduceRight((g,p,b)=>{let w,S=!1,j=null,E=null;n&&(w=u&&p.route.id?u[p.route.id]:void 0,j=p.route.errorElement||qA,f&&(h<0&&b===0?(HN("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,E=null):h===b&&(S=!0,E=p.route.hydrateFallbackElement||null)));let N=t.concat(c.slice(0,b+1)),T=()=>{let k;return w?k=j:S?k=E:p.route.Component?k=y.createElement(p.route.Component,null):p.route.element?k=p.route.element:k=g,y.createElement($A,{match:p,routeContext:{outlet:g,matches:N,isDataRoute:n!=null},children:k})};return n&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?y.createElement(FN,{location:n.location,revalidation:n.revalidation,component:j,error:w,children:T(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):T()},null)}function Lx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YA(e){let t=y.useContext(ko);return St(t,Lx(e)),t}function KA(e){let t=y.useContext(Uf);return St(t,Lx(e)),t}function QA(e){let t=y.useContext(zr);return St(t,Lx(e)),t}function Ix(e){let t=QA(e),n=t.matches[t.matches.length-1];return St(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function XA(){return Ix("useRouteId")}function WA(){var i;let e=y.useContext(zx),t=KA("useRouteError"),n=Ix("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function ZA(){let{router:e}=YA("useNavigate"),t=Ix("useNavigate"),n=y.useRef(!1);return IN(()=>{n.current=!0}),y.useCallback(async(l,c={})=>{Or(n.current,LN),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...c}))},[e,t])}var fw={};function HN(e,t,n){!t&&!fw[e]&&(fw[e]=!0,Or(!1,n))}y.memo(JA);function JA({routes:e,future:t,state:n,onError:i}){return BN(e,void 0,n,i,t)}function e3({to:e,replace:t,state:n,relative:i}){St(Eo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=y.useContext(gr);Or(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=y.useContext(zr),{pathname:u}=va(),f=Bf(),h=Px(e,_x(c),u,i==="path"),m=JSON.stringify(h);return y.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:i})},[f,m,i,t,n]),null}function t3(e){return BA(e.context)}function Zt(e){St(!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 n3({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:l,static:c=!1,unstable_useTransitions:u}){St(!Eo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=y.useMemo(()=>({basename:f,navigator:l,static:c,unstable_useTransitions:u,future:{}}),[f,l,c,u]);typeof n=="string"&&(n=Co(n));let{pathname:m="/",search:g="",hash:p="",state:b=null,key:w="default"}=n,S=y.useMemo(()=>{let j=ns(m,f);return j==null?null:{location:{pathname:j,search:g,hash:p,state:b,key:w},navigationType:i}},[f,m,g,p,b,w,i]);return Or(S!=null,`<Router basename="${f}"> is not able to match the URL "${m}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:y.createElement(gr.Provider,{value:h},y.createElement(fu.Provider,{children:t,value:S}))}function r3({children:e,location:t}){return FA(Ig(e),t)}function Ig(e,t=[]){let n=[];return y.Children.forEach(e,(i,l)=>{if(!y.isValidElement(i))return;let c=[...t,l];if(i.type===y.Fragment){n.push.apply(n,Ig(i.props.children,c));return}St(i.type===Zt,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),St(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=Ig(i.props.children,c)),n.push(u)}),n}var ff="get",mf="application/x-www-form-urlencoded";function Ff(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function a3(e){return Ff(e)&&e.tagName.toLowerCase()==="button"}function s3(e){return Ff(e)&&e.tagName.toLowerCase()==="form"}function i3(e){return Ff(e)&&e.tagName.toLowerCase()==="input"}function l3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function o3(e,t){return e.button===0&&(!t||t==="_self")&&!l3(e)}function Ug(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map(l=>[n,l]):[[n,i]])},[]))}function c3(e,t){let n=Ug(e);return t&&t.forEach((i,l)=>{n.has(l)||t.getAll(l).forEach(c=>{n.append(l,c)})}),n}var Fd=null;function u3(){if(Fd===null)try{new FormData(document.createElement("form"),0),Fd=!1}catch{Fd=!0}return Fd}var d3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bp(e){return e!=null&&!d3.has(e)?(Or(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mf}"`),null):e}function f3(e,t){let n,i,l,c,u;if(s3(e)){let f=e.getAttribute("action");i=f?ns(f,t):null,n=e.getAttribute("method")||ff,l=Bp(e.getAttribute("enctype"))||mf,c=new FormData(e)}else if(a3(e)||i3(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(i=h?ns(h,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||ff,l=Bp(e.getAttribute("formenctype"))||Bp(f.getAttribute("enctype"))||mf,c=new FormData(f,e),!u3()){let{name:m,type:g,value:p}=e;if(g==="image"){let b=m?`${m}.`:"";c.append(`${b}x`,"0"),c.append(`${b}y`,"0")}else m&&c.append(m,p)}}else{if(Ff(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ff,i=null,l=mf,u=e}return c&&l==="text/plain"&&(u=c,c=void 0),{action:i,method:n.toLowerCase(),encType:l,formData:c,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ux(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function m3(e,t,n,i){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${i}`:l.pathname=`${l.pathname}.${i}`:l.pathname==="/"?l.pathname=`_root.${i}`:t&&ns(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${i}`,l}async function h3(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 p3(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 g3(e,t,n){let i=await Promise.all(e.map(async l=>{let c=t.routes[l.route.id];if(c){let u=await h3(c,n);return u.links?u.links():[]}return[]}));return b3(i.flat(1).filter(p3).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function mw(e,t,n,i,l,c){let u=(h,m)=>n[m]?h.route.id!==n[m].route.id:!0,f=(h,m)=>{var g;return n[m].pathname!==h.pathname||((g=n[m].route.path)==null?void 0:g.endsWith("*"))&&n[m].params["*"]!==h.params["*"]};return c==="assets"?t.filter((h,m)=>u(h,m)||f(h,m)):c==="data"?t.filter((h,m)=>{var p;let g=i.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(u(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let b=h.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function x3(e,t,{includeHydrateFallback:n}={}){return y3(e.map(i=>{let l=t.routes[i.route.id];if(!l)return[];let c=[l.module];return l.clientActionModule&&(c=c.concat(l.clientActionModule)),l.clientLoaderModule&&(c=c.concat(l.clientLoaderModule)),n&&l.hydrateFallbackModule&&(c=c.concat(l.hydrateFallbackModule)),l.imports&&(c=c.concat(l.imports)),c}).flat(1))}function y3(e){return[...new Set(e)]}function v3(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function b3(e,t){let n=new Set;return new Set(t),e.reduce((i,l)=>{let c=JSON.stringify(v3(l));return n.has(c)||(n.add(c),i.push({key:c,link:l})),i},[])}function qN(){let e=y.useContext(ko);return Ux(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function w3(){let e=y.useContext(Uf);return Ux(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Bx=y.createContext(void 0);Bx.displayName="FrameworkContext";function VN(){let e=y.useContext(Bx);return Ux(e,"You must render this element inside a <HydratedRouter> element"),e}function j3(e,t){let n=y.useContext(Bx),[i,l]=y.useState(!1),[c,u]=y.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:g,onTouchStart:p}=t,b=y.useRef(null);y.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let j=N=>{N.forEach(T=>{u(T.isIntersecting)})},E=new IntersectionObserver(j,{threshold:.5});return b.current&&E.observe(b.current),()=>{E.disconnect()}}},[e]),y.useEffect(()=>{if(i){let j=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(j)}}},[i]);let w=()=>{l(!0)},S=()=>{l(!1),u(!1)};return n?e!=="intent"?[c,b,{}]:[c,b,{onFocus:Dc(f,w),onBlur:Dc(h,S),onMouseEnter:Dc(m,w),onMouseLeave:Dc(g,S),onTouchStart:Dc(p,w)}]:[!1,b,{}]}function Dc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function N3({page:e,...t}){let{router:n}=qN(),i=y.useMemo(()=>AN(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?y.createElement(C3,{page:e,matches:i,...t}):null}function S3(e){let{manifest:t,routeModules:n}=VN(),[i,l]=y.useState([]);return y.useEffect(()=>{let c=!1;return g3(e,t,n).then(u=>{c||l(u)}),()=>{c=!0}},[e,t,n]),i}function C3({page:e,matches:t,...n}){let i=va(),{future:l,manifest:c,routeModules:u}=VN(),{basename:f}=qN(),{loaderData:h,matches:m}=w3(),g=y.useMemo(()=>mw(e,t,m,c,i,"data"),[e,t,m,c,i]),p=y.useMemo(()=>mw(e,t,m,c,i,"assets"),[e,t,m,c,i]),b=y.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let j=new Set,E=!1;if(t.forEach(T=>{var R;let k=c.routes[T.route.id];!k||!k.hasLoader||(!g.some(z=>z.route.id===T.route.id)&&T.route.id in h&&((R=u[T.route.id])!=null&&R.shouldRevalidate)||k.hasClientLoader?E=!0:j.add(T.route.id))}),j.size===0)return[];let N=m3(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return E&&j.size>0&&N.searchParams.set("_routes",t.filter(T=>j.has(T.route.id)).map(T=>T.route.id).join(",")),[N.pathname+N.search]},[f,l.unstable_trailingSlashAwareDataRequests,h,i,c,g,t,e,u]),w=y.useMemo(()=>x3(p,c),[p,c]),S=S3(p);return y.createElement(y.Fragment,null,b.map(j=>y.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...n})),w.map(j=>y.createElement("link",{key:j,rel:"modulepreload",href:j,...n})),S.map(({key:j,link:E})=>y.createElement("link",{key:j,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function k3(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var E3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{E3&&(window.__reactRouterVersion="7.13.0")}catch{}function T3({basename:e,children:t,unstable_useTransitions:n,window:i}){let l=y.useRef();l.current==null&&(l.current=rA({window:i,v5Compat:!0}));let c=l.current,[u,f]=y.useState({action:c.action,location:c.location}),h=y.useCallback(m=>{n===!1?f(m):y.startTransition(()=>f(m))},[n]);return y.useLayoutEffect(()=>c.listen(h),[c,h]),y.createElement(n3,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:c,unstable_useTransitions:n})}var $N=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$r=y.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:l,reloadDocument:c,replace:u,state:f,target:h,to:m,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b,...w},S){let{basename:j,unstable_useTransitions:E}=y.useContext(gr),N=typeof m=="string"&&$N.test(m),T=ON(m,j);m=T.to;let k=LA(m,{relative:l}),[R,z,D]=j3(i,w),O=M3(m,{replace:u,state:f,target:h,preventScrollReset:g,relative:l,viewTransition:p,unstable_defaultShouldRevalidate:b,unstable_useTransitions:E});function B(L){t&&t(L),L.defaultPrevented||O(L)}let q=y.createElement("a",{...w,...D,href:T.absoluteURL||k,onClick:T.isExternal||c?t:B,ref:k3(S,z),target:h,"data-discover":!N&&n==="render"?"true":void 0});return R&&!N?y.createElement(y.Fragment,null,q,y.createElement(N3,{page:k})):q});$r.displayName="Link";var Bg=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:l=!1,style:c,to:u,viewTransition:f,children:h,...m},g){let p=mu(u,{relative:m.relative}),b=va(),w=y.useContext(Uf),{navigator:S,basename:j}=y.useContext(gr),E=w!=null&&L3(p)&&f===!0,N=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,T=b.pathname,k=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(T=T.toLowerCase(),k=k?k.toLowerCase():null,N=N.toLowerCase()),k&&j&&(k=ns(k,j)||k);const R=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let z=T===N||!l&&T.startsWith(N)&&T.charAt(R)==="/",D=k!=null&&(k===N||!l&&k.startsWith(N)&&k.charAt(N.length)==="/"),O={isActive:z,isPending:D,isTransitioning:E},B=z?t:void 0,q;typeof i=="function"?q=i(O):q=[i,z?"active":null,D?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let L=typeof c=="function"?c(O):c;return y.createElement($r,{...m,"aria-current":B,className:q,ref:g,style:L,to:u,viewTransition:f},typeof h=="function"?h(O):h)});Bg.displayName="NavLink";var A3=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:l,state:c,method:u=ff,action:f,onSubmit:h,relative:m,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b,...w},S)=>{let{unstable_useTransitions:j}=y.useContext(gr),E=P3(),N=z3(f,{relative:m}),T=u.toLowerCase()==="get"?"get":"post",k=typeof f=="string"&&$N.test(f),R=z=>{if(h&&h(z),z.defaultPrevented)return;z.preventDefault();let D=z.nativeEvent.submitter,O=(D==null?void 0:D.getAttribute("formmethod"))||u,B=()=>E(D||z.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:l,state:c,relative:m,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b});j&&n!==!1?y.startTransition(()=>B()):B()};return y.createElement("form",{ref:S,method:T,action:N,onSubmit:i?h:R,...w,"data-discover":!k&&e==="render"?"true":void 0})});A3.displayName="Form";function R3(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function GN(e){let t=y.useContext(ko);return St(t,R3(e)),t}function M3(e,{target:t,replace:n,state:i,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let m=Bf(),g=va(),p=mu(e,{relative:c});return y.useCallback(b=>{if(o3(b,t)){b.preventDefault();let w=n!==void 0?n:Jc(g)===Jc(p),S=()=>m(e,{replace:w,state:i,preventScrollReset:l,relative:c,viewTransition:u,unstable_defaultShouldRevalidate:f});h?y.startTransition(()=>S()):S()}},[g,m,p,n,i,t,e,l,c,u,f,h])}function D3(e){Or(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=y.useRef(Ug(e)),n=y.useRef(!1),i=va(),l=y.useMemo(()=>c3(i.search,n.current?null:t.current),[i.search]),c=Bf(),u=y.useCallback((f,h)=>{const m=Ug(typeof f=="function"?f(new URLSearchParams(l)):f);n.current=!0,c("?"+m,h)},[c,l]);return[l,u]}var O3=0,_3=()=>`__${String(++O3)}__`;function P3(){let{router:e}=GN("useSubmit"),{basename:t}=y.useContext(gr),n=XA(),i=e.fetch,l=e.navigate;return y.useCallback(async(c,u={})=>{let{action:f,method:h,encType:m,formData:g,body:p}=f3(c,t);if(u.navigate===!1){let b=u.fetcherKey||_3();await i(b,n,u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:p,formMethod:u.method||h,formEncType:u.encType||m,flushSync:u.flushSync})}else await l(u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:p,formMethod:u.method||h,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:n,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,l,t,n])}function z3(e,{relative:t}={}){let{basename:n}=y.useContext(gr),i=y.useContext(zr);St(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),c={...mu(e||".",{relative:t})},u=va();if(e==null){c.search=u.search;let f=new URLSearchParams(c.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(p=>p).forEach(p=>f.append("index",p));let g=f.toString();c.search=g?`?${g}`:""}}return(!e||e===".")&&l.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(c.pathname=c.pathname==="/"?n:Za([n,c.pathname])),Jc(c)}function L3(e,{relative:t}={}){let n=y.useContext(PN);St(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=GN("useViewTransitionState"),l=mu(e,{relative:t});if(!n.isTransitioning)return!1;let c=ns(n.currentLocation.pathname,i)||n.currentLocation.pathname,u=ns(n.nextLocation.pathname,i)||n.nextLocation.pathname;return wf(l.pathname,u)!=null||wf(l.pathname,c)!=null}var hu=xN();const YN=If(hu);/**
|
|
61
|
+
* @license lucide-react v0.454.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const I3=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),KN=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.454.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var U3={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"};/**
|
|
71
|
+
* @license lucide-react v0.454.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const B3=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:l="",children:c,iconNode:u,...f},h)=>y.createElement("svg",{ref:h,...U3,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:KN("lucide",l),...f},[...u.map(([m,g])=>y.createElement(m,g)),...Array.isArray(c)?c:[c]]));/**
|
|
76
|
+
* @license lucide-react v0.454.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const he=(e,t)=>{const n=y.forwardRef(({className:i,...l},c)=>y.createElement(B3,{ref:c,iconNode:t,className:KN(`lucide-${I3(e)}`,i),...l}));return n.displayName=`${e}`,n};/**
|
|
81
|
+
* @license lucide-react v0.454.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Js=he("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"}]]);/**
|
|
86
|
+
* @license lucide-react v0.454.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const F3=he("ArrowDownRight",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]);/**
|
|
91
|
+
* @license lucide-react v0.454.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const Fx=he("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
96
|
+
* @license lucide-react v0.454.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Hx=he("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
101
|
+
* @license lucide-react v0.454.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const H3=he("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
106
|
+
* @license lucide-react v0.454.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const QN=he("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
|
|
111
|
+
* @license lucide-react v0.454.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Hf=he("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"}]]);/**
|
|
116
|
+
* @license lucide-react v0.454.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const cr=he("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
121
|
+
* @license lucide-react v0.454.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Mr=he("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
126
|
+
* @license lucide-react v0.454.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const XN=he("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
131
|
+
* @license lucide-react v0.454.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const qf=he("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
136
|
+
* @license lucide-react v0.454.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const qx=he("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
141
|
+
* @license lucide-react v0.454.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Yi=he("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
146
|
+
* @license lucide-react v0.454.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Ki=he("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
151
|
+
* @license lucide-react v0.454.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Qi=he("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
156
|
+
* @license lucide-react v0.454.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const To=he("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
161
|
+
* @license lucide-react v0.454.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const q3=he("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
|
|
166
|
+
* @license lucide-react v0.454.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const V3=he("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
|
171
|
+
* @license lucide-react v0.454.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Gr=he("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"}]]);/**
|
|
176
|
+
* @license lucide-react v0.454.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const WN=he("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
181
|
+
* @license lucide-react v0.454.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const _r=he("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
186
|
+
* @license lucide-react v0.454.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const $3=he("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
191
|
+
* @license lucide-react v0.454.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Fg=he("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
196
|
+
* @license lucide-react v0.454.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const ba=he("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
201
|
+
* @license lucide-react v0.454.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const ZN=he("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
206
|
+
* @license lucide-react v0.454.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const xo=he("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
211
|
+
* @license lucide-react v0.454.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Vx=he("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
216
|
+
* @license lucide-react v0.454.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const G3=he("Command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);/**
|
|
221
|
+
* @license lucide-react v0.454.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const qc=he("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"}]]);/**
|
|
226
|
+
* @license lucide-react v0.454.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const Vf=he("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
231
|
+
* @license lucide-react v0.454.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const Ao=he("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
236
|
+
* @license lucide-react v0.454.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const pu=he("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
241
|
+
* @license lucide-react v0.454.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const Y3=he("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"}]]);/**
|
|
246
|
+
* @license lucide-react v0.454.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const hw=he("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"}]]);/**
|
|
251
|
+
* @license lucide-react v0.454.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const K3=he("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"}]]);/**
|
|
256
|
+
* @license lucide-react v0.454.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const rs=he("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
|
|
261
|
+
* @license lucide-react v0.454.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Lt=he("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"}]]);/**
|
|
266
|
+
* @license lucide-react v0.454.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const Hg=he("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"}]]);/**
|
|
271
|
+
* @license lucide-react v0.454.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const eu=he("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
276
|
+
* @license lucide-react v0.454.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const Q3=he("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
|
|
281
|
+
* @license lucide-react v0.454.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const $x=he("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"}]]);/**
|
|
286
|
+
* @license lucide-react v0.454.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const X3=he("GitCommitHorizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);/**
|
|
291
|
+
* @license lucide-react v0.454.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const W3=he("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
|
|
296
|
+
* @license lucide-react v0.454.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Z3=he("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
301
|
+
* @license lucide-react v0.454.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const J3=he("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
|
|
306
|
+
* @license lucide-react v0.454.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const JN=he("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
311
|
+
* @license lucide-react v0.454.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Yr=he("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
316
|
+
* @license lucide-react v0.454.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const eS=he("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
321
|
+
* @license lucide-react v0.454.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const eR=he("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/**
|
|
326
|
+
* @license lucide-react v0.454.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const Kn=he("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
331
|
+
* @license lucide-react v0.454.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const Ct=he("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
336
|
+
* @license lucide-react v0.454.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const gu=he("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
341
|
+
* @license lucide-react v0.454.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Gx=he("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
346
|
+
* @license lucide-react v0.454.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const tS=he("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"}]]);/**
|
|
351
|
+
* @license lucide-react v0.454.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const pw=he("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
356
|
+
* @license lucide-react v0.454.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const tR=he("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"}]]);/**
|
|
361
|
+
* @license lucide-react v0.454.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const nS=he("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
366
|
+
* @license lucide-react v0.454.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const nR=he("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
371
|
+
* @license lucide-react v0.454.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const rR=he("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);/**
|
|
376
|
+
* @license lucide-react v0.454.0 - ISC
|
|
377
|
+
*
|
|
378
|
+
* This source code is licensed under the ISC license.
|
|
379
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
+
*/const aR=he("PanelRightOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
|
|
381
|
+
* @license lucide-react v0.454.0 - ISC
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the ISC license.
|
|
384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/const sR=he("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
|
|
386
|
+
* @license lucide-react v0.454.0 - ISC
|
|
387
|
+
*
|
|
388
|
+
* This source code is licensed under the ISC license.
|
|
389
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
+
*/const iR=he("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
391
|
+
* @license lucide-react v0.454.0 - ISC
|
|
392
|
+
*
|
|
393
|
+
* This source code is licensed under the ISC license.
|
|
394
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
+
*/const rS=he("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
396
|
+
* @license lucide-react v0.454.0 - ISC
|
|
397
|
+
*
|
|
398
|
+
* This source code is licensed under the ISC license.
|
|
399
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
+
*/const lR=he("PenTool",[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
|
|
401
|
+
* @license lucide-react v0.454.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*/const Yx=he("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"}]]);/**
|
|
406
|
+
* @license lucide-react v0.454.0 - ISC
|
|
407
|
+
*
|
|
408
|
+
* This source code is licensed under the ISC license.
|
|
409
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
+
*/const Ro=he("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
411
|
+
* @license lucide-react v0.454.0 - ISC
|
|
412
|
+
*
|
|
413
|
+
* This source code is licensed under the ISC license.
|
|
414
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
+
*/const aS=he("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
|
|
416
|
+
* @license lucide-react v0.454.0 - ISC
|
|
417
|
+
*
|
|
418
|
+
* This source code is licensed under the ISC license.
|
|
419
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
+
*/const Wa=he("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
421
|
+
* @license lucide-react v0.454.0 - ISC
|
|
422
|
+
*
|
|
423
|
+
* This source code is licensed under the ISC license.
|
|
424
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
+
*/const ga=he("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"}]]);/**
|
|
426
|
+
* @license lucide-react v0.454.0 - ISC
|
|
427
|
+
*
|
|
428
|
+
* This source code is licensed under the ISC license.
|
|
429
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
+
*/const oR=he("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
|
|
431
|
+
* @license lucide-react v0.454.0 - ISC
|
|
432
|
+
*
|
|
433
|
+
* This source code is licensed under the ISC license.
|
|
434
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
+
*/const cR=he("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"}]]);/**
|
|
436
|
+
* @license lucide-react v0.454.0 - ISC
|
|
437
|
+
*
|
|
438
|
+
* This source code is licensed under the ISC license.
|
|
439
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
+
*/const Kr=he("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
441
|
+
* @license lucide-react v0.454.0 - ISC
|
|
442
|
+
*
|
|
443
|
+
* This source code is licensed under the ISC license.
|
|
444
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
+
*/const sS=he("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
|
|
446
|
+
* @license lucide-react v0.454.0 - ISC
|
|
447
|
+
*
|
|
448
|
+
* This source code is licensed under the ISC license.
|
|
449
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
+
*/const Xi=he("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"}]]);/**
|
|
451
|
+
* @license lucide-react v0.454.0 - ISC
|
|
452
|
+
*
|
|
453
|
+
* This source code is licensed under the ISC license.
|
|
454
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
+
*/const $f=he("Shield",[["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"}]]);/**
|
|
456
|
+
* @license lucide-react v0.454.0 - ISC
|
|
457
|
+
*
|
|
458
|
+
* This source code is licensed under the ISC license.
|
|
459
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
+
*/const uR=he("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
|
|
461
|
+
* @license lucide-react v0.454.0 - ISC
|
|
462
|
+
*
|
|
463
|
+
* This source code is licensed under the ISC license.
|
|
464
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
+
*/const dR=he("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
|
|
466
|
+
* @license lucide-react v0.454.0 - ISC
|
|
467
|
+
*
|
|
468
|
+
* This source code is licensed under the ISC license.
|
|
469
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
+
*/const fR=he("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
471
|
+
* @license lucide-react v0.454.0 - ISC
|
|
472
|
+
*
|
|
473
|
+
* This source code is licensed under the ISC license.
|
|
474
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
475
|
+
*/const Vt=he("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
476
|
+
* @license lucide-react v0.454.0 - ISC
|
|
477
|
+
*
|
|
478
|
+
* This source code is licensed under the ISC license.
|
|
479
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
480
|
+
*/const gw=he("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
|
|
481
|
+
* @license lucide-react v0.454.0 - ISC
|
|
482
|
+
*
|
|
483
|
+
* This source code is licensed under the ISC license.
|
|
484
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
+
*/const xw=he("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
486
|
+
* @license lucide-react v0.454.0 - ISC
|
|
487
|
+
*
|
|
488
|
+
* This source code is licensed under the ISC license.
|
|
489
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
490
|
+
*/const yo=he("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
|
|
491
|
+
* @license lucide-react v0.454.0 - ISC
|
|
492
|
+
*
|
|
493
|
+
* This source code is licensed under the ISC license.
|
|
494
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
495
|
+
*/const wn=he("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
496
|
+
* @license lucide-react v0.454.0 - ISC
|
|
497
|
+
*
|
|
498
|
+
* This source code is licensed under the ISC license.
|
|
499
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
500
|
+
*/const Kx=he("TestTube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);/**
|
|
501
|
+
* @license lucide-react v0.454.0 - ISC
|
|
502
|
+
*
|
|
503
|
+
* This source code is licensed under the ISC license.
|
|
504
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
505
|
+
*/const Gf=he("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"}]]);/**
|
|
506
|
+
* @license lucide-react v0.454.0 - ISC
|
|
507
|
+
*
|
|
508
|
+
* This source code is licensed under the ISC license.
|
|
509
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
510
|
+
*/const Qx=he("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
511
|
+
* @license lucide-react v0.454.0 - ISC
|
|
512
|
+
*
|
|
513
|
+
* This source code is licensed under the ISC license.
|
|
514
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
515
|
+
*/const Mo=he("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
516
|
+
* @license lucide-react v0.454.0 - ISC
|
|
517
|
+
*
|
|
518
|
+
* This source code is licensed under the ISC license.
|
|
519
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
520
|
+
*/const xa=he("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"}]]);/**
|
|
521
|
+
* @license lucide-react v0.454.0 - ISC
|
|
522
|
+
*
|
|
523
|
+
* This source code is licensed under the ISC license.
|
|
524
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
+
*/const iS=he("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
526
|
+
* @license lucide-react v0.454.0 - ISC
|
|
527
|
+
*
|
|
528
|
+
* This source code is licensed under the ISC license.
|
|
529
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
530
|
+
*/const Ja=he("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
531
|
+
* @license lucide-react v0.454.0 - ISC
|
|
532
|
+
*
|
|
533
|
+
* This source code is licensed under the ISC license.
|
|
534
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
535
|
+
*/const lS=he("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
|
|
536
|
+
* @license lucide-react v0.454.0 - ISC
|
|
537
|
+
*
|
|
538
|
+
* This source code is licensed under the ISC license.
|
|
539
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
540
|
+
*/const Kc=he("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
|
|
541
|
+
* @license lucide-react v0.454.0 - ISC
|
|
542
|
+
*
|
|
543
|
+
* This source code is licensed under the ISC license.
|
|
544
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
545
|
+
*/const oS=he("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
|
|
546
|
+
* @license lucide-react v0.454.0 - ISC
|
|
547
|
+
*
|
|
548
|
+
* This source code is licensed under the ISC license.
|
|
549
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
550
|
+
*/const Ii=he("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
551
|
+
* @license lucide-react v0.454.0 - ISC
|
|
552
|
+
*
|
|
553
|
+
* This source code is licensed under the ISC license.
|
|
554
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
555
|
+
*/const wa=he("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
556
|
+
* @license lucide-react v0.454.0 - ISC
|
|
557
|
+
*
|
|
558
|
+
* This source code is licensed under the ISC license.
|
|
559
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
560
|
+
*/const $t=he("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function cS(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(n=cS(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function uS(){for(var e,t,n=0,i="",l=arguments.length;n<l;n++)(e=arguments[n])&&(t=cS(e))&&(i&&(i+=" "),i+=t);return i}const mR=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},hR=(e,t)=>({classGroupId:e,validator:t}),dS=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jf="-",yw=[],pR="arbitrary..",gR=e=>{const t=yR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return xR(u);const f=u.split(jf),h=f[0]===""&&f.length>1?1:0;return fS(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=i[u],m=n[u];return h?m?mR(m,h):h:m||yw}return n[u]||yw}}},fS=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const l=e[t],c=n.nextPart.get(l);if(c){const m=fS(e,t+1,c);if(m)return m}const u=n.validators;if(u===null)return;const f=t===0?e.join(jf):e.slice(t).join(jf),h=u.length;for(let m=0;m<h;m++){const g=u[m];if(g.validator(f))return g.classGroupId}},xR=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?pR+i:void 0})(),yR=e=>{const{theme:t,classGroups:n}=e;return vR(n,t)},vR=(e,t)=>{const n=dS();for(const i in e){const l=e[i];Xx(l,n,i,t)}return n},Xx=(e,t,n,i)=>{const l=e.length;for(let c=0;c<l;c++){const u=e[c];bR(u,t,n,i)}},bR=(e,t,n,i)=>{if(typeof e=="string"){wR(e,t,n);return}if(typeof e=="function"){jR(e,t,n,i);return}NR(e,t,n,i)},wR=(e,t,n)=>{const i=e===""?t:mS(t,e);i.classGroupId=n},jR=(e,t,n,i)=>{if(SR(e)){Xx(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(hR(n,e))},NR=(e,t,n,i)=>{const l=Object.entries(e),c=l.length;for(let u=0;u<c;u++){const[f,h]=l[u];Xx(h,mS(t,f),n,i)}},mS=(e,t)=>{let n=e;const i=t.split(jf),l=i.length;for(let c=0;c<l;c++){const u=i[c];let f=n.nextPart.get(u);f||(f=dS(),n.nextPart.set(u,f)),n=f}return n},SR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,CR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const l=(c,u)=>{n[c]=u,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(c){let u=n[c];if(u!==void 0)return u;if((u=i[c])!==void 0)return l(c,u),u},set(c,u){c in n?n[c]=u:l(c,u)}}},qg="!",vw=":",kR=[],bw=(e,t,n,i,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:l}),ER=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=l=>{const c=[];let u=0,f=0,h=0,m;const g=l.length;for(let j=0;j<g;j++){const E=l[j];if(u===0&&f===0){if(E===vw){c.push(l.slice(h,j)),h=j+1;continue}if(E==="/"){m=j;continue}}E==="["?u++:E==="]"?u--:E==="("?f++:E===")"&&f--}const p=c.length===0?l:l.slice(h);let b=p,w=!1;p.endsWith(qg)?(b=p.slice(0,-1),w=!0):p.startsWith(qg)&&(b=p.slice(1),w=!0);const S=m&&m>h?m-h:void 0;return bw(c,w,b,S)};if(t){const l=t+vw,c=i;i=u=>u.startsWith(l)?c(u.slice(l.length)):bw(kR,!1,u,void 0,!0)}if(n){const l=i;i=c=>n({className:c,parseClassName:l})}return i},TR=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let l=[];for(let c=0;c<n.length;c++){const u=n[c],f=u[0]==="[",h=t.has(u);f||h?(l.length>0&&(l.sort(),i.push(...l),l=[]),i.push(u)):l.push(u)}return l.length>0&&(l.sort(),i.push(...l)),i}},AR=e=>({cache:CR(e.cacheSize),parseClassName:ER(e),sortModifiers:TR(e),...gR(e)}),RR=/\s+/,MR=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:c}=t,u=[],f=e.trim().split(RR);let h="";for(let m=f.length-1;m>=0;m-=1){const g=f[m],{isExternal:p,modifiers:b,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:j}=n(g);if(p){h=g+(h.length>0?" "+h:h);continue}let E=!!j,N=i(E?S.substring(0,j):S);if(!N){if(!E){h=g+(h.length>0?" "+h:h);continue}if(N=i(S),!N){h=g+(h.length>0?" "+h:h);continue}E=!1}const T=b.length===0?"":b.length===1?b[0]:c(b).join(":"),k=w?T+qg:T,R=k+N;if(u.indexOf(R)>-1)continue;u.push(R);const z=l(N,E);for(let D=0;D<z.length;++D){const O=z[D];u.push(k+O)}h=g+(h.length>0?" "+h:h)}return h},DR=(...e)=>{let t=0,n,i,l="";for(;t<e.length;)(n=e[t++])&&(i=hS(n))&&(l&&(l+=" "),l+=i);return l},hS=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=hS(e[i]))&&(n&&(n+=" "),n+=t);return n},OR=(e,...t)=>{let n,i,l,c;const u=h=>{const m=t.reduce((g,p)=>p(g),e());return n=AR(m),i=n.cache.get,l=n.cache.set,c=f,f(h)},f=h=>{const m=i(h);if(m)return m;const g=MR(h,n);return l(h,g),g};return c=u,(...h)=>c(DR(...h))},_R=[],Yt=e=>{const t=n=>n[e]||_R;return t.isThemeGetter=!0,t},pS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PR=/^\d+\/\d+$/,zR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LR=/\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$/,IR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hl=e=>PR.test(e),Ye=e=>!!e&&!Number.isNaN(Number(e)),Os=e=>!!e&&Number.isInteger(Number(e)),Fp=e=>e.endsWith("%")&&Ye(e.slice(0,-1)),$a=e=>zR.test(e),FR=()=>!0,HR=e=>LR.test(e)&&!IR.test(e),xS=()=>!1,qR=e=>UR.test(e),VR=e=>BR.test(e),$R=e=>!Ce(e)&&!ke(e),GR=e=>Do(e,bS,xS),Ce=e=>pS.test(e),Ni=e=>Do(e,wS,HR),Hp=e=>Do(e,WR,Ye),ww=e=>Do(e,yS,xS),YR=e=>Do(e,vS,VR),Hd=e=>Do(e,jS,qR),ke=e=>gS.test(e),Oc=e=>Oo(e,wS),KR=e=>Oo(e,ZR),jw=e=>Oo(e,yS),QR=e=>Oo(e,bS),XR=e=>Oo(e,vS),qd=e=>Oo(e,jS,!0),Do=(e,t,n)=>{const i=pS.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Oo=(e,t,n=!1)=>{const i=gS.exec(e);return i?i[1]?t(i[1]):n:!1},yS=e=>e==="position"||e==="percentage",vS=e=>e==="image"||e==="url",bS=e=>e==="length"||e==="size"||e==="bg-size",wS=e=>e==="length",WR=e=>e==="number",ZR=e=>e==="family-name",jS=e=>e==="shadow",JR=()=>{const e=Yt("color"),t=Yt("font"),n=Yt("text"),i=Yt("font-weight"),l=Yt("tracking"),c=Yt("leading"),u=Yt("breakpoint"),f=Yt("container"),h=Yt("spacing"),m=Yt("radius"),g=Yt("shadow"),p=Yt("inset-shadow"),b=Yt("text-shadow"),w=Yt("drop-shadow"),S=Yt("blur"),j=Yt("perspective"),E=Yt("aspect"),N=Yt("ease"),T=Yt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...R(),ke,Ce],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],B=()=>[ke,Ce,h],q=()=>[Hl,"full","auto",...B()],L=()=>[Os,"none","subgrid",ke,Ce],ne=()=>["auto",{span:["full",Os,ke,Ce]},Os,ke,Ce],X=()=>[Os,"auto",ke,Ce],ue=()=>["auto","min","max","fr",ke,Ce],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...B()],Q=()=>[Hl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],Y=()=>[e,ke,Ce],$=()=>[...R(),jw,ww,{position:[ke,Ce]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],U=()=>["auto","cover","contain",QR,GR,{size:[ke,Ce]}],P=()=>[Fp,Oc,Ni],A=()=>["","none","full",m,ke,Ce],J=()=>["",Ye,Oc,Ni],ae=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Ye,Fp,jw,ww],pe=()=>["","none",S,ke,Ce],ve=()=>["none",Ye,ke,Ce],Ae=()=>["none",Ye,ke,Ce],ze=()=>[Ye,ke,Ce],Le=()=>[Hl,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[$a],breakpoint:[$a],color:[FR],container:[$a],"drop-shadow":[$a],ease:["in","out","in-out"],font:[$R],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[$a],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[$a],shadow:[$a],spacing:["px",Ye],text:[$a],"text-shadow":[$a],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Hl,Ce,ke,E]}],container:["container"],columns:[{columns:[Ye,Ce,ke,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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"],sr:["sr-only","not-sr-only"],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:z()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:q()}],"inset-x":[{"inset-x":q()}],"inset-y":[{"inset-y":q()}],start:[{start:q()}],end:[{end:q()}],top:[{top:q()}],right:[{right:q()}],bottom:[{bottom:q()}],left:[{left:q()}],visibility:["visible","invisible","collapse"],z:[{z:[Os,"auto",ke,Ce]}],basis:[{basis:[Hl,"full","auto",f,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,Hl,"auto","initial","none",Ce]}],grow:[{grow:["",Ye,ke,Ce]}],shrink:[{shrink:["",Ye,ke,Ce]}],order:[{order:[Os,"first","last","none",ke,Ce]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[f,"screen",...Q()]}],"min-w":[{"min-w":[f,"screen","none",...Q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",n,Oc,Ni]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ke,Hp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fp,Ce]}],"font-family":[{font:[KR,Ce,t]}],"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:[l,ke,Ce]}],"line-clamp":[{"line-clamp":[Ye,"none",ke,Hp]}],leading:[{leading:[c,...B()]}],"list-image":[{"list-image":["none",ke,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",ke,Ni]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Ye,"auto",ke,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Ce]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:U()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Os,ke,Ce],radial:["",ke,Ce],conic:[Os,ke,Ce]},XR,YR]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,ke,Ce]}],"outline-w":[{outline:["",Ye,Oc,Ni]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",g,qd,Hd]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",p,qd,Hd]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Ye,Ni]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",b,qd,Hd]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Ye,ke,Ce]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[ke,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:U()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Ce]}],filter:[{filter:["","none",ke,Ce]}],blur:[{blur:pe()}],brightness:[{brightness:[Ye,ke,Ce]}],contrast:[{contrast:[Ye,ke,Ce]}],"drop-shadow":[{"drop-shadow":["","none",w,qd,Hd]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Ye,ke,Ce]}],"hue-rotate":[{"hue-rotate":[Ye,ke,Ce]}],invert:[{invert:["",Ye,ke,Ce]}],saturate:[{saturate:[Ye,ke,Ce]}],sepia:[{sepia:["",Ye,ke,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Ce]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,ke,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,ke,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,ke,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,ke,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Ye,ke,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,ke,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,ke,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,ke,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",ke,Ce]}],ease:[{ease:["linear","initial",N,ke,Ce]}],delay:[{delay:[Ye,ke,Ce]}],animate:[{animate:["none",T,ke,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ke,Ce]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[ke,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ke,Ce]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",ke,Ce]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Ye,Oc,Ni,Hp]}],stroke:[{stroke:["none",...Y()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},eM=OR(JR);function G(...e){return eM(uS(e))}function Nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Qn(...e){return t=>{let n=!1;const i=e.map(l=>{const c=Nw(l,t);return!n&&typeof c=="function"&&(n=!0),c});if(n)return()=>{for(let l=0;l<i.length;l++){const c=i[l];typeof c=="function"?c():Nw(e[l],null)}}}}function Ze(...e){return y.useCallback(Qn(...e),e)}var tM=Symbol.for("react.lazy"),Nf=Tx[" use ".trim().toString()];function nM(e){return typeof e=="object"&&e!==null&&"then"in e}function NS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tM&&"_payload"in e&&nM(e._payload)}function SS(e){const t=aM(e),n=y.forwardRef((i,l)=>{let{children:c,...u}=i;NS(c)&&typeof Nf=="function"&&(c=Nf(c._payload));const f=y.Children.toArray(c),h=f.find(iM);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}var rM=SS("Slot");function aM(e){const t=y.forwardRef((n,i)=>{let{children:l,...c}=n;if(NS(l)&&typeof Nf=="function"&&(l=Nf(l._payload)),y.isValidElement(l)){const u=oM(l),f=lM(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sM=Symbol("radix.slottable");function iM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sM}function lM(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function oM(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Sw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Cw=uS,CS=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return Cw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:l,defaultVariants:c}=t,u=Object.keys(l).map(m=>{const g=n==null?void 0:n[m],p=c==null?void 0:c[m];if(g===null)return null;const b=Sw(g)||Sw(p);return l[m][b]}),f=n&&Object.entries(n).reduce((m,g)=>{let[p,b]=g;return b===void 0||(m[p]=b),m},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((m,g)=>{let{class:p,className:b,...w}=g;return Object.entries(w).every(S=>{let[j,E]=S;return Array.isArray(E)?E.includes({...c,...f}[j]):{...c,...f}[j]===E})?[...m,p,b]:m},[]);return Cw(e,u,h,n==null?void 0:n.class,n==null?void 0:n.className)},cM=CS("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-border bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-foreground underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-6",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),me=y.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...l},c)=>{const u=i?rM:"button";return a.jsx(u,{className:G(cM({variant:t,size:n,className:e})),ref:c,...l})});me.displayName="Button";function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(l){if(e==null||e(l),n===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function uM(e,t){const n=y.createContext(t),i=c=>{const{children:u,...f}=c,h=y.useMemo(()=>f,Object.values(f));return a.jsx(n.Provider,{value:h,children:u})};i.displayName=e+"Provider";function l(c){const u=y.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[i,l]}function ja(e,t=[]){let n=[];function i(c,u){const f=y.createContext(u),h=n.length;n=[...n,u];const m=p=>{var N;const{scope:b,children:w,...S}=p,j=((N=b==null?void 0:b[e])==null?void 0:N[h])||f,E=y.useMemo(()=>S,Object.values(S));return a.jsx(j.Provider,{value:E,children:w})};m.displayName=c+"Provider";function g(p,b){var j;const w=((j=b==null?void 0:b[e])==null?void 0:j[h])||f,S=y.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[m,g]}const l=()=>{const c=n.map(u=>y.createContext(u));return function(f){const h=(f==null?void 0:f[e])||c;return y.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return l.scopeName=e,[i,dM(l,...t)]}function dM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const u=i.reduce((f,{useScope:h,scopeName:m})=>{const p=h(c)[`__scope${m}`];return{...f,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var hn=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},fM=Tx[" useInsertionEffect ".trim().toString()]||hn;function Ui({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[l,c,u]=mM({defaultProp:t,onChange:n}),f=e!==void 0,h=f?e:l;{const g=y.useRef(e!==void 0);y.useEffect(()=>{const p=g.current;p!==f&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${f?"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.`),g.current=f},[f,i])}const m=y.useCallback(g=>{var p;if(f){const b=hM(g)?g(e):g;b!==e&&((p=u.current)==null||p.call(u,b))}else c(g)},[f,e,c,u]);return[h,m]}function mM({defaultProp:e,onChange:t}){const[n,i]=y.useState(e),l=y.useRef(n),c=y.useRef(t);return fM(()=>{c.current=t},[t]),y.useEffect(()=>{var u;l.current!==n&&((u=c.current)==null||u.call(c,n),l.current=n)},[n,l]),[n,i,c]}function hM(e){return typeof e=="function"}function pM(e){const t=gM(e),n=y.forwardRef((i,l)=>{const{children:c,...u}=i,f=y.Children.toArray(c),h=f.find(yM);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}function gM(e){const t=y.forwardRef((n,i)=>{const{children:l,...c}=n;if(y.isValidElement(l)){const u=bM(l),f=vM(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xM=Symbol("radix.slottable");function yM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xM}function vM(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function bM(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=wM.reduce((e,t)=>{const n=pM(`Primitive.${t}`),i=y.forwardRef((l,c)=>{const{asChild:u,...f}=l,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(h,{...f,ref:c})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function kS(e,t){e&&hu.flushSync(()=>e.dispatchEvent(t))}function kw(e){const t=jM(e),n=y.forwardRef((i,l)=>{const{children:c,...u}=i,f=y.Children.toArray(c),h=f.find(SM);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}function jM(e){const t=y.forwardRef((n,i)=>{const{children:l,...c}=n;if(y.isValidElement(l)){const u=kM(l),f=CM(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var NM=Symbol("radix.slottable");function SM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NM}function CM(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function kM(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Wx(e){const t=e+"CollectionProvider",[n,i]=ja(t),[l,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=j=>{const{scope:E,children:N}=j,T=xe.useRef(null),k=xe.useRef(new Map).current;return a.jsx(l,{scope:E,itemMap:k,collectionRef:T,children:N})};u.displayName=t;const f=e+"CollectionSlot",h=kw(f),m=xe.forwardRef((j,E)=>{const{scope:N,children:T}=j,k=c(f,N),R=Ze(E,k.collectionRef);return a.jsx(h,{ref:R,children:T})});m.displayName=f;const g=e+"CollectionItemSlot",p="data-radix-collection-item",b=kw(g),w=xe.forwardRef((j,E)=>{const{scope:N,children:T,...k}=j,R=xe.useRef(null),z=Ze(E,R),D=c(g,N);return xe.useEffect(()=>(D.itemMap.set(R,{ref:R,...k}),()=>void D.itemMap.delete(R))),a.jsx(b,{[p]:"",ref:z,children:T})});w.displayName=g;function S(j){const E=c(e+"CollectionConsumer",j);return xe.useCallback(()=>{const T=E.collectionRef.current;if(!T)return[];const k=Array.from(T.querySelectorAll(`[${p}]`));return Array.from(E.itemMap.values()).sort((D,O)=>k.indexOf(D.ref.current)-k.indexOf(O.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:m,ItemSlot:w},S,i]}var EM=y.createContext(void 0);function Yf(e){const t=y.useContext(EM);return e||t||"ltr"}function un(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function TM(e,t=globalThis==null?void 0:globalThis.document){const n=un(e);y.useEffect(()=>{const i=l=>{l.key==="Escape"&&n(l)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var AM="DismissableLayer",Vg="dismissableLayer.update",RM="dismissableLayer.pointerDownOutside",MM="dismissableLayer.focusOutside",Ew,ES=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xu=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,m=y.useContext(ES),[g,p]=y.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=y.useState({}),S=Ze(t,O=>p(O)),j=Array.from(m.layers),[E]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),N=j.indexOf(E),T=g?j.indexOf(g):-1,k=m.layersWithOutsidePointerEventsDisabled.size>0,R=T>=N,z=_M(O=>{const B=O.target,q=[...m.branches].some(L=>L.contains(B));!R||q||(l==null||l(O),u==null||u(O),O.defaultPrevented||f==null||f())},b),D=PM(O=>{const B=O.target;[...m.branches].some(L=>L.contains(B))||(c==null||c(O),u==null||u(O),O.defaultPrevented||f==null||f())},b);return TM(O=>{T===m.layers.size-1&&(i==null||i(O),!O.defaultPrevented&&f&&(O.preventDefault(),f()))},b),y.useEffect(()=>{if(g)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Ew=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Tw(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=Ew)}},[g,b,n,m]),y.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Tw())},[g,m]),y.useEffect(()=>{const O=()=>w({});return document.addEventListener(Vg,O),()=>document.removeEventListener(Vg,O)},[]),a.jsx(Pe.div,{...h,ref:S,style:{pointerEvents:k?R?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,z.onPointerDownCapture)})});xu.displayName=AM;var DM="DismissableLayerBranch",OM=y.forwardRef((e,t)=>{const n=y.useContext(ES),i=y.useRef(null),l=Ze(t,i);return y.useEffect(()=>{const c=i.current;if(c)return n.branches.add(c),()=>{n.branches.delete(c)}},[n.branches]),a.jsx(Pe.div,{...e,ref:l})});OM.displayName=DM;function _M(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),i=y.useRef(!1),l=y.useRef(()=>{});return y.useEffect(()=>{const c=f=>{if(f.target&&!i.current){let h=function(){TS(RM,n,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=h,t.addEventListener("click",l.current,{once:!0})):h()}else t.removeEventListener("click",l.current);i.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",c),t.removeEventListener("click",l.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function PM(e,t=globalThis==null?void 0:globalThis.document){const n=un(e),i=y.useRef(!1);return y.useEffect(()=>{const l=c=>{c.target&&!i.current&&TS(MM,n,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Tw(){const e=new CustomEvent(Vg);document.dispatchEvent(e)}function TS(e,t,n,{discrete:i}){const l=n.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&l.addEventListener(e,t,{once:!0}),i?kS(l,c):l.dispatchEvent(c)}var qp=0;function Zx(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Aw()),document.body.insertAdjacentElement("beforeend",e[1]??Aw()),qp++,()=>{qp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qp--}},[])}function Aw(){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 Vp="focusScope.autoFocusOnMount",$p="focusScope.autoFocusOnUnmount",Rw={bubbles:!1,cancelable:!0},zM="FocusScope",Kf=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...u}=e,[f,h]=y.useState(null),m=un(l),g=un(c),p=y.useRef(null),b=Ze(t,j=>h(j)),w=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let j=function(k){if(w.paused||!f)return;const R=k.target;f.contains(R)?p.current=R:Is(p.current,{select:!0})},E=function(k){if(w.paused||!f)return;const R=k.relatedTarget;R!==null&&(f.contains(R)||Is(p.current,{select:!0}))},N=function(k){if(document.activeElement===document.body)for(const z of k)z.removedNodes.length>0&&Is(f)};document.addEventListener("focusin",j),document.addEventListener("focusout",E);const T=new MutationObserver(N);return f&&T.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",E),T.disconnect()}}},[i,f,w.paused]),y.useEffect(()=>{if(f){Dw.add(w);const j=document.activeElement;if(!f.contains(j)){const N=new CustomEvent(Vp,Rw);f.addEventListener(Vp,m),f.dispatchEvent(N),N.defaultPrevented||(LM(HM(AS(f)),{select:!0}),document.activeElement===j&&Is(f))}return()=>{f.removeEventListener(Vp,m),setTimeout(()=>{const N=new CustomEvent($p,Rw);f.addEventListener($p,g),f.dispatchEvent(N),N.defaultPrevented||Is(j??document.body,{select:!0}),f.removeEventListener($p,g),Dw.remove(w)},0)}}},[f,m,g,w]);const S=y.useCallback(j=>{if(!n&&!i||w.paused)return;const E=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,N=document.activeElement;if(E&&N){const T=j.currentTarget,[k,R]=IM(T);k&&R?!j.shiftKey&&N===R?(j.preventDefault(),n&&Is(k,{select:!0})):j.shiftKey&&N===k&&(j.preventDefault(),n&&Is(R,{select:!0})):N===T&&j.preventDefault()}},[n,i,w.paused]);return a.jsx(Pe.div,{tabIndex:-1,...u,ref:b,onKeyDown:S})});Kf.displayName=zM;function LM(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Is(i,{select:t}),document.activeElement!==n)return}function IM(e){const t=AS(e),n=Mw(t,e),i=Mw(t.reverse(),e);return[n,i]}function AS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const l=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||l?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mw(e,t){for(const n of e)if(!UM(n,{upTo:t}))return n}function UM(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 BM(e){return e instanceof HTMLInputElement&&"select"in e}function Is(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&BM(e)&&t&&e.select()}}var Dw=FM();function FM(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ow(e,t),e.unshift(t)},remove(t){var n;e=Ow(e,t),(n=e[0])==null||n.resume()}}}function Ow(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function HM(e){return e.filter(t=>t.tagName!=="A")}var qM=Tx[" useId ".trim().toString()]||(()=>{}),VM=0;function Nn(e){const[t,n]=y.useState(qM());return hn(()=>{n(i=>i??String(VM++))},[e]),t?`radix-${t}`:""}const $M=["top","right","bottom","left"],Xs=Math.min,or=Math.max,Sf=Math.round,Vd=Math.floor,pa=e=>({x:e,y:e}),GM={left:"right",right:"left",bottom:"top",top:"bottom"},YM={start:"end",end:"start"};function $g(e,t,n){return or(e,Xs(t,n))}function as(e,t){return typeof e=="function"?e(t):e}function ss(e){return e.split("-")[0]}function _o(e){return e.split("-")[1]}function Jx(e){return e==="x"?"y":"x"}function ey(e){return e==="y"?"height":"width"}const KM=new Set(["top","bottom"]);function ha(e){return KM.has(ss(e))?"y":"x"}function ty(e){return Jx(ha(e))}function QM(e,t,n){n===void 0&&(n=!1);const i=_o(e),l=ty(e),c=ey(l);let u=l==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=Cf(u)),[u,Cf(u)]}function XM(e){const t=Cf(e);return[Gg(e),t,Gg(t)]}function Gg(e){return e.replace(/start|end/g,t=>YM[t])}const _w=["left","right"],Pw=["right","left"],WM=["top","bottom"],ZM=["bottom","top"];function JM(e,t,n){switch(e){case"top":case"bottom":return n?t?Pw:_w:t?_w:Pw;case"left":case"right":return t?WM:ZM;default:return[]}}function eD(e,t,n,i){const l=_o(e);let c=JM(ss(e),n==="start",i);return l&&(c=c.map(u=>u+"-"+l),t&&(c=c.concat(c.map(Gg)))),c}function Cf(e){return e.replace(/left|right|bottom|top/g,t=>GM[t])}function tD(e){return{top:0,right:0,bottom:0,left:0,...e}}function RS(e){return typeof e!="number"?tD(e):{top:e,right:e,bottom:e,left:e}}function kf(e){const{x:t,y:n,width:i,height:l}=e;return{width:i,height:l,top:n,left:t,right:t+i,bottom:n+l,x:t,y:n}}function zw(e,t,n){let{reference:i,floating:l}=e;const c=ha(t),u=ty(t),f=ey(u),h=ss(t),m=c==="y",g=i.x+i.width/2-l.width/2,p=i.y+i.height/2-l.height/2,b=i[f]/2-l[f]/2;let w;switch(h){case"top":w={x:g,y:i.y-l.height};break;case"bottom":w={x:g,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y:p};break;case"left":w={x:i.x-l.width,y:p};break;default:w={x:i.x,y:i.y}}switch(_o(t)){case"start":w[u]-=b*(n&&m?-1:1);break;case"end":w[u]+=b*(n&&m?-1:1);break}return w}async function nD(e,t){var n;t===void 0&&(t={});const{x:i,y:l,platform:c,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:b=!1,padding:w=0}=as(t,e),S=RS(w),E=f[b?p==="floating"?"reference":"floating":p],N=kf(await c.getClippingRect({element:(n=await(c.isElement==null?void 0:c.isElement(E)))==null||n?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:m,rootBoundary:g,strategy:h})),T=p==="floating"?{x:i,y:l,width:u.floating.width,height:u.floating.height}:u.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),R=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},z=kf(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:T,offsetParent:k,strategy:h}):T);return{top:(N.top-z.top+S.top)/R.y,bottom:(z.bottom-N.bottom+S.bottom)/R.y,left:(N.left-z.left+S.left)/R.x,right:(z.right-N.right+S.right)/R.x}}const rD=async(e,t,n)=>{const{placement:i="bottom",strategy:l="absolute",middleware:c=[],platform:u}=n,f=c.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:l}),{x:g,y:p}=zw(m,i,h),b=i,w={},S=0;for(let E=0;E<f.length;E++){var j;const{name:N,fn:T}=f[E],{x:k,y:R,data:z,reset:D}=await T({x:g,y:p,initialPlacement:i,placement:b,strategy:l,middlewareData:w,rects:m,platform:{...u,detectOverflow:(j=u.detectOverflow)!=null?j:nD},elements:{reference:e,floating:t}});g=k??g,p=R??p,w={...w,[N]:{...w[N],...z}},D&&S<=50&&(S++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(m=D.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:l}):D.rects),{x:g,y:p}=zw(m,b,h)),E=-1)}return{x:g,y:p,placement:b,strategy:l,middlewareData:w}},aD=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:l,rects:c,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:g=0}=as(e,t)||{};if(m==null)return{};const p=RS(g),b={x:n,y:i},w=ty(l),S=ey(w),j=await u.getDimensions(m),E=w==="y",N=E?"top":"left",T=E?"bottom":"right",k=E?"clientHeight":"clientWidth",R=c.reference[S]+c.reference[w]-b[w]-c.floating[S],z=b[w]-c.reference[w],D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let O=D?D[k]:0;(!O||!await(u.isElement==null?void 0:u.isElement(D)))&&(O=f.floating[k]||c.floating[S]);const B=R/2-z/2,q=O/2-j[S]/2-1,L=Xs(p[N],q),ne=Xs(p[T],q),X=L,ue=O-j[S]-ne,ie=O/2-j[S]/2+B,te=$g(X,ie,ue),I=!h.arrow&&_o(l)!=null&&ie!==te&&c.reference[S]/2-(ie<X?L:ne)-j[S]/2<0,Q=I?ie<X?ie-X:ie-ue:0;return{[w]:b[w]+Q,data:{[w]:te,centerOffset:ie-te-Q,...I&&{alignmentOffset:Q}},reset:I}}}),sD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:l,middlewareData:c,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:j=!0,...E}=as(e,t);if((n=c.arrow)!=null&&n.alignmentOffset)return{};const N=ss(l),T=ha(f),k=ss(f)===f,R=await(h.isRTL==null?void 0:h.isRTL(m.floating)),z=b||(k||!j?[Cf(f)]:XM(f)),D=S!=="none";!b&&D&&z.push(...eD(f,j,S,R));const O=[f,...z],B=await h.detectOverflow(t,E),q=[];let L=((i=c.flip)==null?void 0:i.overflows)||[];if(g&&q.push(B[N]),p){const ie=QM(l,u,R);q.push(B[ie[0]],B[ie[1]])}if(L=[...L,{placement:l,overflows:q}],!q.every(ie=>ie<=0)){var ne,X;const ie=(((ne=c.flip)==null?void 0:ne.index)||0)+1,te=O[ie];if(te&&(!(p==="alignment"?T!==ha(te):!1)||L.every(Y=>ha(Y.placement)===T?Y.overflows[0]>0:!0)))return{data:{index:ie,overflows:L},reset:{placement:te}};let I=(X=L.filter(Q=>Q.overflows[0]<=0).sort((Q,Y)=>Q.overflows[1]-Y.overflows[1])[0])==null?void 0:X.placement;if(!I)switch(w){case"bestFit":{var ue;const Q=(ue=L.filter(Y=>{if(D){const $=ha(Y.placement);return $===T||$==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter($=>$>0).reduce(($,_)=>$+_,0)]).sort((Y,$)=>Y[1]-$[1])[0])==null?void 0:ue[0];Q&&(I=Q);break}case"initialPlacement":I=f;break}if(l!==I)return{reset:{placement:I}}}return{}}}};function Lw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Iw(e){return $M.some(t=>e[t]>=0)}const iD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:i}=t,{strategy:l="referenceHidden",...c}=as(e,t);switch(l){case"referenceHidden":{const u=await i.detectOverflow(t,{...c,elementContext:"reference"}),f=Lw(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Iw(f)}}}case"escaped":{const u=await i.detectOverflow(t,{...c,altBoundary:!0}),f=Lw(u,n.floating);return{data:{escapedOffsets:f,escaped:Iw(f)}}}default:return{}}}}},MS=new Set(["left","top"]);async function lD(e,t){const{placement:n,platform:i,elements:l}=e,c=await(i.isRTL==null?void 0:i.isRTL(l.floating)),u=ss(n),f=_o(n),h=ha(n)==="y",m=MS.has(u)?-1:1,g=c&&h?-1:1,p=as(t,e);let{mainAxis:b,crossAxis:w,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof S=="number"&&(w=f==="end"?S*-1:S),h?{x:w*g,y:b*m}:{x:b*m,y:w*g}}const oD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:l,y:c,placement:u,middlewareData:f}=t,h=await lD(t,e);return u===((n=f.offset)==null?void 0:n.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+h.x,y:c+h.y,data:{...h,placement:u}}}}},cD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:l,platform:c}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:N=>{let{x:T,y:k}=N;return{x:T,y:k}}},...m}=as(e,t),g={x:n,y:i},p=await c.detectOverflow(t,m),b=ha(ss(l)),w=Jx(b);let S=g[w],j=g[b];if(u){const N=w==="y"?"top":"left",T=w==="y"?"bottom":"right",k=S+p[N],R=S-p[T];S=$g(k,S,R)}if(f){const N=b==="y"?"top":"left",T=b==="y"?"bottom":"right",k=j+p[N],R=j-p[T];j=$g(k,j,R)}const E=h.fn({...t,[w]:S,[b]:j});return{...E,data:{x:E.x-n,y:E.y-i,enabled:{[w]:u,[b]:f}}}}}},uD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:l,rects:c,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=as(e,t),g={x:n,y:i},p=ha(l),b=Jx(p);let w=g[b],S=g[p];const j=as(f,t),E=typeof j=="number"?{mainAxis:j,crossAxis:0}:{mainAxis:0,crossAxis:0,...j};if(h){const k=b==="y"?"height":"width",R=c.reference[b]-c.floating[k]+E.mainAxis,z=c.reference[b]+c.reference[k]-E.mainAxis;w<R?w=R:w>z&&(w=z)}if(m){var N,T;const k=b==="y"?"width":"height",R=MS.has(ss(l)),z=c.reference[p]-c.floating[k]+(R&&((N=u.offset)==null?void 0:N[p])||0)+(R?0:E.crossAxis),D=c.reference[p]+c.reference[k]+(R?0:((T=u.offset)==null?void 0:T[p])||0)-(R?E.crossAxis:0);S<z?S=z:S>D&&(S=D)}return{[b]:w,[p]:S}}}},dD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:l,rects:c,platform:u,elements:f}=t,{apply:h=()=>{},...m}=as(e,t),g=await u.detectOverflow(t,m),p=ss(l),b=_o(l),w=ha(l)==="y",{width:S,height:j}=c.floating;let E,N;p==="top"||p==="bottom"?(E=p,N=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(N=p,E=b==="end"?"top":"bottom");const T=j-g.top-g.bottom,k=S-g.left-g.right,R=Xs(j-g[E],T),z=Xs(S-g[N],k),D=!t.middlewareData.shift;let O=R,B=z;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(B=k),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(O=T),D&&!b){const L=or(g.left,0),ne=or(g.right,0),X=or(g.top,0),ue=or(g.bottom,0);w?B=S-2*(L!==0||ne!==0?L+ne:or(g.left,g.right)):O=j-2*(X!==0||ue!==0?X+ue:or(g.top,g.bottom))}await h({...t,availableWidth:B,availableHeight:O});const q=await u.getDimensions(f.floating);return S!==q.width||j!==q.height?{reset:{rects:!0}}:{}}}};function Qf(){return typeof window<"u"}function Po(e){return DS(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Na(e){var t;return(t=(DS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function DS(e){return Qf()?e instanceof Node||e instanceof ur(e).Node:!1}function Xr(e){return Qf()?e instanceof Element||e instanceof ur(e).Element:!1}function ya(e){return Qf()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function Uw(e){return!Qf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}const fD=new Set(["inline","contents"]);function yu(e){const{overflow:t,overflowX:n,overflowY:i,display:l}=Wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!fD.has(l)}const mD=new Set(["table","td","th"]);function hD(e){return mD.has(Po(e))}const pD=[":popover-open",":modal"];function Xf(e){return pD.some(t=>{try{return e.matches(t)}catch{return!1}})}const gD=["transform","translate","scale","rotate","perspective"],xD=["transform","translate","scale","rotate","perspective","filter"],yD=["paint","layout","strict","content"];function ny(e){const t=ry(),n=Xr(e)?Wr(e):e;return gD.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||xD.some(i=>(n.willChange||"").includes(i))||yD.some(i=>(n.contain||"").includes(i))}function vD(e){let t=Ws(e);for(;ya(t)&&!vo(t);){if(ny(t))return t;if(Xf(t))return null;t=Ws(t)}return null}function ry(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const bD=new Set(["html","body","#document"]);function vo(e){return bD.has(Po(e))}function Wr(e){return ur(e).getComputedStyle(e)}function Wf(e){return Xr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if(Po(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Uw(e)&&e.host||Na(e);return Uw(t)?t.host:t}function OS(e){const t=Ws(e);return vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ya(t)&&yu(t)?t:OS(t)}function tu(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=OS(e),c=l===((i=e.ownerDocument)==null?void 0:i.body),u=ur(l);if(c){const f=Yg(u);return t.concat(u,u.visualViewport||[],yu(l)?l:[],f&&n?tu(f):[])}return t.concat(l,tu(l,[],n))}function Yg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _S(e){const t=Wr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const l=ya(e),c=l?e.offsetWidth:n,u=l?e.offsetHeight:i,f=Sf(n)!==c||Sf(i)!==u;return f&&(n=c,i=u),{width:n,height:i,$:f}}function ay(e){return Xr(e)?e:e.contextElement}function Zl(e){const t=ay(e);if(!ya(t))return pa(1);const n=t.getBoundingClientRect(),{width:i,height:l,$:c}=_S(t);let u=(c?Sf(n.width):n.width)/i,f=(c?Sf(n.height):n.height)/l;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const wD=pa(0);function PS(e){const t=ur(e);return!ry()||!t.visualViewport?wD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ur(e)?!1:t}function Bi(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),c=ay(e);let u=pa(1);t&&(i?Xr(i)&&(u=Zl(i)):u=Zl(e));const f=jD(c,n,i)?PS(c):pa(0);let h=(l.left+f.x)/u.x,m=(l.top+f.y)/u.y,g=l.width/u.x,p=l.height/u.y;if(c){const b=ur(c),w=i&&Xr(i)?ur(i):i;let S=b,j=Yg(S);for(;j&&i&&w!==S;){const E=Zl(j),N=j.getBoundingClientRect(),T=Wr(j),k=N.left+(j.clientLeft+parseFloat(T.paddingLeft))*E.x,R=N.top+(j.clientTop+parseFloat(T.paddingTop))*E.y;h*=E.x,m*=E.y,g*=E.x,p*=E.y,h+=k,m+=R,S=ur(j),j=Yg(S)}}return kf({width:g,height:p,x:h,y:m})}function Zf(e,t){const n=Wf(e).scrollLeft;return t?t.left+n:Bi(Na(e)).left+n}function zS(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-Zf(e,n),l=n.top+t.scrollTop;return{x:i,y:l}}function ND(e){let{elements:t,rect:n,offsetParent:i,strategy:l}=e;const c=l==="fixed",u=Na(i),f=t?Xf(t.floating):!1;if(i===u||f&&c)return n;let h={scrollLeft:0,scrollTop:0},m=pa(1);const g=pa(0),p=ya(i);if((p||!p&&!c)&&((Po(i)!=="body"||yu(u))&&(h=Wf(i)),ya(i))){const w=Bi(i);m=Zl(i),g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}const b=u&&!p&&!c?zS(u,h):pa(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+g.x+b.x,y:n.y*m.y-h.scrollTop*m.y+g.y+b.y}}function SD(e){return Array.from(e.getClientRects())}function CD(e){const t=Na(e),n=Wf(e),i=e.ownerDocument.body,l=or(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),c=or(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let u=-n.scrollLeft+Zf(e);const f=-n.scrollTop;return Wr(i).direction==="rtl"&&(u+=or(t.clientWidth,i.clientWidth)-l),{width:l,height:c,x:u,y:f}}const Bw=25;function kD(e,t){const n=ur(e),i=Na(e),l=n.visualViewport;let c=i.clientWidth,u=i.clientHeight,f=0,h=0;if(l){c=l.width,u=l.height;const g=ry();(!g||g&&t==="fixed")&&(f=l.offsetLeft,h=l.offsetTop)}const m=Zf(i);if(m<=0){const g=i.ownerDocument,p=g.body,b=getComputedStyle(p),w=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,S=Math.abs(i.clientWidth-p.clientWidth-w);S<=Bw&&(c-=S)}else m<=Bw&&(c+=m);return{width:c,height:u,x:f,y:h}}const ED=new Set(["absolute","fixed"]);function TD(e,t){const n=Bi(e,!0,t==="fixed"),i=n.top+e.clientTop,l=n.left+e.clientLeft,c=ya(e)?Zl(e):pa(1),u=e.clientWidth*c.x,f=e.clientHeight*c.y,h=l*c.x,m=i*c.y;return{width:u,height:f,x:h,y:m}}function Fw(e,t,n){let i;if(t==="viewport")i=kD(e,n);else if(t==="document")i=CD(Na(e));else if(Xr(t))i=TD(t,n);else{const l=PS(e);i={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return kf(i)}function LS(e,t){const n=Ws(e);return n===t||!Xr(n)||vo(n)?!1:Wr(n).position==="fixed"||LS(n,t)}function AD(e,t){const n=t.get(e);if(n)return n;let i=tu(e,[],!1).filter(f=>Xr(f)&&Po(f)!=="body"),l=null;const c=Wr(e).position==="fixed";let u=c?Ws(e):e;for(;Xr(u)&&!vo(u);){const f=Wr(u),h=ny(u);!h&&f.position==="fixed"&&(l=null),(c?!h&&!l:!h&&f.position==="static"&&!!l&&ED.has(l.position)||yu(u)&&!h&&LS(e,u))?i=i.filter(g=>g!==u):l=f,u=Ws(u)}return t.set(e,i),i}function RD(e){let{element:t,boundary:n,rootBoundary:i,strategy:l}=e;const u=[...n==="clippingAncestors"?Xf(t)?[]:AD(t,this._c):[].concat(n),i],f=u[0],h=u.reduce((m,g)=>{const p=Fw(t,g,l);return m.top=or(p.top,m.top),m.right=Xs(p.right,m.right),m.bottom=Xs(p.bottom,m.bottom),m.left=or(p.left,m.left),m},Fw(t,f,l));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function MD(e){const{width:t,height:n}=_S(e);return{width:t,height:n}}function DD(e,t,n){const i=ya(t),l=Na(t),c=n==="fixed",u=Bi(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=pa(0);function m(){h.x=Zf(l)}if(i||!i&&!c)if((Po(t)!=="body"||yu(l))&&(f=Wf(t)),i){const w=Bi(t,!0,c,t);h.x=w.x+t.clientLeft,h.y=w.y+t.clientTop}else l&&m();c&&!i&&l&&m();const g=l&&!i&&!c?zS(l,f):pa(0),p=u.left+f.scrollLeft-h.x-g.x,b=u.top+f.scrollTop-h.y-g.y;return{x:p,y:b,width:u.width,height:u.height}}function Gp(e){return Wr(e).position==="static"}function Hw(e,t){if(!ya(e)||Wr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Na(e)===n&&(n=n.ownerDocument.body),n}function IS(e,t){const n=ur(e);if(Xf(e))return n;if(!ya(e)){let l=Ws(e);for(;l&&!vo(l);){if(Xr(l)&&!Gp(l))return l;l=Ws(l)}return n}let i=Hw(e,t);for(;i&&hD(i)&&Gp(i);)i=Hw(i,t);return i&&vo(i)&&Gp(i)&&!ny(i)?n:i||vD(e)||n}const OD=async function(e){const t=this.getOffsetParent||IS,n=this.getDimensions,i=await n(e.floating);return{reference:DD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function _D(e){return Wr(e).direction==="rtl"}const PD={convertOffsetParentRelativeRectToViewportRelativeRect:ND,getDocumentElement:Na,getClippingRect:RD,getOffsetParent:IS,getElementRects:OD,getClientRects:SD,getDimensions:MD,getScale:Zl,isElement:Xr,isRTL:_D};function US(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zD(e,t){let n=null,i;const l=Na(e);function c(){var f;clearTimeout(i),(f=n)==null||f.disconnect(),n=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),c();const m=e.getBoundingClientRect(),{left:g,top:p,width:b,height:w}=m;if(f||t(),!b||!w)return;const S=Vd(p),j=Vd(l.clientWidth-(g+b)),E=Vd(l.clientHeight-(p+w)),N=Vd(g),k={rootMargin:-S+"px "+-j+"px "+-E+"px "+-N+"px",threshold:or(0,Xs(1,h))||1};let R=!0;function z(D){const O=D[0].intersectionRatio;if(O!==h){if(!R)return u();O?u(!1,O):i=setTimeout(()=>{u(!1,1e-7)},1e3)}O===1&&!US(m,e.getBoundingClientRect())&&u(),R=!1}try{n=new IntersectionObserver(z,{...k,root:l.ownerDocument})}catch{n=new IntersectionObserver(z,k)}n.observe(e)}return u(!0),c}function LD(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,m=ay(e),g=l||c?[...m?tu(m):[],...tu(t)]:[];g.forEach(N=>{l&&N.addEventListener("scroll",n,{passive:!0}),c&&N.addEventListener("resize",n)});const p=m&&f?zD(m,n):null;let b=-1,w=null;u&&(w=new ResizeObserver(N=>{let[T]=N;T&&T.target===m&&w&&(w.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=w)==null||k.observe(t)})),n()}),m&&!h&&w.observe(m),w.observe(t));let S,j=h?Bi(e):null;h&&E();function E(){const N=Bi(e);j&&!US(j,N)&&n(),j=N,S=requestAnimationFrame(E)}return n(),()=>{var N;g.forEach(T=>{l&&T.removeEventListener("scroll",n),c&&T.removeEventListener("resize",n)}),p==null||p(),(N=w)==null||N.disconnect(),w=null,h&&cancelAnimationFrame(S)}}const ID=oD,UD=cD,BD=sD,FD=dD,HD=iD,qw=aD,qD=uD,VD=(e,t,n)=>{const i=new Map,l={platform:PD,...n},c={...l.platform,_c:i};return rD(e,t,{...l,platform:c})};var $D=typeof document<"u",GD=function(){},hf=$D?y.useLayoutEffect:GD;function Ef(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,i,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Ef(e[i],t[i]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,l[i]))return!1;for(i=n;i--!==0;){const c=l[i];if(!(c==="_owner"&&e.$$typeof)&&!Ef(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function BS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vw(e,t){const n=BS(e);return Math.round(t*n)/n}function Yp(e){const t=y.useRef(e);return hf(()=>{t.current=e}),t}function YD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[g,p]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,w]=y.useState(i);Ef(b,i)||w(i);const[S,j]=y.useState(null),[E,N]=y.useState(null),T=y.useCallback(Y=>{Y!==D.current&&(D.current=Y,j(Y))},[]),k=y.useCallback(Y=>{Y!==O.current&&(O.current=Y,N(Y))},[]),R=c||S,z=u||E,D=y.useRef(null),O=y.useRef(null),B=y.useRef(g),q=h!=null,L=Yp(h),ne=Yp(l),X=Yp(m),ue=y.useCallback(()=>{if(!D.current||!O.current)return;const Y={placement:t,strategy:n,middleware:b};ne.current&&(Y.platform=ne.current),VD(D.current,O.current,Y).then($=>{const _={...$,isPositioned:X.current!==!1};ie.current&&!Ef(B.current,_)&&(B.current=_,hu.flushSync(()=>{p(_)}))})},[b,t,n,ne,X]);hf(()=>{m===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,p(Y=>({...Y,isPositioned:!1})))},[m]);const ie=y.useRef(!1);hf(()=>(ie.current=!0,()=>{ie.current=!1}),[]),hf(()=>{if(R&&(D.current=R),z&&(O.current=z),R&&z){if(L.current)return L.current(R,z,ue);ue()}},[R,z,ue,L,q]);const te=y.useMemo(()=>({reference:D,floating:O,setReference:T,setFloating:k}),[T,k]),I=y.useMemo(()=>({reference:R,floating:z}),[R,z]),Q=y.useMemo(()=>{const Y={position:n,left:0,top:0};if(!I.floating)return Y;const $=Vw(I.floating,g.x),_=Vw(I.floating,g.y);return f?{...Y,transform:"translate("+$+"px, "+_+"px)",...BS(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:_}},[n,f,I.floating,g.x,g.y]);return y.useMemo(()=>({...g,update:ue,refs:te,elements:I,floatingStyles:Q}),[g,ue,te,I,Q])}const KD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:l}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?qw({element:i.current,padding:l}).fn(n):{}:i?qw({element:i,padding:l}).fn(n):{}}}},QD=(e,t)=>({...ID(e),options:[e,t]}),XD=(e,t)=>({...UD(e),options:[e,t]}),WD=(e,t)=>({...qD(e),options:[e,t]}),ZD=(e,t)=>({...BD(e),options:[e,t]}),JD=(e,t)=>({...FD(e),options:[e,t]}),eO=(e,t)=>({...HD(e),options:[e,t]}),tO=(e,t)=>({...KD(e),options:[e,t]});var nO="Arrow",FS=y.forwardRef((e,t)=>{const{children:n,width:i=10,height:l=5,...c}=e;return a.jsx(Pe.svg,{...c,ref:t,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});FS.displayName=nO;var rO=FS;function HS(e){const[t,n]=y.useState(void 0);return hn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const c=l[0];let u,f;if("borderBoxSize"in c){const h=c.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;n({width:u,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var sy="Popper",[qS,zo]=ja(sy),[aO,VS]=qS(sy),$S=e=>{const{__scopePopper:t,children:n}=e,[i,l]=y.useState(null);return a.jsx(aO,{scope:t,anchor:i,onAnchorChange:l,children:n})};$S.displayName=sy;var GS="PopperAnchor",YS=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...l}=e,c=VS(GS,n),u=y.useRef(null),f=Ze(t,u),h=y.useRef(null);return y.useEffect(()=>{const m=h.current;h.current=(i==null?void 0:i.current)||u.current,m!==h.current&&c.onAnchorChange(h.current)}),i?null:a.jsx(Pe.div,{...l,ref:f})});YS.displayName=GS;var iy="PopperContent",[sO,iO]=qS(iy),KS=y.forwardRef((e,t)=>{var se,pe,ve,Ae,ze,Le;const{__scopePopper:n,side:i="bottom",sideOffset:l=0,align:c="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:S,...j}=e,E=VS(iy,n),[N,T]=y.useState(null),k=Ze(t,It=>T(It)),[R,z]=y.useState(null),D=HS(R),O=(D==null?void 0:D.width)??0,B=(D==null?void 0:D.height)??0,q=i+(c!=="center"?"-"+c:""),L=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ne=Array.isArray(m)?m:[m],X=ne.length>0,ue={padding:L,boundary:ne.filter(oO),altBoundary:X},{refs:ie,floatingStyles:te,placement:I,isPositioned:Q,middlewareData:Y}=YD({strategy:"fixed",placement:q,whileElementsMounted:(...It)=>LD(...It,{animationFrame:w==="always"}),elements:{reference:E.anchor},middleware:[QD({mainAxis:l+B,alignmentAxis:u}),h&&XD({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?WD():void 0,...ue}),h&&ZD({...ue}),JD({...ue,apply:({elements:It,rects:wt,availableWidth:On,availableHeight:kn})=>{const{width:pn,height:ka}=wt.reference,Ot=It.floating.style;Ot.setProperty("--radix-popper-available-width",`${On}px`),Ot.setProperty("--radix-popper-available-height",`${kn}px`),Ot.setProperty("--radix-popper-anchor-width",`${pn}px`),Ot.setProperty("--radix-popper-anchor-height",`${ka}px`)}}),R&&tO({element:R,padding:f}),cO({arrowWidth:O,arrowHeight:B}),b&&eO({strategy:"referenceHidden",...ue})]}),[$,_]=WS(I),U=un(S);hn(()=>{Q&&(U==null||U())},[Q,U]);const P=(se=Y.arrow)==null?void 0:se.x,A=(pe=Y.arrow)==null?void 0:pe.y,J=((ve=Y.arrow)==null?void 0:ve.centerOffset)!==0,[ae,fe]=y.useState();return hn(()=>{N&&fe(window.getComputedStyle(N).zIndex)},[N]),a.jsx("div",{ref:ie.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:Q?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Ae=Y.transformOrigin)==null?void 0:Ae.x,(ze=Y.transformOrigin)==null?void 0:ze.y].join(" "),...((Le=Y.hide)==null?void 0:Le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(sO,{scope:n,placedSide:$,onArrowChange:z,arrowX:P,arrowY:A,shouldHideArrow:J,children:a.jsx(Pe.div,{"data-side":$,"data-align":_,...j,ref:k,style:{...j.style,animation:Q?void 0:"none"}})})})});KS.displayName=iy;var QS="PopperArrow",lO={top:"bottom",right:"left",bottom:"top",left:"right"},XS=y.forwardRef(function(t,n){const{__scopePopper:i,...l}=t,c=iO(QS,i),u=lO[c.placedSide];return a.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:a.jsx(rO,{...l,ref:n,style:{...l.style,display:"block"}})})});XS.displayName=QS;function oO(e){return e!==null}var cO=e=>({name:"transformOrigin",options:e,fn(t){var E,N,T;const{placement:n,rects:i,middlewareData:l}=t,u=((E=l.arrow)==null?void 0:E.centerOffset)!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=WS(n),p={start:"0%",center:"50%",end:"100%"}[g],b=(((N=l.arrow)==null?void 0:N.x)??0)+f/2,w=(((T=l.arrow)==null?void 0:T.y)??0)+h/2;let S="",j="";return m==="bottom"?(S=u?p:`${b}px`,j=`${-h}px`):m==="top"?(S=u?p:`${b}px`,j=`${i.floating.height+h}px`):m==="right"?(S=`${-h}px`,j=u?p:`${w}px`):m==="left"&&(S=`${i.floating.width+h}px`,j=u?p:`${w}px`),{data:{x:S,y:j}}}});function WS(e){const[t,n="center"]=e.split("-");return[t,n]}var ly=$S,oy=YS,cy=KS,uy=XS,uO="Portal",Jf=y.forwardRef((e,t)=>{var f;const{container:n,...i}=e,[l,c]=y.useState(!1);hn(()=>c(!0),[]);const u=n||l&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?YN.createPortal(a.jsx(Pe.div,{...i,ref:t}),u):null});Jf.displayName=uO;function dO(e,t){return y.useReducer((n,i)=>t[n][i]??n,e)}var xr=e=>{const{present:t,children:n}=e,i=fO(t),l=typeof n=="function"?n({present:i.isPresent}):y.Children.only(n),c=Ze(i.ref,mO(l));return typeof n=="function"||i.isPresent?y.cloneElement(l,{ref:c}):null};xr.displayName="Presence";function fO(e){const[t,n]=y.useState(),i=y.useRef(null),l=y.useRef(e),c=y.useRef("none"),u=e?"mounted":"unmounted",[f,h]=dO(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const m=$d(i.current);c.current=f==="mounted"?m:"none"},[f]),hn(()=>{const m=i.current,g=l.current;if(g!==e){const b=c.current,w=$d(m);e?h("MOUNT"):w==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(g&&b!==w?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,h]),hn(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,p=w=>{const j=$d(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&j&&(h("ANIMATION_END"),!l.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},b=w=>{w.target===t&&(c.current=$d(i.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:y.useCallback(m=>{i.current=m?getComputedStyle(m):null,n(m)},[])}}function $d(e){return(e==null?void 0:e.animationName)||"none"}function mO(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kp="rovingFocusGroup.onEntryFocus",hO={bubbles:!1,cancelable:!0},vu="RovingFocusGroup",[Kg,ZS,pO]=Wx(vu),[gO,JS]=ja(vu,[pO]),[xO,yO]=gO(vu),e2=y.forwardRef((e,t)=>a.jsx(Kg.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Kg.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(vO,{...e,ref:t})})}));e2.displayName=vu;var vO=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:l=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...p}=e,b=y.useRef(null),w=Ze(t,b),S=Yf(c),[j,E]=Ui({prop:u,defaultProp:f??null,onChange:h,caller:vu}),[N,T]=y.useState(!1),k=un(m),R=ZS(n),z=y.useRef(!1),[D,O]=y.useState(0);return y.useEffect(()=>{const B=b.current;if(B)return B.addEventListener(Kp,k),()=>B.removeEventListener(Kp,k)},[k]),a.jsx(xO,{scope:n,orientation:i,dir:S,loop:l,currentTabStopId:j,onItemFocus:y.useCallback(B=>E(B),[E]),onItemShiftTab:y.useCallback(()=>T(!0),[]),onFocusableItemAdd:y.useCallback(()=>O(B=>B+1),[]),onFocusableItemRemove:y.useCallback(()=>O(B=>B-1),[]),children:a.jsx(Pe.div,{tabIndex:N||D===0?-1:0,"data-orientation":i,...p,ref:w,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{z.current=!0}),onFocus:Ne(e.onFocus,B=>{const q=!z.current;if(B.target===B.currentTarget&&q&&!N){const L=new CustomEvent(Kp,hO);if(B.currentTarget.dispatchEvent(L),!L.defaultPrevented){const ne=R().filter(I=>I.focusable),X=ne.find(I=>I.active),ue=ne.find(I=>I.id===j),te=[X,ue,...ne].filter(Boolean).map(I=>I.ref.current);r2(te,g)}}z.current=!1}),onBlur:Ne(e.onBlur,()=>T(!1))})})}),t2="RovingFocusGroupItem",n2=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:l=!1,tabStopId:c,children:u,...f}=e,h=Nn(),m=c||h,g=yO(t2,n),p=g.currentTabStopId===m,b=ZS(n),{onFocusableItemAdd:w,onFocusableItemRemove:S,currentTabStopId:j}=g;return y.useEffect(()=>{if(i)return w(),()=>S()},[i,w,S]),a.jsx(Kg.ItemSlot,{scope:n,id:m,focusable:i,active:l,children:a.jsx(Pe.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...f,ref:t,onMouseDown:Ne(e.onMouseDown,E=>{i?g.onItemFocus(m):E.preventDefault()}),onFocus:Ne(e.onFocus,()=>g.onItemFocus(m)),onKeyDown:Ne(e.onKeyDown,E=>{if(E.key==="Tab"&&E.shiftKey){g.onItemShiftTab();return}if(E.target!==E.currentTarget)return;const N=jO(E,g.orientation,g.dir);if(N!==void 0){if(E.metaKey||E.ctrlKey||E.altKey||E.shiftKey)return;E.preventDefault();let k=b().filter(R=>R.focusable).map(R=>R.ref.current);if(N==="last")k.reverse();else if(N==="prev"||N==="next"){N==="prev"&&k.reverse();const R=k.indexOf(E.currentTarget);k=g.loop?NO(k,R+1):k.slice(R+1)}setTimeout(()=>r2(k))}}),children:typeof u=="function"?u({isCurrentTabStop:p,hasTabStop:j!=null}):u})})});n2.displayName=t2;var bO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jO(e,t,n){const i=wO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return bO[i]}function r2(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function NO(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var SO=e2,CO=n2;function kO(e){const t=EO(e),n=y.forwardRef((i,l)=>{const{children:c,...u}=i,f=y.Children.toArray(c),h=f.find(AO);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}function EO(e){const t=y.forwardRef((n,i)=>{const{children:l,...c}=n;if(y.isValidElement(l)){const u=MO(l),f=RO(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TO=Symbol("radix.slottable");function AO(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TO}function RO(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function MO(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var DO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ql=new WeakMap,Gd=new WeakMap,Yd={},Qp=0,a2=function(e){return e&&(e.host||a2(e.parentNode))},OO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=a2(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_O=function(e,t,n,i){var l=OO(t,Array.isArray(e)?e:[e]);Yd[n]||(Yd[n]=new WeakMap);var c=Yd[n],u=[],f=new Set,h=new Set(l),m=function(p){!p||f.has(p)||(f.add(p),m(p.parentNode))};l.forEach(m);var g=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))g(b);else try{var w=b.getAttribute(i),S=w!==null&&w!=="false",j=(ql.get(b)||0)+1,E=(c.get(b)||0)+1;ql.set(b,j),c.set(b,E),u.push(b),j===1&&S&&Gd.set(b,!0),E===1&&b.setAttribute(n,"true"),S||b.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",b,N)}})};return g(t),f.clear(),Qp++,function(){u.forEach(function(p){var b=ql.get(p)-1,w=c.get(p)-1;ql.set(p,b),c.set(p,w),b||(Gd.has(p)||p.removeAttribute(i),Gd.delete(p)),w||p.removeAttribute(n)}),Qp--,Qp||(ql=new WeakMap,ql=new WeakMap,Gd=new WeakMap,Yd={})}},dy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),l=DO(e);return l?(i.push.apply(i,Array.from(l.querySelectorAll("[aria-live], script"))),_O(i,l,n,"aria-hidden")):function(){return null}},ma=function(){return ma=Object.assign||function(t){for(var n,i=1,l=arguments.length;i<l;i++){n=arguments[i];for(var c in n)Object.prototype.hasOwnProperty.call(n,c)&&(t[c]=n[c])}return t},ma.apply(this,arguments)};function s2(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(e);l<i.length;l++)t.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(e,i[l])&&(n[i[l]]=e[i[l]]);return n}function PO(e,t,n){if(n||arguments.length===2)for(var i=0,l=t.length,c;i<l;i++)(c||!(i in t))&&(c||(c=Array.prototype.slice.call(t,0,i)),c[i]=t[i]);return e.concat(c||Array.prototype.slice.call(t))}var pf="right-scroll-bar-position",gf="width-before-scroll-bar",zO="with-scroll-bars-hidden",LO="--removed-body-scroll-bar-size";function Xp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function IO(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var l=n.value;l!==i&&(n.value=i,n.callback(i,l))}}}})[0];return n.callback=t,n.facade}var UO=typeof window<"u"?y.useLayoutEffect:y.useEffect,$w=new WeakMap;function BO(e,t){var n=IO(null,function(i){return e.forEach(function(l){return Xp(l,i)})});return UO(function(){var i=$w.get(n);if(i){var l=new Set(i),c=new Set(e),u=n.current;l.forEach(function(f){c.has(f)||Xp(f,null)}),c.forEach(function(f){l.has(f)||Xp(f,u)})}$w.set(n,e)},[e]),n}function FO(e){return e}function HO(e,t){t===void 0&&(t=FO);var n=[],i=!1,l={read:function(){if(i)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(c){var u=t(c,i);return n.push(u),function(){n=n.filter(function(f){return f!==u})}},assignSyncMedium:function(c){for(i=!0;n.length;){var u=n;n=[],u.forEach(c)}n={push:function(f){return c(f)},filter:function(){return n}}},assignMedium:function(c){i=!0;var u=[];if(n.length){var f=n;n=[],f.forEach(c),u=n}var h=function(){var g=u;u=[],g.forEach(c)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(g){u.push(g),m()},filter:function(g){return u=u.filter(g),n}}}};return l}function qO(e){e===void 0&&(e={});var t=HO(null);return t.options=ma({async:!0,ssr:!1},e),t}var i2=function(e){var t=e.sideCar,n=s2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,ma({},n))};i2.isSideCarExport=!0;function VO(e,t){return e.useMedium(t),i2}var l2=qO(),Wp=function(){},em=y.forwardRef(function(e,t){var n=y.useRef(null),i=y.useState({onScrollCapture:Wp,onWheelCapture:Wp,onTouchMoveCapture:Wp}),l=i[0],c=i[1],u=e.forwardProps,f=e.children,h=e.className,m=e.removeScrollBar,g=e.enabled,p=e.shards,b=e.sideCar,w=e.noRelative,S=e.noIsolation,j=e.inert,E=e.allowPinchZoom,N=e.as,T=N===void 0?"div":N,k=e.gapMode,R=s2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=b,D=BO([n,t]),O=ma(ma({},R),l);return y.createElement(y.Fragment,null,g&&y.createElement(z,{sideCar:l2,removeScrollBar:m,shards:p,noRelative:w,noIsolation:S,inert:j,setCallbacks:c,allowPinchZoom:!!E,lockRef:n,gapMode:k}),u?y.cloneElement(y.Children.only(f),ma(ma({},O),{ref:D})):y.createElement(T,ma({},O,{className:h,ref:D}),f))});em.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};em.classNames={fullWidth:gf,zeroRight:pf};var $O=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function GO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$O();return t&&e.setAttribute("nonce",t),e}function YO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function KO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=GO())&&(YO(t,n),KO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},XO=function(){var e=QO();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},o2=function(){var e=XO(),t=function(n){var i=n.styles,l=n.dynamic;return e(i,l),null};return t},WO={left:0,top:0,right:0,gap:0},Zp=function(e){return parseInt(e||"",10)||0},ZO=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],l=t[e==="padding"?"paddingRight":"marginRight"];return[Zp(n),Zp(i),Zp(l)]},JO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return WO;var t=ZO(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},e_=o2(),Jl="data-scroll-locked",t_=function(e,t,n,i){var l=e.left,c=e.top,u=e.right,f=e.gap;return n===void 0&&(n="margin"),`
|
|
561
|
+
.`.concat(zO,` {
|
|
562
|
+
overflow: hidden `).concat(i,`;
|
|
563
|
+
padding-right: `).concat(f,"px ").concat(i,`;
|
|
564
|
+
}
|
|
565
|
+
body[`).concat(Jl,`] {
|
|
566
|
+
overflow: hidden `).concat(i,`;
|
|
567
|
+
overscroll-behavior: contain;
|
|
568
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
569
|
+
padding-left: `.concat(l,`px;
|
|
570
|
+
padding-top: `).concat(c,`px;
|
|
571
|
+
padding-right: `).concat(u,`px;
|
|
572
|
+
margin-left:0;
|
|
573
|
+
margin-top:0;
|
|
574
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
575
|
+
`),n==="padding"&&"padding-right: ".concat(f,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.`).concat(pf,` {
|
|
579
|
+
right: `).concat(f,"px ").concat(i,`;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.`).concat(gf,` {
|
|
583
|
+
margin-right: `).concat(f,"px ").concat(i,`;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.`).concat(pf," .").concat(pf,` {
|
|
587
|
+
right: 0 `).concat(i,`;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
.`).concat(gf," .").concat(gf,` {
|
|
591
|
+
margin-right: 0 `).concat(i,`;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
body[`).concat(Jl,`] {
|
|
595
|
+
`).concat(LO,": ").concat(f,`px;
|
|
596
|
+
}
|
|
597
|
+
`)},Gw=function(){var e=parseInt(document.body.getAttribute(Jl)||"0",10);return isFinite(e)?e:0},n_=function(){y.useEffect(function(){return document.body.setAttribute(Jl,(Gw()+1).toString()),function(){var e=Gw()-1;e<=0?document.body.removeAttribute(Jl):document.body.setAttribute(Jl,e.toString())}},[])},r_=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,l=i===void 0?"margin":i;n_();var c=y.useMemo(function(){return JO(l)},[l]);return y.createElement(e_,{styles:t_(c,!t,l,n?"":"!important")})},Qg=!1;if(typeof window<"u")try{var Kd=Object.defineProperty({},"passive",{get:function(){return Qg=!0,!0}});window.addEventListener("test",Kd,Kd),window.removeEventListener("test",Kd,Kd)}catch{Qg=!1}var Vl=Qg?{passive:!1}:!1,a_=function(e){return e.tagName==="TEXTAREA"},c2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!a_(e)&&n[t]==="visible")},s_=function(e){return c2(e,"overflowY")},i_=function(e){return c2(e,"overflowX")},Yw=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var l=u2(e,i);if(l){var c=d2(e,i),u=c[1],f=c[2];if(u>f)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},l_=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},o_=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},u2=function(e,t){return e==="v"?s_(t):i_(t)},d2=function(e,t){return e==="v"?l_(t):o_(t)},c_=function(e,t){return e==="h"&&t==="rtl"?-1:1},u_=function(e,t,n,i,l){var c=c_(e,window.getComputedStyle(t).direction),u=c*i,f=n.target,h=t.contains(f),m=!1,g=u>0,p=0,b=0;do{if(!f)break;var w=d2(e,f),S=w[0],j=w[1],E=w[2],N=j-E-c*S;(S||N)&&u2(e,f)&&(p+=N,b+=S);var T=f.parentNode;f=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(g&&Math.abs(p)<1||!g&&Math.abs(b)<1)&&(m=!0),m},Qd=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kw=function(e){return[e.deltaX,e.deltaY]},Qw=function(e){return e&&"current"in e?e.current:e},d_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},f_=function(e){return`
|
|
598
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
599
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
600
|
+
`)},m_=0,$l=[];function h_(e){var t=y.useRef([]),n=y.useRef([0,0]),i=y.useRef(),l=y.useState(m_++)[0],c=y.useState(o2)[0],u=y.useRef(e);y.useEffect(function(){u.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var j=PO([e.lockRef.current],(e.shards||[]).map(Qw),!0).filter(Boolean);return j.forEach(function(E){return E.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),j.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var f=y.useCallback(function(j,E){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!u.current.allowPinchZoom;var N=Qd(j),T=n.current,k="deltaX"in j?j.deltaX:T[0]-N[0],R="deltaY"in j?j.deltaY:T[1]-N[1],z,D=j.target,O=Math.abs(k)>Math.abs(R)?"h":"v";if("touches"in j&&O==="h"&&D.type==="range")return!1;var B=window.getSelection(),q=B&&B.anchorNode,L=q?q===D||q.contains(D):!1;if(L)return!1;var ne=Yw(O,D);if(!ne)return!0;if(ne?z=O:(z=O==="v"?"h":"v",ne=Yw(O,D)),!ne)return!1;if(!i.current&&"changedTouches"in j&&(k||R)&&(i.current=z),!z)return!0;var X=i.current||z;return u_(X,E,j,X==="h"?k:R)},[]),h=y.useCallback(function(j){var E=j;if(!(!$l.length||$l[$l.length-1]!==c)){var N="deltaY"in E?Kw(E):Qd(E),T=t.current.filter(function(z){return z.name===E.type&&(z.target===E.target||E.target===z.shadowParent)&&d_(z.delta,N)})[0];if(T&&T.should){E.cancelable&&E.preventDefault();return}if(!T){var k=(u.current.shards||[]).map(Qw).filter(Boolean).filter(function(z){return z.contains(E.target)}),R=k.length>0?f(E,k[0]):!u.current.noIsolation;R&&E.cancelable&&E.preventDefault()}}},[]),m=y.useCallback(function(j,E,N,T){var k={name:j,delta:E,target:N,should:T,shadowParent:p_(N)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(R){return R!==k})},1)},[]),g=y.useCallback(function(j){n.current=Qd(j),i.current=void 0},[]),p=y.useCallback(function(j){m(j.type,Kw(j),j.target,f(j,e.lockRef.current))},[]),b=y.useCallback(function(j){m(j.type,Qd(j),j.target,f(j,e.lockRef.current))},[]);y.useEffect(function(){return $l.push(c),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",h,Vl),document.addEventListener("touchmove",h,Vl),document.addEventListener("touchstart",g,Vl),function(){$l=$l.filter(function(j){return j!==c}),document.removeEventListener("wheel",h,Vl),document.removeEventListener("touchmove",h,Vl),document.removeEventListener("touchstart",g,Vl)}},[]);var w=e.removeScrollBar,S=e.inert;return y.createElement(y.Fragment,null,S?y.createElement(c,{styles:f_(l)}):null,w?y.createElement(r_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function p_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const g_=VO(l2,h_);var tm=y.forwardRef(function(e,t){return y.createElement(em,ma({},e,{ref:t,sideCar:g_}))});tm.classNames=em.classNames;var Xg=["Enter"," "],x_=["ArrowDown","PageUp","Home"],f2=["ArrowUp","PageDown","End"],y_=[...x_,...f2],v_={ltr:[...Xg,"ArrowRight"],rtl:[...Xg,"ArrowLeft"]},b_={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bu="Menu",[nu,w_,j_]=Wx(bu),[Wi,m2]=ja(bu,[j_,zo,JS]),nm=zo(),h2=JS(),[N_,Zi]=Wi(bu),[S_,wu]=Wi(bu),p2=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:l,onOpenChange:c,modal:u=!0}=e,f=nm(t),[h,m]=y.useState(null),g=y.useRef(!1),p=un(c),b=Yf(l);return y.useEffect(()=>{const w=()=>{g.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>g.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),a.jsx(ly,{...f,children:a.jsx(N_,{scope:t,open:n,onOpenChange:p,content:h,onContentChange:m,children:a.jsx(S_,{scope:t,onClose:y.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:b,modal:u,children:i})})})};p2.displayName=bu;var C_="MenuAnchor",fy=y.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,l=nm(n);return a.jsx(oy,{...l,...i,ref:t})});fy.displayName=C_;var my="MenuPortal",[k_,g2]=Wi(my,{forceMount:void 0}),x2=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:l}=e,c=Zi(my,t);return a.jsx(k_,{scope:t,forceMount:n,children:a.jsx(xr,{present:n||c.open,children:a.jsx(Jf,{asChild:!0,container:l,children:i})})})};x2.displayName=my;var Dr="MenuContent",[E_,hy]=Wi(Dr),y2=y.forwardRef((e,t)=>{const n=g2(Dr,e.__scopeMenu),{forceMount:i=n.forceMount,...l}=e,c=Zi(Dr,e.__scopeMenu),u=wu(Dr,e.__scopeMenu);return a.jsx(nu.Provider,{scope:e.__scopeMenu,children:a.jsx(xr,{present:i||c.open,children:a.jsx(nu.Slot,{scope:e.__scopeMenu,children:u.modal?a.jsx(T_,{...l,ref:t}):a.jsx(A_,{...l,ref:t})})})})}),T_=y.forwardRef((e,t)=>{const n=Zi(Dr,e.__scopeMenu),i=y.useRef(null),l=Ze(t,i);return y.useEffect(()=>{const c=i.current;if(c)return dy(c)},[]),a.jsx(py,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ne(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),A_=y.forwardRef((e,t)=>{const n=Zi(Dr,e.__scopeMenu);return a.jsx(py,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),R_=kO("MenuContent.ScrollLock"),py=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:b,onDismiss:w,disableOutsideScroll:S,...j}=e,E=Zi(Dr,n),N=wu(Dr,n),T=nm(n),k=h2(n),R=w_(n),[z,D]=y.useState(null),O=y.useRef(null),B=Ze(t,O,E.onContentChange),q=y.useRef(0),L=y.useRef(""),ne=y.useRef(0),X=y.useRef(null),ue=y.useRef("right"),ie=y.useRef(0),te=S?tm:y.Fragment,I=S?{as:R_,allowPinchZoom:!0}:void 0,Q=$=>{var se,pe;const _=L.current+$,U=R().filter(ve=>!ve.disabled),P=document.activeElement,A=(se=U.find(ve=>ve.ref.current===P))==null?void 0:se.textValue,J=U.map(ve=>ve.textValue),ae=H_(J,_,A),fe=(pe=U.find(ve=>ve.textValue===ae))==null?void 0:pe.ref.current;(function ve(Ae){L.current=Ae,window.clearTimeout(q.current),Ae!==""&&(q.current=window.setTimeout(()=>ve(""),1e3))})(_),fe&&setTimeout(()=>fe.focus())};y.useEffect(()=>()=>window.clearTimeout(q.current),[]),Zx();const Y=y.useCallback($=>{var U,P;return ue.current===((U=X.current)==null?void 0:U.side)&&V_($,(P=X.current)==null?void 0:P.area)},[]);return a.jsx(E_,{scope:n,searchRef:L,onItemEnter:y.useCallback($=>{Y($)&&$.preventDefault()},[Y]),onItemLeave:y.useCallback($=>{var _;Y($)||((_=O.current)==null||_.focus(),D(null))},[Y]),onTriggerLeave:y.useCallback($=>{Y($)&&$.preventDefault()},[Y]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:y.useCallback($=>{X.current=$},[]),children:a.jsx(te,{...I,children:a.jsx(Kf,{asChild:!0,trapped:l,onMountAutoFocus:Ne(c,$=>{var _;$.preventDefault(),(_=O.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:a.jsx(xu,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:b,onDismiss:w,children:a.jsx(SO,{asChild:!0,...k,dir:N.dir,orientation:"vertical",loop:i,currentTabStopId:z,onCurrentTabStopIdChange:D,onEntryFocus:Ne(h,$=>{N.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(cy,{role:"menu","aria-orientation":"vertical","data-state":_2(E.open),"data-radix-menu-content":"",dir:N.dir,...T,...j,ref:B,style:{outline:"none",...j.style},onKeyDown:Ne(j.onKeyDown,$=>{const U=$.target.closest("[data-radix-menu-content]")===$.currentTarget,P=$.ctrlKey||$.altKey||$.metaKey,A=$.key.length===1;U&&($.key==="Tab"&&$.preventDefault(),!P&&A&&Q($.key));const J=O.current;if($.target!==J||!y_.includes($.key))return;$.preventDefault();const fe=R().filter(se=>!se.disabled).map(se=>se.ref.current);f2.includes($.key)&&fe.reverse(),B_(fe)}),onBlur:Ne(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(q.current),L.current="")}),onPointerMove:Ne(e.onPointerMove,ru($=>{const _=$.target,U=ie.current!==$.clientX;if($.currentTarget.contains(_)&&U){const P=$.clientX>ie.current?"right":"left";ue.current=P,ie.current=$.clientX}}))})})})})})})});y2.displayName=Dr;var M_="MenuGroup",gy=y.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Pe.div,{role:"group",...i,ref:t})});gy.displayName=M_;var D_="MenuLabel",v2=y.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Pe.div,{...i,ref:t})});v2.displayName=D_;var Tf="MenuItem",Xw="menu.itemSelect",rm=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...l}=e,c=y.useRef(null),u=wu(Tf,e.__scopeMenu),f=hy(Tf,e.__scopeMenu),h=Ze(t,c),m=y.useRef(!1),g=()=>{const p=c.current;if(!n&&p){const b=new CustomEvent(Xw,{bubbles:!0,cancelable:!0});p.addEventListener(Xw,w=>i==null?void 0:i(w),{once:!0}),kS(p,b),b.defaultPrevented?m.current=!1:u.onClose()}};return a.jsx(b2,{...l,ref:h,disabled:n,onClick:Ne(e.onClick,g),onPointerDown:p=>{var b;(b=e.onPointerDown)==null||b.call(e,p),m.current=!0},onPointerUp:Ne(e.onPointerUp,p=>{var b;m.current||(b=p.currentTarget)==null||b.click()}),onKeyDown:Ne(e.onKeyDown,p=>{const b=f.searchRef.current!=="";n||b&&p.key===" "||Xg.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});rm.displayName=Tf;var b2=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:l,...c}=e,u=hy(Tf,n),f=h2(n),h=y.useRef(null),m=Ze(t,h),[g,p]=y.useState(!1),[b,w]=y.useState("");return y.useEffect(()=>{const S=h.current;S&&w((S.textContent??"").trim())},[c.children]),a.jsx(nu.ItemSlot,{scope:n,disabled:i,textValue:l??b,children:a.jsx(CO,{asChild:!0,...f,focusable:!i,children:a.jsx(Pe.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...c,ref:m,onPointerMove:Ne(e.onPointerMove,ru(S=>{i?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ne(e.onPointerLeave,ru(S=>u.onItemLeave(S))),onFocus:Ne(e.onFocus,()=>p(!0)),onBlur:Ne(e.onBlur,()=>p(!1))})})})}),O_="MenuCheckboxItem",w2=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...l}=e;return a.jsx(k2,{scope:e.__scopeMenu,checked:n,children:a.jsx(rm,{role:"menuitemcheckbox","aria-checked":Af(n)?"mixed":n,...l,ref:t,"data-state":yy(n),onSelect:Ne(l.onSelect,()=>i==null?void 0:i(Af(n)?!0:!n),{checkForDefaultPrevented:!1})})})});w2.displayName=O_;var j2="MenuRadioGroup",[__,P_]=Wi(j2,{value:void 0,onValueChange:()=>{}}),N2=y.forwardRef((e,t)=>{const{value:n,onValueChange:i,...l}=e,c=un(i);return a.jsx(__,{scope:e.__scopeMenu,value:n,onValueChange:c,children:a.jsx(gy,{...l,ref:t})})});N2.displayName=j2;var S2="MenuRadioItem",C2=y.forwardRef((e,t)=>{const{value:n,...i}=e,l=P_(S2,e.__scopeMenu),c=n===l.value;return a.jsx(k2,{scope:e.__scopeMenu,checked:c,children:a.jsx(rm,{role:"menuitemradio","aria-checked":c,...i,ref:t,"data-state":yy(c),onSelect:Ne(i.onSelect,()=>{var u;return(u=l.onValueChange)==null?void 0:u.call(l,n)},{checkForDefaultPrevented:!1})})})});C2.displayName=S2;var xy="MenuItemIndicator",[k2,z_]=Wi(xy,{checked:!1}),E2=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...l}=e,c=z_(xy,n);return a.jsx(xr,{present:i||Af(c.checked)||c.checked===!0,children:a.jsx(Pe.span,{...l,ref:t,"data-state":yy(c.checked)})})});E2.displayName=xy;var L_="MenuSeparator",T2=y.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return a.jsx(Pe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});T2.displayName=L_;var I_="MenuArrow",A2=y.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,l=nm(n);return a.jsx(uy,{...l,...i,ref:t})});A2.displayName=I_;var U_="MenuSub",[Gq,R2]=Wi(U_),Vc="MenuSubTrigger",M2=y.forwardRef((e,t)=>{const n=Zi(Vc,e.__scopeMenu),i=wu(Vc,e.__scopeMenu),l=R2(Vc,e.__scopeMenu),c=hy(Vc,e.__scopeMenu),u=y.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=c,m={__scopeMenu:e.__scopeMenu},g=y.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return y.useEffect(()=>g,[g]),y.useEffect(()=>{const p=f.current;return()=>{window.clearTimeout(p),h(null)}},[f,h]),a.jsx(fy,{asChild:!0,...m,children:a.jsx(b2,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":l.contentId,"data-state":_2(n.open),...e,ref:Qn(t,l.onTriggerChange),onClick:p=>{var b;(b=e.onClick)==null||b.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ne(e.onPointerMove,ru(p=>{c.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(c.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),g()},100))})),onPointerLeave:Ne(e.onPointerLeave,ru(p=>{var w,S;g();const b=(w=n.content)==null?void 0:w.getBoundingClientRect();if(b){const j=(S=n.content)==null?void 0:S.dataset.side,E=j==="right",N=E?-5:5,T=b[E?"left":"right"],k=b[E?"right":"left"];c.onPointerGraceIntentChange({area:[{x:p.clientX+N,y:p.clientY},{x:T,y:b.top},{x:k,y:b.top},{x:k,y:b.bottom},{x:T,y:b.bottom}],side:j}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(p),p.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:Ne(e.onKeyDown,p=>{var w;const b=c.searchRef.current!=="";e.disabled||b&&p.key===" "||v_[i.dir].includes(p.key)&&(n.onOpenChange(!0),(w=n.content)==null||w.focus(),p.preventDefault())})})})});M2.displayName=Vc;var D2="MenuSubContent",O2=y.forwardRef((e,t)=>{const n=g2(Dr,e.__scopeMenu),{forceMount:i=n.forceMount,...l}=e,c=Zi(Dr,e.__scopeMenu),u=wu(Dr,e.__scopeMenu),f=R2(D2,e.__scopeMenu),h=y.useRef(null),m=Ze(t,h);return a.jsx(nu.Provider,{scope:e.__scopeMenu,children:a.jsx(xr,{present:i||c.open,children:a.jsx(nu.Slot,{scope:e.__scopeMenu,children:a.jsx(py,{id:f.contentId,"aria-labelledby":f.triggerId,...l,ref:m,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var p;u.isUsingKeyboardRef.current&&((p=h.current)==null||p.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Ne(e.onFocusOutside,g=>{g.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:Ne(e.onEscapeKeyDown,g=>{u.onClose(),g.preventDefault()}),onKeyDown:Ne(e.onKeyDown,g=>{var w;const p=g.currentTarget.contains(g.target),b=b_[u.dir].includes(g.key);p&&b&&(c.onOpenChange(!1),(w=f.trigger)==null||w.focus(),g.preventDefault())})})})})})});O2.displayName=D2;function _2(e){return e?"open":"closed"}function Af(e){return e==="indeterminate"}function yy(e){return Af(e)?"indeterminate":e?"checked":"unchecked"}function B_(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function F_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function H_(e,t,n){const l=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=F_(e,Math.max(c,0));l.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.toLowerCase().startsWith(l.toLowerCase()));return h!==n?h:void 0}function q_(e,t){const{x:n,y:i}=e;let l=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,p=h.x,b=h.y;g>i!=b>i&&n<(p-m)*(i-g)/(b-g)+m&&(l=!l)}return l}function V_(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return q_(n,t)}function ru(e){return t=>t.pointerType==="mouse"?e(t):void 0}var $_=p2,G_=fy,Y_=x2,K_=y2,Q_=gy,X_=v2,W_=rm,Z_=w2,J_=N2,eP=C2,tP=E2,nP=T2,rP=A2,aP=M2,sP=O2,am="DropdownMenu",[iP]=ja(am,[m2]),Dn=m2(),[lP,P2]=iP(am),z2=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:l,defaultOpen:c,onOpenChange:u,modal:f=!0}=e,h=Dn(t),m=y.useRef(null),[g,p]=Ui({prop:l,defaultProp:c??!1,onChange:u,caller:am});return a.jsx(lP,{scope:t,triggerId:Nn(),triggerRef:m,contentId:Nn(),open:g,onOpenChange:p,onOpenToggle:y.useCallback(()=>p(b=>!b),[p]),modal:f,children:a.jsx($_,{...h,open:g,onOpenChange:p,dir:i,modal:f,children:n})})};z2.displayName=am;var L2="DropdownMenuTrigger",I2=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...l}=e,c=P2(L2,n),u=Dn(n);return a.jsx(G_,{asChild:!0,...u,children:a.jsx(Pe.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:Qn(t,c.triggerRef),onPointerDown:Ne(e.onPointerDown,f=>{!i&&f.button===0&&f.ctrlKey===!1&&(c.onOpenToggle(),c.open||f.preventDefault())}),onKeyDown:Ne(e.onKeyDown,f=>{i||(["Enter"," "].includes(f.key)&&c.onOpenToggle(),f.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});I2.displayName=L2;var oP="DropdownMenuPortal",U2=e=>{const{__scopeDropdownMenu:t,...n}=e,i=Dn(t);return a.jsx(Y_,{...i,...n})};U2.displayName=oP;var B2="DropdownMenuContent",F2=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=P2(B2,n),c=Dn(n),u=y.useRef(!1);return a.jsx(K_,{id:l.contentId,"aria-labelledby":l.triggerId,...c,...i,ref:t,onCloseAutoFocus:Ne(e.onCloseAutoFocus,f=>{var h;u.current||(h=l.triggerRef.current)==null||h.focus(),u.current=!1,f.preventDefault()}),onInteractOutside:Ne(e.onInteractOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,g=h.button===2||m;(!l.modal||g)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});F2.displayName=B2;var cP="DropdownMenuGroup",uP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(Q_,{...l,...i,ref:t})});uP.displayName=cP;var dP="DropdownMenuLabel",H2=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(X_,{...l,...i,ref:t})});H2.displayName=dP;var fP="DropdownMenuItem",q2=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(W_,{...l,...i,ref:t})});q2.displayName=fP;var mP="DropdownMenuCheckboxItem",hP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(Z_,{...l,...i,ref:t})});hP.displayName=mP;var pP="DropdownMenuRadioGroup",gP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(J_,{...l,...i,ref:t})});gP.displayName=pP;var xP="DropdownMenuRadioItem",yP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(eP,{...l,...i,ref:t})});yP.displayName=xP;var vP="DropdownMenuItemIndicator",bP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(tP,{...l,...i,ref:t})});bP.displayName=vP;var wP="DropdownMenuSeparator",V2=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(nP,{...l,...i,ref:t})});V2.displayName=wP;var jP="DropdownMenuArrow",NP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(rP,{...l,...i,ref:t})});NP.displayName=jP;var SP="DropdownMenuSubTrigger",CP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(aP,{...l,...i,ref:t})});CP.displayName=SP;var kP="DropdownMenuSubContent",EP=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,l=Dn(n);return a.jsx(sP,{...l,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});EP.displayName=kP;var TP=z2,AP=I2,RP=U2,MP=F2,DP=H2,OP=q2,_P=V2;function $2({...e}){return a.jsx(TP,{"data-slot":"dropdown-menu",...e})}function G2({...e}){return a.jsx(AP,{"data-slot":"dropdown-menu-trigger",...e})}function Y2({className:e,sideOffset:t=4,...n}){return a.jsx(RP,{children:a.jsx(MP,{"data-slot":"dropdown-menu-content",sideOffset:t,className:G("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function eo({className:e,inset:t,variant:n="default",...i}){return a.jsx(OP,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:G("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i})}function PP({className:e,inset:t,...n}){return a.jsx(DP,{"data-slot":"dropdown-menu-label","data-inset":t,className:G("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function zP({className:e,...t}){return a.jsx(_P,{"data-slot":"dropdown-menu-separator",className:G("bg-border -mx-1 my-1 h-px",e),...t})}const LP={theme:"system",setTheme:()=>null},K2=y.createContext(LP);function IP({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme"}){const[i,l]=y.useState(()=>localStorage.getItem(n)||t);y.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),i==="system"){const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(f);return}u.classList.add(i)},[i]);const c={theme:i,setTheme:u=>{localStorage.setItem(n,u),l(u)}};return a.jsx(K2.Provider,{value:c,children:e})}const Q2=()=>{const e=y.useContext(K2);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function UP(){const{setTheme:e}=Q2();return a.jsxs($2,{children:[a.jsx(G2,{asChild:!0,children:a.jsxs(me,{variant:"ghost",size:"icon",className:"w-10 h-10 rounded-xl text-muted-foreground hover:text-foreground hover:bg-primary/10",children:[a.jsx(xw,{className:"h-[18px] w-[18px] rotate-0 scale-100 transition-transform duration-200 dark:-rotate-90 dark:scale-0",strokeWidth:1.75}),a.jsx(pw,{className:"absolute h-[18px] w-[18px] rotate-90 scale-0 transition-transform duration-200 dark:rotate-0 dark:scale-100",strokeWidth:1.75}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(Y2,{align:"start",side:"right",sideOffset:14,className:"min-w-[140px] bg-card border-border/50 shadow-lg",children:[a.jsxs(eo,{onClick:()=>e("light"),className:"gap-2",children:[a.jsx(xw,{className:"h-4 w-4",strokeWidth:1.75}),"Light"]}),a.jsxs(eo,{onClick:()=>e("dark"),className:"gap-2",children:[a.jsx(pw,{className:"h-4 w-4",strokeWidth:1.75}),"Dark"]}),a.jsxs(eo,{onClick:()=>e("system"),className:"gap-2",children:[a.jsx(tS,{className:"h-4 w-4",strokeWidth:1.75}),"System"]})]})]})}var BP=Symbol("radix.slottable");function FP(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=BP,t}var X2=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"}),HP="VisuallyHidden",W2=y.forwardRef((e,t)=>a.jsx(Pe.span,{...e,ref:t,style:{...X2,...e.style}}));W2.displayName=HP;var qP=W2,[sm]=ja("Tooltip",[zo]),im=zo(),Z2="TooltipProvider",VP=700,Wg="tooltip.open",[$P,vy]=sm(Z2),J2=e=>{const{__scopeTooltip:t,delayDuration:n=VP,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:c}=e,u=y.useRef(!0),f=y.useRef(!1),h=y.useRef(0);return y.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),a.jsx($P,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:y.useCallback(m=>{f.current=m},[]),disableHoverableContent:l,children:c})};J2.displayName=Z2;var au="Tooltip",[GP,lm]=sm(au),eC=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:l,onOpenChange:c,disableHoverableContent:u,delayDuration:f}=e,h=vy(au,e.__scopeTooltip),m=im(t),[g,p]=y.useState(null),b=Nn(),w=y.useRef(0),S=u??h.disableHoverableContent,j=f??h.delayDuration,E=y.useRef(!1),[N,T]=Ui({prop:i,defaultProp:l??!1,onChange:O=>{O?(h.onOpen(),document.dispatchEvent(new CustomEvent(Wg))):h.onClose(),c==null||c(O)},caller:au}),k=y.useMemo(()=>N?E.current?"delayed-open":"instant-open":"closed",[N]),R=y.useCallback(()=>{window.clearTimeout(w.current),w.current=0,E.current=!1,T(!0)},[T]),z=y.useCallback(()=>{window.clearTimeout(w.current),w.current=0,T(!1)},[T]),D=y.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{E.current=!0,T(!0),w.current=0},j)},[j,T]);return y.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),a.jsx(ly,{...m,children:a.jsx(GP,{scope:t,contentId:b,open:N,stateAttribute:k,trigger:g,onTriggerChange:p,onTriggerEnter:y.useCallback(()=>{h.isOpenDelayedRef.current?D():R()},[h.isOpenDelayedRef,D,R]),onTriggerLeave:y.useCallback(()=>{S?z():(window.clearTimeout(w.current),w.current=0)},[z,S]),onOpen:R,onClose:z,disableHoverableContent:S,children:n})})};eC.displayName=au;var Zg="TooltipTrigger",tC=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,l=lm(Zg,n),c=vy(Zg,n),u=im(n),f=y.useRef(null),h=Ze(t,f,l.onTriggerChange),m=y.useRef(!1),g=y.useRef(!1),p=y.useCallback(()=>m.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),a.jsx(oy,{asChild:!0,...u,children:a.jsx(Pe.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:h,onPointerMove:Ne(e.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!c.isPointerInTransitRef.current&&(l.onTriggerEnter(),g.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{l.onTriggerLeave(),g.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{l.open&&l.onClose(),m.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ne(e.onFocus,()=>{m.current||l.onOpen()}),onBlur:Ne(e.onBlur,l.onClose),onClick:Ne(e.onClick,l.onClose)})})});tC.displayName=Zg;var YP="TooltipPortal",[Yq,KP]=sm(YP,{forceMount:void 0}),bo="TooltipContent",nC=y.forwardRef((e,t)=>{const n=KP(bo,e.__scopeTooltip),{forceMount:i=n.forceMount,side:l="top",...c}=e,u=lm(bo,e.__scopeTooltip);return a.jsx(xr,{present:i||u.open,children:u.disableHoverableContent?a.jsx(rC,{side:l,...c,ref:t}):a.jsx(QP,{side:l,...c,ref:t})})}),QP=y.forwardRef((e,t)=>{const n=lm(bo,e.__scopeTooltip),i=vy(bo,e.__scopeTooltip),l=y.useRef(null),c=Ze(t,l),[u,f]=y.useState(null),{trigger:h,onClose:m}=n,g=l.current,{onPointerInTransitChange:p}=i,b=y.useCallback(()=>{f(null),p(!1)},[p]),w=y.useCallback((S,j)=>{const E=S.currentTarget,N={x:S.clientX,y:S.clientY},T=e6(N,E.getBoundingClientRect()),k=t6(N,T),R=n6(j.getBoundingClientRect()),z=a6([...k,...R]);f(z),p(!0)},[p]);return y.useEffect(()=>()=>b(),[b]),y.useEffect(()=>{if(h&&g){const S=E=>w(E,g),j=E=>w(E,h);return h.addEventListener("pointerleave",S),g.addEventListener("pointerleave",j),()=>{h.removeEventListener("pointerleave",S),g.removeEventListener("pointerleave",j)}}},[h,g,w,b]),y.useEffect(()=>{if(u){const S=j=>{const E=j.target,N={x:j.clientX,y:j.clientY},T=(h==null?void 0:h.contains(E))||(g==null?void 0:g.contains(E)),k=!r6(N,u);T?b():k&&(b(),m())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[h,g,u,m,b]),a.jsx(rC,{...e,ref:c})}),[XP,WP]=sm(au,{isInside:!1}),ZP=FP("TooltipContent"),rC=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":l,onEscapeKeyDown:c,onPointerDownOutside:u,...f}=e,h=lm(bo,n),m=im(n),{onClose:g}=h;return y.useEffect(()=>(document.addEventListener(Wg,g),()=>document.removeEventListener(Wg,g)),[g]),y.useEffect(()=>{if(h.trigger){const p=b=>{const w=b.target;w!=null&&w.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),a.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:a.jsxs(cy,{"data-state":h.stateAttribute,...m,...f,ref:t,style:{...f.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(ZP,{children:i}),a.jsx(XP,{scope:n,isInside:!0,children:a.jsx(qP,{id:h.contentId,role:"tooltip",children:l||i})})]})})});nC.displayName=bo;var aC="TooltipArrow",JP=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,l=im(n);return WP(aC,n).isInside?null:a.jsx(uy,{...l,...i,ref:t})});JP.displayName=aC;function e6(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),l=Math.abs(t.right-e.x),c=Math.abs(t.left-e.x);switch(Math.min(n,i,l,c)){case c:return"left";case l:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function t6(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function n6(e){const{top:t,right:n,bottom:i,left:l}=e;return[{x:l,y:t},{x:n,y:t},{x:n,y:i},{x:l,y:i}]}function r6(e,t){const{x:n,y:i}=e;let l=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],m=f.x,g=f.y,p=h.x,b=h.y;g>i!=b>i&&n<(p-m)*(i-g)/(b-g)+m&&(l=!l)}return l}function a6(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),s6(t)}function s6(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const l=e[i];for(;t.length>=2;){const c=t[t.length-1],u=t[t.length-2];if((c.x-u.x)*(l.y-u.y)>=(c.y-u.y)*(l.x-u.x))t.pop();else break}t.push(l)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const l=e[i];for(;n.length>=2;){const c=n[n.length-1],u=n[n.length-2];if((c.x-u.x)*(l.y-u.y)>=(c.y-u.y)*(l.x-u.x))n.pop();else break}n.push(l)}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 i6=J2,l6=eC,o6=tC,sC=nC;const c6=i6,Ww=l6,Zw=o6,Jg=y.forwardRef(({className:e,sideOffset:t=4,...n},i)=>a.jsx(sC,{ref:i,sideOffset:t,className:G("z-50 overflow-hidden rounded-md 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}));Jg.displayName=sC.displayName;const u6=[{name:"Dashboard",path:"/",icon:eS},{name:"Search",path:"/search",icon:Kr},{name:"Projects",path:"/sessions",icon:eu},{name:"Analytics",path:"/analytics",icon:qx},{name:"Insights",path:"/insights",icon:Vt},{name:"AI Advisor",path:"/advisor",icon:Kn},{name:"Tech Stack",path:"/tech-stack",icon:Yr},{name:"Plans",path:"/plans",icon:Lt},{name:"Skills",path:"/skills",icon:$t},{name:"Agents",path:"/agents",icon:cr},{name:"Hooks",path:"/hooks",icon:Kc},{name:"Memory",path:"/memory",icon:Mr}];function d6({className:e}){const t=va();return a.jsx(c6,{delayDuration:100,children:a.jsxs("aside",{className:G("fixed left-4 top-1/2 -translate-y-1/2 z-50 flex flex-col items-center gap-1 py-3 px-2 rounded-2xl border border-border/50 bg-card/95 backdrop-blur-md shadow-xl transition-all duration-200",e),children:[a.jsx("div",{className:"w-10 h-10 flex items-center justify-center rounded-xl bg-primary text-primary-foreground mb-3 shadow-lg shadow-primary/25",children:a.jsx(G3,{className:"w-4 h-4",strokeWidth:2.5})}),a.jsx("nav",{className:"flex flex-col gap-0.5",children:u6.map(n=>{const i=t.pathname===n.path||n.path!=="/"&&t.pathname.startsWith(n.path);return a.jsxs(Ww,{children:[a.jsx(Zw,{asChild:!0,children:a.jsxs(Bg,{to:n.path,className:G("w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-200 group relative",i?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-primary/10 hover:text-foreground"),children:[a.jsx(n.icon,{className:"w-[18px] h-[18px]",strokeWidth:1.75}),i&&a.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-[3px] h-5 rounded-full bg-primary shadow-sm shadow-primary/50"})]})}),a.jsx(Jg,{side:"right",sideOffset:14,className:"text-xs font-medium px-3 py-1.5 bg-card border-border/50 shadow-lg",children:n.name})]},n.path)})}),a.jsx("div",{className:"w-6 h-px bg-border/50 my-2"}),a.jsx("div",{className:"mb-1",children:a.jsx(UP,{})}),a.jsxs(Ww,{children:[a.jsx(Zw,{asChild:!0,children:a.jsxs(Bg,{to:"/settings",className:G("w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-200 group relative",t.pathname==="/settings"?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-primary/10 hover:text-foreground"),children:[a.jsx(Xi,{className:"w-[18px] h-[18px]",strokeWidth:1.75}),t.pathname==="/settings"&&a.jsx("span",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-[3px] h-5 rounded-full bg-primary shadow-sm shadow-primary/50"})]})}),a.jsx(Jg,{side:"right",sideOffset:14,className:"text-xs font-medium px-3 py-1.5 bg-card border-border/50 shadow-lg",children:"Settings"})]})]})})}var Jw=1,f6=.9,m6=.8,h6=.17,Jp=.1,eg=.999,p6=.9999,g6=.99,x6=/[\\\/_+.#"@\[\(\{&]/,y6=/[\\\/_+.#"@\[\(\{&]/g,v6=/[\s-]/,iC=/[\s-]/g;function ex(e,t,n,i,l,c,u){if(c===t.length)return l===e.length?Jw:g6;var f=`${l},${c}`;if(u[f]!==void 0)return u[f];for(var h=i.charAt(c),m=n.indexOf(h,l),g=0,p,b,w,S;m>=0;)p=ex(e,t,n,i,m+1,c+1,u),p>g&&(m===l?p*=Jw:x6.test(e.charAt(m-1))?(p*=m6,w=e.slice(l,m-1).match(y6),w&&l>0&&(p*=Math.pow(eg,w.length))):v6.test(e.charAt(m-1))?(p*=f6,S=e.slice(l,m-1).match(iC),S&&l>0&&(p*=Math.pow(eg,S.length))):(p*=h6,l>0&&(p*=Math.pow(eg,m-l))),e.charAt(m)!==t.charAt(c)&&(p*=p6)),(p<Jp&&n.charAt(m-1)===i.charAt(c+1)||i.charAt(c+1)===i.charAt(c)&&n.charAt(m-1)!==i.charAt(c))&&(b=ex(e,t,n,i,m+1,c+2,u),b*Jp>p&&(p=b*Jp)),p>g&&(g=p),m=n.indexOf(h,m+1);return u[f]=g,g}function ej(e){return e.toLowerCase().replace(iC," ")}function b6(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ex(e,t,ej(e),ej(t),0,0,{})}function w6(e){const t=j6(e),n=y.forwardRef((i,l)=>{const{children:c,...u}=i,f=y.Children.toArray(c),h=f.find(S6);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}function j6(e){const t=y.forwardRef((n,i)=>{const{children:l,...c}=n;if(y.isValidElement(l)){const u=k6(l),f=C6(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var N6=Symbol("radix.slottable");function S6(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===N6}function C6(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function k6(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var om="Dialog",[lC]=ja(om),[E6,Jr]=lC(om),oC=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:l,onOpenChange:c,modal:u=!0}=e,f=y.useRef(null),h=y.useRef(null),[m,g]=Ui({prop:i,defaultProp:l??!1,onChange:c,caller:om});return a.jsx(E6,{scope:t,triggerRef:f,contentRef:h,contentId:Nn(),titleId:Nn(),descriptionId:Nn(),open:m,onOpenChange:g,onOpenToggle:y.useCallback(()=>g(p=>!p),[g]),modal:u,children:n})};oC.displayName=om;var cC="DialogTrigger",T6=y.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,l=Jr(cC,n),c=Ze(t,l.triggerRef);return a.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":jy(l.open),...i,ref:c,onClick:Ne(e.onClick,l.onOpenToggle)})});T6.displayName=cC;var by="DialogPortal",[A6,uC]=lC(by,{forceMount:void 0}),dC=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:l}=e,c=Jr(by,t);return a.jsx(A6,{scope:t,forceMount:n,children:y.Children.map(i,u=>a.jsx(xr,{present:n||c.open,children:a.jsx(Jf,{asChild:!0,container:l,children:u})}))})};dC.displayName=by;var Rf="DialogOverlay",fC=y.forwardRef((e,t)=>{const n=uC(Rf,e.__scopeDialog),{forceMount:i=n.forceMount,...l}=e,c=Jr(Rf,e.__scopeDialog);return c.modal?a.jsx(xr,{present:i||c.open,children:a.jsx(M6,{...l,ref:t})}):null});fC.displayName=Rf;var R6=w6("DialogOverlay.RemoveScroll"),M6=y.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,l=Jr(Rf,n);return a.jsx(tm,{as:R6,allowPinchZoom:!0,shards:[l.contentRef],children:a.jsx(Pe.div,{"data-state":jy(l.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),Fi="DialogContent",mC=y.forwardRef((e,t)=>{const n=uC(Fi,e.__scopeDialog),{forceMount:i=n.forceMount,...l}=e,c=Jr(Fi,e.__scopeDialog);return a.jsx(xr,{present:i||c.open,children:c.modal?a.jsx(D6,{...l,ref:t}):a.jsx(O6,{...l,ref:t})})});mC.displayName=Fi;var D6=y.forwardRef((e,t)=>{const n=Jr(Fi,e.__scopeDialog),i=y.useRef(null),l=Ze(t,n.contentRef,i);return y.useEffect(()=>{const c=i.current;if(c)return dy(c)},[]),a.jsx(hC,{...e,ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,c=>{var u;c.preventDefault(),(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&c.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,c=>c.preventDefault())})}),O6=y.forwardRef((e,t)=>{const n=Jr(Fi,e.__scopeDialog),i=y.useRef(!1),l=y.useRef(!1);return a.jsx(hC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,c),c.defaultPrevented||(i.current||(f=n.triggerRef.current)==null||f.focus(),c.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:c=>{var h,m;(h=e.onInteractOutside)==null||h.call(e,c),c.defaultPrevented||(i.current=!0,c.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const u=c.target;((m=n.triggerRef.current)==null?void 0:m.contains(u))&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.current&&c.preventDefault()}})}),hC=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:c,...u}=e,f=Jr(Fi,n),h=y.useRef(null),m=Ze(t,h);return Zx(),a.jsxs(a.Fragment,{children:[a.jsx(Kf,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:c,children:a.jsx(xu,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":jy(f.open),...u,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(_6,{titleId:f.titleId}),a.jsx(z6,{contentRef:h,descriptionId:f.descriptionId})]})]})}),wy="DialogTitle",pC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,l=Jr(wy,n);return a.jsx(Pe.h2,{id:l.titleId,...i,ref:t})});pC.displayName=wy;var gC="DialogDescription",xC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,l=Jr(gC,n);return a.jsx(Pe.p,{id:l.descriptionId,...i,ref:t})});xC.displayName=gC;var yC="DialogClose",vC=y.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,l=Jr(yC,n);return a.jsx(Pe.button,{type:"button",...i,ref:t,onClick:Ne(e.onClick,()=>l.onOpenChange(!1))})});vC.displayName=yC;function jy(e){return e?"open":"closed"}var bC="DialogTitleWarning",[Kq,wC]=uM(bC,{contentName:Fi,titleName:wy,docsSlug:"dialog"}),_6=({titleId:e})=>{const t=wC(bC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
601
|
+
|
|
602
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
603
|
+
|
|
604
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},P6="DialogDescriptionWarning",z6=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wC(P6).contentName}}.`;return y.useEffect(()=>{var c;const l=(c=e.current)==null?void 0:c.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},jC=oC,NC=dC,Ny=fC,Sy=mC,SC=pC,CC=xC,L6=vC,_c='[cmdk-group=""]',tg='[cmdk-group-items=""]',I6='[cmdk-group-heading=""]',kC='[cmdk-item=""]',tj=`${kC}:not([aria-disabled="true"])`,tx="cmdk-item-select",Ql="data-value",U6=(e,t,n)=>b6(e,t,n),EC=y.createContext(void 0),ju=()=>y.useContext(EC),TC=y.createContext(void 0),Cy=()=>y.useContext(TC),AC=y.createContext(void 0),RC=y.forwardRef((e,t)=>{let n=Xl(()=>{var P,A;return{search:"",value:(A=(P=e.value)!=null?P:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Xl(()=>new Set),l=Xl(()=>new Map),c=Xl(()=>new Map),u=Xl(()=>new Set),f=MC(e),{label:h,children:m,value:g,onValueChange:p,filter:b,shouldFilter:w,loop:S,disablePointerSelection:j=!1,vimBindings:E=!0,...N}=e,T=Nn(),k=Nn(),R=Nn(),z=y.useRef(null),D=X6();Hi(()=>{if(g!==void 0){let P=g.trim();n.current.value=P,O.emit()}},[g]),Hi(()=>{D(6,ue)},[]);let O=y.useMemo(()=>({subscribe:P=>(u.current.add(P),()=>u.current.delete(P)),snapshot:()=>n.current,setState:(P,A,J)=>{var ae,fe,se,pe;if(!Object.is(n.current[P],A)){if(n.current[P]=A,P==="search")X(),L(),D(1,ne);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById(R);ve?ve.focus():(ae=document.getElementById(T))==null||ae.focus()}if(D(7,()=>{var ve;n.current.selectedItemId=(ve=ie())==null?void 0:ve.id,O.emit()}),J||D(5,ue),((fe=f.current)==null?void 0:fe.value)!==void 0){let ve=A??"";(pe=(se=f.current).onValueChange)==null||pe.call(se,ve);return}}O.emit()}},emit:()=>{u.current.forEach(P=>P())}}),[]),B=y.useMemo(()=>({value:(P,A,J)=>{var ae;A!==((ae=c.current.get(P))==null?void 0:ae.value)&&(c.current.set(P,{value:A,keywords:J}),n.current.filtered.items.set(P,q(A,J)),D(2,()=>{L(),O.emit()}))},item:(P,A)=>(i.current.add(P),A&&(l.current.has(A)?l.current.get(A).add(P):l.current.set(A,new Set([P]))),D(3,()=>{X(),L(),n.current.value||ne(),O.emit()}),()=>{c.current.delete(P),i.current.delete(P),n.current.filtered.items.delete(P);let J=ie();D(4,()=>{X(),(J==null?void 0:J.getAttribute("id"))===P&&ne(),O.emit()})}),group:P=>(l.current.has(P)||l.current.set(P,new Set),()=>{c.current.delete(P),l.current.delete(P)}),filter:()=>f.current.shouldFilter,label:h||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:T,inputId:R,labelId:k,listInnerRef:z}),[]);function q(P,A){var J,ae;let fe=(ae=(J=f.current)==null?void 0:J.filter)!=null?ae:U6;return P?fe(P,n.current.search,A):0}function L(){if(!n.current.search||f.current.shouldFilter===!1)return;let P=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(ae=>{let fe=l.current.get(ae),se=0;fe.forEach(pe=>{let ve=P.get(pe);se=Math.max(ve,se)}),A.push([ae,se])});let J=z.current;te().sort((ae,fe)=>{var se,pe;let ve=ae.getAttribute("id"),Ae=fe.getAttribute("id");return((se=P.get(Ae))!=null?se:0)-((pe=P.get(ve))!=null?pe:0)}).forEach(ae=>{let fe=ae.closest(tg);fe?fe.appendChild(ae.parentElement===fe?ae:ae.closest(`${tg} > *`)):J.appendChild(ae.parentElement===J?ae:ae.closest(`${tg} > *`))}),A.sort((ae,fe)=>fe[1]-ae[1]).forEach(ae=>{var fe;let se=(fe=z.current)==null?void 0:fe.querySelector(`${_c}[${Ql}="${encodeURIComponent(ae[0])}"]`);se==null||se.parentElement.appendChild(se)})}function ne(){let P=te().find(J=>J.getAttribute("aria-disabled")!=="true"),A=P==null?void 0:P.getAttribute(Ql);O.setState("value",A||void 0)}function X(){var P,A,J,ae;if(!n.current.search||f.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let fe=0;for(let se of i.current){let pe=(A=(P=c.current.get(se))==null?void 0:P.value)!=null?A:"",ve=(ae=(J=c.current.get(se))==null?void 0:J.keywords)!=null?ae:[],Ae=q(pe,ve);n.current.filtered.items.set(se,Ae),Ae>0&&fe++}for(let[se,pe]of l.current)for(let ve of pe)if(n.current.filtered.items.get(ve)>0){n.current.filtered.groups.add(se);break}n.current.filtered.count=fe}function ue(){var P,A,J;let ae=ie();ae&&(((P=ae.parentElement)==null?void 0:P.firstChild)===ae&&((J=(A=ae.closest(_c))==null?void 0:A.querySelector(I6))==null||J.scrollIntoView({block:"nearest"})),ae.scrollIntoView({block:"nearest"}))}function ie(){var P;return(P=z.current)==null?void 0:P.querySelector(`${kC}[aria-selected="true"]`)}function te(){var P;return Array.from(((P=z.current)==null?void 0:P.querySelectorAll(tj))||[])}function I(P){let A=te()[P];A&&O.setState("value",A.getAttribute(Ql))}function Q(P){var A;let J=ie(),ae=te(),fe=ae.findIndex(pe=>pe===J),se=ae[fe+P];(A=f.current)!=null&&A.loop&&(se=fe+P<0?ae[ae.length-1]:fe+P===ae.length?ae[0]:ae[fe+P]),se&&O.setState("value",se.getAttribute(Ql))}function Y(P){let A=ie(),J=A==null?void 0:A.closest(_c),ae;for(;J&&!ae;)J=P>0?K6(J,_c):Q6(J,_c),ae=J==null?void 0:J.querySelector(tj);ae?O.setState("value",ae.getAttribute(Ql)):Q(P)}let $=()=>I(te().length-1),_=P=>{P.preventDefault(),P.metaKey?$():P.altKey?Y(1):Q(1)},U=P=>{P.preventDefault(),P.metaKey?I(0):P.altKey?Y(-1):Q(-1)};return y.createElement(Pe.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:P=>{var A;(A=N.onKeyDown)==null||A.call(N,P);let J=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||J))switch(P.key){case"n":case"j":{E&&P.ctrlKey&&_(P);break}case"ArrowDown":{_(P);break}case"p":case"k":{E&&P.ctrlKey&&U(P);break}case"ArrowUp":{U(P);break}case"Home":{P.preventDefault(),I(0);break}case"End":{P.preventDefault(),$();break}case"Enter":{P.preventDefault();let ae=ie();if(ae){let fe=new Event(tx);ae.dispatchEvent(fe)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:B.inputId,id:B.labelId,style:Z6},h),cm(e,P=>y.createElement(TC.Provider,{value:O},y.createElement(EC.Provider,{value:B},P))))}),B6=y.forwardRef((e,t)=>{var n,i;let l=Nn(),c=y.useRef(null),u=y.useContext(AC),f=ju(),h=MC(e),m=(i=(n=h.current)==null?void 0:n.forceMount)!=null?i:u==null?void 0:u.forceMount;Hi(()=>{if(!m)return f.item(l,u==null?void 0:u.id)},[m]);let g=DC(l,c,[e.value,e.children,c],e.keywords),p=Cy(),b=Zs(D=>D.value&&D.value===g.current),w=Zs(D=>m||f.filter()===!1?!0:D.search?D.filtered.items.get(l)>0:!0);y.useEffect(()=>{let D=c.current;if(!(!D||e.disabled))return D.addEventListener(tx,S),()=>D.removeEventListener(tx,S)},[w,e.onSelect,e.disabled]);function S(){var D,O;j(),(O=(D=h.current).onSelect)==null||O.call(D,g.current)}function j(){p.setState("value",g.current,!0)}if(!w)return null;let{disabled:E,value:N,onSelect:T,forceMount:k,keywords:R,...z}=e;return y.createElement(Pe.div,{ref:Qn(c,t),...z,id:l,"cmdk-item":"",role:"option","aria-disabled":!!E,"aria-selected":!!b,"data-disabled":!!E,"data-selected":!!b,onPointerMove:E||f.getDisablePointerSelection()?void 0:j,onClick:E?void 0:S},e.children)}),F6=y.forwardRef((e,t)=>{let{heading:n,children:i,forceMount:l,...c}=e,u=Nn(),f=y.useRef(null),h=y.useRef(null),m=Nn(),g=ju(),p=Zs(w=>l||g.filter()===!1?!0:w.search?w.filtered.groups.has(u):!0);Hi(()=>g.group(u),[]),DC(u,f,[e.value,e.heading,h]);let b=y.useMemo(()=>({id:u,forceMount:l}),[l]);return y.createElement(Pe.div,{ref:Qn(f,t),...c,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&y.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:m},n),cm(e,w=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?m:void 0},y.createElement(AC.Provider,{value:b},w))))}),H6=y.forwardRef((e,t)=>{let{alwaysRender:n,...i}=e,l=y.useRef(null),c=Zs(u=>!u.search);return!n&&!c?null:y.createElement(Pe.div,{ref:Qn(l,t),...i,"cmdk-separator":"",role:"separator"})}),q6=y.forwardRef((e,t)=>{let{onValueChange:n,...i}=e,l=e.value!=null,c=Cy(),u=Zs(m=>m.search),f=Zs(m=>m.selectedItemId),h=ju();return y.useEffect(()=>{e.value!=null&&c.setState("search",e.value)},[e.value]),y.createElement(Pe.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":f,id:h.inputId,type:"text",value:l?e.value:u,onChange:m=>{l||c.setState("search",m.target.value),n==null||n(m.target.value)}})}),V6=y.forwardRef((e,t)=>{let{children:n,label:i="Suggestions",...l}=e,c=y.useRef(null),u=y.useRef(null),f=Zs(m=>m.selectedItemId),h=ju();return y.useEffect(()=>{if(u.current&&c.current){let m=u.current,g=c.current,p,b=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let w=m.offsetHeight;g.style.setProperty("--cmdk-list-height",w.toFixed(1)+"px")})});return b.observe(m),()=>{cancelAnimationFrame(p),b.unobserve(m)}}},[]),y.createElement(Pe.div,{ref:Qn(c,t),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":i,id:h.listId},cm(e,m=>y.createElement("div",{ref:Qn(u,h.listInnerRef),"cmdk-list-sizer":""},m)))}),$6=y.forwardRef((e,t)=>{let{open:n,onOpenChange:i,overlayClassName:l,contentClassName:c,container:u,...f}=e;return y.createElement(jC,{open:n,onOpenChange:i},y.createElement(NC,{container:u},y.createElement(Ny,{"cmdk-overlay":"",className:l}),y.createElement(Sy,{"aria-label":e.label,"cmdk-dialog":"",className:c},y.createElement(RC,{ref:t,...f}))))}),G6=y.forwardRef((e,t)=>Zs(n=>n.filtered.count===0)?y.createElement(Pe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Y6=y.forwardRef((e,t)=>{let{progress:n,children:i,label:l="Loading...",...c}=e;return y.createElement(Pe.div,{ref:t,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},cm(e,u=>y.createElement("div",{"aria-hidden":!0},u)))}),Zn=Object.assign(RC,{List:V6,Item:B6,Input:q6,Group:F6,Separator:H6,Dialog:$6,Empty:G6,Loading:Y6});function K6(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Q6(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function MC(e){let t=y.useRef(e);return Hi(()=>{t.current=e}),t}var Hi=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Xl(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Zs(e){let t=Cy(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function DC(e,t,n,i=[]){let l=y.useRef(),c=ju();return Hi(()=>{var u;let f=(()=>{var m;for(let g of n){if(typeof g=="string")return g.trim();if(typeof g=="object"&&"current"in g)return g.current?(m=g.current.textContent)==null?void 0:m.trim():l.current}})(),h=i.map(m=>m.trim());c.value(e,f,h),(u=t.current)==null||u.setAttribute(Ql,f),l.current=f}),l}var X6=()=>{let[e,t]=y.useState(),n=Xl(()=>new Map);return Hi(()=>{n.current.forEach(i=>i()),n.current=new Map},[e]),(i,l)=>{n.current.set(i,l),t({})}};function W6(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function cm({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(W6(t),{ref:t.ref},n(t.props.children)):n(t)}var Z6={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const fr=jC,J6=NC,OC=y.forwardRef(({className:e,...t},n)=>a.jsx(Ny,{ref:n,className:G("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OC.displayName=Ny.displayName;const Xn=y.forwardRef(({className:e,children:t,...n},i)=>a.jsxs(J6,{children:[a.jsx(OC,{}),a.jsxs(Sy,{ref:i,className:G("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border/50 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,a.jsxs(L6,{className:"absolute right-4 top-4 rounded-md p-1 text-muted-foreground transition-colors hover:text-foreground hover:bg-muted focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none",children:[a.jsx(wa,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Xn.displayName=Sy.displayName;const mr=({className:e,...t})=>a.jsx("div",{className:G("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});mr.displayName="DialogHeader";const Wn=({className:e,...t})=>a.jsx("div",{className:G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wn.displayName="DialogFooter";const hr=y.forwardRef(({className:e,...t},n)=>a.jsx(SC,{ref:n,className:G("text-lg font-semibold leading-none tracking-tight",e),...t}));hr.displayName=SC.displayName;const pr=y.forwardRef(({className:e,...t},n)=>a.jsx(CC,{ref:n,className:G("text-sm text-muted-foreground",e),...t}));pr.displayName=CC.displayName;const _C=y.forwardRef(({className:e,...t},n)=>a.jsx(Zn,{ref:n,className:G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_C.displayName=Zn.displayName;const ez=({children:e,...t})=>a.jsx(fr,{...t,children:a.jsx(Xn,{className:"overflow-hidden p-0 shadow-lg",children:a.jsx(_C,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),PC=y.forwardRef(({className:e,...t},n)=>a.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsx(Kr,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsx(Zn.Input,{ref:n,className:G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));PC.displayName=Zn.Input.displayName;const zC=y.forwardRef(({className:e,...t},n)=>a.jsx(Zn.List,{ref:n,className:G("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));zC.displayName=Zn.List.displayName;const LC=y.forwardRef((e,t)=>a.jsx(Zn.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));LC.displayName=Zn.Empty.displayName;const nx=y.forwardRef(({className:e,...t},n)=>a.jsx(Zn.Group,{ref:n,className:G("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));nx.displayName=Zn.Group.displayName;const IC=y.forwardRef(({className:e,...t},n)=>a.jsx(Zn.Separator,{ref:n,className:G("-mx-1 h-px bg-border",e),...t}));IC.displayName=Zn.Separator.displayName;const Us=y.forwardRef(({className:e,...t},n)=>a.jsx(Zn.Item,{ref:n,className:G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));Us.displayName=Zn.Item.displayName;const UC=({className:e,...t})=>a.jsx("span",{className:G("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});UC.displayName="CommandShortcut";function tz(){const[e,t]=y.useState(!1),n=Bf();y.useEffect(()=>{const l=c=>{c.key==="k"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),t(u=>!u))};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[]);const i=y.useCallback(l=>{t(!1),l()},[]);return a.jsxs(ez,{open:e,onOpenChange:t,children:[a.jsx(PC,{placeholder:"Type a command or search..."}),a.jsxs(zC,{children:[a.jsx(LC,{children:"No results found."}),a.jsxs(nx,{heading:"Navigation",children:[a.jsxs(Us,{onSelect:()=>i(()=>n("/")),children:[a.jsx(eS,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Dashboard"})]}),a.jsxs(Us,{onSelect:()=>i(()=>n("/search")),children:[a.jsx(Kr,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Search"})]}),a.jsxs(Us,{onSelect:()=>i(()=>n("/sessions")),children:[a.jsx(eu,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Sessions"})]}),a.jsxs(Us,{onSelect:()=>i(()=>n("/plans")),children:[a.jsx(Lt,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Plans"})]}),a.jsxs(Us,{onSelect:()=>i(()=>n("/skills")),children:[a.jsx($t,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Skills"})]}),a.jsxs(Us,{onSelect:()=>i(()=>n("/hooks")),children:[a.jsx(Kc,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Hooks"})]})]}),a.jsx(IC,{}),a.jsx(nx,{heading:"Settings",children:a.jsxs(Us,{onSelect:()=>i(()=>n("/settings")),children:[a.jsx(Xi,{className:"mr-2 h-4 w-4"}),a.jsx("span",{children:"Settings"}),a.jsx(UC,{children:"⌘S"})]})})]})]})}function nz(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const rz=e=>{switch(e){case"success":return iz;case"info":return oz;case"warning":return lz;case"error":return cz;default:return null}},az=Array(12).fill(0),sz=({visible:e,className:t})=>xe.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},xe.createElement("div",{className:"sonner-spinner"},az.map((n,i)=>xe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),iz=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lz=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),oz=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cz=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},xe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uz=xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},xe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),xe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dz=()=>{const[e,t]=xe.useState(document.hidden);return xe.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let rx=1;class fz{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:i,...l}=t,c=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:rx++,u=this.toasts.find(h=>h.id===c),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),u?this.toasts=this.toasts.map(h=>h.id===c?(this.publish({...h,...t,id:c,title:i}),{...h,...t,id:c,dismissible:f,title:i}):h):this.addToast({title:i,...l,dismissible:f,id:c}),c},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(i=>i({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const l=Promise.resolve(t instanceof Function?t():t);let c=i!==void 0,u;const f=l.then(async m=>{if(u=["resolve",m],xe.isValidElement(m))c=!1,this.create({id:i,type:"default",message:m});else if(hz(m)&&!m.ok){c=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${m.status}`):n.error,b=typeof n.description=="function"?await n.description(`HTTP error! status: ${m.status}`):n.description,S=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:b,...S})}else if(m instanceof Error){c=!1;const p=typeof n.error=="function"?await n.error(m):n.error,b=typeof n.description=="function"?await n.description(m):n.description,S=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:b,...S})}else if(n.success!==void 0){c=!1;const p=typeof n.success=="function"?await n.success(m):n.success,b=typeof n.description=="function"?await n.description(m):n.description,S=typeof p=="object"&&!xe.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:b,...S})}}).catch(async m=>{if(u=["reject",m],n.error!==void 0){c=!1;const g=typeof n.error=="function"?await n.error(m):n.error,p=typeof n.description=="function"?await n.description(m):n.description,w=typeof g=="object"&&!xe.isValidElement(g)?g:{message:g};this.create({id:i,type:"error",description:p,...w})}}).finally(()=>{c&&(this.dismiss(i),i=void 0),n.finally==null||n.finally.call(n)}),h=()=>new Promise((m,g)=>f.then(()=>u[0]==="reject"?g(u[1]):m(u[1])).catch(g));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(t,n)=>{const i=(n==null?void 0:n.id)||rx++;return this.create({jsx:t(i),id:i,...n}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Yn=new fz,mz=(e,t)=>{const n=(t==null?void 0:t.id)||rx++;return Yn.addToast({title:e,...t,id:n}),n},hz=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pz=mz,gz=()=>Yn.toasts,xz=()=>Yn.getActiveToasts(),Fe=Object.assign(pz,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:gz,getToasts:xz});nz("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Xd(e){return e.label!==void 0}const yz=3,vz="24px",bz="16px",nj=4e3,wz=356,jz=14,Nz=45,Sz=200;function oa(...e){return e.filter(Boolean).join(" ")}function Cz(e){const[t,n]=e.split("-"),i=[];return t&&i.push(t),n&&i.push(n),i}const kz=e=>{var t,n,i,l,c,u,f,h,m;const{invert:g,toast:p,unstyled:b,interacting:w,setHeights:S,visibleToasts:j,heights:E,index:N,toasts:T,expanded:k,removeToast:R,defaultRichColors:z,closeButton:D,style:O,cancelButtonStyle:B,actionButtonStyle:q,className:L="",descriptionClassName:ne="",duration:X,position:ue,gap:ie,expandByDefault:te,classNames:I,icons:Q,closeButtonAriaLabel:Y="Close toast"}=e,[$,_]=xe.useState(null),[U,P]=xe.useState(null),[A,J]=xe.useState(!1),[ae,fe]=xe.useState(!1),[se,pe]=xe.useState(!1),[ve,Ae]=xe.useState(!1),[ze,Le]=xe.useState(!1),[It,wt]=xe.useState(0),[On,kn]=xe.useState(0),pn=xe.useRef(p.duration||X||nj),ka=xe.useRef(null),Ot=xe.useRef(null),ls=N===0,ri=N+1<=j,en=p.type,ea=p.dismissible!==!1,tn=p.className||"",Bo=p.descriptionClassName||"",oe=xe.useMemo(()=>E.findIndex(Ie=>Ie.toastId===p.id)||0,[E,p.id]),ye=xe.useMemo(()=>{var Ie;return(Ie=p.closeButton)!=null?Ie:D},[p.closeButton,D]),Oe=xe.useMemo(()=>p.duration||X||nj,[p.duration,X]),qe=xe.useRef(0),Ke=xe.useRef(0),gn=xe.useRef(0),xn=xe.useRef(null),[nn,_t]=ue.split("-"),rn=xe.useMemo(()=>E.reduce((Ie,jt,Qt)=>Qt>=oe?Ie:Ie+jt.height,0),[E,oe]),ot=dz(),ta=p.invert||g,En=en==="loading";Ke.current=xe.useMemo(()=>oe*ie+rn,[oe,rn]),xe.useEffect(()=>{pn.current=Oe},[Oe]),xe.useEffect(()=>{J(!0)},[]),xe.useEffect(()=>{const Ie=Ot.current;if(Ie){const jt=Ie.getBoundingClientRect().height;return kn(jt),S(Qt=>[{toastId:p.id,height:jt,position:p.position},...Qt]),()=>S(Qt=>Qt.filter(yn=>yn.toastId!==p.id))}},[S,p.id]),xe.useLayoutEffect(()=>{if(!A)return;const Ie=Ot.current,jt=Ie.style.height;Ie.style.height="auto";const Qt=Ie.getBoundingClientRect().height;Ie.style.height=jt,kn(Qt),S(yn=>yn.find(kt=>kt.toastId===p.id)?yn.map(kt=>kt.toastId===p.id?{...kt,height:Qt}:kt):[{toastId:p.id,height:Qt,position:p.position},...yn])},[A,p.title,p.description,S,p.id,p.jsx,p.action,p.cancel]);const na=xe.useCallback(()=>{fe(!0),wt(Ke.current),S(Ie=>Ie.filter(jt=>jt.toastId!==p.id)),setTimeout(()=>{R(p)},Sz)},[p,R,S,Ke]);xe.useEffect(()=>{if(p.promise&&en==="loading"||p.duration===1/0||p.type==="loading")return;let Ie;return k||w||ot?(()=>{if(gn.current<qe.current){const yn=new Date().getTime()-qe.current;pn.current=pn.current-yn}gn.current=new Date().getTime()})():(()=>{pn.current!==1/0&&(qe.current=new Date().getTime(),Ie=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),na()},pn.current))})(),()=>clearTimeout(Ie)},[k,w,p,en,ot,na]),xe.useEffect(()=>{p.delete&&(na(),p.onDismiss==null||p.onDismiss.call(p,p))},[na,p.delete]);function tl(){var Ie;if(Q!=null&&Q.loading){var jt;return xe.createElement("div",{className:oa(I==null?void 0:I.loader,p==null||(jt=p.classNames)==null?void 0:jt.loader,"sonner-loader"),"data-visible":en==="loading"},Q.loading)}return xe.createElement(sz,{className:oa(I==null?void 0:I.loader,p==null||(Ie=p.classNames)==null?void 0:Ie.loader),visible:en==="loading"})}const nl=p.icon||(Q==null?void 0:Q[en])||rz(en);var ai,ra;return xe.createElement("li",{tabIndex:0,ref:Ot,className:oa(L,tn,I==null?void 0:I.toast,p==null||(t=p.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[en],p==null||(n=p.classNames)==null?void 0:n[en]),"data-sonner-toast":"","data-rich-colors":(ai=p.richColors)!=null?ai:z,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":A,"data-promise":!!p.promise,"data-swiped":ze,"data-removed":ae,"data-visible":ri,"data-y-position":nn,"data-x-position":_t,"data-index":N,"data-front":ls,"data-swiping":se,"data-dismissible":ea,"data-type":en,"data-invert":ta,"data-swipe-out":ve,"data-swipe-direction":U,"data-expanded":!!(k||te&&A),"data-testid":p.testId,style:{"--index":N,"--toasts-before":N,"--z-index":T.length-N,"--offset":`${ae?It:Ke.current}px`,"--initial-height":te?"auto":`${On}px`,...O,...p.style},onDragEnd:()=>{pe(!1),_(null),xn.current=null},onPointerDown:Ie=>{Ie.button!==2&&(En||!ea||(ka.current=new Date,wt(Ke.current),Ie.target.setPointerCapture(Ie.pointerId),Ie.target.tagName!=="BUTTON"&&(pe(!0),xn.current={x:Ie.clientX,y:Ie.clientY})))},onPointerUp:()=>{var Ie,jt,Qt;if(ve||!ea)return;xn.current=null;const yn=Number(((Ie=Ot.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),os=Number(((jt=Ot.current)==null?void 0:jt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),kt=new Date().getTime()-((Qt=ka.current)==null?void 0:Qt.getTime()),_n=$==="x"?yn:os,si=Math.abs(_n)/kt;if(Math.abs(_n)>=Nz||si>.11){wt(Ke.current),p.onDismiss==null||p.onDismiss.call(p,p),P($==="x"?yn>0?"right":"left":os>0?"down":"up"),na(),Ae(!0);return}else{var Pn,zn;(Pn=Ot.current)==null||Pn.style.setProperty("--swipe-amount-x","0px"),(zn=Ot.current)==null||zn.style.setProperty("--swipe-amount-y","0px")}Le(!1),pe(!1),_(null)},onPointerMove:Ie=>{var jt,Qt,yn;if(!xn.current||!ea||((jt=window.getSelection())==null?void 0:jt.toString().length)>0)return;const kt=Ie.clientY-xn.current.y,_n=Ie.clientX-xn.current.x;var si;const Pn=(si=e.swipeDirections)!=null?si:Cz(ue);!$&&(Math.abs(_n)>1||Math.abs(kt)>1)&&_(Math.abs(_n)>Math.abs(kt)?"x":"y");let zn={x:0,y:0};const rl=Ir=>1/(1.5+Math.abs(Ir)/20);if($==="y"){if(Pn.includes("top")||Pn.includes("bottom"))if(Pn.includes("top")&&kt<0||Pn.includes("bottom")&&kt>0)zn.y=kt;else{const Ir=kt*rl(kt);zn.y=Math.abs(Ir)<Math.abs(kt)?Ir:kt}}else if($==="x"&&(Pn.includes("left")||Pn.includes("right")))if(Pn.includes("left")&&_n<0||Pn.includes("right")&&_n>0)zn.x=_n;else{const Ir=_n*rl(_n);zn.x=Math.abs(Ir)<Math.abs(_n)?Ir:_n}(Math.abs(zn.x)>0||Math.abs(zn.y)>0)&&Le(!0),(Qt=Ot.current)==null||Qt.style.setProperty("--swipe-amount-x",`${zn.x}px`),(yn=Ot.current)==null||yn.style.setProperty("--swipe-amount-y",`${zn.y}px`)}},ye&&!p.jsx&&en!=="loading"?xe.createElement("button",{"aria-label":Y,"data-disabled":En,"data-close-button":!0,onClick:En||!ea?()=>{}:()=>{na(),p.onDismiss==null||p.onDismiss.call(p,p)},className:oa(I==null?void 0:I.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(ra=Q==null?void 0:Q.close)!=null?ra:uz):null,(en||p.icon||p.promise)&&p.icon!==null&&((Q==null?void 0:Q[en])!==null||p.icon)?xe.createElement("div",{"data-icon":"",className:oa(I==null?void 0:I.icon,p==null||(l=p.classNames)==null?void 0:l.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||tl():null,p.type!=="loading"?nl:null):null,xe.createElement("div",{"data-content":"",className:oa(I==null?void 0:I.content,p==null||(c=p.classNames)==null?void 0:c.content)},xe.createElement("div",{"data-title":"",className:oa(I==null?void 0:I.title,p==null||(u=p.classNames)==null?void 0:u.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?xe.createElement("div",{"data-description":"",className:oa(ne,Bo,I==null?void 0:I.description,p==null||(f=p.classNames)==null?void 0:f.description)},typeof p.description=="function"?p.description():p.description):null),xe.isValidElement(p.cancel)?p.cancel:p.cancel&&Xd(p.cancel)?xe.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||B,onClick:Ie=>{Xd(p.cancel)&&ea&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ie),na())},className:oa(I==null?void 0:I.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,xe.isValidElement(p.action)?p.action:p.action&&Xd(p.action)?xe.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||q,onClick:Ie=>{Xd(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ie),!Ie.defaultPrevented&&na())},className:oa(I==null?void 0:I.actionButton,p==null||(m=p.classNames)==null?void 0:m.actionButton)},p.action.label):null)};function rj(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ez(e,t){const n={};return[e,t].forEach((i,l)=>{const c=l===1,u=c?"--mobile-offset":"--offset",f=c?bz:vz;function h(m){["top","right","bottom","left"].forEach(g=>{n[`${u}-${g}`]=typeof m=="number"?`${m}px`:m})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(m=>{i[m]===void 0?n[`${u}-${m}`]=f:n[`${u}-${m}`]=typeof i[m]=="number"?`${i[m]}px`:i[m]}):h(f)}),n}const Tz=xe.forwardRef(function(t,n){const{id:i,invert:l,position:c="bottom-right",hotkey:u=["altKey","KeyT"],expand:f,closeButton:h,className:m,offset:g,mobileOffset:p,theme:b="light",richColors:w,duration:S,style:j,visibleToasts:E=yz,toastOptions:N,dir:T=rj(),gap:k=jz,icons:R,containerAriaLabel:z="Notifications"}=t,[D,O]=xe.useState([]),B=xe.useMemo(()=>i?D.filter(A=>A.toasterId===i):D.filter(A=>!A.toasterId),[D,i]),q=xe.useMemo(()=>Array.from(new Set([c].concat(B.filter(A=>A.position).map(A=>A.position)))),[B,c]),[L,ne]=xe.useState([]),[X,ue]=xe.useState(!1),[ie,te]=xe.useState(!1),[I,Q]=xe.useState(b!=="system"?b:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Y=xe.useRef(null),$=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=xe.useRef(null),U=xe.useRef(!1),P=xe.useCallback(A=>{O(J=>{var ae;return(ae=J.find(fe=>fe.id===A.id))!=null&&ae.delete||Yn.dismiss(A.id),J.filter(({id:fe})=>fe!==A.id)})},[]);return xe.useEffect(()=>Yn.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{O(J=>J.map(ae=>ae.id===A.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{YN.flushSync(()=>{O(J=>{const ae=J.findIndex(fe=>fe.id===A.id);return ae!==-1?[...J.slice(0,ae),{...J[ae],...A},...J.slice(ae+1)]:[A,...J]})})})}),[D]),xe.useEffect(()=>{if(b!=="system"){Q(b);return}if(b==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:J})=>{Q(J?"dark":"light")})}catch{A.addListener(({matches:ae})=>{try{Q(ae?"dark":"light")}catch(fe){console.error(fe)}})}},[b]),xe.useEffect(()=>{D.length<=1&&ue(!1)},[D]),xe.useEffect(()=>{const A=J=>{var ae;if(u.every(pe=>J[pe]||J.code===pe)){var se;ue(!0),(se=Y.current)==null||se.focus()}J.code==="Escape"&&(document.activeElement===Y.current||(ae=Y.current)!=null&&ae.contains(document.activeElement))&&ue(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[u]),xe.useEffect(()=>{if(Y.current)return()=>{_.current&&(_.current.focus({preventScroll:!0}),_.current=null,U.current=!1)}},[Y.current]),xe.createElement("section",{ref:n,"aria-label":`${z} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},q.map((A,J)=>{var ae;const[fe,se]=A.split("-");return B.length?xe.createElement("ol",{key:A,dir:T==="auto"?rj():T,tabIndex:-1,ref:Y,className:m,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":fe,"data-x-position":se,style:{"--front-toast-height":`${((ae=L[0])==null?void 0:ae.height)||0}px`,"--width":`${wz}px`,"--gap":`${k}px`,...j,...Ez(g,p)},onBlur:pe=>{U.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(U.current=!1,_.current&&(_.current.focus({preventScroll:!0}),_.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||U.current||(U.current=!0,_.current=pe.relatedTarget)},onMouseEnter:()=>ue(!0),onMouseMove:()=>ue(!0),onMouseLeave:()=>{ie||ue(!1)},onDragEnd:()=>ue(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},B.filter(pe=>!pe.position&&J===0||pe.position===A).map((pe,ve)=>{var Ae,ze;return xe.createElement(kz,{key:pe.id,icons:R,index:ve,toast:pe,defaultRichColors:w,duration:(Ae=N==null?void 0:N.duration)!=null?Ae:S,className:N==null?void 0:N.className,descriptionClassName:N==null?void 0:N.descriptionClassName,invert:l,visibleToasts:E,closeButton:(ze=N==null?void 0:N.closeButton)!=null?ze:h,interacting:ie,position:A,style:N==null?void 0:N.style,unstyled:N==null?void 0:N.unstyled,classNames:N==null?void 0:N.classNames,cancelButtonStyle:N==null?void 0:N.cancelButtonStyle,actionButtonStyle:N==null?void 0:N.actionButtonStyle,closeButtonAriaLabel:N==null?void 0:N.closeButtonAriaLabel,removeToast:P,toasts:B.filter(Le=>Le.position==pe.position),heights:L.filter(Le=>Le.position==pe.position),setHeights:ne,expandByDefault:f,gap:k,expanded:X,swipeDirections:t.swipeDirections})})):null}))}),Az=({...e})=>{const{theme:t="system"}=Q2();return a.jsx(Tz,{theme:t,className:"toaster group",icons:{success:a.jsx(_r,{className:"size-4"}),info:a.jsx(JN,{className:"size-4"}),warning:a.jsx(xa,{className:"size-4"}),error:a.jsx(tR,{className:"size-4"}),loading:a.jsx(Ct,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})};function Rz(){return a.jsxs("div",{className:"flex h-screen overflow-hidden bg-background font-sans text-foreground",children:[a.jsx(d6,{}),a.jsx("main",{className:"flex-1 overflow-y-auto pl-[72px] md:pl-[88px]",children:a.jsx("div",{className:"px-6 md:px-8 py-6 max-w-7xl mx-auto",children:a.jsx(t3,{})})}),a.jsx(tz,{}),a.jsx(Az,{position:"bottom-right"})]})}const Mz="";async function be(e,t){const n=await fetch(`${Mz}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!n.ok){const i=await n.json().catch(()=>({}));throw new Error(i.error||`HTTP ${n.status}`)}return n.json()}const Ue={getStatus:()=>be("/api/status"),getStats:()=>be("/api/stats"),getProjects:async()=>(await be("/api/projects")).projects.map(t=>({...t,id:t.path})),getSessions:async e=>{const t=new URLSearchParams;e!=null&&e.projectId&&t.set("project",e.projectId),e!=null&&e.page&&t.set("page",String(e.page)),e!=null&&e.limit&&t.set("limit",String(e.limit));const n=t.toString(),i=await be(`/api/sessions${n?`?${n}`:""}`);return{sessions:i.items.map(l=>({...l,summary:l.projectName,lastActivity:l.lastActivity||new Date().toISOString()})),total:i.total}},getSession:async e=>{const n=(await be(`/api/sessions/${encodeURIComponent(e)}`)).session;return{...n,lastActivity:n.lastActivity||n.lastMessageAt||new Date().toISOString(),messages:n.messages.map(i=>({...i,role:i.role||i.type}))}},search:async e=>(await be("/api/search",{method:"POST",body:JSON.stringify({query:e})})).results,getPlans:async()=>(await be("/api/plans")).plans.map(t=>({id:t.filePath,name:t.name,path:t.filePath,content:t.content||"",createdAt:t.modifiedAt,preview:t.preview})),getPlan:async e=>{var i;const t=e.includes("/")?((i=e.split("/").pop())==null?void 0:i.replace(".md",""))||e:e.replace(".md",""),n=await be(`/api/plans/${encodeURIComponent(t)}`);return{id:n.plan.filePath,name:n.plan.name,path:n.plan.filePath,content:n.plan.content,createdAt:n.plan.modifiedAt,preview:n.plan.preview}},getProjectPlans:async e=>(await be(`/api/projects/${encodeURIComponent(e)}/plans`)).plans.map(n=>({id:n.filePath,name:n.name,path:n.filePath,content:n.content||"",createdAt:n.modifiedAt,preview:n.preview})),getSkills:async()=>(await be("/api/skills")).skills.map(t=>({id:t.path,name:t.name,path:t.path,content:t.content,description:t.description})),createSkill:(e,t)=>be("/api/skills",{method:"POST",body:JSON.stringify({name:e,content:t})}),updateSkill:(e,t)=>be(`/api/skills/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({content:t})}),validateSkill:e=>be("/api/skills/validate",{method:"POST",body:JSON.stringify({content:e})}),getSkillTemplate:()=>be("/api/skills/template"),deleteSkill:e=>be(`/api/skills/${encodeURIComponent(e)}`,{method:"DELETE"}),getHooks:async()=>(await be("/api/hooks")).hooks,createHook:e=>be("/api/hooks",{method:"POST",body:JSON.stringify(e)}),updateHook:(e,t)=>be(`/api/hooks/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)}),deleteHook:e=>be(`/api/hooks/${encodeURIComponent(e)}`,{method:"DELETE"}),testHook:e=>be(`/api/hooks/${encodeURIComponent(e)}/test`,{method:"POST"}),getMemory:async()=>(await be("/api/memory")).content,updateMemory:e=>be("/api/memory",{method:"POST",body:JSON.stringify({content:e})}),getGlobalAnalytics:e=>be(e?`/api/analytics?days=${e}`:"/api/analytics"),getDailyAnalytics:(e=30)=>be(`/api/analytics/daily?days=${e}`),getSessionAnalytics:e=>be(`/api/analytics/sessions/${encodeURIComponent(e)}`),getToolAnalytics:(e=30)=>be(`/api/analytics/tools?days=${e}`),getSessionForReplay:async e=>{const[t,n]=await Promise.all([be(`/api/sessions/${encodeURIComponent(e)}`),be(`/api/analytics/sessions/${encodeURIComponent(e)}`).catch(()=>null)]),i=t.session;return{session:{...i,lastActivity:i.lastActivity||i.lastMessageAt||new Date().toISOString()},messages:i.messages.map(l=>({id:l.id,type:l.type,timestamp:l.timestamp,content:l.content,metadata:l.metadata||{}})),analytics:n}},createTerminalSession:e=>be("/api/terminal/sessions",{method:"POST",body:JSON.stringify({workingDir:e})}),startClaudeCode:e=>be("/api/terminal/claude",{method:"POST",body:JSON.stringify(e)}),writeToTerminal:(e,t)=>be(`/api/terminal/sessions/${encodeURIComponent(e)}/write`,{method:"POST",body:JSON.stringify({data:t})}),interruptTerminal:e=>be(`/api/terminal/sessions/${encodeURIComponent(e)}/interrupt`,{method:"POST"}),closeTerminal:e=>be(`/api/terminal/sessions/${encodeURIComponent(e)}`,{method:"DELETE"}),getInsightsStatus:()=>be("/api/insights/status"),getInsights:e=>{const t=e?`?project=${encodeURIComponent(e)}`:"";return be(`/api/insights${t}`)},getInsight:e=>be(`/api/insights/${encodeURIComponent(e)}`),generateInsight:(e,t=!1)=>be(`/api/insights/${encodeURIComponent(e)}/generate`,{method:"POST",body:JSON.stringify({force:t})}),getProjectAIInsight:e=>be(`/api/insights/project/${encodeURIComponent(e)}`),generateProjectAIInsight:(e,t=!1)=>be(`/api/insights/project/${encodeURIComponent(e)}/generate`,{method:"POST",body:JSON.stringify({force:t})}),getGlobalAIInsight:()=>be("/api/insights/global"),generateGlobalAIInsight:(e=!1)=>be("/api/insights/global/generate",{method:"POST",body:JSON.stringify({force:e})}),getInsightProgress:e=>be(`/api/insights/${encodeURIComponent(e)}/progress`),getTechStack:(e=!1)=>be(`/api/tech-stack${e?"?refresh=true":""}`),getTechStackForProject:e=>be(`/api/tech-stack/projects/${encodeURIComponent(e)}`),refreshTechStack:()=>be("/api/tech-stack/refresh",{method:"POST"}),getTechStackInsights:(e=!1)=>be(`/api/tech-stack/insights${e?"?refresh=true":""}`),getTechStackAIInsight:()=>be("/api/tech-stack/ai-insight"),generateTechStackAIInsight:(e=!1)=>be("/api/tech-stack/ai-insight",{method:"POST",body:JSON.stringify({force:e})})},es={getAgents:async()=>(await be("/api/agents")).agents,getAgent:async e=>(await be(`/api/agents/${encodeURIComponent(e)}`)).agent,createAgent:(e,t)=>be("/api/agents",{method:"POST",body:JSON.stringify({name:e,content:t})}),updateAgent:(e,t)=>be(`/api/agents/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify({content:t})}),deleteAgent:e=>be(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),validateAgent:e=>be("/api/agents/validate",{method:"POST",body:JSON.stringify({content:e})}),getTemplates:async()=>(await be("/api/agents/templates")).templates,getTemplate:async e=>(await be(`/api/agents/template/${encodeURIComponent(e)}`)).template,generate:e=>be("/api/agents/generate",{method:"POST",body:JSON.stringify({prompt:e})}),applyGeneration:(e,t,n)=>be("/api/agents/generate/apply",{method:"POST",body:JSON.stringify({generationId:e,selectedAgents:t,selectedTeams:n})})},wo={getTeams:async()=>(await be("/api/teams")).teams,getTeam:async e=>(await be(`/api/teams/${encodeURIComponent(e)}`)).team,createTeam:(e,t)=>be("/api/teams",{method:"POST",body:JSON.stringify({name:e,...t})}),updateTeam:(e,t)=>be(`/api/teams/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)}),deleteTeam:e=>be(`/api/teams/${encodeURIComponent(e)}`,{method:"DELETE"}),exportTeam:async e=>(await be(`/api/teams/${encodeURIComponent(e)}/export`,{method:"POST"})).blueprint,getTemplates:async()=>(await be("/api/teams/templates")).templates,getAvailableAgents:async()=>(await be("/api/teams/available-agents")).agents,validateAgentRefs:async e=>await be("/api/teams/validate-agents",{method:"POST",body:JSON.stringify({teammates:e})}),getInstructions:async e=>(await be(`/api/teams/${encodeURIComponent(e)}/instructions`)).instructions,getSetupScript:async e=>(await be(`/api/teams/${encodeURIComponent(e)}/setup-script`)).script},aj={getBlueprints:async(e,t)=>{const n=new URLSearchParams;e&&n.set("type",e),t&&n.set("category",t);const i=n.toString();return(await be(`/api/blueprints${i?`?${i}`:""}`)).blueprints},getBlueprint:async e=>(await be(`/api/blueprints/${encodeURIComponent(e)}`)).blueprint,applyBlueprint:e=>be(`/api/blueprints/${encodeURIComponent(e)}/apply`,{method:"POST"})},Pc={getRecommendations:async(e=!1)=>(await be(`/api/advisor/recommendations${e?"?all=true":""}`)).recommendations,getStats:async()=>(await be("/api/advisor/stats")).stats,runAnalysis:async(e=!1)=>be("/api/advisor/analyze",{method:"POST",body:JSON.stringify({force:e})}),applyRecommendation:async e=>be(`/api/advisor/recommendations/${encodeURIComponent(e)}/apply`,{method:"POST"}),dismissRecommendation:async e=>be(`/api/advisor/recommendations/${encodeURIComponent(e)}/dismiss`,{method:"POST"})},Gl={getProjectSummaries:async()=>(await be("/api/intelligence")).projects,getGlobalIntelligence:async(e=!1)=>(await be(`/api/intelligence/global${e?"?refresh=true":""}`)).intelligence,getProjectIntelligence:async e=>{const t=btoa(e);try{return(await be(`/api/intelligence/project/${encodeURIComponent(t)}`)).intelligence}catch{return null}},generateProjectIntelligence:async(e,t=!1)=>{const n=btoa(e);return(await be(`/api/intelligence/project/${encodeURIComponent(n)}/generate`,{method:"POST",body:JSON.stringify({force:t})})).intelligence},generateAllIntelligence:async(e=!1)=>be("/api/intelligence/generate-all",{method:"POST",body:JSON.stringify({force:e})})},fn=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:G("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));fn.displayName="Card";const Pr=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:G("flex flex-col space-y-1.5 p-6",e),...t}));Pr.displayName="CardHeader";const Zr=y.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:G("text-2xl font-semibold leading-none tracking-tight",e),...t}));Zr.displayName="CardTitle";const qi=y.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:G("text-sm text-muted-foreground",e),...t}));qi.displayName="CardDescription";const mn=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:G("p-6 pt-0",e),...t}));mn.displayName="CardContent";const Dz=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:G("flex items-center p-6 pt-0",e),...t}));Dz.displayName="CardFooter";const BC=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:n,className:G("w-full caption-bottom text-sm",e),...t})}));BC.displayName="Table";const FC=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:G("[&_tr]:border-b",e),...t}));FC.displayName="TableHeader";const HC=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:G("[&_tr:last-child]:border-0",e),...t}));HC.displayName="TableBody";const Oz=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:G("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Oz.displayName="TableFooter";const ax=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:G("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ax.displayName="TableRow";const $c=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:G("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));$c.displayName="TableHead";const Gc=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:G("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Gc.displayName="TableCell";const _z=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:G("mt-4 text-sm text-muted-foreground",e),...t}));_z.displayName="TableCaption";const Pz=CS("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-1 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground border-border"}},defaultVariants:{variant:"default"}});function we({className:e,variant:t,...n}){return a.jsx("div",{className:G(Pz({variant:t}),e),...n})}function Te({className:e,...t}){return a.jsx("div",{className:G("animate-pulse rounded-md bg-muted",e),...t})}function Wd({title:e,value:t,subValue:n,icon:i,accentColor:l}){return a.jsxs(fn,{className:"group relative overflow-hidden bg-card border-border/50 transition-all duration-300 hover:border-primary/30 hover:shadow-lg hover:shadow-primary/5",children:[a.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),a.jsx("div",{className:`absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent ${l||"via-primary/50"} to-transparent`}),a.jsxs(Pr,{className:"flex flex-row items-center justify-between pb-2 space-y-0 relative",children:[a.jsx(Zr,{className:"text-[11px] font-medium text-muted-foreground uppercase tracking-wide",children:e}),a.jsx("div",{className:"p-2 rounded-lg bg-primary/10 group-hover:bg-primary/20 transition-colors",children:a.jsx(i,{className:"h-4 w-4 text-primary",strokeWidth:1.75})})]}),a.jsxs(mn,{className:"pt-0 relative",children:[a.jsx("div",{className:"text-3xl font-semibold tracking-tight tabular-nums group-hover:text-primary transition-colors duration-300",children:t}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:n})]})]})}function zz(){const[e,t]=xe.useState(1),n=5,{data:i,isLoading:l}=pt({queryKey:["stats"],queryFn:Ue.getStats}),{data:c,isLoading:u}=pt({queryKey:["projects"],queryFn:Ue.getProjects}),{data:f,isLoading:h}=pt({queryKey:["sessions","recent"],queryFn:()=>Ue.getSessions({limit:5})}),m=l||u||h,g=c?Math.ceil(c.length/n):0,p=c?c.slice((e-1)*n,e*n):[];return m?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[a.jsx(Te,{className:"h-[120px] w-full rounded-lg"}),a.jsx(Te,{className:"h-[120px] w-full rounded-lg"}),a.jsx(Te,{className:"h-[120px] w-full rounded-lg"}),a.jsx(Te,{className:"h-[120px] w-full rounded-lg"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[a.jsx(Te,{className:"col-span-2 h-[400px] w-full rounded-lg"}),a.jsx(Te,{className:"h-[400px] w-full rounded-lg"})]})]}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Overview"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Your workspace at a glance"})]}),a.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 rounded-lg bg-card border border-border/50",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse shadow-lg shadow-emerald-500/50"}),a.jsx("span",{className:"text-muted-foreground",children:"System Online"})]}),a.jsx("div",{className:"h-4 w-px bg-border"}),a.jsx("span",{className:"text-sm text-muted-foreground tabular-nums font-mono",children:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[a.jsx(Wd,{title:"Total Sessions",value:(i==null?void 0:i.totalSessions)??0,subValue:`${(i==null?void 0:i.activeDays)??0} active days`,icon:gu}),a.jsx(Wd,{title:"Messages",value:sj((i==null?void 0:i.totalMessages)??0),subValue:"Total processed",icon:Lt}),a.jsx(Wd,{title:"Tokens",value:sj((i==null?void 0:i.totalTokens)??0),subValue:"Lifetime usage",icon:$t}),a.jsx(Wd,{title:"Projects",value:(c==null?void 0:c.length)??0,subValue:"Active workspaces",icon:eu})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs(fn,{className:"lg:col-span-2 bg-card border-border/50 overflow-hidden",children:[a.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-primary/30 to-transparent"}),a.jsxs(Pr,{className:"flex flex-row items-center justify-between py-4 border-b border-border/30",children:[a.jsxs(Zr,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 rounded-md bg-primary/10",children:a.jsx(Js,{className:"w-4 h-4 text-primary",strokeWidth:1.75})}),"Recent Activity"]}),a.jsx(me,{variant:"ghost",size:"sm",asChild:!0,className:"h-8 text-xs text-muted-foreground hover:text-primary",children:a.jsxs($r,{to:"/sessions",children:["View All ",a.jsx(QN,{className:"ml-1.5 h-3 w-3"})]})})]}),a.jsx(mn,{className:"p-0",children:a.jsxs(BC,{children:[a.jsx(FC,{children:a.jsxs(ax,{className:"hover:bg-transparent border-border/30",children:[a.jsx($c,{className:"text-[11px] uppercase tracking-wide h-10 text-muted-foreground font-medium",children:"Project"}),a.jsx($c,{className:"text-[11px] uppercase tracking-wide h-10 text-muted-foreground w-[100px] font-medium text-center",children:"Messages"}),a.jsx($c,{className:"text-[11px] uppercase tracking-wide h-10 text-right text-muted-foreground w-[100px] font-medium",children:"Last Active"}),a.jsx($c,{className:"w-[40px] h-10"})]})}),a.jsx(HC,{children:f==null?void 0:f.sessions.map((b,w)=>a.jsxs(ax,{className:"group hover:bg-primary/5 border-border/20 transition-colors cursor-pointer",children:[a.jsx(Gc,{className:"py-3.5",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-1 h-8 rounded-full bg-gradient-to-b from-primary/60 to-primary/20 opacity-0 group-hover:opacity-100 transition-opacity"}),a.jsxs("div",{className:"flex flex-col",children:[a.jsx("span",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:b.projectName||b.projectPath.split("/").pop()}),a.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[280px]",children:b.projectPath})]})]})}),a.jsx(Gc,{className:"py-3.5 text-center",children:a.jsx(we,{variant:"secondary",className:"font-mono text-xs tabular-nums",children:b.messageCount})}),a.jsx(Gc,{className:"text-right py-3.5",children:a.jsx("span",{className:"text-sm text-muted-foreground tabular-nums",children:Lz(b.lastActivity)})}),a.jsx(Gc,{className:"py-3.5",children:a.jsx(me,{variant:"ghost",size:"icon",asChild:!0,className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx($r,{to:`/sessions/${b.id}`,children:a.jsx(Qi,{className:"h-4 w-4"})})})})]},b.id))})]})})]}),a.jsxs(fn,{className:"bg-card border-border/50 flex flex-col overflow-hidden",children:[a.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-primary/30 to-transparent"}),a.jsx(Pr,{className:"py-4 border-b border-border/30",children:a.jsxs(Zr,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 rounded-md bg-primary/10",children:a.jsx(Ao,{className:"w-4 h-4 text-primary",strokeWidth:1.75})}),"Workspaces"]})}),a.jsx(mn,{className:"flex-1 p-2 overflow-y-auto",children:a.jsx("div",{className:"space-y-1",children:p.map(b=>a.jsxs($r,{to:`/sessions?project=${encodeURIComponent(b.id)}`,className:"group flex items-center justify-between rounded-lg px-3 py-2.5 hover:bg-primary/5 transition-all",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx("div",{className:"w-9 h-9 rounded-lg bg-secondary/50 group-hover:bg-primary/10 flex items-center justify-center transition-colors",children:a.jsx(eu,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary transition-colors",strokeWidth:1.75})}),a.jsxs("div",{className:"flex flex-col min-w-0",children:[a.jsx("span",{className:"text-sm font-medium truncate group-hover:text-primary transition-colors",children:b.name}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Updated recently"})]})]}),a.jsx(we,{variant:"secondary",className:"font-mono text-xs tabular-nums ml-2 group-hover:bg-primary/10 group-hover:text-primary transition-colors",children:b.sessionCount})]},b.id))})}),g>1&&a.jsxs("div",{className:"p-3 border-t border-border/30 flex items-center justify-between bg-muted/20",children:[a.jsx(me,{variant:"ghost",size:"sm",className:"h-7 text-xs hover:text-primary",onClick:()=>t(b=>Math.max(1,b-1)),disabled:e===1,children:"Previous"}),a.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[e," / ",g]}),a.jsx(me,{variant:"ghost",size:"sm",className:"h-7 text-xs hover:text-primary",onClick:()=>t(b=>Math.min(g,b+1)),disabled:e===g,children:"Next"})]})]})]})]})}function sj(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function Lz(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<60)return n+"m ago";const i=Math.floor(n/60);return i<24?i+"h ago":Math.floor(i/24)+"d ago"}const Et=y.forwardRef(({className:e,type:t,...n},i)=>a.jsx("input",{type:t,className:G("flex h-9 w-full rounded-md border border-border bg-background px-3 py-2 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:i,...n}));Et.displayName="Input";function Iz(){const[e,t]=y.useState(""),[n,i]=y.useState(""),l=y.useRef(null);y.useEffect(()=>{const f=setTimeout(()=>i(e),300);return()=>clearTimeout(f)},[e]),y.useEffect(()=>{var f;(f=l.current)==null||f.focus()},[]);const{data:c,isLoading:u}=pt({queryKey:["search",n],queryFn:()=>Ue.search(n),enabled:n.length>=2});return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col max-w",children:[a.jsxs("div",{className:"mb-6 flex-shrink-0",children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Kr,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Search"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Find context across sessions and code"})]}),a.jsxs("div",{className:"relative mb-6 flex-shrink-0",children:[a.jsx(Kr,{className:"absolute left-4 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{ref:l,type:"text",value:e,onChange:f=>t(f.target.value),placeholder:"Search messages, code, plans...",className:"pl-11 pr-11 h-11 text-base"}),a.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2",children:e&&u?a.jsx(Ct,{className:"h-4 w-4 animate-spin text-muted-foreground"}):a.jsx("kbd",{className:"hidden sm:inline-flex text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded border border-border/50",children:"/"})})]}),a.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[n.length>=2&&(c==null?void 0:c.length)===0&&!u&&a.jsxs("div",{className:"text-center py-12",children:[a.jsx(Kr,{className:"h-8 w-8 mx-auto mb-3 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm font-medium",children:"No results found"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Try different keywords"})]}),c&&c.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-3 px-1",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Results"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[c.length," found"]})]}),a.jsx("div",{className:"space-y-2",children:c.map((f,h)=>a.jsxs("div",{className:"group relative rounded-lg border border-border/50 p-4 hover:border-border hover:bg-accent/30 transition-colors cursor-pointer",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{variant:"secondary",className:"text-[10px] font-normal capitalize",children:f.role}),a.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[180px]",children:f.projectPath.split("/").pop()})]}),a.jsx("span",{className:"text-[10px] text-muted-foreground",children:new Date(f.timestamp).toLocaleDateString()})]}),a.jsx("p",{className:"text-sm leading-relaxed text-foreground/90 line-clamp-2",children:f.content}),a.jsx(Hx,{className:"absolute right-4 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground/30 opacity-0 group-hover:opacity-100 transition-opacity"})]},h))})]}),!n&&a.jsxs("div",{className:"flex-1 flex flex-col",children:[a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[a.jsx("div",{className:"p-4 rounded-lg border border-dashed border-border/50 bg-muted/20",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(gu,{className:"h-4 w-4 text-muted-foreground mt-0.5",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium",children:"Natural Language"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Search for concepts, not just keywords"})]})]})}),a.jsx("div",{className:"p-4 rounded-lg border border-dashed border-border/50 bg-muted/20",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx(Lt,{className:"h-4 w-4 text-muted-foreground mt-0.5",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium",children:"Full Context"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Results include code and session history"})]})]})})]}),a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center -mt-8",children:[a.jsxs("svg",{width:"280",height:"160",viewBox:"0 0 320 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"text-muted-foreground/20",children:[a.jsx("path",{d:"M40 100 L100 60 L180 80 L240 40 L280 70",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",className:"opacity-40"}),a.jsx("path",{d:"M60 140 L120 120 L180 140 L260 110",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",className:"opacity-30"}),a.jsx("path",{d:"M100 60 L120 120",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeDasharray:"4 4",className:"opacity-20"}),a.jsx("path",{d:"M180 80 L180 140",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeDasharray:"4 4",className:"opacity-20"}),a.jsx("circle",{cx:"40",cy:"100",r:"4",fill:"currentColor",className:"opacity-60"}),a.jsx("circle",{cx:"100",cy:"60",r:"6",fill:"currentColor",className:"opacity-50"}),a.jsx("circle",{cx:"180",cy:"80",r:"8",stroke:"currentColor",strokeWidth:"1.5",fill:"none",className:"opacity-60"}),a.jsx("circle",{cx:"180",cy:"80",r:"3",fill:"currentColor",className:"opacity-40"}),a.jsx("circle",{cx:"240",cy:"40",r:"4",fill:"currentColor",className:"opacity-40"}),a.jsx("circle",{cx:"280",cy:"70",r:"5",fill:"currentColor",className:"opacity-50"}),a.jsx("circle",{cx:"60",cy:"140",r:"3",fill:"currentColor",className:"opacity-40"}),a.jsx("circle",{cx:"120",cy:"120",r:"5",fill:"currentColor",className:"opacity-50"}),a.jsx("circle",{cx:"180",cy:"140",r:"4",fill:"currentColor",className:"opacity-40"}),a.jsx("circle",{cx:"260",cy:"110",r:"6",stroke:"currentColor",strokeWidth:"1.5",fill:"none",className:"opacity-50"}),a.jsx("circle",{cx:"160",cy:"100",r:"28",stroke:"currentColor",strokeWidth:"1",className:"opacity-20"}),a.jsx("circle",{cx:"160",cy:"100",r:"40",stroke:"currentColor",strokeWidth:"0.5",strokeDasharray:"2 6",className:"opacity-15"}),a.jsx("line",{x1:"180",y1:"120",x2:"200",y2:"140",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",className:"opacity-25"})]}),a.jsx("p",{className:"text-xs text-muted-foreground/40 mt-4",children:"Type to search across all your sessions and code"})]})]})]})]})}function sx(e,[t,n]){return Math.min(n,Math.max(t,e))}function Uz(e,t){return y.useReducer((n,i)=>t[n][i]??n,e)}var ky="ScrollArea",[qC]=ja(ky),[Bz,Lr]=qC(ky),VC=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:l,scrollHideDelay:c=600,...u}=e,[f,h]=y.useState(null),[m,g]=y.useState(null),[p,b]=y.useState(null),[w,S]=y.useState(null),[j,E]=y.useState(null),[N,T]=y.useState(0),[k,R]=y.useState(0),[z,D]=y.useState(!1),[O,B]=y.useState(!1),q=Ze(t,ne=>h(ne)),L=Yf(l);return a.jsx(Bz,{scope:n,type:i,dir:L,scrollHideDelay:c,scrollArea:f,viewport:m,onViewportChange:g,content:p,onContentChange:b,scrollbarX:w,onScrollbarXChange:S,scrollbarXEnabled:z,onScrollbarXEnabledChange:D,scrollbarY:j,onScrollbarYChange:E,scrollbarYEnabled:O,onScrollbarYEnabledChange:B,onCornerWidthChange:T,onCornerHeightChange:R,children:a.jsx(Pe.div,{dir:L,...u,ref:q,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":k+"px",...e.style}})})});VC.displayName=ky;var $C="ScrollAreaViewport",GC=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:l,...c}=e,u=Lr($C,n),f=y.useRef(null),h=Ze(t,f,u.onViewportChange);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),a.jsx(Pe.div,{"data-radix-scroll-area-viewport":"",...c,ref:h,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:a.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});GC.displayName=$C;var Sa="ScrollAreaScrollbar",Ey=y.forwardRef((e,t)=>{const{forceMount:n,...i}=e,l=Lr(Sa,e.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:u}=l,f=e.orientation==="horizontal";return y.useEffect(()=>(f?c(!0):u(!0),()=>{f?c(!1):u(!1)}),[f,c,u]),l.type==="hover"?a.jsx(Fz,{...i,ref:t,forceMount:n}):l.type==="scroll"?a.jsx(Hz,{...i,ref:t,forceMount:n}):l.type==="auto"?a.jsx(YC,{...i,ref:t,forceMount:n}):l.type==="always"?a.jsx(Ty,{...i,ref:t}):null});Ey.displayName=Sa;var Fz=y.forwardRef((e,t)=>{const{forceMount:n,...i}=e,l=Lr(Sa,e.__scopeScrollArea),[c,u]=y.useState(!1);return y.useEffect(()=>{const f=l.scrollArea;let h=0;if(f){const m=()=>{window.clearTimeout(h),u(!0)},g=()=>{h=window.setTimeout(()=>u(!1),l.scrollHideDelay)};return f.addEventListener("pointerenter",m),f.addEventListener("pointerleave",g),()=>{window.clearTimeout(h),f.removeEventListener("pointerenter",m),f.removeEventListener("pointerleave",g)}}},[l.scrollArea,l.scrollHideDelay]),a.jsx(xr,{present:n||c,children:a.jsx(YC,{"data-state":c?"visible":"hidden",...i,ref:t})})}),Hz=y.forwardRef((e,t)=>{const{forceMount:n,...i}=e,l=Lr(Sa,e.__scopeScrollArea),c=e.orientation==="horizontal",u=dm(()=>h("SCROLL_END"),100),[f,h]=Uz("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(f==="idle"){const m=window.setTimeout(()=>h("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(m)}},[f,l.scrollHideDelay,h]),y.useEffect(()=>{const m=l.viewport,g=c?"scrollLeft":"scrollTop";if(m){let p=m[g];const b=()=>{const w=m[g];p!==w&&(h("SCROLL"),u()),p=w};return m.addEventListener("scroll",b),()=>m.removeEventListener("scroll",b)}},[l.viewport,c,h,u]),a.jsx(xr,{present:n||f!=="hidden",children:a.jsx(Ty,{"data-state":f==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:Ne(e.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Ne(e.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),YC=y.forwardRef((e,t)=>{const n=Lr(Sa,e.__scopeScrollArea),{forceMount:i,...l}=e,[c,u]=y.useState(!1),f=e.orientation==="horizontal",h=dm(()=>{if(n.viewport){const m=n.viewport.offsetWidth<n.viewport.scrollWidth,g=n.viewport.offsetHeight<n.viewport.scrollHeight;u(f?m:g)}},10);return jo(n.viewport,h),jo(n.content,h),a.jsx(xr,{present:i||c,children:a.jsx(Ty,{"data-state":c?"visible":"hidden",...l,ref:t})})}),Ty=y.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,l=Lr(Sa,e.__scopeScrollArea),c=y.useRef(null),u=y.useRef(0),[f,h]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),m=ZC(f.viewport,f.content),g={...i,sizes:f,onSizesChange:h,hasThumb:m>0&&m<1,onThumbChange:b=>c.current=b,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:b=>u.current=b};function p(b,w){return Kz(b,u.current,f,w)}return n==="horizontal"?a.jsx(qz,{...g,ref:t,onThumbPositionChange:()=>{if(l.viewport&&c.current){const b=l.viewport.scrollLeft,w=ij(b,f,l.dir);c.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:b=>{l.viewport&&(l.viewport.scrollLeft=b)},onDragScroll:b=>{l.viewport&&(l.viewport.scrollLeft=p(b,l.dir))}}):n==="vertical"?a.jsx(Vz,{...g,ref:t,onThumbPositionChange:()=>{if(l.viewport&&c.current){const b=l.viewport.scrollTop,w=ij(b,f);c.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:b=>{l.viewport&&(l.viewport.scrollTop=b)},onDragScroll:b=>{l.viewport&&(l.viewport.scrollTop=p(b))}}):null}),qz=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...l}=e,c=Lr(Sa,e.__scopeScrollArea),[u,f]=y.useState(),h=y.useRef(null),m=Ze(t,h,c.onScrollbarXChange);return y.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),a.jsx(QC,{"data-orientation":"horizontal",...l,ref:m,sizes:n,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":um(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.x),onDragScroll:g=>e.onDragScroll(g.x),onWheelScroll:(g,p)=>{if(c.viewport){const b=c.viewport.scrollLeft+g.deltaX;e.onWheelScroll(b),ek(b,p)&&g.preventDefault()}},onResize:()=>{h.current&&c.viewport&&u&&i({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Df(u.paddingLeft),paddingEnd:Df(u.paddingRight)}})}})}),Vz=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...l}=e,c=Lr(Sa,e.__scopeScrollArea),[u,f]=y.useState(),h=y.useRef(null),m=Ze(t,h,c.onScrollbarYChange);return y.useEffect(()=>{h.current&&f(getComputedStyle(h.current))},[h]),a.jsx(QC,{"data-orientation":"vertical",...l,ref:m,sizes:n,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":um(n)+"px",...e.style},onThumbPointerDown:g=>e.onThumbPointerDown(g.y),onDragScroll:g=>e.onDragScroll(g.y),onWheelScroll:(g,p)=>{if(c.viewport){const b=c.viewport.scrollTop+g.deltaY;e.onWheelScroll(b),ek(b,p)&&g.preventDefault()}},onResize:()=>{h.current&&c.viewport&&u&&i({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Df(u.paddingTop),paddingEnd:Df(u.paddingBottom)}})}})}),[$z,KC]=qC(Sa),QC=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:l,onThumbChange:c,onThumbPointerUp:u,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:m,onWheelScroll:g,onResize:p,...b}=e,w=Lr(Sa,n),[S,j]=y.useState(null),E=Ze(t,q=>j(q)),N=y.useRef(null),T=y.useRef(""),k=w.viewport,R=i.content-i.viewport,z=un(g),D=un(h),O=dm(p,10);function B(q){if(N.current){const L=q.clientX-N.current.left,ne=q.clientY-N.current.top;m({x:L,y:ne})}}return y.useEffect(()=>{const q=L=>{const ne=L.target;(S==null?void 0:S.contains(ne))&&z(L,R)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[k,S,R,z]),y.useEffect(D,[i,D]),jo(S,O),jo(w.content,O),a.jsx($z,{scope:n,scrollbar:S,hasThumb:l,onThumbChange:un(c),onThumbPointerUp:un(u),onThumbPositionChange:D,onThumbPointerDown:un(f),children:a.jsx(Pe.div,{...b,ref:E,style:{position:"absolute",...b.style},onPointerDown:Ne(e.onPointerDown,q=>{q.button===0&&(q.target.setPointerCapture(q.pointerId),N.current=S.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),B(q))}),onPointerMove:Ne(e.onPointerMove,B),onPointerUp:Ne(e.onPointerUp,q=>{const L=q.target;L.hasPointerCapture(q.pointerId)&&L.releasePointerCapture(q.pointerId),document.body.style.webkitUserSelect=T.current,w.viewport&&(w.viewport.style.scrollBehavior=""),N.current=null})})})}),Mf="ScrollAreaThumb",XC=y.forwardRef((e,t)=>{const{forceMount:n,...i}=e,l=KC(Mf,e.__scopeScrollArea);return a.jsx(xr,{present:n||l.hasThumb,children:a.jsx(Gz,{ref:t,...i})})}),Gz=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...l}=e,c=Lr(Mf,n),u=KC(Mf,n),{onThumbPositionChange:f}=u,h=Ze(t,p=>u.onThumbChange(p)),m=y.useRef(void 0),g=dm(()=>{m.current&&(m.current(),m.current=void 0)},100);return y.useEffect(()=>{const p=c.viewport;if(p){const b=()=>{if(g(),!m.current){const w=Qz(p,f);m.current=w,f()}};return f(),p.addEventListener("scroll",b),()=>p.removeEventListener("scroll",b)}},[c.viewport,g,f]),a.jsx(Pe.div,{"data-state":u.hasThumb?"visible":"hidden",...l,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:Ne(e.onPointerDownCapture,p=>{const w=p.target.getBoundingClientRect(),S=p.clientX-w.left,j=p.clientY-w.top;u.onThumbPointerDown({x:S,y:j})}),onPointerUp:Ne(e.onPointerUp,u.onThumbPointerUp)})});XC.displayName=Mf;var Ay="ScrollAreaCorner",WC=y.forwardRef((e,t)=>{const n=Lr(Ay,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?a.jsx(Yz,{...e,ref:t}):null});WC.displayName=Ay;var Yz=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,l=Lr(Ay,n),[c,u]=y.useState(0),[f,h]=y.useState(0),m=!!(c&&f);return jo(l.scrollbarX,()=>{var p;const g=((p=l.scrollbarX)==null?void 0:p.offsetHeight)||0;l.onCornerHeightChange(g),h(g)}),jo(l.scrollbarY,()=>{var p;const g=((p=l.scrollbarY)==null?void 0:p.offsetWidth)||0;l.onCornerWidthChange(g),u(g)}),m?a.jsx(Pe.div,{...i,ref:t,style:{width:c,height:f,position:"absolute",right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Df(e){return e?parseInt(e,10):0}function ZC(e,t){const n=e/t;return isNaN(n)?0:n}function um(e){const t=ZC(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function Kz(e,t,n,i="ltr"){const l=um(n),c=l/2,u=t||c,f=l-u,h=n.scrollbar.paddingStart+u,m=n.scrollbar.size-n.scrollbar.paddingEnd-f,g=n.content-n.viewport,p=i==="ltr"?[0,g]:[g*-1,0];return JC([h,m],p)(e)}function ij(e,t,n="ltr"){const i=um(t),l=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,c=t.scrollbar.size-l,u=t.content-t.viewport,f=c-i,h=n==="ltr"?[0,u]:[u*-1,0],m=sx(e,h);return JC([0,u],[0,f])(m)}function JC(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function ek(e,t){return e>0&&e<t}var Qz=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function l(){const c={left:e.scrollLeft,top:e.scrollTop},u=n.left!==c.left,f=n.top!==c.top;(u||f)&&t(),n=c,i=window.requestAnimationFrame(l)})(),()=>window.cancelAnimationFrame(i)};function dm(e,t){const n=un(e),i=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),y.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function jo(e,t){const n=un(t);hn(()=>{let i=0;if(e){const l=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return l.observe(e),()=>{window.cancelAnimationFrame(i),l.unobserve(e)}}},[e,n])}var tk=VC,Xz=GC,Wz=WC;const at=y.forwardRef(({className:e,children:t,...n},i)=>a.jsxs(tk,{ref:i,className:G("relative overflow-hidden",e),...n,children:[a.jsx(Xz,{className:"h-full w-full rounded-[inherit]",children:t}),a.jsx(nk,{}),a.jsx(Wz,{})]}));at.displayName=tk.displayName;const nk=y.forwardRef(({className:e,orientation:t="vertical",...n},i)=>a.jsx(Ey,{ref:i,orientation:t,className:G("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:a.jsx(XC,{className:"relative flex-1 rounded-full bg-border"})}));nk.displayName=Ey.displayName;function dn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Zz(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Zd=43200,lj=1440;let Jz={};function eL(){return Jz}function oj(e){const t=dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function xf(e,t){const n=dn(e),i=dn(t),l=n.getTime()-i.getTime();return l<0?-1:l>0?1:l}function tL(e){return Zz(e,Date.now())}function nL(e,t){const n=dn(e),i=dn(t),l=n.getFullYear()-i.getFullYear(),c=n.getMonth()-i.getMonth();return l*12+c}function rL(e){return t=>{const i=(e?Math[e]:Math.trunc)(t);return i===0?0:i}}function aL(e,t){return+dn(e)-+dn(t)}function sL(e){const t=dn(e);return t.setHours(23,59,59,999),t}function iL(e){const t=dn(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function lL(e){const t=dn(e);return+sL(t)==+iL(t)}function oL(e,t){const n=dn(e),i=dn(t),l=xf(n,i),c=Math.abs(nL(n,i));let u;if(c<1)u=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-l*c);let f=xf(n,i)===-l;lL(dn(e))&&c===1&&xf(e,i)===1&&(f=!1),u=l*(c-Number(f))}return u===0?0:u}function cL(e,t,n){const i=aL(e,t)/1e3;return rL(n==null?void 0:n.roundingMethod)(i)}const uL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dL=(e,t,n)=>{let i;const l=uL[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function ng(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const fL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},hL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pL={date:ng({formats:fL,defaultWidth:"full"}),time:ng({formats:mL,defaultWidth:"full"}),dateTime:ng({formats:hL,defaultWidth:"full"})},gL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xL=(e,t,n,i)=>gL[e];function zc(e){return(t,n)=>{const i=n!=null&&n.context?String(n.context):"standalone";let l;if(i==="formatting"&&e.formattingValues){const u=e.defaultFormattingWidth||e.defaultWidth,f=n!=null&&n.width?String(n.width):u;l=e.formattingValues[f]||e.formattingValues[u]}else{const u=e.defaultWidth,f=n!=null&&n.width?String(n.width):e.defaultWidth;l=e.values[f]||e.values[u]}const c=e.argumentCallback?e.argumentCallback(t):t;return l[c]}}const yL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},vL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},bL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wL={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},NL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},SL=(e,t)=>{const n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},CL={ordinalNumber:SL,era:zc({values:yL,defaultWidth:"wide"}),quarter:zc({values:vL,defaultWidth:"wide",argumentCallback:e=>e-1}),month:zc({values:bL,defaultWidth:"wide"}),day:zc({values:wL,defaultWidth:"wide"}),dayPeriod:zc({values:jL,defaultWidth:"wide",formattingValues:NL,defaultFormattingWidth:"wide"})};function Lc(e){return(t,n={})=>{const i=n.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],c=t.match(l);if(!c)return null;const u=c[0],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(f)?EL(f,p=>p.test(u)):kL(f,p=>p.test(u));let m;m=e.valueCallback?e.valueCallback(h):h,m=n.valueCallback?n.valueCallback(m):m;const g=t.slice(u.length);return{value:m,rest:g}}}function kL(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function EL(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function TL(e){return(t,n={})=>{const i=t.match(e.matchPattern);if(!i)return null;const l=i[0],c=t.match(e.parsePattern);if(!c)return null;let u=e.valueCallback?e.valueCallback(c[0]):c[0];u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(l.length);return{value:u,rest:f}}}const AL=/^(\d+)(th|st|nd|rd)?/i,RL=/\d+/i,ML={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},DL={any:[/^b/i,/^(a|c)/i]},OL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},_L={any:[/1/i,/2/i,/3/i,/4/i]},PL={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},LL={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},IL={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},UL={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},BL={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},FL={ordinalNumber:TL({matchPattern:AL,parsePattern:RL,valueCallback:e=>parseInt(e,10)}),era:Lc({matchPatterns:ML,defaultMatchWidth:"wide",parsePatterns:DL,defaultParseWidth:"any"}),quarter:Lc({matchPatterns:OL,defaultMatchWidth:"wide",parsePatterns:_L,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Lc({matchPatterns:PL,defaultMatchWidth:"wide",parsePatterns:zL,defaultParseWidth:"any"}),day:Lc({matchPatterns:LL,defaultMatchWidth:"wide",parsePatterns:IL,defaultParseWidth:"any"}),dayPeriod:Lc({matchPatterns:UL,defaultMatchWidth:"any",parsePatterns:BL,defaultParseWidth:"any"})},HL={code:"en-US",formatDistance:dL,formatLong:pL,formatRelative:xL,localize:CL,match:FL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qL(e,t,n){const i=eL(),l=(n==null?void 0:n.locale)??i.locale??HL,c=2520,u=xf(e,t);if(isNaN(u))throw new RangeError("Invalid time value");const f=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:u});let h,m;u>0?(h=dn(t),m=dn(e)):(h=dn(e),m=dn(t));const g=cL(m,h),p=(oj(m)-oj(h))/1e3,b=Math.round((g-p)/60);let w;if(b<2)return n!=null&&n.includeSeconds?g<5?l.formatDistance("lessThanXSeconds",5,f):g<10?l.formatDistance("lessThanXSeconds",10,f):g<20?l.formatDistance("lessThanXSeconds",20,f):g<40?l.formatDistance("halfAMinute",0,f):g<60?l.formatDistance("lessThanXMinutes",1,f):l.formatDistance("xMinutes",1,f):b===0?l.formatDistance("lessThanXMinutes",1,f):l.formatDistance("xMinutes",b,f);if(b<45)return l.formatDistance("xMinutes",b,f);if(b<90)return l.formatDistance("aboutXHours",1,f);if(b<lj){const S=Math.round(b/60);return l.formatDistance("aboutXHours",S,f)}else{if(b<c)return l.formatDistance("xDays",1,f);if(b<Zd){const S=Math.round(b/lj);return l.formatDistance("xDays",S,f)}else if(b<Zd*2)return w=Math.round(b/Zd),l.formatDistance("aboutXMonths",w,f)}if(w=oL(m,h),w<12){const S=Math.round(b/Zd);return l.formatDistance("xMonths",S,f)}else{const S=w%12,j=Math.trunc(w/12);return S<3?l.formatDistance("aboutXYears",j,f):S<9?l.formatDistance("overXYears",j,f):l.formatDistance("almostXYears",j+1,f)}}function Nu(e,t){return qL(e,tL(e),t)}function VL(e){const t=[{bg:"bg-rose-500/15",text:"text-rose-400",glow:"hover:shadow-rose-500/20"},{bg:"bg-orange-500/15",text:"text-orange-400",glow:"hover:shadow-orange-500/20"},{bg:"bg-amber-500/15",text:"text-amber-400",glow:"hover:shadow-amber-500/20"},{bg:"bg-emerald-500/15",text:"text-emerald-400",glow:"hover:shadow-emerald-500/20"},{bg:"bg-teal-500/15",text:"text-teal-400",glow:"hover:shadow-teal-500/20"},{bg:"bg-cyan-500/15",text:"text-cyan-400",glow:"hover:shadow-cyan-500/20"},{bg:"bg-sky-500/15",text:"text-sky-400",glow:"hover:shadow-sky-500/20"},{bg:"bg-blue-500/15",text:"text-blue-400",glow:"hover:shadow-blue-500/20"},{bg:"bg-indigo-500/15",text:"text-indigo-400",glow:"hover:shadow-indigo-500/20"},{bg:"bg-violet-500/15",text:"text-violet-400",glow:"hover:shadow-violet-500/20"},{bg:"bg-purple-500/15",text:"text-purple-400",glow:"hover:shadow-purple-500/20"},{bg:"bg-fuchsia-500/15",text:"text-fuchsia-400",glow:"hover:shadow-fuchsia-500/20"},{bg:"bg-pink-500/15",text:"text-pink-400",glow:"hover:shadow-pink-500/20"}];let n=0;for(let i=0;i<e.length;i++)n=e.charCodeAt(i)+((n<<5)-n);return t[Math.abs(n)%t.length]}function $L(e){const t=e.replace(/[-_]/g," ").split(" ").filter(Boolean);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e.slice(0,2).toUpperCase()}function GL(e){return e>=50?5:e>=30?4:e>=15?3:e>=5?2:1}function cj(){const{projectId:e}=UN();return e?a.jsx(KL,{projectId:e}):a.jsx(YL,{})}function YL(){const{data:e,isLoading:t}=pt({queryKey:["projects"],queryFn:Ue.getProjects}),[n,i]=y.useState(""),[l,c]=y.useState("recent"),u=e==null?void 0:e.filter(h=>h.name.toLowerCase().includes(n.toLowerCase())||h.path.toLowerCase().includes(n.toLowerCase())),f=u==null?void 0:u.sort((h,m)=>l==="recent"?new Date(m.lastActivity).getTime()-new Date(h.lastActivity).getTime():l==="name"?h.name.localeCompare(m.name):l==="sessions"?m.sessionCount-h.sessionCount:0);return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col max-w",children:[a.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between gap-4 mb-6 flex-shrink-0",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:"Projects"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Browse workspaces and session history"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"relative flex-1 md:w-56",children:[a.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{placeholder:"Filter projects...",className:"pl-9 h-9",value:n,onChange:h=>i(h.target.value)})]}),a.jsxs($2,{children:[a.jsx(G2,{asChild:!0,children:a.jsx(me,{variant:"outline",size:"icon",className:"h-9 w-9",children:a.jsx(H3,{className:"h-4 w-4"})})}),a.jsxs(Y2,{align:"end",className:"w-44",children:[a.jsx(PP,{className:"text-xs",children:"Sort by"}),a.jsx(zP,{}),a.jsxs(eo,{onClick:()=>c("recent"),className:G(l==="recent"&&"bg-accent"),children:[a.jsx(ba,{className:"mr-2 h-4 w-4"})," Recent"]}),a.jsxs(eo,{onClick:()=>c("name"),className:G(l==="name"&&"bg-accent"),children:[a.jsx(wn,{className:"mr-2 h-4 w-4"})," Name"]}),a.jsxs(eo,{onClick:()=>c("sessions"),className:G(l==="sessions"&&"bg-accent"),children:[a.jsx(Js,{className:"mr-2 h-4 w-4"})," Sessions"]})]})]})]})]}),a.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[t&&a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-20 w-full rounded-xl"}),a.jsx(Te,{className:"h-20 w-full rounded-xl"}),a.jsx(Te,{className:"h-20 w-full rounded-xl"})]}),!t&&(f==null?void 0:f.length)===0&&a.jsxs("div",{className:"p-12 text-center rounded-xl border border-border/50 bg-card",children:[a.jsx(wn,{className:"h-10 w-10 mx-auto mb-3 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No projects found"})]}),a.jsx(at,{className:"flex-1",children:a.jsx("div",{className:"space-y-2 pr-2",children:f==null?void 0:f.map(h=>{const m=new Date(h.lastActivity).getTime()>Date.now()-864e5,g=VL(h.name),p=$L(h.name),b=GL(h.sessionCount);return a.jsxs($r,{to:`/sessions/${encodeURIComponent(h.id)}`,className:G("group relative flex items-center gap-4 p-4 rounded-xl","bg-card border border-border/50","hover:border-border hover:shadow-lg transition-all duration-200","hover:-translate-y-0.5",g.glow),children:[a.jsx("div",{className:G("absolute left-0 top-3 bottom-3 w-1 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",g.bg.replace("/15",""))}),a.jsx("div",{className:G("w-11 h-11 rounded-lg flex items-center justify-center flex-shrink-0","font-semibold text-sm tracking-wide",g.bg,g.text),children:p}),a.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium truncate",children:h.name}),m&&a.jsx("span",{className:"flex items-center gap-1",children:a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-emerald-500"})]})})]}),a.jsx("span",{className:"text-xs text-muted-foreground truncate max-w-[350px]",children:h.path})]}),a.jsxs("div",{className:"flex items-center gap-6 flex-shrink-0 ml-4",children:[a.jsx("div",{className:"flex items-center gap-1",title:`${h.sessionCount} sessions`,children:Array.from({length:5}).map((w,S)=>a.jsx("div",{className:G("w-1 rounded-full transition-all",S<b?G("bg-current",g.text,S<b-1?"h-2":"h-3",S<b-2?"h-1.5":""):"h-1.5 bg-muted-foreground/20"),style:{height:S<b?`${6+S*2}px`:"6px"}},S))}),a.jsxs("div",{className:"text-right min-w-[60px]",children:[a.jsx("span",{className:"text-sm font-medium tabular-nums",children:h.sessionCount}),a.jsx("span",{className:"text-[10px] text-muted-foreground block uppercase tracking-wide",children:"sessions"})]}),a.jsx("div",{className:"text-right min-w-[90px]",children:a.jsx("span",{className:"text-xs text-muted-foreground",children:Nu(new Date(h.lastActivity),{addSuffix:!0})})}),a.jsx(Qi,{className:"h-4 w-4 text-muted-foreground/50 group-hover:text-muted-foreground group-hover:translate-x-0.5 transition-all"})]})]},h.id)})})})]})]})}function KL({projectId:e}){const[t,n]=D3(),i=t.get("session"),l=t.get("plan"),c=t.get("tab")||"sessions",u=f=>{const h=new URLSearchParams;h.set("tab",f),n(h)};return a.jsxs("div",{className:"h-[calc(100vh-3.5rem)] flex flex-col -mt-4 -mx-8",children:[a.jsxs("div",{className:"h-12 border-b border-border/50 flex items-center px-6 bg-card/50 justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(me,{variant:"ghost",size:"icon",asChild:!0,className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:a.jsx($r,{to:"/sessions",children:a.jsx(Fx,{className:"h-4 w-4"})})}),a.jsx("div",{className:"h-4 w-px bg-border"}),a.jsxs("h2",{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),decodeURIComponent(e).split("/").pop()]})]}),a.jsxs("div",{className:"flex items-center gap-1 bg-muted/50 rounded-lg p-1",children:[a.jsxs("button",{onClick:()=>u("sessions"),className:G("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors",c==="sessions"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(gu,{className:"h-3.5 w-3.5"}),"Sessions"]}),a.jsxs("button",{onClick:()=>u("plans"),className:G("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors",c==="plans"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(Lt,{className:"h-3.5 w-3.5"}),"Plans"]})]})]}),a.jsx("div",{className:"flex-1 flex min-h-0",children:c==="sessions"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"w-72 border-r border-border/50 bg-muted/30 flex flex-col",children:[a.jsx("div",{className:"p-3 border-b border-border/30",children:a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-2",children:"Sessions"})}),a.jsx(QL,{projectId:e,selectedId:i,onSelect:f=>n({tab:"sessions",session:f})})]}),a.jsx("div",{className:"flex-1 bg-background flex flex-col min-w-0",children:i?a.jsx(XL,{sessionId:i}):a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-muted-foreground",children:[a.jsx(tS,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"Select a session to view"})]})})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"w-72 border-r border-border/50 bg-muted/30 flex flex-col",children:[a.jsx("div",{className:"p-3 border-b border-border/30",children:a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide px-2",children:"Plans"})}),a.jsx(WL,{projectId:e,selectedId:l,onSelect:f=>n({tab:"plans",plan:f})})]}),a.jsx("div",{className:"flex-1 bg-background flex flex-col min-w-0",children:l?a.jsx(ZL,{planId:l}):a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-muted-foreground",children:[a.jsx(Lt,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"Select a plan to view"})]})})]})})]})}function QL({projectId:e,selectedId:t,onSelect:n}){const[i,l]=y.useState(1),{data:c,isLoading:u}=pt({queryKey:["sessions",e,i],queryFn:()=>Ue.getSessions({projectId:decodeURIComponent(e),page:i,limit:20})});return a.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"p-2 space-y-0.5",children:[u&&Array.from({length:8}).map((f,h)=>a.jsx(Te,{className:"h-12 w-full rounded-md"},h)),c==null?void 0:c.sessions.map(f=>a.jsxs("div",{className:G("w-full flex flex-col gap-0.5 p-2.5 rounded-md text-left transition-colors group",t===f.id?"bg-accent text-foreground":"hover:bg-accent/50 text-muted-foreground hover:text-foreground"),children:[a.jsx("button",{onClick:()=>n(f.id),className:"w-full text-left",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-xs font-medium font-mono truncate",children:[f.id.slice(0,8),"..."]}),a.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[Nu(new Date(f.lastActivity))," ago"]})]})}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(we,{variant:"secondary",className:"text-[10px] w-fit font-normal",children:[f.messageCount," messages"]}),a.jsxs($r,{to:`/replay/${f.id}`,className:"opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-1 text-[10px] text-primary hover:underline",onClick:h=>h.stopPropagation(),children:[a.jsx(Ro,{className:"h-3 w-3"}),"Replay"]})]})]},f.id))]})}),c&&a.jsxs("div",{className:"p-2 border-t border-border/30 flex items-center justify-between text-xs",children:[a.jsx(me,{variant:"ghost",size:"sm",onClick:()=>l(f=>f-1),disabled:i===1,className:"h-7 px-2",children:"Prev"}),a.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[i," / ",Math.ceil(c.total/20)]}),a.jsx(me,{variant:"ghost",size:"sm",onClick:()=>l(f=>f+1),disabled:c.sessions.length<20,className:"h-7 px-2",children:"Next"})]})]})}function XL({sessionId:e}){var l;const{data:t,isLoading:n}=pt({queryKey:["session",e],queryFn:()=>Ue.getSession(e)}),i=y.useRef(null);return y.useEffect(()=>{var c;t!=null&&t.messages&&((c=i.current)==null||c.scrollIntoView({behavior:"smooth"}))},[t==null?void 0:t.messages]),n?a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."})}):a.jsx(at,{className:"flex-1 h-full",children:a.jsxs("div",{className:"max-w py-8 px-6 space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between pb-6 border-b border-border/30",children:[a.jsxs(we,{variant:"outline",className:"text-xs text-muted-foreground",children:["Session started ",new Date(t==null?void 0:t.lastActivity).toLocaleString()]}),a.jsxs($r,{to:`/replay/${e}`,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:[a.jsx(Ro,{className:"h-3.5 w-3.5"}),"Replay Session"]})]}),(l=t==null?void 0:t.messages)==null?void 0:l.map((c,u)=>a.jsxs("div",{className:G("flex gap-4",c.role==="user"?"flex-row-reverse":"flex-row"),children:[a.jsx("div",{className:G("w-7 h-7 rounded-md shrink-0 flex items-center justify-center",c.role==="user"?"bg-foreground text-background":"bg-muted text-muted-foreground"),children:c.role==="user"?a.jsx(iS,{className:"h-3.5 w-3.5"}):a.jsx(cr,{className:"h-3.5 w-3.5"})}),a.jsxs("div",{className:G("flex flex-col gap-1 max-w-[85%]",c.role==="user"?"items-end":"items-start"),children:[a.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wide px-1",children:c.role}),a.jsx("div",{className:G("text-sm leading-relaxed whitespace-pre-wrap py-2.5 px-3 rounded-lg border",c.role==="user"?"bg-foreground text-background border-foreground":"bg-card border-border/50"),children:c.content})]})]},u)),a.jsx("div",{ref:i,className:"h-8"})]})})}function WL({projectId:e,selectedId:t,onSelect:n}){const{data:i,isLoading:l}=pt({queryKey:["project-plans",e],queryFn:()=>Ue.getProjectPlans(e)});return a.jsx("div",{className:"flex-1 flex flex-col min-h-0",children:a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"p-2 space-y-0.5",children:[l&&Array.from({length:4}).map((c,u)=>a.jsx(Te,{className:"h-14 w-full rounded-md"},u)),!l&&(!i||i.length===0)&&a.jsxs("div",{className:"p-4 text-center text-muted-foreground",children:[a.jsx(Lt,{className:"h-8 w-8 mx-auto mb-2 opacity-30"}),a.jsx("p",{className:"text-xs",children:"No plans associated with this project"})]}),i==null?void 0:i.map(c=>a.jsxs("button",{onClick:()=>n(c.name),className:G("w-full flex flex-col gap-1 p-2.5 rounded-md text-left transition-colors",t===c.name?"bg-accent text-foreground":"hover:bg-accent/50 text-muted-foreground hover:text-foreground"),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"h-3.5 w-3.5 flex-shrink-0"}),a.jsx("span",{className:"text-xs font-medium truncate",children:c.name})]}),c.preview&&a.jsx("span",{className:"text-[10px] text-muted-foreground line-clamp-2 pl-5.5",children:c.preview}),a.jsxs("span",{className:"text-[10px] text-muted-foreground pl-5.5",children:[Nu(new Date(c.createdAt))," ago"]})]},c.id))]})})})}function ZL({planId:e}){const{data:t,isLoading:n}=pt({queryKey:["plan",e],queryFn:()=>Ue.getPlan(e)});return n?a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."})}):t?a.jsx(at,{className:"flex-1 h-full",children:a.jsxs("div",{className:"max-w py-8 px-6",children:[a.jsx("div",{className:"flex items-center justify-between pb-6 border-b border-border/30 mb-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-9 h-9 rounded-lg bg-violet-500/15 text-violet-400 flex items-center justify-center",children:a.jsx(Lt,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-medium text-sm",children:t.name}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last modified ",Nu(new Date(t.createdAt))," ago"]})]})]})}),a.jsx("div",{className:"prose prose-sm prose-invert max-w-none",children:a.jsx("pre",{className:"whitespace-pre-wrap text-sm leading-relaxed bg-card border border-border/50 rounded-lg p-4",children:t.content})})]})}):a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx("div",{className:"text-sm text-muted-foreground",children:"Plan not found"})})}const rk={high:"bg-red-500/10 text-red-500 border-red-500/20",medium:"bg-amber-500/10 text-amber-500 border-amber-500/20",low:"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"},JL=rk,uj={positive:"bg-emerald-500",neutral:"bg-slate-400",negative:"bg-red-500",frustrated:"bg-orange-500",mixed:"bg-purple-500"},ix={positive:"text-emerald-500",neutral:"text-slate-400",negative:"text-red-500",frustrated:"text-orange-500",mixed:"text-purple-500"},eI={debugging:"bg-red-500/10 text-red-400",feature:"bg-blue-500/10 text-blue-400",explanation:"bg-purple-500/10 text-purple-400",refactoring:"bg-amber-500/10 text-amber-400",testing:"bg-emerald-500/10 text-emerald-400",documentation:"bg-cyan-500/10 text-cyan-400",setup:"bg-slate-500/10 text-slate-400",other:"bg-gray-500/10 text-gray-400"},tI={completed:"bg-emerald-500/10 text-emerald-500",partial:"bg-amber-500/10 text-amber-500",failed:"bg-red-500/10 text-red-500"};function nI({sessionId:e,className:t,compact:n=!1}){const[i,l]=y.useState(null),[c,u]=y.useState(!0),[f,h]=y.useState(!1),[m,g]=y.useState(null),[p,b]=y.useState(!0),[w,S]=y.useState(new Set(["summary","sentiment","topics","metadata"]));y.useEffect(()=>{N(),E()},[e]);const j=R=>{S(z=>{const D=new Set(z);return D.has(R)?D.delete(R):D.add(R),D})},E=async()=>{try{const{available:R}=await Ue.getInsightsStatus();b(R)}catch{b(!1)}},N=async()=>{u(!0),g(null);try{const{insight:R}=await Ue.getInsight(e);l(R)}catch{l(null)}finally{u(!1)}},T=async(R=!1)=>{h(!0),g(null);try{const{insight:z}=await Ue.generateInsight(e,R);l(z),z.status==="generating"&&k()}catch(z){g(z.message)}finally{h(!1)}},k=async()=>{let z=0;const D=async()=>{if(z>=90){g("Generation timed out");return}try{const{insight:O}=await Ue.getInsight(e);l(O),O.status==="generating"&&(z++,setTimeout(D,2e3))}catch{z++,setTimeout(D,2e3)}};setTimeout(D,2e3)};return c?a.jsx("div",{className:G("rounded-xl border border-border/50 bg-card p-6",t),children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ct,{className:"h-5 w-5 animate-spin text-muted-foreground"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading insights..."})]})}):p?i?i.status==="generating"?a.jsx("div",{className:G("rounded-xl border border-border/50 bg-card p-6",t),children:a.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[a.jsx(Ct,{className:"h-8 w-8 animate-spin text-primary"}),a.jsxs("div",{className:"text-center",children:[a.jsx("h3",{className:"font-medium",children:"Analyzing Session..."}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Claude is performing comprehensive analysis. This may take a minute."})]})]})}):i.status==="error"?a.jsx("div",{className:G("rounded-xl border border-border/50 bg-card p-6",t),children:a.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[a.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10",children:a.jsx(Gr,{className:"h-6 w-6 text-red-500"})}),a.jsxs("div",{className:"text-center",children:[a.jsx("h3",{className:"font-medium",children:"Generation Failed"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i.error})]}),a.jsxs(me,{variant:"outline",onClick:()=>T(!0),children:[a.jsx(ga,{className:"mr-2 h-4 w-4"}),"Retry"]})]})}):a.jsxs("div",{className:G("rounded-xl border border-border/50 bg-card",t),children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Vt,{className:"h-5 w-5 text-primary"}),a.jsx("h3",{className:"font-medium",children:"AI Insights"}),a.jsxs(we,{variant:"outline",className:"text-xs",children:["v",i.version]})]}),a.jsx(me,{variant:"ghost",size:"sm",onClick:()=>T(!0),disabled:f,children:a.jsx(ga,{className:G("h-4 w-4",f&&"animate-spin")})})]}),a.jsxs("div",{className:"divide-y divide-border/30",children:[a.jsxs(_s,{title:"Summary",icon:a.jsx(gu,{className:"h-4 w-4"}),expanded:w.has("summary"),onToggle:()=>j("summary"),children:[i.title&&a.jsx("h4",{className:"text-lg font-semibold mb-2",children:i.title}),i.summary&&a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:i.summary}),i.keyAccomplishments&&i.keyAccomplishments.length>0&&a.jsxs("div",{className:"mt-4",children:[a.jsxs("h5",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[a.jsx(_r,{className:"h-4 w-4 text-emerald-500"}),"Key Accomplishments"]}),a.jsx("ul",{className:"space-y-1",children:i.keyAccomplishments.map((R,z)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[a.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-emerald-500"}),a.jsx("span",{children:R})]},z))})]})]}),i.sentiment&&a.jsx(_s,{title:"Sentiment Analysis",icon:a.jsx(Js,{className:"h-4 w-4"}),expanded:w.has("sentiment"),onToggle:()=>j("sentiment"),badge:a.jsx(we,{variant:"outline",className:G("text-xs",ix[i.sentiment.overall]),children:i.sentiment.overall}),children:a.jsx(rI,{sentiment:i.sentiment})}),i.topics&&i.topics.length>0&&a.jsx(_s,{title:"Topics",icon:a.jsx(Hf,{className:"h-4 w-4"}),expanded:w.has("topics"),onToggle:()=>j("topics"),badge:a.jsx(we,{variant:"secondary",className:"text-xs",children:i.topics.length}),children:a.jsx(aI,{topics:i.topics})}),i.quality&&a.jsx(_s,{title:"Response Quality",icon:a.jsx(yo,{className:"h-4 w-4"}),expanded:w.has("quality"),onToggle:()=>j("quality"),badge:a.jsxs(we,{variant:"outline",className:G("text-xs",uI(i.quality.averageScore)),children:[i.quality.averageScore,"%"]}),children:a.jsx(sI,{quality:i.quality})}),i.metadata&&a.jsx(_s,{title:"Session Stats",icon:a.jsx($t,{className:"h-4 w-4"}),expanded:w.has("metadata"),onToggle:()=>j("metadata"),children:a.jsx(iI,{metadata:i.metadata})}),i.actionableSummary&&a.jsx(_s,{title:"Actionable Summary",icon:a.jsx(yo,{className:"h-4 w-4"}),expanded:w.has("actionable"),onToggle:()=>j("actionable"),children:a.jsx(lI,{summary:i.actionableSummary})}),i.costOptimization&&i.costOptimization.suggestions.length>0&&a.jsx(_s,{title:"Cost Optimization",icon:a.jsx(pu,{className:"h-4 w-4"}),expanded:w.has("cost"),onToggle:()=>j("cost"),badge:i.costOptimization.potentialSavings?a.jsxs(we,{variant:"outline",className:"text-xs text-emerald-500",children:["Save ~$",i.costOptimization.potentialSavings.toFixed(2)]}):void 0,children:a.jsx("div",{className:"space-y-2",children:i.costOptimization.suggestions.map((R,z)=>a.jsx(oI,{suggestion:R},z))})}),i.followUps&&i.followUps.length>0&&a.jsx(_s,{title:"Follow-up Suggestions",icon:a.jsx(Kn,{className:"h-4 w-4"}),expanded:w.has("followups"),onToggle:()=>j("followups"),badge:a.jsx(we,{variant:"secondary",className:"text-xs",children:i.followUps.length}),children:a.jsx("div",{className:"space-y-2",children:i.followUps.map((R,z)=>a.jsx(cI,{followUp:R},z))})})]}),a.jsx("div",{className:"border-t border-border/50 p-3",children:a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Generated ",new Date(i.generatedAt).toLocaleString()]})})]}):a.jsx("div",{className:G("rounded-xl border border-border/50 bg-card p-6",t),children:a.jsxs("div",{className:"flex flex-col items-center gap-4 py-4",children:[a.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/10",children:a.jsx(Vt,{className:"h-6 w-6 text-primary"})}),a.jsxs("div",{className:"text-center",children:[a.jsx("h3",{className:"font-medium",children:"AI Session Insights"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Get comprehensive AI-powered analysis including sentiment, topics, quality scoring, and more."})]}),a.jsx(me,{onClick:()=>T(),disabled:f,children:f?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"mr-2 h-4 w-4 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Vt,{className:"mr-2 h-4 w-4"}),"Generate Insights"]})}),m&&a.jsx("p",{className:"text-sm text-red-500",children:m})]})}):a.jsx("div",{className:G("rounded-xl border border-border/50 bg-card p-6",t),children:a.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[a.jsx(Gr,{className:"h-5 w-5"}),a.jsx("span",{className:"text-sm",children:"Claude Code is not available. Please install it to generate insights."})]})})}function _s({title:e,icon:t,children:n,expanded:i,onToggle:l,badge:c}){return a.jsxs("div",{children:[a.jsxs("button",{onClick:l,className:"w-full flex items-center justify-between p-4 hover:bg-muted/30 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[t,a.jsx("span",{className:"text-sm font-medium",children:e}),c]}),i?a.jsx(To,{className:"h-4 w-4"}):a.jsx(Ki,{className:"h-4 w-4"})]}),i&&a.jsx("div",{className:"px-4 pb-4",children:n})]})}function rI({sentiment:e}){return e?a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"flex items-center gap-4",children:a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Average Score"}),a.jsxs("span",{className:"text-sm font-medium",children:[(e.averageScore*100).toFixed(0),"%"]})]}),a.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:G("h-full rounded-full",uj[e.overall]),style:{width:`${Math.max(0,Math.min(100,(e.averageScore+1)*50))}%`}})})]})}),e.timeline.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Sentiment Timeline"}),a.jsx("div",{className:"flex gap-0.5 h-8",children:e.timeline.map((t,n)=>a.jsx("div",{className:G("flex-1 rounded-sm transition-all hover:opacity-80 cursor-pointer",uj[t.sentiment]),style:{opacity:.3+Math.abs(t.score)*.7},title:`Message ${t.messageIndex}: ${t.sentiment} (${t.reason||"No reason"})`},n))}),a.jsxs("div",{className:"flex justify-between mt-1 text-[10px] text-muted-foreground",children:[a.jsx("span",{children:"Start"}),a.jsx("span",{children:"End"})]})]}),e.frustrationSpikes.length>0&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2 flex items-center gap-1",children:[a.jsx(xa,{className:"h-3 w-3 text-orange-500"}),"Frustration Points"]}),a.jsx("div",{className:"space-y-1",children:e.frustrationSpikes.map((t,n)=>a.jsxs("div",{className:"text-xs p-2 rounded bg-orange-500/10 border border-orange-500/20",children:[a.jsxs("span",{className:"font-medium",children:["Message ",t.messageIndex,":"]})," ",t.reason]},n))})]}),e.moodShifts.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Mood Shifts"}),a.jsx("div",{className:"space-y-1",children:e.moodShifts.map((t,n)=>a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx(we,{variant:"outline",className:ix[t.from],children:t.from}),a.jsx(Hx,{className:"h-3 w-3"}),a.jsx(we,{variant:"outline",className:ix[t.to],children:t.to}),t.trigger&&a.jsxs("span",{className:"text-muted-foreground",children:["(",t.trigger,")"]})]},n))})]})]}):null}function aI({topics:e}){return a.jsx("div",{className:"space-y-2",children:e.map(t=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{className:G("text-xs",eI[t.category]),children:t.category}),a.jsx("span",{className:"font-medium text-sm",children:t.name})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.messageCount," messages"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:t.description}),t.keywords.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1",children:t.keywords.map((n,i)=>a.jsx(we,{variant:"outline",className:"text-[10px]",children:n},i))})]},t.id))})}function sI({quality:e}){if(!e)return null;const t=e.distribution.excellent+e.distribution.good+e.distribution.fair+e.distribution.poor;return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Score Distribution"}),a.jsx("div",{className:"flex gap-1 h-6",children:t>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"bg-emerald-500 rounded",style:{flex:e.distribution.excellent},title:`Excellent: ${e.distribution.excellent}`}),a.jsx("div",{className:"bg-blue-500 rounded",style:{flex:e.distribution.good},title:`Good: ${e.distribution.good}`}),a.jsx("div",{className:"bg-amber-500 rounded",style:{flex:e.distribution.fair},title:`Fair: ${e.distribution.fair}`}),a.jsx("div",{className:"bg-red-500 rounded",style:{flex:e.distribution.poor},title:`Poor: ${e.distribution.poor}`})]})}),a.jsxs("div",{className:"flex justify-between mt-1 text-[10px]",children:[a.jsxs("span",{className:"text-emerald-500",children:["Excellent (",e.distribution.excellent,")"]}),a.jsxs("span",{className:"text-blue-500",children:["Good (",e.distribution.good,")"]}),a.jsxs("span",{className:"text-amber-500",children:["Fair (",e.distribution.fair,")"]}),a.jsxs("span",{className:"text-red-500",children:["Poor (",e.distribution.poor,")"]})]})]}),e.bestResponses.length>0&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2 flex items-center gap-1",children:[a.jsx(_r,{className:"h-3 w-3 text-emerald-500"}),"Best Responses"]}),a.jsx("div",{className:"space-y-1",children:e.bestResponses.map((n,i)=>a.jsxs("div",{className:"text-xs p-2 rounded bg-emerald-500/10 border border-emerald-500/20",children:[a.jsxs("span",{className:"font-medium",children:["Response ",n.index,":"]})," ",n.reason]},i))})]}),e.improvementAreas.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Areas for Improvement"}),a.jsx("ul",{className:"space-y-1",children:e.improvementAreas.map((n,i)=>a.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[a.jsx("span",{className:"mt-1 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-amber-500"}),a.jsx("span",{children:n})]},i))})]})]})}function iI({metadata:e}){return e?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsx(Jd,{icon:a.jsx(ba,{className:"h-4 w-4"}),label:"Total Duration",value:`${e.duration.total.toFixed(1)} min`}),a.jsx(Jd,{icon:a.jsx(Mr,{className:"h-4 w-4"}),label:"Thinking Time",value:`${e.duration.thinking.toFixed(1)} min`}),a.jsx(Jd,{icon:a.jsx(Ii,{className:"h-4 w-4"}),label:"Tool Execution",value:`${e.duration.toolExecution.toFixed(1)} min`}),a.jsx(Jd,{icon:a.jsx($t,{className:"h-4 w-4"}),label:"Total Tokens",value:e.tokens.total.toLocaleString()})]}),a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Token Breakdown"}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[a.jsxs("div",{className:"p-2 rounded bg-muted/50",children:[a.jsx("div",{className:"text-lg font-semibold",children:e.tokens.input.toLocaleString()}),a.jsx("div",{className:"text-[10px] text-muted-foreground",children:"Input"})]}),a.jsxs("div",{className:"p-2 rounded bg-muted/50",children:[a.jsx("div",{className:"text-lg font-semibold",children:e.tokens.output.toLocaleString()}),a.jsx("div",{className:"text-[10px] text-muted-foreground",children:"Output"})]}),a.jsxs("div",{className:"p-2 rounded bg-muted/50",children:[a.jsx("div",{className:"text-lg font-semibold",children:e.tokens.cached.toLocaleString()}),a.jsx("div",{className:"text-[10px] text-muted-foreground",children:"Cached"})]})]})]}),e.tools.byName.length>0&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2",children:["Tool Usage (",e.tools.total," calls)"]}),a.jsx("div",{className:"space-y-1",children:e.tools.byName.slice(0,5).map((t,n)=>a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"font-medium",children:t.name}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-muted-foreground",children:[t.count,"x"]}),a.jsxs(we,{variant:"outline",className:G("text-[10px]",t.successRate>=90?"text-emerald-500":t.successRate>=70?"text-amber-500":"text-red-500"),children:[t.successRate.toFixed(0),"%"]})]})]},n))})]}),(e.codeChanges.filesEdited>0||e.codeChanges.filesCreated>0)&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2 flex items-center gap-1",children:[a.jsx(rs,{className:"h-3 w-3"}),"Code Changes"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[a.jsxs("div",{className:"flex justify-between p-2 rounded bg-muted/50",children:[a.jsx("span",{children:"Files Edited"}),a.jsx("span",{className:"font-medium",children:e.codeChanges.filesEdited})]}),a.jsxs("div",{className:"flex justify-between p-2 rounded bg-muted/50",children:[a.jsx("span",{children:"Files Created"}),a.jsx("span",{className:"font-medium",children:e.codeChanges.filesCreated})]}),a.jsxs("div",{className:"flex justify-between p-2 rounded bg-emerald-500/10",children:[a.jsx("span",{className:"text-emerald-500",children:"Lines Added"}),a.jsxs("span",{className:"font-medium text-emerald-500",children:["+",e.codeChanges.linesAdded]})]}),a.jsxs("div",{className:"flex justify-between p-2 rounded bg-red-500/10",children:[a.jsx("span",{className:"text-red-500",children:"Lines Removed"}),a.jsxs("span",{className:"font-medium text-red-500",children:["-",e.codeChanges.linesRemoved]})]})]})]}),e.errors.count>0&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2 flex items-center gap-1",children:[a.jsx(xa,{className:"h-3 w-3 text-red-500"}),"Errors (",e.errors.count,")"]}),a.jsx("div",{className:"space-y-1",children:e.errors.details.slice(0,3).map((t,n)=>a.jsx("div",{className:G("text-xs p-2 rounded border",t.resolved?"bg-emerald-500/10 border-emerald-500/20":"bg-red-500/10 border-red-500/20"),children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"truncate",children:t.message}),a.jsx(we,{variant:"outline",className:G("text-[10px]",t.resolved?"text-emerald-500":"text-red-500"),children:t.resolved?"Resolved":"Unresolved"})]})},n))})]})]}):null}function lI({summary:e}){return e?a.jsxs("div",{className:"space-y-4",children:[e.mainTasks.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Main Tasks"}),a.jsx("div",{className:"space-y-1",children:e.mainTasks.map((t,n)=>a.jsxs("div",{className:"flex items-center justify-between text-xs p-2 rounded bg-muted/30",children:[a.jsx("span",{children:t.task}),a.jsx(we,{variant:"outline",className:G("text-[10px]",tI[t.status]),children:t.status})]},n))})]}),e.codeChanges.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Code Changes"}),a.jsx("ul",{className:"space-y-1",children:e.codeChanges.map((t,n)=>a.jsxs("li",{className:"text-xs",children:[a.jsx("span",{className:"font-mono text-primary",children:t.file}),a.jsxs("span",{className:"text-muted-foreground",children:[" - ",t.description]})]},n))})]}),e.keyDecisions.length>0&&a.jsxs("div",{children:[a.jsx("h6",{className:"text-xs font-medium mb-2",children:"Key Decisions"}),a.jsx("div",{className:"space-y-2",children:e.keyDecisions.map((t,n)=>a.jsxs("div",{className:"text-xs p-2 rounded bg-blue-500/10 border border-blue-500/20",children:[a.jsx("div",{className:"font-medium",children:t.decision}),t.rationale&&a.jsx("div",{className:"text-muted-foreground mt-1",children:t.rationale})]},n))})]}),e.learnings.length>0&&a.jsxs("div",{children:[a.jsxs("h6",{className:"text-xs font-medium mb-2 flex items-center gap-1",children:[a.jsx(Kn,{className:"h-3 w-3 text-amber-500"}),"Key Learnings"]}),a.jsx("ul",{className:"space-y-1",children:e.learnings.map((t,n)=>a.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[a.jsx("span",{className:"mt-1 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-amber-500"}),a.jsx("span",{children:t})]},n))})]})]}):null}function Jd({icon:e,label:t,value:n}){return a.jsxs("div",{className:"flex items-center gap-2 p-2 rounded bg-muted/50",children:[a.jsx("div",{className:"text-muted-foreground",children:e}),a.jsxs("div",{children:[a.jsx("div",{className:"text-xs text-muted-foreground",children:t}),a.jsx("div",{className:"text-sm font-medium",children:n})]})]})}function oI({suggestion:e}){return a.jsxs("div",{className:"rounded-lg border border-border/50 bg-muted/30 p-3",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-sm font-medium",children:e.title}),a.jsx(we,{variant:"outline",className:G("text-xs",rk[e.impact]),children:e.impact})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:e.description})]})}function cI({followUp:e}){return a.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-border/50 bg-muted/30 p-3",children:[a.jsx(Hx,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-blue-500"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-sm font-medium",children:e.title}),a.jsx(we,{variant:"outline",className:G("text-xs flex-shrink-0",JL[e.priority]),children:e.priority})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:e.description})]})]})}function uI(e){return e>=85?"text-emerald-500":e>=70?"text-blue-500":e>=50?"text-amber-500":"text-red-500"}const rg=[{label:"0.5x",value:2e3},{label:"1x",value:1e3},{label:"2x",value:500},{label:"4x",value:250}];function dI(){const{sessionId:e}=UN(),[t,n]=y.useState(0),[i,l]=y.useState(!1),[c,u]=y.useState(1),[f,h]=y.useState(!0),[m,g]=y.useState(!1),p=y.useRef([]),b=y.useRef(null),{data:w,isLoading:S,error:j}=pt({queryKey:["session-replay",e],queryFn:()=>Ue.getSessionForReplay(e),enabled:!!e}),E=(w==null?void 0:w.messages)??[],N=w==null?void 0:w.analytics,T=E.length;y.useEffect(()=>{if(!i||t>=T-1){t>=T-1&&l(!1);return}const X=setTimeout(()=>{n(ue=>Math.min(ue+1,T-1))},rg[c].value);return()=>clearTimeout(X)},[i,t,T,c]),y.useEffect(()=>{const X=p.current[t];X&&X.scrollIntoView({behavior:"smooth",block:"center"})},[t]);const k=y.useCallback(()=>{t>=T-1?(n(0),l(!0)):l(X=>!X)},[t,T]),R=y.useCallback(()=>{l(!1),n(X=>Math.max(0,X-1))},[]),z=y.useCallback(()=>{l(!1),n(X=>Math.min(T-1,X+1))},[T]),D=y.useCallback(()=>{l(!1),n(0)},[]),O=y.useCallback(()=>{l(!1),n(T-1)},[T]),B=y.useCallback(X=>{const ue=X.currentTarget.getBoundingClientRect(),te=(X.clientX-ue.left)/ue.width,I=Math.round(te*(T-1));l(!1),n(Math.max(0,Math.min(T-1,I)))},[T]),q=y.useCallback(()=>{u(X=>(X+1)%rg.length)},[]);if(y.useEffect(()=>{const X=ue=>{if(!(ue.target instanceof HTMLInputElement||ue.target instanceof HTMLTextAreaElement))switch(ue.key){case" ":ue.preventDefault(),k();break;case"ArrowLeft":ue.preventDefault(),R();break;case"ArrowRight":ue.preventDefault(),z();break;case"Home":ue.preventDefault(),D();break;case"End":ue.preventDefault(),O();break}};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[k,R,z,D,O]),S)return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col",children:[a.jsxs("div",{className:"h-14 border-b border-border/50 flex items-center px-6 gap-4",children:[a.jsx(Te,{className:"h-8 w-8"}),a.jsx(Te,{className:"h-6 w-48"})]}),a.jsx("div",{className:"flex-1 flex items-center justify-center",children:a.jsx(Te,{className:"h-64 w-full max-w-2xl"})})]});if(j||!w)return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col items-center justify-center",children:[a.jsx("p",{className:"text-muted-foreground",children:"Failed to load session"}),a.jsx(me,{asChild:!0,variant:"outline",className:"mt-4",children:a.jsx($r,{to:"/sessions",children:"Back to Sessions"})})]});const L=E[t],ne=T>1?t/(T-1)*100:0;return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col -mt-4 -mx-8",children:[a.jsxs("div",{className:"h-14 border-b border-border/50 flex items-center justify-between px-6 bg-card/50 flex-shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(me,{variant:"ghost",size:"icon",asChild:!0,className:"h-8 w-8",children:a.jsx($r,{to:"/sessions",children:a.jsx(Fx,{className:"h-4 w-4"})})}),a.jsx("div",{className:"h-4 w-px bg-border"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-medium",children:"Session Replay"}),a.jsxs(we,{variant:"outline",className:"text-xs font-mono",children:[e==null?void 0:e.slice(0,8),"..."]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>h(!f),className:"text-xs gap-1",children:[f?a.jsx(To,{className:"h-3 w-3"}):a.jsx(Ki,{className:"h-3 w-3"}),"Analytics"]}),a.jsxs(me,{variant:m?"secondary":"ghost",size:"sm",onClick:()=>g(!m),className:"text-xs gap-1",children:[a.jsx(Vt,{className:"h-3 w-3"}),"Insights"]})]})]}),f&&N&&a.jsx("div",{className:"border-b border-border/50 bg-muted/30 px-6 py-3 flex-shrink-0",children:a.jsxs("div",{className:"flex items-center gap-8",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(pu,{className:"h-4 w-4 text-emerald-500"}),a.jsxs("div",{children:[a.jsxs("span",{className:"text-sm font-medium",children:["$",N.cost.totalCost.toFixed(4)]}),a.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"cost"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx($t,{className:"h-4 w-4 text-amber-500"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium",children:N.tokens.totalTokens.toLocaleString()}),a.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"tokens"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ba,{className:"h-4 w-4 text-blue-500"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium",children:N.durationMinutes}),a.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"min"})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ii,{className:"h-4 w-4 text-purple-500"}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium",children:N.toolUsage.reduce((X,ue)=>X+ue.count,0)}),a.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"tool calls"})]})]}),N.modelUsage.length>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(rs,{className:"h-4 w-4 text-cyan-500"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:N.modelUsage.map(X=>X.model.split("-").slice(0,2).join("-")).join(", ")})]})]})}),a.jsxs("div",{className:"flex-1 flex min-h-0",children:[a.jsxs("div",{className:G("w-64 border-r border-border/50 bg-muted/30 flex flex-col",m&&"hidden lg:flex"),children:[a.jsx("div",{className:"p-3 border-b border-border/30",children:a.jsxs("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Timeline (",t+1," / ",T,")"]})}),a.jsx(at,{className:"flex-1",children:a.jsx("div",{className:"p-2 space-y-0.5",children:E.map((X,ue)=>a.jsxs("button",{ref:ie=>{p.current[ue]=ie},onClick:()=>{l(!1),n(ue)},className:G("w-full flex items-center gap-2 p-2 rounded-md text-left transition-all text-xs",ue===t?"bg-primary text-primary-foreground":ue<t?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-accent/30"),children:[a.jsx(ak,{type:X.type,className:"h-3.5 w-3.5 flex-shrink-0"}),a.jsx("span",{className:"truncate",children:fI(X)})]},X.id))})})]}),a.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[a.jsx(at,{className:"flex-1",ref:b,children:a.jsx("div",{className:"max-w-3xl mx-auto py-8 px-6",children:L&&a.jsx(mI,{message:L,stepNumber:t+1})})}),a.jsxs("div",{className:"border-t border-border/50 bg-card/50 p-4 flex-shrink-0",children:[a.jsx("div",{className:"h-2 bg-muted rounded-full mb-4 cursor-pointer overflow-hidden",onClick:B,children:a.jsx("div",{className:"h-full bg-primary rounded-full transition-all duration-150",style:{width:`${ne}%`}})}),a.jsxs("div",{className:"flex items-center justify-center gap-2",children:[a.jsx(me,{variant:"ghost",size:"icon",onClick:D,disabled:t===0,children:a.jsx(q3,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:R,disabled:t===0,children:a.jsx(uR,{className:"h-4 w-4"})}),a.jsx(me,{variant:"default",size:"icon",onClick:k,className:"h-10 w-10",children:i?a.jsx(iR,{className:"h-5 w-5"}):a.jsx(Ro,{className:"h-5 w-5 ml-0.5"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:z,disabled:t>=T-1,children:a.jsx(dR,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:O,disabled:t>=T-1,children:a.jsx(V3,{className:"h-4 w-4"})}),a.jsx("div",{className:"h-6 w-px bg-border mx-2"}),a.jsx(me,{variant:"outline",size:"sm",onClick:q,className:"w-16 text-xs",children:rg[c].label})]}),a.jsxs("div",{className:"flex items-center justify-center gap-4 mt-3 text-[10px] text-muted-foreground",children:[a.jsxs("span",{children:[a.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded",children:"Space"})," Play/Pause"]}),a.jsxs("span",{children:[a.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded",children:"←"}),a.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded",children:"→"})," Step"]}),a.jsxs("span",{children:[a.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded",children:"Home"}),a.jsx("kbd",{className:"px-1 py-0.5 bg-muted rounded",children:"End"})," Jump"]})]})]})]}),m&&e&&a.jsx("div",{className:"w-80 border-l border-border/50 bg-muted/30 overflow-y-auto",children:a.jsx("div",{className:"p-4",children:a.jsx(nI,{sessionId:e})})})]})]})}function ak({type:e,className:t}){switch(e){case"user":return a.jsx(iS,{className:t});case"assistant":return a.jsx(cr,{className:t});case"tool-use":return a.jsx(Ii,{className:t});case"thinking":return a.jsx(Mr,{className:t});default:return a.jsx(rs,{className:t})}}function fI(e){switch(e.type){case"user":return e.content.slice(0,40)+(e.content.length>40?"...":"");case"assistant":return e.content.slice(0,40)+(e.content.length>40?"...":"");case"tool-use":return`Tool: ${e.metadata.toolName??"unknown"}`;case"thinking":return"Thinking...";default:return e.type}}function mI({message:e,stepNumber:t}){const[n,i]=y.useState(!0),c=(()=>{switch(e.type){case"user":return{container:"border-blue-500/30 bg-blue-500/5",icon:"bg-blue-500/15 text-blue-400",label:"User Message"};case"assistant":return{container:"border-emerald-500/30 bg-emerald-500/5",icon:"bg-emerald-500/15 text-emerald-400",label:"Assistant Response"};case"tool-use":return{container:"border-purple-500/30 bg-purple-500/5",icon:"bg-purple-500/15 text-purple-400",label:`Tool: ${e.metadata.toolName}`};case"thinking":return{container:"border-amber-500/30 bg-amber-500/5",icon:"bg-amber-500/15 text-amber-400",label:"Thinking"};default:return{container:"border-border/50 bg-card",icon:"bg-muted text-muted-foreground",label:e.type}}})();return a.jsxs("div",{className:G("rounded-lg border p-4 transition-all",c.container),children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:G("w-8 h-8 rounded-md flex items-center justify-center",c.icon),children:a.jsx(ak,{type:e.type,className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-medium",children:c.label}),a.jsxs(we,{variant:"outline",className:"text-[10px]",children:["Step ",t]})]}),a.jsx("span",{className:"text-[10px] text-muted-foreground",children:Nu(new Date(e.timestamp),{addSuffix:!0})})]})]}),e.metadata.tokens&&a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[a.jsx($t,{className:"h-3 w-3"}),a.jsxs("span",{children:[e.metadata.tokens.input+e.metadata.tokens.output," tokens"]})]})]}),e.type==="tool-use"&&e.metadata.toolInput&&a.jsxs("div",{className:"mb-3",children:[a.jsxs("button",{onClick:()=>i(!n),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:[n?a.jsx(To,{className:"h-3 w-3"}):a.jsx(Ki,{className:"h-3 w-3"}),"Tool Input"]}),n&&a.jsx("pre",{className:"mt-2 p-3 bg-background/50 rounded-md text-xs overflow-x-auto",children:JSON.stringify(e.metadata.toolInput,null,2)})]}),a.jsx("div",{className:"relative",children:a.jsx("div",{className:G("text-sm leading-relaxed whitespace-pre-wrap",e.type==="thinking"&&"italic text-muted-foreground"),children:e.content})}),e.metadata.model&&a.jsx("div",{className:"mt-3 pt-3 border-t border-border/30",children:a.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["Model: ",e.metadata.model]})})]})}function hI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const pI=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gI=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xI={};function dj(e,t){return(xI.jsx?gI:pI).test(e)}const yI=/[ \t\n\f\r]/g;function vI(e){return typeof e=="object"?e.type==="text"?fj(e.value):!1:fj(e)}function fj(e){return e.replace(yI,"")===""}class Su{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Su.prototype.normal={};Su.prototype.property={};Su.prototype.space=void 0;function sk(e,t){const n={},i={};for(const l of e)Object.assign(n,l.property),Object.assign(i,l.normal);return new Su(n,i,t)}function lx(e){return e.toLowerCase()}class Jn{constructor(t,n){this.attribute=n,this.property=t}}Jn.prototype.attribute="";Jn.prototype.booleanish=!1;Jn.prototype.boolean=!1;Jn.prototype.commaOrSpaceSeparated=!1;Jn.prototype.commaSeparated=!1;Jn.prototype.defined=!1;Jn.prototype.mustUseProperty=!1;Jn.prototype.number=!1;Jn.prototype.overloadedBoolean=!1;Jn.prototype.property="";Jn.prototype.spaceSeparated=!1;Jn.prototype.space=void 0;let bI=0;const $e=Ji(),qt=Ji(),ox=Ji(),ge=Ji(),yt=Ji(),to=Ji(),lr=Ji();function Ji(){return 2**++bI}const cx=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:qt,commaOrSpaceSeparated:lr,commaSeparated:to,number:ge,overloadedBoolean:ox,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),ag=Object.keys(cx);class Ry extends Jn{constructor(t,n,i,l){let c=-1;if(super(t,n),mj(this,"space",l),typeof i=="number")for(;++c<ag.length;){const u=ag[c];mj(this,ag[c],(i&cx[u])===cx[u])}}}Ry.prototype.defined=!0;function mj(e,t,n){n&&(e[t]=n)}function Lo(e){const t={},n={};for(const[i,l]of Object.entries(e.properties)){const c=new Ry(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(c.mustUseProperty=!0),t[i]=c,n[lx(i)]=i,n[lx(c.attribute)]=i}return new Su(t,n,e.space)}const ik=Lo({properties:{ariaActiveDescendant:null,ariaAtomic:qt,ariaAutoComplete:null,ariaBusy:qt,ariaChecked:qt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:qt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:qt,ariaFlowTo:yt,ariaGrabbed:qt,ariaHasPopup:null,ariaHidden:qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:ge,ariaLive:null,ariaModal:qt,ariaMultiLine:qt,ariaMultiSelectable:qt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:qt,ariaReadOnly:qt,ariaRelevant:null,ariaRequired:qt,ariaRoleDescription:yt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:qt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function lk(e,t){return t in e?e[t]:t}function ok(e,t){return lk(e,t.toLowerCase())}const wI=Lo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:to,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:yt,autoFocus:$e,autoPlay:$e,blocking:yt,capture:null,charSet:null,checked:$e,cite:null,className:yt,cols:ge,colSpan:null,content:null,contentEditable:qt,controls:$e,controlsList:yt,coords:ge|to,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:ox,draggable:qt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:yt,height:ge,hidden:ox,high:ge,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:yt,itemRef:yt,itemScope:$e,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:ge,pattern:null,ping:yt,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:yt,required:$e,reversed:$e,rows:ge,rowSpan:ge,sandbox:yt,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:qt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:qt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:ok}),jI=Lo({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:lr,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:yt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:to,g2:to,glyphName:to,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:lr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lr,rev:lr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lr,requiredFeatures:lr,requiredFonts:lr,requiredFormats:lr,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:lr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lr,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lk}),ck=Lo({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()}}),uk=Lo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ok}),dk=Lo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),NI={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"},SI=/[A-Z]/g,hj=/-[a-z]/g,CI=/^data[-\w.:]+$/i;function kI(e,t){const n=lx(t);let i=t,l=Jn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&CI.test(t)){if(t.charAt(4)==="-"){const c=t.slice(5).replace(hj,TI);i="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=t.slice(4);if(!hj.test(c)){let u=c.replace(SI,EI);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=Ry}return new l(i,t)}function EI(e){return"-"+e.toLowerCase()}function TI(e){return e.charAt(1).toUpperCase()}const AI=sk([ik,wI,ck,uk,dk],"html"),My=sk([ik,jI,ck,uk,dk],"svg");function RI(e){return e.join(" ").trim()}var Yl={},sg,pj;function MI(){if(pj)return sg;pj=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
605
|
+
`,m="/",g="*",p="",b="comment",w="declaration";function S(E,N){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];N=N||{};var T=1,k=1;function R(ie){var te=ie.match(t);te&&(T+=te.length);var I=ie.lastIndexOf(h);k=~I?ie.length-I:k+ie.length}function z(){var ie={line:T,column:k};return function(te){return te.position=new D(ie),q(),te}}function D(ie){this.start=ie,this.end={line:T,column:k},this.source=N.source}D.prototype.content=E;function O(ie){var te=new Error(N.source+":"+T+":"+k+": "+ie);if(te.reason=ie,te.filename=N.source,te.line=T,te.column=k,te.source=E,!N.silent)throw te}function B(ie){var te=ie.exec(E);if(te){var I=te[0];return R(I),E=E.slice(I.length),te}}function q(){B(n)}function L(ie){var te;for(ie=ie||[];te=ne();)te!==!1&&ie.push(te);return ie}function ne(){var ie=z();if(!(m!=E.charAt(0)||g!=E.charAt(1))){for(var te=2;p!=E.charAt(te)&&(g!=E.charAt(te)||m!=E.charAt(te+1));)++te;if(te+=2,p===E.charAt(te-1))return O("End of comment missing");var I=E.slice(2,te-2);return k+=2,R(I),E=E.slice(te),k+=2,ie({type:b,comment:I})}}function X(){var ie=z(),te=B(i);if(te){if(ne(),!B(l))return O("property missing ':'");var I=B(c),Q=ie({type:w,property:j(te[0].replace(e,p)),value:I?j(I[0].replace(e,p)):p});return B(u),Q}}function ue(){var ie=[];L(ie);for(var te;te=X();)te!==!1&&(ie.push(te),L(ie));return ie}return q(),ue()}function j(E){return E?E.replace(f,p):p}return sg=S,sg}var gj;function DI(){if(gj)return Yl;gj=1;var e=Yl&&Yl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.default=n;const t=e(MI());function n(i,l){let c=null;if(!i||typeof i!="string")return c;const u=(0,t.default)(i),f=typeof l=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:g}=h;f?l(m,g,h):g&&(c=c||{},c[m]=g)}),c}return Yl}var Ic={},xj;function OI(){if(xj)return Ic;xj=1,Object.defineProperty(Ic,"__esModule",{value:!0}),Ic.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,c=function(m){return!m||n.test(m)||e.test(m)},u=function(m,g){return g.toUpperCase()},f=function(m,g){return"".concat(g,"-")},h=function(m,g){return g===void 0&&(g={}),c(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,f):m=m.replace(i,f),m.replace(t,u))};return Ic.camelCase=h,Ic}var Uc,yj;function _I(){if(yj)return Uc;yj=1;var e=Uc&&Uc.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(DI()),n=OI();function i(l,c){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(f,h){f&&h&&(u[(0,n.camelCase)(f,c)]=h)}),u}return i.default=i,Uc=i,Uc}var PI=_I();const zI=If(PI),fk=mk("end"),Dy=mk("start");function mk(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function LI(e){const t=Dy(e),n=fk(e);if(t&&n)return{start:t,end:n}}function Qc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?vj(e.position):"start"in e||"end"in e?vj(e):"line"in e||"column"in e?ux(e):""}function ux(e){return bj(e&&e.line)+":"+bj(e&&e.column)}function vj(e){return ux(e&&e.start)+"-"+ux(e&&e.end)}function bj(e){return e&&typeof e=="number"?e:1}class Cn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let l="",c={},u=!1;if(n&&("line"in n&&"column"in n?c={place:n}:"start"in n&&"end"in n?c={place:n}:"type"in n?c={ancestors:[n],place:n.position}:c={...n}),typeof t=="string"?l=t:!c.cause&&t&&(u=!0,l=t.message,c.cause=t),!c.ruleId&&!c.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?c.ruleId=i:(c.source=i.slice(0,h),c.ruleId=i.slice(h+1))}if(!c.place&&c.ancestors&&c.ancestors){const h=c.ancestors[c.ancestors.length-1];h&&(c.place=h.position)}const f=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Qc(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=u&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Cn.prototype.file="";Cn.prototype.name="";Cn.prototype.reason="";Cn.prototype.message="";Cn.prototype.stack="";Cn.prototype.column=void 0;Cn.prototype.line=void 0;Cn.prototype.ancestors=void 0;Cn.prototype.cause=void 0;Cn.prototype.fatal=void 0;Cn.prototype.place=void 0;Cn.prototype.ruleId=void 0;Cn.prototype.source=void 0;const Oy={}.hasOwnProperty,II=new Map,UI=/[A-Z]/g,BI=new Set(["table","tbody","thead","tfoot","tr"]),FI=new Set(["td","th"]),hk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function HI(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=XI(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");i=QI(n,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?My:AI,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},c=pk(l,e,void 0);return c&&typeof c!="string"?c:l.create(e,l.Fragment,{children:c||void 0},void 0)}function pk(e,t,n){if(t.type==="element")return qI(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return VI(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return GI(e,t,n);if(t.type==="mdxjsEsm")return $I(e,t);if(t.type==="root")return YI(e,t,n);if(t.type==="text")return KI(e,t)}function qI(e,t,n){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=My,e.schema=l),e.ancestors.push(t);const c=xk(e,t.tagName,!1),u=WI(e,t);let f=Py(e,t);return BI.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!vI(h):!0})),gk(e,u,c,t),_y(u,f),e.ancestors.pop(),e.schema=i,e.create(t,c,u,n)}function VI(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}su(e,t.position)}function $I(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);su(e,t.position)}function GI(e,t,n){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=My,e.schema=l),e.ancestors.push(t);const c=t.name===null?e.Fragment:xk(e,t.name,!0),u=ZI(e,t),f=Py(e,t);return gk(e,u,c,t),_y(u,f),e.ancestors.pop(),e.schema=i,e.create(t,c,u,n)}function YI(e,t,n){const i={};return _y(i,Py(e,t)),e.create(t,e.Fragment,i,n)}function KI(e,t){return t.value}function gk(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function _y(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function QI(e,t,n){return i;function i(l,c,u,f){const m=Array.isArray(u.children)?n:t;return f?m(c,u,f):m(c,u)}}function XI(e,t){return n;function n(i,l,c,u){const f=Array.isArray(c.children),h=Dy(i);return t(l,c,u,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function WI(e,t){const n={};let i,l;for(l in t.properties)if(l!=="children"&&Oy.call(t.properties,l)){const c=JI(e,l,t.properties[l]);if(c){const[u,f]=c;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&FI.has(t.tagName)?i=f:n[u]=f}}if(i){const c=n.style||(n.style={});c[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function ZI(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const c=i.data.estree.body[0];c.type;const u=c.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else su(e,t.position);else{const l=i.name;let c;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,c=e.evaluater.evaluateExpression(f.expression)}else su(e,t.position);else c=i.value===null?!0:i.value;n[l]=c}return n}function Py(e,t){const n=[];let i=-1;const l=e.passKeys?new Map:II;for(;++i<t.children.length;){const c=t.children[i];let u;if(e.passKeys){const h=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(h){const m=l.get(h)||0;u=h+"-"+m,l.set(h,m+1)}}const f=pk(e,c,u);f!==void 0&&n.push(f)}return n}function JI(e,t,n){const i=kI(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?hI(n):RI(n)),i.property==="style"){let l=typeof n=="object"?n:e8(e,String(n));return e.stylePropertyNameCase==="css"&&(l=t8(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?NI[i.property]||i.property:i.attribute,n]}}function e8(e,t){try{return zI(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,l=new Cn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=hk+"#cannot-parse-style-attribute",l}}function xk(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let c=-1,u;for(;++c<l.length;){const f=dj(l[c])?{type:"Identifier",name:l[c]}:{type:"Literal",value:l[c]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(c&&f.type==="Literal"),optional:!1}:f}i=u}else i=dj(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return Oy.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);su(e)}function su(e,t){const n=new Cn("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=hk+"#cannot-handle-mdx-estrees-without-createevaluater",n}function t8(e){const t={};let n;for(n in e)Oy.call(e,n)&&(t[n8(n)]=e[n]);return t}function n8(e){let t=e.replace(UI,r8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function r8(e){return"-"+e.toLowerCase()}const ig={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"]},a8={};function zy(e,t){const n=a8,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yk(e,i,l)}function yk(e,t,n){if(s8(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 wj(e.children,t,n)}return Array.isArray(e)?wj(e,t,n):""}function wj(e,t,n){const i=[];let l=-1;for(;++l<e.length;)i[l]=yk(e[l],t,n);return i.join("")}function s8(e){return!!(e&&typeof e=="object")}const jj=document.createElement("i");function Ly(e){const t="&"+e+";";jj.innerHTML=t;const n=jj.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function dr(e,t,n,i){const l=e.length;let c=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,i.length<1e4)u=Array.from(i),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);c<i.length;)u=i.slice(c,c+1e4),u.unshift(t,0),e.splice(...u),c+=1e4,t+=1e4}function Rr(e,t){return e.length>0?(dr(e,e.length,0,t),e):t}const Nj={}.hasOwnProperty;function vk(e){const t={};let n=-1;for(;++n<e.length;)i8(t,e[n]);return t}function i8(e,t){let n;for(n in t){const l=(Nj.call(e,n)?e[n]:void 0)||(e[n]={}),c=t[n];let u;if(c)for(u in c){Nj.call(l,u)||(l[u]=[]);const f=c[u];l8(l[u],Array.isArray(f)?f:f?[f]:[])}}}function l8(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);dr(e,0,0,i)}function bk(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 Qr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=ei(/[A-Za-z]/),jn=ei(/[\dA-Za-z]/),o8=ei(/[#-'*+\--9=?A-Z^-~]/);function Of(e){return e!==null&&(e<32||e===127)}const dx=ei(/\d/),c8=ei(/[\dA-Fa-f]/),u8=ei(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function xt(e){return e!==null&&(e<0||e===32)}function We(e){return e===-2||e===-1||e===32}const fm=ei(new RegExp("\\p{P}|\\p{S}","u")),Vi=ei(/\s/);function ei(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Io(e){const t=[];let n=-1,i=0,l=0;for(;++n<e.length;){const c=e.charCodeAt(n);let u="";if(c===37&&jn(e.charCodeAt(n+1))&&jn(e.charCodeAt(n+2)))l=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(u=String.fromCharCode(c));else if(c>55295&&c<57344){const f=e.charCodeAt(n+1);c<56320&&f>56319&&f<57344?(u=String.fromCharCode(c,f),l=1):u="�"}else u=String.fromCharCode(c);u&&(t.push(e.slice(i,n),encodeURIComponent(u)),i=n+l+1,u=""),l&&(n+=l,l=0)}return t.join("")+e.slice(i)}function rt(e,t,n,i){const l=i?i-1:Number.POSITIVE_INFINITY;let c=0;return u;function u(h){return We(h)?(e.enter(n),f(h)):t(h)}function f(h){return We(h)&&c++<l?(e.consume(h),f):(e.exit(n),t(h))}}const d8={tokenize:f8};function f8(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let n;return t;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),rt(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),c(f)}function c(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return De(f)?(e.consume(f),e.exit("chunkText"),c):(e.consume(f),u)}}const m8={tokenize:h8},Sj={tokenize:p8};function h8(e){const t=this,n=[];let i=0,l,c,u;return f;function f(k){if(i<n.length){const R=n[i];return t.containerState=R[1],e.attempt(R[0].continuation,h,m)(k)}return m(k)}function h(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&T();const R=t.events.length;let z=R,D;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){D=t.events[z][1].end;break}N(i);let O=R;for(;O<t.events.length;)t.events[O][1].end={...D},O++;return dr(t.events,z+1,0,t.events.slice(R)),t.events.length=O,m(k)}return f(k)}function m(k){if(i===n.length){if(!l)return b(k);if(l.currentConstruct&&l.currentConstruct.concrete)return S(k);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sj,g,p)(k)}function g(k){return l&&T(),N(i),b(k)}function p(k){return t.parser.lazy[t.now().line]=i!==n.length,u=t.now().offset,S(k)}function b(k){return t.containerState={},e.attempt(Sj,w,S)(k)}function w(k){return i++,n.push([t.currentConstruct,t.containerState]),b(k)}function S(k){if(k===null){l&&T(),N(0),e.consume(k);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:c}),j(k)}function j(k){if(k===null){E(e.exit("chunkFlow"),!0),N(0),e.consume(k);return}return De(k)?(e.consume(k),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,f):(e.consume(k),j)}function E(k,R){const z=t.sliceStream(k);if(R&&z.push(null),k.previous=c,c&&(c.next=k),c=k,l.defineSkip(k.start),l.write(z),t.parser.lazy[k.start.line]){let D=l.events.length;for(;D--;)if(l.events[D][1].start.offset<u&&(!l.events[D][1].end||l.events[D][1].end.offset>u))return;const O=t.events.length;let B=O,q,L;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(q){L=t.events[B][1].end;break}q=!0}for(N(i),D=O;D<t.events.length;)t.events[D][1].end={...L},D++;dr(t.events,B+1,0,t.events.slice(O)),t.events.length=D}}function N(k){let R=n.length;for(;R-- >k;){const z=n[R];t.containerState=z[1],z[0].exit.call(t,e)}n.length=k}function T(){l.write([null]),c=void 0,l=void 0,t.containerState._closeFlow=void 0}}function p8(e,t,n){return rt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function No(e){if(e===null||xt(e)||Vi(e))return 1;if(fm(e))return 2}function mm(e,t,n){const i=[];let l=-1;for(;++l<e.length;){const c=e[l].resolveAll;c&&!i.includes(c)&&(t=c(t,n),i.push(c))}return t}const fx={name:"attention",resolveAll:g8,tokenize:x8};function g8(e,t){let n=-1,i,l,c,u,f,h,m,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},b={...e[n][1].start};Cj(p,-h),Cj(b,h),u={type:h>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},c={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},l={type:h>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[i][1].end={...u.start},e[n][1].start={...f.end},m=[],e[i][1].end.offset-e[i][1].start.offset&&(m=Rr(m,[["enter",e[i][1],t],["exit",e[i][1],t]])),m=Rr(m,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",c,t]]),m=Rr(m,mm(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),m=Rr(m,[["exit",c,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,m=Rr(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,dr(e,i-1,n-i+3,m),n=i+m.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function x8(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,l=No(i);let c;return u;function u(h){return c=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===c)return e.consume(h),f;const m=e.exit("attentionSequence"),g=No(h),p=!g||g===2&&l||n.includes(h),b=!l||l===2&&g||n.includes(i);return m._open=!!(c===42?p:p&&(l||!b)),m._close=!!(c===42?b:b&&(g||!p)),t(h)}}function Cj(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const y8={name:"autolink",tokenize:v8};function v8(e,t,n){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(w){return Mn(w)?(e.consume(w),u):w===64?n(w):m(w)}function u(w){return w===43||w===45||w===46||jn(w)?(i=1,f(w)):m(w)}function f(w){return w===58?(e.consume(w),i=0,h):(w===43||w===45||w===46||jn(w))&&i++<32?(e.consume(w),f):(i=0,m(w))}function h(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||Of(w)?n(w):(e.consume(w),h)}function m(w){return w===64?(e.consume(w),g):o8(w)?(e.consume(w),m):n(w)}function g(w){return jn(w)?p(w):n(w)}function p(w){return w===46?(e.consume(w),i=0,g):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):b(w)}function b(w){if((w===45||jn(w))&&i++<63){const S=w===45?b:p;return e.consume(w),S}return n(w)}}const Cu={partial:!0,tokenize:b8};function b8(e,t,n){return i;function i(c){return We(c)?rt(e,l,"linePrefix")(c):l(c)}function l(c){return c===null||De(c)?t(c):n(c)}}const wk={continuation:{tokenize:j8},exit:N8,name:"blockQuote",tokenize:w8};function w8(e,t,n){const i=this;return l;function l(u){if(u===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),c}return n(u)}function c(u){return We(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function j8(e,t,n){const i=this;return l;function l(u){return We(u)?rt(e,c,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):c(u)}function c(u){return e.attempt(wk,t,n)(u)}}function N8(e){e.exit("blockQuote")}const jk={name:"characterEscape",tokenize:S8};function S8(e,t,n){return i;function i(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),l}function l(c){return u8(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(c)}}const Nk={name:"characterReference",tokenize:C8};function C8(e,t,n){const i=this;let l=0,c,u;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),h}function h(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),c=31,u=jn,g(p))}function m(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,u=c8,g):(e.enter("characterReferenceValue"),c=7,u=dx,g(p))}function g(p){if(p===59&&l){const b=e.exit("characterReferenceValue");return u===jn&&!Ly(i.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(p)&&l++<c?(e.consume(p),g):n(p)}}const kj={partial:!0,tokenize:E8},Ej={concrete:!0,name:"codeFenced",tokenize:k8};function k8(e,t,n){const i=this,l={partial:!0,tokenize:z};let c=0,u=0,f;return h;function h(D){return m(D)}function m(D){const O=i.events[i.events.length-1];return c=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===f?(u++,e.consume(D),g):u<3?n(D):(e.exit("codeFencedFenceSequence"),We(D)?rt(e,p,"whitespace")(D):p(D))}function p(D){return D===null||De(D)?(e.exit("codeFencedFence"),i.interrupt?t(D):e.check(kj,j,R)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||De(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):We(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,w,"whitespace")(D)):D===96&&D===f?n(D):(e.consume(D),b)}function w(D){return D===null||De(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||De(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===f?n(D):(e.consume(D),S)}function j(D){return e.attempt(l,R,E)(D)}function E(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),N}function N(D){return c>0&&We(D)?rt(e,T,"linePrefix",c+1)(D):T(D)}function T(D){return D===null||De(D)?e.check(kj,j,R)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||De(D)?(e.exit("codeFlowValue"),T(D)):(e.consume(D),k)}function R(D){return e.exit("codeFenced"),t(D)}function z(D,O,B){let q=0;return L;function L(te){return D.enter("lineEnding"),D.consume(te),D.exit("lineEnding"),ne}function ne(te){return D.enter("codeFencedFence"),We(te)?rt(D,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):X(te)}function X(te){return te===f?(D.enter("codeFencedFenceSequence"),ue(te)):B(te)}function ue(te){return te===f?(q++,D.consume(te),ue):q>=u?(D.exit("codeFencedFenceSequence"),We(te)?rt(D,ie,"whitespace")(te):ie(te)):B(te)}function ie(te){return te===null||De(te)?(D.exit("codeFencedFence"),O(te)):B(te)}}}function E8(e,t,n){const i=this;return l;function l(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c)}function c(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}const lg={name:"codeIndented",tokenize:A8},T8={partial:!0,tokenize:R8};function A8(e,t,n){const i=this;return l;function l(m){return e.enter("codeIndented"),rt(e,c,"linePrefix",5)(m)}function c(m){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(m):n(m)}function u(m){return m===null?h(m):De(m)?e.attempt(T8,u,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||De(m)?(e.exit("codeFlowValue"),u(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function R8(e,t,n){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?n(u):De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):rt(e,c,"linePrefix",5)(u)}function c(u){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):De(u)?l(u):n(u)}}const M8={name:"codeText",previous:O8,resolve:D8,tokenize:_8};function D8(e){let t=e.length-4,n=3,i,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function O8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _8(e,t,n){let i=0,l,c;return u;function u(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),i++,f):(e.exit("codeTextSequence"),h(p))}function h(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),h):p===96?(c=e.enter("codeTextSequence"),l=0,g(p)):De(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(p))}function m(p){return p===null||p===32||p===96||De(p)?(e.exit("codeTextData"),h(p)):(e.consume(p),m)}function g(p){return p===96?(e.consume(p),l++,g):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(c.type="codeTextData",m(p))}}class P8{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const l=n||0;this.setCursor(Math.trunc(t));const c=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&Bc(this.left,i),c.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),Bc(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bc(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);Bc(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bc(this.left,n.reverse())}}}function Bc(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 Sk(e){const t={};let n=-1,i,l,c,u,f,h,m;const g=new P8(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(i=g.get(n),n&&i[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,c=0,c<h.length&&h[c][1].type==="lineEndingBlank"&&(c+=2),c<h.length&&h[c][1].type==="content"))for(;++c<h.length&&h[c][1].type!=="content";)h[c][1].type==="chunkText"&&(h[c][1]._isInFirstContentOfListItem=!0,c++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,z8(g,n)),n=t[n],m=!0);else if(i[1]._container){for(c=n,l=void 0;c--;)if(u=g.get(c),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=c);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...g.get(l)[1].start},f=g.slice(l,n),f.unshift(i),g.splice(l,n-l+1,f))}}return dr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function z8(e,t){const n=e.get(t)[1],i=e.get(t)[2];let l=t-1;const c=[];let u=n._tokenizer;u||(u=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,h=[],m={};let g,p,b=-1,w=n,S=0,j=0;const E=[j];for(;w;){for(;e.get(++l)[1]!==w;);c.push(l),w._tokenizer||(g=i.sliceStream(w),w.next||g.push(null),p&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=n;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(j=b+1,E.push(j),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):E.pop(),b=E.length;b--;){const N=f.slice(E[b],E[b+1]),T=c.pop();h.push([T,T+N.length-1]),e.splice(T,2,N)}for(h.reverse(),b=-1;++b<h.length;)m[S+h[b][0]]=S+h[b][1],S+=h[b][1]-h[b][0]-1;return m}const L8={resolve:U8,tokenize:B8},I8={partial:!0,tokenize:F8};function U8(e){return Sk(e),e}function B8(e,t){let n;return i;function i(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?c(f):De(f)?e.check(I8,u,c)(f):(e.consume(f),l)}function c(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function F8(e,t,n){const i=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(e,c,"linePrefix")}function c(u){if(u===null||De(u))return n(u);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(i.parser.constructs.flow,n,t)(u)}}function Ck(e,t,n,i,l,c,u,f,h){const m=h||Number.POSITIVE_INFINITY;let g=0;return p;function p(N){return N===60?(e.enter(i),e.enter(l),e.enter(c),e.consume(N),e.exit(c),b):N===null||N===32||N===41||Of(N)?n(N):(e.enter(i),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),j(N))}function b(N){return N===62?(e.enter(c),e.consume(N),e.exit(c),e.exit(l),e.exit(i),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===62?(e.exit("chunkString"),e.exit(f),b(N)):N===null||N===60||De(N)?n(N):(e.consume(N),N===92?S:w)}function S(N){return N===60||N===62||N===92?(e.consume(N),w):w(N)}function j(N){return!g&&(N===null||N===41||xt(N))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(i),t(N)):g<m&&N===40?(e.consume(N),g++,j):N===41?(e.consume(N),g--,j):N===null||N===32||N===40||Of(N)?n(N):(e.consume(N),N===92?E:j)}function E(N){return N===40||N===41||N===92?(e.consume(N),j):j(N)}}function kk(e,t,n,i,l,c){const u=this;let f=0,h;return m;function m(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(c),g}function g(w){return f>999||w===null||w===91||w===93&&!h||w===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(w):w===93?(e.exit(c),e.enter(l),e.consume(w),e.exit(l),e.exit(i),t):De(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||De(w)||f++>999?(e.exit("chunkString"),g(w)):(e.consume(w),h||(h=!We(w)),w===92?b:p)}function b(w){return w===91||w===92||w===93?(e.consume(w),f++,p):p(w)}}function Ek(e,t,n,i,l,c){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(i),e.enter(l),e.consume(b),e.exit(l),u=b===40?41:b,h):n(b)}function h(b){return b===u?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),t):(e.enter(c),m(b))}function m(b){return b===u?(e.exit(c),h(u)):b===null?n(b):De(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),rt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===u||b===null||De(b)?(e.exit("chunkString"),m(b)):(e.consume(b),b===92?p:g)}function p(b){return b===u||b===92?(e.consume(b),g):g(b)}}function Xc(e,t){let n;return i;function i(l){return De(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,i):We(l)?rt(e,i,n?"linePrefix":"lineSuffix")(l):t(l)}}const H8={name:"definition",tokenize:V8},q8={partial:!0,tokenize:$8};function V8(e,t,n){const i=this;let l;return c;function c(w){return e.enter("definition"),u(w)}function u(w){return kk.call(i,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function f(w){return l=Qr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),h):n(w)}function h(w){return xt(w)?Xc(e,m)(w):m(w)}function m(w){return Ck(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function g(w){return e.attempt(q8,p,p)(w)}function p(w){return We(w)?rt(e,b,"whitespace")(w):b(w)}function b(w){return w===null||De(w)?(e.exit("definition"),i.parser.defined.push(l),t(w)):n(w)}}function $8(e,t,n){return i;function i(f){return xt(f)?Xc(e,l)(f):n(f)}function l(f){return Ek(e,c,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function c(f){return We(f)?rt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||De(f)?t(f):n(f)}}const G8={name:"hardBreakEscape",tokenize:Y8};function Y8(e,t,n){return i;function i(c){return e.enter("hardBreakEscape"),e.consume(c),l}function l(c){return De(c)?(e.exit("hardBreakEscape"),t(c)):n(c)}}const K8={name:"headingAtx",resolve:Q8,tokenize:X8};function Q8(e,t){let n=e.length-2,i=3,l,c;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},c={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},dr(e,i,n-i+1,[["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t]])),e}function X8(e,t,n){let i=0;return l;function l(g){return e.enter("atxHeading"),c(g)}function c(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&i++<6?(e.consume(g),u):g===null||xt(g)?(e.exit("atxHeadingSequence"),f(g)):n(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),h(g)):g===null||De(g)?(e.exit("atxHeading"),t(g)):We(g)?rt(e,f,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function h(g){return g===35?(e.consume(g),h):(e.exit("atxHeadingSequence"),f(g))}function m(g){return g===null||g===35||xt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),m)}}const W8=["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"],Tj=["pre","script","style","textarea"],Z8={concrete:!0,name:"htmlFlow",resolveTo:t9,tokenize:n9},J8={partial:!0,tokenize:a9},e9={partial:!0,tokenize:r9};function t9(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 n9(e,t,n){const i=this;let l,c,u,f,h;return m;function m(A){return g(A)}function g(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),p}function p(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),c=!0,j):A===63?(e.consume(A),l=3,i.interrupt?t:_):Mn(A)?(e.consume(A),u=String.fromCharCode(A),E):n(A)}function b(A){return A===45?(e.consume(A),l=2,w):A===91?(e.consume(A),l=5,f=0,S):Mn(A)?(e.consume(A),l=4,i.interrupt?t:_):n(A)}function w(A){return A===45?(e.consume(A),i.interrupt?t:_):n(A)}function S(A){const J="CDATA[";return A===J.charCodeAt(f++)?(e.consume(A),f===J.length?i.interrupt?t:X:S):n(A)}function j(A){return Mn(A)?(e.consume(A),u=String.fromCharCode(A),E):n(A)}function E(A){if(A===null||A===47||A===62||xt(A)){const J=A===47,ae=u.toLowerCase();return!J&&!c&&Tj.includes(ae)?(l=1,i.interrupt?t(A):X(A)):W8.includes(u.toLowerCase())?(l=6,J?(e.consume(A),N):i.interrupt?t(A):X(A)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(A):c?T(A):k(A))}return A===45||jn(A)?(e.consume(A),u+=String.fromCharCode(A),E):n(A)}function N(A){return A===62?(e.consume(A),i.interrupt?t:X):n(A)}function T(A){return We(A)?(e.consume(A),T):L(A)}function k(A){return A===47?(e.consume(A),L):A===58||A===95||Mn(A)?(e.consume(A),R):We(A)?(e.consume(A),k):L(A)}function R(A){return A===45||A===46||A===58||A===95||jn(A)?(e.consume(A),R):z(A)}function z(A){return A===61?(e.consume(A),D):We(A)?(e.consume(A),z):k(A)}function D(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),h=A,O):We(A)?(e.consume(A),D):B(A)}function O(A){return A===h?(e.consume(A),h=null,q):A===null||De(A)?n(A):(e.consume(A),O)}function B(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||xt(A)?z(A):(e.consume(A),B)}function q(A){return A===47||A===62||We(A)?k(A):n(A)}function L(A){return A===62?(e.consume(A),ne):n(A)}function ne(A){return A===null||De(A)?X(A):We(A)?(e.consume(A),ne):n(A)}function X(A){return A===45&&l===2?(e.consume(A),I):A===60&&l===1?(e.consume(A),Q):A===62&&l===4?(e.consume(A),U):A===63&&l===3?(e.consume(A),_):A===93&&l===5?(e.consume(A),$):De(A)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(J8,P,ue)(A)):A===null||De(A)?(e.exit("htmlFlowData"),ue(A)):(e.consume(A),X)}function ue(A){return e.check(e9,ie,P)(A)}function ie(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),te}function te(A){return A===null||De(A)?ue(A):(e.enter("htmlFlowData"),X(A))}function I(A){return A===45?(e.consume(A),_):X(A)}function Q(A){return A===47?(e.consume(A),u="",Y):X(A)}function Y(A){if(A===62){const J=u.toLowerCase();return Tj.includes(J)?(e.consume(A),U):X(A)}return Mn(A)&&u.length<8?(e.consume(A),u+=String.fromCharCode(A),Y):X(A)}function $(A){return A===93?(e.consume(A),_):X(A)}function _(A){return A===62?(e.consume(A),U):A===45&&l===2?(e.consume(A),_):X(A)}function U(A){return A===null||De(A)?(e.exit("htmlFlowData"),P(A)):(e.consume(A),U)}function P(A){return e.exit("htmlFlow"),t(A)}}function r9(e,t,n){const i=this;return l;function l(u){return De(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):n(u)}function c(u){return i.parser.lazy[i.now().line]?n(u):t(u)}}function a9(e,t,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Cu,t,n)}}const s9={name:"htmlText",tokenize:i9};function i9(e,t,n){const i=this;let l,c,u;return f;function f(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),h}function h(_){return _===33?(e.consume(_),m):_===47?(e.consume(_),z):_===63?(e.consume(_),k):Mn(_)?(e.consume(_),B):n(_)}function m(_){return _===45?(e.consume(_),g):_===91?(e.consume(_),c=0,S):Mn(_)?(e.consume(_),T):n(_)}function g(_){return _===45?(e.consume(_),w):n(_)}function p(_){return _===null?n(_):_===45?(e.consume(_),b):De(_)?(u=p,Q(_)):(e.consume(_),p)}function b(_){return _===45?(e.consume(_),w):p(_)}function w(_){return _===62?I(_):_===45?b(_):p(_)}function S(_){const U="CDATA[";return _===U.charCodeAt(c++)?(e.consume(_),c===U.length?j:S):n(_)}function j(_){return _===null?n(_):_===93?(e.consume(_),E):De(_)?(u=j,Q(_)):(e.consume(_),j)}function E(_){return _===93?(e.consume(_),N):j(_)}function N(_){return _===62?I(_):_===93?(e.consume(_),N):j(_)}function T(_){return _===null||_===62?I(_):De(_)?(u=T,Q(_)):(e.consume(_),T)}function k(_){return _===null?n(_):_===63?(e.consume(_),R):De(_)?(u=k,Q(_)):(e.consume(_),k)}function R(_){return _===62?I(_):k(_)}function z(_){return Mn(_)?(e.consume(_),D):n(_)}function D(_){return _===45||jn(_)?(e.consume(_),D):O(_)}function O(_){return De(_)?(u=O,Q(_)):We(_)?(e.consume(_),O):I(_)}function B(_){return _===45||jn(_)?(e.consume(_),B):_===47||_===62||xt(_)?q(_):n(_)}function q(_){return _===47?(e.consume(_),I):_===58||_===95||Mn(_)?(e.consume(_),L):De(_)?(u=q,Q(_)):We(_)?(e.consume(_),q):I(_)}function L(_){return _===45||_===46||_===58||_===95||jn(_)?(e.consume(_),L):ne(_)}function ne(_){return _===61?(e.consume(_),X):De(_)?(u=ne,Q(_)):We(_)?(e.consume(_),ne):q(_)}function X(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),l=_,ue):De(_)?(u=X,Q(_)):We(_)?(e.consume(_),X):(e.consume(_),ie)}function ue(_){return _===l?(e.consume(_),l=void 0,te):_===null?n(_):De(_)?(u=ue,Q(_)):(e.consume(_),ue)}function ie(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||xt(_)?q(_):(e.consume(_),ie)}function te(_){return _===47||_===62||xt(_)?q(_):n(_)}function I(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function Q(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Y}function Y(_){return We(_)?rt(e,$,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):$(_)}function $(_){return e.enter("htmlTextData"),u(_)}}const Iy={name:"labelEnd",resolveAll:u9,resolveTo:d9,tokenize:f9},l9={tokenize:m9},o9={tokenize:h9},c9={tokenize:p9};function u9(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==n.length&&dr(e,0,e.length,n),e}function d9(e,t){let n=e.length,i=0,l,c,u,f;for(;n--;)if(l=e[n][1],c){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(c=n,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=n);const h={type:e[c][1].type==="labelLink"?"link":"image",start:{...e[c][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[c][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[c+i+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=Rr(f,e.slice(c+1,c+i+3)),f=Rr(f,[["enter",g,t]]),f=Rr(f,mm(t.parser.constructs.insideSpan.null,e.slice(c+i+4,u-3),t)),f=Rr(f,[["exit",g,t],e[u-2],e[u-1],["exit",m,t]]),f=Rr(f,e.slice(u+1)),f=Rr(f,[["exit",h,t]]),dr(e,c,e.length,f),e}function f9(e,t,n){const i=this;let l=i.events.length,c,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){c=i.events[l][1];break}return f;function f(b){return c?c._inactive?p(b):(u=i.parser.defined.includes(Qr(i.sliceSerialize({start:c.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),h):n(b)}function h(b){return b===40?e.attempt(l9,g,u?g:p)(b):b===91?e.attempt(o9,g,u?m:p)(b):u?g(b):p(b)}function m(b){return e.attempt(c9,g,p)(b)}function g(b){return t(b)}function p(b){return c._balanced=!0,n(b)}}function m9(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),l}function l(p){return xt(p)?Xc(e,c)(p):c(p)}function c(p){return p===41?g(p):Ck(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function u(p){return xt(p)?Xc(e,h)(p):g(p)}function f(p){return n(p)}function h(p){return p===34||p===39||p===40?Ek(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function m(p){return xt(p)?Xc(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function h9(e,t,n){const i=this;return l;function l(f){return kk.call(i,e,c,u,"reference","referenceMarker","referenceString")(f)}function c(f){return i.parser.defined.includes(Qr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function u(f){return n(f)}}function p9(e,t,n){return i;function i(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),l}function l(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),t):n(c)}}const g9={name:"labelStartImage",resolveAll:Iy.resolveAll,tokenize:x9};function x9(e,t,n){const i=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),c}function c(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):n(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(f):t(f)}}const y9={name:"labelStartLink",resolveAll:Iy.resolveAll,tokenize:v9};function v9(e,t,n){const i=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),c}function c(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):t(u)}}const og={name:"lineEnding",tokenize:b9};function b9(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const yf={name:"thematicBreak",tokenize:w9};function w9(e,t,n){let i=0,l;return c;function c(m){return e.enter("thematicBreak"),u(m)}function u(m){return l=m,f(m)}function f(m){return m===l?(e.enter("thematicBreakSequence"),h(m)):i>=3&&(m===null||De(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===l?(e.consume(m),i++,h):(e.exit("thematicBreakSequence"),We(m)?rt(e,f,"whitespace")(m):f(m))}}const Vn={continuation:{tokenize:C9},exit:E9,name:"list",tokenize:S9},j9={partial:!0,tokenize:T9},N9={partial:!0,tokenize:k9};function S9(e,t,n){const i=this,l=i.events[i.events.length-1];let c=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return f;function f(w){const S=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:dx(w)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(yf,n,m)(w):m(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(w)}return n(w)}function h(w){return dx(w)&&++u<10?(e.consume(w),h):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),m(w)):n(w)}function m(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(Cu,i.interrupt?n:g,e.attempt(j9,b,p))}function g(w){return i.containerState.initialBlankLine=!0,c++,b(w)}function p(w){return We(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),b):n(w)}function b(w){return i.containerState.size=c+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function C9(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Cu,l,c);function l(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,rt(e,t,"listItemIndent",i.containerState.size+1)(f)}function c(f){return i.containerState.furtherBlankLines||!We(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(N9,t,u)(f))}function u(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,rt(e,e.attempt(Vn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function k9(e,t,n){const i=this;return rt(e,l,"listItemIndent",i.containerState.size+1);function l(c){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(c):n(c)}}function E9(e){e.exit(this.containerState.type)}function T9(e,t,n){const i=this;return rt(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(c){const u=i.events[i.events.length-1];return!We(c)&&u&&u[1].type==="listItemPrefixWhitespace"?t(c):n(c)}}const Aj={name:"setextUnderline",resolveTo:A9,tokenize:R9};function A9(e,t){let n=e.length,i,l,c;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!c&&e[n][1].type==="definition"&&(c=n);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",c?(e.splice(l,0,["enter",u,t]),e.splice(c+1,0,["exit",e[i][1],t]),e[i][1].end={...e[c][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function R9(e,t,n){const i=this;let l;return c;function c(m){let g=i.events.length,p;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){p=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),l=m,u(m)):n(m)}function u(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===l?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),We(m)?rt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||De(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const M9={tokenize:D9};function D9(e){const t=this,n=e.attempt(Cu,i,e.attempt(this.parser.constructs.flowInitial,l,rt(e,e.attempt(this.parser.constructs.flow,l,e.attempt(L8,l)),"linePrefix")));return n;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const O9={resolveAll:Ak()},_9=Tk("string"),P9=Tk("text");function Tk(e){return{resolveAll:Ak(e==="text"?z9:void 0),tokenize:t};function t(n){const i=this,l=this.parser.constructs[e],c=n.attempt(l,u,f);return u;function u(g){return m(g)?c(g):f(g)}function f(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),h}function h(g){return m(g)?(n.exit("data"),c(g)):(n.consume(g),h)}function m(g){if(g===null)return!0;const p=l[g];let b=-1;if(p)for(;++b<p.length;){const w=p[b];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function Ak(e){return t;function t(n,i){let l=-1,c;for(;++l<=n.length;)c===void 0?n[l]&&n[l][1].type==="data"&&(c=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==c+2&&(n[c][1].end=n[l-1][1].end,n.splice(c+2,l-c-2),l=c+2),c=void 0);return e?e(n,i):n}}function z9(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 i=e[n-1][1],l=t.sliceStream(i);let c=l.length,u=-1,f=0,h;for(;c--;){const m=l[c];if(typeof m=="string"){for(u=m.length;m.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(m===-2)h=!0,f++;else if(m!==-1){c++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?u:i.start._bufferIndex+u,_index:i.start._index+c,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...m.start},i.start.offset===i.end.offset?Object.assign(i,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const L9={42:Vn,43:Vn,45:Vn,48:Vn,49:Vn,50:Vn,51:Vn,52:Vn,53:Vn,54:Vn,55:Vn,56:Vn,57:Vn,62:wk},I9={91:H8},U9={[-2]:lg,[-1]:lg,32:lg},B9={35:K8,42:yf,45:[Aj,yf],60:Z8,61:Aj,95:yf,96:Ej,126:Ej},F9={38:Nk,92:jk},H9={[-5]:og,[-4]:og,[-3]:og,33:g9,38:Nk,42:fx,60:[y8,s9],91:y9,92:[G8,jk],93:Iy,95:fx,96:M8},q9={null:[fx,O9]},V9={null:[42,95]},$9={null:[]},G9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:V9,contentInitial:I9,disable:$9,document:L9,flow:B9,flowInitial:U9,insideSpan:q9,string:F9,text:H9},Symbol.toStringTag,{value:"Module"}));function Y9(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},c=[];let u=[],f=[];const h={attempt:O(z),check:O(D),consume:T,enter:k,exit:R,interrupt:O(D,{interrupt:!0})},m={code:null,containerState:{},defineSkip:j,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:w,write:p};let g=t.tokenize.call(m,h);return t.resolveAll&&c.push(t),m;function p(ne){return u=Rr(u,ne),E(),u[u.length-1]!==null?[]:(B(t,0),m.events=mm(c,m.events,m),m.events)}function b(ne,X){return Q9(w(ne),X)}function w(ne){return K9(u,ne)}function S(){const{_bufferIndex:ne,_index:X,line:ue,column:ie,offset:te}=i;return{_bufferIndex:ne,_index:X,line:ue,column:ie,offset:te}}function j(ne){l[ne.line]=ne.column,L()}function E(){let ne;for(;i._index<u.length;){const X=u[i._index];if(typeof X=="string")for(ne=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ne&&i._bufferIndex<X.length;)N(X.charCodeAt(i._bufferIndex));else N(X)}}function N(ne){g=g(ne)}function T(ne){De(ne)?(i.line++,i.column=1,i.offset+=ne===-3?2:1,L()):ne!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),m.previous=ne}function k(ne,X){const ue=X||{};return ue.type=ne,ue.start=S(),m.events.push(["enter",ue,m]),f.push(ue),ue}function R(ne){const X=f.pop();return X.end=S(),m.events.push(["exit",X,m]),X}function z(ne,X){B(ne,X.from)}function D(ne,X){X.restore()}function O(ne,X){return ue;function ue(ie,te,I){let Q,Y,$,_;return Array.isArray(ie)?P(ie):"tokenize"in ie?P([ie]):U(ie);function U(fe){return se;function se(pe){const ve=pe!==null&&fe[pe],Ae=pe!==null&&fe.null,ze=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return P(ze)(pe)}}function P(fe){return Q=fe,Y=0,fe.length===0?I:A(fe[Y])}function A(fe){return se;function se(pe){return _=q(),$=fe,fe.partial||(m.currentConstruct=fe),fe.name&&m.parser.constructs.disable.null.includes(fe.name)?ae():fe.tokenize.call(X?Object.assign(Object.create(m),X):m,h,J,ae)(pe)}}function J(fe){return ne($,_),te}function ae(fe){return _.restore(),++Y<Q.length?A(Q[Y]):I}}}function B(ne,X){ne.resolveAll&&!c.includes(ne)&&c.push(ne),ne.resolve&&dr(m.events,X,m.events.length-X,ne.resolve(m.events.slice(X),m)),ne.resolveTo&&(m.events=ne.resolveTo(m.events,m))}function q(){const ne=S(),X=m.previous,ue=m.currentConstruct,ie=m.events.length,te=Array.from(f);return{from:ie,restore:I};function I(){i=ne,m.previous=X,m.currentConstruct=ue,m.events.length=ie,f=te,L()}}function L(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function K9(e,t){const n=t.start._index,i=t.start._bufferIndex,l=t.end._index,c=t.end._bufferIndex;let u;if(n===l)u=[e[n].slice(i,c)];else{if(u=e.slice(n,l),i>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(i):u.shift()}c>0&&u.push(e[l].slice(0,c))}return u}function Q9(e,t){let n=-1;const i=[];let l;for(;++n<e.length;){const c=e[n];let u;if(typeof c=="string")u=c;else switch(c){case-5:{u="\r";break}case-4:{u=`
|
|
606
|
+
`;break}case-3:{u=`\r
|
|
607
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(c)}l=c===-2,i.push(u)}return i.join("")}function X9(e){const i={constructs:vk([G9,...(e||{}).extensions||[]]),content:l(d8),defined:[],document:l(m8),flow:l(M9),lazy:{},string:l(_9),text:l(P9)};return i;function l(c){return u;function u(f){return Y9(i,c,f)}}}function W9(e){for(;!Sk(e););return e}const Rj=/[\0\t\n\r]/g;function Z9(){let e=1,t="",n=!0,i;return l;function l(c,u,f){const h=[];let m,g,p,b,w;for(c=t+(typeof c=="string"?c.toString():new TextDecoder(u||void 0).decode(c)),p=0,t="",n&&(c.charCodeAt(0)===65279&&p++,n=void 0);p<c.length;){if(Rj.lastIndex=p,m=Rj.exec(c),b=m&&m.index!==void 0?m.index:c.length,w=c.charCodeAt(b),!m){t=c.slice(p);break}if(w===10&&p===b&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),p<b&&(h.push(c.slice(p,b)),e+=b-p),w){case 0:{h.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,h.push(-2);e++<g;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}p=b+1}return f&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const J9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function e7(e){return e.replace(J9,t7)}function t7(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),c=l===120||l===88;return bk(n.slice(c?2:1),c?16:10)}return Ly(n)||e}const Rk={}.hasOwnProperty;function n7(e,t,n){return typeof t!="string"&&(n=t,t=void 0),r7(n)(W9(X9(n).document().write(Z9()(e,t,!0))))}function r7(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(Ot),autolinkProtocol:q,autolinkEmail:q,atxHeading:c(On),blockQuote:c(Ae),characterEscape:q,characterReference:q,codeFenced:c(ze),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:c(ze,u),codeText:c(Le,u),codeTextData:q,data:q,codeFlowValue:q,definition:c(It),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:c(wt),hardBreakEscape:c(kn),hardBreakTrailing:c(kn),htmlFlow:c(pn,u),htmlFlowData:q,htmlText:c(pn,u),htmlTextData:q,image:c(ka),label:u,link:c(Ot),listItem:c(ri),listItemValue:b,listOrdered:c(ls,p),listUnordered:c(ls),paragraph:c(en),reference:A,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:c(On),strong:c(ea),thematicBreak:c(Bo)},exit:{atxHeading:h(),atxHeadingSequence:z,autolink:h(),autolinkEmail:ve,autolinkProtocol:pe,blockQuote:h(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:fe,characterReference:se,codeFenced:h(E),codeFencedFence:j,codeFencedFenceInfo:w,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:h(N),codeText:h(te),codeTextData:L,data:L,definition:h(),definitionDestinationString:R,definitionLabelString:T,definitionTitleString:k,emphasis:h(),hardBreakEscape:h(X),hardBreakTrailing:h(X),htmlFlow:h(ue),htmlFlowData:L,htmlText:h(ie),htmlTextData:L,image:h(Q),label:$,labelText:Y,lineEnding:ne,link:h(I),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:J,resourceDestinationString:_,resourceTitleString:U,resource:P,setextHeading:h(B),setextHeadingLineSequence:O,setextHeadingText:D,strong:h(),thematicBreak:h()}};Mk(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(oe){let ye={type:"root",children:[]};const Oe={stack:[ye],tokenStack:[],config:t,enter:f,exit:m,buffer:u,resume:g,data:n},qe=[];let Ke=-1;for(;++Ke<oe.length;)if(oe[Ke][1].type==="listOrdered"||oe[Ke][1].type==="listUnordered")if(oe[Ke][0]==="enter")qe.push(Ke);else{const gn=qe.pop();Ke=l(oe,gn,Ke)}for(Ke=-1;++Ke<oe.length;){const gn=t[oe[Ke][0]];Rk.call(gn,oe[Ke][1].type)&&gn[oe[Ke][1].type].call(Object.assign({sliceSerialize:oe[Ke][2].sliceSerialize},Oe),oe[Ke][1])}if(Oe.tokenStack.length>0){const gn=Oe.tokenStack[Oe.tokenStack.length-1];(gn[1]||Mj).call(Oe,void 0,gn[0])}for(ye.position={start:Ps(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Ps(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke<t.transforms.length;)ye=t.transforms[Ke](ye)||ye;return ye}function l(oe,ye,Oe){let qe=ye-1,Ke=-1,gn=!1,xn,nn,_t,rn;for(;++qe<=Oe;){const ot=oe[qe];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?Ke++:Ke--,rn=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(xn&&!rn&&!Ke&&!_t&&(_t=qe),rn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rn=void 0}if(!Ke&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||Ke===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(xn){let ta=qe;for(nn=void 0;ta--;){const En=oe[ta];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;nn&&(oe[nn][1].type="lineEndingBlank",gn=!0),En[1].type="lineEnding",nn=ta}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}_t&&(!nn||_t<nn)&&(xn._spread=!0),xn.end=Object.assign({},nn?oe[nn][1].start:ot[1].end),oe.splice(nn||qe,0,["exit",xn,ot[2]]),qe++,Oe++}if(ot[1].type==="listItemPrefix"){const ta={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};xn=ta,oe.splice(qe,0,["enter",ta,ot[2]]),qe++,Oe++,_t=void 0,rn=!0}}}return oe[ye][1]._spread=gn,Oe}function c(oe,ye){return Oe;function Oe(qe){f.call(this,oe(qe),qe),ye&&ye.call(this,qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(oe,ye,Oe){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([ye,Oe||void 0]),oe.position={start:Ps(ye.start),end:void 0}}function h(oe){return ye;function ye(Oe){oe&&oe.call(this,Oe),m.call(this,Oe)}}function m(oe,ye){const Oe=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==oe.type&&(ye?ye.call(this,oe,qe[0]):(qe[1]||Mj).call(this,oe,qe[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Qc({start:oe.start,end:oe.end})+"): it’s not open");Oe.position.end=Ps(oe.end)}function g(){return zy(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function w(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=oe}function S(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=oe}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.value=oe.replace(/(\r?\n|\r)$/g,"")}function T(oe){const ye=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ye,Oe.identifier=Qr(this.sliceSerialize(oe)).toLowerCase()}function k(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.title=oe}function R(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.url=oe}function z(oe){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Oe=this.sliceSerialize(oe).length;ye.depth=Oe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(oe){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function q(oe){const Oe=this.stack[this.stack.length-1].children;let qe=Oe[Oe.length-1];(!qe||qe.type!=="text")&&(qe=tn(),qe.position={start:Ps(oe.start),end:void 0},Oe.push(qe)),this.stack.push(qe)}function L(oe){const ye=this.stack.pop();ye.value+=this.sliceSerialize(oe),ye.position.end=Ps(oe.end)}function ne(oe){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=ye.children[ye.children.length-1];Oe.position.end=Ps(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(q.call(this,oe),L.call(this,oe))}function X(){this.data.atHardBreak=!0}function ue(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.value=oe}function ie(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.value=oe}function te(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.value=oe}function I(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=ye,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Q(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=ye,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function Y(oe){const ye=this.sliceSerialize(oe),Oe=this.stack[this.stack.length-2];Oe.label=e7(ye),Oe.identifier=Qr(ye).toLowerCase()}function $(){const oe=this.stack[this.stack.length-1],ye=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const qe=oe.children;Oe.children=qe}else Oe.alt=ye}function _(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.url=oe}function U(){const oe=this.resume(),ye=this.stack[this.stack.length-1];ye.title=oe}function P(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function J(oe){const ye=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=ye,Oe.identifier=Qr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function ae(oe){this.data.characterReferenceType=oe.type}function fe(oe){const ye=this.sliceSerialize(oe),Oe=this.data.characterReferenceType;let qe;Oe?(qe=bk(ye,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=Ly(ye);const Ke=this.stack[this.stack.length-1];Ke.value+=qe}function se(oe){const ye=this.stack.pop();ye.position.end=Ps(oe.end)}function pe(oe){L.call(this,oe);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(oe)}function ve(oe){L.call(this,oe);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(oe)}function Ae(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Le(){return{type:"inlineCode",value:""}}function It(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wt(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function pn(){return{type:"html",value:""}}function ka(){return{type:"image",title:null,url:"",alt:null}}function Ot(){return{type:"link",title:null,url:"",children:[]}}function ls(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function ri(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function en(){return{type:"paragraph",children:[]}}function ea(){return{type:"strong",children:[]}}function tn(){return{type:"text",value:""}}function Bo(){return{type:"thematicBreak"}}}function Ps(e){return{line:e.line,column:e.column,offset:e.offset}}function Mk(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Mk(e,i):a7(e,i)}}function a7(e,t){let n;for(n in t)if(Rk.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Mj(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qc({start:t.start,end:t.end})+") is still open")}function s7(e){const t=this;t.parser=n;function n(i){return n7(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function i7(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 l7(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
608
|
+
`}]}function o7(e,t){const n=t.value?t.value+`
|
|
609
|
+
`:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let c={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(c.data={meta:t.meta}),e.patch(t,c),c=e.applyData(t,c),c={type:"element",tagName:"pre",properties:{},children:[c]},e.patch(t,c),c}function c7(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function u7(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d7(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=Io(i.toLowerCase()),c=e.footnoteOrder.indexOf(i);let u,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=c+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function f7(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 m7(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Dk(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),c=l[0];c&&c.type==="text"?c.value="["+c.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=i:l.push({type:"text",value:i}),l}function h7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Dk(e,t);const l={src:Io(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const c={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,c),e.applyData(t,c)}function p7(e,t){const n={src:Io(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function g7(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function x7(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Dk(e,t);const l={href:Io(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const c={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,c),e.applyData(t,c)}function y7(e,t){const n={href:Io(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function v7(e,t,n){const i=e.all(t),l=n?b7(n):Ok(t),c={},u=[];if(typeof t.checked=="boolean"){const g=i[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const g=i[f];(l||f!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
|
|
610
|
+
`}),g.type==="element"&&g.tagName==="p"&&!l?u.push(...g.children):u.push(g)}const h=i[i.length-1];h&&(l||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
|
|
611
|
+
`});const m={type:"element",tagName:"li",properties:c,children:u};return e.patch(t,m),e.applyData(t,m)}function b7(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Ok(n[i])}return t}function Ok(e){const t=e.spread;return t??e.children.length>1}function w7(e,t){const n={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<i.length;){const u=i[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const c={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,c),e.applyData(t,c)}function j7(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function N7(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function S7(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function C7(e,t){const n=e.all(t),i=n.shift(),l=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],u),l.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Dy(t.children[1]),h=fk(t.children[t.children.length-1]);f&&h&&(u.position={start:f,end:h}),l.push(u)}const c={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function k7(e,t,n){const i=n?n.children:void 0,c=(i?i.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const p=t.children[h],b={},w=u?u[h]:void 0;w&&(b.align=w);let S={type:"element",tagName:c,properties:b,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),m.push(S)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function E7(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Dj=9,Oj=32;function T7(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),l=0;const c=[];for(;i;)c.push(_j(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=n.exec(t);return c.push(_j(t.slice(l),l>0,!1)),c.join("")}function _j(e,t,n){let i=0,l=e.length;if(t){let c=e.codePointAt(i);for(;c===Dj||c===Oj;)i++,c=e.codePointAt(i)}if(n){let c=e.codePointAt(l-1);for(;c===Dj||c===Oj;)l--,c=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function A7(e,t){const n={type:"text",value:T7(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function R7(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const M7={blockquote:i7,break:l7,code:o7,delete:c7,emphasis:u7,footnoteReference:d7,heading:f7,html:m7,imageReference:h7,image:p7,inlineCode:g7,linkReference:x7,link:y7,listItem:v7,list:w7,paragraph:j7,root:N7,strong:S7,table:C7,tableCell:E7,tableRow:k7,text:A7,thematicBreak:R7,toml:ef,yaml:ef,definition:ef,footnoteDefinition:ef};function ef(){}const _k=-1,hm=0,Wc=1,_f=2,Uy=3,By=4,Fy=5,Hy=6,Pk=7,zk=8,Pj=typeof self=="object"?self:globalThis,D7=(e,t)=>{const n=(l,c)=>(e.set(c,l),l),i=l=>{if(e.has(l))return e.get(l);const[c,u]=t[l];switch(c){case hm:case _k:return n(u,l);case Wc:{const f=n([],l);for(const h of u)f.push(i(h));return f}case _f:{const f=n({},l);for(const[h,m]of u)f[i(h)]=i(m);return f}case Uy:return n(new Date(u),l);case By:{const{source:f,flags:h}=u;return n(new RegExp(f,h),l)}case Fy:{const f=n(new Map,l);for(const[h,m]of u)f.set(i(h),i(m));return f}case Hy:{const f=n(new Set,l);for(const h of u)f.add(i(h));return f}case Pk:{const{name:f,message:h}=u;return n(new Pj[f](h),l)}case zk:return n(BigInt(u),l);case"BigInt":return n(Object(BigInt(u)),l);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new Pj[c](u),l)};return i},zj=e=>D7(new Map,e)(0),Kl="",{toString:O7}={},{keys:_7}=Object,Fc=e=>{const t=typeof e;if(t!=="object"||!e)return[hm,t];const n=O7.call(e).slice(8,-1);switch(n){case"Array":return[Wc,Kl];case"Object":return[_f,Kl];case"Date":return[Uy,Kl];case"RegExp":return[By,Kl];case"Map":return[Fy,Kl];case"Set":return[Hy,Kl];case"DataView":return[Wc,n]}return n.includes("Array")?[Wc,n]:n.includes("Error")?[Pk,n]:[_f,n]},tf=([e,t])=>e===hm&&(t==="function"||t==="symbol"),P7=(e,t,n,i)=>{const l=(u,f)=>{const h=i.push(u)-1;return n.set(f,h),h},c=u=>{if(n.has(u))return n.get(u);let[f,h]=Fc(u);switch(f){case hm:{let g=u;switch(h){case"bigint":f=zk,g=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);g=null;break;case"undefined":return l([_k],u)}return l([f,g],u)}case Wc:{if(h){let b=u;return h==="DataView"?b=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(b=new Uint8Array(u)),l([h,[...b]],u)}const g=[],p=l([f,g],u);for(const b of u)g.push(c(b));return p}case _f:{if(h)switch(h){case"BigInt":return l([h,u.toString()],u);case"Boolean":case"Number":case"String":return l([h,u.valueOf()],u)}if(t&&"toJSON"in u)return c(u.toJSON());const g=[],p=l([f,g],u);for(const b of _7(u))(e||!tf(Fc(u[b])))&&g.push([c(b),c(u[b])]);return p}case Uy:return l([f,u.toISOString()],u);case By:{const{source:g,flags:p}=u;return l([f,{source:g,flags:p}],u)}case Fy:{const g=[],p=l([f,g],u);for(const[b,w]of u)(e||!(tf(Fc(b))||tf(Fc(w))))&&g.push([c(b),c(w)]);return p}case Hy:{const g=[],p=l([f,g],u);for(const b of u)(e||!tf(Fc(b)))&&g.push(c(b));return p}}const{message:m}=u;return l([f,{name:h,message:m}],u)};return c},Lj=(e,{json:t,lossy:n}={})=>{const i=[];return P7(!(t||n),!!t,new Map,i)(e),i},Pf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zj(Lj(e,t)):structuredClone(e):(e,t)=>zj(Lj(e,t));function z7(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 L7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function I7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||z7,i=e.options.footnoteBackLabel||L7,l=e.options.footnoteLabel||"Footnotes",c=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const g=e.all(m),p=String(m.identifier).toUpperCase(),b=Io(p.toLowerCase());let w=0;const S=[],j=e.footnoteCounts.get(p);for(;j!==void 0&&++w<=j;){S.length>0&&S.push({type:"text",value:" "});let T=typeof n=="string"?n:n(h,w);typeof T=="string"&&(T={type:"text",value:T}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,w),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const E=g[g.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const T=E.children[E.children.length-1];T&&T.type==="text"?T.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else g.push(...S);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(m,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Pf(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
612
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
613
|
+
`}]}}const pm=(function(e){if(e==null)return H7;if(typeof e=="function")return gm(e);if(typeof e=="object")return Array.isArray(e)?U7(e):B7(e);if(typeof e=="string")return F7(e);throw new Error("Expected function, string, or object as test")});function U7(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=pm(e[n]);return gm(i);function i(...l){let c=-1;for(;++c<t.length;)if(t[c].apply(this,l))return!0;return!1}}function B7(e){const t=e;return gm(n);function n(i){const l=i;let c;for(c in e)if(l[c]!==t[c])return!1;return!0}}function F7(e){return gm(t);function t(n){return n&&n.type===e}}function gm(e){return t;function t(n,i,l){return!!(q7(n)&&e.call(this,n,typeof i=="number"?i:void 0,l||void 0))}}function H7(){return!0}function q7(e){return e!==null&&typeof e=="object"&&"type"in e}const Lk=[],V7=!0,mx=!1,$7="skip";function Ik(e,t,n,i){let l;typeof t=="function"&&typeof n!="function"?(i=n,n=t):l=t;const c=pm(l),u=i?-1:1;f(e,void 0,[])();function f(h,m,g){const p=h&&typeof h=="object"?h:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(h.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=Lk,S,j,E;if((!t||c(h,m,g[g.length-1]||void 0))&&(w=G7(n(h,g)),w[0]===mx))return w;if("children"in h&&h.children){const N=h;if(N.children&&w[0]!==$7)for(j=(i?N.children.length:-1)+u,E=g.concat(N);j>-1&&j<N.children.length;){const T=N.children[j];if(S=f(T,j,E)(),S[0]===mx)return S;j=typeof S[1]=="number"?S[1]:j+u}}return w}}}function G7(e){return Array.isArray(e)?e:typeof e=="number"?[V7,e]:e==null?Lk:[e]}function qy(e,t,n,i){let l,c,u;typeof t=="function"&&typeof n!="function"?(c=void 0,u=t,l=n):(c=t,u=n,l=i),Ik(e,c,f,l);function f(h,m){const g=m[m.length-1],p=g?g.children.indexOf(h):void 0;return u(h,p,g)}}const hx={}.hasOwnProperty,Y7={};function K7(e,t){const n=t||Y7,i=new Map,l=new Map,c=new Map,u={...M7,...n.handlers},f={all:m,applyData:X7,definitionById:i,footnoteById:l,footnoteCounts:c,footnoteOrder:[],handlers:u,one:h,options:n,patch:Q7,wrap:Z7};return qy(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?i:l,b=String(g.identifier).toUpperCase();p.has(b)||p.set(b,g)}}),f;function h(g,p){const b=g.type,w=f.handlers[b];if(hx.call(f.handlers,b)&&w)return w(f,g,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in g){const{children:j,...E}=g,N=Pf(E);return N.children=f.all(g),N}return Pf(g)}return(f.options.unknownHandler||W7)(f,g,p)}function m(g){const p=[];if("children"in g){const b=g.children;let w=-1;for(;++w<b.length;){const S=f.one(b[w],g);if(S){if(w&&b[w-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Ij(S.value)),!Array.isArray(S)&&S.type==="element")){const j=S.children[0];j&&j.type==="text"&&(j.value=Ij(j.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function Q7(e,t){e.position&&(t.position=LI(e))}function X7(e,t){let n=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,c=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const u="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:u}}n.type==="element"&&c&&Object.assign(n.properties,Pf(c)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function W7(e,t){const n=t.data||{},i="value"in t&&!(hx.call(n,"hProperties")||hx.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Z7(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
614
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
615
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
616
|
+
`}),n}function Ij(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Uj(e,t){const n=K7(e,t),i=n.one(e,void 0),l=I7(n),c=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&c.children.push({type:"text",value:`
|
|
617
|
+
`},l),c}function J7(e,t){return e&&"run"in e?async function(n,i){const l=Uj(n,{file:i,...t});await e.run(l,i)}:function(n,i){return Uj(n,{file:i,...e||t})}}function Bj(e){if(e)throw e}var cg,Fj;function eU(){if(Fj)return cg;Fj=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},c=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),p=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!p)return!1;var b;for(b in m);return typeof b>"u"||e.call(m,b)},u=function(m,g){n&&g.name==="__proto__"?n(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},f=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(i)return i(m,g).value}else return;return m[g]};return cg=function h(){var m,g,p,b,w,S,j=arguments[0],E=1,N=arguments.length,T=!1;for(typeof j=="boolean"&&(T=j,j=arguments[1]||{},E=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});E<N;++E)if(m=arguments[E],m!=null)for(g in m)p=f(j,g),b=f(m,g),j!==b&&(T&&b&&(c(b)||(w=l(b)))?(w?(w=!1,S=p&&l(p)?p:[]):S=p&&c(p)?p:{},u(j,{name:g,newValue:h(T,S,b)})):typeof b<"u"&&u(j,{name:g,newValue:b}));return j},cg}var tU=eU();const ug=If(tU);function px(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 nU(){const e=[],t={run:n,use:i};return t;function n(...l){let c=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...l);function f(h,...m){const g=e[++c];let p=-1;if(h){u(h);return}for(;++p<l.length;)(m[p]===null||m[p]===void 0)&&(m[p]=l[p]);l=m,g?rU(g,f)(...m):u(null,...m)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function rU(e,t){let n;return i;function i(...u){const f=e.length>u.length;let h;f&&u.push(l);try{h=e.apply(this,u)}catch(m){const g=m;if(f&&n)throw g;return l(g)}f||(h&&h.then&&typeof h.then=="function"?h.then(c,l):h instanceof Error?l(h):c(h))}function l(u,...f){n||(n=!0,t(u,...f))}function c(u){l(null,u)}}const ca={basename:aU,dirname:sU,extname:iU,join:lU,sep:"/"};function aU(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ku(e);let n=0,i=-1,l=e.length,c;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(c){n=l+1;break}}else i<0&&(c=!0,i=l+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let u=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(c){n=l+1;break}}else u<0&&(c=!0,u=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(i=l):(f=-1,i=u));return n===i?i=u:i<0&&(i=e.length),e.slice(n,i)}function sU(e){if(ku(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function iU(e){ku(e);let t=e.length,n=-1,i=0,l=-1,c=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){i=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?l<0?l=t:c!==1&&(c=1):l>-1&&(c=-1)}return l<0||n<0||c===0||c===1&&l===n-1&&l===i+1?"":e.slice(l,n)}function lU(...e){let t=-1,n;for(;++t<e.length;)ku(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":oU(n)}function oU(e){ku(e);const t=e.codePointAt(0)===47;let n=cU(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function cU(e,t){let n="",i=0,l=-1,c=0,u=-1,f,h;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(l===u-1||c===1))if(l!==u-1&&c===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),l=u,c=0;continue}}else if(n.length>0){n="",i=0,l=u,c=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(l+1,u):n=e.slice(l+1,u),i=u-l-1;l=u,c=0}else f===46&&c>-1?c++:c=-1}return n}function ku(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const uU={cwd:dU};function dU(){return"/"}function gx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function fU(e){if(typeof e=="string")e=new URL(e);else if(!gx(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 mU(e)}function mU(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const dg=["history","path","basename","stem","extname","dirname"];class Uk{constructor(t){let n;t?gx(t)?n={path:t}:typeof t=="string"||hU(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":uU.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<dg.length;){const c=dg[i];c in n&&n[c]!==void 0&&n[c]!==null&&(this[c]=c==="history"?[...n[c]]:n[c])}let l;for(l in n)dg.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?ca.basename(this.path):void 0}set basename(t){mg(t,"basename"),fg(t,"basename"),this.path=ca.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ca.dirname(this.path):void 0}set dirname(t){Hj(this.basename,"dirname"),this.path=ca.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ca.extname(this.path):void 0}set extname(t){if(fg(t,"extname"),Hj(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=ca.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){gx(t)&&(t=fU(t)),mg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ca.basename(this.path,this.extname):void 0}set stem(t){mg(t,"stem"),fg(t,"stem"),this.path=ca.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const l=this.message(t,n,i);throw l.fatal=!0,l}info(t,n,i){const l=this.message(t,n,i);return l.fatal=void 0,l}message(t,n,i){const l=new Cn(t,n,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fg(e,t){if(e&&e.includes(ca.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ca.sep+"`")}function mg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hj(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function hU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pU=(function(e){const i=this.constructor.prototype,l=i[e],c=function(){return l.apply(c,arguments)};return Object.setPrototypeOf(c,i),c}),gU={}.hasOwnProperty;class Vy extends pU{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=nU()}copy(){const t=new Vy;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(ug(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(gg("data",this.frozen),this.namespace[t]=n,this):gU.call(this.namespace,t)&&this.namespace[t]||void 0:t?(gg("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=n.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=nf(t),i=this.parser||this.Parser;return hg("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),hg("process",this.parser||this.Parser),pg("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(c,u){const f=nf(t),h=i.parse(f);i.run(h,f,function(g,p,b){if(g||!p||!b)return m(g);const w=p,S=i.stringify(w,b);vU(S)?b.value=S:b.result=S,m(g,b)});function m(g,p){g||!p?u(g):c?c(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),hg("processSync",this.parser||this.Parser),pg("processSync",this.compiler||this.Compiler),this.process(t,l),Vj("processSync","process",n),i;function l(c,u){n=!0,Bj(c),i=u}}run(t,n,i){qj(t),this.freeze();const l=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?c(void 0,i):new Promise(c);function c(u,f){const h=nf(n);l.run(t,h,m);function m(g,p,b){const w=p||t;g?f(g):u?u(w):i(void 0,w,b)}}}runSync(t,n){let i=!1,l;return this.run(t,n,c),Vj("runSync","run",i),l;function c(u,f){Bj(u),l=f,i=!0}}stringify(t,n){this.freeze();const i=nf(n),l=this.compiler||this.Compiler;return pg("stringify",l),qj(t),l(t,i)}use(t,...n){const i=this.attachers,l=this.namespace;if(gg("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function c(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...p]=m;h(g,p)}else u(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function u(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");f(m.plugins),m.settings&&(l.settings=ug(!0,l.settings,m.settings))}function f(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const p=m[g];c(p)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,g){let p=-1,b=-1;for(;++p<i.length;)if(i[p][0]===m){b=p;break}if(b===-1)i.push([m,...g]);else if(g.length>0){let[w,...S]=g;const j=i[b][1];px(j)&&px(w)&&(w=ug(!0,j,w)),i[b]=[m,w,...S]}}}}const xU=new Vy().freeze();function hg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function pg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gg(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 qj(e){if(!px(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vj(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function nf(e){return yU(e)?e:new Uk(e)}function yU(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vU(e){return typeof e=="string"||bU(e)}function bU(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const wU="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$j=[],Gj={allowDangerousHtml:!0},jU=/^(https?|ircs?|mailto|xmpp)$/i,NU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function SU(e){const t=CU(e),n=kU(e);return EU(t.runSync(t.parse(n),n),e)}function CU(e){const t=e.rehypePlugins||$j,n=e.remarkPlugins||$j,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gj}:Gj;return xU().use(s7).use(n).use(J7,i).use(t)}function kU(e){const t=e.children||"",n=new Uk;return typeof t=="string"&&(n.value=t),n}function EU(e,t){const n=t.allowedElements,i=t.allowElement,l=t.components,c=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||TU;for(const g of NU)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+wU+g.id,void 0);return qy(e,m),HI(e,{Fragment:a.Fragment,components:l,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function m(g,p,b){if(g.type==="raw"&&b&&typeof p=="number")return u?b.children.splice(p,1):b.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let w;for(w in ig)if(Object.hasOwn(ig,w)&&Object.hasOwn(g.properties,w)){const S=g.properties[w],j=ig[w];(j===null||j.includes(g.tagName))&&(g.properties[w]=h(String(S||""),w,g))}}if(g.type==="element"){let w=n?!n.includes(g.tagName):c?c.includes(g.tagName):!1;if(!w&&i&&typeof p=="number"&&(w=!i(g,p,b)),w&&b&&typeof p=="number")return f&&g.children?b.children.splice(p,1,...g.children):b.children.splice(p,1),p}}}function TU(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||i!==-1&&t>i||jU.test(e.slice(0,t))?e:""}function Yj(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=n.indexOf(t);for(;l!==-1;)i++,l=n.indexOf(t,l+t.length);return i}function AU(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RU(e,t,n){const l=pm((n||{}).ignore||[]),c=MU(t);let u=-1;for(;++u<c.length;)Ik(e,"text",f);function f(m,g){let p=-1,b;for(;++p<g.length;){const w=g[p],S=b?b.children:void 0;if(l(w,S?S.indexOf(w):void 0,b))return;b=w}if(b)return h(m,g)}function h(m,g){const p=g[g.length-1],b=c[u][0],w=c[u][1];let S=0;const E=p.children.indexOf(m);let N=!1,T=[];b.lastIndex=0;let k=b.exec(m.value);for(;k;){const R=k.index,z={index:k.index,input:k.input,stack:[...g,m]};let D=w(...k,z);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=R+1:(S!==R&&T.push({type:"text",value:m.value.slice(S,R)}),Array.isArray(D)?T.push(...D):D&&T.push(D),S=R+k[0].length,N=!0),!b.global)break;k=b.exec(m.value)}return N?(S<m.value.length&&T.push({type:"text",value:m.value.slice(S)}),p.children.splice(E,1,...T)):T=[m],E+T.length}}function MU(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const l=n[i];t.push([DU(l[0]),OU(l[1])])}return t}function DU(e){return typeof e=="string"?new RegExp(AU(e),"g"):e}function OU(e){return typeof e=="function"?e:function(){return e}}const xg="phrasing",yg=["autolink","link","image","label"];function _U(){return{transforms:[FU],enter:{literalAutolink:zU,literalAutolinkEmail:vg,literalAutolinkHttp:vg,literalAutolinkWww:vg},exit:{literalAutolink:BU,literalAutolinkEmail:UU,literalAutolinkHttp:LU,literalAutolinkWww:IU}}}function PU(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xg,notInConstruct:yg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xg,notInConstruct:yg},{character:":",before:"[ps]",after:"\\/",inConstruct:xg,notInConstruct:yg}]}}function zU(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vg(e){this.config.enter.autolinkProtocol.call(this,e)}function LU(e){this.config.exit.autolinkProtocol.call(this,e)}function IU(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function UU(e){this.config.exit.autolinkEmail.call(this,e)}function BU(e){this.exit(e)}function FU(e){RU(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HU],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qU]],{ignore:["link","linkReference"]})}function HU(e,t,n,i,l){let c="";if(!Bk(l)||(/^w/i.test(t)&&(n=t+n,t="",c="http://"),!VU(n)))return!1;const u=$U(n+i);if(!u[0])return!1;const f={type:"link",title:null,url:c+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function qU(e,t,n,i){return!Bk(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function VU(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $U(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const l=Yj(e,"(");let c=Yj(e,")");for(;i!==-1&&l>c;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),c++;return[e,n]}function Bk(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Vi(n)||fm(n))&&(!t||n!==47)}Fk.peek=eB;function GU(){this.buffer()}function YU(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KU(){this.buffer()}function QU(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WU(e){this.exit(e)}function ZU(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function JU(e){this.exit(e)}function eB(){return"["}function Fk(e,t,n,i){const l=n.createTracker(i);let c=l.move("[^");const u=n.enter("footnoteReference"),f=n.enter("reference");return c+=l.move(n.safe(n.associationId(e),{after:"]",before:c})),f(),u(),c+=l.move("]"),c}function tB(){return{enter:{gfmFootnoteCallString:GU,gfmFootnoteCall:YU,gfmFootnoteDefinitionLabelString:KU,gfmFootnoteDefinition:QU},exit:{gfmFootnoteCallString:XU,gfmFootnoteCall:WU,gfmFootnoteDefinitionLabelString:ZU,gfmFootnoteDefinition:JU}}}function nB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Fk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,l,c,u){const f=c.createTracker(u);let h=f.move("[^");const m=c.enter("footnoteDefinition"),g=c.enter("label");return h+=f.move(c.safe(c.associationId(i),{before:h,after:"]"})),g(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
618
|
+
`:" ")+c.indentLines(c.containerFlow(i,f.current()),t?Hk:rB))),m(),h}}function rB(e,t,n){return t===0?e:Hk(e,t,n)}function Hk(e,t,n){return(n?"":" ")+e}const aB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];qk.peek=cB;function sB(){return{canContainEols:["delete"],enter:{strikethrough:lB},exit:{strikethrough:oB}}}function iB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aB}],handlers:{delete:qk}}}function lB(e){this.enter({type:"delete",children:[]},e)}function oB(e){this.exit(e)}function qk(e,t,n,i){const l=n.createTracker(i),c=n.enter("strikethrough");let u=l.move("~~");return u+=n.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),c(),u}function cB(){return"~"}function uB(e){return e.length}function dB(e,t){const n=t||{},i=(n.align||[]).concat(),l=n.stringLength||uB,c=[],u=[],f=[],h=[];let m=0,g=-1;for(;++g<e.length;){const j=[],E=[];let N=-1;for(e[g].length>m&&(m=e[g].length);++N<e[g].length;){const T=fB(e[g][N]);if(n.alignDelimiters!==!1){const k=l(T);E[N]=k,(h[N]===void 0||k>h[N])&&(h[N]=k)}j.push(T)}u[g]=j,f[g]=E}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<m;)c[p]=Kj(i[p]);else{const j=Kj(i);for(;++p<m;)c[p]=j}p=-1;const b=[],w=[];for(;++p<m;){const j=c[p];let E="",N="";j===99?(E=":",N=":"):j===108?E=":":j===114&&(N=":");let T=n.alignDelimiters===!1?1:Math.max(1,h[p]-E.length-N.length);const k=E+"-".repeat(T)+N;n.alignDelimiters!==!1&&(T=E.length+T+N.length,T>h[p]&&(h[p]=T),w[p]=T),b[p]=k}u.splice(1,0,b),f.splice(1,0,w),g=-1;const S=[];for(;++g<u.length;){const j=u[g],E=f[g];p=-1;const N=[];for(;++p<m;){const T=j[p]||"";let k="",R="";if(n.alignDelimiters!==!1){const z=h[p]-(E[p]||0),D=c[p];D===114?k=" ".repeat(z):D===99?z%2?(k=" ".repeat(z/2+.5),R=" ".repeat(z/2-.5)):(k=" ".repeat(z/2),R=k):R=" ".repeat(z)}n.delimiterStart!==!1&&!p&&N.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||p)&&N.push(" "),n.alignDelimiters!==!1&&N.push(k),N.push(T),n.alignDelimiters!==!1&&N.push(R),n.padding!==!1&&N.push(" "),(n.delimiterEnd!==!1||p!==m-1)&&N.push("|")}S.push(n.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return S.join(`
|
|
619
|
+
`)}function fB(e){return e==null?"":String(e)}function Kj(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function mB(e,t,n,i){const l=n.enter("blockquote"),c=n.createTracker(i);c.move("> "),c.shift(2);const u=n.indentLines(n.containerFlow(e,c.current()),hB);return l(),u}function hB(e,t,n){return">"+(n?"":" ")+e}function pB(e,t){return Qj(e,t.inConstruct,!0)&&!Qj(e,t.notInConstruct,!1)}function Qj(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Xj(e,t,n,i){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
|
|
620
|
+
`&&pB(n.stack,n.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
621
|
+
`}function gB(e,t){const n=String(e);let i=n.indexOf(t),l=i,c=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++c>u&&(u=c):c=1,l=i+t.length,i=n.indexOf(t,l);return u}function xB(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function yB(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function vB(e,t,n,i){const l=yB(n),c=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(xB(e,n)){const p=n.enter("codeIndented"),b=n.indentLines(c,bB);return p(),b}const f=n.createTracker(i),h=l.repeat(Math.max(gB(c,l)+1,3)),m=n.enter("codeFenced");let g=f.move(h);if(e.lang){const p=n.enter(`codeFencedLang${u}`);g+=f.move(n.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${u}`);g+=f.move(" "),g+=f.move(n.safe(e.meta,{before:g,after:`
|
|
622
|
+
`,encode:["`"],...f.current()})),p()}return g+=f.move(`
|
|
623
|
+
`),c&&(g+=f.move(c+`
|
|
624
|
+
`)),g+=f.move(h),m(),g}function bB(e,t,n){return(n?"":" ")+e}function $y(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wB(e,t,n,i){const l=$y(n),c=l==='"'?"Quote":"Apostrophe",u=n.enter("definition");let f=n.enter("label");const h=n.createTracker(i);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
625
|
+
`,...h.current()}))),f(),e.title&&(f=n.enter(`title${c}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),u(),m}function jB(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function iu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zf(e,t,n){const i=No(e),l=No(t);return i===void 0?l===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Vk.peek=NB;function Vk(e,t,n,i){const l=jB(n),c=n.enter("emphasis"),u=n.createTracker(i),f=u.move(l);let h=u.move(n.containerPhrasing(e,{after:l,before:f,...u.current()}));const m=h.charCodeAt(0),g=zf(i.before.charCodeAt(i.before.length-1),m,l);g.inside&&(h=iu(m)+h.slice(1));const p=h.charCodeAt(h.length-1),b=zf(i.after.charCodeAt(0),p,l);b.inside&&(h=h.slice(0,-1)+iu(p));const w=u.move(l);return c(),n.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+h+w}function NB(e,t,n){return n.options.emphasis||"*"}function SB(e,t){let n=!1;return qy(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,mx}),!!((!e.depth||e.depth<3)&&zy(e)&&(t.options.setext||n))}function CB(e,t,n,i){const l=Math.max(Math.min(6,e.depth||1),1),c=n.createTracker(i);if(SB(e,n)){const g=n.enter("headingSetext"),p=n.enter("phrasing"),b=n.containerPhrasing(e,{...c.current(),before:`
|
|
626
|
+
`,after:`
|
|
627
|
+
`});return p(),g(),b+`
|
|
628
|
+
`+(l===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
629
|
+
`))+1))}const u="#".repeat(l),f=n.enter("headingAtx"),h=n.enter("phrasing");c.move(u+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
630
|
+
`,...c.current()});return/^[\t ]/.test(m)&&(m=iu(m.charCodeAt(0))+m.slice(1)),m=m?u+" "+m:u,n.options.closeAtx&&(m+=" "+u),h(),f(),m}$k.peek=kB;function $k(e){return e.value||""}function kB(){return"<"}Gk.peek=EB;function Gk(e,t,n,i){const l=$y(n),c=l==='"'?"Quote":"Apostrophe",u=n.enter("image");let f=n.enter("label");const h=n.createTracker(i);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${c}`),m+=h.move(" "+l),m+=h.move(n.safe(e.title,{before:m,after:l,...h.current()})),m+=h.move(l),f()),m+=h.move(")"),u(),m}function EB(){return"!"}Yk.peek=TB;function Yk(e,t,n,i){const l=e.referenceType,c=n.enter("imageReference");let u=n.enter("label");const f=n.createTracker(i);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),u();const g=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return u(),n.stack=g,c(),l==="full"||!m||m!==p?h+=f.move(p+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function TB(){return"!"}Kk.peek=AB;function Kk(e,t,n){let i=e.value||"",l="`",c=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++c<n.unsafe.length;){const u=n.unsafe[c],f=n.compilePattern(u);let h;if(u.atBreak)for(;h=f.exec(i);){let m=h.index;i.charCodeAt(m)===10&&i.charCodeAt(m-1)===13&&m--,i=i.slice(0,m)+" "+i.slice(h.index+1)}}return l+i+l}function AB(){return"`"}function Qk(e,t){const n=zy(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Xk.peek=RB;function Xk(e,t,n,i){const l=$y(n),c=l==='"'?"Quote":"Apostrophe",u=n.createTracker(i);let f,h;if(Qk(e,n)){const g=n.stack;n.stack=[],f=n.enter("autolink");let p=u.move("<");return p+=u.move(n.containerPhrasing(e,{before:p,after:">",...u.current()})),p+=u.move(">"),f(),n.stack=g,p}f=n.enter("link"),h=n.enter("label");let m=u.move("[");return m+=u.move(n.containerPhrasing(e,{before:m,after:"](",...u.current()})),m+=u.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=u.move("<"),m+=u.move(n.safe(e.url,{before:m,after:">",...u.current()})),m+=u.move(">")):(h=n.enter("destinationRaw"),m+=u.move(n.safe(e.url,{before:m,after:e.title?" ":")",...u.current()}))),h(),e.title&&(h=n.enter(`title${c}`),m+=u.move(" "+l),m+=u.move(n.safe(e.title,{before:m,after:l,...u.current()})),m+=u.move(l),h()),m+=u.move(")"),f(),m}function RB(e,t,n){return Qk(e,n)?"<":"["}Wk.peek=MB;function Wk(e,t,n,i){const l=e.referenceType,c=n.enter("linkReference");let u=n.enter("label");const f=n.createTracker(i);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),u();const g=n.stack;n.stack=[],u=n.enter("reference");const p=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return u(),n.stack=g,c(),l==="full"||!m||m!==p?h+=f.move(p+"]"):l==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function MB(){return"["}function Gy(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function DB(e){const t=Gy(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function OB(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zk(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _B(e,t,n,i){const l=n.enter("list"),c=n.bulletCurrent;let u=e.ordered?OB(n):Gy(n);const f=e.ordered?u==="."?")":".":DB(n);let h=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),Zk(n)===u&&g){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(u=f),n.bulletCurrent=u;const m=n.containerFlow(e,i);return n.bulletLastUsed=u,n.bulletCurrent=c,l(),m}function PB(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zB(e,t,n,i){const l=PB(n);let c=n.bulletCurrent||Gy(n);t&&t.type==="list"&&t.ordered&&(c=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+c);let u=c.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=n.createTracker(i);f.move(c+" ".repeat(u-c.length)),f.shift(u);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),g);return h(),m;function g(p,b,w){return b?(w?"":" ".repeat(u))+p:(w?c:c+" ".repeat(u-c.length))+p}}function LB(e,t,n,i){const l=n.enter("paragraph"),c=n.enter("phrasing"),u=n.containerPhrasing(e,i);return c(),l(),u}const IB=pm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function UB(e,t,n,i){return(e.children.some(function(u){return IB(u)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function BB(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Jk.peek=FB;function Jk(e,t,n,i){const l=BB(n),c=n.enter("strong"),u=n.createTracker(i),f=u.move(l+l);let h=u.move(n.containerPhrasing(e,{after:l,before:f,...u.current()}));const m=h.charCodeAt(0),g=zf(i.before.charCodeAt(i.before.length-1),m,l);g.inside&&(h=iu(m)+h.slice(1));const p=h.charCodeAt(h.length-1),b=zf(i.after.charCodeAt(0),p,l);b.inside&&(h=h.slice(0,-1)+iu(p));const w=u.move(l+l);return c(),n.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+h+w}function FB(e,t,n){return n.options.strong||"*"}function HB(e,t,n,i){return n.safe(e.value,i)}function qB(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function VB(e,t,n){const i=(Zk(n)+(n.options.ruleSpaces?" ":"")).repeat(qB(n));return n.options.ruleSpaces?i.slice(0,-1):i}const e5={blockquote:mB,break:Xj,code:vB,definition:wB,emphasis:Vk,hardBreak:Xj,heading:CB,html:$k,image:Gk,imageReference:Yk,inlineCode:Kk,link:Xk,linkReference:Wk,list:_B,listItem:zB,paragraph:LB,root:UB,strong:Jk,text:HB,thematicBreak:VB};function $B(){return{enter:{table:GB,tableData:Wj,tableHeader:Wj,tableRow:KB},exit:{codeText:QB,table:YB,tableData:bg,tableHeader:bg,tableRow:bg}}}function GB(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function YB(e){this.exit(e),this.data.inTable=void 0}function KB(e){this.enter({type:"tableRow",children:[]},e)}function bg(e){this.exit(e)}function Wj(e){this.enter({type:"tableCell",children:[]},e)}function QB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,XB));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function XB(e,t){return t==="|"?t:e}function WB(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,c=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
631
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:h,tableRow:f}};function u(w,S,j,E){return m(g(w,j,E),w.align)}function f(w,S,j,E){const N=p(w,j,E),T=m([N]);return T.slice(0,T.indexOf(`
|
|
632
|
+
`))}function h(w,S,j,E){const N=j.enter("tableCell"),T=j.enter("phrasing"),k=j.containerPhrasing(w,{...E,before:c,after:c});return T(),N(),k}function m(w,S){return dB(w,{align:S,alignDelimiters:i,padding:n,stringLength:l})}function g(w,S,j){const E=w.children;let N=-1;const T=[],k=S.enter("table");for(;++N<E.length;)T[N]=p(E[N],S,j);return k(),T}function p(w,S,j){const E=w.children;let N=-1;const T=[],k=S.enter("tableRow");for(;++N<E.length;)T[N]=h(E[N],w,S,j);return k(),T}function b(w,S,j){let E=e5.inlineCode(w,S,j);return j.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function ZB(){return{exit:{taskListCheckValueChecked:Zj,taskListCheckValueUnchecked:Zj,paragraph:eF}}}function JB(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tF}}}function Zj(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function eF(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const l=t.children;let c=-1,u;for(;++c<l.length;){const f=l[c];if(f.type==="paragraph"){u=f;break}}u===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function tF(e,t,n,i){const l=e.children[0],c=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=n.createTracker(i);c&&f.move(u);let h=e5.listItem(e,t,n,{...i,...f.current()});return c&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(g){return g+u}}function nF(){return[_U(),tB(),sB(),$B(),ZB()]}function rF(e){return{extensions:[PU(),nB(e),iB(),WB(e),JB()]}}const aF={tokenize:uF,partial:!0},t5={tokenize:dF,partial:!0},n5={tokenize:fF,partial:!0},r5={tokenize:mF,partial:!0},sF={tokenize:hF,partial:!0},a5={name:"wwwAutolink",tokenize:oF,previous:i5},s5={name:"protocolAutolink",tokenize:cF,previous:l5},is={name:"emailAutolink",tokenize:lF,previous:o5},Ca={};function iF(){return{text:Ca}}let Si=48;for(;Si<123;)Ca[Si]=is,Si++,Si===58?Si=65:Si===91&&(Si=97);Ca[43]=is;Ca[45]=is;Ca[46]=is;Ca[95]=is;Ca[72]=[is,s5];Ca[104]=[is,s5];Ca[87]=[is,a5];Ca[119]=[is,a5];function lF(e,t,n){const i=this;let l,c;return u;function u(p){return!xx(p)||!o5.call(i,i.previous)||Yy(i.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return xx(p)?(e.consume(p),f):p===64?(e.consume(p),h):n(p)}function h(p){return p===46?e.check(sF,g,m)(p):p===45||p===95||jn(p)?(c=!0,e.consume(p),h):g(p)}function m(p){return e.consume(p),l=!0,h}function g(p){return c&&l&&Mn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function oF(e,t,n){const i=this;return l;function l(u){return u!==87&&u!==119||!i5.call(i,i.previous)||Yy(i.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(aF,e.attempt(t5,e.attempt(n5,c),n),n)(u))}function c(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function cF(e,t,n){const i=this;let l="",c=!1;return u;function u(p){return(p===72||p===104)&&l5.call(i,i.previous)&&!Yy(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(p),e.consume(p),f):n(p)}function f(p){if(Mn(p)&&l.length<5)return l+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=l.toLowerCase();if(b==="http"||b==="https")return e.consume(p),h}return n(p)}function h(p){return p===47?(e.consume(p),c?m:(c=!0,h)):n(p)}function m(p){return p===null||Of(p)||xt(p)||Vi(p)||fm(p)?n(p):e.attempt(t5,e.attempt(n5,g),n)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function uF(e,t,n){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),c):n(u)}function c(u){return u===null?n(u):t(u)}}function dF(e,t,n){let i,l,c;return u;function u(m){return m===46||m===95?e.check(r5,h,f)(m):m===null||xt(m)||Vi(m)||m!==45&&fm(m)?h(m):(c=!0,e.consume(m),u)}function f(m){return m===95?i=!0:(l=i,i=void 0),e.consume(m),u}function h(m){return l||i||!c?n(m):t(m)}}function fF(e,t){let n=0,i=0;return l;function l(u){return u===40?(n++,e.consume(u),l):u===41&&i<n?c(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(r5,t,c)(u):u===null||xt(u)||Vi(u)?t(u):(e.consume(u),l)}function c(u){return u===41&&i++,e.consume(u),l}}function mF(e,t,n){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),c):f===93?(e.consume(f),l):f===60||f===null||xt(f)||Vi(f)?t(f):n(f)}function l(f){return f===null||f===40||f===91||xt(f)||Vi(f)?t(f):i(f)}function c(f){return Mn(f)?u(f):n(f)}function u(f){return f===59?(e.consume(f),i):Mn(f)?(e.consume(f),u):n(f)}}function hF(e,t,n){return i;function i(c){return e.consume(c),l}function l(c){return jn(c)?n(c):t(c)}}function i5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function l5(e){return!Mn(e)}function o5(e){return!(e===47||xx(e))}function xx(e){return e===43||e===45||e===46||e===95||jn(e)}function Yy(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const pF={tokenize:NF,partial:!0};function gF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:bF,continuation:{tokenize:wF},exit:jF}},text:{91:{name:"gfmFootnoteCall",tokenize:vF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xF,resolveTo:yF}}}}function xF(e,t,n){const i=this;let l=i.events.length;const c=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const h=i.events[l][1];if(h.type==="labelImage"){u=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!u||!u._balanced)return n(h);const m=Qr(i.sliceSerialize({start:u.end,end:i.now()}));return m.codePointAt(0)!==94||!c.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function yF(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},f=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",c,t],["enter",u,t],["exit",u,t],["exit",c,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...f),e}function vF(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c=0,u;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),h}function h(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(p){if(c>999||p===93&&!u||p===null||p===91||xt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return l.includes(Qr(i.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return xt(p)||(u=!0),c++,e.consume(p),p===92?g:m}function g(p){return p===91||p===92||p===93?(e.consume(p),c++,m):m(p)}}function bF(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c,u=0,f;return h;function h(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):n(S)}function g(S){if(u>999||S===93&&!f||S===null||S===91||xt(S))return n(S);if(S===93){e.exit("chunkString");const j=e.exit("gfmFootnoteDefinitionLabelString");return c=Qr(i.sliceSerialize(j)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return xt(S)||(f=!0),u++,e.consume(S),S===92?p:g}function p(S){return S===91||S===92||S===93?(e.consume(S),u++,g):g(S)}function b(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),l.includes(c)||l.push(c),rt(e,w,"gfmFootnoteDefinitionWhitespace")):n(S)}function w(S){return t(S)}}function wF(e,t,n){return e.check(Cu,t,e.attempt(pF,t,n))}function jF(e){e.exit("gfmFootnoteDefinition")}function NF(e,t,n){const i=this;return rt(e,l,"gfmFootnoteDefinitionIndent",5);function l(c){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(c):n(c)}}function SF(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:c,resolveAll:l};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,f){let h=-1;for(;++h<u.length;)if(u[h][0]==="enter"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._close){let m=h;for(;m--;)if(u[m][0]==="exit"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._open&&u[h][1].end.offset-u[h][1].start.offset===u[m][1].end.offset-u[m][1].start.offset){u[h][1].type="strikethroughSequence",u[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[m][1].start),end:Object.assign({},u[h][1].end)},p={type:"strikethroughText",start:Object.assign({},u[m][1].end),end:Object.assign({},u[h][1].start)},b=[["enter",g,f],["enter",u[m][1],f],["exit",u[m][1],f],["enter",p,f]],w=f.parser.constructs.insideSpan.null;w&&dr(b,b.length,0,mm(w,u.slice(m+1,h),f)),dr(b,b.length,0,[["exit",p,f],["enter",u[h][1],f],["exit",u[h][1],f],["exit",g,f]]),dr(u,m-1,h-m+3,b),h=m+b.length-2;break}}for(h=-1;++h<u.length;)u[h][1].type==="strikethroughSequenceTemporary"&&(u[h][1].type="data");return u}function c(u,f,h){const m=this.previous,g=this.events;let p=0;return b;function b(S){return m===126&&g[g.length-1][1].type!=="characterEscape"?h(S):(u.enter("strikethroughSequenceTemporary"),w(S))}function w(S){const j=No(m);if(S===126)return p>1?h(S):(u.consume(S),p++,w);if(p<2&&!n)return h(S);const E=u.exit("strikethroughSequenceTemporary"),N=No(S);return E._open=!N||N===2&&!!j,E._close=!j||j===2&&!!N,f(S)}}}class CF{constructor(){this.map=[]}add(t,n,i){kF(this,t,n,i)}consume(t){if(this.map.sort(function(c,u){return c[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const c of l)t.push(c);l=i.pop()}this.map.length=0}}function kF(e,t,n,i){let l=0;if(!(n===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...i);return}l+=1}e.map.push([t,n,i])}}function EF(e,t){let n=!1;const i=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const c=i.length-1;i[c]=i[c]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function TF(){return{flow:{null:{name:"table",tokenize:AF,resolveAll:RF}}}}function AF(e,t,n){const i=this;let l=0,c=0,u;return f;function f(L){let ne=i.events.length-1;for(;ne>-1;){const ie=i.events[ne][1].type;if(ie==="lineEnding"||ie==="linePrefix")ne--;else break}const X=ne>-1?i.events[ne][1].type:null,ue=X==="tableHead"||X==="tableRow"?D:h;return ue===D&&i.parser.lazy[i.now().line]?n(L):ue(L)}function h(L){return e.enter("tableHead"),e.enter("tableRow"),m(L)}function m(L){return L===124||(u=!0,c+=1),g(L)}function g(L){return L===null?n(L):De(L)?c>1?(c=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w):n(L):We(L)?rt(e,g,"whitespace")(L):(c+=1,u&&(u=!1,l+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),p(L)))}function p(L){return L===null||L===124||xt(L)?(e.exit("data"),g(L)):(e.consume(L),L===92?b:p)}function b(L){return L===92||L===124?(e.consume(L),p):p(L)}function w(L){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(L):(e.enter("tableDelimiterRow"),u=!1,We(L)?rt(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?E(L):L===124?(u=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),j):z(L)}function j(L){return We(L)?rt(e,E,"whitespace")(L):E(L)}function E(L){return L===58?(c+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),N):L===45?(c+=1,N(L)):L===null||De(L)?R(L):z(L)}function N(L){return L===45?(e.enter("tableDelimiterFiller"),T(L)):z(L)}function T(L){return L===45?(e.consume(L),T):L===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(L))}function k(L){return We(L)?rt(e,R,"whitespace")(L):R(L)}function R(L){return L===124?S(L):L===null||De(L)?!u||l!==c?z(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):z(L)}function z(L){return n(L)}function D(L){return e.enter("tableRow"),O(L)}function O(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),O):L===null||De(L)?(e.exit("tableRow"),t(L)):We(L)?rt(e,O,"whitespace")(L):(e.enter("data"),B(L))}function B(L){return L===null||L===124||xt(L)?(e.exit("data"),O(L)):(e.consume(L),L===92?q:B)}function q(L){return L===92||L===124?(e.consume(L),B):B(L)}}function RF(e,t){let n=-1,i=!0,l=0,c=[0,0,0,0],u=[0,0,0,0],f=!1,h=0,m,g,p;const b=new CF;for(;++n<e.length;){const w=e[n],S=w[1];w[0]==="enter"?S.type==="tableHead"?(f=!1,h!==0&&(Jj(b,t,h,m,g),g=void 0,h=0),m={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",m,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,p=void 0,c=[0,0,0,0],u=[0,n+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},b.add(n,0,[["enter",g,t]])),l=S.type==="tableDelimiterRow"?2:g?3:1):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(c[1]!==0&&(u[0]=u[1],p=rf(b,t,c,l,void 0,p),c=[0,0,0,0]),u[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(c[1]!==0&&(u[0]=u[1],p=rf(b,t,c,l,void 0,p)),c=u,u=[c[1],n,0,0])):S.type==="tableHead"?(f=!0,h=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(h=n,c[1]!==0?(u[0]=u[1],p=rf(b,t,c,l,n,p)):u[1]!==0&&(p=rf(b,t,u,l,n,p)),l=0):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(u[3]=n)}for(h!==0&&Jj(b,t,h,m,g),b.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=EF(t.events,n))}return e}function rf(e,t,n,i,l,c){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(c.end=Object.assign({},Wl(t.events,n[0])),e.add(n[0],0,[["exit",c,t]]));const h=Wl(t.events,n[1]);if(c={type:u,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",c,t]]),n[2]!==0){const m=Wl(t.events,n[2]),g=Wl(t.events,n[3]),p={type:f,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(n[2],0,[["enter",p,t]]),i!==2){const b=t.events[n[2]],w=t.events[n[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,j=n[3]-n[2]-1;e.add(S,j,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return l!==void 0&&(c.end=Object.assign({},Wl(t.events,l)),e.add(l,0,[["exit",c,t]]),c=void 0),c}function Jj(e,t,n,i,l){const c=[],u=Wl(t.events,n);l&&(l.end=Object.assign({},u),c.push(["exit",l,t])),i.end=Object.assign({},u),c.push(["exit",i,t]),e.add(n+1,0,c)}function Wl(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const MF={name:"tasklistCheck",tokenize:OF};function DF(){return{text:{91:MF}}}function OF(e,t,n){const i=this;return l;function l(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),c)}function c(h){return xt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),u):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),u):n(h)}function u(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return De(h)?t(h):We(h)?e.check({tokenize:_F},t,n)(h):n(h)}}function _F(e,t,n){return rt(e,i,"whitespace");function i(l){return l===null?n(l):t(l)}}function PF(e){return vk([iF(),gF(),SF(e),TF(),DF()])}const zF={};function LF(e){const t=this,n=e||zF,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),c=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(PF(n)),c.push(nF()),u.push(rF(n))}function eN(e){const t=[{gradient:"from-rose-500/10 to-transparent",iconBg:"bg-rose-500/15",iconColor:"text-rose-400",accentBorder:"group-hover:border-l-rose-500/50",glowColor:"hover:shadow-rose-500/10"},{gradient:"from-orange-500/10 to-transparent",iconBg:"bg-orange-500/15",iconColor:"text-orange-400",accentBorder:"group-hover:border-l-orange-500/50",glowColor:"hover:shadow-orange-500/10"},{gradient:"from-amber-500/10 to-transparent",iconBg:"bg-amber-500/15",iconColor:"text-amber-400",accentBorder:"group-hover:border-l-amber-500/50",glowColor:"hover:shadow-amber-500/10"},{gradient:"from-emerald-500/10 to-transparent",iconBg:"bg-emerald-500/15",iconColor:"text-emerald-400",accentBorder:"group-hover:border-l-emerald-500/50",glowColor:"hover:shadow-emerald-500/10"},{gradient:"from-teal-500/10 to-transparent",iconBg:"bg-teal-500/15",iconColor:"text-teal-400",accentBorder:"group-hover:border-l-teal-500/50",glowColor:"hover:shadow-teal-500/10"},{gradient:"from-cyan-500/10 to-transparent",iconBg:"bg-cyan-500/15",iconColor:"text-cyan-400",accentBorder:"group-hover:border-l-cyan-500/50",glowColor:"hover:shadow-cyan-500/10"},{gradient:"from-sky-500/10 to-transparent",iconBg:"bg-sky-500/15",iconColor:"text-sky-400",accentBorder:"group-hover:border-l-sky-500/50",glowColor:"hover:shadow-sky-500/10"},{gradient:"from-blue-500/10 to-transparent",iconBg:"bg-blue-500/15",iconColor:"text-blue-400",accentBorder:"group-hover:border-l-blue-500/50",glowColor:"hover:shadow-blue-500/10"},{gradient:"from-indigo-500/10 to-transparent",iconBg:"bg-indigo-500/15",iconColor:"text-indigo-400",accentBorder:"group-hover:border-l-indigo-500/50",glowColor:"hover:shadow-indigo-500/10"},{gradient:"from-violet-500/10 to-transparent",iconBg:"bg-violet-500/15",iconColor:"text-violet-400",accentBorder:"group-hover:border-l-violet-500/50",glowColor:"hover:shadow-violet-500/10"},{gradient:"from-purple-500/10 to-transparent",iconBg:"bg-purple-500/15",iconColor:"text-purple-400",accentBorder:"group-hover:border-l-purple-500/50",glowColor:"hover:shadow-purple-500/10"},{gradient:"from-fuchsia-500/10 to-transparent",iconBg:"bg-fuchsia-500/15",iconColor:"text-fuchsia-400",accentBorder:"group-hover:border-l-fuchsia-500/50",glowColor:"hover:shadow-fuchsia-500/10"},{gradient:"from-pink-500/10 to-transparent",iconBg:"bg-pink-500/15",iconColor:"text-pink-400",accentBorder:"group-hover:border-l-pink-500/50",glowColor:"hover:shadow-pink-500/10"}];let n=0;for(let i=0;i<e.length;i++)n=e.charCodeAt(i)+((n<<5)-n);return t[Math.abs(n)%t.length]}function c5(e){const t=`${e.name} ${e.preview||""} ${e.content||""}`.toLowerCase();return t.includes("bug")||t.includes("fix")||t.includes("issue")||t.includes("error")?{icon:XN,label:"Bug Fix",color:"text-rose-400"}:t.includes("feature")||t.includes("add")||t.includes("new")||t.includes("implement")?{icon:Vt,label:"Feature",color:"text-violet-400"}:t.includes("refactor")||t.includes("clean")||t.includes("improve")?{icon:ga,label:"Refactor",color:"text-amber-400"}:t.includes("performance")||t.includes("optimize")||t.includes("speed")?{icon:$t,label:"Performance",color:"text-yellow-400"}:t.includes("ui")||t.includes("design")||t.includes("layout")||t.includes("style")?{icon:sR,label:"UI/Design",color:"text-pink-400"}:t.includes("database")||t.includes("data")||t.includes("migration")||t.includes("schema")?{icon:Ao,label:"Data",color:"text-emerald-400"}:t.includes("security")||t.includes("auth")||t.includes("permission")?{icon:$f,label:"Security",color:"text-red-400"}:t.includes("api")||t.includes("endpoint")||t.includes("integration")?{icon:rs,label:"API",color:"text-cyan-400"}:t.includes("deploy")||t.includes("release")||t.includes("launch")?{icon:oR,label:"Deploy",color:"text-orange-400"}:t.includes("config")||t.includes("setup")||t.includes("tool")?{icon:Ii,label:"Config",color:"text-slate-400"}:{icon:Lt,label:"Plan",color:"text-blue-400"}}function IF(e){const n=new Date().getTime()-e.getTime(),i=Math.floor(n/(1e3*60*60*24));return i===0?"Today":i===1?"Yesterday":i<=7?"This Week":i<=30?"This Month":"Older"}const UF=({plan:e,isSelected:t,onClick:n,style:i})=>{const[l,c]=y.useState(!1),u=c5(e),f=u.icon,h=m=>{m.stopPropagation(),navigator.clipboard.writeText(e.path),c(!0),setTimeout(()=>c(!1),2e3)};return a.jsxs("button",{onClick:n,className:G("group w-full text-left relative rounded-xl border-l-2 border transition-all duration-200","hover:-translate-y-0.5 hover:shadow-lg",t?"bg-accent border-border border-l-primary ring-1 ring-primary/20":G("bg-card border-border/50 border-l-transparent hover:border-border",i.accentBorder,i.glowColor)),children:[a.jsx("div",{className:G("absolute inset-0 rounded-xl bg-gradient-to-br opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",i.gradient)}),a.jsxs("div",{className:"relative p-4 flex flex-col gap-3",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:G("w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0",i.iconBg),children:a.jsx(f,{className:G("h-4 w-4",i.iconColor)})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("h3",{className:"text-sm font-medium line-clamp-1 group-hover:text-foreground transition-colors",children:e.name}),a.jsx("button",{onClick:h,className:"p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-background/80 transition-colors opacity-0 group-hover:opacity-100",title:"Copy path",children:l?a.jsx(Yi,{className:"h-3.5 w-3.5 text-emerald-500"}):a.jsx(qc,{className:"h-3.5 w-3.5"})})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 truncate",children:e.path.split("/").pop()})]})]}),e.preview&&a.jsx("div",{className:"bg-muted/30 p-2.5 rounded-lg border border-border/30",children:a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 leading-relaxed",children:e.preview})}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(qf,{className:"h-3 w-3"}),a.jsx("span",{children:new Date(e.createdAt||new Date).toLocaleDateString()})]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(ba,{className:"h-3 w-3"}),a.jsx("span",{children:new Date(e.createdAt||new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),a.jsx(we,{variant:"secondary",className:G("text-[10px] font-normal px-1.5 py-0 h-5",u.color),children:u.label})]})]}),a.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx(Qi,{className:G("h-4 w-4",i.iconColor)})})]})};function BF(){const[e,t]=y.useState(null),[n,i]=y.useState(""),{data:l,isLoading:c}=pt({queryKey:["plans"],queryFn:Ue.getPlans}),{data:u,isLoading:f}=pt({queryKey:["plan",e],queryFn:()=>Ue.getPlan(e),enabled:!!e}),h=l==null?void 0:l.find(j=>j.id===e),m=u||h,g=m?eN(m.name):null,p=m?c5(m):null,b=l==null?void 0:l.filter(j=>j.name.toLowerCase().includes(n.toLowerCase())||j.path.toLowerCase().includes(n.toLowerCase())),w=y.useMemo(()=>{if(!b)return{};const j={};return[...b].sort((N,T)=>new Date(T.createdAt||0).getTime()-new Date(N.createdAt||0).getTime()).forEach(N=>{const T=IF(new Date(N.createdAt||new Date));j[T]||(j[T]=[]),j[T].push(N)}),j},[b]),S=["Today","Yesterday","This Week","This Month","Older"];return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex gap-6",children:[a.jsxs("div",{className:G("flex flex-col transition-all duration-300",e?"w-[380px] flex-shrink-0":"w-full max-w-5xl mx-auto"),children:[a.jsxs("div",{className:"mb-6 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Hf,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Plans"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Implementation blueprints and roadmaps"})]}),l&&l.length>0&&a.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"font-semibold tabular-nums",children:l.length}),a.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:"Total"})]}),w.Today&&a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"font-semibold tabular-nums text-emerald-500",children:w.Today.length}),a.jsx("div",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:"Today"})]})]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{placeholder:"Search plans...",value:n,onChange:j=>i(j.target.value),className:"pl-9 h-10"})]})]}),c?a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-36 w-full rounded-xl"}),a.jsx(Te,{className:"h-36 w-full rounded-xl"}),a.jsx(Te,{className:"h-36 w-full rounded-xl"})]}):a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsxs("div",{className:"space-y-6 pb-6",children:[S.map(j=>{const E=w[j];return!E||E.length===0?null:a.jsxs("div",{children:[!e&&Object.keys(w).length>1&&a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:j}),a.jsx("div",{className:"flex-1 h-px bg-border/50"}),a.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:E.length})]}),a.jsx("div",{className:G("grid gap-3",!e&&"md:grid-cols-2 lg:grid-cols-3"),children:E.map(N=>a.jsx(UF,{plan:N,isSelected:e===N.id,onClick:()=>t(N.id),style:eN(N.name)},N.id))})]},j)}),(b==null?void 0:b.length)===0&&a.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-16 text-muted-foreground",children:[a.jsx(Lt,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"No plans found"}),n&&a.jsx("p",{className:"text-xs mt-1",children:"Try adjusting your search"})]})]})})]}),e&&m&&g&&p&&a.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-xl border border-border/50 overflow-hidden",children:[a.jsx("div",{className:G("border-b border-border/50 px-6 py-4 bg-gradient-to-r",g.gradient),children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-start gap-4 min-w-0 flex-1",children:[a.jsx("div",{className:G("w-11 h-11 rounded-xl flex items-center justify-center flex-shrink-0",g.iconBg),children:a.jsx(p.icon,{className:G("h-5 w-5",g.iconColor)})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("h2",{className:"text-base font-semibold truncate",children:m.name}),a.jsx(we,{variant:"secondary",className:G("text-[10px] font-normal",p.color),children:p.label})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:m.path}),a.jsxs("div",{className:"flex items-center gap-3 mt-2 text-[11px] text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(qf,{className:"h-3 w-3"}),a.jsx("span",{children:new Date(m.createdAt||new Date).toLocaleDateString()})]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(ba,{className:"h-3 w-3"}),a.jsx("span",{children:new Date(m.createdAt||new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})]})]}),a.jsx(me,{variant:"ghost",size:"icon",onClick:()=>t(null),className:"h-8 w-8 -mr-2 flex-shrink-0",children:a.jsx(wa,{className:"h-4 w-4"})})]})}),a.jsx(at,{className:"flex-1",children:a.jsx("div",{className:"p-6 max-w-3xl",children:f?a.jsx("div",{className:"flex items-center justify-center py-12",children:a.jsx(Ct,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):a.jsx("article",{className:`prose prose-sm dark:prose-invert max-w-none
|
|
633
|
+
prose-headings:font-semibold prose-headings:tracking-tight
|
|
634
|
+
prose-h1:text-xl prose-h1:border-b prose-h1:border-border/50 prose-h1:pb-2 prose-h1:mb-4
|
|
635
|
+
prose-h2:text-lg prose-h2:mt-6 prose-h2:mb-3
|
|
636
|
+
prose-h3:text-base prose-h3:mt-4 prose-h3:mb-2
|
|
637
|
+
prose-p:text-muted-foreground prose-p:leading-relaxed
|
|
638
|
+
prose-pre:bg-muted prose-pre:border prose-pre:border-border/50 prose-pre:rounded-lg prose-pre:text-xs
|
|
639
|
+
prose-code:text-xs prose-code:bg-muted prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none prose-code:text-primary
|
|
640
|
+
prose-a:text-primary prose-a:underline prose-a:underline-offset-2 prose-a:font-medium
|
|
641
|
+
prose-ul:text-muted-foreground prose-ol:text-muted-foreground
|
|
642
|
+
prose-li:marker:text-muted-foreground/50
|
|
643
|
+
prose-strong:text-foreground prose-strong:font-semibold
|
|
644
|
+
prose-table:text-sm prose-table:border-collapse
|
|
645
|
+
prose-th:border prose-th:border-border/50 prose-th:bg-muted/50 prose-th:px-3 prose-th:py-2 prose-th:text-left prose-th:font-medium
|
|
646
|
+
prose-td:border prose-td:border-border/50 prose-td:px-3 prose-td:py-2
|
|
647
|
+
prose-tr:border-b prose-tr:border-border/30
|
|
648
|
+
prose-blockquote:border-l-primary prose-blockquote:bg-muted/30 prose-blockquote:py-1 prose-blockquote:px-4 prose-blockquote:not-italic
|
|
649
|
+
prose-hr:border-border/50
|
|
650
|
+
`,children:a.jsx(SU,{remarkPlugins:[LF],children:m.content||""})})})})]}),e&&!m&&a.jsx("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-xl border border-border/50 overflow-hidden",children:a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-muted-foreground",children:[a.jsx(Lt,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"Select a plan to view"})]})})]})}const u5=/^[a-z0-9-]+$/,d5="Name must be lowercase letters, numbers, and hyphens only";var FF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],HF=FF.reduce((e,t)=>{const n=SS(`Primitive.${t}`),i=y.forwardRef((l,c)=>{const{asChild:u,...f}=l,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(h,{...f,ref:c})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{}),qF="Label",f5=y.forwardRef((e,t)=>a.jsx(HF.label,{...e,ref:t,onMouseDown:n=>{var l;n.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));f5.displayName=qF;var VF=f5;function Dt({className:e,...t}){return a.jsx(VF,{"data-slot":"label",className:G("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const el=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:G("flex min-h-[80px] w-full rounded-md border border-border bg-background px-3 py-2 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));el.displayName="Textarea";function m5(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xm="Switch",[$F]=ja(xm),[GF,YF]=$F(xm),h5=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:i,checked:l,defaultChecked:c,required:u,disabled:f,value:h="on",onCheckedChange:m,form:g,...p}=e,[b,w]=y.useState(null),S=Ze(t,k=>w(k)),j=y.useRef(!1),E=b?g||!!b.closest("form"):!0,[N,T]=Ui({prop:l,defaultProp:c??!1,onChange:m,caller:xm});return a.jsxs(GF,{scope:n,checked:N,disabled:f,children:[a.jsx(Pe.button,{type:"button",role:"switch","aria-checked":N,"aria-required":u,"data-state":y5(N),"data-disabled":f?"":void 0,disabled:f,value:h,...p,ref:S,onClick:Ne(e.onClick,k=>{T(R=>!R),E&&(j.current=k.isPropagationStopped(),j.current||k.stopPropagation())})}),E&&a.jsx(x5,{control:b,bubbles:!j.current,name:i,value:h,checked:N,required:u,disabled:f,form:g,style:{transform:"translateX(-100%)"}})]})});h5.displayName=xm;var p5="SwitchThumb",g5=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...i}=e,l=YF(p5,n);return a.jsx(Pe.span,{"data-state":y5(l.checked),"data-disabled":l.disabled?"":void 0,...i,ref:t})});g5.displayName=p5;var KF="SwitchBubbleInput",x5=y.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:i=!0,...l},c)=>{const u=y.useRef(null),f=Ze(u,c),h=m5(n),m=HS(t);return y.useEffect(()=>{const g=u.current;if(!g)return;const p=window.HTMLInputElement.prototype,w=Object.getOwnPropertyDescriptor(p,"checked").set;if(h!==n&&w){const S=new Event("click",{bubbles:i});w.call(g,n),g.dispatchEvent(S)}},[h,n,i]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...l,tabIndex:-1,ref:f,style:{...l.style,...m,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});x5.displayName=KF;function y5(e){return e?"checked":"unchecked"}var v5=h5,QF=g5;const b5=y.forwardRef(({className:e,...t},n)=>a.jsx(v5,{className:G("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(QF,{className:G("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));b5.displayName=v5.displayName;const tN=[{id:"blank",name:"Start from scratch",description:"Empty skill with basic structure",icon:rs,color:"text-slate-400",bgColor:"bg-slate-500/10",category:"all",content:`# Skill Instructions
|
|
651
|
+
|
|
652
|
+
Write your skill instructions here. This content will guide Claude on how to perform the task.
|
|
653
|
+
|
|
654
|
+
## Usage
|
|
655
|
+
|
|
656
|
+
Describe how and when this skill should be used.
|
|
657
|
+
|
|
658
|
+
## Examples
|
|
659
|
+
|
|
660
|
+
Provide examples of expected inputs and outputs.`},{id:"code-review",name:"Code Review",description:"Review code for issues, security vulnerabilities, and improvements",icon:$x,color:"text-violet-400",bgColor:"bg-violet-500/10",category:"development",suggestedName:"code-review",content:`# Code Review Instructions
|
|
661
|
+
|
|
662
|
+
Review the provided code thoroughly and systematically.
|
|
663
|
+
|
|
664
|
+
## Review Checklist
|
|
665
|
+
|
|
666
|
+
### Correctness
|
|
667
|
+
- [ ] Logic errors and edge cases
|
|
668
|
+
- [ ] Null/undefined handling
|
|
669
|
+
- [ ] Error handling completeness
|
|
670
|
+
|
|
671
|
+
### Security
|
|
672
|
+
- [ ] Input validation
|
|
673
|
+
- [ ] SQL injection / XSS vulnerabilities
|
|
674
|
+
- [ ] Sensitive data exposure
|
|
675
|
+
- [ ] Authentication/authorization issues
|
|
676
|
+
|
|
677
|
+
### Performance
|
|
678
|
+
- [ ] Inefficient algorithms or data structures
|
|
679
|
+
- [ ] Unnecessary re-renders or computations
|
|
680
|
+
- [ ] Memory leaks
|
|
681
|
+
|
|
682
|
+
### Maintainability
|
|
683
|
+
- [ ] Code readability and clarity
|
|
684
|
+
- [ ] Proper naming conventions
|
|
685
|
+
- [ ] DRY principle adherence
|
|
686
|
+
- [ ] Test coverage suggestions
|
|
687
|
+
|
|
688
|
+
## Output Format
|
|
689
|
+
|
|
690
|
+
Provide feedback in these sections:
|
|
691
|
+
1. **Critical Issues** - Must fix before merge
|
|
692
|
+
2. **Suggestions** - Recommended improvements
|
|
693
|
+
3. **Positive Notes** - What was done well
|
|
694
|
+
|
|
695
|
+
$ARGUMENTS`},{id:"bug-fix",name:"Bug Fixer",description:"Systematically diagnose and fix bugs with root cause analysis",icon:XN,color:"text-rose-400",bgColor:"bg-rose-500/10",category:"development",suggestedName:"fix-bug",content:`# Bug Fix Instructions
|
|
696
|
+
|
|
697
|
+
Follow this systematic approach to diagnose and fix bugs.
|
|
698
|
+
|
|
699
|
+
## Diagnostic Process
|
|
700
|
+
|
|
701
|
+
### 1. Understand the Bug
|
|
702
|
+
- What is the expected behavior?
|
|
703
|
+
- What is the actual behavior?
|
|
704
|
+
- When does it occur? (always, sometimes, specific conditions)
|
|
705
|
+
|
|
706
|
+
### 2. Reproduce
|
|
707
|
+
- Identify the minimal steps to reproduce
|
|
708
|
+
- Note the environment (browser, OS, versions)
|
|
709
|
+
|
|
710
|
+
### 3. Locate Root Cause
|
|
711
|
+
- Use logs, debugger, or print statements
|
|
712
|
+
- Trace the data flow
|
|
713
|
+
- Check recent changes in git history
|
|
714
|
+
|
|
715
|
+
### 4. Fix
|
|
716
|
+
- Implement the minimal fix that addresses root cause
|
|
717
|
+
- Avoid band-aid fixes that mask the problem
|
|
718
|
+
- Consider edge cases
|
|
719
|
+
|
|
720
|
+
### 5. Verify
|
|
721
|
+
- Confirm the fix resolves the issue
|
|
722
|
+
- Ensure no regression in related functionality
|
|
723
|
+
- Add tests to prevent recurrence
|
|
724
|
+
|
|
725
|
+
## Bug Context
|
|
726
|
+
$ARGUMENTS
|
|
727
|
+
|
|
728
|
+
Provide your analysis and proposed fix.`},{id:"refactor",name:"Refactor Helper",description:"Refactor code following best practices and design patterns",icon:lS,color:"text-amber-400",bgColor:"bg-amber-500/10",category:"development",suggestedName:"refactor",content:`# Refactoring Instructions
|
|
729
|
+
|
|
730
|
+
Refactor the specified code following these principles.
|
|
731
|
+
|
|
732
|
+
## Refactoring Goals
|
|
733
|
+
|
|
734
|
+
### Readability
|
|
735
|
+
- Clear, descriptive naming
|
|
736
|
+
- Single responsibility per function/class
|
|
737
|
+
- Logical code organization
|
|
738
|
+
|
|
739
|
+
### Maintainability
|
|
740
|
+
- DRY (Don't Repeat Yourself)
|
|
741
|
+
- SOLID principles where applicable
|
|
742
|
+
- Minimal cyclomatic complexity
|
|
743
|
+
|
|
744
|
+
### Performance (if applicable)
|
|
745
|
+
- Optimize hot paths
|
|
746
|
+
- Reduce unnecessary allocations
|
|
747
|
+
- Consider caching strategies
|
|
748
|
+
|
|
749
|
+
## Constraints
|
|
750
|
+
- Maintain backward compatibility
|
|
751
|
+
- Preserve existing behavior (unless bugs)
|
|
752
|
+
- Keep changes focused and reviewable
|
|
753
|
+
|
|
754
|
+
## Process
|
|
755
|
+
1. Identify code smells
|
|
756
|
+
2. Plan refactoring steps
|
|
757
|
+
3. Make incremental changes
|
|
758
|
+
4. Verify behavior after each step
|
|
759
|
+
|
|
760
|
+
## Scope
|
|
761
|
+
$ARGUMENTS
|
|
762
|
+
|
|
763
|
+
Explain each change and why it improves the code.`},{id:"test-generator",name:"Test Generator",description:"Generate comprehensive unit and integration tests",icon:Kx,color:"text-emerald-400",bgColor:"bg-emerald-500/10",category:"development",suggestedName:"generate-tests",content:`# Test Generation Instructions
|
|
764
|
+
|
|
765
|
+
Generate comprehensive tests for the specified code.
|
|
766
|
+
|
|
767
|
+
## Test Coverage Goals
|
|
768
|
+
|
|
769
|
+
### Unit Tests
|
|
770
|
+
- Test each function/method in isolation
|
|
771
|
+
- Cover happy path and edge cases
|
|
772
|
+
- Test error handling and exceptions
|
|
773
|
+
- Mock external dependencies
|
|
774
|
+
|
|
775
|
+
### Integration Tests (if applicable)
|
|
776
|
+
- Test component interactions
|
|
777
|
+
- Verify data flow between modules
|
|
778
|
+
- Test API endpoints end-to-end
|
|
779
|
+
|
|
780
|
+
## Test Structure
|
|
781
|
+
|
|
782
|
+
\`\`\`
|
|
783
|
+
describe('ComponentName', () => {
|
|
784
|
+
describe('methodName', () => {
|
|
785
|
+
it('should handle normal input', () => {});
|
|
786
|
+
it('should handle edge case', () => {});
|
|
787
|
+
it('should throw on invalid input', () => {});
|
|
788
|
+
});
|
|
789
|
+
});
|
|
790
|
+
\`\`\`
|
|
791
|
+
|
|
792
|
+
## Best Practices
|
|
793
|
+
- Descriptive test names (should + expected behavior)
|
|
794
|
+
- Arrange-Act-Assert pattern
|
|
795
|
+
- One assertion per test when possible
|
|
796
|
+
- Avoid testing implementation details
|
|
797
|
+
|
|
798
|
+
## Target
|
|
799
|
+
$ARGUMENTS`},{id:"canvas-design",name:"Canvas Design",description:"Create beautiful visual art and designs using design principles",icon:nR,color:"text-pink-400",bgColor:"bg-pink-500/10",category:"design",suggestedName:"canvas-design",content:`# Canvas Design Instructions
|
|
800
|
+
|
|
801
|
+
Create beautiful visual art in .png, .svg, or .pdf documents using design philosophy.
|
|
802
|
+
|
|
803
|
+
## When to Use
|
|
804
|
+
Use this skill when the user asks to create a poster, piece of art, design, diagram, or other static visual piece.
|
|
805
|
+
|
|
806
|
+
## Design Principles
|
|
807
|
+
|
|
808
|
+
### Composition
|
|
809
|
+
- Use rule of thirds or golden ratio
|
|
810
|
+
- Create visual hierarchy
|
|
811
|
+
- Balance positive and negative space
|
|
812
|
+
|
|
813
|
+
### Color Theory
|
|
814
|
+
- Use harmonious color palettes
|
|
815
|
+
- Consider contrast and accessibility
|
|
816
|
+
- Apply 60-30-10 rule for color distribution
|
|
817
|
+
|
|
818
|
+
### Typography (if applicable)
|
|
819
|
+
- Limit to 2-3 font families
|
|
820
|
+
- Establish clear hierarchy
|
|
821
|
+
- Ensure readability
|
|
822
|
+
|
|
823
|
+
## Guidelines
|
|
824
|
+
- Create original designs, never copy existing artists' work
|
|
825
|
+
- Consider the medium and final use case
|
|
826
|
+
- Provide multiple concepts when appropriate
|
|
827
|
+
|
|
828
|
+
## Request
|
|
829
|
+
$ARGUMENTS`},{id:"brand-guidelines",name:"Brand Guidelines",description:"Apply brand colors, typography, and style guidelines consistently",icon:eR,color:"text-indigo-400",bgColor:"bg-indigo-500/10",category:"design",suggestedName:"brand-style",content:`# Brand Guidelines Application
|
|
830
|
+
|
|
831
|
+
Apply official brand colors and typography to any artifact that may benefit from consistent styling.
|
|
832
|
+
|
|
833
|
+
## When to Use
|
|
834
|
+
- Visual formatting is needed
|
|
835
|
+
- Brand colors or style guidelines apply
|
|
836
|
+
- Company design standards should be followed
|
|
837
|
+
|
|
838
|
+
## Brand Elements to Consider
|
|
839
|
+
|
|
840
|
+
### Colors
|
|
841
|
+
- Primary brand color
|
|
842
|
+
- Secondary/accent colors
|
|
843
|
+
- Background colors
|
|
844
|
+
- Text colors (primary, secondary, muted)
|
|
845
|
+
|
|
846
|
+
### Typography
|
|
847
|
+
- Heading fonts and sizes
|
|
848
|
+
- Body text specifications
|
|
849
|
+
- Line heights and spacing
|
|
850
|
+
|
|
851
|
+
### Visual Elements
|
|
852
|
+
- Logo usage and spacing
|
|
853
|
+
- Icon style consistency
|
|
854
|
+
- Border radius and shadows
|
|
855
|
+
- Spacing system (4px, 8px, 16px, etc.)
|
|
856
|
+
|
|
857
|
+
## Application
|
|
858
|
+
Ensure all deliverables maintain visual consistency with established brand guidelines.
|
|
859
|
+
|
|
860
|
+
$ARGUMENTS`},{id:"ui-critique",name:"UI/UX Critique",description:"Analyze interfaces for usability, accessibility, and visual design",icon:lR,color:"text-cyan-400",bgColor:"bg-cyan-500/10",category:"design",suggestedName:"ui-critique",content:`# UI/UX Critique Instructions
|
|
861
|
+
|
|
862
|
+
Provide a comprehensive critique of the user interface.
|
|
863
|
+
|
|
864
|
+
## Evaluation Areas
|
|
865
|
+
|
|
866
|
+
### Usability
|
|
867
|
+
- Is the interface intuitive?
|
|
868
|
+
- Can users accomplish their goals easily?
|
|
869
|
+
- Are interactive elements discoverable?
|
|
870
|
+
- Is feedback provided for user actions?
|
|
871
|
+
|
|
872
|
+
### Visual Design
|
|
873
|
+
- Is there clear visual hierarchy?
|
|
874
|
+
- Are colors, fonts, and spacing consistent?
|
|
875
|
+
- Does the design feel cohesive?
|
|
876
|
+
- Is there appropriate use of whitespace?
|
|
877
|
+
|
|
878
|
+
### Accessibility
|
|
879
|
+
- Color contrast ratios (WCAG AA/AAA)
|
|
880
|
+
- Keyboard navigation support
|
|
881
|
+
- Screen reader compatibility
|
|
882
|
+
- Touch target sizes (minimum 44x44px)
|
|
883
|
+
|
|
884
|
+
### Responsive Design
|
|
885
|
+
- Mobile-first considerations
|
|
886
|
+
- Breakpoint handling
|
|
887
|
+
- Content reflow
|
|
888
|
+
|
|
889
|
+
## Output Format
|
|
890
|
+
1. **Strengths** - What works well
|
|
891
|
+
2. **Issues** - Problems to address (prioritized)
|
|
892
|
+
3. **Recommendations** - Specific improvements
|
|
893
|
+
|
|
894
|
+
$ARGUMENTS`},{id:"doc-coauthoring",name:"Doc Coauthoring",description:"Guide through structured documentation workflows",icon:Hf,color:"text-blue-400",bgColor:"bg-blue-500/10",category:"writing",suggestedName:"doc-coauthor",content:`# Documentation Coauthoring
|
|
895
|
+
|
|
896
|
+
Guide users through a structured workflow for co-authoring documentation.
|
|
897
|
+
|
|
898
|
+
## When to Use
|
|
899
|
+
- Writing documentation, proposals, technical specs
|
|
900
|
+
- Decision docs or design documents
|
|
901
|
+
- Any structured content creation
|
|
902
|
+
|
|
903
|
+
## Workflow
|
|
904
|
+
|
|
905
|
+
### 1. Discovery
|
|
906
|
+
- What is the purpose of this document?
|
|
907
|
+
- Who is the target audience?
|
|
908
|
+
- What decisions need to be captured?
|
|
909
|
+
|
|
910
|
+
### 2. Outline
|
|
911
|
+
- Create a logical structure
|
|
912
|
+
- Identify key sections
|
|
913
|
+
- Note areas needing research
|
|
914
|
+
|
|
915
|
+
### 3. Draft
|
|
916
|
+
- Write section by section
|
|
917
|
+
- Use clear, concise language
|
|
918
|
+
- Include examples where helpful
|
|
919
|
+
|
|
920
|
+
### 4. Review
|
|
921
|
+
- Check for completeness
|
|
922
|
+
- Verify technical accuracy
|
|
923
|
+
- Ensure consistency
|
|
924
|
+
|
|
925
|
+
## Document Types
|
|
926
|
+
- Technical specifications
|
|
927
|
+
- API documentation
|
|
928
|
+
- Architecture Decision Records (ADRs)
|
|
929
|
+
- User guides and tutorials
|
|
930
|
+
|
|
931
|
+
$ARGUMENTS`},{id:"technical-writing",name:"Technical Writing",description:"Generate clear technical documentation and API docs",icon:Lt,color:"text-sky-400",bgColor:"bg-sky-500/10",category:"writing",suggestedName:"tech-docs",content:`# Technical Documentation Generator
|
|
932
|
+
|
|
933
|
+
Generate comprehensive technical documentation.
|
|
934
|
+
|
|
935
|
+
## Documentation Standards
|
|
936
|
+
|
|
937
|
+
### Structure
|
|
938
|
+
- Overview and purpose
|
|
939
|
+
- Prerequisites and requirements
|
|
940
|
+
- Step-by-step instructions
|
|
941
|
+
- API reference (if applicable)
|
|
942
|
+
- Troubleshooting section
|
|
943
|
+
|
|
944
|
+
### Writing Style
|
|
945
|
+
- Clear and concise
|
|
946
|
+
- Active voice
|
|
947
|
+
- Present tense
|
|
948
|
+
- Consistent terminology
|
|
949
|
+
|
|
950
|
+
### Code Examples
|
|
951
|
+
- Working, tested examples
|
|
952
|
+
- Comments explaining key points
|
|
953
|
+
- Multiple languages if applicable
|
|
954
|
+
|
|
955
|
+
## Include
|
|
956
|
+
- Function/method signatures
|
|
957
|
+
- Parameter descriptions and types
|
|
958
|
+
- Return values and exceptions
|
|
959
|
+
- Usage examples
|
|
960
|
+
- Related functions or concepts
|
|
961
|
+
|
|
962
|
+
## Target
|
|
963
|
+
$ARGUMENTS`},{id:"internal-comms",name:"Internal Comms",description:"Write internal communications in company formats",icon:gu,color:"text-orange-400",bgColor:"bg-orange-500/10",category:"writing",suggestedName:"internal-comms",content:`# Internal Communications
|
|
964
|
+
|
|
965
|
+
Help write all kinds of internal communications using appropriate formats.
|
|
966
|
+
|
|
967
|
+
## When to Use
|
|
968
|
+
Use this skill when asked to write internal communications including:
|
|
969
|
+
- Status reports and updates
|
|
970
|
+
- Leadership updates
|
|
971
|
+
- Team announcements
|
|
972
|
+
- Project summaries
|
|
973
|
+
- Meeting notes
|
|
974
|
+
|
|
975
|
+
## Communication Types
|
|
976
|
+
|
|
977
|
+
### Status Reports
|
|
978
|
+
- Progress against goals
|
|
979
|
+
- Key accomplishments
|
|
980
|
+
- Blockers and risks
|
|
981
|
+
- Next steps
|
|
982
|
+
|
|
983
|
+
### Announcements
|
|
984
|
+
- Clear headline/subject
|
|
985
|
+
- Key information upfront
|
|
986
|
+
- Action items (if any)
|
|
987
|
+
- Contact for questions
|
|
988
|
+
|
|
989
|
+
### Meeting Notes
|
|
990
|
+
- Attendees and date
|
|
991
|
+
- Discussion summary
|
|
992
|
+
- Decisions made
|
|
993
|
+
- Action items with owners
|
|
994
|
+
|
|
995
|
+
## Writing Guidelines
|
|
996
|
+
- Be concise and scannable
|
|
997
|
+
- Lead with the most important information
|
|
998
|
+
- Use bullet points for lists
|
|
999
|
+
- Include relevant links/references
|
|
1000
|
+
|
|
1001
|
+
$ARGUMENTS`},{id:"mcp-builder",name:"MCP Builder",description:"Guide for creating high-quality MCP servers",icon:sS,color:"text-purple-400",bgColor:"bg-purple-500/10",category:"building",suggestedName:"mcp-builder",content:`# MCP Server Builder
|
|
1002
|
+
|
|
1003
|
+
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services.
|
|
1004
|
+
|
|
1005
|
+
## When to Use
|
|
1006
|
+
Use when building MCP servers to integrate external APIs or services, whether in Python or TypeScript.
|
|
1007
|
+
|
|
1008
|
+
## MCP Server Structure
|
|
1009
|
+
|
|
1010
|
+
### Required Components
|
|
1011
|
+
- Server initialization
|
|
1012
|
+
- Tool definitions with schemas
|
|
1013
|
+
- Request handlers
|
|
1014
|
+
- Error handling
|
|
1015
|
+
|
|
1016
|
+
### Best Practices
|
|
1017
|
+
- Clear tool descriptions
|
|
1018
|
+
- Comprehensive input validation
|
|
1019
|
+
- Meaningful error messages
|
|
1020
|
+
- Proper async handling
|
|
1021
|
+
|
|
1022
|
+
## Template (TypeScript)
|
|
1023
|
+
|
|
1024
|
+
\`\`\`typescript
|
|
1025
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
1026
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
1027
|
+
|
|
1028
|
+
const server = new Server({
|
|
1029
|
+
name: "my-mcp-server",
|
|
1030
|
+
version: "1.0.0",
|
|
1031
|
+
}, {
|
|
1032
|
+
capabilities: { tools: {} }
|
|
1033
|
+
});
|
|
1034
|
+
|
|
1035
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
1036
|
+
tools: [{
|
|
1037
|
+
name: "my_tool",
|
|
1038
|
+
description: "Description of what this tool does",
|
|
1039
|
+
inputSchema: {
|
|
1040
|
+
type: "object",
|
|
1041
|
+
properties: {
|
|
1042
|
+
param: { type: "string", description: "Parameter description" }
|
|
1043
|
+
},
|
|
1044
|
+
required: ["param"]
|
|
1045
|
+
}
|
|
1046
|
+
}]
|
|
1047
|
+
}));
|
|
1048
|
+
\`\`\`
|
|
1049
|
+
|
|
1050
|
+
## Target Integration
|
|
1051
|
+
$ARGUMENTS`},{id:"api-design",name:"API Designer",description:"Design RESTful APIs following best practices",icon:Ao,color:"text-teal-400",bgColor:"bg-teal-500/10",category:"building",suggestedName:"api-design",content:`# API Design Guide
|
|
1052
|
+
|
|
1053
|
+
Design RESTful APIs following industry best practices.
|
|
1054
|
+
|
|
1055
|
+
## Design Principles
|
|
1056
|
+
|
|
1057
|
+
### Resource Naming
|
|
1058
|
+
- Use nouns, not verbs (/users, not /getUsers)
|
|
1059
|
+
- Plural names for collections
|
|
1060
|
+
- Hierarchical for relationships (/users/{id}/posts)
|
|
1061
|
+
|
|
1062
|
+
### HTTP Methods
|
|
1063
|
+
- GET: Retrieve resources
|
|
1064
|
+
- POST: Create resources
|
|
1065
|
+
- PUT: Replace resources
|
|
1066
|
+
- PATCH: Partial update
|
|
1067
|
+
- DELETE: Remove resources
|
|
1068
|
+
|
|
1069
|
+
### Response Codes
|
|
1070
|
+
- 200: Success
|
|
1071
|
+
- 201: Created
|
|
1072
|
+
- 400: Bad Request
|
|
1073
|
+
- 401: Unauthorized
|
|
1074
|
+
- 404: Not Found
|
|
1075
|
+
- 500: Server Error
|
|
1076
|
+
|
|
1077
|
+
## Standards
|
|
1078
|
+
- Consistent pagination (limit, offset or cursor)
|
|
1079
|
+
- Filtering and sorting parameters
|
|
1080
|
+
- Versioning strategy (URL or header)
|
|
1081
|
+
- Error response format
|
|
1082
|
+
|
|
1083
|
+
## Documentation
|
|
1084
|
+
- OpenAPI/Swagger specification
|
|
1085
|
+
- Example requests and responses
|
|
1086
|
+
- Authentication details
|
|
1087
|
+
|
|
1088
|
+
## API to Design
|
|
1089
|
+
$ARGUMENTS`},{id:"security-review",name:"Security Review",description:"Review code for security vulnerabilities and best practices",icon:$f,color:"text-red-400",bgColor:"bg-red-500/10",category:"building",suggestedName:"security-review",content:`# Security Review Instructions
|
|
1090
|
+
|
|
1091
|
+
Perform a comprehensive security review of the code.
|
|
1092
|
+
|
|
1093
|
+
## OWASP Top 10 Check
|
|
1094
|
+
|
|
1095
|
+
### Injection
|
|
1096
|
+
- SQL injection
|
|
1097
|
+
- Command injection
|
|
1098
|
+
- LDAP injection
|
|
1099
|
+
|
|
1100
|
+
### Broken Authentication
|
|
1101
|
+
- Weak password policies
|
|
1102
|
+
- Session management issues
|
|
1103
|
+
- Credential exposure
|
|
1104
|
+
|
|
1105
|
+
### Sensitive Data Exposure
|
|
1106
|
+
- Unencrypted sensitive data
|
|
1107
|
+
- Weak cryptography
|
|
1108
|
+
- Logging sensitive information
|
|
1109
|
+
|
|
1110
|
+
### XSS (Cross-Site Scripting)
|
|
1111
|
+
- Reflected XSS
|
|
1112
|
+
- Stored XSS
|
|
1113
|
+
- DOM-based XSS
|
|
1114
|
+
|
|
1115
|
+
### Insecure Deserialization
|
|
1116
|
+
- Untrusted data deserialization
|
|
1117
|
+
- Object injection
|
|
1118
|
+
|
|
1119
|
+
## Additional Checks
|
|
1120
|
+
- Input validation
|
|
1121
|
+
- Output encoding
|
|
1122
|
+
- Access control
|
|
1123
|
+
- Security headers
|
|
1124
|
+
- Dependency vulnerabilities
|
|
1125
|
+
|
|
1126
|
+
## Output Format
|
|
1127
|
+
1. **Critical** - Immediate action required
|
|
1128
|
+
2. **High** - Address soon
|
|
1129
|
+
3. **Medium** - Plan to fix
|
|
1130
|
+
4. **Low** - Best practice improvements
|
|
1131
|
+
|
|
1132
|
+
$ARGUMENTS`},{id:"git-commit",name:"Git Commit",description:"Generate well-structured commit messages",icon:X3,color:"text-green-400",bgColor:"bg-green-500/10",category:"productivity",suggestedName:"commit",content:`# Git Commit Message Generator
|
|
1133
|
+
|
|
1134
|
+
Generate well-structured, conventional commit messages.
|
|
1135
|
+
|
|
1136
|
+
## Commit Format
|
|
1137
|
+
|
|
1138
|
+
\`\`\`
|
|
1139
|
+
<type>(<scope>): <subject>
|
|
1140
|
+
|
|
1141
|
+
<body>
|
|
1142
|
+
|
|
1143
|
+
<footer>
|
|
1144
|
+
\`\`\`
|
|
1145
|
+
|
|
1146
|
+
## Types
|
|
1147
|
+
- **feat**: New feature
|
|
1148
|
+
- **fix**: Bug fix
|
|
1149
|
+
- **docs**: Documentation only
|
|
1150
|
+
- **style**: Formatting, no code change
|
|
1151
|
+
- **refactor**: Code change, no feature/fix
|
|
1152
|
+
- **perf**: Performance improvement
|
|
1153
|
+
- **test**: Adding tests
|
|
1154
|
+
- **chore**: Maintenance tasks
|
|
1155
|
+
|
|
1156
|
+
## Guidelines
|
|
1157
|
+
- Subject line: 50 chars max, imperative mood
|
|
1158
|
+
- Body: Explain what and why, not how
|
|
1159
|
+
- Footer: Reference issues (Fixes #123)
|
|
1160
|
+
|
|
1161
|
+
## Example
|
|
1162
|
+
|
|
1163
|
+
\`\`\`
|
|
1164
|
+
feat(auth): add OAuth2 login support
|
|
1165
|
+
|
|
1166
|
+
Implement OAuth2 authentication flow with Google and GitHub providers.
|
|
1167
|
+
This allows users to sign in without creating a separate account.
|
|
1168
|
+
|
|
1169
|
+
- Add OAuth2 configuration
|
|
1170
|
+
- Create callback handlers
|
|
1171
|
+
- Update user model for provider data
|
|
1172
|
+
|
|
1173
|
+
Fixes #456
|
|
1174
|
+
\`\`\`
|
|
1175
|
+
|
|
1176
|
+
## Changes to Commit
|
|
1177
|
+
$ARGUMENTS`},{id:"pr-review",name:"PR Review",description:"Provide thorough pull request reviews",icon:W3,color:"text-fuchsia-400",bgColor:"bg-fuchsia-500/10",category:"productivity",suggestedName:"pr-review",content:`# Pull Request Review
|
|
1178
|
+
|
|
1179
|
+
Provide a thorough and constructive PR review.
|
|
1180
|
+
|
|
1181
|
+
## Review Checklist
|
|
1182
|
+
|
|
1183
|
+
### Code Quality
|
|
1184
|
+
- [ ] Code follows project conventions
|
|
1185
|
+
- [ ] No unnecessary complexity
|
|
1186
|
+
- [ ] Appropriate error handling
|
|
1187
|
+
- [ ] Good naming and readability
|
|
1188
|
+
|
|
1189
|
+
### Functionality
|
|
1190
|
+
- [ ] Meets requirements
|
|
1191
|
+
- [ ] Edge cases handled
|
|
1192
|
+
- [ ] No regressions introduced
|
|
1193
|
+
|
|
1194
|
+
### Testing
|
|
1195
|
+
- [ ] Adequate test coverage
|
|
1196
|
+
- [ ] Tests are meaningful
|
|
1197
|
+
- [ ] All tests pass
|
|
1198
|
+
|
|
1199
|
+
### Documentation
|
|
1200
|
+
- [ ] Code comments where needed
|
|
1201
|
+
- [ ] README updated if applicable
|
|
1202
|
+
- [ ] API docs updated
|
|
1203
|
+
|
|
1204
|
+
### Security
|
|
1205
|
+
- [ ] No security vulnerabilities
|
|
1206
|
+
- [ ] Sensitive data handled properly
|
|
1207
|
+
|
|
1208
|
+
## Feedback Style
|
|
1209
|
+
- Be specific and constructive
|
|
1210
|
+
- Explain the "why" behind suggestions
|
|
1211
|
+
- Distinguish blocking vs. non-blocking feedback
|
|
1212
|
+
- Acknowledge good work
|
|
1213
|
+
|
|
1214
|
+
## Review Format
|
|
1215
|
+
- **Approve**: Ready to merge
|
|
1216
|
+
- **Request Changes**: Must address before merge
|
|
1217
|
+
- **Comment**: Non-blocking feedback
|
|
1218
|
+
|
|
1219
|
+
$ARGUMENTS`},{id:"workflow-automation",name:"Workflow Automation",description:"Design CI/CD pipelines and automation workflows",icon:oS,color:"text-lime-400",bgColor:"bg-lime-500/10",category:"productivity",suggestedName:"workflow",content:`# Workflow Automation Guide
|
|
1220
|
+
|
|
1221
|
+
Design and implement CI/CD pipelines and automation workflows.
|
|
1222
|
+
|
|
1223
|
+
## Common Workflows
|
|
1224
|
+
|
|
1225
|
+
### CI Pipeline
|
|
1226
|
+
- Lint and format checking
|
|
1227
|
+
- Unit tests
|
|
1228
|
+
- Integration tests
|
|
1229
|
+
- Build verification
|
|
1230
|
+
- Security scanning
|
|
1231
|
+
|
|
1232
|
+
### CD Pipeline
|
|
1233
|
+
- Environment promotion
|
|
1234
|
+
- Database migrations
|
|
1235
|
+
- Blue/green deployment
|
|
1236
|
+
- Rollback procedures
|
|
1237
|
+
|
|
1238
|
+
## GitHub Actions Example
|
|
1239
|
+
|
|
1240
|
+
\`\`\`yaml
|
|
1241
|
+
name: CI
|
|
1242
|
+
on: [push, pull_request]
|
|
1243
|
+
jobs:
|
|
1244
|
+
test:
|
|
1245
|
+
runs-on: ubuntu-latest
|
|
1246
|
+
steps:
|
|
1247
|
+
- uses: actions/checkout@v4
|
|
1248
|
+
- uses: actions/setup-node@v4
|
|
1249
|
+
- run: npm ci
|
|
1250
|
+
- run: npm test
|
|
1251
|
+
\`\`\`
|
|
1252
|
+
|
|
1253
|
+
## Best Practices
|
|
1254
|
+
- Fast feedback (parallelize when possible)
|
|
1255
|
+
- Cache dependencies
|
|
1256
|
+
- Fail fast on critical issues
|
|
1257
|
+
- Clear status reporting
|
|
1258
|
+
- Secrets management
|
|
1259
|
+
|
|
1260
|
+
## Workflow to Create
|
|
1261
|
+
$ARGUMENTS`}],XF=[{id:"all",label:"All"},{id:"development",label:"Development"},{id:"design",label:"Design"},{id:"writing",label:"Writing"},{id:"building",label:"Building"},{id:"productivity",label:"Productivity"}];function WF({open:e,onOpenChange:t}){const[n,i]=y.useState("template"),[l,c]=y.useState("all"),[u,f]=y.useState(null),[h,m]=y.useState(""),[g,p]=y.useState(""),[b,w]=y.useState(""),[S,j]=y.useState(""),[E,N]=y.useState(!1),[T,k]=y.useState(null),[R,z]=y.useState([]),D=Sn(),O=Tt({mutationFn:({name:$,content:_})=>Ue.createSkill($,_),onSuccess:()=>{D.invalidateQueries({queryKey:["skills"]}),Fe.success("Skill created successfully"),X()},onError:$=>{Fe.error(`Failed to create skill: ${$.message}`)}}),B=Tt({mutationFn:$=>Ue.validateSkill($),onSuccess:$=>{$.valid?z([]):z($.errors)}}),q=y.useCallback(()=>{const $=[];return g&&$.push(`description: ${g}`),S&&$.push(`argument-hint: ${S}`),E&&$.push("disable-model-invocation: true"),$.length>0?`---
|
|
1262
|
+
${$.join(`
|
|
1263
|
+
`)}
|
|
1264
|
+
---
|
|
1265
|
+
|
|
1266
|
+
${b}`:b},[g,S,E,b]);y.useEffect(()=>{if(!b.trim()){z([]);return}const $=setTimeout(()=>{B.mutate(q())},500);return()=>clearTimeout($)},[b,g,S,E]);const L=y.useCallback($=>$.trim()?u5.test($)?(k(null),!0):(k(d5),!1):(k("Name is required"),!1),[]),ne=$=>{m($),L($)},X=()=>{i("template"),c("all"),f(null),m(""),p(""),w(""),j(""),N(!1),k(null),z([]),t(!1)},ue=$=>{const _=tN.find(U=>U.id===$);_&&(f($),w(_.content),$!=="blank"&&(p(_.description),_.suggestedName&&(m(_.suggestedName),L(_.suggestedName))))},ie=()=>{n==="template"&&u?i("details"):n==="details"&&L(h)&&i("content")},te=()=>{n==="content"?i("details"):n==="details"&&i("template")},I=()=>{if(L(h)){if(R.length>0){Fe.error("Please fix validation errors before saving");return}O.mutate({name:h,content:q()})}},Q=$=>{($.metaKey||$.ctrlKey)&&$.key==="s"&&($.preventDefault(),n==="content"&&I()),($.metaKey||$.ctrlKey)&&$.key==="Enter"&&($.preventDefault(),n==="content"?I():ie())},Y=tN.filter($=>l==="all"||$.category===l||$.id==="blank");return a.jsx(fr,{open:e,onOpenChange:X,children:a.jsxs(Xn,{className:"max-w-2xl max-h-[85vh] flex flex-col overflow-hidden",onKeyDown:Q,children:[a.jsx(mr,{className:"pb-4 border-b border-border/50",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[n!=="template"&&a.jsx(me,{variant:"ghost",size:"icon",onClick:te,className:"h-8 w-8 -ml-2",children:a.jsx(Fx,{className:"h-4 w-4"})}),a.jsxs("div",{children:[a.jsxs(hr,{className:"text-base font-semibold flex items-center gap-2",children:[a.jsx($t,{className:"h-4 w-4 text-primary"}),"Create Skill"]}),a.jsxs(pr,{className:"text-sm mt-0.5",children:[n==="template"&&"Choose a template to get started",n==="details"&&"Configure skill metadata",n==="content"&&"Customize skill instructions"]})]})]}),a.jsx("div",{className:"flex items-center gap-1.5",children:["template","details","content"].map(($,_)=>a.jsxs("div",{className:G("flex items-center gap-1.5",_>0&&"ml-1"),children:[_>0&&a.jsx("div",{className:G("w-6 h-px",n===$||["details","content"].includes(n)&&$==="template"||n==="content"&&$==="details"?"bg-primary/50":"bg-border")}),a.jsx("div",{className:G("w-6 h-6 rounded-full flex items-center justify-center text-xs font-medium transition-colors",n===$?"bg-primary text-primary-foreground":["details","content"].includes(n)&&$==="template"||n==="content"&&$==="details"?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:["details","content"].includes(n)&&$==="template"||n==="content"&&$==="details"?a.jsx(_r,{className:"h-3.5 w-3.5"}):_+1})]},$))})]})}),a.jsxs("div",{className:"flex-1 overflow-hidden py-4 -mx-6 px-6",children:[n==="template"&&a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsx("div",{className:"flex items-center gap-1 mb-4 pb-3 border-b border-border/50 overflow-x-auto",children:XF.map($=>a.jsx("button",{onClick:()=>c($.id),className:G("px-3 py-1.5 rounded-full text-xs font-medium transition-colors whitespace-nowrap",l===$.id?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent"),children:$.label},$.id))}),a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsx("div",{className:"grid grid-cols-2 gap-2",children:Y.map($=>{const _=$.icon;return a.jsxs("button",{onClick:()=>ue($.id),className:G("group flex items-start gap-3 p-3 rounded-xl text-left transition-all","border hover:border-border hover:bg-accent/50",u===$.id?"border-primary bg-primary/5 ring-1 ring-primary/20":"border-border/50"),children:[a.jsx("div",{className:G("w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0",$.bgColor),children:a.jsx(_,{className:G("h-4 w-4",$.color)})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"font-medium text-sm truncate",children:$.name}),u===$.id&&a.jsx(_r,{className:"h-3.5 w-3.5 text-primary flex-shrink-0"})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 line-clamp-2",children:$.description}),$.category!=="all"&&a.jsx(we,{variant:"secondary",className:"mt-2 text-[9px] px-1.5 py-0",children:$.category})]})]},$.id)})})})]}),n==="details"&&a.jsx(at,{className:"h-full -mr-3 pr-3",children:a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"space-y-3",children:[a.jsx(Dt,{htmlFor:"skill-name",className:"text-sm font-medium",children:"Skill Name"}),a.jsxs("div",{className:"flex gap-3",children:[a.jsxs("div",{className:"flex-1 space-y-2",children:[a.jsx(Et,{id:"skill-name",placeholder:"my-skill-name",value:h,onChange:$=>ne($.target.value),className:G("h-10",T?"border-destructive focus-visible:ring-destructive":"")}),T?a.jsx("p",{className:"text-xs text-destructive",children:T}):a.jsx("p",{className:"text-xs text-muted-foreground",children:"Lowercase letters, numbers, and hyphens only"})]}),h&&!T&&a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-muted/50 border border-border/50 h-10",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground"}),a.jsxs("code",{className:"text-sm font-mono text-primary",children:["/",h]})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"skill-description",className:"text-sm font-medium",children:"Description"}),a.jsx(Et,{id:"skill-description",placeholder:"A brief description of what this skill does",value:g,onChange:$=>p($.target.value),className:"h-10"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Helps Claude understand when to suggest this skill"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(Dt,{htmlFor:"argument-hint",className:"text-sm font-medium",children:["Argument Hint",a.jsx("span",{className:"text-muted-foreground font-normal ml-1",children:"(optional)"})]}),a.jsx(Et,{id:"argument-hint",placeholder:"e.g., file path, issue number, description...",value:S,onChange:$=>j($.target.value),className:"h-10"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Hint shown when user types ",a.jsxs("code",{className:"text-primary",children:["/",h||"skill"]})]})]}),a.jsx("div",{className:"pt-4 border-t border-border/50 space-y-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"space-y-0.5",children:[a.jsx(Dt,{className:"text-sm font-medium",children:"Manual Invocation Only"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Prevent Claude from auto-suggesting this skill"})]}),a.jsx(b5,{checked:E,onCheckedChange:N})]})}),a.jsxs("div",{className:"flex gap-3 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[a.jsx(Kn,{className:"h-4 w-4 text-amber-500 flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"text-xs text-amber-200/80",children:[a.jsx("strong",{className:"text-amber-400",children:"Tip:"})," Use ",a.jsx("code",{className:"bg-amber-500/20 px-1 rounded",children:"$ARGUMENTS"})," in your skill content to accept dynamic input when invoked."]})]})]})}),n==="content"&&a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center gap-6 text-xs text-muted-foreground mb-3",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(xo,{className:"h-3.5 w-3.5"}),"Markdown supported"]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Vt,{className:"h-3.5 w-3.5"}),"Use ",a.jsx("code",{className:"text-primary",children:"$ARGUMENTS"})," for input"]})]}),a.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx(Dt,{htmlFor:"skill-content",className:"text-sm font-medium",children:"Instructions"}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[b.length," characters"]})]}),a.jsx(el,{id:"skill-content",value:b,onChange:$=>w($.target.value),className:"flex-1 font-mono text-sm resize-none leading-relaxed min-h-[240px]",placeholder:`# Skill Instructions
|
|
1267
|
+
|
|
1268
|
+
Write your skill instructions here...`}),R.length>0&&a.jsx("div",{className:"space-y-1 p-3 rounded-lg bg-destructive/10 border border-destructive/20 mt-2",children:R.map(($,_)=>a.jsx("p",{className:"text-xs text-destructive",children:$},_))})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 border border-border/50 space-y-2 mt-4",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[a.jsx(wn,{className:"h-3.5 w-3.5"}),a.jsx("span",{children:"How to use this skill"})]}),a.jsx("div",{className:"flex items-center gap-2",children:a.jsxs("code",{className:"text-sm font-mono bg-background px-2 py-1 rounded border border-border/50 text-primary",children:["/",h||"my-skill",S&&a.jsxs("span",{className:"text-muted-foreground",children:[" ",S]})]})}),g&&a.jsx("p",{className:"text-xs text-muted-foreground",children:g})]})]})]}),a.jsxs(Wn,{className:"border-t border-border/50 pt-4 gap-2",children:[a.jsx(me,{variant:"outline",onClick:X,size:"sm",children:"Cancel"}),n!=="content"?a.jsxs(me,{onClick:ie,disabled:n==="template"?!u:!!T||!h,size:"sm",className:"gap-1.5",children:["Continue",a.jsx(Qi,{className:"h-3.5 w-3.5"})]}):a.jsx(me,{onClick:I,disabled:O.isPending||!!T||R.length>0,size:"sm",children:O.isPending?"Creating...":"Create Skill"})]})]})})}function ZF({open:e,onOpenChange:t,skill:n}){const[i,l]=y.useState(""),[c,u]=y.useState([]),f=Sn();y.useEffect(()=>{n&&(l(n.content),u([]))},[n]);const h=Tt({mutationFn:({path:w,content:S})=>Ue.updateSkill(w,S),onSuccess:()=>{f.invalidateQueries({queryKey:["skills"]}),Fe.success("Skill updated successfully"),g()},onError:w=>{Fe.error(`Failed to update skill: ${w.message}`)}}),m=Tt({mutationFn:w=>Ue.validateSkill(w),onSuccess:w=>{w.valid?u([]):u(w.errors)}});y.useEffect(()=>{if(!i.trim()){u([]);return}const w=setTimeout(()=>{m.mutate(i)},500);return()=>clearTimeout(w)},[i]);const g=()=>{l(""),u([]),t(!1)},p=()=>{if(n){if(c.length>0){Fe.error("Please fix validation errors before saving");return}h.mutate({path:n.path,content:i})}},b=w=>{(w.metaKey||w.ctrlKey)&&w.key==="s"&&(w.preventDefault(),p())};return n?a.jsx(fr,{open:e,onOpenChange:g,children:a.jsxs(Xn,{className:"max-w-3xl max-h-[90vh] flex flex-col",onKeyDown:b,children:[a.jsxs(mr,{children:[a.jsxs(hr,{children:["Edit Skill: ",n.name]}),a.jsx(pr,{children:"Modify the skill content and frontmatter configuration."})]}),a.jsx("div",{className:"flex-1 space-y-4 overflow-y-auto py-4",children:a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Dt,{htmlFor:"skill-content",children:"Content"}),a.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:n.path})]}),a.jsx(el,{id:"skill-content",value:i,onChange:w=>l(w.target.value),className:"font-mono text-sm min-h-[400px] resize-y"}),c.length>0&&a.jsx("div",{className:"space-y-1",children:c.map((w,S)=>a.jsx("p",{className:"text-sm text-destructive",children:w},S))})]})}),a.jsx(Wn,{children:a.jsxs("div",{className:"flex items-center justify-between w-full",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Press Cmd+S to save"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(me,{variant:"outline",onClick:g,children:"Cancel"}),a.jsx(me,{onClick:p,disabled:h.isPending||c.length>0,children:h.isPending?"Saving...":"Save Changes"})]})]})})]})}):null}function JF(){const[e,t]=y.useState(null),[n,i]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState(!1),[h,m]=y.useState(!1),g=Sn(),{data:p,isLoading:b}=pt({queryKey:["skills"],queryFn:Ue.getSkills}),w=Tt({mutationFn:Ue.deleteSkill,onSuccess:()=>{g.invalidateQueries({queryKey:["skills"]}),t(null),c(null),Fe.success("Skill deleted")},onError:E=>{Fe.error(`Failed to delete: ${E.message}`)}}),S=p==null?void 0:p.find(E=>E.id===e),j=p==null?void 0:p.filter(E=>E.name.toLowerCase().includes(n.toLowerCase())||E.path.toLowerCase().includes(n.toLowerCase()));return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex gap-6",children:[a.jsxs("div",{className:G("flex flex-col transition-all duration-300",e?"w-[340px] flex-shrink-0":"w-full max-w"),children:[a.jsxs("div",{className:"mb-6 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx($t,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Skills"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Custom tools and capabilities"})]}),a.jsxs(me,{onClick:()=>f(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"New Skill"]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{placeholder:"Search skills...",value:n,onChange:E=>i(E.target.value),className:"pl-9 h-9"})]})]}),b?a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-24 w-full rounded-lg"}),a.jsx(Te,{className:"h-24 w-full rounded-lg"}),a.jsx(Te,{className:"h-24 w-full rounded-lg"})]}):a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsxs("div",{className:G("grid gap-3 pb-6",!e&&"md:grid-cols-2"),children:[j==null?void 0:j.map(E=>a.jsxs(fn,{className:G("cursor-pointer transition-all duration-150 border-border/50",e===E.id?"bg-accent border-border ring-1 ring-border":"hover:border-border hover:bg-accent/50"),onClick:()=>t(E.id),children:[a.jsxs(Pr,{className:"p-4 pb-2",children:[a.jsx("div",{className:"flex justify-between items-start gap-2",children:a.jsxs(Zr,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),E.name]})}),a.jsx(qi,{className:"text-xs truncate mt-1",children:E.path.split("/").pop()})]}),E.description&&a.jsx(mn,{className:"p-4 pt-0",children:a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:E.description})})]},E.id)),(j==null?void 0:j.length)===0&&a.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-16 text-muted-foreground",children:[a.jsx(wn,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"No skills found"})]})]})})]}),e&&a.jsx("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-lg border border-border/50 overflow-hidden",children:S?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-5 py-4 bg-muted/30",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("h2",{className:"text-base font-semibold truncate flex items-center gap-2",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),S.name]}),a.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:S.path})]}),a.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>m(!0),children:a.jsx(Yx,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>c(S.id),children:a.jsx(Gf,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:()=>t(null),className:"h-8 w-8",children:a.jsx(wa,{className:"h-4 w-4"})})]})]}),S.description&&a.jsx("div",{className:"px-5 py-3 border-b border-border/50 bg-muted/10",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:S.description})}),a.jsx(at,{className:"flex-1",children:a.jsx("pre",{className:"p-5 text-sm font-mono whitespace-pre-wrap text-foreground/90 leading-relaxed",children:S.content})})]}):a.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:a.jsxs("div",{className:"text-center",children:[a.jsx(wn,{className:"h-10 w-10 mx-auto mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"Select a skill to view"})]})})}),a.jsx(fr,{open:!!l,onOpenChange:()=>c(null),children:a.jsxs(Xn,{children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Delete Skill"}),a.jsx(pr,{children:"Are you sure you want to delete this skill? This action cannot be undone."})]}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>c(null),children:"Cancel"}),a.jsx(me,{variant:"destructive",onClick:()=>l&&w.mutate(l),disabled:w.isPending,children:w.isPending?"Deleting...":"Delete"})]})]})}),a.jsx(WF,{open:u,onOpenChange:f}),a.jsx(ZF,{open:h,onOpenChange:m,skill:S||null})]})}const eH=['Try: "I need an agent that reviews code for security vulnerabilities"','Try: "Create a frontend dev, backend dev, and code reviewer team"','Try: "Make an agent that writes comprehensive unit tests for React"'];function tH({isOpen:e,onClose:t}){const[n,i]=y.useState(""),[l,c]=y.useState(null),[u,f]=y.useState(new Set),[h,m]=y.useState(new Set),g=Sn(),p=Tt({mutationFn:N=>es.generate(N),onSuccess:N=>{c(N),N.error?Fe.error(N.error):(f(new Set(N.agents.map(T=>T.name))),m(new Set(N.teams.map(T=>T.name))),N.agents.length===0&&N.teams.length===0&&Fe.warning("No agents or teams were generated. Try being more specific."))},onError:N=>{Fe.error(`Generation failed: ${N.message}`)}}),b=Tt({mutationFn:()=>{if(!l)throw new Error("No generation result");return es.applyGeneration(l.id,Array.from(u),Array.from(h))},onSuccess:N=>{if(N.success){const T=N.created.agents.length+N.created.teams.length;Fe.success(`Created ${T} item(s) successfully!`),g.invalidateQueries({queryKey:["agents"]}),g.invalidateQueries({queryKey:["teams"]}),c(null),i(""),f(new Set),m(new Set)}else N.errors.forEach(T=>Fe.error(T))},onError:N=>{Fe.error(`Failed to create: ${N.message}`)}}),w=()=>{if(n.trim().length<10){Fe.warning("Please provide a more detailed description");return}p.mutate(n)},S=N=>{const T=new Set(u);T.has(N)?T.delete(N):T.add(N),f(T)},j=N=>{const T=new Set(h);T.has(N)?T.delete(N):T.add(N),m(T)},E=(u.size>0||h.size>0)&&!b.isPending;return e?a.jsxs("div",{className:"w-80 border-l border-border/50 bg-card flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border/50",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"p-1.5 rounded-lg bg-gradient-to-br from-purple-500/20 to-blue-500/20",children:a.jsx(Vt,{className:"h-4 w-4 text-purple-400"})}),a.jsx("span",{className:"font-medium text-sm",children:"AI Agent Builder"})]}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:t,children:a.jsx(wa,{className:"h-4 w-4"})})]}),a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"p-4 space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Describe what you need"}),a.jsx("div",{className:"relative",children:a.jsx("textarea",{value:n,onChange:N=>i(N.target.value),placeholder:"I need an agent that...",className:"w-full h-24 px-3 py-2 text-sm rounded-lg border border-border/50 bg-background resize-none focus:outline-none focus:ring-2 focus:ring-primary/50",disabled:p.isPending})}),a.jsx(me,{className:"w-full",onClick:w,disabled:p.isPending||n.trim().length<10,children:p.isPending?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"h-4 w-4 mr-2 animate-spin"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(lS,{className:"h-4 w-4 mr-2"}),"Generate with AI"]})})]}),!l&&!p.isPending&&a.jsxs("div",{className:"space-y-2 pt-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[a.jsx(Kn,{className:"h-3 w-3"}),a.jsx("span",{children:"Try describing:"})]}),a.jsx("div",{className:"space-y-1.5",children:eH.map((N,T)=>a.jsx("button",{onClick:()=>i(N.replace('Try: "',"").replace('"',"")),className:"w-full text-left text-xs p-2 rounded-lg bg-muted/30 hover:bg-muted/50 transition-colors text-muted-foreground hover:text-foreground",children:N},T))})]}),p.isPending&&a.jsxs("div",{className:"py-8 text-center",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/10 mb-3",children:a.jsx(Ct,{className:"h-6 w-6 text-primary animate-spin"})}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Thinking of the perfect agents..."}),a.jsx("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"This may take up to 30 seconds"})]}),l&&!p.isPending&&a.jsxs("div",{className:"space-y-4",children:[l.agents.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(cr,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.jsxs("span",{className:"text-xs font-medium",children:["Suggested Agents (",l.agents.length,")"]})]}),a.jsx("div",{className:"space-y-2",children:l.agents.map(N=>a.jsx(nH,{agent:N,selected:u.has(N.name),onToggle:()=>S(N.name)},N.name))})]}),l.teams.length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(Ja,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.jsxs("span",{className:"text-xs font-medium",children:["Suggested Teams (",l.teams.length,")"]})]}),a.jsx("div",{className:"space-y-2",children:l.teams.map(N=>a.jsx(rH,{team:N,selected:h.has(N.name),onToggle:()=>j(N.name)},N.name))})]}),a.jsxs("div",{className:"pt-2 space-y-2",children:[a.jsx(me,{className:"w-full",onClick:()=>b.mutate(),disabled:!E,children:b.isPending?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Yi,{className:"h-4 w-4 mr-2"}),"Create Selected (",u.size+h.size,")"]})}),a.jsx(me,{variant:"outline",className:"w-full",onClick:()=>{c(null),f(new Set),m(new Set)},children:"Start Over"})]})]})]})})]}):null}function nH({agent:e,selected:t,onToggle:n}){return a.jsx("button",{onClick:n,className:G("w-full text-left p-3 rounded-lg border transition-all",t?"border-primary bg-primary/5":"border-border/50 bg-muted/20 hover:bg-muted/40"),children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:G("mt-0.5 w-4 h-4 rounded border flex items-center justify-center flex-shrink-0",t?"bg-primary border-primary":"border-muted-foreground/30"),children:t&&a.jsx(Yi,{className:"h-3 w-3 text-primary-foreground"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"flex items-center gap-1.5",children:a.jsxs("span",{className:"text-sm font-medium",children:["@",e.name]})}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mt-0.5",children:e.description}),e.allowedTools&&e.allowedTools.length>0&&a.jsxs("div",{className:"flex flex-wrap gap-1 mt-1.5",children:[e.allowedTools.slice(0,3).map(i=>a.jsx(we,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:i},i)),e.allowedTools.length>3&&a.jsxs(we,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:["+",e.allowedTools.length-3]})]})]})]})})}function rH({team:e,selected:t,onToggle:n}){return a.jsx("button",{onClick:n,className:G("w-full text-left p-3 rounded-lg border transition-all",t?"border-primary bg-primary/5":"border-border/50 bg-muted/20 hover:bg-muted/40"),children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{className:G("mt-0.5 w-4 h-4 rounded border flex items-center justify-center flex-shrink-0",t?"bg-primary border-primary":"border-muted-foreground/30"),children:t&&a.jsx(Yi,{className:"h-3 w-3 text-primary-foreground"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-sm font-medium",children:e.name}),a.jsx(we,{variant:"secondary",className:"text-[10px]",children:"Team"})]}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 mt-0.5",children:e.description}),a.jsxs("div",{className:"flex items-center gap-1 mt-1.5 text-[10px] text-muted-foreground",children:[a.jsxs("span",{children:["👑 ",e.leader.name]}),a.jsx("span",{children:"•"}),a.jsxs("span",{children:[e.teammates.length," members"]})]})]})]})})}const aH={development:a.jsx(Vx,{className:"h-4 w-4"}),review:a.jsx(Lt,{className:"h-4 w-4"}),testing:a.jsx(Kx,{className:"h-4 w-4"}),documentation:a.jsx(Lt,{className:"h-4 w-4"}),security:a.jsx($f,{className:"h-4 w-4"}),workflow:a.jsx(oS,{className:"h-4 w-4"})},sH={development:"bg-blue-500/10 text-blue-500 border-blue-500/20",review:"bg-purple-500/10 text-purple-500 border-purple-500/20",testing:"bg-green-500/10 text-green-500 border-green-500/20",documentation:"bg-amber-500/10 text-amber-500 border-amber-500/20",security:"bg-red-500/10 text-red-500 border-red-500/20",workflow:"bg-cyan-500/10 text-cyan-500 border-cyan-500/20"};function iH(){var U;const[e,t]=y.useState("agents"),[n,i]=y.useState(null),[l,c]=y.useState(null),[u,f]=y.useState(""),[h,m]=y.useState(null),[g,p]=y.useState(null),[b,w]=y.useState(!1),[S,j]=y.useState(!1),[E,N]=y.useState(!1),[T,k]=y.useState(!1),R=Sn(),{data:z,isLoading:D}=pt({queryKey:["agents"],queryFn:es.getAgents}),{data:O,isLoading:B}=pt({queryKey:["teams"],queryFn:wo.getTeams}),{data:q,isLoading:L}=pt({queryKey:["blueprints"],queryFn:()=>aj.getBlueprints()}),{data:ne}=pt({queryKey:["agent-templates"],queryFn:es.getTemplates}),X=Tt({mutationFn:es.deleteAgent,onSuccess:()=>{R.invalidateQueries({queryKey:["agents"]}),i(null),m(null),Fe.success("Agent deleted")},onError:P=>{Fe.error(`Failed to delete: ${P.message}`)}}),ue=Tt({mutationFn:wo.deleteTeam,onSuccess:()=>{R.invalidateQueries({queryKey:["teams"]}),c(null),p(null),Fe.success("Team deleted")},onError:P=>{Fe.error(`Failed to delete: ${P.message}`)}}),ie=Tt({mutationFn:aj.applyBlueprint,onSuccess:P=>{R.invalidateQueries({queryKey:[P.type==="agent"?"agents":"teams"]}),Fe.success(`${P.type==="agent"?"Agent":"Team"} "${P.name}" created successfully`)},onError:P=>{Fe.error(`Failed to apply blueprint: ${P.message}`)}}),te=z==null?void 0:z.filter(P=>P.name.toLowerCase().includes(u.toLowerCase())||P.description.toLowerCase().includes(u.toLowerCase())),I=O==null?void 0:O.filter(P=>P.name.toLowerCase().includes(u.toLowerCase())||P.description.toLowerCase().includes(u.toLowerCase())),Q=q==null?void 0:q.filter(P=>P.name.toLowerCase().includes(u.toLowerCase())||P.description.toLowerCase().includes(u.toLowerCase())),Y=z==null?void 0:z.find(P=>P.path===n),$=O==null?void 0:O.find(P=>P.id===l),_=[{id:"agents",label:"Agents",icon:cr,count:(z==null?void 0:z.length)||0},{id:"teams",label:"Teams",icon:Ja,count:(O==null?void 0:O.length)||0},{id:"blueprints",label:"Blueprints",icon:Yr,count:(q==null?void 0:q.length)||0}];return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex",children:[a.jsxs("div",{className:"flex-1 flex flex-col gap-4 min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(cr,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Agent Studio"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Configure custom agents and multi-agent teams"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(me,{variant:T?"secondary":"outline",onClick:()=>k(!T),className:"gap-2",children:[a.jsx(Vt,{className:"h-4 w-4"}),"AI Builder"]}),e==="agents"&&a.jsxs(me,{onClick:()=>w(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"New Agent"]}),e==="teams"&&a.jsxs(me,{onClick:()=>N(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"New Team"]})]})]}),a.jsx("div",{className:"flex items-center gap-1 border-b border-border/50 pb-2",children:_.map(P=>a.jsxs("button",{onClick:()=>{t(P.id),i(null),c(null),f("")},className:G("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",e===P.id?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[a.jsx(P.icon,{className:"h-4 w-4"}),P.label,a.jsx(we,{variant:"secondary",className:"ml-1 text-xs px-1.5 py-0",children:P.count})]},P.id))}),a.jsxs("div",{className:"relative max-w-md",children:[a.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{placeholder:`Search ${e}...`,value:u,onChange:P=>f(P.target.value),className:"pl-9 h-9"})]}),a.jsxs("div",{className:"flex-1 flex gap-6 min-h-0",children:[e==="agents"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("flex flex-col transition-all duration-300",n?"w-[340px] flex-shrink-0":"w-full"),children:D?a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-24 w-full rounded-lg"}),a.jsx(Te,{className:"h-24 w-full rounded-lg"})]}):a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsxs("div",{className:G("grid gap-3 pb-6",!n&&"md:grid-cols-2 lg:grid-cols-3"),children:[te==null?void 0:te.map(P=>a.jsx(lH,{agent:P,isSelected:n===P.path,onClick:()=>i(P.path)},P.path)),(te==null?void 0:te.length)===0&&a.jsx(wg,{icon:cr,message:"No agents found",action:a.jsxs(me,{variant:"outline",size:"sm",onClick:()=>w(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"Create your first agent"]})})]})})}),n&&Y&&a.jsx(uH,{title:Y.name,subtitle:Y.path,description:Y.description,icon:cr,onClose:()=>i(null),onEdit:()=>j(!0),onDelete:()=>m(Y.path),content:Y.content,badges:(U=Y.frontmatter["allowed-tools"])==null?void 0:U.split(",").map(P=>P.trim())})]}),e==="teams"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G("flex flex-col transition-all duration-300",l?"w-[340px] flex-shrink-0":"w-full"),children:B?a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-32 w-full rounded-lg"}),a.jsx(Te,{className:"h-32 w-full rounded-lg"})]}):a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsxs("div",{className:G("grid gap-3 pb-6",!l&&"md:grid-cols-2 lg:grid-cols-3"),children:[I==null?void 0:I.map(P=>a.jsx(oH,{team:P,isSelected:l===P.id,onClick:()=>c(P.id)},P.id)),(I==null?void 0:I.length)===0&&a.jsx(wg,{icon:Ja,message:"No teams found",action:a.jsxs(me,{variant:"outline",size:"sm",onClick:()=>N(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"Create your first team"]})})]})})}),l&&$&&a.jsx(dH,{team:$,onClose:()=>c(null),onDelete:()=>p($.id)})]}),e==="blueprints"&&a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:L?a.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:[a.jsx(Te,{className:"h-40 rounded-lg"}),a.jsx(Te,{className:"h-40 rounded-lg"}),a.jsx(Te,{className:"h-40 rounded-lg"})]}):a.jsxs("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 pb-6",children:[Q==null?void 0:Q.map(P=>a.jsx(cH,{blueprint:P,onApply:()=>ie.mutate(P.id),isApplying:ie.isPending},P.id)),(Q==null?void 0:Q.length)===0&&a.jsx(wg,{icon:Yr,message:"No blueprints found"})]})})]}),a.jsx(fr,{open:!!h,onOpenChange:()=>m(null),children:a.jsxs(Xn,{children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Delete Agent"}),a.jsx(pr,{children:"Are you sure you want to delete this agent? This action cannot be undone."})]}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>m(null),children:"Cancel"}),a.jsx(me,{variant:"destructive",onClick:()=>h&&X.mutate(h),disabled:X.isPending,children:X.isPending?"Deleting...":"Delete"})]})]})}),a.jsx(fr,{open:!!g,onOpenChange:()=>p(null),children:a.jsxs(Xn,{children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Delete Team"}),a.jsx(pr,{children:"Are you sure you want to delete this team configuration? This action cannot be undone."})]}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>p(null),children:"Cancel"}),a.jsx(me,{variant:"destructive",onClick:()=>g&&ue.mutate(g),disabled:ue.isPending,children:ue.isPending?"Deleting...":"Delete"})]})]})}),a.jsx(fH,{open:b,onOpenChange:w,templates:ne}),a.jsx(mH,{open:S,onOpenChange:j,agent:Y||null}),a.jsx(hH,{open:E,onOpenChange:N})]}),a.jsx(tH,{isOpen:T,onClose:()=>k(!1)})]})}function lH({agent:e,isSelected:t,onClick:n}){return a.jsxs(fn,{className:G("cursor-pointer transition-all duration-150 border-border/50",t?"bg-accent border-border ring-1 ring-border":"hover:border-border hover:bg-accent/50"),onClick:n,children:[a.jsxs(Pr,{className:"p-4 pb-2",children:[a.jsxs("div",{className:"flex justify-between items-start gap-2",children:[a.jsxs(Zr,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(cr,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),e.name]}),!e.isValid&&a.jsx(we,{variant:"destructive",className:"text-xs",children:"Invalid"})]}),a.jsx(qi,{className:"text-xs truncate mt-1",children:e.path})]}),e.description&&a.jsx(mn,{className:"p-4 pt-0",children:a.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:e.description})})]})}function oH({team:e,isSelected:t,onClick:n}){return a.jsxs(fn,{className:G("cursor-pointer transition-all duration-150 border-border/50",t?"bg-accent border-border ring-1 ring-border":"hover:border-border hover:bg-accent/50"),onClick:n,children:[a.jsxs(Pr,{className:"p-4",children:[a.jsxs("div",{className:"flex justify-between items-start gap-2",children:[a.jsxs(Zr,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(Ja,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),e.name]}),a.jsxs(we,{variant:"secondary",className:"text-xs",children:[e.teammates.length+1," members"]})]}),e.description&&a.jsx(qi,{className:"text-xs mt-1 line-clamp-2",children:e.description})]}),a.jsx(mn,{className:"p-4 pt-0",children:a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.leader.color||"#3B82F6"}}),a.jsx("span",{className:"text-xs text-muted-foreground",children:e.leader.name})]}),e.teammates.slice(0,3).map(i=>a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.color||"#6B7280"}}),a.jsx("span",{className:"text-xs text-muted-foreground",children:i.name})]},i.name)),e.teammates.length>3&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",e.teammates.length-3]})]})})]})}function cH({blueprint:e,onApply:t,isApplying:n}){const i=sH[e.category]||"bg-muted text-muted-foreground",l=aH[e.category]||a.jsx(Yr,{className:"h-4 w-4"});return a.jsxs(fn,{className:"border-border/50 hover:border-border transition-all",children:[a.jsxs(Pr,{className:"p-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[e.type==="agent"?a.jsx(cr,{className:"h-5 w-5 text-muted-foreground"}):a.jsx(Ja,{className:"h-5 w-5 text-muted-foreground"}),a.jsx(Zr,{className:"text-sm font-medium",children:e.name})]}),a.jsxs(we,{variant:"outline",className:G("text-xs",i),children:[l,a.jsx("span",{className:"ml-1",children:e.category})]})]}),a.jsx(qi,{className:"text-xs mt-2 line-clamp-2",children:e.description})]}),a.jsx(mn,{className:"p-4 pt-0",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(we,{variant:"secondary",className:"text-xs",children:e.type==="agent"?"Agent":"Team"}),a.jsxs(me,{size:"sm",onClick:c=>{c.stopPropagation(),t()},disabled:n,children:[a.jsx(Ro,{className:"h-3 w-3 mr-1.5"}),n?"Applying...":"Apply"]})]})})]})}function uH({title:e,subtitle:t,description:n,icon:i,onClose:l,onEdit:c,onDelete:u,content:f,badges:h}){return a.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-lg border border-border/50 overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-5 py-4 bg-muted/30",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("h2",{className:"text-base font-semibold truncate flex items-center gap-2",children:[a.jsx(i,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),e]}),a.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t})]}),a.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:c,children:a.jsx(Yx,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u,children:a.jsx(Gf,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:l,className:"h-8 w-8",children:a.jsx(wa,{className:"h-4 w-4"})})]})]}),(n||h)&&a.jsxs("div",{className:"px-5 py-3 border-b border-border/50 bg-muted/10 space-y-2",children:[n&&a.jsx("p",{className:"text-sm text-muted-foreground",children:n}),h&&h.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.map(m=>a.jsx(we,{variant:"secondary",className:"text-xs",children:m},m))})]}),a.jsx(at,{className:"flex-1",children:a.jsx("pre",{className:"p-5 text-sm font-mono whitespace-pre-wrap text-foreground/90 leading-relaxed",children:f})})]})}function dH({team:e,onClose:t,onDelete:n}){const[i,l]=y.useState("members"),{data:c,isLoading:u}=pt({queryKey:["team-instructions",e.id],queryFn:()=>wo.getInstructions(e.id)}),f=Tt({mutationFn:()=>wo.exportTeam(e.id),onSuccess:m=>{const g=new Blob([m],{type:"application/json"}),p=URL.createObjectURL(g),b=document.createElement("a");b.href=p,b.download=`${e.name}-blueprint.json`,b.click(),URL.revokeObjectURL(p),Fe.success("Blueprint exported")},onError:m=>{Fe.error(`Failed to export: ${m.message}`)}}),h=(m,g)=>{navigator.clipboard.writeText(m),Fe.success(`${g} copied to clipboard`)};return a.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-lg border border-border/50 overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-5 py-4 bg-muted/30",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("h2",{className:"text-base font-semibold truncate flex items-center gap-2",children:[a.jsx(Ja,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),e.name]}),a.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:e.description})]}),a.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>f.mutate(),disabled:f.isPending,children:a.jsx(Y3,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:n,children:a.jsx(Gf,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8",children:a.jsx(wa,{className:"h-4 w-4"})})]})]}),a.jsx("div",{className:"flex border-b border-border/50 px-5",children:[{id:"members",label:"Team Members",icon:Ja},{id:"invoke",label:"How to Invoke",icon:Ro},{id:"setup",label:"Project Setup",icon:Lt}].map(m=>a.jsxs("button",{onClick:()=>l(m.id),className:G("flex items-center gap-1.5 px-3 py-2.5 text-sm border-b-2 -mb-px transition-colors",i===m.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:[a.jsx(m.icon,{className:"h-3.5 w-3.5"}),m.label]},m.id))}),a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"p-5 space-y-6",children:[i==="members"&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx($3,{className:"h-4 w-4 text-primary"}),"Team Leader"]}),a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30 border border-border/50",children:[a.jsx("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:e.leader.color||"#3B82F6"}}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium",children:e.leader.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:e.leader.role})]}),e.leader.agentRef&&a.jsxs(we,{variant:"outline",className:"text-xs",children:["@",e.leader.agentRef]})]})]}),a.jsxs("div",{children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Ja,{className:"h-4 w-4 text-muted-foreground"}),"Teammates (",e.teammates.length,")"]}),a.jsx("div",{className:"space-y-2",children:e.teammates.map((m,g)=>a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30 border border-border/50",children:[a.jsx("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:m.color||"#6B7280"}}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium",children:m.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:m.role})]}),m.agentRef&&a.jsxs(we,{variant:"outline",className:"text-xs",children:["@",m.agentRef]})]},g))})]}),e.planFile&&a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium mb-2",children:"Plan File"}),a.jsx(we,{variant:"outline",children:e.planFile})]}),a.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[a.jsxs("p",{children:["Created: ",new Date(e.createdAt).toLocaleString()]}),a.jsxs("p",{children:["Modified: ",new Date(e.modifiedAt).toLocaleString()]})]})]}),i==="invoke"&&a.jsx(a.Fragment,{children:u?a.jsxs("div",{className:"space-y-4",children:[a.jsx(Te,{className:"h-20"}),a.jsx(Te,{className:"h-32"})]}):c?a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium mb-2",children:"Slash Command"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Use this command in Claude Code to spawn this team"}),a.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-muted/30 border border-border/50 font-mono text-sm",children:[a.jsx("code",{className:"flex-1",children:c.slashCommand}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>h(c.slashCommand,"Slash command"),children:a.jsx(qc,{className:"h-3.5 w-3.5"})})]})]}),c.agentCommands.length>0&&a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium mb-2",children:"Agent Commands"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Invoke individual agents directly"}),a.jsx("div",{className:"space-y-2",children:c.agentCommands.map((m,g)=>a.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 rounded-lg bg-muted/30 border border-border/50",children:[a.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.agent,":"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:"font-mono text-sm",children:m.command}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>h(m.command,"Command"),children:a.jsx(qc,{className:"h-3 w-3"})})]})]},g))})]})]}):a.jsx("p",{className:"text-sm text-muted-foreground",children:"Failed to load instructions"})}),i==="setup"&&a.jsx(a.Fragment,{children:u?a.jsx(Te,{className:"h-64"}):c?a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h3",{className:"text-sm font-medium",children:"CLAUDE.md Snippet"}),a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>h(c.claudeMdSnippet,"CLAUDE.md snippet"),children:[a.jsx(qc,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Add this to your project's CLAUDE.md to enable team invocation"}),a.jsx("pre",{className:"p-4 rounded-lg bg-muted/30 border border-border/50 text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:c.claudeMdSnippet})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("h3",{className:"text-sm font-medium",children:"Full Setup Guide"}),a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>h(c.projectSetup,"Setup guide"),children:[a.jsx(qc,{className:"h-3.5 w-3.5 mr-1.5"}),"Copy"]})]}),a.jsx("pre",{className:"p-4 rounded-lg bg-muted/30 border border-border/50 text-xs font-mono whitespace-pre-wrap overflow-x-auto",children:c.projectSetup})]})]}):a.jsx("p",{className:"text-sm text-muted-foreground",children:"Failed to load setup information"})})]})})]})}function wg({icon:e,message:t,action:n}){return a.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-16 text-muted-foreground",children:[a.jsx(e,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:t}),n&&a.jsx("div",{className:"mt-4",children:n})]})}function fH({open:e,onOpenChange:t,templates:n}){const[i,l]=y.useState(""),[c,u]=y.useState("default"),[f,h]=y.useState(""),[m,g]=y.useState("select"),p=Sn(),b=Tt({mutationFn:()=>es.createAgent(i,f),onSuccess:()=>{p.invalidateQueries({queryKey:["agents"]}),Fe.success("Agent created"),t(!1),S()},onError:j=>{Fe.error(`Failed to create agent: ${j.message}`)}}),w=async()=>{try{const j=await es.getTemplate(c);h(j);const E=j.match(/name:\s*([a-z0-9-]+)/);E&&l(E[1]),g("edit")}catch{Fe.error("Failed to load template")}},S=()=>{l(""),u("default"),h(""),g("select")};return a.jsx(fr,{open:e,onOpenChange:j=>{j||S(),t(j)},children:a.jsxs(Xn,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Create New Agent"}),a.jsx(pr,{children:m==="select"?"Select a template to get started":"Customize your agent configuration"})]}),m==="select"?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid gap-3 py-4 max-h-[400px] overflow-auto",children:n==null?void 0:n.map(j=>a.jsxs("div",{onClick:()=>u(j.id),className:G("p-4 rounded-lg border cursor-pointer transition-all",c===j.id?"border-primary bg-primary/5":"border-border/50 hover:border-border"),children:[a.jsx("p",{className:"font-medium text-sm",children:j.name}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:j.description})]},j.id))}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsx(me,{onClick:w,children:"Continue"})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex-1 space-y-4 py-4 overflow-auto",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"agent-name",children:"Agent Name"}),a.jsx(Et,{id:"agent-name",value:i,onChange:j=>l(j.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-agent"})]}),a.jsxs("div",{className:"space-y-2 flex-1",children:[a.jsx(Dt,{htmlFor:"agent-content",children:"Configuration (AGENT.md)"}),a.jsx(el,{id:"agent-content",value:f,onChange:j=>h(j.target.value),className:"font-mono text-sm min-h-[300px]",placeholder:"---\\nname: my-agent\\ndescription: A custom agent\\n---\\n\\n# My Agent\\n\\nInstructions..."})]})]}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>g("select"),children:"Back"}),a.jsx(me,{onClick:()=>b.mutate(),disabled:!i||!f||b.isPending,children:b.isPending?"Creating...":"Create Agent"})]})]})]})})}function mH({open:e,onOpenChange:t,agent:n}){const[i,l]=y.useState(""),c=Sn();y.useState(()=>{n&&l(n.content)});const u=Tt({mutationFn:()=>n?es.updateAgent(n.path,i):Promise.reject("No agent"),onSuccess:()=>{c.invalidateQueries({queryKey:["agents"]}),Fe.success("Agent updated"),t(!1)},onError:h=>{Fe.error(`Failed to update agent: ${h.message}`)}}),f=h=>{h&&n&&l(n.content),t(h)};return a.jsx(fr,{open:e,onOpenChange:f,children:a.jsxs(Xn,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[a.jsxs(mr,{children:[a.jsxs(hr,{children:["Edit Agent: ",n==null?void 0:n.name]}),a.jsx(pr,{children:"Modify the agent configuration"})]}),a.jsx("div",{className:"flex-1 py-4 overflow-auto",children:a.jsx(el,{value:i,onChange:h=>l(h.target.value),className:"font-mono text-sm min-h-[400px] h-full"})}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsx(me,{onClick:()=>u.mutate(),disabled:!i||u.isPending,children:u.isPending?"Saving...":"Save Changes"})]})]})})}function hH({open:e,onOpenChange:t}){const[n,i]=y.useState(""),[l,c]=y.useState(""),[u,f]=y.useState(""),[h,m]=y.useState("Team coordinator"),[g,p]=y.useState([]),b=Sn(),{data:w,isLoading:S}=pt({queryKey:["available-agents"],queryFn:()=>wo.getAvailableAgents(),enabled:e}),{data:j}=pt({queryKey:["agents"],queryFn:()=>es.getAgents(),enabled:e}),E=Tt({mutationFn:()=>{const O=g.filter(B=>B.agentId).map(B=>{const q=j==null?void 0:j.find(L=>L.name===B.agentId);return{name:B.agentId,role:B.role||(q==null?void 0:q.description)||"Team member",agentRef:B.agentId}});return wo.createTeam(n,{description:l,leader:{name:u||"leader",role:h,agentRef:u||void 0},teammates:O})},onSuccess:()=>{b.invalidateQueries({queryKey:["teams"]}),Fe.success("Team created"),t(!1),N()},onError:O=>{Fe.error(`Failed to create team: ${O.message}`)}}),N=()=>{i(""),c(""),f(""),m("Team coordinator"),p([])},T=()=>{p([...g,{agentId:"",role:""}])},k=O=>{p(g.filter((B,q)=>q!==O))},R=(O,B,q)=>{const L=[...g];if(L[O][B]=q,B==="agentId"&&q){const ne=j==null?void 0:j.find(X=>X.name===q);ne!=null&&ne.description&&!L[O].role&&(L[O].role=ne.description)}p(L)},z=O=>{const B=new Set([u,...g.filter((q,L)=>L!==O).map(q=>q.agentId)].filter(Boolean));return(w==null?void 0:w.filter(q=>!B.has(q.name)))||[]},D=!S&&(!w||w.length===0);return a.jsx(fr,{open:e,onOpenChange:O=>{O||N(),t(O)},children:a.jsxs(Xn,{className:"max-w-lg max-h-[80vh] overflow-hidden flex flex-col",children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Create New Team"}),a.jsx(pr,{children:"Compose a multi-agent team from your existing agents"})]}),S?a.jsxs("div",{className:"space-y-4 py-8",children:[a.jsx(Te,{className:"h-10"}),a.jsx(Te,{className:"h-10"}),a.jsx(Te,{className:"h-20"})]}):D?a.jsxs("div",{className:"py-8 text-center",children:[a.jsx(cr,{className:"h-12 w-12 mx-auto text-muted-foreground/30 mb-4"}),a.jsx("h3",{className:"text-sm font-medium mb-2",children:"No Agents Created Yet"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"You need to create some agents first before you can build a team."}),a.jsxs(me,{variant:"outline",onClick:()=>{t(!1)},children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"Go to Agents Tab"]})]}):a.jsxs(a.Fragment,{children:[a.jsx(at,{className:"flex-1 -mx-6 px-6",children:a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"team-name",children:"Team Name"}),a.jsx(Et,{id:"team-name",value:n,onChange:O=>i(O.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"-")),placeholder:"my-team"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"team-desc",children:"Description"}),a.jsx(Et,{id:"team-desc",value:l,onChange:O=>c(O.target.value),placeholder:"What this team does..."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{children:"Team Leader (Agent)"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Select an agent to lead and coordinate the team"}),a.jsx("div",{className:"flex gap-2",children:a.jsxs("select",{value:u,onChange:O=>{f(O.target.value);const B=j==null?void 0:j.find(q=>q.name===O.target.value);B!=null&&B.description&&m(B.description)},className:"flex-1 h-10 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[a.jsx("option",{value:"",children:"Select an agent..."}),w==null?void 0:w.map(O=>a.jsxs("option",{value:O.name,children:["@",O.name," ",O.description?`- ${O.description}`:""]},O.name))]})}),u&&a.jsx(Et,{value:h,onChange:O=>m(O.target.value),placeholder:"Role description",className:"mt-2"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(Dt,{children:"Team Members (Agents)"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Add agents to collaborate on tasks"})]}),a.jsxs(me,{variant:"ghost",size:"sm",onClick:T,disabled:z().length===0,children:[a.jsx(Wa,{className:"h-4 w-4 mr-1"}),"Add"]})]}),g.length===0?a.jsxs("div",{className:"text-center py-6 border border-dashed border-border/50 rounded-lg",children:[a.jsx(Ja,{className:"h-8 w-8 mx-auto text-muted-foreground/30 mb-2"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"No team members added yet"}),a.jsxs(me,{variant:"ghost",size:"sm",onClick:T,className:"mt-2",disabled:z().length===0,children:[a.jsx(Wa,{className:"h-3 w-3 mr-1"}),"Add first member"]})]}):a.jsx("div",{className:"space-y-2",children:g.map((O,B)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/20 space-y-2",children:[a.jsxs("div",{className:"flex gap-2 items-start",children:[a.jsxs("select",{value:O.agentId,onChange:q=>R(B,"agentId",q.target.value),className:"flex-1 h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[a.jsx("option",{value:"",children:"Select an agent..."}),[...O.agentId?[w==null?void 0:w.find(q=>q.name===O.agentId)]:[],...z(B)].filter(Boolean).map(q=>a.jsxs("option",{value:q.name,children:["@",q.name]},q.name))]}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-9 w-9 flex-shrink-0",onClick:()=>k(B),children:a.jsx(wa,{className:"h-4 w-4"})})]}),O.agentId&&a.jsx(Et,{value:O.role,onChange:q=>R(B,"role",q.target.value),placeholder:"Role in this team...",className:"text-sm"})]},B))})]}),(u||g.some(O=>O.agentId))&&a.jsxs("div",{className:"p-3 rounded-lg bg-primary/5 border border-primary/20",children:[a.jsx("h4",{className:"text-xs font-medium text-primary mb-2",children:"Team Summary"}),a.jsxs("div",{className:"space-y-1",children:[u&&a.jsxs("p",{className:"text-xs",children:[a.jsx("span",{className:"text-muted-foreground",children:"Leader:"})," ",a.jsxs("code",{className:"text-primary",children:["@",u]})]}),g.filter(O=>O.agentId).length>0&&a.jsxs("p",{className:"text-xs",children:[a.jsx("span",{className:"text-muted-foreground",children:"Members:"})," ",g.filter(O=>O.agentId).map((O,B)=>a.jsxs("span",{children:[B>0&&", ",a.jsxs("code",{className:"text-primary",children:["@",O.agentId]})]},B))]})]})]})]})}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsx(me,{onClick:()=>E.mutate(),disabled:!n||!u||E.isPending,children:E.isPending?"Creating...":"Create Team"})]})]})]})})}const yx=[{event:"SessionStart",label:"Session Start",description:"Triggered when a new Claude session begins",supportsMatcher:!1},{event:"UserPromptSubmit",label:"User Prompt Submit",description:"Triggered when the user submits a prompt",supportsMatcher:!1},{event:"PreToolUse",label:"Pre Tool Use",description:"Triggered before a tool is executed",supportsMatcher:!0,matcherHint:'Tool name pattern (e.g., "Bash", "Read", "Write")'},{event:"PermissionRequest",label:"Permission Request",description:"Triggered when a tool requests permission",supportsMatcher:!0,matcherHint:"Tool name pattern"},{event:"PostToolUse",label:"Post Tool Use",description:"Triggered after a tool executes successfully",supportsMatcher:!0,matcherHint:"Tool name pattern"},{event:"PostToolUseFailure",label:"Post Tool Use Failure",description:"Triggered when a tool execution fails",supportsMatcher:!0,matcherHint:"Tool name pattern"},{event:"SubagentStart",label:"Subagent Start",description:"Triggered when a subagent is spawned",supportsMatcher:!1},{event:"SubagentStop",label:"Subagent Stop",description:"Triggered when a subagent completes",supportsMatcher:!1},{event:"Stop",label:"Stop",description:"Triggered when Claude stops generating",supportsMatcher:!1},{event:"PreCompact",label:"Pre Compact",description:"Triggered before conversation compaction",supportsMatcher:!1},{event:"SessionEnd",label:"Session End",description:"Triggered when a session ends",supportsMatcher:!1},{event:"Notification",label:"Notification",description:"Triggered for user notifications",supportsMatcher:!1},{event:"Setup",label:"Setup",description:"Triggered during initial setup",supportsMatcher:!1}],ki=6e4,no=1e3,ro=3e5;function pH(e){const t=gH(e),n=y.forwardRef((i,l)=>{const{children:c,...u}=i,f=y.Children.toArray(c),h=f.find(yH);if(h){const m=h.props.children,g=f.map(p=>p===h?y.Children.count(m)>1?y.Children.only(null):y.isValidElement(m)?m.props.children:null:p);return a.jsx(t,{...u,ref:l,children:y.isValidElement(m)?y.cloneElement(m,void 0,g):null})}return a.jsx(t,{...u,ref:l,children:c})});return n.displayName=`${e}.Slot`,n}function gH(e){const t=y.forwardRef((n,i)=>{const{children:l,...c}=n;if(y.isValidElement(l)){const u=bH(l),f=vH(c,l.props);return l.type!==y.Fragment&&(f.ref=i?Qn(i,u):u),y.cloneElement(l,f)}return y.Children.count(l)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xH=Symbol("radix.slottable");function yH(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xH}function vH(e,t){const n={...t};for(const i in t){const l=e[i],c=t[i];/^on[A-Z]/.test(i)?l&&c?n[i]=(...f)=>{const h=c(...f);return l(...f),h}:l&&(n[i]=l):i==="style"?n[i]={...l,...c}:i==="className"&&(n[i]=[l,c].filter(Boolean).join(" "))}return{...e,...n}}function bH(e){var i,l;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wH=[" ","Enter","ArrowUp","ArrowDown"],jH=[" ","Enter"],$i="Select",[ym,vm,NH]=Wx($i),[Uo]=ja($i,[NH,zo]),bm=zo(),[SH,ti]=Uo($i),[CH,kH]=Uo($i),w5=e=>{const{__scopeSelect:t,children:n,open:i,defaultOpen:l,onOpenChange:c,value:u,defaultValue:f,onValueChange:h,dir:m,name:g,autoComplete:p,disabled:b,required:w,form:S}=e,j=bm(t),[E,N]=y.useState(null),[T,k]=y.useState(null),[R,z]=y.useState(!1),D=Yf(m),[O,B]=Ui({prop:i,defaultProp:l??!1,onChange:c,caller:$i}),[q,L]=Ui({prop:u,defaultProp:f,onChange:h,caller:$i}),ne=y.useRef(null),X=E?S||!!E.closest("form"):!0,[ue,ie]=y.useState(new Set),te=Array.from(ue).map(I=>I.props.value).join(";");return a.jsx(ly,{...j,children:a.jsxs(SH,{required:w,scope:t,trigger:E,onTriggerChange:N,valueNode:T,onValueNodeChange:k,valueNodeHasChildren:R,onValueNodeHasChildrenChange:z,contentId:Nn(),value:q,onValueChange:L,open:O,onOpenChange:B,dir:D,triggerPointerDownPosRef:ne,disabled:b,children:[a.jsx(ym.Provider,{scope:t,children:a.jsx(CH,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(I=>{ie(Q=>new Set(Q).add(I))},[]),onNativeOptionRemove:y.useCallback(I=>{ie(Q=>{const Y=new Set(Q);return Y.delete(I),Y})},[]),children:n})}),X?a.jsxs(q5,{"aria-hidden":!0,required:w,tabIndex:-1,name:g,autoComplete:p,value:q,onChange:I=>L(I.target.value),disabled:b,form:S,children:[q===void 0?a.jsx("option",{value:""}):null,Array.from(ue)]},te):null]})})};w5.displayName=$i;var j5="SelectTrigger",N5=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:i=!1,...l}=e,c=bm(n),u=ti(j5,n),f=u.disabled||i,h=Ze(t,u.onTriggerChange),m=vm(n),g=y.useRef("touch"),[p,b,w]=$5(j=>{const E=m().filter(k=>!k.disabled),N=E.find(k=>k.value===u.value),T=G5(E,j,N);T!==void 0&&u.onValueChange(T.value)}),S=j=>{f||(u.onOpenChange(!0),w()),j&&(u.triggerPointerDownPosRef.current={x:Math.round(j.pageX),y:Math.round(j.pageY)})};return a.jsx(oy,{asChild:!0,...c,children:a.jsx(Pe.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":V5(u.value)?"":void 0,...l,ref:h,onClick:Ne(l.onClick,j=>{j.currentTarget.focus(),g.current!=="mouse"&&S(j)}),onPointerDown:Ne(l.onPointerDown,j=>{g.current=j.pointerType;const E=j.target;E.hasPointerCapture(j.pointerId)&&E.releasePointerCapture(j.pointerId),j.button===0&&j.ctrlKey===!1&&j.pointerType==="mouse"&&(S(j),j.preventDefault())}),onKeyDown:Ne(l.onKeyDown,j=>{const E=p.current!=="";!(j.ctrlKey||j.altKey||j.metaKey)&&j.key.length===1&&b(j.key),!(E&&j.key===" ")&&wH.includes(j.key)&&(S(),j.preventDefault())})})})});N5.displayName=j5;var S5="SelectValue",C5=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:l,children:c,placeholder:u="",...f}=e,h=ti(S5,n),{onValueNodeHasChildrenChange:m}=h,g=c!==void 0,p=Ze(t,h.onValueNodeChange);return hn(()=>{m(g)},[m,g]),a.jsx(Pe.span,{...f,ref:p,style:{pointerEvents:"none"},children:V5(h.value)?a.jsx(a.Fragment,{children:u}):c})});C5.displayName=S5;var EH="SelectIcon",k5=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:i,...l}=e;return a.jsx(Pe.span,{"aria-hidden":!0,...l,ref:t,children:i||"▼"})});k5.displayName=EH;var TH="SelectPortal",E5=e=>a.jsx(Jf,{asChild:!0,...e});E5.displayName=TH;var Gi="SelectContent",T5=y.forwardRef((e,t)=>{const n=ti(Gi,e.__scopeSelect),[i,l]=y.useState();if(hn(()=>{l(new DocumentFragment)},[]),!n.open){const c=i;return c?hu.createPortal(a.jsx(A5,{scope:e.__scopeSelect,children:a.jsx(ym.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),c):null}return a.jsx(R5,{...e,ref:t})});T5.displayName=Gi;var Hr=10,[A5,ni]=Uo(Gi),AH="SelectContentImpl",RH=pH("SelectContent.RemoveScroll"),R5=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,side:f,sideOffset:h,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:j,avoidCollisions:E,...N}=e,T=ti(Gi,n),[k,R]=y.useState(null),[z,D]=y.useState(null),O=Ze(t,se=>R(se)),[B,q]=y.useState(null),[L,ne]=y.useState(null),X=vm(n),[ue,ie]=y.useState(!1),te=y.useRef(!1);y.useEffect(()=>{if(k)return dy(k)},[k]),Zx();const I=y.useCallback(se=>{const[pe,...ve]=X().map(Le=>Le.ref.current),[Ae]=ve.slice(-1),ze=document.activeElement;for(const Le of se)if(Le===ze||(Le==null||Le.scrollIntoView({block:"nearest"}),Le===pe&&z&&(z.scrollTop=0),Le===Ae&&z&&(z.scrollTop=z.scrollHeight),Le==null||Le.focus(),document.activeElement!==ze))return},[X,z]),Q=y.useCallback(()=>I([B,k]),[I,B,k]);y.useEffect(()=>{ue&&Q()},[ue,Q]);const{onOpenChange:Y,triggerPointerDownPosRef:$}=T;y.useEffect(()=>{if(k){let se={x:0,y:0};const pe=Ae=>{var ze,Le;se={x:Math.abs(Math.round(Ae.pageX)-(((ze=$.current)==null?void 0:ze.x)??0)),y:Math.abs(Math.round(Ae.pageY)-(((Le=$.current)==null?void 0:Le.y)??0))}},ve=Ae=>{se.x<=10&&se.y<=10?Ae.preventDefault():k.contains(Ae.target)||Y(!1),document.removeEventListener("pointermove",pe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",ve,{capture:!0})}}},[k,Y,$]),y.useEffect(()=>{const se=()=>Y(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[Y]);const[_,U]=$5(se=>{const pe=X().filter(ze=>!ze.disabled),ve=pe.find(ze=>ze.ref.current===document.activeElement),Ae=G5(pe,se,ve);Ae&&setTimeout(()=>Ae.ref.current.focus())}),P=y.useCallback((se,pe,ve)=>{const Ae=!te.current&&!ve;(T.value!==void 0&&T.value===pe||Ae)&&(q(se),Ae&&(te.current=!0))},[T.value]),A=y.useCallback(()=>k==null?void 0:k.focus(),[k]),J=y.useCallback((se,pe,ve)=>{const Ae=!te.current&&!ve;(T.value!==void 0&&T.value===pe||Ae)&&ne(se)},[T.value]),ae=i==="popper"?vx:M5,fe=ae===vx?{side:f,sideOffset:h,align:m,alignOffset:g,arrowPadding:p,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:j,avoidCollisions:E}:{};return a.jsx(A5,{scope:n,content:k,viewport:z,onViewportChange:D,itemRefCallback:P,selectedItem:B,onItemLeave:A,itemTextRefCallback:J,focusSelectedItem:Q,selectedItemText:L,position:i,isPositioned:ue,searchRef:_,children:a.jsx(tm,{as:RH,allowPinchZoom:!0,children:a.jsx(Kf,{asChild:!0,trapped:T.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:Ne(l,se=>{var pe;(pe=T.trigger)==null||pe.focus({preventScroll:!0}),se.preventDefault()}),children:a.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:a.jsx(ae,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:se=>se.preventDefault(),...N,...fe,onPlaced:()=>ie(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:Ne(N.onKeyDown,se=>{const pe=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!pe&&se.key.length===1&&U(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let Ae=X().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);if(["ArrowUp","End"].includes(se.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const ze=se.target,Le=Ae.indexOf(ze);Ae=Ae.slice(Le+1)}setTimeout(()=>I(Ae)),se.preventDefault()}})})})})})})});R5.displayName=AH;var MH="SelectItemAlignedPosition",M5=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:i,...l}=e,c=ti(Gi,n),u=ni(Gi,n),[f,h]=y.useState(null),[m,g]=y.useState(null),p=Ze(t,O=>g(O)),b=vm(n),w=y.useRef(!1),S=y.useRef(!0),{viewport:j,selectedItem:E,selectedItemText:N,focusSelectedItem:T}=u,k=y.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&m&&j&&E&&N){const O=c.trigger.getBoundingClientRect(),B=m.getBoundingClientRect(),q=c.valueNode.getBoundingClientRect(),L=N.getBoundingClientRect();if(c.dir!=="rtl"){const ze=L.left-B.left,Le=q.left-ze,It=O.left-Le,wt=O.width+It,On=Math.max(wt,B.width),kn=window.innerWidth-Hr,pn=sx(Le,[Hr,Math.max(Hr,kn-On)]);f.style.minWidth=wt+"px",f.style.left=pn+"px"}else{const ze=B.right-L.right,Le=window.innerWidth-q.right-ze,It=window.innerWidth-O.right-Le,wt=O.width+It,On=Math.max(wt,B.width),kn=window.innerWidth-Hr,pn=sx(Le,[Hr,Math.max(Hr,kn-On)]);f.style.minWidth=wt+"px",f.style.right=pn+"px"}const ne=b(),X=window.innerHeight-Hr*2,ue=j.scrollHeight,ie=window.getComputedStyle(m),te=parseInt(ie.borderTopWidth,10),I=parseInt(ie.paddingTop,10),Q=parseInt(ie.borderBottomWidth,10),Y=parseInt(ie.paddingBottom,10),$=te+I+ue+Y+Q,_=Math.min(E.offsetHeight*5,$),U=window.getComputedStyle(j),P=parseInt(U.paddingTop,10),A=parseInt(U.paddingBottom,10),J=O.top+O.height/2-Hr,ae=X-J,fe=E.offsetHeight/2,se=E.offsetTop+fe,pe=te+I+se,ve=$-pe;if(pe<=J){const ze=ne.length>0&&E===ne[ne.length-1].ref.current;f.style.bottom="0px";const Le=m.clientHeight-j.offsetTop-j.offsetHeight,It=Math.max(ae,fe+(ze?A:0)+Le+Q),wt=pe+It;f.style.height=wt+"px"}else{const ze=ne.length>0&&E===ne[0].ref.current;f.style.top="0px";const It=Math.max(J,te+j.offsetTop+(ze?P:0)+fe)+ve;f.style.height=It+"px",j.scrollTop=pe-J+j.offsetTop}f.style.margin=`${Hr}px 0`,f.style.minHeight=_+"px",f.style.maxHeight=X+"px",i==null||i(),requestAnimationFrame(()=>w.current=!0)}},[b,c.trigger,c.valueNode,f,m,j,E,N,c.dir,i]);hn(()=>k(),[k]);const[R,z]=y.useState();hn(()=>{m&&z(window.getComputedStyle(m).zIndex)},[m]);const D=y.useCallback(O=>{O&&S.current===!0&&(k(),T==null||T(),S.current=!1)},[k,T]);return a.jsx(OH,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:D,children:a.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:a.jsx(Pe.div,{...l,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});M5.displayName=MH;var DH="SelectPopperPosition",vx=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:l=Hr,...c}=e,u=bm(n);return a.jsx(cy,{...u,...c,ref:t,align:i,collisionPadding:l,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});vx.displayName=DH;var[OH,Ky]=Uo(Gi,{}),bx="SelectViewport",D5=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:i,...l}=e,c=ni(bx,n),u=Ky(bx,n),f=Ze(t,c.onViewportChange),h=y.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),a.jsx(ym.Slot,{scope:n,children:a.jsx(Pe.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:Ne(l.onScroll,m=>{const g=m.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:b}=u;if(b!=null&&b.current&&p){const w=Math.abs(h.current-g.scrollTop);if(w>0){const S=window.innerHeight-Hr*2,j=parseFloat(p.style.minHeight),E=parseFloat(p.style.height),N=Math.max(j,E);if(N<S){const T=N+w,k=Math.min(S,T),R=T-k;p.style.height=k+"px",p.style.bottom==="0px"&&(g.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});D5.displayName=bx;var O5="SelectGroup",[_H,PH]=Uo(O5),zH=y.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,l=Nn();return a.jsx(_H,{scope:n,id:l,children:a.jsx(Pe.div,{role:"group","aria-labelledby":l,...i,ref:t})})});zH.displayName=O5;var _5="SelectLabel",LH=y.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,l=PH(_5,n);return a.jsx(Pe.div,{id:l.id,...i,ref:t})});LH.displayName=_5;var Lf="SelectItem",[IH,P5]=Uo(Lf),z5=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:i,disabled:l=!1,textValue:c,...u}=e,f=ti(Lf,n),h=ni(Lf,n),m=f.value===i,[g,p]=y.useState(c??""),[b,w]=y.useState(!1),S=Ze(t,T=>{var k;return(k=h.itemRefCallback)==null?void 0:k.call(h,T,i,l)}),j=Nn(),E=y.useRef("touch"),N=()=>{l||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(IH,{scope:n,value:i,disabled:l,textId:j,isSelected:m,onItemTextChange:y.useCallback(T=>{p(k=>k||((T==null?void 0:T.textContent)??"").trim())},[]),children:a.jsx(ym.ItemSlot,{scope:n,value:i,disabled:l,textValue:g,children:a.jsx(Pe.div,{role:"option","aria-labelledby":j,"data-highlighted":b?"":void 0,"aria-selected":m&&b,"data-state":m?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...u,ref:S,onFocus:Ne(u.onFocus,()=>w(!0)),onBlur:Ne(u.onBlur,()=>w(!1)),onClick:Ne(u.onClick,()=>{E.current!=="mouse"&&N()}),onPointerUp:Ne(u.onPointerUp,()=>{E.current==="mouse"&&N()}),onPointerDown:Ne(u.onPointerDown,T=>{E.current=T.pointerType}),onPointerMove:Ne(u.onPointerMove,T=>{var k;E.current=T.pointerType,l?(k=h.onItemLeave)==null||k.call(h):E.current==="mouse"&&T.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(u.onPointerLeave,T=>{var k;T.currentTarget===document.activeElement&&((k=h.onItemLeave)==null||k.call(h))}),onKeyDown:Ne(u.onKeyDown,T=>{var R;((R=h.searchRef)==null?void 0:R.current)!==""&&T.key===" "||(jH.includes(T.key)&&N(),T.key===" "&&T.preventDefault())})})})})});z5.displayName=Lf;var Yc="SelectItemText",L5=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:l,...c}=e,u=ti(Yc,n),f=ni(Yc,n),h=P5(Yc,n),m=kH(Yc,n),[g,p]=y.useState(null),b=Ze(t,N=>p(N),h.onItemTextChange,N=>{var T;return(T=f.itemTextRefCallback)==null?void 0:T.call(f,N,h.value,h.disabled)}),w=g==null?void 0:g.textContent,S=y.useMemo(()=>a.jsx("option",{value:h.value,disabled:h.disabled,children:w},h.value),[h.disabled,h.value,w]),{onNativeOptionAdd:j,onNativeOptionRemove:E}=m;return hn(()=>(j(S),()=>E(S)),[j,E,S]),a.jsxs(a.Fragment,{children:[a.jsx(Pe.span,{id:h.textId,...c,ref:b}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?hu.createPortal(c.children,u.valueNode):null]})});L5.displayName=Yc;var I5="SelectItemIndicator",U5=y.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return P5(I5,n).isSelected?a.jsx(Pe.span,{"aria-hidden":!0,...i,ref:t}):null});U5.displayName=I5;var wx="SelectScrollUpButton",B5=y.forwardRef((e,t)=>{const n=ni(wx,e.__scopeSelect),i=Ky(wx,e.__scopeSelect),[l,c]=y.useState(!1),u=Ze(t,i.onScrollButtonChange);return hn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollTop>0;c(m)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),l?a.jsx(H5,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});B5.displayName=wx;var jx="SelectScrollDownButton",F5=y.forwardRef((e,t)=>{const n=ni(jx,e.__scopeSelect),i=Ky(jx,e.__scopeSelect),[l,c]=y.useState(!1),u=Ze(t,i.onScrollButtonChange);return hn(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)<m;c(g)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),l?a.jsx(H5,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});F5.displayName=jx;var H5=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:i,...l}=e,c=ni("SelectScrollButton",n),u=y.useRef(null),f=vm(n),h=y.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return y.useEffect(()=>()=>h(),[h]),hn(()=>{var g;const m=f().find(p=>p.ref.current===document.activeElement);(g=m==null?void 0:m.ref.current)==null||g.scrollIntoView({block:"nearest"})},[f]),a.jsx(Pe.div,{"aria-hidden":!0,...l,ref:t,style:{flexShrink:0,...l.style},onPointerDown:Ne(l.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(i,50))}),onPointerMove:Ne(l.onPointerMove,()=>{var m;(m=c.onItemLeave)==null||m.call(c),u.current===null&&(u.current=window.setInterval(i,50))}),onPointerLeave:Ne(l.onPointerLeave,()=>{h()})})}),UH="SelectSeparator",BH=y.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e;return a.jsx(Pe.div,{"aria-hidden":!0,...i,ref:t})});BH.displayName=UH;var Nx="SelectArrow",FH=y.forwardRef((e,t)=>{const{__scopeSelect:n,...i}=e,l=bm(n),c=ti(Nx,n),u=ni(Nx,n);return c.open&&u.position==="popper"?a.jsx(uy,{...l,...i,ref:t}):null});FH.displayName=Nx;var HH="SelectBubbleInput",q5=y.forwardRef(({__scopeSelect:e,value:t,...n},i)=>{const l=y.useRef(null),c=Ze(i,l),u=m5(t);return y.useEffect(()=>{const f=l.current;if(!f)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&g){const p=new Event("change",{bubbles:!0});g.call(f,t),f.dispatchEvent(p)}},[u,t]),a.jsx(Pe.select,{...n,style:{...X2,...n.style},ref:c,defaultValue:t})});q5.displayName=HH;function V5(e){return e===""||e===void 0}function $5(e){const t=un(e),n=y.useRef(""),i=y.useRef(0),l=y.useCallback(u=>{const f=n.current+u;t(f),(function h(m){n.current=m,window.clearTimeout(i.current),m!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),c=y.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,l,c]}function G5(e,t,n){const l=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=qH(e,Math.max(c,0));l.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(l.toLowerCase()));return h!==n?h:void 0}function qH(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var VH=w5,$H=N5,GH=C5,YH=k5,KH=E5,QH=T5,XH=D5,WH=z5,ZH=L5,JH=U5,eq=B5,tq=F5;function Y5({...e}){return a.jsx(VH,{"data-slot":"select",...e})}function K5({...e}){return a.jsx(GH,{"data-slot":"select-value",...e})}function Q5({className:e,size:t="default",children:n,...i}){return a.jsxs($H,{"data-slot":"select-trigger","data-size":t,className:G("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[n,a.jsx(YH,{asChild:!0,children:a.jsx(Ki,{className:"size-4 opacity-50"})})]})}function X5({className:e,children:t,position:n="item-aligned",align:i="center",...l}){return a.jsx(KH,{children:a.jsxs(QH,{"data-slot":"select-content",className:G("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:i,...l,children:[a.jsx(nq,{}),a.jsx(XH,{className:G("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),a.jsx(rq,{})]})})}function Sx({className:e,children:t,...n}){return a.jsxs(WH,{"data-slot":"select-item",className:G("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[a.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:a.jsx(JH,{children:a.jsx(Yi,{className:"size-4"})})}),a.jsx(ZH,{children:t})]})}function nq({className:e,...t}){return a.jsx(eq,{"data-slot":"select-scroll-up-button",className:G("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(To,{className:"size-4"})})}function rq({className:e,...t}){return a.jsx(tq,{"data-slot":"select-scroll-down-button",className:G("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Ki,{className:"size-4"})})}function aq({open:e,onOpenChange:t}){const[n,i]=y.useState(""),[l,c]=y.useState(""),[u,f]=y.useState(""),[h,m]=y.useState(String(ki)),[g,p]=y.useState({}),b=Sn(),w=yx.find(k=>k.event===n),S=Tt({mutationFn:k=>Ue.createHook(k),onSuccess:()=>{b.invalidateQueries({queryKey:["hooks"]}),Fe.success("Hook created successfully"),E()},onError:k=>{Fe.error(`Failed to create hook: ${k.message}`)}}),j=()=>{const k={};n||(k.event="Event type is required"),l.trim()||(k.command="Command is required");const R=parseInt(h,10);return(isNaN(R)||R<no||R>ro)&&(k.timeout=`Timeout must be between ${no}ms and ${ro}ms`),p(k),Object.keys(k).length===0},E=()=>{i(""),c(""),f(""),m(String(ki)),p({}),t(!1)},N=()=>{if(!j())return;const k={event:n,command:l.trim()};u.trim()&&(w!=null&&w.supportsMatcher)&&(k.matcher=u.trim());const R=parseInt(h,10);R!==ki&&(k.timeout=R),S.mutate(k)},T=k=>{(k.metaKey||k.ctrlKey)&&k.key==="s"&&(k.preventDefault(),N())};return a.jsx(fr,{open:e,onOpenChange:E,children:a.jsxs(Xn,{className:"max-w-md",onKeyDown:T,children:[a.jsxs(mr,{children:[a.jsx(hr,{className:"text-base font-semibold",children:"Create Hook"}),a.jsx(pr,{className:"text-sm",children:"Run a command when an event occurs."})]}),a.jsxs("div",{className:"space-y-4 py-2",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-event",className:"text-sm font-medium",children:"Event"}),a.jsxs(Y5,{value:n,onValueChange:i,children:[a.jsx(Q5,{id:"hook-event",className:g.event?"border-destructive":"",children:a.jsx(K5,{placeholder:"Select event..."})}),a.jsx(X5,{children:yx.map(k=>a.jsx(Sx,{value:k.event,children:a.jsxs("div",{className:"flex flex-col py-0.5",children:[a.jsx("span",{className:"text-sm",children:k.label}),a.jsx("span",{className:"text-xs text-muted-foreground",children:k.description})]})},k.event))})]}),g.event&&a.jsx("p",{className:"text-xs text-destructive",children:g.event})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-command",className:"text-sm font-medium",children:"Command"}),a.jsx(Et,{id:"hook-command",placeholder:"echo 'Hook executed'",value:l,onChange:k=>c(k.target.value),className:`font-mono text-sm ${g.command?"border-destructive":""}`}),g.command?a.jsx("p",{className:"text-xs text-destructive",children:g.command}):a.jsx("p",{className:"text-xs text-muted-foreground",children:"Shell command to execute"})]}),(w==null?void 0:w.supportsMatcher)&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-matcher",className:"text-sm font-medium",children:"Matcher (Optional)"}),a.jsx(Et,{id:"hook-matcher",placeholder:w.matcherHint||"Pattern",value:u,onChange:k=>f(k.target.value),className:"font-mono text-sm"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:w.matcherHint||"Pattern to filter events"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-timeout",className:"text-sm font-medium",children:"Timeout (ms)"}),a.jsx(Et,{id:"hook-timeout",type:"number",min:no,max:ro,value:h,onChange:k=>m(k.target.value),className:`w-32 ${g.timeout?"border-destructive":""}`}),g.timeout&&a.jsx("p",{className:"text-xs text-destructive",children:g.timeout})]})]}),a.jsxs(Wn,{className:"gap-2",children:[a.jsx(me,{variant:"outline",onClick:E,size:"sm",children:"Cancel"}),a.jsx(me,{onClick:N,disabled:S.isPending,size:"sm",children:S.isPending?"Creating...":"Create"})]})]})})}function sq({open:e,onOpenChange:t,hook:n}){const[i,l]=y.useState(""),[c,u]=y.useState(""),[f,h]=y.useState(String(ki)),[m,g]=y.useState({}),p=Sn(),b=n?yx.find(T=>T.event===n.event):null;y.useEffect(()=>{n&&(l(n.command),u(n.matcher||""),h(String(n.timeout||ki)),g({}))},[n]);const w=Tt({mutationFn:({id:T,updates:k})=>Ue.updateHook(T,k),onSuccess:()=>{p.invalidateQueries({queryKey:["hooks"]}),Fe.success("Hook updated successfully"),j()},onError:T=>{Fe.error(`Failed to update hook: ${T.message}`)}}),S=()=>{const T={};i.trim()||(T.command="Command is required");const k=parseInt(f,10);return(isNaN(k)||k<no||k>ro)&&(T.timeout=`Timeout must be between ${no}ms and ${ro}ms`),g(T),Object.keys(T).length===0},j=()=>{l(""),u(""),h(String(ki)),g({}),t(!1)},E=()=>{if(!n||!S())return;const T={};if(i.trim()!==n.command&&(T.command=i.trim()),b!=null&&b.supportsMatcher){const R=c.trim()||void 0;R!==n.matcher&&(T.matcher=R)}const k=parseInt(f,10);if(k!==(n.timeout||ki)&&(T.timeout=k),Object.keys(T).length===0){Fe.info("No changes to save"),j();return}w.mutate({id:n.id,updates:T})},N=T=>{(T.metaKey||T.ctrlKey)&&T.key==="s"&&(T.preventDefault(),E())};return n?a.jsx(fr,{open:e,onOpenChange:j,children:a.jsxs(Xn,{className:"max-w-lg",onKeyDown:N,children:[a.jsxs(mr,{children:[a.jsxs(hr,{className:"flex items-center gap-2",children:["Edit Hook",a.jsx(we,{variant:"outline",className:"font-mono text-xs",children:n.event})]}),a.jsx(pr,{children:(b==null?void 0:b.description)||"Modify the hook configuration."})]}),a.jsxs("div",{className:"space-y-4 py-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-command",children:"Command"}),a.jsx(Et,{id:"hook-command",placeholder:"echo 'Hook executed'",value:i,onChange:T=>l(T.target.value),className:`font-mono ${m.command?"border-destructive":""}`}),m.command&&a.jsx("p",{className:"text-sm text-destructive",children:m.command}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Shell command to execute when the event triggers."})]}),(b==null?void 0:b.supportsMatcher)&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-matcher",children:"Matcher Pattern (Optional)"}),a.jsx(Et,{id:"hook-matcher",placeholder:b.matcherHint||"Pattern to match",value:c,onChange:T=>u(T.target.value),className:"font-mono"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:b.matcherHint||"Optional pattern to filter when this hook triggers."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"hook-timeout",children:"Timeout (ms)"}),a.jsx(Et,{id:"hook-timeout",type:"number",min:no,max:ro,value:f,onChange:T=>h(T.target.value),className:m.timeout?"border-destructive":""}),m.timeout&&a.jsx("p",{className:"text-sm text-destructive",children:m.timeout}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Maximum time to wait for the command to complete."})]})]}),a.jsx(Wn,{children:a.jsxs("div",{className:"flex items-center justify-between w-full",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Press Cmd+S to save"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(me,{variant:"outline",onClick:j,children:"Cancel"}),a.jsx(me,{onClick:E,disabled:w.isPending,children:w.isPending?"Saving...":"Save Changes"})]})]})})]})}):null}function iq(){const[e,t]=y.useState(null),[n,i]=y.useState(null),[l,c]=y.useState(null),[u,f]=y.useState(""),[h,m]=y.useState(!1),[g,p]=y.useState(!1),b=Sn(),{data:w,isLoading:S}=pt({queryKey:["hooks"],queryFn:Ue.getHooks}),j=Tt({mutationFn:Ue.deleteHook,onSuccess:()=>{b.invalidateQueries({queryKey:["hooks"]}),t(null),c(null),Fe.success("Hook deleted")},onError:k=>{Fe.error(`Failed to delete: ${k.message}`)}}),E=Tt({mutationFn:Ue.testHook,onSuccess:k=>i(k)}),N=w==null?void 0:w.find(k=>k.id===e),T=w==null?void 0:w.filter(k=>k.event.toLowerCase().includes(u.toLowerCase())||k.command.toLowerCase().includes(u.toLowerCase())||k.matcher&&k.matcher.toLowerCase().includes(u.toLowerCase()));return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex gap-6",children:[a.jsxs("div",{className:G("flex flex-col transition-all duration-300",e?"w-[340px] flex-shrink-0":"w-full max-w mx-auto"),children:[a.jsxs("div",{className:"mb-6 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Kc,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Hooks"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Event-driven automation"})]}),a.jsxs(me,{onClick:()=>m(!0),children:[a.jsx(Wa,{className:"h-4 w-4 mr-2"}),"New Hook"]})]}),a.jsxs("div",{className:"relative",children:[a.jsx(Kr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(Et,{placeholder:"Search hooks...",value:u,onChange:k=>f(k.target.value),className:"pl-9 h-9"})]})]}),S?a.jsxs("div",{className:"space-y-3",children:[a.jsx(Te,{className:"h-24 w-full rounded-lg"}),a.jsx(Te,{className:"h-24 w-full rounded-lg"}),a.jsx(Te,{className:"h-24 w-full rounded-lg"})]}):a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsxs("div",{className:G("grid gap-3 pb-6",!e&&"md:grid-cols-2"),children:[T==null?void 0:T.map(k=>a.jsxs(fn,{className:G("cursor-pointer transition-all duration-150 border-border/50",e===k.id?"bg-accent border-border ring-1 ring-border":"hover:border-border hover:bg-accent/50"),onClick:()=>{t(k.id),i(null)},children:[a.jsx(Pr,{className:"p-4 pb-2",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{variant:"secondary",className:"font-mono text-[10px] uppercase",children:k.event}),k.matcher&&a.jsx("span",{className:"text-xs text-muted-foreground truncate",children:k.matcher})]})}),a.jsx(mn,{className:"p-4 pt-2",children:a.jsx("code",{className:"text-xs bg-muted px-2 py-1 rounded block font-mono truncate text-muted-foreground",children:k.command})})]},k.id)),(T==null?void 0:T.length)===0&&a.jsxs("div",{className:"col-span-full flex flex-col items-center justify-center py-16 text-muted-foreground",children:[a.jsx(Kc,{className:"h-10 w-10 mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"No hooks found"})]})]})})]}),e&&a.jsx("div",{className:"flex-1 min-w-0 flex flex-col bg-card rounded-lg border border-border/50 overflow-hidden",children:N?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-border/50 px-5 py-4 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{variant:"outline",className:"font-mono text-xs",children:N.event}),N.matcher&&a.jsx("span",{className:"text-sm text-muted-foreground",children:N.matcher})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>p(!0),children:a.jsx(Yx,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>c(N.id),children:a.jsx(Gf,{className:"h-4 w-4"})}),a.jsx(me,{variant:"ghost",size:"icon",onClick:()=>t(null),className:"h-8 w-8",children:a.jsx(wa,{className:"h-4 w-4"})})]})]}),a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"p-5 space-y-5",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Command"}),a.jsx("div",{className:"bg-muted rounded-md p-3",children:a.jsx("code",{className:"text-sm font-mono whitespace-pre-wrap break-all",children:N.command})})]}),N.timeout&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Timeout"}),a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx(ba,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsxs("span",{children:[N.timeout,"ms"]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Test"}),a.jsxs(me,{variant:"outline",size:"sm",onClick:()=>E.mutate(N.id),disabled:E.isPending,className:"h-7 text-xs",children:[a.jsx(Ro,{className:"h-3 w-3 mr-1.5"}),"Run"]})]}),a.jsx("div",{className:"bg-muted rounded-md p-3 min-h-[80px]",children:E.isPending?a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx("div",{className:"w-3 h-3 border-2 border-foreground border-t-transparent rounded-full animate-spin"}),"Running..."]}):n?a.jsxs("div",{className:"space-y-2",children:[a.jsx("div",{className:"flex items-center gap-2",children:n.success?a.jsxs("div",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400 text-sm font-medium",children:[a.jsx(WN,{className:"h-4 w-4"}),"Success"]}):a.jsxs("div",{className:"flex items-center gap-1.5 text-red-600 dark:text-red-400 text-sm font-medium",children:[a.jsx(Fg,{className:"h-4 w-4"}),"Failed"]})}),a.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap text-muted-foreground",children:n.output||"(No output)"})]}):a.jsx("p",{className:"text-sm text-muted-foreground",children:'Click "Run" to test this hook'})})]})]})})]}):a.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:a.jsxs("div",{className:"text-center",children:[a.jsx(Kc,{className:"h-10 w-10 mx-auto mb-3 opacity-20"}),a.jsx("p",{className:"text-sm",children:"Select a hook to view"})]})})}),a.jsx(fr,{open:!!l,onOpenChange:()=>c(null),children:a.jsxs(Xn,{children:[a.jsxs(mr,{children:[a.jsx(hr,{children:"Delete Hook"}),a.jsx(pr,{children:"Are you sure you want to delete this hook? This action cannot be undone."})]}),a.jsxs(Wn,{children:[a.jsx(me,{variant:"outline",onClick:()=>c(null),children:"Cancel"}),a.jsx(me,{variant:"destructive",onClick:()=>l&&j.mutate(l),disabled:j.isPending,children:j.isPending?"Deleting...":"Delete"})]})]})}),a.jsx(aq,{open:h,onOpenChange:m}),a.jsx(sq,{open:g,onOpenChange:p,hook:N||null})]})}const nN=[{id:"web-app",name:"Web Application",description:"React, Next.js, Vue, or similar frontend projects",icon:Z3,color:"text-blue-400",bgColor:"bg-blue-500/10",content:`# Project Overview
|
|
1269
|
+
|
|
1270
|
+
This is a modern web application built with [framework].
|
|
1271
|
+
|
|
1272
|
+
## Tech Stack
|
|
1273
|
+
- Frontend: React/Next.js with TypeScript
|
|
1274
|
+
- Styling: Tailwind CSS
|
|
1275
|
+
- State: Zustand/Redux
|
|
1276
|
+
- Testing: Vitest + Playwright
|
|
1277
|
+
|
|
1278
|
+
## Project Structure
|
|
1279
|
+
\`\`\`
|
|
1280
|
+
/src
|
|
1281
|
+
/components - Reusable UI components
|
|
1282
|
+
/pages - Page components/routes
|
|
1283
|
+
/hooks - Custom React hooks
|
|
1284
|
+
/lib - Utility functions
|
|
1285
|
+
/api - API client and types
|
|
1286
|
+
\`\`\`
|
|
1287
|
+
|
|
1288
|
+
## Coding Standards
|
|
1289
|
+
- Use TypeScript strict mode
|
|
1290
|
+
- Prefer functional components with hooks
|
|
1291
|
+
- Keep components small and focused
|
|
1292
|
+
- Use named exports for components
|
|
1293
|
+
|
|
1294
|
+
## Commands
|
|
1295
|
+
- \`npm run dev\` - Start development server
|
|
1296
|
+
- \`npm run build\` - Production build
|
|
1297
|
+
- \`npm run test\` - Run tests
|
|
1298
|
+
- \`npm run lint\` - Lint code
|
|
1299
|
+
|
|
1300
|
+
## Important Notes
|
|
1301
|
+
- Always add loading and error states to async operations
|
|
1302
|
+
- Use semantic HTML and ensure accessibility
|
|
1303
|
+
- Keep bundle size minimal - avoid unnecessary dependencies`},{id:"backend-api",name:"Backend API",description:"Node.js, Python, Go, or similar backend services",icon:sS,color:"text-emerald-400",bgColor:"bg-emerald-500/10",content:`# Backend API Project
|
|
1304
|
+
|
|
1305
|
+
RESTful API service for [purpose].
|
|
1306
|
+
|
|
1307
|
+
## Tech Stack
|
|
1308
|
+
- Runtime: Node.js/Python/Go
|
|
1309
|
+
- Framework: Express/FastAPI/Gin
|
|
1310
|
+
- Database: PostgreSQL
|
|
1311
|
+
- Cache: Redis
|
|
1312
|
+
- Auth: JWT
|
|
1313
|
+
|
|
1314
|
+
## API Structure
|
|
1315
|
+
\`\`\`
|
|
1316
|
+
/src
|
|
1317
|
+
/routes - API route handlers
|
|
1318
|
+
/controllers - Business logic
|
|
1319
|
+
/models - Database models
|
|
1320
|
+
/middleware - Auth, validation, etc.
|
|
1321
|
+
/services - External service integrations
|
|
1322
|
+
/utils - Helper functions
|
|
1323
|
+
\`\`\`
|
|
1324
|
+
|
|
1325
|
+
## Coding Standards
|
|
1326
|
+
- Follow REST conventions for endpoints
|
|
1327
|
+
- Always validate input data
|
|
1328
|
+
- Handle errors consistently with proper status codes
|
|
1329
|
+
- Log important operations and errors
|
|
1330
|
+
- Write tests for all endpoints
|
|
1331
|
+
|
|
1332
|
+
## Database
|
|
1333
|
+
- Use migrations for schema changes
|
|
1334
|
+
- Never store sensitive data in plain text
|
|
1335
|
+
- Index frequently queried columns
|
|
1336
|
+
|
|
1337
|
+
## Security
|
|
1338
|
+
- Validate all user input
|
|
1339
|
+
- Use parameterized queries (no SQL injection)
|
|
1340
|
+
- Implement rate limiting
|
|
1341
|
+
- Keep dependencies updated
|
|
1342
|
+
|
|
1343
|
+
## Commands
|
|
1344
|
+
- \`npm run dev\` - Development with hot reload
|
|
1345
|
+
- \`npm run test\` - Run test suite
|
|
1346
|
+
- \`npm run migrate\` - Run database migrations`},{id:"mobile-app",name:"Mobile App",description:"React Native, Flutter, or native iOS/Android",icon:fR,color:"text-purple-400",bgColor:"bg-purple-500/10",content:`# Mobile Application
|
|
1347
|
+
|
|
1348
|
+
Cross-platform mobile app for [purpose].
|
|
1349
|
+
|
|
1350
|
+
## Tech Stack
|
|
1351
|
+
- Framework: React Native / Flutter
|
|
1352
|
+
- Navigation: React Navigation / GoRouter
|
|
1353
|
+
- State: Redux Toolkit / Riverpod
|
|
1354
|
+
- API: REST/GraphQL
|
|
1355
|
+
|
|
1356
|
+
## Project Structure
|
|
1357
|
+
\`\`\`
|
|
1358
|
+
/src
|
|
1359
|
+
/screens - Screen components
|
|
1360
|
+
/components - Reusable UI components
|
|
1361
|
+
/navigation - Navigation configuration
|
|
1362
|
+
/services - API and native services
|
|
1363
|
+
/hooks - Custom hooks
|
|
1364
|
+
/store - State management
|
|
1365
|
+
/assets - Images, fonts, etc.
|
|
1366
|
+
\`\`\`
|
|
1367
|
+
|
|
1368
|
+
## Platform Guidelines
|
|
1369
|
+
- Follow iOS Human Interface Guidelines
|
|
1370
|
+
- Follow Material Design for Android
|
|
1371
|
+
- Test on multiple device sizes
|
|
1372
|
+
- Handle offline scenarios gracefully
|
|
1373
|
+
|
|
1374
|
+
## Performance
|
|
1375
|
+
- Optimize list rendering (FlatList/ListView)
|
|
1376
|
+
- Lazy load images
|
|
1377
|
+
- Minimize re-renders
|
|
1378
|
+
- Profile on real devices
|
|
1379
|
+
|
|
1380
|
+
## Testing
|
|
1381
|
+
- Unit tests for business logic
|
|
1382
|
+
- Component tests for UI
|
|
1383
|
+
- E2E tests for critical flows
|
|
1384
|
+
|
|
1385
|
+
## Commands
|
|
1386
|
+
- \`npm run ios\` - Run on iOS simulator
|
|
1387
|
+
- \`npm run android\` - Run on Android emulator
|
|
1388
|
+
- \`npm run test\` - Run tests`},{id:"cli-tool",name:"CLI Tool",description:"Command-line applications and developer tools",icon:wn,color:"text-amber-400",bgColor:"bg-amber-500/10",content:`# CLI Tool
|
|
1389
|
+
|
|
1390
|
+
Command-line tool for [purpose].
|
|
1391
|
+
|
|
1392
|
+
## Tech Stack
|
|
1393
|
+
- Language: TypeScript/Go/Rust
|
|
1394
|
+
- CLI Framework: Commander/Cobra/Clap
|
|
1395
|
+
- Output: Chalk/termcolor
|
|
1396
|
+
|
|
1397
|
+
## Project Structure
|
|
1398
|
+
\`\`\`
|
|
1399
|
+
/src
|
|
1400
|
+
/commands - Command implementations
|
|
1401
|
+
/lib - Core functionality
|
|
1402
|
+
/utils - Helper utilities
|
|
1403
|
+
/config - Configuration handling
|
|
1404
|
+
index.ts - Entry point
|
|
1405
|
+
\`\`\`
|
|
1406
|
+
|
|
1407
|
+
## Design Principles
|
|
1408
|
+
- Follow Unix philosophy: do one thing well
|
|
1409
|
+
- Provide helpful error messages
|
|
1410
|
+
- Support --help for all commands
|
|
1411
|
+
- Use exit codes correctly (0=success, 1=error)
|
|
1412
|
+
- Support both interactive and non-interactive modes
|
|
1413
|
+
|
|
1414
|
+
## Output Guidelines
|
|
1415
|
+
- Use colors for better readability
|
|
1416
|
+
- Support --quiet and --verbose flags
|
|
1417
|
+
- Output machine-readable format with --json
|
|
1418
|
+
- Progress indicators for long operations
|
|
1419
|
+
|
|
1420
|
+
## Configuration
|
|
1421
|
+
- Support config files (~/.toolrc)
|
|
1422
|
+
- Environment variables
|
|
1423
|
+
- Command-line flags (highest priority)
|
|
1424
|
+
|
|
1425
|
+
## Commands
|
|
1426
|
+
- \`npm run build\` - Build the CLI
|
|
1427
|
+
- \`npm link\` - Install locally for testing
|
|
1428
|
+
- \`npm run test\` - Run tests`},{id:"monorepo",name:"Monorepo",description:"Multi-package repositories with shared code",icon:Q3,color:"text-cyan-400",bgColor:"bg-cyan-500/10",content:`# Monorepo
|
|
1429
|
+
|
|
1430
|
+
Multi-package repository containing [description].
|
|
1431
|
+
|
|
1432
|
+
## Structure
|
|
1433
|
+
\`\`\`
|
|
1434
|
+
/apps
|
|
1435
|
+
/web - Main web application
|
|
1436
|
+
/api - Backend API service
|
|
1437
|
+
/admin - Admin dashboard
|
|
1438
|
+
/packages
|
|
1439
|
+
/ui - Shared UI components
|
|
1440
|
+
/config - Shared configuration
|
|
1441
|
+
/utils - Shared utilities
|
|
1442
|
+
/types - Shared TypeScript types
|
|
1443
|
+
\`\`\`
|
|
1444
|
+
|
|
1445
|
+
## Tooling
|
|
1446
|
+
- Package Manager: pnpm/npm workspaces
|
|
1447
|
+
- Build: Turborepo/Nx
|
|
1448
|
+
- Versioning: Changesets
|
|
1449
|
+
|
|
1450
|
+
## Conventions
|
|
1451
|
+
- Shared packages go in /packages
|
|
1452
|
+
- Applications go in /apps
|
|
1453
|
+
- Each package has its own package.json
|
|
1454
|
+
- Use workspace protocol for internal deps
|
|
1455
|
+
|
|
1456
|
+
## Commands
|
|
1457
|
+
- \`pnpm install\` - Install all dependencies
|
|
1458
|
+
- \`pnpm dev\` - Start all apps in dev mode
|
|
1459
|
+
- \`pnpm build\` - Build all packages
|
|
1460
|
+
- \`pnpm test\` - Run all tests
|
|
1461
|
+
- \`pnpm lint\` - Lint all packages
|
|
1462
|
+
|
|
1463
|
+
## Important
|
|
1464
|
+
- Changes to /packages affect multiple apps
|
|
1465
|
+
- Run tests across affected packages before PR
|
|
1466
|
+
- Keep shared packages minimal and focused`},{id:"library",name:"Open Source Library",description:"npm packages, Python packages, or reusable libraries",icon:nS,color:"text-rose-400",bgColor:"bg-rose-500/10",content:`# Library Package
|
|
1467
|
+
|
|
1468
|
+
Reusable library for [purpose].
|
|
1469
|
+
|
|
1470
|
+
## Project Structure
|
|
1471
|
+
\`\`\`
|
|
1472
|
+
/src
|
|
1473
|
+
index.ts - Main exports
|
|
1474
|
+
/core - Core functionality
|
|
1475
|
+
/utils - Internal utilities
|
|
1476
|
+
/tests - Test files
|
|
1477
|
+
/docs - Documentation
|
|
1478
|
+
/examples - Usage examples
|
|
1479
|
+
\`\`\`
|
|
1480
|
+
|
|
1481
|
+
## API Design
|
|
1482
|
+
- Keep the public API minimal
|
|
1483
|
+
- Use TypeScript for type safety
|
|
1484
|
+
- Export types alongside functions
|
|
1485
|
+
- Maintain backward compatibility
|
|
1486
|
+
|
|
1487
|
+
## Documentation
|
|
1488
|
+
- JSDoc comments on all public APIs
|
|
1489
|
+
- README with quick start guide
|
|
1490
|
+
- API reference documentation
|
|
1491
|
+
- Migration guides for breaking changes
|
|
1492
|
+
|
|
1493
|
+
## Testing
|
|
1494
|
+
- Unit tests for all public functions
|
|
1495
|
+
- Edge cases and error scenarios
|
|
1496
|
+
- Type tests for TypeScript
|
|
1497
|
+
- Bundle size tracking
|
|
1498
|
+
|
|
1499
|
+
## Publishing
|
|
1500
|
+
- Semantic versioning (semver)
|
|
1501
|
+
- Changelog for all releases
|
|
1502
|
+
- Support both ESM and CommonJS
|
|
1503
|
+
- Tree-shakeable exports
|
|
1504
|
+
|
|
1505
|
+
## Commands
|
|
1506
|
+
- \`npm run build\` - Build for distribution
|
|
1507
|
+
- \`npm run test\` - Run test suite
|
|
1508
|
+
- \`npm run docs\` - Generate documentation
|
|
1509
|
+
- \`npm publish\` - Publish to npm`},{id:"data-science",name:"Data Science / ML",description:"Jupyter notebooks, ML models, and data pipelines",icon:Ao,color:"text-violet-400",bgColor:"bg-violet-500/10",content:`# Data Science Project
|
|
1510
|
+
|
|
1511
|
+
Machine learning / data analysis project for [purpose].
|
|
1512
|
+
|
|
1513
|
+
## Environment
|
|
1514
|
+
- Python 3.10+
|
|
1515
|
+
- Package manager: pip/conda
|
|
1516
|
+
- Notebooks: Jupyter Lab
|
|
1517
|
+
|
|
1518
|
+
## Project Structure
|
|
1519
|
+
\`\`\`
|
|
1520
|
+
/notebooks - Jupyter notebooks
|
|
1521
|
+
/src
|
|
1522
|
+
/data - Data loading and processing
|
|
1523
|
+
/features - Feature engineering
|
|
1524
|
+
/models - Model definitions
|
|
1525
|
+
/training - Training pipelines
|
|
1526
|
+
/evaluation - Metrics and evaluation
|
|
1527
|
+
/data
|
|
1528
|
+
/raw - Original data (gitignored)
|
|
1529
|
+
/processed - Processed datasets
|
|
1530
|
+
/models - Saved model artifacts
|
|
1531
|
+
\`\`\`
|
|
1532
|
+
|
|
1533
|
+
## Data Guidelines
|
|
1534
|
+
- Never commit raw data to git
|
|
1535
|
+
- Document data sources and schemas
|
|
1536
|
+
- Version processed datasets
|
|
1537
|
+
- Track data lineage
|
|
1538
|
+
|
|
1539
|
+
## Modeling
|
|
1540
|
+
- Log all experiments (MLflow/W&B)
|
|
1541
|
+
- Save model artifacts with metadata
|
|
1542
|
+
- Document hyperparameters
|
|
1543
|
+
- Version control models
|
|
1544
|
+
|
|
1545
|
+
## Notebooks
|
|
1546
|
+
- Clear outputs before committing
|
|
1547
|
+
- Use meaningful cell organization
|
|
1548
|
+
- Include markdown documentation
|
|
1549
|
+
- Convert to scripts for production
|
|
1550
|
+
|
|
1551
|
+
## Commands
|
|
1552
|
+
- \`pip install -r requirements.txt\` - Install deps
|
|
1553
|
+
- \`jupyter lab\` - Start Jupyter
|
|
1554
|
+
- \`python src/train.py\` - Train model
|
|
1555
|
+
- \`pytest tests/\` - Run tests`},{id:"devops",name:"DevOps / Infrastructure",description:"Terraform, Kubernetes, CI/CD configurations",icon:ZN,color:"text-orange-400",bgColor:"bg-orange-500/10",content:`# Infrastructure Project
|
|
1556
|
+
|
|
1557
|
+
Infrastructure as Code for [environment/purpose].
|
|
1558
|
+
|
|
1559
|
+
## Tech Stack
|
|
1560
|
+
- IaC: Terraform/Pulumi
|
|
1561
|
+
- Containers: Docker, Kubernetes
|
|
1562
|
+
- CI/CD: GitHub Actions/GitLab CI
|
|
1563
|
+
- Cloud: AWS/GCP/Azure
|
|
1564
|
+
|
|
1565
|
+
## Project Structure
|
|
1566
|
+
\`\`\`
|
|
1567
|
+
/terraform
|
|
1568
|
+
/modules - Reusable modules
|
|
1569
|
+
/environments
|
|
1570
|
+
/dev - Development config
|
|
1571
|
+
/staging - Staging config
|
|
1572
|
+
/prod - Production config
|
|
1573
|
+
/kubernetes
|
|
1574
|
+
/base - Base manifests
|
|
1575
|
+
/overlays - Environment overlays
|
|
1576
|
+
/docker - Dockerfiles
|
|
1577
|
+
/.github - CI/CD workflows
|
|
1578
|
+
\`\`\`
|
|
1579
|
+
|
|
1580
|
+
## Conventions
|
|
1581
|
+
- Use modules for reusable components
|
|
1582
|
+
- Environment-specific configs via tfvars
|
|
1583
|
+
- Tag all resources appropriately
|
|
1584
|
+
- Document all manual steps
|
|
1585
|
+
|
|
1586
|
+
## Security
|
|
1587
|
+
- No secrets in code (use Vault/SSM)
|
|
1588
|
+
- Least privilege IAM policies
|
|
1589
|
+
- Enable audit logging
|
|
1590
|
+
- Encrypt data at rest and in transit
|
|
1591
|
+
|
|
1592
|
+
## Deployment
|
|
1593
|
+
- Always plan before apply
|
|
1594
|
+
- Use workspaces for environments
|
|
1595
|
+
- Review changes in PR
|
|
1596
|
+
- Automated deployment via CI/CD
|
|
1597
|
+
|
|
1598
|
+
## Commands
|
|
1599
|
+
- \`terraform init\` - Initialize
|
|
1600
|
+
- \`terraform plan\` - Preview changes
|
|
1601
|
+
- \`terraform apply\` - Apply changes
|
|
1602
|
+
- \`kubectl apply -k overlays/dev\` - Deploy to K8s`}];function lq(){const[e,t]=y.useState(""),[n,i]=y.useState(!1),[l,c]=y.useState(!1),[u,f]=y.useState(null),[h,m]=y.useState(!1),g=Sn(),{data:p,isLoading:b}=pt({queryKey:["memory"],queryFn:Ue.getMemory});y.useEffect(()=>{p!==void 0&&(t(p),i(!1))},[p]);const w=Tt({mutationFn:Ue.updateMemory,onSuccess:()=>{g.invalidateQueries({queryKey:["memory"]}),i(!1),c(!0),setTimeout(()=>c(!1),2e3)}}),S=()=>{w.mutate(e)},j=N=>{(N.metaKey||N.ctrlKey)&&N.key==="s"&&(N.preventDefault(),S())},E=N=>{const T=nN.find(k=>k.id===N);T&&(f(N),t(T.content),i(!0))};return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex gap-6",children:[a.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Lt,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"CLAUDE.md"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Project instructions and context for Claude"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>m(!h),className:G(h&&"bg-accent"),children:[a.jsx(JN,{className:"h-4 w-4 mr-2"}),"What is this?"]}),a.jsx(me,{onClick:S,disabled:!n||w.isPending||b,className:"min-w-[100px]",children:w.isPending?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"h-4 w-4 animate-spin mr-2"}),"Saving"]}):l?a.jsxs(a.Fragment,{children:[a.jsx(Yi,{className:"h-4 w-4 mr-2"}),"Saved"]}):a.jsxs(a.Fragment,{children:[a.jsx(cR,{className:"h-4 w-4 mr-2"}),"Save"]})})]})]}),h&&a.jsx("div",{className:"mb-4 p-4 rounded-xl bg-primary/5 border border-primary/20",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex gap-3",children:[a.jsx(Kn,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h3",{className:"font-medium text-sm",children:"What is CLAUDE.md?"}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"CLAUDE.md is a special file that Claude automatically reads at the start of each session. It provides persistent context about your project, coding standards, and preferences - so you don't have to repeat instructions every time."}),a.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[a.jsx(we,{variant:"secondary",className:"text-xs",children:"Auto-loaded every session"}),a.jsx(we,{variant:"secondary",className:"text-xs",children:"Project-specific instructions"}),a.jsx(we,{variant:"secondary",className:"text-xs",children:"Shared with team via git"})]}),a.jsxs("div",{className:"flex items-center gap-4 pt-2 text-xs",children:[a.jsxs("a",{href:"https://www.anthropic.com/engineering/claude-code-best-practices",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-primary hover:underline",children:["Best Practices ",a.jsx(hw,{className:"h-3 w-3"})]}),a.jsxs("a",{href:"https://www.builder.io/blog/claude-md-guide",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-primary hover:underline",children:["Complete Guide ",a.jsx(hw,{className:"h-3 w-3"})]})]})]})]}),a.jsx(me,{variant:"ghost",size:"icon",onClick:()=>m(!1),className:"h-6 w-6 -mt-1 -mr-1",children:a.jsx(wa,{className:"h-4 w-4"})})]})}),a.jsx(fn,{className:"flex-1 flex flex-col overflow-hidden border-border/50",children:a.jsxs(mn,{className:"p-0 flex-1 relative",children:[b?a.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-background/50",children:a.jsx(Ct,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):null,a.jsx(el,{className:"w-full h-full p-5 resize-none bg-transparent text-sm leading-relaxed focus-visible:ring-0 border-0 rounded-none font-mono placeholder:text-muted-foreground/50",value:e,onChange:N=>{t(N.target.value),i(!0)},onKeyDown:j,placeholder:`# Project Name
|
|
1603
|
+
|
|
1604
|
+
## Overview
|
|
1605
|
+
Brief description of your project.
|
|
1606
|
+
|
|
1607
|
+
## Tech Stack
|
|
1608
|
+
- Language: TypeScript
|
|
1609
|
+
- Framework: React
|
|
1610
|
+
- Testing: Vitest
|
|
1611
|
+
|
|
1612
|
+
## Coding Standards
|
|
1613
|
+
- Use TypeScript strict mode
|
|
1614
|
+
- Prefer functional components
|
|
1615
|
+
- Write tests for new features
|
|
1616
|
+
|
|
1617
|
+
## Commands
|
|
1618
|
+
- \`npm run dev\` - Start development
|
|
1619
|
+
- \`npm run test\` - Run tests
|
|
1620
|
+
- \`npm run build\` - Production build`,spellCheck:!1})]})}),a.jsxs("div",{className:"flex items-center justify-between mt-4 text-xs text-muted-foreground",children:[a.jsxs("span",{children:[e.length," characters",n&&a.jsx("span",{className:"text-amber-500 ml-2",children:"Unsaved changes"})]}),a.jsxs("span",{children:["Press ",a.jsx("kbd",{className:"font-mono text-[10px] bg-muted px-1.5 py-0.5 rounded border border-border/50",children:"Cmd+S"})," to save"]})]})]}),a.jsxs("div",{className:"w-72 flex-shrink-0 flex flex-col",children:[a.jsxs("div",{className:"mb-4",children:[a.jsxs("h2",{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(nS,{className:"h-4 w-4 text-muted-foreground"}),"Templates"]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Quick-start with project presets"})]}),a.jsx(at,{className:"flex-1 -mr-3 pr-3",children:a.jsx("div",{className:"space-y-2",children:nN.map(N=>{const T=N.icon;return a.jsxs("button",{onClick:()=>E(N.id),className:G("group w-full flex items-start gap-3 p-3 rounded-xl text-left transition-all","border hover:border-border hover:bg-accent/50",u===N.id?"border-primary bg-primary/5 ring-1 ring-primary/20":"border-border/50"),children:[a.jsx("div",{className:G("w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",N.bgColor),children:a.jsx(T,{className:G("h-4 w-4",N.color)})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"font-medium text-sm",children:N.name}),a.jsx(Qi,{className:G("h-4 w-4 text-muted-foreground/50 opacity-0 group-hover:opacity-100 transition-opacity",u===N.id&&"opacity-100 text-primary")})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground mt-0.5 line-clamp-2",children:N.description})]})]},N.id)})})}),a.jsxs("div",{className:"mt-4 p-3 rounded-lg bg-muted/30 border border-border/50",children:[a.jsxs("h3",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[a.jsx(Kn,{className:"h-3.5 w-3.5 text-amber-500"}),"Pro Tips"]}),a.jsxs("ul",{className:"text-[11px] text-muted-foreground space-y-1.5",children:[a.jsx("li",{children:"Keep it concise - less is more"}),a.jsx("li",{children:"Tell Claude HOW to find info, not everything"}),a.jsx("li",{children:"Use IMPORTANT sparingly for critical rules"}),a.jsxs("li",{children:["Run ",a.jsx("code",{className:"bg-muted px-1 rounded",children:"/init"})," to auto-generate"]})]})]})]})]})}function oq(){const{data:e,isLoading:t}=pt({queryKey:["status"],queryFn:Ue.getStatus});return t?a.jsxs("div",{className:"max-w-2xl space-y-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Te,{className:"h-7 w-32"}),a.jsx(Te,{className:"h-4 w-48"})]}),a.jsx(Te,{className:"h-32 w-full rounded-lg"}),a.jsx(Te,{className:"h-48 w-full rounded-lg"})]}):a.jsxs("div",{className:"max-w",children:[a.jsxs("div",{className:"mb-6",children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Xi,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"Settings"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"System configuration and status"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs(fn,{className:"border-border/50",children:[a.jsxs(Pr,{className:"pb-3",children:[a.jsx(Zr,{className:"text-sm font-medium",children:"Environment"}),a.jsx(qi,{className:"text-xs",children:"Claude Code data directory"})]}),a.jsx(mn,{children:a.jsxs("div",{className:"flex items-center justify-between bg-muted/50 p-3 rounded-md",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(eu,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsx("span",{className:"text-sm",children:"Claude Directory"})]}),a.jsx("code",{className:"text-xs bg-background px-2 py-1 rounded border border-border/50 font-mono text-muted-foreground",children:(e==null?void 0:e.claudeDir)||"~/.claude"})]})})]}),a.jsxs(fn,{className:"border-border/50",children:[a.jsxs(Pr,{className:"pb-3",children:[a.jsx(Zr,{className:"text-sm font-medium",children:"Statistics"}),a.jsx(qi,{className:"text-xs",children:"Overview of stored data"})]}),a.jsx(mn,{children:a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-md border border-border/50 bg-card",children:[a.jsx(Js,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Projects"}),a.jsx("p",{className:"text-xl font-semibold tabular-nums",children:(e==null?void 0:e.projectCount)??0})]})]}),a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-md border border-border/50 bg-card",children:[a.jsx(Ao,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Sessions"}),a.jsx("p",{className:"text-xl font-semibold tabular-nums",children:(e==null?void 0:e.sessionCount)??0})]})]}),a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-md border border-border/50 bg-card",children:[a.jsx(Lt,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Plans"}),a.jsx("p",{className:"text-xl font-semibold tabular-nums",children:(e==null?void 0:e.planCount)??0})]})]}),a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-md border border-border/50 bg-card",children:[a.jsx($t,{className:"h-4 w-4 text-muted-foreground",strokeWidth:1.75}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Skills"}),a.jsx("p",{className:"text-xl font-semibold tabular-nums",children:(e==null?void 0:e.skillCount)??0})]})]})]})})]}),a.jsxs("div",{className:"text-center py-8 border-t border-border/30 mt-6",children:[a.jsx("p",{className:"text-sm font-medium",children:"claudecto"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"If Claude Code is your engineer, claudecto can be your CTO"})]})]})]})}const cq={language:"bg-blue-500/10 text-blue-400",framework:"bg-purple-500/10 text-purple-400",library:"bg-cyan-500/10 text-cyan-400",tool:"bg-amber-500/10 text-amber-400",database:"bg-emerald-500/10 text-emerald-400",infrastructure:"bg-red-500/10 text-red-400"},uq={beginner:"text-slate-400",intermediate:"text-blue-400",advanced:"text-purple-400",expert:"text-emerald-400"},dq={architecture:"bg-blue-500/10 text-blue-400",design:"bg-purple-500/10 text-purple-400",testing:"bg-emerald-500/10 text-emerald-400","error-handling":"bg-red-500/10 text-red-400",performance:"bg-amber-500/10 text-amber-400",security:"bg-rose-500/10 text-rose-400",other:"bg-slate-500/10 text-slate-400"},W5={high:"bg-red-500/10 text-red-500 border-red-500/20",medium:"bg-amber-500/10 text-amber-500 border-amber-500/20",low:"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"},fq={performance:a.jsx($t,{className:"h-4 w-4"}),quality:a.jsx(yo,{className:"h-4 w-4"}),cost:a.jsx(pu,{className:"h-4 w-4"}),learning:a.jsx(Mr,{className:"h-4 w-4"}),workflow:a.jsx(Xi,{className:"h-4 w-4"})};function mq({className:e}){const[t,n]=y.useState(null),[i,l]=y.useState([]),[c,u]=y.useState("global"),[f,h]=y.useState(!0),[m,g]=y.useState(!1),[p,b]=y.useState(null),[w,S]=y.useState(new Set(["health","techStack","patterns","productivity"]));y.useEffect(()=>{E()},[]),y.useEffect(()=>{N()},[c]);const j=R=>{S(z=>{const D=new Set(z);return D.has(R)?D.delete(R):D.add(R),D})},E=async()=>{try{const R=await Ue.getProjects();l(R)}catch{}},N=async()=>{h(!0),b(null);try{if(c==="global"){const{insight:R}=await Ue.getGlobalAIInsight();n(R)}else{const R=btoa(c),{insight:z}=await Ue.getProjectAIInsight(R);n(z)}}catch{n(null)}finally{h(!1)}},T=async(R=!1)=>{g(!0),b(null);try{if(c==="global"){const{insight:z}=await Ue.generateGlobalAIInsight(R);n(z),z.status==="generating"&&k()}else{const z=btoa(c),{insight:D}=await Ue.generateProjectAIInsight(z,R);n(D),D.status==="generating"&&k()}}catch(z){b(z.message)}finally{g(!1)}},k=async()=>{let z=0;const D=async()=>{if(z>=90){b("Generation timed out");return}try{let O;if(c==="global")O=await Ue.getGlobalAIInsight();else{const B=btoa(c);O=await Ue.getProjectAIInsight(B)}n(O.insight),O.insight.status==="generating"&&(z++,setTimeout(D,2e3))}catch{z++,setTimeout(D,2e3)}};setTimeout(D,2e3)};return f?a.jsx("div",{className:G("flex items-center justify-center py-12",e),children:a.jsx(Ct,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):t?t.status==="generating"?a.jsxs("div",{className:G("space-y-6",e),children:[a.jsx(af,{projects:i,selected:c,onChange:u}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-12 rounded-xl border border-border/50 bg-card",children:[a.jsx(Ct,{className:"h-8 w-8 animate-spin text-primary mb-4"}),a.jsxs("h3",{className:"font-medium",children:["Analyzing ",t.projectName,"..."]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This may take a few minutes."})]})]}):t.status==="error"?a.jsxs("div",{className:G("space-y-6",e),children:[a.jsx(af,{projects:i,selected:c,onChange:u}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-12 rounded-xl border border-border/50 bg-card",children:[a.jsx(Gr,{className:"h-8 w-8 text-red-500 mb-4"}),a.jsx("h3",{className:"font-medium",children:"Analysis Failed"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t.error}),a.jsxs(me,{variant:"outline",onClick:()=>T(!0),className:"mt-4",children:[a.jsx(ga,{className:"mr-2 h-4 w-4"}),"Retry"]})]})]}):a.jsxs("div",{className:G("space-y-6",e),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(af,{projects:i,selected:c,onChange:u}),a.jsxs(me,{variant:"outline",size:"sm",onClick:()=>T(!0),disabled:m,children:[a.jsx(ga,{className:G("h-4 w-4 mr-2",m&&"animate-spin")}),"Refresh"]})]}),t.summary&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(Vt,{className:"h-5 w-5 text-primary"}),a.jsxs("h3",{className:"font-semibold",children:[t.projectName," - AI Analysis"]})]}),a.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:t.summary}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4 mt-4",children:[t.highlights&&t.highlights.length>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[a.jsx(_r,{className:"h-4 w-4 text-emerald-500"}),"Highlights"]}),a.jsx("ul",{className:"space-y-1",children:t.highlights.map((R,z)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[a.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-emerald-500"}),R]},z))})]}),t.concerns&&t.concerns.length>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[a.jsx(xa,{className:"h-4 w-4 text-amber-500"}),"Concerns"]}),a.jsx("ul",{className:"space-y-1",children:t.concerns.map((R,z)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[a.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-amber-500"}),R]},z))})]})]})]}),t.healthScore&&a.jsx(zs,{title:"Project Health",icon:a.jsx(Js,{className:"h-4 w-4"}),expanded:w.has("health"),onToggle:()=>j("health"),badge:a.jsxs(we,{variant:"outline",className:G("text-xs",jq(t.healthScore.overall)),children:[t.healthScore.overall,"%"]}),children:a.jsx(hq,{healthScore:t.healthScore})}),t.techStack&&t.techStack.length>0&&a.jsx(zs,{title:"Technology Stack",icon:a.jsx(Yr,{className:"h-4 w-4"}),expanded:w.has("techStack"),onToggle:()=>j("techStack"),badge:a.jsx(we,{variant:"secondary",className:"text-xs",children:t.techStack.length}),children:a.jsx(pq,{techStack:t.techStack,recommendations:t.techStackRecommendations})}),(t.codingPatterns&&t.codingPatterns.length>0||t.antiPatterns&&t.antiPatterns.length>0)&&a.jsx(zs,{title:"Coding Patterns",icon:a.jsx(Vx,{className:"h-4 w-4"}),expanded:w.has("patterns"),onToggle:()=>j("patterns"),children:a.jsx(gq,{patterns:t.codingPatterns,antiPatterns:t.antiPatterns})}),(t.developmentPatterns&&t.developmentPatterns.length>0||t.workflowInsights&&t.workflowInsights.length>0)&&a.jsx(zs,{title:"Development Patterns",icon:a.jsx(Xi,{className:"h-4 w-4"}),expanded:w.has("development"),onToggle:()=>j("development"),children:a.jsx(xq,{patterns:t.developmentPatterns,workflows:t.workflowInsights})}),t.productivityMetrics&&t.productivityMetrics.length>0&&a.jsx(zs,{title:"Productivity Metrics",icon:a.jsx(qx,{className:"h-4 w-4"}),expanded:w.has("productivity"),onToggle:()=>j("productivity"),children:a.jsx(yq,{metrics:t.productivityMetrics,velocityTrend:t.velocityTrend,collaborationPatterns:t.collaborationPatterns})}),(t.learningInsights&&t.learningInsights.length>0||t.skillGrowth&&t.skillGrowth.length>0)&&a.jsx(zs,{title:"Learning & Growth",icon:a.jsx(Mr,{className:"h-4 w-4"}),expanded:w.has("learning"),onToggle:()=>j("learning"),children:a.jsx(vq,{insights:t.learningInsights,skillGrowth:t.skillGrowth})}),t.costAnalysis&&a.jsx(zs,{title:"Cost Analysis",icon:a.jsx(pu,{className:"h-4 w-4"}),expanded:w.has("cost"),onToggle:()=>j("cost"),badge:a.jsxs(we,{variant:"outline",className:"text-xs text-emerald-500",children:["$",t.costAnalysis.totalCost.toFixed(2)]}),children:a.jsx(bq,{costAnalysis:t.costAnalysis})}),t.recommendations&&t.recommendations.length>0&&a.jsx(zs,{title:"Recommendations",icon:a.jsx(Kn,{className:"h-4 w-4"}),expanded:w.has("recommendations"),onToggle:()=>j("recommendations"),badge:a.jsx(we,{variant:"secondary",className:"text-xs",children:t.recommendations.length}),children:a.jsx(wq,{recommendations:t.recommendations})}),a.jsxs("div",{className:"text-xs text-muted-foreground text-center",children:["Generated ",new Date(t.generatedAt).toLocaleString()]})]}):a.jsxs("div",{className:G("space-y-6",e),children:[a.jsx(af,{projects:i,selected:c,onChange:u}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-12 rounded-xl border border-border/50 bg-card",children:[a.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 mb-4",children:a.jsx(Vt,{className:"h-6 w-6 text-primary"})}),a.jsx("h3",{className:"text-lg font-medium",children:"AI Project Analytics"}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground text-center max-w-md",children:"Generate comprehensive AI-powered analytics including tech stack analysis, coding patterns, productivity metrics, and recommendations."}),a.jsx(me,{onClick:()=>T(),disabled:m,className:"mt-4",children:m?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"mr-2 h-4 w-4 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Vt,{className:"mr-2 h-4 w-4"}),"Generate AI Analytics"]})}),p&&a.jsx("p",{className:"text-sm text-red-500 mt-2",children:p})]})]})}function af({projects:e,selected:t,onChange:n}){return a.jsxs(Y5,{value:t,onValueChange:n,children:[a.jsx(Q5,{className:"w-[250px]",children:a.jsx(K5,{placeholder:"Select scope"})}),a.jsxs(X5,{children:[a.jsx(Sx,{value:"global",children:"All Projects (Global)"}),e.map(i=>a.jsx(Sx,{value:i.path,children:i.name},i.id))]})]})}function zs({title:e,icon:t,children:n,expanded:i,onToggle:l,badge:c}){return a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card overflow-hidden",children:[a.jsxs("button",{onClick:l,className:"w-full flex items-center justify-between p-4 hover:bg-muted/30 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[t,a.jsx("span",{className:"font-medium",children:e}),c]}),i?a.jsx(To,{className:"h-4 w-4"}):a.jsx(Ki,{className:"h-4 w-4"})]}),i&&a.jsx("div",{className:"px-4 pb-4 border-t border-border/30 pt-4",children:n})]})}function hq({healthScore:e}){if(!e)return null;const t=[{key:"codeQuality",label:"Code Quality",icon:a.jsx(Vx,{className:"h-4 w-4"})},{key:"testCoverage",label:"Test Coverage",icon:a.jsx(yo,{className:"h-4 w-4"})},{key:"documentation",label:"Documentation",icon:a.jsx(Hf,{className:"h-4 w-4"})},{key:"errorRate",label:"Error Rate",icon:a.jsx(Gr,{className:"h-4 w-4"})},{key:"velocity",label:"Velocity",icon:a.jsx($t,{className:"h-4 w-4"})}];return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:"text-4xl font-bold",style:{color:Cx(e.overall)},children:e.overall}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium",children:"Overall Health Score"}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Based on 5 key metrics"})]})]}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:t.map(({key:n,label:i,icon:l})=>{var f;const c=e.categories[n],u=(f=e.trends)==null?void 0:f.find(h=>h.category===n);return a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 text-center",children:[a.jsx("div",{className:"flex items-center justify-center gap-1 mb-1",children:l}),a.jsx("div",{className:"text-lg font-semibold",style:{color:Cx(c)},children:c}),a.jsx("div",{className:"text-[10px] text-muted-foreground",children:i}),u&&a.jsxs("div",{className:G("text-[10px] flex items-center justify-center gap-0.5 mt-1",u.direction==="improving"?"text-emerald-500":u.direction==="declining"?"text-red-500":"text-muted-foreground"),children:[u.direction==="improving"?a.jsx(Mo,{className:"h-3 w-3"}):u.direction==="declining"?a.jsx(Qx,{className:"h-3 w-3"}):a.jsx(Gx,{className:"h-3 w-3"}),u.change>0?"+":"",u.change,"%"]})]},n)})})]})}function pq({techStack:e,recommendations:t}){return a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map((n,i)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx(we,{className:G("text-xs",cq[n.type]),children:n.type}),a.jsx("span",{className:G("text-xs",uq[n.proficiency]),children:n.proficiency})]}),a.jsx("div",{className:"font-medium",children:n.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[a.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${n.usage}%`}})}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.usage,"%"]})]})]},i))}),t&&t.length>0&&a.jsxs("div",{className:"mt-4 p-3 rounded-lg bg-blue-500/10 border border-blue-500/20",children:[a.jsxs("h4",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[a.jsx(Kn,{className:"h-4 w-4 text-blue-400"}),"Tech Stack Recommendations"]}),a.jsx("ul",{className:"space-y-1",children:t.map((n,i)=>a.jsx("li",{className:"text-sm text-blue-300",children:n},i))})]})]})}function gq({patterns:e,antiPatterns:t}){return a.jsxs("div",{className:"space-y-4",children:[e&&e.length>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(_r,{className:"h-4 w-4 text-emerald-500"}),"Good Patterns"]}),a.jsx("div",{className:"space-y-2",children:e.map((n,i)=>a.jsx(rN,{pattern:n,isAnti:!1},i))})]}),t&&t.length>0&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(xa,{className:"h-4 w-4 text-amber-500"}),"Anti-Patterns to Address"]}),a.jsx("div",{className:"space-y-2",children:t.map((n,i)=>a.jsx(rN,{pattern:n,isAnti:!0},i))})]})]})}function rN({pattern:e,isAnti:t}){return a.jsxs("div",{className:G("p-3 rounded-lg border",t?"border-amber-500/20 bg-amber-500/5":"border-emerald-500/20 bg-emerald-500/5"),children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:e.name}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(we,{className:G("text-xs",dq[e.category]),children:e.category}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.frequency,"x"]})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:e.description}),e.recommendation&&a.jsx("p",{className:G("text-xs mt-2",t?"text-amber-400":"text-emerald-400"),children:e.recommendation})]})}function xq({patterns:e,workflows:t}){return a.jsxs("div",{className:"space-y-4",children:[e&&e.length>0&&a.jsx("div",{className:"space-y-2",children:e.map((n,i)=>a.jsxs("div",{className:G("p-3 rounded-lg border border-border/50",n.impact==="positive"?"bg-emerald-500/5":n.impact==="negative"?"bg-red-500/5":"bg-muted/30"),children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:n.pattern}),a.jsx(we,{variant:"outline",className:G("text-xs",n.impact==="positive"?"text-emerald-500":n.impact==="negative"?"text-red-500":""),children:n.impact})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:n.description}),n.suggestion&&a.jsx("p",{className:"text-xs text-blue-400 mt-1",children:n.suggestion})]},i))}),t&&t.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Workflow Insights"}),a.jsx("div",{className:"space-y-2",children:t.map((n,i)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:n.name}),a.jsxs("span",{className:"text-sm",style:{color:Cx(n.efficiency)},children:[n.efficiency,"%"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:n.description}),n.bottlenecks.length>0&&a.jsxs("div",{className:"mt-2",children:[a.jsx("span",{className:"text-xs text-amber-400",children:"Bottlenecks: "}),a.jsx("span",{className:"text-xs",children:n.bottlenecks.join(", ")})]})]},i))})]})]})}function yq({metrics:e,velocityTrend:t,collaborationPatterns:n}){return a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:e.map((i,l)=>a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 text-center",children:[a.jsx("div",{className:"text-2xl font-bold",children:i.value}),a.jsx("div",{className:"text-xs text-muted-foreground",children:i.unit}),a.jsx("div",{className:"text-sm font-medium mt-1",children:i.name}),a.jsxs("div",{className:G("text-xs flex items-center justify-center gap-1 mt-1",i.trend==="up"?"text-emerald-500":i.trend==="down"?"text-red-500":"text-muted-foreground"),children:[i.trend==="up"?a.jsx(Mo,{className:"h-3 w-3"}):i.trend==="down"?a.jsx(Qx,{className:"h-3 w-3"}):a.jsx(Gx,{className:"h-3 w-3"}),i.percentChange!==void 0&&`${i.percentChange>0?"+":""}${i.percentChange}%`]})]},l))}),n&&a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Peak Activity Hours"}),a.jsx("div",{className:"flex gap-0.5 h-16",children:n.peakHours.map((i,l)=>a.jsx("div",{className:"flex-1 bg-primary/20 rounded-sm",style:{opacity:.3+i.activity/Math.max(...n.peakHours.map(c=>c.activity))*.7},title:`${i.hour}:00 - ${i.activity} activities`},l))}),a.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1",children:[a.jsx("span",{children:"12am"}),a.jsx("span",{children:"12pm"}),a.jsx("span",{children:"12am"})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Weekly Distribution"}),a.jsx("div",{className:"space-y-1",children:n.sessionFrequency.map((i,l)=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs w-12",children:i.day.slice(0,3)}),a.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${i.count/Math.max(...n.sessionFrequency.map(c=>c.count))*100}%`}})}),a.jsx("span",{className:"text-xs text-muted-foreground w-6",children:i.count})]},l))})]})]})]})}function vq({insights:e,skillGrowth:t}){return a.jsxs("div",{className:"space-y-4",children:[t&&t.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Skill Growth"}),a.jsx("div",{className:"space-y-2",children:t.map((n,i)=>a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-sm w-24",children:n.skill}),a.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${n.level}%`}})}),a.jsxs("span",{className:"text-xs text-muted-foreground w-12",children:[n.level,"%"]}),a.jsxs("span",{className:G("text-xs w-10",n.growth>0?"text-emerald-500":"text-muted-foreground"),children:["+",n.growth,"%"]})]},i))})]}),e&&e.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Learning Insights"}),a.jsx("div",{className:"space-y-2",children:e.map((n,i)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:n.topic}),a.jsxs(we,{variant:"outline",className:"text-xs text-emerald-500",children:["+",n.proficiencyGain,"%"]})]}),a.jsxs("div",{className:"text-xs text-muted-foreground",children:[n.timeInvested," min invested"]}),n.nextSteps.length>0&&a.jsxs("div",{className:"mt-2",children:[a.jsx("span",{className:"text-xs font-medium",children:"Next steps: "}),a.jsx("span",{className:"text-xs text-blue-400",children:n.nextSteps.join(", ")})]})]},i))})]})]})}function bq({costAnalysis:e}){return e?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 text-center",children:[a.jsxs("div",{className:"text-2xl font-bold text-emerald-500",children:["$",e.totalCost.toFixed(2)]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Cost"})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 text-center",children:[a.jsxs("div",{className:"text-2xl font-bold",children:["$",e.costPerSession.toFixed(3)]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Per Session"})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 text-center",children:[a.jsxs("div",{className:"text-2xl font-bold",children:["$",e.projectedMonthlyCost.toFixed(2)]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Projected/Month"})]})]}),e.optimizationOpportunities.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium mb-2",children:"Optimization Opportunities"}),a.jsx("div",{className:"space-y-2",children:e.optimizationOpportunities.map((t,n)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:t.title}),a.jsx(we,{variant:"outline",className:G("text-xs",W5[t.impact]),children:t.impact})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:t.description})]},n))})]})]}):null}function wq({recommendations:e}){return e?a.jsx("div",{className:"space-y-2",children:e.map((t,n)=>a.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[fq[t.category],a.jsx(we,{variant:"outline",className:G("text-xs",W5[t.priority]),children:t.priority}),a.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:t.category})]}),a.jsx("div",{className:"font-medium text-sm",children:t.title}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t.description}),a.jsxs("p",{className:"text-xs text-emerald-400 mt-1",children:["Expected Impact: ",t.expectedImpact]})]},n))}):null}function jq(e){return e>=80?"text-emerald-500":e>=60?"text-blue-500":e>=40?"text-amber-500":"text-red-500"}function Cx(e){return e>=80?"#10b981":e>=60?"#3b82f6":e>=40?"#f59e0b":"#ef4444"}function Nq(){const[e,t]=y.useState("usage"),[n,i]=y.useState(30),{data:l,isLoading:c}=pt({queryKey:["analytics","global",n],queryFn:()=>Ue.getGlobalAnalytics(n)}),{data:u,isLoading:f}=pt({queryKey:["analytics","tools",n],queryFn:()=>Ue.getToolAnalytics(n)}),{isLoading:h}=pt({queryKey:["analytics","daily",n],queryFn:()=>Ue.getDailyAnalytics(n)}),m=c||f||h,p=l?((b=[])=>{if(b.length<14)return null;const w=b.slice(-7).reduce((j,E)=>j+E.cost,0),S=b.slice(-14,-7).reduce((j,E)=>j+E.cost,0);return S===0?null:(w-S)/S*100})(l.dailyCosts):null;return a.jsxs("div",{className:"h-[calc(100vh-4rem)] flex flex-col",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(qx,{className:"h-5 w-5 text-muted-foreground"}),"Analytics"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Token usage, costs, and AI-powered insights"})]}),e==="usage"&&a.jsx("div",{className:"flex items-center gap-1 bg-muted/50 rounded-lg p-1",children:[7,14,30,90].map(b=>a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>i(b),className:G("text-xs h-7",n===b&&"bg-background shadow-sm"),children:[b,"d"]},b))})]}),a.jsxs("div",{className:"flex items-center gap-1 bg-muted/50 rounded-lg p-1 mb-6 w-fit flex-shrink-0",children:[a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>t("usage"),className:G("text-xs h-8 gap-2",e==="usage"&&"bg-background shadow-sm"),children:[a.jsx(Js,{className:"h-3.5 w-3.5"}),"Usage Analytics"]}),a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>t("ai"),className:G("text-xs h-8 gap-2",e==="ai"&&"bg-background shadow-sm"),children:[a.jsx(Vt,{className:"h-3.5 w-3.5"}),"AI Analytics"]})]}),e==="ai"&&a.jsx(mq,{}),e==="usage"&&a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"space-y-6 pb-8",children:[a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx(sf,{icon:pu,iconColor:"text-emerald-500",label:"Total Cost",value:l?`$${l.totalCost.totalCost.toFixed(2)}`:"-",subtext:p!==null?`${p>0?"+":""}${p.toFixed(1)}% vs prev 7d`:void 0,trend:p,isLoading:m}),a.jsx(sf,{icon:$t,iconColor:"text-amber-500",label:"Total Tokens",value:l?of(l.totalTokens.totalTokens):"-",subtext:`${of((l==null?void 0:l.totalTokens.cacheReadTokens)??0)} from cache`,isLoading:m}),a.jsx(sf,{icon:ba,iconColor:"text-blue-500",label:"Sessions",value:l?l.sessionCount.toString():"-",subtext:`~$${(l==null?void 0:l.avgCostPerSession.toFixed(3))??"0"}/session`,isLoading:m}),a.jsx(sf,{icon:Ii,iconColor:"text-purple-500",label:"Tool Calls",value:u?of(u.toolUsage.reduce((b,w)=>b+w.count,0)):"-",subtext:`${(u==null?void 0:u.toolUsage.length)??0} unique tools`,isLoading:m})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(qf,{className:"h-4 w-4 text-muted-foreground"}),"Daily Costs"]}),m?a.jsx(Te,{className:"h-40 w-full"}):a.jsx(Sq,{data:(l==null?void 0:l.dailyCosts)??[]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(rs,{className:"h-4 w-4 text-muted-foreground"}),"Model Usage"]}),m?a.jsx(Te,{className:"h-40 w-full"}):a.jsxs("div",{className:"space-y-3",children:[l==null?void 0:l.modelUsage.map(b=>a.jsxs("div",{className:"space-y-1",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"truncate font-mono text-xs",children:b.model.split("-").slice(0,3).join("-")}),a.jsxs("span",{className:"text-muted-foreground",children:["$",b.cost.totalCost.toFixed(3)]})]}),a.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-gradient-to-r from-blue-500 to-cyan-500 rounded-full",style:{width:`${b.cost.totalCost/((l==null?void 0:l.totalCost.totalCost)||1)*100}%`}})}),a.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted-foreground",children:[a.jsxs("span",{children:[of(b.tokens.totalTokens)," tokens"]}),a.jsxs("span",{children:[b.messageCount," messages"]})]})]},b.model)),(!(l!=null&&l.modelUsage)||l.modelUsage.length===0)&&a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No model data"})]})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(Ii,{className:"h-4 w-4 text-muted-foreground"}),"Tool Distribution"]}),m?a.jsx(Te,{className:"h-60 w-full"}):a.jsx("div",{className:"space-y-2",children:u==null?void 0:u.toolDistribution.slice(0,10).map(b=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-16 text-xs truncate",children:b.toolName}),a.jsx("div",{className:"flex-1 h-4 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-gradient-to-r from-purple-500 to-pink-500 rounded-full transition-all",style:{width:`${b.percentage}%`}})}),a.jsxs("div",{className:"w-12 text-right text-xs text-muted-foreground",children:[b.percentage,"%"]})]},b.toolName))})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(rs,{className:"h-4 w-4 text-muted-foreground"}),"Most Accessed Files"]}),m?a.jsx(Te,{className:"h-60 w-full"}):a.jsxs("div",{className:"space-y-2",children:[u==null?void 0:u.mostUsedFiles.slice(0,8).map(b=>a.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 text-xs",children:[a.jsx("span",{className:"truncate max-w-[180px] font-mono",title:b.filePath,children:b.filePath.split("/").pop()}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(we,{variant:"outline",className:"text-[10px]",children:["R:",b.readCount]}),a.jsxs(we,{variant:"outline",className:"text-[10px]",children:["E:",b.editCount]})]})]},b.filePath)),(!(u!=null&&u.mostUsedFiles)||u.mostUsedFiles.length===0)&&a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No file data"})]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(wn,{className:"h-4 w-4 text-muted-foreground"}),"Top Commands"]}),m?a.jsx(Te,{className:"h-60 w-full"}):a.jsxs("div",{className:"space-y-2",children:[u==null?void 0:u.mostUsedCommands.slice(0,8).map(b=>a.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/30 text-xs",children:[a.jsx("span",{className:"font-mono truncate max-w-[180px]",children:b.command}),a.jsxs(we,{variant:"secondary",className:"text-[10px]",children:[b.count,"x"]})]},b.command)),(!(u!=null&&u.mostUsedCommands)||u.mostUsedCommands.length===0)&&a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No command data"})]})]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(Mo,{className:"h-4 w-4 text-muted-foreground"}),"Cost Breakdown"]}),m?a.jsx(Te,{className:"h-20 w-full"}):l?a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[a.jsx(lf,{label:"Input",value:l.totalCost.inputCost,color:"bg-blue-500"}),a.jsx(lf,{label:"Output",value:l.totalCost.outputCost,color:"bg-emerald-500"}),a.jsx(lf,{label:"Cache Write",value:l.totalCost.cacheWriteCost,color:"bg-amber-500"}),a.jsx(lf,{label:"Cache Read",value:l.totalCost.cacheReadCost,color:"bg-purple-500"})]}):null]})]})})]})}function sf({icon:e,iconColor:t,label:n,value:i,subtext:l,trend:c,isLoading:u}){return u?a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsx(Te,{className:"h-4 w-20 mb-2"}),a.jsx(Te,{className:"h-8 w-24 mb-1"}),a.jsx(Te,{className:"h-3 w-16"})]}):a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4 hover:border-border transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(e,{className:G("h-4 w-4",t)}),a.jsx("span",{className:"text-xs text-muted-foreground",children:n})]}),a.jsxs("div",{className:"flex items-end gap-2",children:[a.jsx("span",{className:"text-2xl font-semibold",children:i}),c!=null&&a.jsx("span",{className:G("flex items-center text-xs mb-1",c>0?"text-red-500":"text-emerald-500"),children:c>0?a.jsx(QN,{className:"h-3 w-3"}):a.jsx(F3,{className:"h-3 w-3"})})]}),l&&a.jsx("span",{className:"text-[10px] text-muted-foreground",children:l})]})}function lf({label:e,value:t,color:n}){return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:G("w-2 h-8 rounded-full",n)}),a.jsxs("div",{children:[a.jsx("div",{className:"text-xs text-muted-foreground",children:e}),a.jsxs("div",{className:"text-sm font-medium",children:["$",t.toFixed(4)]})]})]})}function Sq({data:e}){if(!e||e.length===0)return a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No daily data"});const t=Math.max(...e.map(i=>i.cost),.01),n=e.slice(-14);return a.jsx("div",{className:"flex items-end gap-1 h-32",children:n.map(i=>a.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[a.jsx("div",{className:"w-full bg-gradient-to-t from-emerald-500 to-teal-500 rounded-t-sm transition-all hover:opacity-80",style:{height:`${i.cost/t*100}%`,minHeight:i.cost>0?"4px":"0"},title:`${i.date}: $${i.cost.toFixed(4)}`}),a.jsx("span",{className:"text-[8px] text-muted-foreground -rotate-45 origin-left whitespace-nowrap",children:i.date.slice(5)})]},i.date))})}function of(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toString()}function Cq(){const[e,t]=y.useState("overview"),[n,i]=y.useState([]),[l,c]=y.useState(null),[u,f]=y.useState(null),[h,m]=y.useState(!0),[g,p]=y.useState(!1),[b,w]=y.useState(null),[S,j]=y.useState(null);y.useEffect(()=>{E()},[]);const E=async()=>{m(!0),j(null);try{const[R,z]=await Promise.all([Gl.getProjectSummaries(),Gl.getGlobalIntelligence()]);i(R),f(z)}catch(R){j(R.message)}finally{m(!1)}},N=async()=>{p(!0);try{await Gl.generateAllIntelligence(!0),await E()}catch(R){j(R.message)}finally{p(!1)}},T=async R=>{w(R);try{let z=await Gl.getProjectIntelligence(R);(!z||z.status!=="completed")&&(z=await Gl.generateProjectIntelligence(R,!1)),c(z),t("project")}catch(z){j(z.message)}finally{w(null)}},k=async()=>{if(l){w(l.projectPath);try{const R=await Gl.generateProjectIntelligence(l.projectPath,!0);c(R)}catch(R){j(R.message)}finally{w(null)}}};return h?a.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:a.jsx(Ct,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):S?a.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx(Gr,{className:"h-12 w-12 text-red-500 mx-auto mb-4"}),a.jsx("h2",{className:"text-lg font-semibold",children:"Error Loading Intelligence"}),a.jsx("p",{className:"text-muted-foreground mt-2",children:S}),a.jsx("button",{onClick:E,className:"mt-4 px-4 py-2 bg-primary text-primary-foreground rounded-lg",children:"Retry"})]})}):e==="project"&&l?a.jsx(Tq,{project:l,onBack:()=>t("overview"),onRegenerate:k,isRegenerating:b===l.projectPath}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-bold tracking-tight flex items-center gap-2",children:[a.jsx(Mr,{className:"h-6 w-6 text-primary"}),"Project Intelligence"]}),a.jsx("p",{className:"text-muted-foreground",children:"Cross-session analysis of your development patterns"})]}),a.jsxs("button",{onClick:N,disabled:g,className:"flex items-center gap-2 px-4 py-2 bg-primary text-primary-foreground rounded-lg disabled:opacity-50 hover:bg-primary/90 transition-colors",children:[g?a.jsx(Ct,{className:"h-4 w-4 animate-spin"}):a.jsx(ga,{className:"h-4 w-4"}),g?"Generating...":"Generate All"]})]}),u&&a.jsx(kq,{intelligence:u}),a.jsxs("div",{className:"space-y-4",children:[a.jsx("h2",{className:"text-lg font-semibold",children:"Your Projects"}),n.length===0?a.jsx(Aq,{}):a.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(R=>a.jsx(Eq,{project:R,onClick:()=>T(R.projectPath),isLoading:b===R.projectPath},R.projectPath))})]})]})}function kq({intelligence:e}){return a.jsxs("div",{className:"rounded-xl border border-border/50 bg-gradient-to-br from-primary/5 to-transparent p-6",children:[a.jsx("div",{className:"flex items-start justify-between mb-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(Vt,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold",children:"Developer Profile"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:e.developerProfile||"Analyzing your development patterns..."})]})]})}),e.projectComparison&&a.jsxs("div",{className:"grid gap-4 md:grid-cols-3 mt-4",children:[a.jsx(jg,{icon:a.jsx($f,{className:"h-4 w-4 text-emerald-500"}),label:"Healthiest",value:e.projectComparison.healthiest}),a.jsx(jg,{icon:a.jsx(Hg,{className:"h-4 w-4 text-orange-500"}),label:"Most Active",value:e.projectComparison.mostActive}),a.jsx(jg,{icon:a.jsx(xa,{className:"h-4 w-4 text-amber-500"}),label:"Needs Attention",value:e.projectComparison.needsAttention})]}),e.workingPatterns&&a.jsxs("div",{className:"flex flex-wrap gap-2 mt-4 pt-4 border-t border-border/30",children:[a.jsxs(we,{variant:"secondary",className:"text-xs",children:[a.jsx(qf,{className:"h-3 w-3 mr-1"}),"Peak: ",e.workingPatterns.mostProductiveDay]}),a.jsxs(we,{variant:"secondary",className:"text-xs",children:[a.jsx(ba,{className:"h-3 w-3 mr-1"}),e.workingPatterns.mostProductiveHour,":00"]}),a.jsxs(we,{variant:"secondary",className:"text-xs",children:[a.jsx(Js,{className:"h-3 w-3 mr-1"}),"~",e.workingPatterns.averageSessionDuration," min/session"]})]})]})}function jg({icon:e,label:t,value:n}){return a.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-card/50",children:[e,a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:t}),a.jsx("p",{className:"text-sm font-medium truncate",children:n})]})]})}function Eq({project:e,onClick:t,isLoading:n}){const i=Z5(e.health),l=e.healthTrend==="improving"?Mo:e.healthTrend==="declining"?Qx:Gx,c=e.healthTrend==="improving"?"text-emerald-500":e.healthTrend==="declining"?"text-red-500":"text-muted-foreground";return a.jsxs("button",{onClick:t,disabled:n,className:"group block w-full text-left rounded-xl border border-border/50 bg-card p-5 transition-all hover:border-primary/50 hover:shadow-lg disabled:opacity-50",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h3",{className:"font-semibold truncate pr-2",children:e.projectName}),e.currentFocus&&a.jsx("p",{className:"text-sm text-muted-foreground truncate mt-1",children:e.currentFocus})]}),n?a.jsx(Ct,{className:"h-5 w-5 animate-spin text-muted-foreground flex-shrink-0"}):a.jsx(Qi,{className:"h-5 w-5 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]}),a.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Health"}),a.jsx("span",{className:G("text-sm font-bold",i),children:e.health})]}),a.jsx("div",{className:"h-2 bg-secondary rounded-full overflow-hidden",children:a.jsx("div",{className:G("h-full rounded-full transition-all",Rq(e.health)),style:{width:`${e.health}%`}})})]}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx(l,{className:G("h-4 w-4",c)})})]}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mb-4",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yr,{className:"h-3 w-3"}),e.sessionCount," sessions"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ba,{className:"h-3 w-3"}),Mq(e.lastActive)]})]}),(e.topChallenges.length>0||e.topRecommendations.length>0)&&a.jsxs("div",{className:"space-y-2 pt-3 border-t border-border/30",children:[e.topChallenges.length>0&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(xa,{className:"h-3 w-3 text-amber-500 mt-0.5 flex-shrink-0"}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:e.topChallenges[0]})]}),e.topRecommendations.length>0&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Kn,{className:"h-3 w-3 text-primary mt-0.5 flex-shrink-0"}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:e.topRecommendations[0]})]})]}),!e.hasFullIntelligence&&a.jsx("div",{className:"mt-3 pt-3 border-t border-border/30",children:a.jsx(we,{variant:"outline",className:"text-xs text-amber-500 border-amber-500/30",children:"Click to generate intelligence"})})]})}function Tq({project:e,onBack:t,onRegenerate:n,isRegenerating:i}){var c,u;const l=e.health?Z5(e.health.overall):"text-muted-foreground";return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-secondary transition-colors",children:a.jsx(Qi,{className:"h-5 w-5 rotate-180"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:e.projectName}),a.jsx("p",{className:"text-muted-foreground text-sm",children:e.projectPath})]})]}),a.jsxs("button",{onClick:n,disabled:i,className:"flex items-center gap-2 px-4 py-2 bg-secondary hover:bg-secondary/80 rounded-lg transition-colors disabled:opacity-50",children:[i?a.jsx(Ct,{className:"h-4 w-4 animate-spin"}):a.jsx(ga,{className:"h-4 w-4"}),"Refresh"]})]}),e.storyNarrative&&a.jsx("div",{className:"rounded-xl border border-border/50 bg-gradient-to-br from-primary/5 to-transparent p-6",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(Mr,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold mb-2",children:"Project Story"}),a.jsx("p",{className:"text-muted-foreground",children:e.storyNarrative}),e.currentFocus&&a.jsxs("p",{className:"mt-2 text-sm",children:[a.jsx("span",{className:"font-medium",children:"Current focus:"})," ",a.jsx("span",{className:"text-primary",children:e.currentFocus})]})]})]})}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(yo,{className:G("h-4 w-4",l)}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Health Score"})]}),a.jsxs("div",{className:"flex items-end gap-2",children:[a.jsx("span",{className:G("text-3xl font-bold",l),children:((c=e.health)==null?void 0:c.overall)??"N/A"}),e.health&&a.jsx("span",{className:G("text-sm mb-1",e.health.trend==="improving"?"text-emerald-500":e.health.trend==="declining"?"text-red-500":"text-muted-foreground"),children:e.health.trend})]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Yr,{className:"h-4 w-4 text-blue-500"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Sessions"})]}),a.jsx("span",{className:"text-3xl font-bold",children:e.sessionCount}),e.quickStats&&a.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["(",e.quickStats.sessionsThisWeek," this week)"]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(rs,{className:"h-4 w-4 text-purple-500"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Files"})]}),a.jsxs("div",{className:"flex items-baseline gap-2",children:[a.jsx("span",{className:"text-3xl font-bold",children:e.filesCreated+e.filesEdited}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[e.filesCreated," created, ",e.filesEdited," edited"]})]})]}),a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(xo,{className:"h-4 w-4 text-emerald-500"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Languages"})]}),a.jsx("div",{className:"flex flex-wrap gap-1",children:(u=e.primaryLanguages)==null?void 0:u.slice(0,3).map(f=>a.jsx(we,{variant:"secondary",className:"text-xs",children:f},f))})]})]}),a.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.codeHotspots&&e.codeHotspots.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx(Hg,{className:"h-4 w-4 text-orange-500"}),"Code Hotspots"]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Files that change frequently - potential refactoring candidates"}),a.jsx("div",{className:"space-y-3",children:e.codeHotspots.slice(0,5).map(f=>a.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-secondary/30",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(rs,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),a.jsx("span",{className:"text-sm truncate",children:f.fileName})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground flex-shrink-0",children:[a.jsxs("span",{children:[f.editCount," edits"]}),a.jsx("div",{className:"w-12 h-2 bg-secondary rounded-full overflow-hidden",title:`Churn score: ${f.churnScore}`,children:a.jsx("div",{className:"h-full bg-orange-500 rounded-full",style:{width:`${Math.min(100,f.churnScore*5)}%`}})})]})]},f.filePath))})]}),e.claudeEffectiveness&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx($t,{className:"h-4 w-4 text-primary"}),"Claude Effectiveness"]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[a.jsx("span",{className:"text-muted-foreground",children:"Task Completion"}),a.jsxs("span",{className:"font-medium",children:[e.claudeEffectiveness.averageTaskCompletion,"%"]})]}),a.jsx("div",{className:"h-2 bg-secondary rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${e.claudeEffectiveness.averageTaskCompletion}%`}})})]}),e.claudeEffectiveness.strengths.length>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Strengths"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:e.claudeEffectiveness.strengths.map((f,h)=>a.jsxs(we,{variant:"secondary",className:"text-xs bg-emerald-500/10 text-emerald-600",children:[a.jsx(_r,{className:"h-3 w-3 mr-1"}),f]},h))})]}),e.claudeEffectiveness.weaknesses.length>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Areas for Improvement"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:e.claudeEffectiveness.weaknesses.map((f,h)=>a.jsxs(we,{variant:"secondary",className:"text-xs bg-amber-500/10 text-amber-600",children:[a.jsx(xa,{className:"h-3 w-3 mr-1"}),f]},h))})]})]})]}),e.challenges&&e.challenges.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx(xa,{className:"h-4 w-4 text-amber-500"}),"Recurring Challenges"]}),a.jsx("div",{className:"space-y-3",children:e.challenges.slice(0,5).map(f=>a.jsxs("div",{className:"p-3 rounded-lg bg-amber-500/5 border border-amber-500/20",children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:f.title}),a.jsxs(we,{variant:"outline",className:"text-xs",children:[f.occurrences,"x"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:f.description}),f.suggestedResolution&&a.jsxs("p",{className:"text-xs text-primary mt-2",children:["Suggestion: ",f.suggestedResolution]})]},f.id))})]}),e.recommendations&&e.recommendations.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx(Kn,{className:"h-4 w-4 text-primary"}),"Recommendations"]}),a.jsx("div",{className:"space-y-3",children:e.recommendations.slice(0,5).map(f=>a.jsxs("div",{className:"p-3 rounded-lg bg-primary/5 border border-primary/20",children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsx("span",{className:"font-medium text-sm",children:f.title}),a.jsx(we,{variant:"outline",className:G("text-xs",f.priority==="high"?"border-red-500/30 text-red-500":f.priority==="medium"?"border-amber-500/30 text-amber-500":"border-muted text-muted-foreground"),children:f.priority})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:f.description}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[a.jsx("span",{className:"font-medium",children:"Impact:"})," ",f.estimatedImpact]})]},f.id))})]})]}),e.activityPattern&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx(Js,{className:"h-4 w-4 text-blue-500"}),"Activity Pattern"]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Peak Days"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:e.activityPattern.peakDays.slice(0,3).map(f=>a.jsxs(we,{variant:"secondary",className:"text-xs",children:[f.day,": ",f.sessions]},f.day))})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Avg Sessions/Week"}),a.jsx("span",{className:"text-2xl font-bold",children:e.activityPattern.averageSessionsPerWeek.toFixed(1)})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Current Streak"}),a.jsxs("span",{className:"text-2xl font-bold flex items-center gap-2",children:[a.jsx(Hg,{className:"h-5 w-5 text-orange-500"}),e.activityPattern.lastActiveStreak," days"]})]})]})]}),e.topTools&&e.topTools.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-5",children:[a.jsxs("h3",{className:"font-semibold flex items-center gap-2 mb-4",children:[a.jsx($t,{className:"h-4 w-4 text-purple-500"}),"Most Used Tools"]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:e.topTools.slice(0,10).map(f=>a.jsxs(we,{variant:"secondary",className:"text-xs",children:[f.name,a.jsxs("span",{className:"ml-1 text-muted-foreground",children:["(",f.count,")"]})]},f.name))})]})]})}function Aq(){return a.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[a.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 mb-4",children:a.jsx(Mr,{className:"h-6 w-6 text-primary"})}),a.jsx("h3",{className:"text-lg font-medium",children:"No Projects Yet"}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground text-center max-w-md",children:"Start using Claude Code to generate project intelligence. Your development patterns will be analyzed across sessions."})]})}function Z5(e){return e>=80?"text-emerald-500":e>=60?"text-blue-500":e>=40?"text-amber-500":"text-red-500"}function Rq(e){return e>=80?"bg-emerald-500":e>=60?"bg-blue-500":e>=40?"bg-amber-500":"bg-red-500"}function Mq(e){const t=new Date(e),i=new Date().getTime()-t.getTime(),l=Math.floor(i/(1e3*60*60*24));return l===0?"Today":l===1?"Yesterday":l<7?`${l} days ago`:l<30?`${Math.floor(l/7)} weeks ago`:`${Math.floor(l/30)} months ago`}const Dq={language:{bg:"bg-blue-500/10",text:"text-blue-600 dark:text-blue-400",border:"border-blue-500/30"},framework:{bg:"bg-purple-500/10",text:"text-purple-600 dark:text-purple-400",border:"border-purple-500/30"},library:{bg:"bg-pink-500/10",text:"text-pink-600 dark:text-pink-400",border:"border-pink-500/30"},tool:{bg:"bg-amber-500/10",text:"text-amber-600 dark:text-amber-400",border:"border-amber-500/30"},database:{bg:"bg-emerald-500/10",text:"text-emerald-600 dark:text-emerald-400",border:"border-emerald-500/30"},cloud:{bg:"bg-cyan-500/10",text:"text-cyan-600 dark:text-cyan-400",border:"border-cyan-500/30"},devops:{bg:"bg-orange-500/10",text:"text-orange-600 dark:text-orange-400",border:"border-orange-500/30"},testing:{bg:"bg-green-500/10",text:"text-green-600 dark:text-green-400",border:"border-green-500/30"}},J5={language:xo,framework:Yr,library:$x,tool:Ii,database:Ao,cloud:ZN,devops:Vf,testing:Kx},Oq={learning:{label:"Learning",variant:"outline"},familiar:{label:"Familiar",variant:"secondary"},proficient:{label:"Proficient",variant:"default"},expert:{label:"Expert",variant:"default"}};function cf({icon:e,iconColor:t,label:n,value:i,subtext:l,isLoading:c}){return c?a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsx(Te,{className:"h-4 w-20 mb-2"}),a.jsx(Te,{className:"h-8 w-24 mb-1"}),a.jsx(Te,{className:"h-3 w-16"})]}):a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4 hover:border-border transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(e,{className:G("h-4 w-4",t)}),a.jsx("span",{className:"text-xs text-muted-foreground",children:n})]}),a.jsx("div",{className:"text-2xl font-semibold",children:i}),l&&a.jsx("span",{className:"text-[10px] text-muted-foreground",children:l})]})}function _q({tech:e}){const t=Dq[e.type],n=J5[e.type],i=Oq[e.proficiency],l=e.usageCount>0?Math.round(e.claudeContributions/e.usageCount*100):0;return a.jsxs("div",{className:"rounded-lg border border-border/50 bg-card p-3 hover:border-border hover:bg-accent/30 transition-all group",children:[a.jsxs("div",{className:"flex items-center gap-2.5 mb-2",children:[a.jsx("div",{className:G("p-1.5 rounded-md",t.bg),children:a.jsx(n,{className:G("w-3.5 h-3.5",t.text)})}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h3",{className:"font-medium text-sm truncate",children:e.name}),a.jsx(we,{variant:i.variant,className:"text-[9px] h-4 px-1.5 flex-shrink-0",children:i.label})]})})]}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mb-2",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold text-foreground",children:e.usageCount})," uses"]}),a.jsx("span",{className:"text-border",children:"•"}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold text-foreground",children:e.filesModified})," files"]}),e.projectsUsed.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-border",children:"•"}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"font-semibold text-foreground",children:e.projectsUsed.length})," projects"]})]})]}),e.claudeContributions>0&&a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"h-1 flex-1 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full bg-primary/60 rounded-full transition-all",style:{width:`${Math.min(l,100)}%`}})}),a.jsxs("span",{className:"text-[10px] text-muted-foreground min-w-[32px] text-right",children:[l,"% AI"]})]})]})}function Pq({insight:e,isLoading:t,isGenerating:n,onGenerate:i}){var l,c;return t?a.jsx(Te,{className:"h-32 w-full"}):!e||e.status==="pending"?a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Mr,{className:"h-4 w-4 text-purple-500"}),"AI Analysis"]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Get personalized insights about your tech stack, strengths, and learning recommendations."}),a.jsx(me,{size:"sm",onClick:i,disabled:n,className:"w-full",children:n?a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"h-4 w-4 mr-2 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Vt,{className:"h-4 w-4 mr-2"}),"Generate AI Insights"]})})]}):e.status==="generating"||n?a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Mr,{className:"h-4 w-4 text-purple-500"}),"AI Analysis"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ct,{className:"h-5 w-5 animate-spin text-primary"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium",children:"Analyzing your stack..."}),a.jsx("p",{className:"text-[10px] text-muted-foreground",children:"This may take a minute"})]})]})]}):e.status==="error"?a.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/5 p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-2 flex items-center gap-2 text-red-600 dark:text-red-400",children:[a.jsx(Gr,{className:"h-4 w-4"}),"Analysis Failed"]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:((l=e.error)==null?void 0:l.message)||"Unknown error"}),((c=e.error)==null?void 0:c.suggestion)&&a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.error.suggestion}),a.jsx(me,{size:"sm",variant:"outline",onClick:i,disabled:n,children:"Try Again"})]}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Mr,{className:"h-4 w-4 text-purple-500"}),"AI Analysis"]}),e.developerProfile&&a.jsx("p",{className:"text-xs font-medium text-primary mb-2",children:e.developerProfile}),e.overview&&a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:e.overview}),e.stackHealth!==void 0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[a.jsx("span",{className:"text-muted-foreground",children:"Stack Health"}),a.jsxs("span",{className:"font-medium",children:[e.stackHealth,"/100"]})]}),a.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:a.jsx("div",{className:G("h-full rounded-full transition-all",e.stackHealth>=70?"bg-green-500":e.stackHealth>=40?"bg-yellow-500":"bg-red-500"),style:{width:`${e.stackHealth}%`}})})]})]}),e.strengths&&e.strengths.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(WN,{className:"h-4 w-4 text-green-500"}),"Strengths"]}),a.jsx("div",{className:"space-y-2",children:e.strengths.slice(0,3).map((u,f)=>a.jsxs("div",{className:"text-xs",children:[a.jsx("p",{className:"font-medium",children:u.title}),a.jsx("p",{className:"text-muted-foreground",children:u.description})]},f))})]}),e.learningPath&&e.learningPath.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(J3,{className:"h-4 w-4 text-blue-500"}),"Learning Path"]}),a.jsx("div",{className:"space-y-2",children:e.learningPath.slice(0,3).map((u,f)=>a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(we,{variant:u.priority==="high"?"default":"secondary",className:"text-[10px] flex-shrink-0",children:u.priority}),a.jsxs("div",{className:"text-xs",children:[a.jsx("p",{className:"font-medium",children:u.skill}),a.jsx("p",{className:"text-muted-foreground",children:u.reason})]})]},f))})]}),e.blindSpots&&e.blindSpots.length>0&&a.jsxs("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/5 p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2 text-amber-600 dark:text-amber-400",children:[a.jsx(xa,{className:"h-4 w-4"}),"Blind Spots"]}),a.jsx("div",{className:"space-y-2",children:e.blindSpots.slice(0,2).map((u,f)=>a.jsxs("div",{className:"text-xs",children:[a.jsx("p",{className:"font-medium",children:u.title}),a.jsx("p",{className:"text-muted-foreground",children:u.suggestion})]},f))})]}),a.jsxs(me,{size:"sm",variant:"outline",onClick:i,disabled:n,className:"w-full",children:[n?a.jsx(Ct,{className:"h-4 w-4 mr-2 animate-spin"}):a.jsx(ga,{className:"h-4 w-4 mr-2"}),"Regenerate Analysis"]})]})}function zq({aiInsight:e,isLoading:t,isGeneratingAI:n,onGenerateAI:i}){return t?a.jsx("div",{className:"space-y-4",children:a.jsx(Te,{className:"h-32 w-full"})}):a.jsx(Pq,{insight:e,isLoading:t,isGenerating:n,onGenerate:i})}function Lq(){const[e,t]=y.useState(null),[n,i]=y.useState(null),[l,c]=y.useState(!0),[u,f]=y.useState(!1),[h,m]=y.useState(!1),[g,p]=y.useState(null),[b,w]=y.useState("all"),[S,j]=y.useState(!0);y.useEffect(()=>{E()},[]);const E=async(D=!1)=>{try{D?f(!0):c(!0),p(null);const[O,B]=await Promise.all([Ue.getTechStackInsights(D),Ue.getTechStackAIInsight()]);t(O),B.insight&&i(B.insight)}catch(O){p(O.message)}finally{c(!1),f(!1)}},N=()=>E(!0),T=async()=>{try{m(!0);const D=await Ue.generateTechStackAIInsight(!0);i(D.insight)}catch(D){console.error("Failed to generate AI insight:",D)}finally{m(!1)}},k=e==null?void 0:e.summary,R=(k==null?void 0:k.technologies.filter(D=>b==="all"||D.type===b))||[],z=(k==null?void 0:k.technologies.reduce((D,O)=>(D[O.type]||(D[O.type]=[]),D[O.type].push(O),D),{}))||{};return g?a.jsx("div",{className:"min-h-[60vh] flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 mb-4",children:a.jsx(Vt,{className:"h-6 w-6 text-red-500"})}),a.jsx("h2",{className:"text-lg font-semibold",children:"Error Loading Tech Stack"}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground max-w-md",children:g}),a.jsx(me,{variant:"outline",onClick:()=>E(),className:"mt-4",children:"Try Again"})]})}):a.jsxs("div",{className:"flex h-[calc(100vh-4rem)]",children:[a.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4 flex-shrink-0 px-1",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Yr,{className:"h-5 w-5 text-muted-foreground"}),"Tech Stack"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Technology usage with patterns and insights"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(me,{variant:"outline",size:"sm",onClick:N,disabled:u,children:[a.jsx(ga,{className:G("h-4 w-4 mr-2",u&&"animate-spin")}),u?"Scanning...":"Refresh"]}),a.jsx(me,{variant:"ghost",size:"icon",onClick:()=>j(!S),className:"h-8 w-8",children:S?a.jsx(rR,{className:"h-4 w-4"}):a.jsx(aR,{className:"h-4 w-4"})})]})]}),a.jsx(at,{className:"flex-1",children:a.jsxs("div",{className:"space-y-6 pb-8 pr-4 pl-1",children:[a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[a.jsx(cf,{icon:Yr,iconColor:"text-purple-500",label:"Technologies",value:(k==null?void 0:k.technologies.length.toString())||"-",isLoading:l}),a.jsx(cf,{icon:$x,iconColor:"text-blue-500",label:"Projects",value:(k==null?void 0:k.totalProjects.toString())||"-",isLoading:l}),a.jsx(cf,{icon:Vf,iconColor:"text-emerald-500",label:"Sessions",value:(k==null?void 0:k.totalSessions.toString())||"-",isLoading:l}),a.jsx(cf,{icon:xo,iconColor:"text-amber-500",label:"Files Touched",value:(k==null?void 0:k.totalFiles.toString())||"-",isLoading:l})]}),!l&&(n==null?void 0:n.stackPatterns)&&n.stackPatterns.length>0&&a.jsxs("div",{children:[a.jsxs("h2",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Mr,{className:"h-4 w-4 text-purple-500"}),"AI-Detected Stack Patterns"]}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:n.stackPatterns.map(D=>a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4 hover:bg-accent/50 transition-colors",children:[a.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[a.jsx("div",{className:"p-2 rounded-lg bg-purple-500/10",children:a.jsx(Yr,{className:"w-4 h-4 text-purple-500"})}),a.jsxs("div",{className:"flex-1",children:[a.jsx("h4",{className:"font-medium text-sm",children:D.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:D.description})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-1",children:[D.technologies.slice(0,5).map((O,B)=>a.jsx(we,{variant:"outline",className:"text-[10px]",children:O},B)),D.technologies.length>5&&a.jsxs(we,{variant:"outline",className:"text-[10px]",children:["+",D.technologies.length-5]})]})]},D.id))})]}),!l&&(k==null?void 0:k.primaryLanguages)&&k.primaryLanguages.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(gw,{className:"h-4 w-4 text-muted-foreground"}),"Primary Technologies"]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[k.primaryLanguages.map((D,O)=>a.jsx(we,{variant:"secondary",children:D},O)),k.topFrameworks.map((D,O)=>a.jsx(we,{variant:"outline",children:D},`fw-${O}`))]})]}),!l&&a.jsxs("div",{className:"flex items-center gap-1 bg-muted/50 rounded-lg p-1 w-fit overflow-x-auto",children:[a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>w("all"),className:G("text-xs h-8",b==="all"&&"bg-background shadow-sm"),children:["All (",(k==null?void 0:k.technologies.length)||0,")"]}),Object.keys(z).map(D=>{var B;const O=J5[D];return a.jsxs(me,{variant:"ghost",size:"sm",onClick:()=>w(D),className:G("text-xs h-8 gap-1.5",b===D&&"bg-background shadow-sm"),children:[a.jsx(O,{className:"w-3.5 h-3.5"}),a.jsx("span",{className:"capitalize",children:D}),a.jsxs("span",{className:"text-muted-foreground",children:["(",((B=z[D])==null?void 0:B.length)||0,")"]})]},D)})]}),l?a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((D,O)=>a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsx(Te,{className:"h-10 w-full mb-3"}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3",children:[a.jsx(Te,{className:"h-14"}),a.jsx(Te,{className:"h-14"})]}),a.jsx(Te,{className:"h-4 w-full"})]},O))}):a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:R.map((D,O)=>a.jsx(_q,{tech:D},O))}),!l&&R.length===0&&a.jsxs("div",{className:"text-center py-16",children:[a.jsx(xo,{className:"w-12 h-12 text-muted-foreground mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium mb-2",children:"No technologies found"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:b==="all"?"Start using Claude Code to build your tech stack profile":`No ${b} technologies detected yet`})]}),!l&&(k==null?void 0:k.insights)&&a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[k.insights.expertise.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(gw,{className:"h-4 w-4 text-amber-500"}),"Your Expertise"]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:k.insights.expertise.map((D,O)=>a.jsx(we,{variant:"secondary",children:D},O))})]}),k.insights.growthAreas.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Mo,{className:"h-4 w-4 text-cyan-500"}),"Growth Areas"]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:k.insights.growthAreas.map((D,O)=>a.jsx(we,{variant:"outline",children:D},O))})]})]}),!l&&(k==null?void 0:k.recommendations)&&k.recommendations.length>0&&a.jsxs("div",{className:"rounded-xl border border-border/50 bg-card p-4",children:[a.jsxs("h3",{className:"text-sm font-medium mb-3 flex items-center gap-2",children:[a.jsx(Kn,{className:"h-4 w-4 text-purple-500"}),"Recommendations"]}),a.jsx("ul",{className:"space-y-2",children:k.recommendations.map((D,O)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[a.jsx("span",{className:"text-primary mt-0.5",children:"•"}),D]},O))})]})]})})]}),S&&a.jsx("div",{className:"w-72 border-l border-border/50 pl-4 flex-shrink-0",children:a.jsx(at,{className:"h-full",children:a.jsxs("div",{className:"py-2 pr-2",children:[a.jsxs("h2",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[a.jsx(Vt,{className:"h-4 w-4 text-primary"}),"Deep Insights"]}),a.jsx(zq,{aiInsight:n,isLoading:l,isGeneratingAI:h,onGenerateAI:T})]})})})]})}function Iq({open:e,onOpenChange:t,recommendation:n,onSuccess:i}){const[l,c]=y.useState(""),[u,f]=y.useState(""),[h,m]=y.useState(""),[g,p]=y.useState(null),[b,w]=y.useState([]),[S,j]=y.useState("edit"),E=Sn();y.useEffect(()=>{if(n&&n.action.type==="skill"){const q=n.action;c(q.skillName),m(q.skillContent);const L=q.skillContent.match(/description:\s*(.+)/);f(L?L[1]:n.description)}},[n]);const N=Tt({mutationFn:({name:q,content:L})=>Ue.createSkill(q,L),onSuccess:()=>{E.invalidateQueries({queryKey:["skills"]}),E.invalidateQueries({queryKey:["advisor-recommendations"]}),E.invalidateQueries({queryKey:["advisor-stats"]}),Fe.success(`Skill "/${l}" created successfully!`),D(),i()},onError:q=>{Fe.error(`Failed to create skill: ${q.message}`)}}),T=Tt({mutationFn:q=>Ue.validateSkill(q),onSuccess:q=>{q.valid?w([]):w(q.errors)}});y.useEffect(()=>{if(!h.trim()){w([]);return}const q=setTimeout(()=>{T.mutate(k())},500);return()=>clearTimeout(q)},[h,u]);const k=y.useCallback(()=>h.startsWith("---")?h.replace(/description:\s*.+/,`description: ${u}`):`---
|
|
1621
|
+
description: ${u}
|
|
1622
|
+
user-invocable: true
|
|
1623
|
+
---
|
|
1624
|
+
|
|
1625
|
+
${h}`,[u,h]),R=y.useCallback(q=>q.trim()?u5.test(q)?(p(null),!0):(p(d5),!1):(p("Name is required"),!1),[]),z=q=>{c(q),R(q)},D=()=>{c(""),f(""),m(""),p(null),w([]),j("edit"),t(!1)},O=()=>{if(R(l)){if(b.length>0){Fe.error("Please fix validation errors before saving");return}N.mutate({name:l,content:k()})}},B=q=>{(q.metaKey||q.ctrlKey)&&q.key==="s"&&(q.preventDefault(),O())};return!n||n.action.type!=="skill"?null:a.jsx(fr,{open:e,onOpenChange:D,children:a.jsxs(Xn,{className:"max-w-3xl max-h-[90vh] flex flex-col overflow-hidden",onKeyDown:B,children:[a.jsx(mr,{className:"pb-4 border-b border-border/50",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs(hr,{className:"text-base font-semibold flex items-center gap-2",children:[a.jsx($t,{className:"h-4 w-4 text-primary"}),"Customize Skill"]}),a.jsx(pr,{className:"text-sm mt-0.5",children:"Review and customize before creating the skill"})]}),a.jsxs("div",{className:"flex items-center gap-1 p-1 rounded-lg bg-muted/50",children:[a.jsxs("button",{onClick:()=>j("edit"),className:G("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors",S==="edit"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(rS,{className:"h-3.5 w-3.5"}),"Edit"]}),a.jsxs("button",{onClick:()=>j("preview"),className:G("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors",S==="preview"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(K3,{className:"h-3.5 w-3.5"}),"Preview"]})]})]})}),a.jsx("div",{className:"flex-1 overflow-hidden py-4 -mx-6 px-6",children:S==="edit"?a.jsx(at,{className:"h-full -mr-3 pr-3",children:a.jsxs("div",{className:"space-y-5",children:[n.examples&&n.examples.length>0&&a.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 border border-border/50 space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[a.jsx(Kn,{className:"h-3.5 w-3.5"}),"Based on your usage patterns"]}),a.jsx("div",{className:"space-y-1.5",children:n.examples.slice(0,2).map((q,L)=>a.jsxs("p",{className:"text-xs text-muted-foreground italic",children:['"',q.slice(0,100),q.length>100?"...":"",'"']},L))})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"skill-name",className:"text-sm font-medium",children:"Skill Name"}),a.jsxs("div",{className:"flex gap-3",children:[a.jsxs("div",{className:"flex-1 space-y-1.5",children:[a.jsx(Et,{id:"skill-name",placeholder:"my-skill-name",value:l,onChange:q=>z(q.target.value),className:G("h-10 font-mono",g?"border-destructive focus-visible:ring-destructive":"")}),g?a.jsxs("p",{className:"text-xs text-destructive flex items-center gap-1",children:[a.jsx(Gr,{className:"h-3 w-3"}),g]}):a.jsx("p",{className:"text-xs text-muted-foreground",children:"Lowercase letters, numbers, and hyphens only"})]}),l&&!g&&a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-primary/10 border border-primary/20 h-10",children:[a.jsx(wn,{className:"h-4 w-4 text-primary"}),a.jsxs("code",{className:"text-sm font-mono text-primary font-medium",children:["/",l]})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Dt,{htmlFor:"skill-description",className:"text-sm font-medium",children:"Description"}),a.jsx(Et,{id:"skill-description",placeholder:"What this skill does...",value:u,onChange:q=>f(q.target.value),className:"h-10"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Helps Claude understand when to suggest this skill"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(Dt,{htmlFor:"skill-content",className:"text-sm font-medium",children:"Skill Instructions"}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(xo,{className:"h-3 w-3"}),"Markdown supported"]}),a.jsxs("span",{children:[h.length," chars"]})]})]}),a.jsx(el,{id:"skill-content",value:h,onChange:q=>m(q.target.value),className:"font-mono text-sm resize-none leading-relaxed min-h-[280px]",placeholder:`# Skill Instructions
|
|
1626
|
+
|
|
1627
|
+
Write instructions that Claude will follow when this skill is invoked...`}),b.length>0&&a.jsx("div",{className:"space-y-1 p-3 rounded-lg bg-destructive/10 border border-destructive/20",children:b.map((q,L)=>a.jsxs("p",{className:"text-xs text-destructive flex items-center gap-1",children:[a.jsx(Gr,{className:"h-3 w-3"}),q]},L))})]}),a.jsxs("div",{className:"flex gap-3 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:[a.jsx(Vt,{className:"h-4 w-4 text-amber-500 flex-shrink-0 mt-0.5"}),a.jsxs("div",{className:"text-xs text-amber-200/80 space-y-1",children:[a.jsxs("p",{children:[a.jsx("strong",{className:"text-amber-400",children:"Tip:"})," Use"," ",a.jsx("code",{className:"bg-amber-500/20 px-1 rounded",children:"$ARGUMENTS"})," ","to accept dynamic input when the skill is invoked."]}),a.jsxs("p",{className:"text-amber-200/60",children:["Press ",a.jsx("kbd",{className:"px-1 py-0.5 bg-amber-500/20 rounded text-[10px]",children:"⌘S"})," to save"]})]})]})]})}):a.jsx(at,{className:"h-full -mr-3 pr-3",children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"p-4 rounded-xl bg-muted/30 border border-border space-y-4",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"p-2.5 rounded-lg bg-primary/10",children:a.jsx($t,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx(we,{variant:"default",className:"text-[10px]",children:"SKILL"}),a.jsxs(we,{variant:"outline",className:"text-[10px] font-mono",children:["/",l||"skill-name"]})]}),a.jsx("h3",{className:"font-medium",children:l||"Skill Name"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:u||"No description provided"})]})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-background border border-border/50",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[a.jsx(wn,{className:"h-3.5 w-3.5"}),"Usage"]}),a.jsxs("code",{className:"text-sm font-mono text-primary",children:["/",l||"skill-name"," ",a.jsx("span",{className:"text-muted-foreground",children:"[arguments]"})]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[a.jsx(Lt,{className:"h-3.5 w-3.5"}),"Skill Content Preview"]}),a.jsx("div",{className:"p-4 rounded-lg bg-muted/50 border border-border/50",children:a.jsx("pre",{className:"text-sm font-mono whitespace-pre-wrap text-muted-foreground",children:k()})})]}),a.jsx("div",{className:G("flex items-center gap-2 p-3 rounded-lg border",b.length>0?"bg-destructive/10 border-destructive/20 text-destructive":"bg-emerald-500/10 border-emerald-500/20 text-emerald-400"),children:b.length>0?a.jsxs(a.Fragment,{children:[a.jsx(Gr,{className:"h-4 w-4"}),a.jsxs("span",{className:"text-sm",children:[b.length," validation error",b.length!==1?"s":""]})]}):a.jsxs(a.Fragment,{children:[a.jsx(_r,{className:"h-4 w-4"}),a.jsx("span",{className:"text-sm",children:"Skill is valid and ready to create"})]})})]})})}),a.jsxs(Wn,{className:"border-t border-border/50 pt-4 gap-2",children:[a.jsx(me,{variant:"outline",onClick:D,size:"sm",children:"Cancel"}),a.jsx(me,{onClick:O,disabled:N.isPending||!!g||!l||b.length>0,size:"sm",className:"gap-1.5",children:N.isPending?"Creating...":a.jsxs(a.Fragment,{children:[a.jsx(_r,{className:"h-3.5 w-3.5"}),"Create Skill"]})})]})]})})}const Uq={skill:{icon:$t,label:"Skill",badgeVariant:"default",color:"text-blue-500"},agent:{icon:cr,label:"Agent",badgeVariant:"default",color:"text-purple-500"},hook:{icon:wn,label:"Hook",badgeVariant:"secondary",color:"text-orange-500"},"claude-md":{icon:Lt,label:"Memory",badgeVariant:"outline",color:"text-green-500"},"mcp-server":{icon:aS,label:"MCP Server",badgeVariant:"secondary",color:"text-cyan-500"},settings:{icon:Xi,label:"Settings",badgeVariant:"outline",color:"text-gray-500"},model:{icon:Vf,label:"Model",badgeVariant:"secondary",color:"text-yellow-500"}};function uf({icon:e,label:t,value:n,variant:i="default"}){const l={default:"text-primary",success:"text-emerald-500",warning:"text-amber-500",muted:"text-muted-foreground"};return a.jsx(fn,{children:a.jsx(mn,{className:"p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:G("p-2 rounded-lg bg-muted",l[i]),children:a.jsx(e,{className:"h-4 w-4",strokeWidth:1.75})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-2xl font-semibold tracking-tight",children:n}),a.jsx("p",{className:"text-xs text-muted-foreground",children:t})]})]})})})}function Bq({confidence:e}){const t=Math.round(e*100),n=t>=80?"default":t>=60?"secondary":"outline";return a.jsxs(we,{variant:n,className:"text-[10px] font-mono",children:[a.jsx(yo,{className:"w-3 h-3 mr-1"}),t,"%"]})}function aN({recommendation:e,onCustomize:t,onDismiss:n,isDismissing:i}){const[l,c]=y.useState(!1),u=Uq[e.type],f=u.icon,h=()=>{const b=e.action;switch(b.type){case"skill":return`/${b.skillName}`;case"agent":return`Agent: ${b.agentName}`;case"hook":return`${b.event}${b.matcher?` → ${b.matcher}`:""}`;case"claude-md":return`${b.section}: ${b.addition.slice(0,60)}${b.addition.length>60?"...":""}`;case"mcp-server":return`MCP: ${b.serverName}${b.npmPackage?` (${b.npmPackage})`:""}`;case"settings":return`${b.setting} = ${JSON.stringify(b.value)}`;case"model":return`Use ${b.recommendedModel} for ${b.taskType}`;default:return""}},m=e.action.type==="skill",g=e.action.type==="agent",p=m||g;return a.jsxs(fn,{className:G("transition-all duration-150",l&&"ring-1 ring-border"),children:[a.jsx(Pr,{className:"p-4 pb-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"p-2 rounded-lg bg-muted",children:a.jsx(f,{className:G("h-4 w-4",u.color),strokeWidth:1.75})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[a.jsx(we,{variant:u.badgeVariant,className:"text-[10px] uppercase",children:u.label}),a.jsx(Bq,{confidence:e.confidence})]}),a.jsx(Zr,{className:"text-sm font-medium leading-snug",children:e.title}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:e.description})]})]})}),a.jsxs(mn,{className:"px-4 pb-4 pt-0 space-y-3",children:[a.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.evidence.slice(0,3).map((b,w)=>a.jsx("span",{className:"text-[10px] px-2 py-0.5 bg-muted text-muted-foreground rounded",children:b},w))}),a.jsx("div",{className:"p-2 bg-muted rounded-md",children:a.jsx("code",{className:"text-xs font-mono text-muted-foreground",children:h()})}),a.jsxs("button",{onClick:()=>c(!l),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[l?a.jsx(To,{className:"w-3 h-3"}):a.jsx(Ki,{className:"w-3 h-3"}),l?"Less details":"More details"]}),l&&a.jsxs("div",{className:"pt-3 border-t border-border space-y-3",children:[e.action.type==="skill"&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Skill Content Preview"}),a.jsx(at,{className:"h-40",children:a.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:a.jsx("code",{children:e.action.skillContent})})})]}),e.action.type==="agent"&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Agent Content Preview"}),a.jsx(at,{className:"h-40",children:a.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:a.jsx("code",{children:e.action.agentContent})})})]}),e.action.type==="hook"&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Hook Command"}),a.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:a.jsx("code",{children:e.action.command})})]}),e.action.type==="claude-md"&&a.jsxs("div",{children:[a.jsxs("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:["Addition to ",e.action.section]}),a.jsx(at,{className:"h-32",children:a.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md whitespace-pre-wrap",children:a.jsx("code",{children:e.action.addition})})})]}),e.action.type==="mcp-server"&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"MCP Server Setup"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:e.action.description}),a.jsx(at,{className:"h-40",children:a.jsx("pre",{className:"text-xs bg-muted p-3 rounded-md overflow-x-auto",children:a.jsx("code",{children:e.action.setupInstructions})})})]}),e.examples&&e.examples.length>0&&a.jsxs("div",{children:[a.jsx("h4",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Your prompts that triggered this"}),a.jsx("div",{className:"space-y-2",children:e.examples.slice(0,3).map((b,w)=>a.jsxs("div",{className:"text-xs bg-muted p-2 rounded text-muted-foreground italic",children:['"',b.slice(0,120),b.length>120?"...":"",'"']},w))})]}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(ba,{className:"w-3 h-3"}),"Detected ",new Date(e.createdAt).toLocaleDateString()]})]}),a.jsxs("div",{className:"flex gap-2 pt-2",children:[a.jsx(me,{size:"sm",onClick:t,disabled:i,className:"flex-1",children:p?a.jsxs(a.Fragment,{children:[a.jsx(rS,{className:"w-3 h-3 mr-1.5"}),"Customize & Apply"]}):a.jsxs(a.Fragment,{children:[a.jsx(Yi,{className:"w-3 h-3 mr-1.5"}),"Apply"]})}),a.jsxs(me,{size:"sm",variant:"outline",onClick:n,disabled:i,className:"flex-1",children:[i?a.jsx(Ct,{className:"w-3 h-3 mr-1.5 animate-spin"}):a.jsx(wa,{className:"w-3 h-3 mr-1.5"}),"Dismiss"]})]})]})]})}function sN({onAnalyze:e,isAnalyzing:t}){return a.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[a.jsx("div",{className:"p-4 rounded-full bg-muted mb-4",children:a.jsx(Vt,{className:"h-8 w-8 text-muted-foreground",strokeWidth:1.5})}),a.jsx("h3",{className:"text-lg font-medium mb-2",children:"No recommendations yet"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-6 max-w-md",children:"Run an analysis to discover patterns in your Claude Code usage and get personalized recommendations."}),a.jsxs(me,{onClick:e,disabled:t,children:[t?a.jsx(Ct,{className:"w-4 h-4 mr-2 animate-spin"}):a.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Analyze My Usage"]})]})}function Fq(){const e=Sn(),[t,n]=y.useState(!1),[i,l]=y.useState(null),[c,u]=y.useState(!1),[f,h]=y.useState(null),{data:m=[],isLoading:g,error:p}=pt({queryKey:["advisor-recommendations",t],queryFn:()=>Pc.getRecommendations(t)}),{data:b}=pt({queryKey:["advisor-stats"],queryFn:Pc.getStats}),w=Tt({mutationFn:()=>Pc.runAnalysis(!0),onSuccess:R=>{e.invalidateQueries({queryKey:["advisor-recommendations"]}),e.invalidateQueries({queryKey:["advisor-stats"]});const z=R.aiEvaluated?" (AI-evaluated)":" (heuristics only)";Fe.success(`Analysis complete${z}. Found ${R.newRecommendations} new recommendation(s).`)},onError:R=>{Fe.error(`Analysis failed: ${R.message}`)}}),S=Tt({mutationFn:R=>Pc.dismissRecommendation(R),onMutate:R=>l(R),onSettled:()=>l(null),onSuccess:()=>{e.invalidateQueries({queryKey:["advisor-recommendations"]}),e.invalidateQueries({queryKey:["advisor-stats"]}),Fe.success("Recommendation dismissed.")}}),j=R=>{h(R),u(!0)},E=async()=>{f&&await Pc.applyRecommendation(f.id)},N=m.filter(R=>R.status==="pending"),T=m.filter(R=>R.status==="applied"),k=m.filter(R=>R.status==="dismissed");return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-lg font-semibold tracking-tight flex items-center gap-2",children:[a.jsx(Kn,{className:"h-5 w-5 text-muted-foreground",strokeWidth:1.75}),"AI Advisor"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Proactive recommendations based on your usage patterns"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[(b==null?void 0:b.lastAnalyzed)&&a.jsxs("span",{className:"text-xs text-muted-foreground hidden sm:block",children:["Last: ",new Date(b.lastAnalyzed).toLocaleString()]}),a.jsxs(me,{onClick:()=>w.mutate(),disabled:w.isPending,children:[w.isPending?a.jsx(Ct,{className:"w-4 h-4 mr-2 animate-spin"}):a.jsx(ga,{className:"w-4 h-4 mr-2"}),w.isPending?"Analyzing...":"Run Analysis"]})]})]}),b&&a.jsxs("div",{className:"grid gap-4 grid-cols-2 md:grid-cols-4",children:[a.jsx(uf,{icon:Gr,label:"Pending",value:b.pending,variant:"warning"}),a.jsx(uf,{icon:_r,label:"Applied",value:b.applied,variant:"success"}),a.jsx(uf,{icon:Fg,label:"Dismissed",value:b.dismissed,variant:"muted"}),a.jsx(uf,{icon:Mo,label:"Total",value:b.pending+b.applied+b.dismissed,variant:"default"})]}),b&&b.pending>0&&a.jsx(fn,{children:a.jsx(mn,{className:"p-4",children:a.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[a.jsx("span",{className:"text-muted-foreground",children:"Pending by type:"}),b.byType.skill>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx($t,{className:"w-4 h-4 text-blue-500"}),b.byType.skill," skill",b.byType.skill!==1?"s":""]}),b.byType.agent>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(cr,{className:"w-4 h-4 text-purple-500"}),b.byType.agent," agent",b.byType.agent!==1?"s":""]}),b.byType.hook>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(wn,{className:"w-4 h-4 text-orange-500"}),b.byType.hook," hook",b.byType.hook!==1?"s":""]}),b.byType["claude-md"]>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Lt,{className:"w-4 h-4 text-green-500"}),b.byType["claude-md"]," memory"]}),b.byType["mcp-server"]>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(aS,{className:"w-4 h-4 text-cyan-500"}),b.byType["mcp-server"]," MCP"]}),b.byType.settings>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Xi,{className:"w-4 h-4 text-gray-500"}),b.byType.settings," setting",b.byType.settings!==1?"s":""]}),b.byType.model>0&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Vf,{className:"w-4 h-4 text-yellow-500"}),b.byType.model," model"]})]})})}),a.jsxs("div",{className:"flex items-center gap-4 border-b border-border",children:[a.jsxs("button",{onClick:()=>n(!1),className:G("pb-3 text-sm font-medium border-b-2 transition-colors",t?"border-transparent text-muted-foreground hover:text-foreground":"border-primary text-foreground"),children:["Pending (",N.length,")"]}),a.jsx("button",{onClick:()=>n(!0),className:G("pb-3 text-sm font-medium border-b-2 transition-colors",t?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:"All History"})]}),g?a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsx(Te,{className:"h-48 w-full rounded-lg"}),a.jsx(Te,{className:"h-48 w-full rounded-lg"}),a.jsx(Te,{className:"h-48 w-full rounded-lg"})]}):p?a.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[a.jsx(Gr,{className:"h-8 w-8 text-destructive mb-4"}),a.jsx("p",{className:"text-sm text-destructive",children:"Failed to load recommendations"})]}):N.length===0&&!t?a.jsx(sN,{onAnalyze:()=>w.mutate(),isAnalyzing:w.isPending}):a.jsxs("div",{className:"space-y-6",children:[!t&&a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:N.map(R=>a.jsx(aN,{recommendation:R,onCustomize:()=>j(R),onDismiss:()=>S.mutate(R.id),isDismissing:i===R.id},R.id))}),t&&a.jsxs(a.Fragment,{children:[N.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Pending (",N.length,")"]}),a.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:N.map(R=>a.jsx(aN,{recommendation:R,onCustomize:()=>j(R),onDismiss:()=>S.mutate(R.id),isDismissing:i===R.id},R.id))})]}),T.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mt-8",children:["Applied (",T.length,")"]}),a.jsx("div",{className:"grid gap-3 md:grid-cols-2",children:T.map(R=>a.jsx(fn,{className:"opacity-60",children:a.jsx(mn,{className:"p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(_r,{className:"w-5 h-5 text-emerald-500 flex-shrink-0"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:R.title}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Applied ",R.appliedAt?new Date(R.appliedAt).toLocaleDateString():""]})]})]})})},R.id))})]}),k.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mt-8",children:["Dismissed (",k.length,")"]}),a.jsx("div",{className:"grid gap-3 md:grid-cols-2",children:k.map(R=>a.jsx(fn,{className:"opacity-40",children:a.jsx(mn,{className:"p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Fg,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate text-muted-foreground",children:R.title}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Dismissed ",R.dismissedAt?new Date(R.dismissedAt).toLocaleDateString():""]})]})]})})},R.id))})]}),N.length===0&&T.length===0&&k.length===0&&a.jsx(sN,{onAnalyze:()=>w.mutate(),isAnalyzing:w.isPending})]})]}),a.jsx(Iq,{open:c,onOpenChange:u,recommendation:f,onSuccess:E})]})}function Hq(){return a.jsx(IP,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:a.jsx(T3,{children:a.jsx(r3,{children:a.jsxs(Zt,{path:"/",element:a.jsx(Rz,{}),children:[a.jsx(Zt,{index:!0,element:a.jsx(zz,{})}),a.jsx(Zt,{path:"search",element:a.jsx(Iz,{})}),a.jsx(Zt,{path:"sessions",element:a.jsx(cj,{})}),a.jsx(Zt,{path:"sessions/:projectId",element:a.jsx(cj,{})}),a.jsx(Zt,{path:"replay/:sessionId",element:a.jsx(dI,{})}),a.jsx(Zt,{path:"analytics",element:a.jsx(Nq,{})}),a.jsx(Zt,{path:"insights",element:a.jsx(Cq,{})}),a.jsx(Zt,{path:"advisor",element:a.jsx(Fq,{})}),a.jsx(Zt,{path:"tech-stack",element:a.jsx(Lq,{})}),a.jsx(Zt,{path:"plans",element:a.jsx(BF,{})}),a.jsx(Zt,{path:"skills",element:a.jsx(JF,{})}),a.jsx(Zt,{path:"agents",element:a.jsx(iH,{})}),a.jsx(Zt,{path:"hooks",element:a.jsx(iq,{})}),a.jsx(Zt,{path:"memory",element:a.jsx(lq,{})}),a.jsx(Zt,{path:"settings",element:a.jsx(oq,{})}),a.jsx(Zt,{path:"*",element:a.jsx(e3,{to:"/",replace:!0})})]})})})})}const qq=new VT({defaultOptions:{queries:{staleTime:30*1e3,retry:1,refetchOnWindowFocus:!1}}});bT.createRoot(document.getElementById("root")).render(a.jsx(y.StrictMode,{children:a.jsx($T,{client:qq,children:a.jsx(Hq,{})})}));
|
|
1628
|
+
//# sourceMappingURL=index-DVX7ofYu.js.map
|