@commandkit/devtools 0.0.0-dev.20250707125404 → 0.0.0-dev.20250708125356
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/ui/assets/{commands-DeRMTvk6.js → commands-ATcq2LaP.js} +1 -1
- package/ui/assets/{events-BHw--CR0.js → events-C-f860eI.js} +1 -1
- package/ui/assets/{feature-flags-CBoVVqMe.js → feature-flags-C0M0v2hb.js} +1 -1
- package/ui/assets/{guilds-CTH86LWE.js → guilds-DVvPSU_S.js} +1 -1
- package/ui/assets/{index-D19WUZtj.js → index-B-bnrkjI.js} +2 -2
- package/ui/assets/{index-nDLicClT.js → index-h48lariN.js} +1 -1
- package/ui/assets/{plugins-BMXDWqYy.js → plugins-M_olWZMm.js} +1 -1
- package/ui/index.html +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commandkit/devtools",
|
|
3
3
|
"description": "CommandKit devtools",
|
|
4
|
-
"version": "0.0.0-dev.
|
|
4
|
+
"version": "0.0.0-dev.20250708125356",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"devDependencies": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"@types/express": "^5.0.1",
|
|
11
11
|
"discord.js": "^14.21.0",
|
|
12
12
|
"typescript": "^5.8.3",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"commandkit": "1.0.0-dev.20250708125356",
|
|
14
|
+
"tsconfig": "0.0.0-dev.20250708125356"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as x,r as j,u as g,a as v,j as e,B as i,k as f,C as b}from"./index-
|
|
1
|
+
import{i as x,r as j,u as g,a as v,j as e,B as i,k as f,C as b}from"./index-B-bnrkjI.js";/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as x,a as p,r as o,j as e,L as u,B as c}from"./index-
|
|
1
|
+
import{u as x,a as p,r as o,j as e,L as u,B as c}from"./index-B-bnrkjI.js";const j=function(){const i=x(),{data:n,isLoading:m,isError:l}=p({queryKey:["events"],queryFn:async()=>await i.events.fetch()}),r=o.useMemo(()=>crypto.randomUUID(),[]),d=o.useMemo(()=>{if(!n)return[];const s={};return n.forEach(a=>{const t=a.namespace||r;s[t]||(s[t]=[]),s[t].push(a)}),Object.entries(s).map(([a,t])=>({namespace:a,events:t}))},[n,r]);return m||!n?e.jsx(u,{}):l?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching events data."})}):e.jsx("div",{className:"p-4",children:d.map(s=>e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-2xl font-bold capitalize",children:s.namespace===r?"Default":s.namespace}),e.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:s.events.map(a=>e.jsxs("div",{className:"border p-4 rounded",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.name}),e.jsx("p",{className:"text-muted-foreground text-xs mt-2 font-medium font-mono break-all",children:a.metadata.path}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono",children:["Namespace: ",a.namespace||"discord.js"]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Once: ",a.onceListeners]}),e.jsxs(c,{variant:"outline",className:"text-xs text-gray-500 mt-2 font-mono break-all",children:["Regular: ",a.regularListeners]})]})]},`${a.name}-${s.namespace}`))})]},s.namespace))})};export{j as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as i,a as o,j as e,L as c,B as d}from"./index-
|
|
1
|
+
import{u as i,a as o,j as e,L as c,B as d}from"./index-B-bnrkjI.js";const m=function(){const r=i(),{data:t,isLoading:a,isError:n}=o({queryKey:["feature-flags"],queryFn:async()=>await r.getFeatureFlags()});return a||!t?e.jsx(c,{}):n?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching plugins data."})}):e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold ",children:"Feature Flags"}),e.jsx("p",{className:"text-muted-foreground",children:"The below is a list of active feature flags in your project"})]}),e.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:t.flags.map(s=>e.jsxs("div",{className:"border p-4 rounded",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s.key}),e.jsx("p",{className:"text-muted-foreground text-xs mt-2 font-medium",children:s.description||`${s.key} feature flag`}),s.hasIdentify&&e.jsx(d,{variant:"outline",className:"text-sm text-gray-500 mt-2 font-mono",children:"identify"})]},s.key))})]})};export{m as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as c,a as d,j as e,L as i,C as o,b as l,A as m,c as x,d as h,e as j,f as p,h as u}from"./index-
|
|
1
|
+
import{u as c,a as d,j as e,L as i,C as o,b as l,A as m,c as x,d as h,e as j,f as p,h as u}from"./index-B-bnrkjI.js";const y=function(){const a=c(),{data:r,isLoading:n,isError:t}=d({queryKey:["guilds"],queryFn:async()=>await a.guilds.fetch()});return n||!r?e.jsx(i,{}):t?e.jsx("div",{className:"h-screen grid place-items-center",children:e.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching guilds data."})}):e.jsxs("div",{className:"grid grid-cols-3 gap-4 p-4",children:[e.jsx("h1",{className:"text-2xl font-bold col-span-3",children:"Guilds"}),r.map(s=>e.jsxs(o,{className:"border py-4 rounded",children:[e.jsx(l,{children:e.jsxs(m,{className:"h-12 w-12 rounded-lg",children:[e.jsx(x,{src:s.iconURL,alt:s.name}),e.jsx(h,{className:"rounded-lg",children:s.nameAcronym})]})}),e.jsxs(j,{children:[e.jsx(p,{children:s.name}),e.jsx(u,{children:s.description||`${s.name} server`})]})]},s.id))]})};export{y as component};
|
|
@@ -62,7 +62,7 @@ Error generating stack: `+i.message+`
|
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/var Zy;function wR(){if(Zy)return Yd;Zy=1;var n=Jo(),a=Bb();function r(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var s=typeof Object.is=="function"?Object.is:r,l=a.useSyncExternalStore,c=n.useRef,f=n.useEffect,h=n.useMemo,g=n.useDebugValue;return Yd.useSyncExternalStoreWithSelector=function(p,v,m,b,E){var S=c(null);if(S.current===null){var x={hasValue:!1,value:null};S.current=x}else x=S.current;S=h(function(){function A(K){if(!z){if(z=!0,N=K,K=b(K),E!==void 0&&x.hasValue){var H=x.value;if(E(H,K))return P=H}return P=K}if(H=P,s(N,K))return H;var M=b(K);return E!==void 0&&E(H,M)?(N=K,H):(N=K,P=M)}var z=!1,N,P,U=m===void 0?null:m;return[function(){return A(v())},U===null?void 0:function(){return A(U())}]},[v,m,b,E]);var R=l(p,S[0],S[1]);return f(function(){x.hasValue=!0,x.value=R},[R]),g(R),R},Yd}var Iy;function ER(){return Iy||(Iy=1,Gd.exports=wR()),Gd.exports}var RR=ER();function _R(n,a=r=>r){return RR.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,a,TR)}function TR(n,a){if(Object.is(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;if(n instanceof Map&&a instanceof Map){if(n.size!==a.size)return!1;for(const[s,l]of n)if(!a.has(s)||!Object.is(l,a.get(s)))return!1;return!0}if(n instanceof Set&&a instanceof Set){if(n.size!==a.size)return!1;for(const s of n)if(!a.has(s))return!1;return!0}const r=Object.keys(n);if(r.length!==Object.keys(a).length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(a,r[s])||!Object.is(n[r[s]],a[r[s]]))return!1;return!0}const Xd=_.createContext(null);function kb(){return typeof document>"u"?Xd:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xd,Xd)}function kn(n){const a=_.useContext(kb());return n==null||n.warn,a}function Ge(n){const a=kn({warn:(n==null?void 0:n.router)===void 0}),r=(n==null?void 0:n.router)||a,s=_.useRef(void 0);return _R(r.__store,l=>{if(n!=null&&n.select){if(n.structuralSharing??r.options.defaultStructuralSharing){const c=Sn(s.current,n.select(l));return s.current=c,c}return n.select(l)}return l})}const oc=_.createContext(void 0),CR=_.createContext(void 0);function En(n){const a=_.useContext(n.from?CR:oc);return Ge({select:s=>{const l=s.matches.find(c=>n.from?n.from===c.routeId:c.id===a);if(Ca(!((n.shouldThrow??!0)&&!l),`Could not find ${n.from?`an active match from "${n.from}"`:"a nearest match!"}`),l!==void 0)return n.select?n.select(l):l},structuralSharing:n.structuralSharing})}function nm(n){return En({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.loaderData):a.loaderData})}function am(n){const{select:a,...r}=n;return En({...r,select:s=>a?a(s.loaderDeps):s.loaderDeps})}function rm(n){return En({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.params):a.params})}function im(n){return En({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.search):a.search})}function sm(n){const{navigate:a,state:r}=kn(),s=En({strict:!1,select:l=>l.index});return _.useCallback(l=>{const c=l.from??(n==null?void 0:n.from)??r.matches[s].fullPath;return a({...l,from:c})},[n==null?void 0:n.from,a])}var lc=Mb();const Pb=Ab(lc),ko=typeof window<"u"?_.useLayoutEffect:_.useEffect;function $d(n){const a=_.useRef({value:n,prev:null}),r=a.current.value;return n!==r&&(a.current={value:n,prev:r}),a.current.prev}function AR(n,a,r={},s={}){const l=_.useRef(typeof IntersectionObserver=="function"),c=_.useRef(null);return _.useEffect(()=>{if(!(!n.current||!l.current||s.disabled))return c.current=new IntersectionObserver(([f])=>{a(f)},r),c.current.observe(n.current),()=>{var f;(f=c.current)==null||f.disconnect()}},[a,r,s.disabled,n]),c.current}function OR(n){const a=_.useRef(null);return _.useImperativeHandle(n,()=>a.current,[]),a}function MR(n,a){const r=kn(),[s,l]=_.useState(!1),c=_.useRef(!1),f=OR(a),{activeProps:h=()=>({className:"active"}),inactiveProps:g=()=>({}),activeOptions:p,to:v,preload:m,preloadDelay:b,hashScrollIntoView:E,replace:S,startTransition:x,resetScroll:R,viewTransition:A,children:z,target:N,disabled:P,style:U,className:K,onClick:H,onFocus:M,onMouseEnter:F,onMouseLeave:$,onTouchStart:at,ignoreBlocker:rt,...ut}=n,{params:ct,search:lt,hash:j,state:Z,mask:B,reloadDocument:ot,unsafeRelative:C,...q}=ut,tt=_.useMemo(()=>{try{return new URL(`${v}`),"external"}catch{}return"internal"},[v]),I=Ge({select:Ct=>Ct.location.search,structuralSharing:!0}),it=En({strict:!1,select:Ct=>Ct.fullPath}),ft=n.from??it;n={...n,from:ft};const nt=_.useMemo(()=>r.buildLocation(n),[r,n,I]),bt=_.useMemo(()=>n.reloadDocument?!1:m??r.options.defaultPreload,[r.options.defaultPreload,m,n.reloadDocument]),ht=b??r.options.defaultPreloadDelay??0,mt=Ge({select:Ct=>{if(p!=null&&p.exact){if(!VE(Ct.location.pathname,nt.pathname,r.basepath))return!1}else{const Qt=Fu(Ct.location.pathname,r.basepath).split("/");if(!Fu(nt.pathname,r.basepath).split("/").every((cn,Oe)=>cn===Qt[Oe]))return!1}return((p==null?void 0:p.includeSearch)??!0)&&!os(Ct.location.search,nt.search,{partial:!(p!=null&&p.exact),ignoreUndefined:!(p!=null&&p.explicitUndefined)})?!1:p!=null&&p.includeHash?Ct.location.hash===nt.hash:!0}}),Rt=_.useCallback(()=>{r.preloadRoute(n).catch(Ct=>{console.warn(Ct),console.warn(pR)})},[n,r]),Vt=_.useCallback(Ct=>{Ct!=null&&Ct.isIntersecting&&Rt()},[Rt]);if(AR(f,Vt,{rootMargin:"100px"},{disabled:!!P||bt!=="viewport"}),ko(()=>{c.current||!P&&bt==="render"&&(Rt(),c.current=!0)},[P,Rt,bt]),tt==="external")return{...q,ref:f,type:tt,href:v,...z&&{children:z},...N&&{target:N},...P&&{disabled:P},...U&&{style:U},...K&&{className:K},...H&&{onClick:H},...M&&{onFocus:M},...F&&{onMouseEnter:F},...$&&{onMouseLeave:$},...at&&{onTouchStart:at}};const Wt=Ct=>{if(!P&&!DR(Ct)&&!Ct.defaultPrevented&&(!N||N==="_self")&&Ct.button===0){Ct.preventDefault(),lc.flushSync(()=>{l(!0)});const Qt=r.subscribe("onResolved",()=>{Qt(),l(!1)});return r.navigate({...n,replace:S,resetScroll:R,hashScrollIntoView:E,startTransition:x,viewTransition:A,ignoreBlocker:rt})}},se=Ct=>{P||bt&&Rt()},Yt=se,ye=Ct=>{if(P)return;const Qt=Ct.target||{};if(bt){if(Qt.preloadTimeout)return;ht?Qt.preloadTimeout=setTimeout(()=>{Qt.preloadTimeout=null,Rt()},ht):Rt()}},oe=Ct=>{if(P)return;const Qt=Ct.target||{};Qt.preloadTimeout&&(clearTimeout(Qt.preloadTimeout),Qt.preloadTimeout=null)},Pt=Ct=>Qt=>{var xr;(xr=Qt.persist)==null||xr.call(Qt),Ct.filter(Boolean).forEach(fi=>{Qt.defaultPrevented||fi(Qt)})},Tn=mt?ti(h,{})??{}:{},le=mt?{}:ti(g,{}),Sr=[K,Tn.className,le.className].filter(Boolean).join(" "),aa={...U,...Tn.style,...le.style};return{...q,...Tn,...le,href:P?void 0:nt.maskedLocation?r.history.createHref(nt.maskedLocation.href):r.history.createHref(nt.href),ref:f,onClick:Pt([H,Wt]),onFocus:Pt([M,se]),onMouseEnter:Pt([F,ye]),onMouseLeave:Pt([$,oe]),onTouchStart:Pt([at,Yt]),disabled:!!P,target:N,...Object.keys(aa).length&&{style:aa},...Sr&&{className:Sr},...P&&{role:"link","aria-disabled":!0},...mt&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const Ts=_.forwardRef((n,a)=>{const{_asChild:r,...s}=n,{type:l,ref:c,...f}=MR(s,a),h=typeof s.children=="function"?s.children({isActive:f["data-status"]==="active"}):s.children;return typeof r>"u"&&delete f.disabled,_.createElement(r||"a",{...f,ref:c},h)});function DR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}let NR=class extends Ub{constructor(a){super(a),this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({...r,from:this.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>am({...r,from:this.id}),this.useLoaderData=r=>nm({...r,from:this.id}),this.useNavigate=()=>sm({from:this.fullPath}),this.Link=st.forwardRef((r,s)=>T.jsx(Ts,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function jR(n){return new NR(n)}class LR extends gR{constructor(a){super(a),this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({...r,from:this.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>am({...r,from:this.id}),this.useLoaderData=r=>nm({...r,from:this.id}),this.useNavigate=()=>sm({from:this.fullPath}),this.Link=st.forwardRef((r,s)=>T.jsx(Ts,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function zR(n){return new LR(n)}function gr(n){return typeof n=="object"?new Jy(n,{silent:!0}).createRoute(n):new Jy(n,{silent:!0}).createRoute}class Jy{constructor(a,r){this.path=a,this.createRoute=s=>{this.silent;const l=jR(s);return l.isRoot=!1,l},this.silent=r==null?void 0:r.silent}}class Wy{constructor(a){this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.options.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({from:this.options.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>am({...r,from:this.options.id}),this.useLoaderData=r=>nm({...r,from:this.options.id}),this.useNavigate=()=>{const r=kn();return sm({from:r.routesById[this.options.id].fullPath})},this.options=a,this.$$typeof=Symbol.for("react.memo")}}function t0(n){return typeof n=="object"?new Wy(n):a=>new Wy({id:n,...a})}function Cs(n,a){let r,s,l,c;const f=()=>(r||(r=n().then(g=>{r=void 0,s=g[a]}).catch(g=>{if(l=g,qE(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),c=!0)}})),r),h=function(p){if(c)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!s)throw f();return _.createElement(s,p)};return h.preload=f,h}function UR(){const n=kn(),a=_.useRef({router:n,mounted:!1}),r=Ge({select:({isLoading:m})=>m}),[s,l]=_.useState(!1),c=Ge({select:m=>m.matches.some(b=>b.status==="pending"),structuralSharing:!0}),f=$d(r),h=r||s||c,g=$d(h),p=r||c,v=$d(p);return n.isServer||(n.startTransition=m=>{l(!0),_.startTransition(()=>{m(),l(!1)})}),_.useEffect(()=>{const m=n.history.subscribe(n.load),b=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ws(n.latestLocation.href)!==ws(b.href)&&n.commitLocation({...b,replace:!0}),()=>{m()}},[n,n.history]),ko(()=>{if(typeof window<"u"&&n.clientSsr||a.current.router===n&&a.current.mounted)return;a.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(b){console.error(b)}})()},[n]),ko(()=>{f&&!r&&n.emit({type:"onLoad",...ei(n.state)})},[f,n,r]),ko(()=>{v&&!p&&n.emit({type:"onBeforeRouteMount",...ei(n.state)})},[p,v,n]),ko(()=>{g&&!h&&(n.emit({type:"onResolved",...ei(n.state)}),n.__store.setState(m=>({...m,status:"idle",resolvedLocation:m.location})),eR(n))},[h,g,n]),null}function BR(n){const a=Ge({select:r=>`not-found-${r.location.pathname}-${r.status}`});return T.jsx(em,{getResetKey:()=>a,onCatch:(r,s)=>{var l;if(wn(r))(l=n.onCatch)==null||l.call(n,r,s);else throw r},errorComponent:({error:r})=>{var s;if(wn(r))return(s=n.fallback)==null?void 0:s.call(n,r);throw r},children:n.children})}function kR(){return T.jsx("p",{children:"Not Found"})}function rs(n){return T.jsx(T.Fragment,{children:n.children})}function Hb(n,a,r){return a.options.notFoundComponent?T.jsx(a.options.notFoundComponent,{data:r}):n.options.defaultNotFoundComponent?T.jsx(n.options.defaultNotFoundComponent,{data:r}):T.jsx(kR,{})}var Zd,e0;function PR(){if(e0)return Zd;e0=1;const n={},a=n.hasOwnProperty,r=(M,F)=>{for(const $ in M)a.call(M,$)&&F($,M[$])},s=(M,F)=>(F&&r(F,($,at)=>{M[$]=at}),M),l=(M,F)=>{const $=M.length;let at=-1;for(;++at<$;)F(M[at])},c=M=>"\\u"+("0000"+M).slice(-4),f=(M,F)=>{let $=M.toString(16);return F?$:$.toUpperCase()},h=n.toString,g=Array.isArray,p=M=>typeof Buffer=="function"&&Buffer.isBuffer(M),v=M=>h.call(M)=="[object Object]",m=M=>typeof M=="string"||h.call(M)=="[object String]",b=M=>typeof M=="number"||h.call(M)=="[object Number]",E=M=>typeof M=="bigint",S=M=>typeof M=="function",x=M=>h.call(M)=="[object Map]",R=M=>h.call(M)=="[object Set]",A={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},z=/[\\\b\f\n\r\t]/,N=/[0-9]/,P=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,U=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,K=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,H=(M,F)=>{const $=()=>{Z=j,++F.indentLevel,j=F.indent.repeat(F.indentLevel)},at={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},rt=F&&F.json;rt&&(at.quotes="double",at.wrap=!0),F=s(at,F),F.quotes!="single"&&F.quotes!="double"&&F.quotes!="backtick"&&(F.quotes="single");const ut=F.quotes=="double"?'"':F.quotes=="backtick"?"`":"'",ct=F.compact,lt=F.lowercaseHex;let j=F.indent.repeat(F.indentLevel),Z="";const B=F.__inline1__,ot=F.__inline2__,C=ct?"":`
|
|
65
|
+
*/var Zy;function wR(){if(Zy)return Yd;Zy=1;var n=Jo(),a=Bb();function r(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var s=typeof Object.is=="function"?Object.is:r,l=a.useSyncExternalStore,c=n.useRef,f=n.useEffect,h=n.useMemo,g=n.useDebugValue;return Yd.useSyncExternalStoreWithSelector=function(p,v,m,b,E){var S=c(null);if(S.current===null){var x={hasValue:!1,value:null};S.current=x}else x=S.current;S=h(function(){function A(K){if(!z){if(z=!0,N=K,K=b(K),E!==void 0&&x.hasValue){var H=x.value;if(E(H,K))return P=H}return P=K}if(H=P,s(N,K))return H;var M=b(K);return E!==void 0&&E(H,M)?(N=K,H):(N=K,P=M)}var z=!1,N,P,U=m===void 0?null:m;return[function(){return A(v())},U===null?void 0:function(){return A(U())}]},[v,m,b,E]);var R=l(p,S[0],S[1]);return f(function(){x.hasValue=!0,x.value=R},[R]),g(R),R},Yd}var Iy;function ER(){return Iy||(Iy=1,Gd.exports=wR()),Gd.exports}var RR=ER();function _R(n,a=r=>r){return RR.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,a,TR)}function TR(n,a){if(Object.is(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;if(n instanceof Map&&a instanceof Map){if(n.size!==a.size)return!1;for(const[s,l]of n)if(!a.has(s)||!Object.is(l,a.get(s)))return!1;return!0}if(n instanceof Set&&a instanceof Set){if(n.size!==a.size)return!1;for(const s of n)if(!a.has(s))return!1;return!0}if(n instanceof Date&&a instanceof Date)return n.getTime()===a.getTime();const r=Object.keys(n);if(r.length!==Object.keys(a).length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(a,r[s])||!Object.is(n[r[s]],a[r[s]]))return!1;return!0}const Xd=_.createContext(null);function kb(){return typeof document>"u"?Xd:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xd,Xd)}function kn(n){const a=_.useContext(kb());return n==null||n.warn,a}function Ge(n){const a=kn({warn:(n==null?void 0:n.router)===void 0}),r=(n==null?void 0:n.router)||a,s=_.useRef(void 0);return _R(r.__store,l=>{if(n!=null&&n.select){if(n.structuralSharing??r.options.defaultStructuralSharing){const c=Sn(s.current,n.select(l));return s.current=c,c}return n.select(l)}return l})}const oc=_.createContext(void 0),CR=_.createContext(void 0);function En(n){const a=_.useContext(n.from?CR:oc);return Ge({select:s=>{const l=s.matches.find(c=>n.from?n.from===c.routeId:c.id===a);if(Ca(!((n.shouldThrow??!0)&&!l),`Could not find ${n.from?`an active match from "${n.from}"`:"a nearest match!"}`),l!==void 0)return n.select?n.select(l):l},structuralSharing:n.structuralSharing})}function nm(n){return En({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.loaderData):a.loaderData})}function am(n){const{select:a,...r}=n;return En({...r,select:s=>a?a(s.loaderDeps):s.loaderDeps})}function rm(n){return En({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.params):a.params})}function im(n){return En({from:n.from,strict:n.strict,shouldThrow:n.shouldThrow,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.search):a.search})}function sm(n){const{navigate:a,state:r}=kn(),s=En({strict:!1,select:l=>l.index});return _.useCallback(l=>{const c=l.from??(n==null?void 0:n.from)??r.matches[s].fullPath;return a({...l,from:c})},[n==null?void 0:n.from,a])}var lc=Mb();const Pb=Ab(lc),ko=typeof window<"u"?_.useLayoutEffect:_.useEffect;function $d(n){const a=_.useRef({value:n,prev:null}),r=a.current.value;return n!==r&&(a.current={value:n,prev:r}),a.current.prev}function AR(n,a,r={},s={}){const l=_.useRef(typeof IntersectionObserver=="function"),c=_.useRef(null);return _.useEffect(()=>{if(!(!n.current||!l.current||s.disabled))return c.current=new IntersectionObserver(([f])=>{a(f)},r),c.current.observe(n.current),()=>{var f;(f=c.current)==null||f.disconnect()}},[a,r,s.disabled,n]),c.current}function OR(n){const a=_.useRef(null);return _.useImperativeHandle(n,()=>a.current,[]),a}function MR(n,a){const r=kn(),[s,l]=_.useState(!1),c=_.useRef(!1),f=OR(a),{activeProps:h=()=>({className:"active"}),inactiveProps:g=()=>({}),activeOptions:p,to:v,preload:m,preloadDelay:b,hashScrollIntoView:E,replace:S,startTransition:x,resetScroll:R,viewTransition:A,children:z,target:N,disabled:P,style:U,className:K,onClick:H,onFocus:M,onMouseEnter:F,onMouseLeave:$,onTouchStart:at,ignoreBlocker:rt,...ut}=n,{params:ct,search:lt,hash:j,state:Z,mask:B,reloadDocument:ot,unsafeRelative:C,...q}=ut,tt=_.useMemo(()=>{try{return new URL(`${v}`),"external"}catch{}return"internal"},[v]),I=Ge({select:Ct=>Ct.location.search,structuralSharing:!0}),it=En({strict:!1,select:Ct=>Ct.fullPath}),ft=n.from??it;n={...n,from:ft};const nt=_.useMemo(()=>r.buildLocation(n),[r,n,I]),bt=_.useMemo(()=>n.reloadDocument?!1:m??r.options.defaultPreload,[r.options.defaultPreload,m,n.reloadDocument]),ht=b??r.options.defaultPreloadDelay??0,mt=Ge({select:Ct=>{if(p!=null&&p.exact){if(!VE(Ct.location.pathname,nt.pathname,r.basepath))return!1}else{const Qt=Fu(Ct.location.pathname,r.basepath).split("/");if(!Fu(nt.pathname,r.basepath).split("/").every((cn,Oe)=>cn===Qt[Oe]))return!1}return((p==null?void 0:p.includeSearch)??!0)&&!os(Ct.location.search,nt.search,{partial:!(p!=null&&p.exact),ignoreUndefined:!(p!=null&&p.explicitUndefined)})?!1:p!=null&&p.includeHash?Ct.location.hash===nt.hash:!0}}),Rt=_.useCallback(()=>{r.preloadRoute(n).catch(Ct=>{console.warn(Ct),console.warn(pR)})},[n,r]),Vt=_.useCallback(Ct=>{Ct!=null&&Ct.isIntersecting&&Rt()},[Rt]);if(AR(f,Vt,{rootMargin:"100px"},{disabled:!!P||bt!=="viewport"}),ko(()=>{c.current||!P&&bt==="render"&&(Rt(),c.current=!0)},[P,Rt,bt]),tt==="external")return{...q,ref:f,type:tt,href:v,...z&&{children:z},...N&&{target:N},...P&&{disabled:P},...U&&{style:U},...K&&{className:K},...H&&{onClick:H},...M&&{onFocus:M},...F&&{onMouseEnter:F},...$&&{onMouseLeave:$},...at&&{onTouchStart:at}};const Wt=Ct=>{if(!P&&!DR(Ct)&&!Ct.defaultPrevented&&(!N||N==="_self")&&Ct.button===0){Ct.preventDefault(),lc.flushSync(()=>{l(!0)});const Qt=r.subscribe("onResolved",()=>{Qt(),l(!1)});return r.navigate({...n,replace:S,resetScroll:R,hashScrollIntoView:E,startTransition:x,viewTransition:A,ignoreBlocker:rt})}},se=Ct=>{P||bt&&Rt()},Yt=se,ye=Ct=>{if(P)return;const Qt=Ct.target||{};if(bt){if(Qt.preloadTimeout)return;ht?Qt.preloadTimeout=setTimeout(()=>{Qt.preloadTimeout=null,Rt()},ht):Rt()}},oe=Ct=>{if(P)return;const Qt=Ct.target||{};Qt.preloadTimeout&&(clearTimeout(Qt.preloadTimeout),Qt.preloadTimeout=null)},Pt=Ct=>Qt=>{var xr;(xr=Qt.persist)==null||xr.call(Qt),Ct.filter(Boolean).forEach(fi=>{Qt.defaultPrevented||fi(Qt)})},Tn=mt?ti(h,{})??{}:{},le=mt?{}:ti(g,{}),Sr=[K,Tn.className,le.className].filter(Boolean).join(" "),aa={...U,...Tn.style,...le.style};return{...q,...Tn,...le,href:P?void 0:nt.maskedLocation?r.history.createHref(nt.maskedLocation.href):r.history.createHref(nt.href),ref:f,onClick:Pt([H,Wt]),onFocus:Pt([M,se]),onMouseEnter:Pt([F,ye]),onMouseLeave:Pt([$,oe]),onTouchStart:Pt([at,Yt]),disabled:!!P,target:N,...Object.keys(aa).length&&{style:aa},...Sr&&{className:Sr},...P&&{role:"link","aria-disabled":!0},...mt&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const Ts=_.forwardRef((n,a)=>{const{_asChild:r,...s}=n,{type:l,ref:c,...f}=MR(s,a),h=typeof s.children=="function"?s.children({isActive:f["data-status"]==="active"}):s.children;return typeof r>"u"&&delete f.disabled,_.createElement(r||"a",{...f,ref:c},h)});function DR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}let NR=class extends Ub{constructor(a){super(a),this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({...r,from:this.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>am({...r,from:this.id}),this.useLoaderData=r=>nm({...r,from:this.id}),this.useNavigate=()=>sm({from:this.fullPath}),this.Link=st.forwardRef((r,s)=>T.jsx(Ts,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function jR(n){return new NR(n)}class LR extends gR{constructor(a){super(a),this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({...r,from:this.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>am({...r,from:this.id}),this.useLoaderData=r=>nm({...r,from:this.id}),this.useNavigate=()=>sm({from:this.fullPath}),this.Link=st.forwardRef((r,s)=>T.jsx(Ts,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function zR(n){return new LR(n)}function gr(n){return typeof n=="object"?new Jy(n,{silent:!0}).createRoute(n):new Jy(n,{silent:!0}).createRoute}class Jy{constructor(a,r){this.path=a,this.createRoute=s=>{this.silent;const l=jR(s);return l.isRoot=!1,l},this.silent=r==null?void 0:r.silent}}class Wy{constructor(a){this.useMatch=r=>En({select:r==null?void 0:r.select,from:this.options.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>En({from:this.options.id,select:s=>r!=null&&r.select?r.select(s.context):s.context}),this.useSearch=r=>im({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useParams=r=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>am({...r,from:this.options.id}),this.useLoaderData=r=>nm({...r,from:this.options.id}),this.useNavigate=()=>{const r=kn();return sm({from:r.routesById[this.options.id].fullPath})},this.options=a,this.$$typeof=Symbol.for("react.memo")}}function t0(n){return typeof n=="object"?new Wy(n):a=>new Wy({id:n,...a})}function Cs(n,a){let r,s,l,c;const f=()=>(r||(r=n().then(g=>{r=void 0,s=g[a]}).catch(g=>{if(l=g,qE(l)&&l instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${l.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),c=!0)}})),r),h=function(p){if(c)throw window.location.reload(),new Promise(()=>{});if(l)throw l;if(!s)throw f();return _.createElement(s,p)};return h.preload=f,h}function UR(){const n=kn(),a=_.useRef({router:n,mounted:!1}),r=Ge({select:({isLoading:m})=>m}),[s,l]=_.useState(!1),c=Ge({select:m=>m.matches.some(b=>b.status==="pending"),structuralSharing:!0}),f=$d(r),h=r||s||c,g=$d(h),p=r||c,v=$d(p);return n.isServer||(n.startTransition=m=>{l(!0),_.startTransition(()=>{m(),l(!1)})}),_.useEffect(()=>{const m=n.history.subscribe(n.load),b=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ws(n.latestLocation.href)!==ws(b.href)&&n.commitLocation({...b,replace:!0}),()=>{m()}},[n,n.history]),ko(()=>{if(typeof window<"u"&&n.clientSsr||a.current.router===n&&a.current.mounted)return;a.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(b){console.error(b)}})()},[n]),ko(()=>{f&&!r&&n.emit({type:"onLoad",...ei(n.state)})},[f,n,r]),ko(()=>{v&&!p&&n.emit({type:"onBeforeRouteMount",...ei(n.state)})},[p,v,n]),ko(()=>{g&&!h&&(n.emit({type:"onResolved",...ei(n.state)}),n.__store.setState(m=>({...m,status:"idle",resolvedLocation:m.location})),eR(n))},[h,g,n]),null}function BR(n){const a=Ge({select:r=>`not-found-${r.location.pathname}-${r.status}`});return T.jsx(em,{getResetKey:()=>a,onCatch:(r,s)=>{var l;if(wn(r))(l=n.onCatch)==null||l.call(n,r,s);else throw r},errorComponent:({error:r})=>{var s;if(wn(r))return(s=n.fallback)==null?void 0:s.call(n,r);throw r},children:n.children})}function kR(){return T.jsx("p",{children:"Not Found"})}function rs(n){return T.jsx(T.Fragment,{children:n.children})}function Hb(n,a,r){return a.options.notFoundComponent?T.jsx(a.options.notFoundComponent,{data:r}):n.options.defaultNotFoundComponent?T.jsx(n.options.defaultNotFoundComponent,{data:r}):T.jsx(kR,{})}var Zd,e0;function PR(){if(e0)return Zd;e0=1;const n={},a=n.hasOwnProperty,r=(M,F)=>{for(const $ in M)a.call(M,$)&&F($,M[$])},s=(M,F)=>(F&&r(F,($,at)=>{M[$]=at}),M),l=(M,F)=>{const $=M.length;let at=-1;for(;++at<$;)F(M[at])},c=M=>"\\u"+("0000"+M).slice(-4),f=(M,F)=>{let $=M.toString(16);return F?$:$.toUpperCase()},h=n.toString,g=Array.isArray,p=M=>typeof Buffer=="function"&&Buffer.isBuffer(M),v=M=>h.call(M)=="[object Object]",m=M=>typeof M=="string"||h.call(M)=="[object String]",b=M=>typeof M=="number"||h.call(M)=="[object Number]",E=M=>typeof M=="bigint",S=M=>typeof M=="function",x=M=>h.call(M)=="[object Map]",R=M=>h.call(M)=="[object Set]",A={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},z=/[\\\b\f\n\r\t]/,N=/[0-9]/,P=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,U=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,K=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,H=(M,F)=>{const $=()=>{Z=j,++F.indentLevel,j=F.indent.repeat(F.indentLevel)},at={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},rt=F&&F.json;rt&&(at.quotes="double",at.wrap=!0),F=s(at,F),F.quotes!="single"&&F.quotes!="double"&&F.quotes!="backtick"&&(F.quotes="single");const ut=F.quotes=="double"?'"':F.quotes=="backtick"?"`":"'",ct=F.compact,lt=F.lowercaseHex;let j=F.indent.repeat(F.indentLevel),Z="";const B=F.__inline1__,ot=F.__inline2__,C=ct?"":`
|
|
66
66
|
`;let q,tt=!0;const I=F.numbers=="binary",it=F.numbers=="octal",ft=F.numbers=="decimal",nt=F.numbers=="hexadecimal";if(rt&&M&&S(M.toJSON)&&(M=M.toJSON()),!m(M)){if(x(M))return M.size==0?"new Map()":(ct||(F.__inline1__=!0,F.__inline2__=!1),"new Map("+H(Array.from(M),F)+")");if(R(M))return M.size==0?"new Set()":"new Set("+H(Array.from(M),F)+")";if(p(M))return M.length==0?"Buffer.from([])":"Buffer.from("+H(Array.from(M),F)+")";if(g(M))return q=[],F.wrap=!0,B&&(F.__inline1__=!1,F.__inline2__=!0),ot||$(),l(M,ht=>{tt=!1,ot&&(F.__inline2__=!1),q.push((ct||ot?"":j)+H(ht,F))}),tt?"[]":ot?"["+q.join(", ")+"]":"["+C+q.join(","+C)+C+(ct?"":Z)+"]";if(b(M)||E(M)){if(rt)return JSON.stringify(Number(M));let ht;if(ft)ht=String(M);else if(nt){let mt=M.toString(16);lt||(mt=mt.toUpperCase()),ht="0x"+mt}else I?ht="0b"+M.toString(2):it&&(ht="0o"+M.toString(8));return E(M)?ht+"n":ht}else return E(M)?rt?JSON.stringify(Number(M)):M+"n":v(M)?(q=[],F.wrap=!0,$(),r(M,(ht,mt)=>{tt=!1,q.push((ct?"":j)+H(ht,F)+":"+(ct?"":" ")+H(mt,F))}),tt?"{}":"{"+C+q.join(","+C)+C+(ct?"":Z)+"}"):rt?JSON.stringify(M)||"null":String(M)}const bt=F.escapeEverything?U:K;return q=M.replace(bt,(ht,mt,Rt,Vt,Wt,se)=>{if(mt){if(F.minimal)return mt;const ye=mt.charCodeAt(0),oe=mt.charCodeAt(1);if(F.es6){const Pt=(ye-55296)*1024+oe-56320+65536;return"\\u{"+f(Pt,lt)+"}"}return c(f(ye,lt))+c(f(oe,lt))}if(Rt)return c(f(Rt.charCodeAt(0),lt));if(ht=="\0"&&!rt&&!N.test(se.charAt(Wt+1)))return"\\0";if(Vt)return Vt==ut||F.escapeEverything?"\\"+Vt:Vt;if(z.test(ht))return A[ht];if(F.minimal&&!P.test(ht))return ht;const Yt=f(ht.charCodeAt(0),lt);return rt||Yt.length>2?c(Yt):"\\x"+("00"+Yt).slice(-2)}),ut=="`"&&(q=q.replace(/\$\{/g,"\\${")),F.isScriptContext&&(q=q.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,rt?"\\u003C!--":"\\x3C!--")),F.wrap&&(q=ut+q+ut),q};return H.version="3.0.2",Zd=H,Zd}PR();function HR({children:n,log:a}){return typeof document<"u"?null:T.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[n,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
|
|
67
67
|
`)}})}function qR(){const n=kn(),r=(n.options.getScrollRestorationKey||xh)(n.latestLocation),s=r!==xh(n.latestLocation)?r:null;return!n.isScrollRestoring||!n.isServer?null:T.jsx(HR,{children:`(${Lb.toString()})(${JSON.stringify(Yu)},${JSON.stringify(s)}, undefined, true)`,log:!1})}const qb=_.memo(function({matchId:a}){var r,s;const l=kn(),c=Ge({select:N=>{const P=N.matches.find(U=>U.id===a);return Ca(P),Vu(P,["routeId","ssr","_displayPending"])},structuralSharing:!0}),f=l.routesById[c.routeId],h=f.options.pendingComponent??l.options.defaultPendingComponent,g=h?T.jsx(h,{}):null,p=f.options.errorComponent??l.options.defaultErrorComponent,v=f.options.onCatch??l.options.defaultOnCatch,m=f.isRoot?f.options.notFoundComponent??((r=l.options.notFoundRoute)==null?void 0:r.options.component):f.options.notFoundComponent,b=c.ssr===!1||c.ssr==="data-only",E=(!f.isRoot||f.options.wrapInSuspense||b)&&(f.options.wrapInSuspense??h??(((s=f.options.errorComponent)==null?void 0:s.preload)||b))?_.Suspense:rs,S=p?em:rs,x=m?BR:rs,R=Ge({select:N=>N.loadedAt}),A=Ge({select:N=>{var P;const U=N.matches.findIndex(K=>K.id===a);return(P=N.matches[U-1])==null?void 0:P.routeId}}),z=f.isRoot?f.options.shellComponent??rs:rs;return T.jsxs(z,{children:[T.jsx(oc.Provider,{value:a,children:T.jsx(E,{fallback:g,children:T.jsx(S,{getResetKey:()=>R,errorComponent:p||sc,onCatch:(N,P)=>{if(wn(N))throw N;v==null||v(N,P)},children:T.jsx(x,{fallback:N=>{if(!m||N.routeId&&N.routeId!==c.routeId||!N.routeId&&!f.isRoot)throw N;return _.createElement(m,N)},children:b||l.isShell||c._displayPending?T.jsx(yR,{fallback:g,children:T.jsx(n0,{matchId:a})}):T.jsx(n0,{matchId:a})})})})}),A===Ln&&l.options.scrollRestoration?T.jsxs(T.Fragment,{children:[T.jsx(VR,{}),T.jsx(qR,{})]}):null]})});function VR(){const n=kn(),a=_.useRef(void 0);return T.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(a.current===void 0||a.current.href!==n.latestLocation.href)&&(n.emit({type:"onRendered",...ei(n.state)}),a.current=n.latestLocation)}},n.latestLocation.state.__TSR_key)}const n0=_.memo(function({matchId:a}){var r,s,l,c;const f=kn(),{match:h,key:g,routeId:p}=Ge({select:b=>{const E=b.matches.findIndex(N=>N.id===a),S=b.matches[E],x=S.routeId,R=f.routesById[x].options.remountDeps??f.options.defaultRemountDeps,A=R==null?void 0:R({routeId:x,loaderDeps:S.loaderDeps,params:S._strictParams,search:S._strictSearch});return{key:A?JSON.stringify(A):void 0,routeId:x,match:Vu(S,["id","status","error","_forcePending","_displayPending"])}},structuralSharing:!0}),v=f.routesById[p],m=_.useMemo(()=>{const b=v.options.component??f.options.defaultComponent;return b?T.jsx(b,{},g):T.jsx(Vb,{})},[g,v.options.component,f.options.defaultComponent]);if(h._displayPending)throw(r=f.getMatch(h.id))==null?void 0:r.displayPendingPromise;if(h.status==="pending"||h._forcePending){const b=v.options.pendingMinMs??f.options.defaultPendingMinMs;if(b&&!((s=f.getMatch(h.id))!=null&&s.minPendingPromise)&&!f.isServer){const E=Fr();Promise.resolve().then(()=>{f.updateMatch(h.id,S=>({...S,minPendingPromise:E}))}),setTimeout(()=>{E.resolve(),f.updateMatch(h.id,S=>({...S,minPendingPromise:void 0}))},b)}throw(l=f.getMatch(h.id))==null?void 0:l.loadPromise}if(h.status==="notFound")return Ca(wn(h.error)),Hb(f,v,h.error);if(h.status==="redirected")throw Ca($n(h.error)),(c=f.getMatch(h.id))==null?void 0:c.loadPromise;if(h.status==="error"){if(f.isServer){const b=(v.options.errorComponent??f.options.defaultErrorComponent)||sc;return T.jsx(b,{error:h.error,reset:void 0,info:{componentStack:""}})}throw h.error}return m}),Vb=_.memo(function(){const a=kn(),r=_.useContext(oc),s=Ge({select:p=>{var v;return(v=p.matches.find(m=>m.id===r))==null?void 0:v.routeId}}),l=a.routesById[s],c=Ge({select:p=>{const m=p.matches.find(b=>b.id===r);return Ca(m),m.globalNotFound}}),f=Ge({select:p=>{var v;const m=p.matches,b=m.findIndex(E=>E.id===r);return(v=m[b+1])==null?void 0:v.id}}),h=a.options.defaultPendingComponent?T.jsx(a.options.defaultPendingComponent,{}):null;if(c)return Hb(a,l,void 0);if(!f)return null;const g=T.jsx(qb,{matchId:f});return r===Ln?T.jsx(_.Suspense,{fallback:h,children:g}):g});function FR(){const n=kn(),a=n.options.defaultPendingComponent?T.jsx(n.options.defaultPendingComponent,{}):null,r=n.isServer||typeof document<"u"&&n.clientSsr?rs:_.Suspense,s=T.jsxs(r,{fallback:a,children:[T.jsx(UR,{}),T.jsx(GR,{})]});return n.options.InnerWrap?T.jsx(n.options.InnerWrap,{children:s}):s}function GR(){const n=Ge({select:r=>{var s;return(s=r.matches[0])==null?void 0:s.id}}),a=Ge({select:r=>r.loadedAt});return T.jsx(oc.Provider,{value:n,children:T.jsx(em,{getResetKey:()=>a,errorComponent:sc,onCatch:r=>{r.message||r.toString()},children:n?T.jsx(qb,{matchId:n}):null})})}const YR=n=>new QR(n);class QR extends uR{constructor(a){super(a)}}typeof globalThis<"u"?(globalThis.createFileRoute=gr,globalThis.createLazyFileRoute=t0):typeof window<"u"&&(window.createFileRoute=gr,window.createFileRoute=t0);function KR({router:n,children:a,...r}){Object.keys(r).length>0&&n.update({...n.options,...r,context:{...n.options.context,...r.context}});const s=kb(),l=T.jsx(s.Provider,{value:n,children:a});return n.options.Wrap?T.jsx(n.options.Wrap,{children:l}):l}function XR({router:n,...a}){return T.jsx(KR,{router:n,...a,children:T.jsx(FR,{})})}/**
|
|
68
68
|
* @license lucide-react v0.525.0 - ISC
|
|
@@ -173,4 +173,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
|
|
|
173
173
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...r){const s=new this(a);return r.forEach(l=>s.set(l)),s}static accessor(a){const s=(this[F0]=this[F0]={accessors:{}}).accessors,l=this.prototype;function c(f){const h=Uo(f);s[h]||(C4(l,f),s[h]=!0)}return X.isArray(a)?a.forEach(c):c(a),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(We.prototype,({value:n},a)=>{let r=a[0].toUpperCase()+a.slice(1);return{get:()=>n,set(s){this[r]=s}}});X.freezeMethods(We);function ch(n,a){const r=this||ol,s=a||r,l=We.from(s.headers);let c=s.data;return X.forEach(n,function(h){c=h.call(r,c,l.normalize(),a?a.status:void 0)}),l.normalize(),c}function HS(n){return!!(n&&n.__CANCEL__)}function js(n,a,r){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,a,r),this.name="CanceledError"}X.inherits(js,Tt,{__CANCEL__:!0});function qS(n,a,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?n(r):a(new Tt("Request failed with status code "+r.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function A4(n){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return a&&a[1]||""}function O4(n,a){n=n||10;const r=new Array(n),s=new Array(n);let l=0,c=0,f;return a=a!==void 0?a:1e3,function(g){const p=Date.now(),v=s[c];f||(f=p),r[l]=g,s[l]=p;let m=c,b=0;for(;m!==l;)b+=r[m++],m=m%n;if(l=(l+1)%n,l===c&&(c=(c+1)%n),p-f<a)return;const E=v&&p-v;return E?Math.round(b*1e3/E):void 0}}function M4(n,a){let r=0,s=1e3/a,l,c;const f=(p,v=Date.now())=>{r=v,l=null,c&&(clearTimeout(c),c=null),n.apply(null,p)};return[(...p)=>{const v=Date.now(),m=v-r;m>=s?f(p,v):(l=p,c||(c=setTimeout(()=>{c=null,f(l)},s-m)))},()=>l&&f(l)]}const ec=(n,a,r=3)=>{let s=0;const l=O4(50,250);return M4(c=>{const f=c.loaded,h=c.lengthComputable?c.total:void 0,g=f-s,p=l(g),v=f<=h;s=f;const m={loaded:f,total:h,progress:h?f/h:void 0,bytes:g,rate:p||void 0,estimated:p&&h&&v?(h-f)/p:void 0,event:c,lengthComputable:h!=null,[a?"download":"upload"]:!0};n(m)},r)},G0=(n,a)=>{const r=n!=null;return[s=>a[0]({lengthComputable:r,total:n,loaded:s}),a[1]]},Y0=n=>(...a)=>X.asap(()=>n(...a)),D4=ke.hasStandardBrowserEnv?((n,a)=>r=>(r=new URL(r,ke.origin),n.protocol===r.protocol&&n.host===r.host&&(a||n.port===r.port)))(new URL(ke.origin),ke.navigator&&/(msie|trident)/i.test(ke.navigator.userAgent)):()=>!0,N4=ke.hasStandardBrowserEnv?{write(n,a,r,s,l,c){const f=[n+"="+encodeURIComponent(a)];X.isNumber(r)&&f.push("expires="+new Date(r).toGMTString()),X.isString(s)&&f.push("path="+s),X.isString(l)&&f.push("domain="+l),c===!0&&f.push("secure"),document.cookie=f.join("; ")},read(n){const a=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(n){this.write(n,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function j4(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function L4(n,a){return a?n.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):n}function VS(n,a,r){let s=!j4(a);return n&&(s||r==!1)?L4(n,a):a}const Q0=n=>n instanceof We?{...n}:n;function si(n,a){a=a||{};const r={};function s(p,v,m,b){return X.isPlainObject(p)&&X.isPlainObject(v)?X.merge.call({caseless:b},p,v):X.isPlainObject(v)?X.merge({},v):X.isArray(v)?v.slice():v}function l(p,v,m,b){if(X.isUndefined(v)){if(!X.isUndefined(p))return s(void 0,p,m,b)}else return s(p,v,m,b)}function c(p,v){if(!X.isUndefined(v))return s(void 0,v)}function f(p,v){if(X.isUndefined(v)){if(!X.isUndefined(p))return s(void 0,p)}else return s(void 0,v)}function h(p,v,m){if(m in a)return s(p,v);if(m in n)return s(void 0,p)}const g={url:c,method:c,data:c,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:h,headers:(p,v,m)=>l(Q0(p),Q0(v),m,!0)};return X.forEach(Object.keys(Object.assign({},n,a)),function(v){const m=g[v]||l,b=m(n[v],a[v],v);X.isUndefined(b)&&m!==h||(r[v]=b)}),r}const FS=n=>{const a=si({},n);let{data:r,withXSRFToken:s,xsrfHeaderName:l,xsrfCookieName:c,headers:f,auth:h}=a;a.headers=f=We.from(f),a.url=BS(VS(a.baseURL,a.url,a.allowAbsoluteUrls),n.params,n.paramsSerializer),h&&f.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):"")));let g;if(X.isFormData(r)){if(ke.hasStandardBrowserEnv||ke.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((g=f.getContentType())!==!1){const[p,...v]=g?g.split(";").map(m=>m.trim()).filter(Boolean):[];f.setContentType([p||"multipart/form-data",...v].join("; "))}}if(ke.hasStandardBrowserEnv&&(s&&X.isFunction(s)&&(s=s(a)),s||s!==!1&&D4(a.url))){const p=l&&c&&N4.read(c);p&&f.set(l,p)}return a},z4=typeof XMLHttpRequest<"u",U4=z4&&function(n){return new Promise(function(r,s){const l=FS(n);let c=l.data;const f=We.from(l.headers).normalize();let{responseType:h,onUploadProgress:g,onDownloadProgress:p}=l,v,m,b,E,S;function x(){E&&E(),S&&S(),l.cancelToken&&l.cancelToken.unsubscribe(v),l.signal&&l.signal.removeEventListener("abort",v)}let R=new XMLHttpRequest;R.open(l.method.toUpperCase(),l.url,!0),R.timeout=l.timeout;function A(){if(!R)return;const N=We.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),U={data:!h||h==="text"||h==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:N,config:n,request:R};qS(function(H){r(H),x()},function(H){s(H),x()},U),R=null}"onloadend"in R?R.onloadend=A:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.indexOf("file:")===0)||setTimeout(A)},R.onabort=function(){R&&(s(new Tt("Request aborted",Tt.ECONNABORTED,n,R)),R=null)},R.onerror=function(){s(new Tt("Network Error",Tt.ERR_NETWORK,n,R)),R=null},R.ontimeout=function(){let P=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const U=l.transitional||kS;l.timeoutErrorMessage&&(P=l.timeoutErrorMessage),s(new Tt(P,U.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,R)),R=null},c===void 0&&f.setContentType(null),"setRequestHeader"in R&&X.forEach(f.toJSON(),function(P,U){R.setRequestHeader(U,P)}),X.isUndefined(l.withCredentials)||(R.withCredentials=!!l.withCredentials),h&&h!=="json"&&(R.responseType=l.responseType),p&&([b,S]=ec(p,!0),R.addEventListener("progress",b)),g&&R.upload&&([m,E]=ec(g),R.upload.addEventListener("progress",m),R.upload.addEventListener("loadend",E)),(l.cancelToken||l.signal)&&(v=N=>{R&&(s(!N||N.type?new js(null,n,R):N),R.abort(),R=null)},l.cancelToken&&l.cancelToken.subscribe(v),l.signal&&(l.signal.aborted?v():l.signal.addEventListener("abort",v)));const z=A4(l.url);if(z&&ke.protocols.indexOf(z)===-1){s(new Tt("Unsupported protocol "+z+":",Tt.ERR_BAD_REQUEST,n));return}R.send(c||null)})},B4=(n,a)=>{const{length:r}=n=n?n.filter(Boolean):[];if(a||r){let s=new AbortController,l;const c=function(p){if(!l){l=!0,h();const v=p instanceof Error?p:this.reason;s.abort(v instanceof Tt?v:new js(v instanceof Error?v.message:v))}};let f=a&&setTimeout(()=>{f=null,c(new Tt(`timeout ${a} of ms exceeded`,Tt.ETIMEDOUT))},a);const h=()=>{n&&(f&&clearTimeout(f),f=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(c):p.removeEventListener("abort",c)}),n=null)};n.forEach(p=>p.addEventListener("abort",c));const{signal:g}=s;return g.unsubscribe=()=>X.asap(h),g}},k4=function*(n,a){let r=n.byteLength;if(r<a){yield n;return}let s=0,l;for(;s<r;)l=s+a,yield n.slice(s,l),s=l},P4=async function*(n,a){for await(const r of H4(n))yield*k4(r,a)},H4=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const a=n.getReader();try{for(;;){const{done:r,value:s}=await a.read();if(r)break;yield s}}finally{await a.cancel()}},K0=(n,a,r,s)=>{const l=P4(n,a);let c=0,f,h=g=>{f||(f=!0,s&&s(g))};return new ReadableStream({async pull(g){try{const{done:p,value:v}=await l.next();if(p){h(),g.close();return}let m=v.byteLength;if(r){let b=c+=m;r(b)}g.enqueue(new Uint8Array(v))}catch(p){throw h(p),p}},cancel(g){return h(g),l.return()}},{highWaterMark:2})},wc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",GS=wc&&typeof ReadableStream=="function",q4=wc&&(typeof TextEncoder=="function"?(n=>a=>n.encode(a))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),YS=(n,...a)=>{try{return!!n(...a)}catch{return!1}},V4=GS&&YS(()=>{let n=!1;const a=new Request(ke.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!a}),X0=64*1024,Uh=GS&&YS(()=>X.isReadableStream(new Response("").body)),nc={stream:Uh&&(n=>n.body)};wc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!nc[a]&&(nc[a]=X.isFunction(n[a])?r=>r[a]():(r,s)=>{throw new Tt(`Response type '${a}' is not supported`,Tt.ERR_NOT_SUPPORT,s)})})})(new Response);const F4=async n=>{if(n==null)return 0;if(X.isBlob(n))return n.size;if(X.isSpecCompliantForm(n))return(await new Request(ke.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(X.isArrayBufferView(n)||X.isArrayBuffer(n))return n.byteLength;if(X.isURLSearchParams(n)&&(n=n+""),X.isString(n))return(await q4(n)).byteLength},G4=async(n,a)=>{const r=X.toFiniteNumber(n.getContentLength());return r??F4(a)},Y4=wc&&(async n=>{let{url:a,method:r,data:s,signal:l,cancelToken:c,timeout:f,onDownloadProgress:h,onUploadProgress:g,responseType:p,headers:v,withCredentials:m="same-origin",fetchOptions:b}=FS(n);p=p?(p+"").toLowerCase():"text";let E=B4([l,c&&c.toAbortSignal()],f),S;const x=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let R;try{if(g&&V4&&r!=="get"&&r!=="head"&&(R=await G4(v,s))!==0){let U=new Request(a,{method:"POST",body:s,duplex:"half"}),K;if(X.isFormData(s)&&(K=U.headers.get("content-type"))&&v.setContentType(K),U.body){const[H,M]=G0(R,ec(Y0(g)));s=K0(U.body,X0,H,M)}}X.isString(m)||(m=m?"include":"omit");const A="credentials"in Request.prototype;S=new Request(a,{...b,signal:E,method:r.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:A?m:void 0});let z=await fetch(S,b);const N=Uh&&(p==="stream"||p==="response");if(Uh&&(h||N&&x)){const U={};["status","statusText","headers"].forEach(F=>{U[F]=z[F]});const K=X.toFiniteNumber(z.headers.get("content-length")),[H,M]=h&&G0(K,ec(Y0(h),!0))||[];z=new Response(K0(z.body,X0,H,()=>{M&&M(),x&&x()}),U)}p=p||"text";let P=await nc[X.findKey(nc,p)||"text"](z,n);return!N&&x&&x(),await new Promise((U,K)=>{qS(U,K,{data:P,headers:We.from(z.headers),status:z.status,statusText:z.statusText,config:n,request:S})})}catch(A){throw x&&x(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,n,S),{cause:A.cause||A}):Tt.from(A,A&&A.code,n,S)}}),Bh={http:s4,xhr:U4,fetch:Y4};X.forEach(Bh,(n,a)=>{if(n){try{Object.defineProperty(n,"name",{value:a})}catch{}Object.defineProperty(n,"adapterName",{value:a})}});const $0=n=>`- ${n}`,Q4=n=>X.isFunction(n)||n===null||n===!1,QS={getAdapter:n=>{n=X.isArray(n)?n:[n];const{length:a}=n;let r,s;const l={};for(let c=0;c<a;c++){r=n[c];let f;if(s=r,!Q4(r)&&(s=Bh[(f=String(r)).toLowerCase()],s===void 0))throw new Tt(`Unknown adapter '${f}'`);if(s)break;l[f||"#"+c]=s}if(!s){const c=Object.entries(l).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let f=a?c.length>1?`since :
|
|
174
174
|
`+c.map($0).join(`
|
|
175
175
|
`):" "+$0(c[0]):"as no adapter specified";throw new Tt("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return s},adapters:Bh};function fh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new js(null,n)}function Z0(n){return fh(n),n.headers=We.from(n.headers),n.data=ch.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),QS.getAdapter(n.adapter||ol.adapter)(n).then(function(s){return fh(n),s.data=ch.call(n,n.transformResponse,s),s.headers=We.from(s.headers),s},function(s){return HS(s)||(fh(n),s&&s.response&&(s.response.data=ch.call(n,n.transformResponse,s.response),s.response.headers=We.from(s.response.headers))),Promise.reject(s)})}const KS="1.10.0",Ec={};["object","boolean","number","function","string","symbol"].forEach((n,a)=>{Ec[n]=function(s){return typeof s===n||"a"+(a<1?"n ":" ")+n}});const I0={};Ec.transitional=function(a,r,s){function l(c,f){return"[Axios v"+KS+"] Transitional option '"+c+"'"+f+(s?". "+s:"")}return(c,f,h)=>{if(a===!1)throw new Tt(l(f," has been removed"+(r?" in "+r:"")),Tt.ERR_DEPRECATED);return r&&!I0[f]&&(I0[f]=!0,console.warn(l(f," has been deprecated since v"+r+" and will be removed in the near future"))),a?a(c,f,h):!0}};Ec.spelling=function(a){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${a}`),!0)};function K4(n,a,r){if(typeof n!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const s=Object.keys(n);let l=s.length;for(;l-- >0;){const c=s[l],f=a[c];if(f){const h=n[c],g=h===void 0||f(h,c,n);if(g!==!0)throw new Tt("option "+c+" must be "+g,Tt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Tt("Unknown option "+c,Tt.ERR_BAD_OPTION)}}const Pu={assertOptions:K4,validators:Ec},Kn=Pu.validators;let ni=class{constructor(a){this.defaults=a||{},this.interceptors={request:new V0,response:new V0}}async request(a,r){try{return await this._request(a,r)}catch(s){if(s instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const c=l.stack?l.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
176
|
-
`+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=si(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Pu.assertOptions(s,{silentJSONParsing:Kn.transitional(Kn.boolean),forcedJSONParsing:Kn.transitional(Kn.boolean),clarifyTimeoutError:Kn.transitional(Kn.boolean)},!1),l!=null&&(X.isFunction(l)?r.paramsSerializer={serialize:l}:Pu.assertOptions(l,{encode:Kn.function,serialize:Kn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Pu.assertOptions(r,{baseUrl:Kn.spelling("baseURL"),withXsrfToken:Kn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&X.merge(c.common,c[r.method]);c&&X.forEach(["delete","get","head","post","put","patch","common"],S=>{delete c[S]}),r.headers=We.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(g=g&&x.synchronous,h.unshift(x.fulfilled,x.rejected))});const p=[];this.interceptors.response.forEach(function(x){p.push(x.fulfilled,x.rejected)});let v,m=0,b;if(!g){const S=[Z0.bind(this),void 0];for(S.unshift.apply(S,h),S.push.apply(S,p),b=S.length,v=Promise.resolve(r);m<b;)v=v.then(S[m++],S[m++]);return v}b=h.length;let E=r;for(m=0;m<b;){const S=h[m++],x=h[m++];try{E=S(E)}catch(R){x.call(this,R);break}}try{v=Z0.call(this,E)}catch(S){return Promise.reject(S)}for(m=0,b=p.length;m<b;)v=v.then(p[m++],p[m++]);return v}getUri(a){a=si(this.defaults,a);const r=VS(a.baseURL,a.url,a.allowAbsoluteUrls);return BS(r,a.params,a.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(a){ni.prototype[a]=function(r,s){return this.request(si(s||{},{method:a,url:r,data:(s||{}).data}))}});X.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(si(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}ni.prototype[a]=r(),ni.prototype[a+"Form"]=r(!0)});let X4=class XS{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(c){r=c});const s=this;this.promise.then(l=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](l);s._listeners=null}),this.promise.then=l=>{let c;const f=new Promise(h=>{s.subscribe(h),c=h}).then(l);return f.cancel=function(){s.unsubscribe(c)},f},a(function(c,f,h){s.reason||(s.reason=new js(c,f,h),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const r=this._listeners.indexOf(a);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const a=new AbortController,r=s=>{a.abort(s)};return this.subscribe(r),a.signal.unsubscribe=()=>this.unsubscribe(r),a.signal}static source(){let a;return{token:new XS(function(l){a=l}),cancel:a}}};function $4(n){return function(r){return n.apply(null,r)}}function Z4(n){return X.isObject(n)&&n.isAxiosError===!0}const kh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kh).forEach(([n,a])=>{kh[a]=n});function $S(n){const a=new ni(n),r=_S(ni.prototype.request,a);return X.extend(r,ni.prototype,a,{allOwnKeys:!0}),X.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return $S(si(n,l))},r}const me=$S(ol);me.Axios=ni;me.CanceledError=js;me.CancelToken=X4;me.isCancel=HS;me.VERSION=KS;me.toFormData=xc;me.AxiosError=Tt;me.Cancel=me.CanceledError;me.all=function(a){return Promise.all(a)};me.spread=$4;me.isAxiosError=Z4;me.mergeConfig=si;me.AxiosHeaders=We;me.formToJSON=n=>PS(X.isHTMLForm(n)?new FormData(n):n);me.getAdapter=QS.getAdapter;me.HttpStatusCode=kh;me.default=me;const{Axios:bD,AxiosError:SD,CanceledError:xD,isCancel:wD,CancelToken:ED,VERSION:RD,all:_D,Cancel:TD,isAxiosError:CD,spread:AD,toFormData:OD,AxiosHeaders:MD,HttpStatusCode:DD,formToJSON:ND,getAdapter:jD,mergeConfig:LD}=me,Bm=me.create({baseURL:"/api"});Bm.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Bm.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class J0{constructor(a,r){this.client=a,this.data=r}}class I4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class J4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class W4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class tM{constructor(){Wi(this,"api",Bm);Wi(this,"guilds",new J4(this));Wi(this,"plugins",new W4(this));Wi(this,"events",new I4(this));Wi(this,"_user",null)}get user(){return this._user}isReady(){return this._user!==null}logout(){localStorage.removeItem("access_token"),this._user=null}async fetchMe(a=!1){if(this._user&&!a)return this._user;const{data:r}=await this.api.get("/auth/@me");return this._user=new J0(this,r),this._user}async getFeatureFlags(){const{data:a}=await this.api.get("/feature-flags");return a}async login(a,r){const{data:s}=await this.api.post("/auth/login",{username:a,password:r});return s.accessToken&&localStorage.setItem("access_token",s.accessToken),this._user=new J0(this,s.user),s}}const ZS=_.createContext(null);function eM({children:n}){const[a,r]=_.useState(()=>new tM);return T.jsx(ZS.Provider,{value:{client:a,setClient:r},children:n})}function km(){const n=_.use(ZS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const dh={navMain:[{title:"Commands",url:"/commands",icon:i0,isActive:!1},{title:"Events",url:"/events",icon:r0,isActive:!1},{title:"Plugins",url:"/plugins",icon:s2,isActive:!1},{title:"Guilds",url:"/guilds",icon:l0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:l2,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:x2},{title:"Discord",url:"https://ctrl.lol/discord",icon:l0}],projects:[{name:"Commands",url:"#",icon:i0},{name:"Middlewares",url:"#",icon:f2},{name:"Events",url:"#",icon:r0}]};function nM({...n}){var r;const a=km();return T.jsxs(ZA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[T.jsx(JA,{children:T.jsx(al,{children:T.jsx(rl,{children:T.jsx(il,{size:"lg",asChild:!0,children:T.jsxs(Ts,{to:"/",children:[T.jsx("div",{className:"border-sidebar-primary border text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg",children:T.jsx("img",{src:"/logo.webp",alt:"Logo",className:"size-6"})}),T.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[T.jsx("span",{className:"truncate font-medium",children:"CommandKit"}),T.jsx("span",{className:"truncate text-xs",children:"DevTools"})]})]})})})})}),T.jsxs(tO,{children:[T.jsx(aO,{items:dh.navMain}),T.jsx(rO,{projects:dh.projects}),T.jsx(iO,{items:dh.navSecondary,className:"mt-auto"})]}),T.jsx(WA,{children:T.jsx(SO,{user:{avatar:a.user.data.displayAvatarURL,name:a.user.data.globalName||((r=a.user)==null?void 0:r.data.username),username:a.user.data.username}})})]})}function aM({className:n,...a}){return T.jsx("div",{"data-slot":"card",className:Mt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function rM({className:n,...a}){return T.jsx("div",{"data-slot":"card-header",className:Mt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...a})}function iM({className:n,...a}){return T.jsx("div",{"data-slot":"card-title",className:Mt("leading-none font-semibold",n),...a})}function sM({className:n,...a}){return T.jsx("div",{"data-slot":"card-description",className:Mt("text-muted-foreground text-sm",n),...a})}function oM({className:n,...a}){return T.jsx("div",{"data-slot":"card-content",className:Mt("px-6",n),...a})}function zD({className:n,...a}){return T.jsx("div",{"data-slot":"card-footer",className:Mt("flex items-center px-6 [.border-t]:pt-6",n),...a})}var lM="Label",IS=_.forwardRef((n,a)=>T.jsx(ie.label,{...n,ref:a,onMouseDown:r=>{var l;r.target.closest("button, input, select, textarea")||((l=n.onMouseDown)==null||l.call(n,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));IS.displayName=lM;var uM=IS;function W0({className:n,...a}){return T.jsx(uM,{"data-slot":"label",className:Mt("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",n),...a})}const tb=n=>{let a;const r=new Set,s=(p,v)=>{const m=typeof p=="function"?p(a):p;if(!Object.is(m,a)){const b=a;a=v??(typeof m!="object"||m===null)?m:Object.assign({},a,m),r.forEach(E=>E(a,b))}},l=()=>a,h={setState:s,getState:l,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=a=n(s,l,h);return h},cM=n=>n?tb(n):tb,fM=n=>n;function dM(n,a=fM){const r=st.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return st.useDebugValue(r),r}const eb=n=>{const a=cM(n),r=s=>dM(a,s);return Object.assign(r,a),r},hM=n=>n?eb(n):eb,JS=hM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function mM(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const pM=n=>{switch(n){case"success":return yM;case"info":return SM;case"warning":return bM;case"error":return xM;default:return null}},gM=Array(12).fill(0),vM=({visible:n,className:a})=>st.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},st.createElement("div",{className:"sonner-spinner"},gM.map((r,s)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),yM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),bM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},st.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"})),SM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),xM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),wM=st.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"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),EM=()=>{const[n,a]=st.useState(document.hidden);return st.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Ph=1;class RM{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:s,...l}=a,c=typeof(a==null?void 0:a.id)=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:Ph++,f=this.toasts.find(g=>g.id===c),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),f?this.toasts=this.toasts.map(g=>g.id===c?(this.publish({...g,...a,id:c,title:s}),{...g,...a,id:c,dismissible:h,title:s}):g):this.addToast({title:s,...l,dismissible:h,id:c}),c},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const l=Promise.resolve(a instanceof Function?a():a);let c=s!==void 0,f;const h=l.then(async p=>{if(f=["resolve",p],st.isValidElement(p))c=!1,this.create({id:s,type:"default",message:p});else if(TM(p)&&!p.ok){c=!1;const m=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(p instanceof Error){c=!1;const m=typeof r.error=="function"?await r.error(p):r.error,b=typeof r.description=="function"?await r.description(p):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(r.success!==void 0){c=!1;const m=typeof r.success=="function"?await r.success(p):r.success,b=typeof r.description=="function"?await r.description(p):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...S})}}).catch(async p=>{if(f=["reject",p],r.error!==void 0){c=!1;const v=typeof r.error=="function"?await r.error(p):r.error,m=typeof r.description=="function"?await r.description(p):r.description,E=typeof v=="object"&&!st.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:m,...E})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,v)=>h.then(()=>f[0]==="reject"?v(f[1]):p(f[1])).catch(v));return typeof s!="string"&&typeof s!="number"?{unwrap:g}:Object.assign(s,{unwrap:g})},this.custom=(a,r)=>{const s=(r==null?void 0:r.id)||Ph++;return this.create({jsx:a(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ie=new RM,_M=(n,a)=>{const r=(a==null?void 0:a.id)||Ph++;return Ie.addToast({title:n,...a,id:r}),r},TM=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",CM=_M,AM=()=>Ie.toasts,OM=()=>Ie.getActiveToasts(),nb=Object.assign(CM,{success:Ie.success,info:Ie.info,warning:Ie.warning,error:Ie.error,custom:Ie.custom,message:Ie.message,promise:Ie.promise,dismiss:Ie.dismiss,loading:Ie.loading},{getHistory:AM,getToasts:OM});mM("[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 Du(n){return n.label!==void 0}const MM=3,DM="24px",NM="16px",ab=4e3,jM=356,LM=14,zM=45,UM=200;function Xn(...n){return n.filter(Boolean).join(" ")}function BM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const kM=n=>{var a,r,s,l,c,f,h,g,p;const{invert:v,toast:m,unstyled:b,interacting:E,setHeights:S,visibleToasts:x,heights:R,index:A,toasts:z,expanded:N,removeToast:P,defaultRichColors:U,closeButton:K,style:H,cancelButtonStyle:M,actionButtonStyle:F,className:$="",descriptionClassName:at="",duration:rt,position:ut,gap:ct,expandByDefault:lt,classNames:j,icons:Z,closeButtonAriaLabel:B="Close toast"}=n,[ot,C]=st.useState(null),[q,tt]=st.useState(null),[I,it]=st.useState(!1),[ft,nt]=st.useState(!1),[bt,ht]=st.useState(!1),[mt,Rt]=st.useState(!1),[Vt,Wt]=st.useState(!1),[se,Yt]=st.useState(0),[ye,oe]=st.useState(0),Pt=st.useRef(m.duration||rt||ab),Tn=st.useRef(null),le=st.useRef(null),Sr=A===0,aa=A+1<=x,Ct=m.type,Qt=m.dismissible!==!1,xr=m.className||"",fi=m.descriptionClassName||"",cn=st.useMemo(()=>R.findIndex(_t=>_t.toastId===m.id)||0,[R,m.id]),Oe=st.useMemo(()=>{var _t;return(_t=m.closeButton)!=null?_t:K},[m.closeButton,K]),Cn=st.useMemo(()=>m.duration||rt||ab,[m.duration,rt]),Me=st.useRef(0),Ma=st.useRef(0),ll=st.useRef(0),Da=st.useRef(null),[di,hi]=ut.split("-"),qn=st.useMemo(()=>R.reduce((_t,ue,pe)=>pe>=cn?_t:_t+ue.height,0),[R,cn]),wr=EM(),Er=m.invert||v,Us=Ct==="loading";Ma.current=st.useMemo(()=>cn*ct+qn,[cn,qn]),st.useEffect(()=>{Pt.current=Cn},[Cn]),st.useEffect(()=>{it(!0)},[]),st.useEffect(()=>{const _t=le.current;if(_t){const ue=_t.getBoundingClientRect().height;return oe(ue),S(pe=>[{toastId:m.id,height:ue,position:m.position},...pe]),()=>S(pe=>pe.filter(De=>De.toastId!==m.id))}},[S,m.id]),st.useLayoutEffect(()=>{if(!I)return;const _t=le.current,ue=_t.style.height;_t.style.height="auto";const pe=_t.getBoundingClientRect().height;_t.style.height=ue,oe(pe),S(De=>De.find(be=>be.toastId===m.id)?De.map(be=>be.toastId===m.id?{...be,height:pe}:be):[{toastId:m.id,height:pe,position:m.position},...De])},[I,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const An=st.useCallback(()=>{nt(!0),Yt(Ma.current),S(_t=>_t.filter(ue=>ue.toastId!==m.id)),setTimeout(()=>{P(m)},UM)},[m,P,S,Ma]);st.useEffect(()=>{if(m.promise&&Ct==="loading"||m.duration===1/0||m.type==="loading")return;let _t;return N||E||wr?(()=>{if(ll.current<Me.current){const De=new Date().getTime()-Me.current;Pt.current=Pt.current-De}ll.current=new Date().getTime()})():(()=>{Pt.current!==1/0&&(Me.current=new Date().getTime(),_t=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),An()},Pt.current))})(),()=>clearTimeout(_t)},[N,E,m,Ct,wr,An]),st.useEffect(()=>{m.delete&&(An(),m.onDismiss==null||m.onDismiss.call(m,m))},[An,m.delete]);function ul(){var _t;if(Z!=null&&Z.loading){var ue;return st.createElement("div",{className:Xn(j==null?void 0:j.loader,m==null||(ue=m.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":Ct==="loading"},Z.loading)}return st.createElement(vM,{className:Xn(j==null?void 0:j.loader,m==null||(_t=m.classNames)==null?void 0:_t.loader),visible:Ct==="loading"})}const Bs=m.icon||(Z==null?void 0:Z[Ct])||pM(Ct);var Na,cl;return st.createElement("li",{tabIndex:0,ref:le,className:Xn($,xr,j==null?void 0:j.toast,m==null||(a=m.classNames)==null?void 0:a.toast,j==null?void 0:j.default,j==null?void 0:j[Ct],m==null||(r=m.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(Na=m.richColors)!=null?Na:U,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":I,"data-promise":!!m.promise,"data-swiped":Vt,"data-removed":ft,"data-visible":aa,"data-y-position":di,"data-x-position":hi,"data-index":A,"data-front":Sr,"data-swiping":bt,"data-dismissible":Qt,"data-type":Ct,"data-invert":Er,"data-swipe-out":mt,"data-swipe-direction":q,"data-expanded":!!(N||lt&&I),style:{"--index":A,"--toasts-before":A,"--z-index":z.length-A,"--offset":`${ft?se:Ma.current}px`,"--initial-height":lt?"auto":`${ye}px`,...H,...m.style},onDragEnd:()=>{ht(!1),C(null),Da.current=null},onPointerDown:_t=>{_t.button!==2&&(Us||!Qt||(Tn.current=new Date,Yt(Ma.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(ht(!0),Da.current={x:_t.clientX,y:_t.clientY})))},onPointerUp:()=>{var _t,ue,pe;if(mt||!Qt)return;Da.current=null;const De=Number(((_t=le.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rr=Number(((ue=le.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),be=new Date().getTime()-((pe=Tn.current)==null?void 0:pe.getTime()),ce=ot==="x"?De:Rr,fe=Math.abs(ce)/be;if(Math.abs(ce)>=zM||fe>.11){Yt(Ma.current),m.onDismiss==null||m.onDismiss.call(m,m),tt(ot==="x"?De>0?"right":"left":Rr>0?"down":"up"),An(),Rt(!0);return}else{var It,Re;(It=le.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(Re=le.current)==null||Re.style.setProperty("--swipe-amount-y","0px")}Wt(!1),ht(!1),C(null)},onPointerMove:_t=>{var ue,pe,De;if(!Da.current||!Qt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const be=_t.clientY-Da.current.y,ce=_t.clientX-Da.current.x;var fe;const It=(fe=n.swipeDirections)!=null?fe:BM(ut);!ot&&(Math.abs(ce)>1||Math.abs(be)>1)&&C(Math.abs(ce)>Math.abs(be)?"x":"y");let Re={x:0,y:0};const mi=ra=>1/(1.5+Math.abs(ra)/20);if(ot==="y"){if(It.includes("top")||It.includes("bottom"))if(It.includes("top")&&be<0||It.includes("bottom")&&be>0)Re.y=be;else{const ra=be*mi(be);Re.y=Math.abs(ra)<Math.abs(be)?ra:be}}else if(ot==="x"&&(It.includes("left")||It.includes("right")))if(It.includes("left")&&ce<0||It.includes("right")&&ce>0)Re.x=ce;else{const ra=ce*mi(ce);Re.x=Math.abs(ra)<Math.abs(ce)?ra:ce}(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&Wt(!0),(pe=le.current)==null||pe.style.setProperty("--swipe-amount-x",`${Re.x}px`),(De=le.current)==null||De.style.setProperty("--swipe-amount-y",`${Re.y}px`)}},Oe&&!m.jsx&&Ct!=="loading"?st.createElement("button",{"aria-label":B,"data-disabled":Us,"data-close-button":!0,onClick:Us||!Qt?()=>{}:()=>{An(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Xn(j==null?void 0:j.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(cl=Z==null?void 0:Z.close)!=null?cl:wM):null,(Ct||m.icon||m.promise)&&m.icon!==null&&((Z==null?void 0:Z[Ct])!==null||m.icon)?st.createElement("div",{"data-icon":"",className:Xn(j==null?void 0:j.icon,m==null||(l=m.classNames)==null?void 0:l.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ul():null,m.type!=="loading"?Bs:null):null,st.createElement("div",{"data-content":"",className:Xn(j==null?void 0:j.content,m==null||(c=m.classNames)==null?void 0:c.content)},st.createElement("div",{"data-title":"",className:Xn(j==null?void 0:j.title,m==null||(f=m.classNames)==null?void 0:f.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?st.createElement("div",{"data-description":"",className:Xn(at,fi,j==null?void 0:j.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),st.isValidElement(m.cancel)?m.cancel:m.cancel&&Du(m.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||M,onClick:_t=>{Du(m.cancel)&&Qt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,_t),An())},className:Xn(j==null?void 0:j.cancelButton,m==null||(g=m.classNames)==null?void 0:g.cancelButton)},m.cancel.label):null,st.isValidElement(m.action)?m.action:m.action&&Du(m.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:_t=>{Du(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,_t),!_t.defaultPrevented&&An())},className:Xn(j==null?void 0:j.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function rb(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function PM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?NM:DM;function g(p){["top","right","bottom","left"].forEach(v=>{r[`${f}-${v}`]=typeof p=="number"?`${p}px`:p})}typeof s=="number"||typeof s=="string"?g(s):typeof s=="object"?["top","right","bottom","left"].forEach(p=>{s[p]===void 0?r[`${f}-${p}`]=h:r[`${f}-${p}`]=typeof s[p]=="number"?`${s[p]}px`:s[p]}):g(h)}),r}const HM=st.forwardRef(function(a,r){const{invert:s,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:h,className:g,offset:p,mobileOffset:v,theme:m="light",richColors:b,duration:E,style:S,visibleToasts:x=MM,toastOptions:R,dir:A=rb(),gap:z=LM,icons:N,containerAriaLabel:P="Notifications"}=a,[U,K]=st.useState([]),H=st.useMemo(()=>Array.from(new Set([l].concat(U.filter(q=>q.position).map(q=>q.position)))),[U,l]),[M,F]=st.useState([]),[$,at]=st.useState(!1),[rt,ut]=st.useState(!1),[ct,lt]=st.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=st.useRef(null),Z=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=st.useRef(null),ot=st.useRef(!1),C=st.useCallback(q=>{K(tt=>{var I;return(I=tt.find(it=>it.id===q.id))!=null&&I.delete||Ie.dismiss(q.id),tt.filter(({id:it})=>it!==q.id)})},[]);return st.useEffect(()=>Ie.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{K(tt=>tt.map(I=>I.id===q.id?{...I,delete:!0}:I))});return}setTimeout(()=>{Pb.flushSync(()=>{K(tt=>{const I=tt.findIndex(it=>it.id===q.id);return I!==-1?[...tt.slice(0,I),{...tt[I],...q},...tt.slice(I+1)]:[q,...tt]})})})}),[U]),st.useEffect(()=>{if(m!=="system"){lt(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?lt("dark"):lt("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:tt})=>{lt(tt?"dark":"light")})}catch{q.addListener(({matches:I})=>{try{lt(I?"dark":"light")}catch(it){console.error(it)}})}},[m]),st.useEffect(()=>{U.length<=1&&at(!1)},[U]),st.useEffect(()=>{const q=tt=>{var I;if(c.every(nt=>tt[nt]||tt.code===nt)){var ft;at(!0),(ft=j.current)==null||ft.focus()}tt.code==="Escape"&&(document.activeElement===j.current||(I=j.current)!=null&&I.contains(document.activeElement))&&at(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[c]),st.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,ot.current=!1)}},[j.current]),st.createElement("section",{ref:r,"aria-label":`${P} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},H.map((q,tt)=>{var I;const[it,ft]=q.split("-");return U.length?st.createElement("ol",{key:q,dir:A==="auto"?rb():A,tabIndex:-1,ref:j,className:g,"data-sonner-toaster":!0,"data-sonner-theme":ct,"data-y-position":it,"data-x-position":ft,style:{"--front-toast-height":`${((I=M[0])==null?void 0:I.height)||0}px`,"--width":`${jM}px`,"--gap":`${z}px`,...S,...PM(p,v)},onBlur:nt=>{ot.current&&!nt.currentTarget.contains(nt.relatedTarget)&&(ot.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ot.current||(ot.current=!0,B.current=nt.relatedTarget)},onMouseEnter:()=>at(!0),onMouseMove:()=>at(!0),onMouseLeave:()=>{rt||at(!1)},onDragEnd:()=>at(!1),onPointerDown:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ut(!0)},onPointerUp:()=>ut(!1)},U.filter(nt=>!nt.position&&tt===0||nt.position===q).map((nt,bt)=>{var ht,mt;return st.createElement(kM,{key:nt.id,icons:N,index:bt,toast:nt,defaultRichColors:b,duration:(ht=R==null?void 0:R.duration)!=null?ht:E,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:x,closeButton:(mt=R==null?void 0:R.closeButton)!=null?mt:h,interacting:rt,position:q,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:C,toasts:U.filter(Rt=>Rt.position==nt.position),heights:M.filter(Rt=>Rt.position==nt.position),setHeights:F,expandByDefault:f,gap:z,expanded:$,swipeDirections:a.swipeDirections})})):null}))});var Ls=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},oi=typeof window>"u"||"Deno"in globalThis;function Ve(){}function qM(n,a){return typeof n=="function"?n(a):n}function Hh(n){return typeof n=="number"&&n>=0&&n!==1/0}function WS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function pr(n,a){return typeof n=="function"?n(a):n}function zn(n,a){return typeof n=="function"?n(a):n}function ib(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==Pm(f,a.options))return!1}else if(!Ko(a.queryKey,f))return!1}if(r!=="all"){const g=a.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||l&&l!==a.state.fetchStatus||c&&!c(a))}function sb(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(li(a.options.mutationKey)!==li(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function Pm(n,a){return((a==null?void 0:a.queryKeyHashFn)||li)(n)}function li(n){return JSON.stringify(n,(a,r)=>qh(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Ko(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(r=>Ko(n[r],a[r])):!1}function tx(n,a){if(n===a)return n;const r=ob(n)&&ob(a);if(r||qh(n)&&qh(a)){const s=r?n:Object.keys(n),l=s.length,c=r?a:Object.keys(a),f=c.length,h=r?[]:{},g=new Set(s);let p=0;for(let v=0;v<f;v++){const m=r?v:c[v];(!r&&g.has(m)||r)&&n[m]===void 0&&a[m]===void 0?(h[m]=void 0,p++):(h[m]=tx(n[m],a[m]),h[m]===n[m]&&n[m]!==void 0&&p++)}return l===f&&p===l?n:h}return a}function ac(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const r in n)if(n[r]!==a[r])return!1;return!0}function ob(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function qh(n){if(!lb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!lb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function lb(n){return Object.prototype.toString.call(n)==="[object Object]"}function VM(n){return new Promise(a=>{setTimeout(a,n)})}function Vh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?tx(n,a):a}function FM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function GM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Hm=Symbol();function ex(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Hm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function nx(n,a){return typeof n=="function"?n(...a):!!n}var Yr,rr,cs,yb,YM=(yb=class extends Ls{constructor(){super();St(this,Yr);St(this,rr);St(this,cs);dt(this,cs,a=>{if(!oi&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,rr)||this.setEventListener(D(this,cs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,rr))==null||a.call(this),dt(this,rr,void 0))}setEventListener(a){var r;dt(this,cs,a),(r=D(this,rr))==null||r.call(this),dt(this,rr,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Yr)!==a&&(dt(this,Yr,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(r=>{r(a)})}isFocused(){var a;return typeof D(this,Yr)=="boolean"?D(this,Yr):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},Yr=new WeakMap,rr=new WeakMap,cs=new WeakMap,yb),qm=new YM,fs,ir,ds,bb,QM=(bb=class extends Ls{constructor(){super();St(this,fs,!0);St(this,ir);St(this,ds);dt(this,ds,a=>{if(!oi&&window.addEventListener){const r=()=>a(!0),s=()=>a(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){D(this,ir)||this.setEventListener(D(this,ds))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ir))==null||a.call(this),dt(this,ir,void 0))}setEventListener(a){var r;dt(this,ds,a),(r=D(this,ir))==null||r.call(this),dt(this,ir,a(this.setOnline.bind(this)))}setOnline(a){D(this,fs)!==a&&(dt(this,fs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,fs)}},fs=new WeakMap,ir=new WeakMap,ds=new WeakMap,bb),rc=new QM;function Fh(){let n,a;const r=new Promise((l,c)=>{n=l,a=c});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),n(l)},r.reject=l=>{s({status:"rejected",reason:l}),a(l)},r}function KM(n){return Math.min(1e3*2**n,3e4)}function ax(n){return(n??"online")==="online"?rc.isOnline():!0}var rx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function hh(n){return n instanceof rx}function ix(n){let a=!1,r=0,s=!1,l;const c=Fh(),f=x=>{var R;s||(b(new rx(x)),(R=n.abort)==null||R.call(n))},h=()=>{a=!0},g=()=>{a=!1},p=()=>qm.isFocused()&&(n.networkMode==="always"||rc.isOnline())&&n.canRun(),v=()=>ax(n.networkMode)&&n.canRun(),m=x=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,x),l==null||l(),c.resolve(x))},b=x=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,x),l==null||l(),c.reject(x))},E=()=>new Promise(x=>{var R;l=A=>{(s||p())&&x(A)},(R=n.onPause)==null||R.call(n)}).then(()=>{var x;l=void 0,s||(x=n.onContinue)==null||x.call(n)}),S=()=>{if(s)return;let x;const R=r===0?n.initialPromise:void 0;try{x=R??n.fn()}catch(A){x=Promise.reject(A)}Promise.resolve(x).then(m).catch(A=>{var K;if(s)return;const z=n.retry??(oi?0:3),N=n.retryDelay??KM,P=typeof N=="function"?N(r,A):N,U=z===!0||typeof z=="number"&&r<z||typeof z=="function"&&z(r,A);if(a||!U){b(A);return}r++,(K=n.onFail)==null||K.call(n,r,A),VM(P).then(()=>p()?void 0:E()).then(()=>{a?b(A):S()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?S():E().then(S),c)}}var XM=n=>setTimeout(n,0);function $M(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=XM;const c=h=>{a?n.push(h):l(()=>{r(h)})},f=()=>{const h=n;n=[],h.length&&l(()=>{s(()=>{h.forEach(g=>{r(g)})})})};return{batch:h=>{let g;a++;try{g=h()}finally{a--,a||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var Ee=$M(),Qr,Sb,sx=(Sb=class{constructor(){St(this,Qr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hh(this.gcTime)&&dt(this,Qr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(oi?1/0:5*60*1e3))}clearGcTimeout(){D(this,Qr)&&(clearTimeout(D(this,Qr)),dt(this,Qr,void 0))}},Qr=new WeakMap,Sb),hs,Kr,xn,Xr,Be,Xo,$r,Nn,xa,xb,ZM=(xb=class extends sx{constructor(a){super();St(this,Nn);St(this,hs);St(this,Kr);St(this,xn);St(this,Xr);St(this,Be);St(this,Xo);St(this,$r);dt(this,$r,!1),dt(this,Xo,a.defaultOptions),this.setOptions(a.options),this.observers=[],dt(this,Xr,a.client),dt(this,xn,D(this,Xr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,dt(this,hs,IM(this.options)),this.state=a.state??D(this,hs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var a;return(a=D(this,Be))==null?void 0:a.promise}setOptions(a){this.options={...D(this,Xo),...a},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,xn).remove(this)}setData(a,r){const s=Vh(this.state.data,a,this.options);return Ot(this,Nn,xa).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(a,r){Ot(this,Nn,xa).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,Be))==null?void 0:s.promise;return(l=D(this,Be))==null||l.cancel(a),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,hs))}isActive(){return this.observers.some(a=>zn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>pr(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!WS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Be))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Be))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,xn).notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){this.observers.includes(a)&&(this.observers=this.observers.filter(r=>r!==a),this.observers.length||(D(this,Be)&&(D(this,$r)?D(this,Be).cancel({revert:!0}):D(this,Be).cancelRetry()),this.scheduleGc()),D(this,xn).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,Nn,xa).call(this,{type:"invalidate"})}fetch(a,r){var p,v,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(D(this,Be))return D(this,Be).continueRetry(),D(this,Be).promise}if(a&&this.setOptions(a),!this.options.queryFn){const b=this.observers.find(E=>E.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,l=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(dt(this,$r,!0),s.signal)})},c=()=>{const b=ex(this.options,r),S=(()=>{const x={client:D(this,Xr),queryKey:this.queryKey,meta:this.meta};return l(x),x})();return dt(this,$r,!1),this.options.persister?this.options.persister(b,S,this):b(S)},h=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Xr),state:this.state,fetchFn:c};return l(b),b})();(p=this.options.behavior)==null||p.onFetch(h,this),dt(this,Kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ot(this,Nn,xa).call(this,{type:"fetch",meta:(m=h.fetchOptions)==null?void 0:m.meta});const g=b=>{var E,S,x,R;hh(b)&&b.silent||Ot(this,Nn,xa).call(this,{type:"error",error:b}),hh(b)||((S=(E=D(this,xn).config).onError)==null||S.call(E,b,this),(R=(x=D(this,xn).config).onSettled)==null||R.call(x,this.state.data,b,this)),this.scheduleGc()};return dt(this,Be,ix({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var E,S,x,R;if(b===void 0){g(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(A){g(A);return}(S=(E=D(this,xn).config).onSuccess)==null||S.call(E,b,this),(R=(x=D(this,xn).config).onSettled)==null||R.call(x,b,this.state.error,this),this.scheduleGc()},onError:g,onFail:(b,E)=>{Ot(this,Nn,xa).call(this,{type:"failed",failureCount:b,error:E})},onPause:()=>{Ot(this,Nn,xa).call(this,{type:"pause"})},onContinue:()=>{Ot(this,Nn,xa).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),D(this,Be).start()}},hs=new WeakMap,Kr=new WeakMap,xn=new WeakMap,Xr=new WeakMap,Be=new WeakMap,Xo=new WeakMap,$r=new WeakMap,Nn=new WeakSet,xa=function(a){const r=s=>{switch(a.type){case"failed":return{...s,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ox(s.data,this.options),fetchMeta:a.meta??null};case"success":return dt(this,Kr,void 0),{...s,data:a.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:a.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const l=a.error;return hh(l)&&l.revert&&D(this,Kr)?{...D(this,Kr),fetchStatus:"idle"}:{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...a.state}}};this.state=r(this.state),Ee.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,xn).notify({query:this,type:"updated",action:a})})},xb);function ox(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ax(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function IM(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,r=a!==void 0,s=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Zn,wb,JM=(wb=class extends Ls{constructor(a={}){super();St(this,Zn);this.config=a,dt(this,Zn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??Pm(l,r);let f=this.get(c);return f||(f=new ZM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Zn).has(a.queryHash)||(D(this,Zn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Zn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Zn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Ee.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Zn).get(a)}getAll(){return[...D(this,Zn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>ib(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>ib(a,s)):r}notify(a){Ee.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Zn=new WeakMap,wb),In,He,Zr,Jn,ar,Eb,WM=(Eb=class extends sx{constructor(a){super();St(this,Jn);St(this,In);St(this,He);St(this,Zr);this.mutationId=a.mutationId,dt(this,He,a.mutationCache),dt(this,In,[]),this.state=a.state||lx(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){D(this,In).includes(a)||(D(this,In).push(a),this.clearGcTimeout(),D(this,He).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){dt(this,In,D(this,In).filter(r=>r!==a)),this.scheduleGc(),D(this,He).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,In).length||(this.state.status==="pending"?this.scheduleGc():D(this,He).remove(this))}continue(){var a;return((a=D(this,Zr))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,p,v,m,b,E,S,x,R,A,z,N,P,U,K,H,M;const r=()=>{Ot(this,Jn,ar).call(this,{type:"continue"})};dt(this,Zr,ix({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(F,$)=>{Ot(this,Jn,ar).call(this,{type:"failed",failureCount:F,error:$})},onPause:()=>{Ot(this,Jn,ar).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,He).canRun(this)}));const s=this.state.status==="pending",l=!D(this,Zr).canStart();try{if(s)r();else{Ot(this,Jn,ar).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,He).config).onMutate)==null?void 0:f.call(c,a,this));const $=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));$!==this.state.context&&Ot(this,Jn,ar).call(this,{type:"pending",context:$,variables:a,isPaused:l})}const F=await D(this,Zr).start();return await((v=(p=D(this,He).config).onSuccess)==null?void 0:v.call(p,F,a,this.state.context,this)),await((b=(m=this.options).onSuccess)==null?void 0:b.call(m,F,a,this.state.context)),await((S=(E=D(this,He).config).onSettled)==null?void 0:S.call(E,F,null,this.state.variables,this.state.context,this)),await((R=(x=this.options).onSettled)==null?void 0:R.call(x,F,null,a,this.state.context)),Ot(this,Jn,ar).call(this,{type:"success",data:F}),F}catch(F){try{throw await((z=(A=D(this,He).config).onError)==null?void 0:z.call(A,F,a,this.state.context,this)),await((P=(N=this.options).onError)==null?void 0:P.call(N,F,a,this.state.context)),await((K=(U=D(this,He).config).onSettled)==null?void 0:K.call(U,void 0,F,this.state.variables,this.state.context,this)),await((M=(H=this.options).onSettled)==null?void 0:M.call(H,void 0,F,a,this.state.context)),F}finally{Ot(this,Jn,ar).call(this,{type:"error",error:F})}}finally{D(this,He).runNext(this)}}},In=new WeakMap,He=new WeakMap,Zr=new WeakMap,Jn=new WeakSet,ar=function(a){const r=s=>{switch(a.type){case"failed":return{...s,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...s,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:a.error,failureCount:s.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ee.batch(()=>{D(this,In).forEach(s=>{s.onMutationUpdate(a)}),D(this,He).notify({mutation:this,type:"updated",action:a})})},Eb);function lx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,jn,$o,Rb,t3=(Rb=class extends Ls{constructor(a={}){super();St(this,wa);St(this,jn);St(this,$o);this.config=a,dt(this,wa,new Set),dt(this,jn,new Map),dt(this,$o,0)}build(a,r,s){const l=new WM({mutationCache:this,mutationId:++xu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,wa).add(a);const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r);s?s.push(a):D(this,jn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,wa).delete(a)){const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r);if(s)if(s.length>1){const l=s.indexOf(a);l!==-1&&s.splice(l,1)}else s[0]===a&&D(this,jn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r),l=s==null?void 0:s.find(c=>c.state.status==="pending");return!l||l===a}else return!0}runNext(a){var s;const r=Nu(a);if(typeof r=="string"){const l=(s=D(this,jn).get(r))==null?void 0:s.find(c=>c!==a&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ee.batch(()=>{D(this,wa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,wa).clear(),D(this,jn).clear()})}getAll(){return Array.from(D(this,wa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>sb(r,s))}findAll(a={}){return this.getAll().filter(r=>sb(a,r))}notify(a){Ee.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return Ee.batch(()=>Promise.all(a.map(r=>r.continue().catch(Ve))))}},wa=new WeakMap,jn=new WeakMap,$o=new WeakMap,Rb);function Nu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function ub(n){return{onFetch:(a,r)=>{var v,m,b,E,S;const s=a.options,l=(b=(m=(v=a.fetchOptions)==null?void 0:v.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,c=((E=a.state.data)==null?void 0:E.pages)||[],f=((S=a.state.data)==null?void 0:S.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const R=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(a.signal.aborted?x=!0:a.signal.addEventListener("abort",()=>{x=!0}),a.signal)})},A=ex(a.options,a.fetchOptions),z=async(N,P,U)=>{if(x)return Promise.reject();if(P==null&&N.pages.length)return Promise.resolve(N);const H=(()=>{const at={client:a.client,queryKey:a.queryKey,pageParam:P,direction:U?"backward":"forward",meta:a.options.meta};return R(at),at})(),M=await A(H),{maxPages:F}=a.options,$=U?GM:FM;return{pages:$(N.pages,M,F),pageParams:$(N.pageParams,P,F)}};if(l&&c.length){const N=l==="backward",P=N?e3:cb,U={pages:c,pageParams:f},K=P(s,U);h=await z(U,K,N)}else{const N=n??c.length;do{const P=g===0?f[0]??s.initialPageParam:cb(s,h);if(g>0&&P==null)break;h=await z(h,P),g++}while(g<N)}return h};a.options.persister?a.fetchFn=()=>{var x,R;return(R=(x=a.options).persister)==null?void 0:R.call(x,p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=p}}}function cb(n,{pages:a,pageParams:r}){const s=a.length-1;return a.length>0?n.getNextPageParam(a[s],a,r[s],r):void 0}function e3(n,{pages:a,pageParams:r}){var s;return a.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,a[0],a,r[0],r):void 0}var re,sr,or,ms,ps,lr,gs,vs,_b,n3=(_b=class{constructor(n={}){St(this,re);St(this,sr);St(this,or);St(this,ms);St(this,ps);St(this,lr);St(this,gs);St(this,vs);dt(this,re,n.queryCache||new JM),dt(this,sr,n.mutationCache||new t3),dt(this,or,n.defaultOptions||{}),dt(this,ms,new Map),dt(this,ps,new Map),dt(this,lr,0)}mount(){xu(this,lr)._++,D(this,lr)===1&&(dt(this,gs,qm.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,re).onFocus())})),dt(this,vs,rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,re).onOnline())})))}unmount(){var n,a;xu(this,lr)._--,D(this,lr)===0&&((n=D(this,gs))==null||n.call(this),dt(this,gs,void 0),(a=D(this,vs))==null||a.call(this),dt(this,vs,void 0))}isFetching(n){return D(this,re).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,sr).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,re).get(a.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=D(this,re).build(this,a),s=r.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(pr(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(s))}getQueriesData(n){return D(this,re).findAll(n).map(({queryKey:a,state:r})=>{const s=r.data;return[a,s]})}setQueryData(n,a,r){const s=this.defaultQueryOptions({queryKey:n}),l=D(this,re).get(s.queryHash),c=l==null?void 0:l.state.data,f=qM(a,c);if(f!==void 0)return D(this,re).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return Ee.batch(()=>D(this,re).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,a,r)]))}getQueryState(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,re).get(a.queryHash))==null?void 0:r.state}removeQueries(n){const a=D(this,re);Ee.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,re);return Ee.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=Ee.batch(()=>D(this,re).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(n,a={}){return Ee.batch(()=>(D(this,re).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},a)))}refetchQueries(n,a={}){const r={...a,cancelRefetch:a.cancelRefetch??!0},s=Ee.batch(()=>D(this,re).findAll(n).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(Ve)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Ve)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,re).build(this,a);return r.isStaleByTime(pr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ve).catch(Ve)}fetchInfiniteQuery(n){return n.behavior=ub(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ve).catch(Ve)}ensureInfiniteQueryData(n){return n.behavior=ub(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return rc.isOnline()?D(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,re)}getMutationCache(){return D(this,sr)}getDefaultOptions(){return D(this,or)}setDefaultOptions(n){dt(this,or,n)}setQueryDefaults(n,a){D(this,ms).set(li(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...D(this,ms).values()],r={};return a.forEach(s=>{Ko(n,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(n,a){D(this,ps).set(li(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...D(this,ps).values()],r={};return a.forEach(s=>{Ko(n,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const a={...D(this,or).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Pm(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===Hm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,or).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,re).clear(),D(this,sr).clear()}},re=new WeakMap,sr=new WeakMap,or=new WeakMap,ms=new WeakMap,ps=new WeakMap,lr=new WeakMap,gs=new WeakMap,vs=new WeakMap,_b),$e,Ut,Zo,qe,Ir,ys,ur,cr,Io,bs,Ss,Jr,Wr,fr,xs,qt,Po,Gh,Yh,Qh,Kh,Xh,$h,Zh,ux,Tb,a3=(Tb=class extends Ls{constructor(a,r){super();St(this,qt);St(this,$e);St(this,Ut);St(this,Zo);St(this,qe);St(this,Ir);St(this,ys);St(this,ur);St(this,cr);St(this,Io);St(this,bs);St(this,Ss);St(this,Jr);St(this,Wr);St(this,fr);St(this,xs,new Set);this.options=r,dt(this,$e,a),dt(this,cr,null),dt(this,ur,Fh()),this.options.experimental_prefetchInRender||D(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,Ut).addObserver(this),fb(D(this,Ut),this.options)?Ot(this,qt,Po).call(this):this.updateResult(),Ot(this,qt,Kh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ih(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ih(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,qt,Xh).call(this),Ot(this,qt,$h).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,$e).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,D(this,Ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ot(this,qt,Zh).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!ac(this.options,r)&&D(this,$e).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&db(D(this,Ut),s,this.options,r)&&Ot(this,qt,Po).call(this),this.updateResult(),l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||pr(this.options.staleTime,D(this,Ut))!==pr(r.staleTime,D(this,Ut)))&&Ot(this,qt,Gh).call(this);const c=Ot(this,qt,Yh).call(this);l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||c!==D(this,fr))&&Ot(this,qt,Qh).call(this,c)}getOptimisticResult(a){const r=D(this,$e).getQueryCache().build(D(this,$e),a),s=this.createResult(r,a);return i3(this,s)&&(dt(this,qe,s),dt(this,ys,this.options),dt(this,Ir,D(this,Ut).state)),s}getCurrentResult(){return D(this,qe)}trackResult(a,r){return new Proxy(a,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(a){D(this,xs).add(a)}getCurrentQuery(){return D(this,Ut)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const r=D(this,$e).defaultQueryOptions(a),s=D(this,$e).getQueryCache().build(D(this,$e),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return Ot(this,qt,Po).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,qe)))}createResult(a,r){var F;const s=D(this,Ut),l=this.options,c=D(this,qe),f=D(this,Ir),h=D(this,ys),p=a!==s?a.state:D(this,Zo),{state:v}=a;let m={...v},b=!1,E;if(r._optimisticResults){const $=this.hasListeners(),at=!$&&fb(a,r),rt=$&&db(a,s,r,l);(at||rt)&&(m={...m,...ox(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:x,status:R}=m;E=m.data;let A=!1;if(r.placeholderData!==void 0&&E===void 0&&R==="pending"){let $;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?($=c.data,A=!0):$=typeof r.placeholderData=="function"?r.placeholderData((F=D(this,Ss))==null?void 0:F.state.data,D(this,Ss)):r.placeholderData,$!==void 0&&(R="success",E=Vh(c==null?void 0:c.data,$,r),b=!0)}if(r.select&&E!==void 0&&!A)if(c&&E===(f==null?void 0:f.data)&&r.select===D(this,Io))E=D(this,bs);else try{dt(this,Io,r.select),E=r.select(E),E=Vh(c==null?void 0:c.data,E,r),dt(this,bs,E),dt(this,cr,null)}catch($){dt(this,cr,$)}D(this,cr)&&(S=D(this,cr),E=D(this,bs),x=Date.now(),R="error");const z=m.fetchStatus==="fetching",N=R==="pending",P=R==="error",U=N&&z,K=E!==void 0,M={status:R,fetchStatus:m.fetchStatus,isPending:N,isSuccess:R==="success",isError:P,isInitialLoading:U,isLoading:U,data:E,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:z,isRefetching:z&&!N,isLoadingError:P&&!K,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:P&&K,isStale:Vm(a,r),refetch:this.refetch,promise:D(this,ur)};if(this.options.experimental_prefetchInRender){const $=ut=>{M.status==="error"?ut.reject(M.error):M.data!==void 0&&ut.resolve(M.data)},at=()=>{const ut=dt(this,ur,M.promise=Fh());$(ut)},rt=D(this,ur);switch(rt.status){case"pending":a.queryHash===s.queryHash&&$(rt);break;case"fulfilled":(M.status==="error"||M.data!==rt.value)&&at();break;case"rejected":(M.status!=="error"||M.error!==rt.reason)&&at();break}}return M}updateResult(){const a=D(this,qe),r=this.createResult(D(this,Ut),this.options);if(dt(this,Ir,D(this,Ut).state),dt(this,ys,this.options),D(this,Ir).data!==void 0&&dt(this,Ss,D(this,Ut)),ac(r,a))return;dt(this,qe,r);const s=()=>{if(!a)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!D(this,xs).size)return!0;const f=new Set(c??D(this,xs));return this.options.throwOnError&&f.add("error"),Object.keys(D(this,qe)).some(h=>{const g=h;return D(this,qe)[g]!==a[g]&&f.has(g)})};Ot(this,qt,ux).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,qt,Kh).call(this)}},$e=new WeakMap,Ut=new WeakMap,Zo=new WeakMap,qe=new WeakMap,Ir=new WeakMap,ys=new WeakMap,ur=new WeakMap,cr=new WeakMap,Io=new WeakMap,bs=new WeakMap,Ss=new WeakMap,Jr=new WeakMap,Wr=new WeakMap,fr=new WeakMap,xs=new WeakMap,qt=new WeakSet,Po=function(a){Ot(this,qt,Zh).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Ve)),r},Gh=function(){Ot(this,qt,Xh).call(this);const a=pr(this.options.staleTime,D(this,Ut));if(oi||D(this,qe).isStale||!Hh(a))return;const s=WS(D(this,qe).dataUpdatedAt,a)+1;dt(this,Jr,setTimeout(()=>{D(this,qe).isStale||this.updateResult()},s))},Yh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Qh=function(a){Ot(this,qt,$h).call(this),dt(this,fr,a),!(oi||zn(this.options.enabled,D(this,Ut))===!1||!Hh(D(this,fr))||D(this,fr)===0)&&dt(this,Wr,setInterval(()=>{(this.options.refetchIntervalInBackground||qm.isFocused())&&Ot(this,qt,Po).call(this)},D(this,fr)))},Kh=function(){Ot(this,qt,Gh).call(this),Ot(this,qt,Qh).call(this,Ot(this,qt,Yh).call(this))},Xh=function(){D(this,Jr)&&(clearTimeout(D(this,Jr)),dt(this,Jr,void 0))},$h=function(){D(this,Wr)&&(clearInterval(D(this,Wr)),dt(this,Wr,void 0))},Zh=function(){const a=D(this,$e).getQueryCache().build(D(this,$e),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);dt(this,Ut,a),dt(this,Zo,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ux=function(a){Ee.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,qe))}),D(this,$e).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},Tb);function r3(n,a){return zn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function fb(n,a){return r3(n,a)||n.state.data!==void 0&&Ih(n,a,a.refetchOnMount)}function Ih(n,a,r){if(zn(a.enabled,n)!==!1&&pr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Vm(n,a)}return!1}function db(n,a,r,s){return(n!==a||zn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Vm(n,r)}function Vm(n,a){return zn(a.enabled,n)!==!1&&n.isStaleByTime(pr(a.staleTime,n))}function i3(n,a){return!ac(n.getCurrentResult(),a)}var dr,hr,Ze,Ea,Ta,Hu,Jh,Cb,s3=(Cb=class extends Ls{constructor(r,s){super();St(this,Ta);St(this,dr);St(this,hr);St(this,Ze);St(this,Ea);dt(this,dr,r),this.setOptions(s),this.bindMethods(),Ot(this,Ta,Hu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var l;const s=this.options;this.options=D(this,dr).defaultMutationOptions(r),ac(this.options,s)||D(this,dr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Ze),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&li(s.mutationKey)!==li(this.options.mutationKey)?this.reset():((l=D(this,Ze))==null?void 0:l.state.status)==="pending"&&D(this,Ze).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Ze))==null||r.removeObserver(this)}onMutationUpdate(r){Ot(this,Ta,Hu).call(this),Ot(this,Ta,Jh).call(this,r)}getCurrentResult(){return D(this,hr)}reset(){var r;(r=D(this,Ze))==null||r.removeObserver(this),dt(this,Ze,void 0),Ot(this,Ta,Hu).call(this),Ot(this,Ta,Jh).call(this)}mutate(r,s){var l;return dt(this,Ea,s),(l=D(this,Ze))==null||l.removeObserver(this),dt(this,Ze,D(this,dr).getMutationCache().build(D(this,dr),this.options)),D(this,Ze).addObserver(this),D(this,Ze).execute(r)}},dr=new WeakMap,hr=new WeakMap,Ze=new WeakMap,Ea=new WeakMap,Ta=new WeakSet,Hu=function(){var s;const r=((s=D(this,Ze))==null?void 0:s.state)??lx();dt(this,hr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Jh=function(r){Ee.batch(()=>{var s,l,c,f,h,g,p,v;if(D(this,Ea)&&this.hasListeners()){const m=D(this,hr).variables,b=D(this,hr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,Ea)).onSuccess)==null||l.call(s,r.data,m,b),(f=(c=D(this,Ea)).onSettled)==null||f.call(c,r.data,null,m,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,Ea)).onError)==null||g.call(h,r.error,m,b),(v=(p=D(this,Ea)).onSettled)==null||v.call(p,void 0,r.error,m,b))}this.listeners.forEach(m=>{m(D(this,hr))})})},Cb),cx=_.createContext(void 0),fx=n=>{const a=_.useContext(cx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},o3=({client:n,children:a})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),T.jsx(cx.Provider,{value:n,children:a})),dx=_.createContext(!1),l3=()=>_.useContext(dx);dx.Provider;function u3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var c3=_.createContext(u3()),f3=()=>_.useContext(c3),d3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},h3=n=>{_.useEffect(()=>{n.clearReset()},[n])},m3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||nx(r,[n.error,s])),p3=n=>{if(n.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...s)=>a(r(...s)):a(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},g3=(n,a)=>n.isLoading&&n.isFetching&&!a,v3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,hb=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function y3(n,a,r){var m,b,E,S,x;const s=l3(),l=f3(),c=fx(),f=c.defaultQueryOptions(n);(b=(m=c.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||b.call(m,f),f._optimisticResults=s?"isRestoring":"optimistic",p3(f),d3(f,l),h3(l);const h=!c.getQueryCache().get(f.queryHash),[g]=_.useState(()=>new a(c,f)),p=g.getOptimisticResult(f),v=!s&&n.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(R=>{const A=v?g.subscribe(Ee.batchCalls(R)):Ve;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),_.useEffect(()=>{g.setOptions(f)},[f,g]),v3(f,p))throw hb(f,g,l);if(m3({result:p,errorResetBoundary:l,throwOnError:f.throwOnError,query:c.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((S=(E=c.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||S.call(E,f,p),f.experimental_prefetchInRender&&!oi&&g3(p,s)){const R=h?hb(f,g,l):(x=c.getQueryCache().get(f.queryHash))==null?void 0:x.promise;R==null||R.catch(Ve).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?p:g.trackResult(p)}function b3(n,a){return y3(n,a3)}function S3(n,a){const r=fx(),[s]=_.useState(()=>new s3(r,n));_.useEffect(()=>{s.setOptions(n)},[s,n]);const l=_.useSyncExternalStore(_.useCallback(f=>s.subscribe(Ee.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=_.useCallback((f,h)=>{s.mutate(f,h).catch(Ve)},[s]);if(l.error&&nx(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function x3(){return T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(Qb,{className:"size-8 animate-spin"})})}function w3({className:n,...a}){const{setAuthenticated:r}=JS(),[s,l]=_.useState(""),[c,f]=_.useState(""),h=km(),{isPending:g,mutate:p}=S3({mutationFn:async()=>h.login(s,c),onError(){nb.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){nb.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?T.jsx(x3,{}):T.jsx("div",{className:Mt("flex flex-col gap-6 w-[20%]",n),...a,children:T.jsxs(aM,{children:[T.jsxs(rM,{children:[T.jsx(iM,{className:"text-2xl",children:"Login"}),T.jsx(sM,{children:"Enter your credentials below to proceed"})]}),T.jsx(oM,{children:T.jsxs("div",{className:"flex flex-col gap-6",children:[T.jsxs("div",{className:"grid gap-2",children:[T.jsx(W0,{htmlFor:"username",children:"Username"}),T.jsx(g0,{id:"username",type:"username",placeholder:"Enter your username",required:!0,value:s,onChange:v=>l(v.target.value)})]}),T.jsxs("div",{className:"grid gap-2",children:[T.jsx("div",{className:"flex items-center",children:T.jsx(W0,{htmlFor:"password",children:"Password"})}),T.jsx(g0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),T.jsx(u1,{type:"button",className:"w-full",onClick:()=>{p()},children:"Login"})]})})]})})}function E3({children:n}){const{authenticated:a,setAuthenticated:r}=JS(),s=km(),{isLoading:l,isError:c}=b3({queryKey:[],enabled:!a,queryFn:async()=>{const f=await s.fetchMe();return r(!!f),f},refetchOnWindowFocus:!0});return l?T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(Qb,{className:"size-8 animate-spin"})}):c?T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching user data."})}):a?T.jsx(T.Fragment,{children:n}):T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(w3,{})})}function R3({...n}){return T.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function _3({className:n,...a}){return T.jsx("ol",{"data-slot":"breadcrumb-list",className:Mt("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",n),...a})}function mh({className:n,...a}){return T.jsx("li",{"data-slot":"breadcrumb-item",className:Mt("inline-flex items-center gap-1.5",n),...a})}function mb({asChild:n,className:a,...r}){const s=n?tl:"a";return T.jsx(s,{"data-slot":"breadcrumb-link",className:Mt("hover:text-foreground transition-colors",a),...r})}function T3({className:n,...a}){return T.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Mt("text-foreground font-normal",n),...a})}function pb({children:n,className:a,...r}){return T.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Mt("[&>svg]:size-3.5",a),...r,children:n??T.jsx(n2,{})})}function C3(){const{toggleSidebar:n}=Dm();return T.jsx("header",{className:"bg-background sticky top-0 z-50 flex w-full items-center border-b",children:T.jsxs("div",{className:"flex h-(--header-height) w-full items-center gap-2 px-4",children:[T.jsx(u1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:T.jsx(r2,{})}),T.jsx(N_,{orientation:"vertical",className:"mr-2 h-4"}),T.jsx(R3,{className:"hidden sm:block",children:T.jsxs(_3,{children:[T.jsx(mh,{children:T.jsx(mb,{href:"#",children:"/"})}),T.jsx(pb,{}),T.jsx(mh,{children:T.jsx(T3,{children:"CommandKit"})}),T.jsx(pb,{}),T.jsx(mh,{children:T.jsx(mb,{href:"#",children:"DevTools"})})]})})]})})}var A3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,p=["light","dark"];function v(E){(Array.isArray(n)?n:[n]).forEach(S=>{let x=S==="class",R=x&&c?l.map(A=>c[A]||A):l;x?(g.classList.remove(...R),g.classList.add(c&&c[E]?c[E]:E)):g.setAttribute(S,E)}),m(E)}function m(E){h&&p.includes(E)&&(g.style.colorScheme=E)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let E=localStorage.getItem(a)||r,S=f&&E==="system"?b():E;v(S)}catch{}},gb=["light","dark"],hx="(prefers-color-scheme: dark)",O3=typeof window>"u",Fm=_.createContext(void 0),M3={setTheme:n=>{},themes:[]},D3=()=>{var n;return(n=_.useContext(Fm))!=null?n:M3},N3=n=>_.useContext(Fm)?_.createElement(_.Fragment,null,n.children):_.createElement(L3,{...n}),j3=["light","dark"],L3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=j3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:p,nonce:v,scriptProps:m})=>{let[b,E]=_.useState(()=>U3(l,f)),[S,x]=_.useState(()=>b==="system"?ph():b),R=g?Object.values(g):c,A=_.useCallback(U=>{let K=U;if(!K)return;U==="system"&&r&&(K=ph());let H=g?g[K]:K,M=a?B3(v):null,F=document.documentElement,$=at=>{at==="class"?(F.classList.remove(...R),H&&F.classList.add(H)):at.startsWith("data-")&&(H?F.setAttribute(at,H):F.removeAttribute(at))};if(Array.isArray(h)?h.forEach($):$(h),s){let at=gb.includes(f)?f:null,rt=gb.includes(K)?K:at;F.style.colorScheme=rt}M==null||M()},[v]),z=_.useCallback(U=>{let K=typeof U=="function"?U(b):U;E(K);try{localStorage.setItem(l,K)}catch{}},[b]),N=_.useCallback(U=>{let K=ph(U);x(K),b==="system"&&r&&!n&&A("system")},[b,n]);_.useEffect(()=>{let U=window.matchMedia(hx);return U.addListener(N),N(U),()=>U.removeListener(N)},[N]),_.useEffect(()=>{let U=K=>{K.key===l&&(K.newValue?E(K.newValue):z(f))};return window.addEventListener("storage",U),()=>window.removeEventListener("storage",U)},[z]),_.useEffect(()=>{A(n??b)},[n,b]);let P=_.useMemo(()=>({theme:b,setTheme:z,forcedTheme:n,resolvedTheme:b==="system"?S:b,themes:r?[...c,"system"]:c,systemTheme:r?S:void 0}),[b,z,n,S,r,c]);return _.createElement(Fm.Provider,{value:P},_.createElement(z3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:m}),p)},z3=_.memo(({forcedTheme:n,storageKey:a,attribute:r,enableSystem:s,enableColorScheme:l,defaultTheme:c,value:f,themes:h,nonce:g,scriptProps:p})=>{let v=JSON.stringify([r,a,c,n,h,f,s,l]).slice(1,-1);return _.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${A3.toString()})(${v})`}})}),U3=(n,a)=>{if(O3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},B3=n=>{let a=document.createElement("style");return n&&a.setAttribute("nonce",n),a.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(a),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(a)},1)}},ph=n=>(n||(n=window.matchMedia(hx)),n.matches?"dark":"light");const k3=({...n})=>{const{theme:a="system"}=D3();return T.jsx(HM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},ci=zR({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:P3});function P3(){return T.jsxs(N3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[T.jsx(k3,{}),T.jsx(eM,{children:T.jsx(E3,{children:T.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:T.jsxs($A,{className:"flex flex-col",children:[T.jsx(C3,{}),T.jsxs("div",{className:"flex flex-1",children:[T.jsx(nM,{}),T.jsx(IA,{children:T.jsx(Vb,{})})]})]})})})})]})}const H3="modulepreload",q3=function(n){return"/"+n},vb={},zs=function(a,r,s){let l=Promise.resolve();if(r&&r.length>0){let f=function(p){return Promise.all(p.map(v=>Promise.resolve(v).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),g=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=f(r.map(p=>{if(p=q3(p),p in vb)return;vb[p]=!0;const v=p.endsWith(".css"),m=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":H3,v||(b.as="script"),b.crossOrigin="",b.href=p,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((E,S)=>{b.addEventListener("load",E),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return l.then(f=>{for(const h of f||[])h.status==="rejected"&&c(h.reason);return a().catch(c)})},V3=()=>zs(()=>import("./plugins-BMXDWqYy.js"),[]),F3=gr("/plugins")({component:Cs(V3,"component")}),G3=()=>zs(()=>import("./guilds-CTH86LWE.js"),[]),Y3=gr("/guilds")({component:Cs(G3,"component")}),Q3=()=>zs(()=>import("./feature-flags-CBoVVqMe.js"),[]),K3=gr("/feature-flags")({component:Cs(Q3,"component")}),X3=()=>zs(()=>import("./events-BHw--CR0.js"),[]),$3=gr("/events")({component:Cs(X3,"component")}),Z3=()=>zs(()=>import("./commands-DeRMTvk6.js"),[]),I3=gr("/commands")({component:Cs(Z3,"component")}),J3=()=>zs(()=>import("./index-nDLicClT.js"),[]),W3=gr("/")({component:Cs(J3,"component")}),tD=F3.update({id:"/plugins",path:"/plugins",getParentRoute:()=>ci}),eD=Y3.update({id:"/guilds",path:"/guilds",getParentRoute:()=>ci}),nD=K3.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>ci}),aD=$3.update({id:"/events",path:"/events",getParentRoute:()=>ci}),rD=I3.update({id:"/commands",path:"/commands",getParentRoute:()=>ci}),iD=W3.update({id:"/",path:"/",getParentRoute:()=>ci}),sD={IndexRoute:iD,CommandsRoute:rD,EventsRoute:aD,FeatureFlagsRoute:nD,GuildsRoute:eD,PluginsRoute:tD},oD=ci._addFileChildren(sD)._addFileTypes(),lD=YR({routeTree:oD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),uD=new n3;jE.createRoot(document.getElementById("root")).render(T.jsx(_.StrictMode,{children:T.jsx(o3,{client:uD,children:T.jsx(XR,{router:lD})})}));export{pO as A,bO as B,aM as C,x3 as L,b3 as a,rM as b,gO as c,vO as d,oM as e,iM as f,Ab as g,sM as h,br as i,T as j,n2 as k,zD as l,Ts as m,u1 as n,_ as r,km as u};
|
|
176
|
+
`+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=si(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Pu.assertOptions(s,{silentJSONParsing:Kn.transitional(Kn.boolean),forcedJSONParsing:Kn.transitional(Kn.boolean),clarifyTimeoutError:Kn.transitional(Kn.boolean)},!1),l!=null&&(X.isFunction(l)?r.paramsSerializer={serialize:l}:Pu.assertOptions(l,{encode:Kn.function,serialize:Kn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Pu.assertOptions(r,{baseUrl:Kn.spelling("baseURL"),withXsrfToken:Kn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&X.merge(c.common,c[r.method]);c&&X.forEach(["delete","get","head","post","put","patch","common"],S=>{delete c[S]}),r.headers=We.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(g=g&&x.synchronous,h.unshift(x.fulfilled,x.rejected))});const p=[];this.interceptors.response.forEach(function(x){p.push(x.fulfilled,x.rejected)});let v,m=0,b;if(!g){const S=[Z0.bind(this),void 0];for(S.unshift.apply(S,h),S.push.apply(S,p),b=S.length,v=Promise.resolve(r);m<b;)v=v.then(S[m++],S[m++]);return v}b=h.length;let E=r;for(m=0;m<b;){const S=h[m++],x=h[m++];try{E=S(E)}catch(R){x.call(this,R);break}}try{v=Z0.call(this,E)}catch(S){return Promise.reject(S)}for(m=0,b=p.length;m<b;)v=v.then(p[m++],p[m++]);return v}getUri(a){a=si(this.defaults,a);const r=VS(a.baseURL,a.url,a.allowAbsoluteUrls);return BS(r,a.params,a.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(a){ni.prototype[a]=function(r,s){return this.request(si(s||{},{method:a,url:r,data:(s||{}).data}))}});X.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(si(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}ni.prototype[a]=r(),ni.prototype[a+"Form"]=r(!0)});let X4=class XS{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(c){r=c});const s=this;this.promise.then(l=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](l);s._listeners=null}),this.promise.then=l=>{let c;const f=new Promise(h=>{s.subscribe(h),c=h}).then(l);return f.cancel=function(){s.unsubscribe(c)},f},a(function(c,f,h){s.reason||(s.reason=new js(c,f,h),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const r=this._listeners.indexOf(a);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const a=new AbortController,r=s=>{a.abort(s)};return this.subscribe(r),a.signal.unsubscribe=()=>this.unsubscribe(r),a.signal}static source(){let a;return{token:new XS(function(l){a=l}),cancel:a}}};function $4(n){return function(r){return n.apply(null,r)}}function Z4(n){return X.isObject(n)&&n.isAxiosError===!0}const kh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(kh).forEach(([n,a])=>{kh[a]=n});function $S(n){const a=new ni(n),r=_S(ni.prototype.request,a);return X.extend(r,ni.prototype,a,{allOwnKeys:!0}),X.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return $S(si(n,l))},r}const me=$S(ol);me.Axios=ni;me.CanceledError=js;me.CancelToken=X4;me.isCancel=HS;me.VERSION=KS;me.toFormData=xc;me.AxiosError=Tt;me.Cancel=me.CanceledError;me.all=function(a){return Promise.all(a)};me.spread=$4;me.isAxiosError=Z4;me.mergeConfig=si;me.AxiosHeaders=We;me.formToJSON=n=>PS(X.isHTMLForm(n)?new FormData(n):n);me.getAdapter=QS.getAdapter;me.HttpStatusCode=kh;me.default=me;const{Axios:bD,AxiosError:SD,CanceledError:xD,isCancel:wD,CancelToken:ED,VERSION:RD,all:_D,Cancel:TD,isAxiosError:CD,spread:AD,toFormData:OD,AxiosHeaders:MD,HttpStatusCode:DD,formToJSON:ND,getAdapter:jD,mergeConfig:LD}=me,Bm=me.create({baseURL:"/api"});Bm.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Bm.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class J0{constructor(a,r){this.client=a,this.data=r}}class I4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class J4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class W4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class tM{constructor(){Wi(this,"api",Bm);Wi(this,"guilds",new J4(this));Wi(this,"plugins",new W4(this));Wi(this,"events",new I4(this));Wi(this,"_user",null)}get user(){return this._user}isReady(){return this._user!==null}logout(){localStorage.removeItem("access_token"),this._user=null}async fetchMe(a=!1){if(this._user&&!a)return this._user;const{data:r}=await this.api.get("/auth/@me");return this._user=new J0(this,r),this._user}async getFeatureFlags(){const{data:a}=await this.api.get("/feature-flags");return a}async login(a,r){const{data:s}=await this.api.post("/auth/login",{username:a,password:r});return s.accessToken&&localStorage.setItem("access_token",s.accessToken),this._user=new J0(this,s.user),s}}const ZS=_.createContext(null);function eM({children:n}){const[a,r]=_.useState(()=>new tM);return T.jsx(ZS.Provider,{value:{client:a,setClient:r},children:n})}function km(){const n=_.use(ZS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const dh={navMain:[{title:"Commands",url:"/commands",icon:i0,isActive:!1},{title:"Events",url:"/events",icon:r0,isActive:!1},{title:"Plugins",url:"/plugins",icon:s2,isActive:!1},{title:"Guilds",url:"/guilds",icon:l0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:l2,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:x2},{title:"Discord",url:"https://ctrl.lol/discord",icon:l0}],projects:[{name:"Commands",url:"#",icon:i0},{name:"Middlewares",url:"#",icon:f2},{name:"Events",url:"#",icon:r0}]};function nM({...n}){var r;const a=km();return T.jsxs(ZA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[T.jsx(JA,{children:T.jsx(al,{children:T.jsx(rl,{children:T.jsx(il,{size:"lg",asChild:!0,children:T.jsxs(Ts,{to:"/",children:[T.jsx("div",{className:"border-sidebar-primary border text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg",children:T.jsx("img",{src:"/logo.webp",alt:"Logo",className:"size-6"})}),T.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[T.jsx("span",{className:"truncate font-medium",children:"CommandKit"}),T.jsx("span",{className:"truncate text-xs",children:"DevTools"})]})]})})})})}),T.jsxs(tO,{children:[T.jsx(aO,{items:dh.navMain}),T.jsx(rO,{projects:dh.projects}),T.jsx(iO,{items:dh.navSecondary,className:"mt-auto"})]}),T.jsx(WA,{children:T.jsx(SO,{user:{avatar:a.user.data.displayAvatarURL,name:a.user.data.globalName||((r=a.user)==null?void 0:r.data.username),username:a.user.data.username}})})]})}function aM({className:n,...a}){return T.jsx("div",{"data-slot":"card",className:Mt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function rM({className:n,...a}){return T.jsx("div",{"data-slot":"card-header",className:Mt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",n),...a})}function iM({className:n,...a}){return T.jsx("div",{"data-slot":"card-title",className:Mt("leading-none font-semibold",n),...a})}function sM({className:n,...a}){return T.jsx("div",{"data-slot":"card-description",className:Mt("text-muted-foreground text-sm",n),...a})}function oM({className:n,...a}){return T.jsx("div",{"data-slot":"card-content",className:Mt("px-6",n),...a})}function zD({className:n,...a}){return T.jsx("div",{"data-slot":"card-footer",className:Mt("flex items-center px-6 [.border-t]:pt-6",n),...a})}var lM="Label",IS=_.forwardRef((n,a)=>T.jsx(ie.label,{...n,ref:a,onMouseDown:r=>{var l;r.target.closest("button, input, select, textarea")||((l=n.onMouseDown)==null||l.call(n,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));IS.displayName=lM;var uM=IS;function W0({className:n,...a}){return T.jsx(uM,{"data-slot":"label",className:Mt("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",n),...a})}const tb=n=>{let a;const r=new Set,s=(p,v)=>{const m=typeof p=="function"?p(a):p;if(!Object.is(m,a)){const b=a;a=v??(typeof m!="object"||m===null)?m:Object.assign({},a,m),r.forEach(E=>E(a,b))}},l=()=>a,h={setState:s,getState:l,getInitialState:()=>g,subscribe:p=>(r.add(p),()=>r.delete(p))},g=a=n(s,l,h);return h},cM=n=>n?tb(n):tb,fM=n=>n;function dM(n,a=fM){const r=st.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return st.useDebugValue(r),r}const eb=n=>{const a=cM(n),r=s=>dM(a,s);return Object.assign(r,a),r},hM=n=>n?eb(n):eb,JS=hM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function mM(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const pM=n=>{switch(n){case"success":return yM;case"info":return SM;case"warning":return bM;case"error":return xM;default:return null}},gM=Array(12).fill(0),vM=({visible:n,className:a})=>st.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},st.createElement("div",{className:"sonner-spinner"},gM.map((r,s)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),yM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),bM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},st.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"})),SM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),xM=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},st.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"})),wM=st.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"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),EM=()=>{const[n,a]=st.useState(document.hidden);return st.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Ph=1;class RM{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:s,...l}=a,c=typeof(a==null?void 0:a.id)=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:Ph++,f=this.toasts.find(g=>g.id===c),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(c)&&this.dismissedToasts.delete(c),f?this.toasts=this.toasts.map(g=>g.id===c?(this.publish({...g,...a,id:c,title:s}),{...g,...a,id:c,dismissible:h,title:s}):g):this.addToast({title:s,...l,dismissible:h,id:c}),c},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const l=Promise.resolve(a instanceof Function?a():a);let c=s!==void 0,f;const h=l.then(async p=>{if(f=["resolve",p],st.isValidElement(p))c=!1,this.create({id:s,type:"default",message:p});else if(TM(p)&&!p.ok){c=!1;const m=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(p instanceof Error){c=!1;const m=typeof r.error=="function"?await r.error(p):r.error,b=typeof r.description=="function"?await r.description(p):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...S})}else if(r.success!==void 0){c=!1;const m=typeof r.success=="function"?await r.success(p):r.success,b=typeof r.description=="function"?await r.description(p):r.description,S=typeof m=="object"&&!st.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...S})}}).catch(async p=>{if(f=["reject",p],r.error!==void 0){c=!1;const v=typeof r.error=="function"?await r.error(p):r.error,m=typeof r.description=="function"?await r.description(p):r.description,E=typeof v=="object"&&!st.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:m,...E})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((p,v)=>h.then(()=>f[0]==="reject"?v(f[1]):p(f[1])).catch(v));return typeof s!="string"&&typeof s!="number"?{unwrap:g}:Object.assign(s,{unwrap:g})},this.custom=(a,r)=>{const s=(r==null?void 0:r.id)||Ph++;return this.create({jsx:a(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ie=new RM,_M=(n,a)=>{const r=(a==null?void 0:a.id)||Ph++;return Ie.addToast({title:n,...a,id:r}),r},TM=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",CM=_M,AM=()=>Ie.toasts,OM=()=>Ie.getActiveToasts(),nb=Object.assign(CM,{success:Ie.success,info:Ie.info,warning:Ie.warning,error:Ie.error,custom:Ie.custom,message:Ie.message,promise:Ie.promise,dismiss:Ie.dismiss,loading:Ie.loading},{getHistory:AM,getToasts:OM});mM("[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 Du(n){return n.label!==void 0}const MM=3,DM="24px",NM="16px",ab=4e3,jM=356,LM=14,zM=45,UM=200;function Xn(...n){return n.filter(Boolean).join(" ")}function BM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const kM=n=>{var a,r,s,l,c,f,h,g,p;const{invert:v,toast:m,unstyled:b,interacting:E,setHeights:S,visibleToasts:x,heights:R,index:A,toasts:z,expanded:N,removeToast:P,defaultRichColors:U,closeButton:K,style:H,cancelButtonStyle:M,actionButtonStyle:F,className:$="",descriptionClassName:at="",duration:rt,position:ut,gap:ct,expandByDefault:lt,classNames:j,icons:Z,closeButtonAriaLabel:B="Close toast"}=n,[ot,C]=st.useState(null),[q,tt]=st.useState(null),[I,it]=st.useState(!1),[ft,nt]=st.useState(!1),[bt,ht]=st.useState(!1),[mt,Rt]=st.useState(!1),[Vt,Wt]=st.useState(!1),[se,Yt]=st.useState(0),[ye,oe]=st.useState(0),Pt=st.useRef(m.duration||rt||ab),Tn=st.useRef(null),le=st.useRef(null),Sr=A===0,aa=A+1<=x,Ct=m.type,Qt=m.dismissible!==!1,xr=m.className||"",fi=m.descriptionClassName||"",cn=st.useMemo(()=>R.findIndex(_t=>_t.toastId===m.id)||0,[R,m.id]),Oe=st.useMemo(()=>{var _t;return(_t=m.closeButton)!=null?_t:K},[m.closeButton,K]),Cn=st.useMemo(()=>m.duration||rt||ab,[m.duration,rt]),Me=st.useRef(0),Ma=st.useRef(0),ll=st.useRef(0),Da=st.useRef(null),[di,hi]=ut.split("-"),qn=st.useMemo(()=>R.reduce((_t,ue,pe)=>pe>=cn?_t:_t+ue.height,0),[R,cn]),wr=EM(),Er=m.invert||v,Us=Ct==="loading";Ma.current=st.useMemo(()=>cn*ct+qn,[cn,qn]),st.useEffect(()=>{Pt.current=Cn},[Cn]),st.useEffect(()=>{it(!0)},[]),st.useEffect(()=>{const _t=le.current;if(_t){const ue=_t.getBoundingClientRect().height;return oe(ue),S(pe=>[{toastId:m.id,height:ue,position:m.position},...pe]),()=>S(pe=>pe.filter(De=>De.toastId!==m.id))}},[S,m.id]),st.useLayoutEffect(()=>{if(!I)return;const _t=le.current,ue=_t.style.height;_t.style.height="auto";const pe=_t.getBoundingClientRect().height;_t.style.height=ue,oe(pe),S(De=>De.find(be=>be.toastId===m.id)?De.map(be=>be.toastId===m.id?{...be,height:pe}:be):[{toastId:m.id,height:pe,position:m.position},...De])},[I,m.title,m.description,S,m.id,m.jsx,m.action,m.cancel]);const An=st.useCallback(()=>{nt(!0),Yt(Ma.current),S(_t=>_t.filter(ue=>ue.toastId!==m.id)),setTimeout(()=>{P(m)},UM)},[m,P,S,Ma]);st.useEffect(()=>{if(m.promise&&Ct==="loading"||m.duration===1/0||m.type==="loading")return;let _t;return N||E||wr?(()=>{if(ll.current<Me.current){const De=new Date().getTime()-Me.current;Pt.current=Pt.current-De}ll.current=new Date().getTime()})():(()=>{Pt.current!==1/0&&(Me.current=new Date().getTime(),_t=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),An()},Pt.current))})(),()=>clearTimeout(_t)},[N,E,m,Ct,wr,An]),st.useEffect(()=>{m.delete&&(An(),m.onDismiss==null||m.onDismiss.call(m,m))},[An,m.delete]);function ul(){var _t;if(Z!=null&&Z.loading){var ue;return st.createElement("div",{className:Xn(j==null?void 0:j.loader,m==null||(ue=m.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":Ct==="loading"},Z.loading)}return st.createElement(vM,{className:Xn(j==null?void 0:j.loader,m==null||(_t=m.classNames)==null?void 0:_t.loader),visible:Ct==="loading"})}const Bs=m.icon||(Z==null?void 0:Z[Ct])||pM(Ct);var Na,cl;return st.createElement("li",{tabIndex:0,ref:le,className:Xn($,xr,j==null?void 0:j.toast,m==null||(a=m.classNames)==null?void 0:a.toast,j==null?void 0:j.default,j==null?void 0:j[Ct],m==null||(r=m.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(Na=m.richColors)!=null?Na:U,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":I,"data-promise":!!m.promise,"data-swiped":Vt,"data-removed":ft,"data-visible":aa,"data-y-position":di,"data-x-position":hi,"data-index":A,"data-front":Sr,"data-swiping":bt,"data-dismissible":Qt,"data-type":Ct,"data-invert":Er,"data-swipe-out":mt,"data-swipe-direction":q,"data-expanded":!!(N||lt&&I),style:{"--index":A,"--toasts-before":A,"--z-index":z.length-A,"--offset":`${ft?se:Ma.current}px`,"--initial-height":lt?"auto":`${ye}px`,...H,...m.style},onDragEnd:()=>{ht(!1),C(null),Da.current=null},onPointerDown:_t=>{_t.button!==2&&(Us||!Qt||(Tn.current=new Date,Yt(Ma.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(ht(!0),Da.current={x:_t.clientX,y:_t.clientY})))},onPointerUp:()=>{var _t,ue,pe;if(mt||!Qt)return;Da.current=null;const De=Number(((_t=le.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rr=Number(((ue=le.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),be=new Date().getTime()-((pe=Tn.current)==null?void 0:pe.getTime()),ce=ot==="x"?De:Rr,fe=Math.abs(ce)/be;if(Math.abs(ce)>=zM||fe>.11){Yt(Ma.current),m.onDismiss==null||m.onDismiss.call(m,m),tt(ot==="x"?De>0?"right":"left":Rr>0?"down":"up"),An(),Rt(!0);return}else{var It,Re;(It=le.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(Re=le.current)==null||Re.style.setProperty("--swipe-amount-y","0px")}Wt(!1),ht(!1),C(null)},onPointerMove:_t=>{var ue,pe,De;if(!Da.current||!Qt||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const be=_t.clientY-Da.current.y,ce=_t.clientX-Da.current.x;var fe;const It=(fe=n.swipeDirections)!=null?fe:BM(ut);!ot&&(Math.abs(ce)>1||Math.abs(be)>1)&&C(Math.abs(ce)>Math.abs(be)?"x":"y");let Re={x:0,y:0};const mi=ra=>1/(1.5+Math.abs(ra)/20);if(ot==="y"){if(It.includes("top")||It.includes("bottom"))if(It.includes("top")&&be<0||It.includes("bottom")&&be>0)Re.y=be;else{const ra=be*mi(be);Re.y=Math.abs(ra)<Math.abs(be)?ra:be}}else if(ot==="x"&&(It.includes("left")||It.includes("right")))if(It.includes("left")&&ce<0||It.includes("right")&&ce>0)Re.x=ce;else{const ra=ce*mi(ce);Re.x=Math.abs(ra)<Math.abs(ce)?ra:ce}(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&Wt(!0),(pe=le.current)==null||pe.style.setProperty("--swipe-amount-x",`${Re.x}px`),(De=le.current)==null||De.style.setProperty("--swipe-amount-y",`${Re.y}px`)}},Oe&&!m.jsx&&Ct!=="loading"?st.createElement("button",{"aria-label":B,"data-disabled":Us,"data-close-button":!0,onClick:Us||!Qt?()=>{}:()=>{An(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Xn(j==null?void 0:j.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(cl=Z==null?void 0:Z.close)!=null?cl:wM):null,(Ct||m.icon||m.promise)&&m.icon!==null&&((Z==null?void 0:Z[Ct])!==null||m.icon)?st.createElement("div",{"data-icon":"",className:Xn(j==null?void 0:j.icon,m==null||(l=m.classNames)==null?void 0:l.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ul():null,m.type!=="loading"?Bs:null):null,st.createElement("div",{"data-content":"",className:Xn(j==null?void 0:j.content,m==null||(c=m.classNames)==null?void 0:c.content)},st.createElement("div",{"data-title":"",className:Xn(j==null?void 0:j.title,m==null||(f=m.classNames)==null?void 0:f.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?st.createElement("div",{"data-description":"",className:Xn(at,fi,j==null?void 0:j.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),st.isValidElement(m.cancel)?m.cancel:m.cancel&&Du(m.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||M,onClick:_t=>{Du(m.cancel)&&Qt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,_t),An())},className:Xn(j==null?void 0:j.cancelButton,m==null||(g=m.classNames)==null?void 0:g.cancelButton)},m.cancel.label):null,st.isValidElement(m.action)?m.action:m.action&&Du(m.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||F,onClick:_t=>{Du(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,_t),!_t.defaultPrevented&&An())},className:Xn(j==null?void 0:j.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function rb(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function PM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?NM:DM;function g(p){["top","right","bottom","left"].forEach(v=>{r[`${f}-${v}`]=typeof p=="number"?`${p}px`:p})}typeof s=="number"||typeof s=="string"?g(s):typeof s=="object"?["top","right","bottom","left"].forEach(p=>{s[p]===void 0?r[`${f}-${p}`]=h:r[`${f}-${p}`]=typeof s[p]=="number"?`${s[p]}px`:s[p]}):g(h)}),r}const HM=st.forwardRef(function(a,r){const{invert:s,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:h,className:g,offset:p,mobileOffset:v,theme:m="light",richColors:b,duration:E,style:S,visibleToasts:x=MM,toastOptions:R,dir:A=rb(),gap:z=LM,icons:N,containerAriaLabel:P="Notifications"}=a,[U,K]=st.useState([]),H=st.useMemo(()=>Array.from(new Set([l].concat(U.filter(q=>q.position).map(q=>q.position)))),[U,l]),[M,F]=st.useState([]),[$,at]=st.useState(!1),[rt,ut]=st.useState(!1),[ct,lt]=st.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=st.useRef(null),Z=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=st.useRef(null),ot=st.useRef(!1),C=st.useCallback(q=>{K(tt=>{var I;return(I=tt.find(it=>it.id===q.id))!=null&&I.delete||Ie.dismiss(q.id),tt.filter(({id:it})=>it!==q.id)})},[]);return st.useEffect(()=>Ie.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{K(tt=>tt.map(I=>I.id===q.id?{...I,delete:!0}:I))});return}setTimeout(()=>{Pb.flushSync(()=>{K(tt=>{const I=tt.findIndex(it=>it.id===q.id);return I!==-1?[...tt.slice(0,I),{...tt[I],...q},...tt.slice(I+1)]:[q,...tt]})})})}),[U]),st.useEffect(()=>{if(m!=="system"){lt(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?lt("dark"):lt("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:tt})=>{lt(tt?"dark":"light")})}catch{q.addListener(({matches:I})=>{try{lt(I?"dark":"light")}catch(it){console.error(it)}})}},[m]),st.useEffect(()=>{U.length<=1&&at(!1)},[U]),st.useEffect(()=>{const q=tt=>{var I;if(c.every(nt=>tt[nt]||tt.code===nt)){var ft;at(!0),(ft=j.current)==null||ft.focus()}tt.code==="Escape"&&(document.activeElement===j.current||(I=j.current)!=null&&I.contains(document.activeElement))&&at(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[c]),st.useEffect(()=>{if(j.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,ot.current=!1)}},[j.current]),st.createElement("section",{ref:r,"aria-label":`${P} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},H.map((q,tt)=>{var I;const[it,ft]=q.split("-");return U.length?st.createElement("ol",{key:q,dir:A==="auto"?rb():A,tabIndex:-1,ref:j,className:g,"data-sonner-toaster":!0,"data-sonner-theme":ct,"data-y-position":it,"data-x-position":ft,style:{"--front-toast-height":`${((I=M[0])==null?void 0:I.height)||0}px`,"--width":`${jM}px`,"--gap":`${z}px`,...S,...PM(p,v)},onBlur:nt=>{ot.current&&!nt.currentTarget.contains(nt.relatedTarget)&&(ot.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ot.current||(ot.current=!0,B.current=nt.relatedTarget)},onMouseEnter:()=>at(!0),onMouseMove:()=>at(!0),onMouseLeave:()=>{rt||at(!1)},onDragEnd:()=>at(!1),onPointerDown:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ut(!0)},onPointerUp:()=>ut(!1)},U.filter(nt=>!nt.position&&tt===0||nt.position===q).map((nt,bt)=>{var ht,mt;return st.createElement(kM,{key:nt.id,icons:N,index:bt,toast:nt,defaultRichColors:b,duration:(ht=R==null?void 0:R.duration)!=null?ht:E,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:x,closeButton:(mt=R==null?void 0:R.closeButton)!=null?mt:h,interacting:rt,position:q,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:C,toasts:U.filter(Rt=>Rt.position==nt.position),heights:M.filter(Rt=>Rt.position==nt.position),setHeights:F,expandByDefault:f,gap:z,expanded:$,swipeDirections:a.swipeDirections})})):null}))});var Ls=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},oi=typeof window>"u"||"Deno"in globalThis;function Ve(){}function qM(n,a){return typeof n=="function"?n(a):n}function Hh(n){return typeof n=="number"&&n>=0&&n!==1/0}function WS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function pr(n,a){return typeof n=="function"?n(a):n}function zn(n,a){return typeof n=="function"?n(a):n}function ib(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==Pm(f,a.options))return!1}else if(!Ko(a.queryKey,f))return!1}if(r!=="all"){const g=a.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||l&&l!==a.state.fetchStatus||c&&!c(a))}function sb(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(li(a.options.mutationKey)!==li(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function Pm(n,a){return((a==null?void 0:a.queryKeyHashFn)||li)(n)}function li(n){return JSON.stringify(n,(a,r)=>qh(r)?Object.keys(r).sort().reduce((s,l)=>(s[l]=r[l],s),{}):r)}function Ko(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(r=>Ko(n[r],a[r])):!1}function tx(n,a){if(n===a)return n;const r=ob(n)&&ob(a);if(r||qh(n)&&qh(a)){const s=r?n:Object.keys(n),l=s.length,c=r?a:Object.keys(a),f=c.length,h=r?[]:{},g=new Set(s);let p=0;for(let v=0;v<f;v++){const m=r?v:c[v];(!r&&g.has(m)||r)&&n[m]===void 0&&a[m]===void 0?(h[m]=void 0,p++):(h[m]=tx(n[m],a[m]),h[m]===n[m]&&n[m]!==void 0&&p++)}return l===f&&p===l?n:h}return a}function ac(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const r in n)if(n[r]!==a[r])return!1;return!0}function ob(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function qh(n){if(!lb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!lb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function lb(n){return Object.prototype.toString.call(n)==="[object Object]"}function VM(n){return new Promise(a=>{setTimeout(a,n)})}function Vh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?tx(n,a):a}function FM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function GM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Hm=Symbol();function ex(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Hm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function nx(n,a){return typeof n=="function"?n(...a):!!n}var Yr,rr,cs,yb,YM=(yb=class extends Ls{constructor(){super();St(this,Yr);St(this,rr);St(this,cs);dt(this,cs,a=>{if(!oi&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,rr)||this.setEventListener(D(this,cs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,rr))==null||a.call(this),dt(this,rr,void 0))}setEventListener(a){var r;dt(this,cs,a),(r=D(this,rr))==null||r.call(this),dt(this,rr,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Yr)!==a&&(dt(this,Yr,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(r=>{r(a)})}isFocused(){var a;return typeof D(this,Yr)=="boolean"?D(this,Yr):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},Yr=new WeakMap,rr=new WeakMap,cs=new WeakMap,yb),qm=new YM,fs,ir,ds,bb,QM=(bb=class extends Ls{constructor(){super();St(this,fs,!0);St(this,ir);St(this,ds);dt(this,ds,a=>{if(!oi&&window.addEventListener){const r=()=>a(!0),s=()=>a(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){D(this,ir)||this.setEventListener(D(this,ds))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ir))==null||a.call(this),dt(this,ir,void 0))}setEventListener(a){var r;dt(this,ds,a),(r=D(this,ir))==null||r.call(this),dt(this,ir,a(this.setOnline.bind(this)))}setOnline(a){D(this,fs)!==a&&(dt(this,fs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,fs)}},fs=new WeakMap,ir=new WeakMap,ds=new WeakMap,bb),rc=new QM;function Fh(){let n,a;const r=new Promise((l,c)=>{n=l,a=c});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),n(l)},r.reject=l=>{s({status:"rejected",reason:l}),a(l)},r}function KM(n){return Math.min(1e3*2**n,3e4)}function ax(n){return(n??"online")==="online"?rc.isOnline():!0}var rx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function hh(n){return n instanceof rx}function ix(n){let a=!1,r=0,s=!1,l;const c=Fh(),f=x=>{var R;s||(b(new rx(x)),(R=n.abort)==null||R.call(n))},h=()=>{a=!0},g=()=>{a=!1},p=()=>qm.isFocused()&&(n.networkMode==="always"||rc.isOnline())&&n.canRun(),v=()=>ax(n.networkMode)&&n.canRun(),m=x=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,x),l==null||l(),c.resolve(x))},b=x=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,x),l==null||l(),c.reject(x))},E=()=>new Promise(x=>{var R;l=A=>{(s||p())&&x(A)},(R=n.onPause)==null||R.call(n)}).then(()=>{var x;l=void 0,s||(x=n.onContinue)==null||x.call(n)}),S=()=>{if(s)return;let x;const R=r===0?n.initialPromise:void 0;try{x=R??n.fn()}catch(A){x=Promise.reject(A)}Promise.resolve(x).then(m).catch(A=>{var K;if(s)return;const z=n.retry??(oi?0:3),N=n.retryDelay??KM,P=typeof N=="function"?N(r,A):N,U=z===!0||typeof z=="number"&&r<z||typeof z=="function"&&z(r,A);if(a||!U){b(A);return}r++,(K=n.onFail)==null||K.call(n,r,A),VM(P).then(()=>p()?void 0:E()).then(()=>{a?b(A):S()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?S():E().then(S),c)}}var XM=n=>setTimeout(n,0);function $M(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=XM;const c=h=>{a?n.push(h):l(()=>{r(h)})},f=()=>{const h=n;n=[],h.length&&l(()=>{s(()=>{h.forEach(g=>{r(g)})})})};return{batch:h=>{let g;a++;try{g=h()}finally{a--,a||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var Ee=$M(),Qr,Sb,sx=(Sb=class{constructor(){St(this,Qr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hh(this.gcTime)&&dt(this,Qr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(oi?1/0:5*60*1e3))}clearGcTimeout(){D(this,Qr)&&(clearTimeout(D(this,Qr)),dt(this,Qr,void 0))}},Qr=new WeakMap,Sb),hs,Kr,xn,Xr,Be,Xo,$r,Nn,xa,xb,ZM=(xb=class extends sx{constructor(a){super();St(this,Nn);St(this,hs);St(this,Kr);St(this,xn);St(this,Xr);St(this,Be);St(this,Xo);St(this,$r);dt(this,$r,!1),dt(this,Xo,a.defaultOptions),this.setOptions(a.options),this.observers=[],dt(this,Xr,a.client),dt(this,xn,D(this,Xr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,dt(this,hs,IM(this.options)),this.state=a.state??D(this,hs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var a;return(a=D(this,Be))==null?void 0:a.promise}setOptions(a){this.options={...D(this,Xo),...a},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,xn).remove(this)}setData(a,r){const s=Vh(this.state.data,a,this.options);return Ot(this,Nn,xa).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(a,r){Ot(this,Nn,xa).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,Be))==null?void 0:s.promise;return(l=D(this,Be))==null||l.cancel(a),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,hs))}isActive(){return this.observers.some(a=>zn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>pr(a.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(a=>a.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(a=0){return this.state.data===void 0?!0:a==="static"?!1:this.state.isInvalidated?!0:!WS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Be))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Be))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,xn).notify({type:"observerAdded",query:this,observer:a}))}removeObserver(a){this.observers.includes(a)&&(this.observers=this.observers.filter(r=>r!==a),this.observers.length||(D(this,Be)&&(D(this,$r)?D(this,Be).cancel({revert:!0}):D(this,Be).cancelRetry()),this.scheduleGc()),D(this,xn).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,Nn,xa).call(this,{type:"invalidate"})}fetch(a,r){var p,v,m;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(D(this,Be))return D(this,Be).continueRetry(),D(this,Be).promise}if(a&&this.setOptions(a),!this.options.queryFn){const b=this.observers.find(E=>E.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,l=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(dt(this,$r,!0),s.signal)})},c=()=>{const b=ex(this.options,r),S=(()=>{const x={client:D(this,Xr),queryKey:this.queryKey,meta:this.meta};return l(x),x})();return dt(this,$r,!1),this.options.persister?this.options.persister(b,S,this):b(S)},h=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Xr),state:this.state,fetchFn:c};return l(b),b})();(p=this.options.behavior)==null||p.onFetch(h,this),dt(this,Kr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ot(this,Nn,xa).call(this,{type:"fetch",meta:(m=h.fetchOptions)==null?void 0:m.meta});const g=b=>{var E,S,x,R;hh(b)&&b.silent||Ot(this,Nn,xa).call(this,{type:"error",error:b}),hh(b)||((S=(E=D(this,xn).config).onError)==null||S.call(E,b,this),(R=(x=D(this,xn).config).onSettled)==null||R.call(x,this.state.data,b,this)),this.scheduleGc()};return dt(this,Be,ix({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var E,S,x,R;if(b===void 0){g(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(A){g(A);return}(S=(E=D(this,xn).config).onSuccess)==null||S.call(E,b,this),(R=(x=D(this,xn).config).onSettled)==null||R.call(x,b,this.state.error,this),this.scheduleGc()},onError:g,onFail:(b,E)=>{Ot(this,Nn,xa).call(this,{type:"failed",failureCount:b,error:E})},onPause:()=>{Ot(this,Nn,xa).call(this,{type:"pause"})},onContinue:()=>{Ot(this,Nn,xa).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),D(this,Be).start()}},hs=new WeakMap,Kr=new WeakMap,xn=new WeakMap,Xr=new WeakMap,Be=new WeakMap,Xo=new WeakMap,$r=new WeakMap,Nn=new WeakSet,xa=function(a){const r=s=>{switch(a.type){case"failed":return{...s,fetchFailureCount:a.failureCount,fetchFailureReason:a.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ox(s.data,this.options),fetchMeta:a.meta??null};case"success":return dt(this,Kr,void 0),{...s,data:a.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:a.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!a.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const l=a.error;return hh(l)&&l.revert&&D(this,Kr)?{...D(this,Kr),fetchStatus:"idle"}:{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...a.state}}};this.state=r(this.state),Ee.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,xn).notify({query:this,type:"updated",action:a})})},xb);function ox(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ax(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function IM(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,r=a!==void 0,s=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Zn,wb,JM=(wb=class extends Ls{constructor(a={}){super();St(this,Zn);this.config=a,dt(this,Zn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??Pm(l,r);let f=this.get(c);return f||(f=new ZM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Zn).has(a.queryHash)||(D(this,Zn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Zn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Zn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Ee.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Zn).get(a)}getAll(){return[...D(this,Zn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>ib(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>ib(a,s)):r}notify(a){Ee.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){Ee.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Ee.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Zn=new WeakMap,wb),In,He,Zr,Jn,ar,Eb,WM=(Eb=class extends sx{constructor(a){super();St(this,Jn);St(this,In);St(this,He);St(this,Zr);this.mutationId=a.mutationId,dt(this,He,a.mutationCache),dt(this,In,[]),this.state=a.state||lx(),this.setOptions(a.options),this.scheduleGc()}setOptions(a){this.options=a,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(a){D(this,In).includes(a)||(D(this,In).push(a),this.clearGcTimeout(),D(this,He).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){dt(this,In,D(this,In).filter(r=>r!==a)),this.scheduleGc(),D(this,He).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,In).length||(this.state.status==="pending"?this.scheduleGc():D(this,He).remove(this))}continue(){var a;return((a=D(this,Zr))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,p,v,m,b,E,S,x,R,A,z,N,P,U,K,H,M;const r=()=>{Ot(this,Jn,ar).call(this,{type:"continue"})};dt(this,Zr,ix({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(F,$)=>{Ot(this,Jn,ar).call(this,{type:"failed",failureCount:F,error:$})},onPause:()=>{Ot(this,Jn,ar).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,He).canRun(this)}));const s=this.state.status==="pending",l=!D(this,Zr).canStart();try{if(s)r();else{Ot(this,Jn,ar).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,He).config).onMutate)==null?void 0:f.call(c,a,this));const $=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));$!==this.state.context&&Ot(this,Jn,ar).call(this,{type:"pending",context:$,variables:a,isPaused:l})}const F=await D(this,Zr).start();return await((v=(p=D(this,He).config).onSuccess)==null?void 0:v.call(p,F,a,this.state.context,this)),await((b=(m=this.options).onSuccess)==null?void 0:b.call(m,F,a,this.state.context)),await((S=(E=D(this,He).config).onSettled)==null?void 0:S.call(E,F,null,this.state.variables,this.state.context,this)),await((R=(x=this.options).onSettled)==null?void 0:R.call(x,F,null,a,this.state.context)),Ot(this,Jn,ar).call(this,{type:"success",data:F}),F}catch(F){try{throw await((z=(A=D(this,He).config).onError)==null?void 0:z.call(A,F,a,this.state.context,this)),await((P=(N=this.options).onError)==null?void 0:P.call(N,F,a,this.state.context)),await((K=(U=D(this,He).config).onSettled)==null?void 0:K.call(U,void 0,F,this.state.variables,this.state.context,this)),await((M=(H=this.options).onSettled)==null?void 0:M.call(H,void 0,F,a,this.state.context)),F}finally{Ot(this,Jn,ar).call(this,{type:"error",error:F})}}finally{D(this,He).runNext(this)}}},In=new WeakMap,He=new WeakMap,Zr=new WeakMap,Jn=new WeakSet,ar=function(a){const r=s=>{switch(a.type){case"failed":return{...s,failureCount:a.failureCount,failureReason:a.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:a.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:a.isPaused,status:"pending",variables:a.variables,submittedAt:Date.now()};case"success":return{...s,data:a.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:a.error,failureCount:s.failureCount+1,failureReason:a.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ee.batch(()=>{D(this,In).forEach(s=>{s.onMutationUpdate(a)}),D(this,He).notify({mutation:this,type:"updated",action:a})})},Eb);function lx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,jn,$o,Rb,t3=(Rb=class extends Ls{constructor(a={}){super();St(this,wa);St(this,jn);St(this,$o);this.config=a,dt(this,wa,new Set),dt(this,jn,new Map),dt(this,$o,0)}build(a,r,s){const l=new WM({mutationCache:this,mutationId:++xu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,wa).add(a);const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r);s?s.push(a):D(this,jn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,wa).delete(a)){const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r);if(s)if(s.length>1){const l=s.indexOf(a);l!==-1&&s.splice(l,1)}else s[0]===a&&D(this,jn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=Nu(a);if(typeof r=="string"){const s=D(this,jn).get(r),l=s==null?void 0:s.find(c=>c.state.status==="pending");return!l||l===a}else return!0}runNext(a){var s;const r=Nu(a);if(typeof r=="string"){const l=(s=D(this,jn).get(r))==null?void 0:s.find(c=>c!==a&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ee.batch(()=>{D(this,wa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,wa).clear(),D(this,jn).clear()})}getAll(){return Array.from(D(this,wa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>sb(r,s))}findAll(a={}){return this.getAll().filter(r=>sb(a,r))}notify(a){Ee.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return Ee.batch(()=>Promise.all(a.map(r=>r.continue().catch(Ve))))}},wa=new WeakMap,jn=new WeakMap,$o=new WeakMap,Rb);function Nu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function ub(n){return{onFetch:(a,r)=>{var v,m,b,E,S;const s=a.options,l=(b=(m=(v=a.fetchOptions)==null?void 0:v.meta)==null?void 0:m.fetchMore)==null?void 0:b.direction,c=((E=a.state.data)==null?void 0:E.pages)||[],f=((S=a.state.data)==null?void 0:S.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const R=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(a.signal.aborted?x=!0:a.signal.addEventListener("abort",()=>{x=!0}),a.signal)})},A=ex(a.options,a.fetchOptions),z=async(N,P,U)=>{if(x)return Promise.reject();if(P==null&&N.pages.length)return Promise.resolve(N);const H=(()=>{const at={client:a.client,queryKey:a.queryKey,pageParam:P,direction:U?"backward":"forward",meta:a.options.meta};return R(at),at})(),M=await A(H),{maxPages:F}=a.options,$=U?GM:FM;return{pages:$(N.pages,M,F),pageParams:$(N.pageParams,P,F)}};if(l&&c.length){const N=l==="backward",P=N?e3:cb,U={pages:c,pageParams:f},K=P(s,U);h=await z(U,K,N)}else{const N=n??c.length;do{const P=g===0?f[0]??s.initialPageParam:cb(s,h);if(g>0&&P==null)break;h=await z(h,P),g++}while(g<N)}return h};a.options.persister?a.fetchFn=()=>{var x,R;return(R=(x=a.options).persister)==null?void 0:R.call(x,p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=p}}}function cb(n,{pages:a,pageParams:r}){const s=a.length-1;return a.length>0?n.getNextPageParam(a[s],a,r[s],r):void 0}function e3(n,{pages:a,pageParams:r}){var s;return a.length>0?(s=n.getPreviousPageParam)==null?void 0:s.call(n,a[0],a,r[0],r):void 0}var re,sr,or,ms,ps,lr,gs,vs,_b,n3=(_b=class{constructor(n={}){St(this,re);St(this,sr);St(this,or);St(this,ms);St(this,ps);St(this,lr);St(this,gs);St(this,vs);dt(this,re,n.queryCache||new JM),dt(this,sr,n.mutationCache||new t3),dt(this,or,n.defaultOptions||{}),dt(this,ms,new Map),dt(this,ps,new Map),dt(this,lr,0)}mount(){xu(this,lr)._++,D(this,lr)===1&&(dt(this,gs,qm.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,re).onFocus())})),dt(this,vs,rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,re).onOnline())})))}unmount(){var n,a;xu(this,lr)._--,D(this,lr)===0&&((n=D(this,gs))==null||n.call(this),dt(this,gs,void 0),(a=D(this,vs))==null||a.call(this),dt(this,vs,void 0))}isFetching(n){return D(this,re).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,sr).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,re).get(a.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=D(this,re).build(this,a),s=r.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(pr(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(s))}getQueriesData(n){return D(this,re).findAll(n).map(({queryKey:a,state:r})=>{const s=r.data;return[a,s]})}setQueryData(n,a,r){const s=this.defaultQueryOptions({queryKey:n}),l=D(this,re).get(s.queryHash),c=l==null?void 0:l.state.data,f=qM(a,c);if(f!==void 0)return D(this,re).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return Ee.batch(()=>D(this,re).findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,a,r)]))}getQueryState(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,re).get(a.queryHash))==null?void 0:r.state}removeQueries(n){const a=D(this,re);Ee.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,re);return Ee.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=Ee.batch(()=>D(this,re).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(n,a={}){return Ee.batch(()=>(D(this,re).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},a)))}refetchQueries(n,a={}){const r={...a,cancelRefetch:a.cancelRefetch??!0},s=Ee.batch(()=>D(this,re).findAll(n).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(Ve)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Ve)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,re).build(this,a);return r.isStaleByTime(pr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ve).catch(Ve)}fetchInfiniteQuery(n){return n.behavior=ub(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ve).catch(Ve)}ensureInfiniteQueryData(n){return n.behavior=ub(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return rc.isOnline()?D(this,sr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,re)}getMutationCache(){return D(this,sr)}getDefaultOptions(){return D(this,or)}setDefaultOptions(n){dt(this,or,n)}setQueryDefaults(n,a){D(this,ms).set(li(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...D(this,ms).values()],r={};return a.forEach(s=>{Ko(n,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(n,a){D(this,ps).set(li(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...D(this,ps).values()],r={};return a.forEach(s=>{Ko(n,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const a={...D(this,or).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Pm(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===Hm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,or).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,re).clear(),D(this,sr).clear()}},re=new WeakMap,sr=new WeakMap,or=new WeakMap,ms=new WeakMap,ps=new WeakMap,lr=new WeakMap,gs=new WeakMap,vs=new WeakMap,_b),$e,Ut,Zo,qe,Ir,ys,ur,cr,Io,bs,Ss,Jr,Wr,fr,xs,qt,Po,Gh,Yh,Qh,Kh,Xh,$h,Zh,ux,Tb,a3=(Tb=class extends Ls{constructor(a,r){super();St(this,qt);St(this,$e);St(this,Ut);St(this,Zo);St(this,qe);St(this,Ir);St(this,ys);St(this,ur);St(this,cr);St(this,Io);St(this,bs);St(this,Ss);St(this,Jr);St(this,Wr);St(this,fr);St(this,xs,new Set);this.options=r,dt(this,$e,a),dt(this,cr,null),dt(this,ur,Fh()),this.options.experimental_prefetchInRender||D(this,ur).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(D(this,Ut).addObserver(this),fb(D(this,Ut),this.options)?Ot(this,qt,Po).call(this):this.updateResult(),Ot(this,qt,Kh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ih(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ih(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,qt,Xh).call(this),Ot(this,qt,$h).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,$e).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,D(this,Ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ot(this,qt,Zh).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!ac(this.options,r)&&D(this,$e).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&db(D(this,Ut),s,this.options,r)&&Ot(this,qt,Po).call(this),this.updateResult(),l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||pr(this.options.staleTime,D(this,Ut))!==pr(r.staleTime,D(this,Ut)))&&Ot(this,qt,Gh).call(this);const c=Ot(this,qt,Yh).call(this);l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||c!==D(this,fr))&&Ot(this,qt,Qh).call(this,c)}getOptimisticResult(a){const r=D(this,$e).getQueryCache().build(D(this,$e),a),s=this.createResult(r,a);return i3(this,s)&&(dt(this,qe,s),dt(this,ys,this.options),dt(this,Ir,D(this,Ut).state)),s}getCurrentResult(){return D(this,qe)}trackResult(a,r){return new Proxy(a,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(a){D(this,xs).add(a)}getCurrentQuery(){return D(this,Ut)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const r=D(this,$e).defaultQueryOptions(a),s=D(this,$e).getQueryCache().build(D(this,$e),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return Ot(this,qt,Po).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,qe)))}createResult(a,r){var F;const s=D(this,Ut),l=this.options,c=D(this,qe),f=D(this,Ir),h=D(this,ys),p=a!==s?a.state:D(this,Zo),{state:v}=a;let m={...v},b=!1,E;if(r._optimisticResults){const $=this.hasListeners(),at=!$&&fb(a,r),rt=$&&db(a,s,r,l);(at||rt)&&(m={...m,...ox(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:S,errorUpdatedAt:x,status:R}=m;E=m.data;let A=!1;if(r.placeholderData!==void 0&&E===void 0&&R==="pending"){let $;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?($=c.data,A=!0):$=typeof r.placeholderData=="function"?r.placeholderData((F=D(this,Ss))==null?void 0:F.state.data,D(this,Ss)):r.placeholderData,$!==void 0&&(R="success",E=Vh(c==null?void 0:c.data,$,r),b=!0)}if(r.select&&E!==void 0&&!A)if(c&&E===(f==null?void 0:f.data)&&r.select===D(this,Io))E=D(this,bs);else try{dt(this,Io,r.select),E=r.select(E),E=Vh(c==null?void 0:c.data,E,r),dt(this,bs,E),dt(this,cr,null)}catch($){dt(this,cr,$)}D(this,cr)&&(S=D(this,cr),E=D(this,bs),x=Date.now(),R="error");const z=m.fetchStatus==="fetching",N=R==="pending",P=R==="error",U=N&&z,K=E!==void 0,M={status:R,fetchStatus:m.fetchStatus,isPending:N,isSuccess:R==="success",isError:P,isInitialLoading:U,isLoading:U,data:E,dataUpdatedAt:m.dataUpdatedAt,error:S,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>p.dataUpdateCount||m.errorUpdateCount>p.errorUpdateCount,isFetching:z,isRefetching:z&&!N,isLoadingError:P&&!K,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:P&&K,isStale:Vm(a,r),refetch:this.refetch,promise:D(this,ur)};if(this.options.experimental_prefetchInRender){const $=ut=>{M.status==="error"?ut.reject(M.error):M.data!==void 0&&ut.resolve(M.data)},at=()=>{const ut=dt(this,ur,M.promise=Fh());$(ut)},rt=D(this,ur);switch(rt.status){case"pending":a.queryHash===s.queryHash&&$(rt);break;case"fulfilled":(M.status==="error"||M.data!==rt.value)&&at();break;case"rejected":(M.status!=="error"||M.error!==rt.reason)&&at();break}}return M}updateResult(){const a=D(this,qe),r=this.createResult(D(this,Ut),this.options);if(dt(this,Ir,D(this,Ut).state),dt(this,ys,this.options),D(this,Ir).data!==void 0&&dt(this,Ss,D(this,Ut)),ac(r,a))return;dt(this,qe,r);const s=()=>{if(!a)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!D(this,xs).size)return!0;const f=new Set(c??D(this,xs));return this.options.throwOnError&&f.add("error"),Object.keys(D(this,qe)).some(h=>{const g=h;return D(this,qe)[g]!==a[g]&&f.has(g)})};Ot(this,qt,ux).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,qt,Kh).call(this)}},$e=new WeakMap,Ut=new WeakMap,Zo=new WeakMap,qe=new WeakMap,Ir=new WeakMap,ys=new WeakMap,ur=new WeakMap,cr=new WeakMap,Io=new WeakMap,bs=new WeakMap,Ss=new WeakMap,Jr=new WeakMap,Wr=new WeakMap,fr=new WeakMap,xs=new WeakMap,qt=new WeakSet,Po=function(a){Ot(this,qt,Zh).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Ve)),r},Gh=function(){Ot(this,qt,Xh).call(this);const a=pr(this.options.staleTime,D(this,Ut));if(oi||D(this,qe).isStale||!Hh(a))return;const s=WS(D(this,qe).dataUpdatedAt,a)+1;dt(this,Jr,setTimeout(()=>{D(this,qe).isStale||this.updateResult()},s))},Yh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Qh=function(a){Ot(this,qt,$h).call(this),dt(this,fr,a),!(oi||zn(this.options.enabled,D(this,Ut))===!1||!Hh(D(this,fr))||D(this,fr)===0)&&dt(this,Wr,setInterval(()=>{(this.options.refetchIntervalInBackground||qm.isFocused())&&Ot(this,qt,Po).call(this)},D(this,fr)))},Kh=function(){Ot(this,qt,Gh).call(this),Ot(this,qt,Qh).call(this,Ot(this,qt,Yh).call(this))},Xh=function(){D(this,Jr)&&(clearTimeout(D(this,Jr)),dt(this,Jr,void 0))},$h=function(){D(this,Wr)&&(clearInterval(D(this,Wr)),dt(this,Wr,void 0))},Zh=function(){const a=D(this,$e).getQueryCache().build(D(this,$e),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);dt(this,Ut,a),dt(this,Zo,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ux=function(a){Ee.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,qe))}),D(this,$e).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},Tb);function r3(n,a){return zn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function fb(n,a){return r3(n,a)||n.state.data!==void 0&&Ih(n,a,a.refetchOnMount)}function Ih(n,a,r){if(zn(a.enabled,n)!==!1&&pr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Vm(n,a)}return!1}function db(n,a,r,s){return(n!==a||zn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Vm(n,r)}function Vm(n,a){return zn(a.enabled,n)!==!1&&n.isStaleByTime(pr(a.staleTime,n))}function i3(n,a){return!ac(n.getCurrentResult(),a)}var dr,hr,Ze,Ea,Ta,Hu,Jh,Cb,s3=(Cb=class extends Ls{constructor(r,s){super();St(this,Ta);St(this,dr);St(this,hr);St(this,Ze);St(this,Ea);dt(this,dr,r),this.setOptions(s),this.bindMethods(),Ot(this,Ta,Hu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var l;const s=this.options;this.options=D(this,dr).defaultMutationOptions(r),ac(this.options,s)||D(this,dr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Ze),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&li(s.mutationKey)!==li(this.options.mutationKey)?this.reset():((l=D(this,Ze))==null?void 0:l.state.status)==="pending"&&D(this,Ze).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Ze))==null||r.removeObserver(this)}onMutationUpdate(r){Ot(this,Ta,Hu).call(this),Ot(this,Ta,Jh).call(this,r)}getCurrentResult(){return D(this,hr)}reset(){var r;(r=D(this,Ze))==null||r.removeObserver(this),dt(this,Ze,void 0),Ot(this,Ta,Hu).call(this),Ot(this,Ta,Jh).call(this)}mutate(r,s){var l;return dt(this,Ea,s),(l=D(this,Ze))==null||l.removeObserver(this),dt(this,Ze,D(this,dr).getMutationCache().build(D(this,dr),this.options)),D(this,Ze).addObserver(this),D(this,Ze).execute(r)}},dr=new WeakMap,hr=new WeakMap,Ze=new WeakMap,Ea=new WeakMap,Ta=new WeakSet,Hu=function(){var s;const r=((s=D(this,Ze))==null?void 0:s.state)??lx();dt(this,hr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Jh=function(r){Ee.batch(()=>{var s,l,c,f,h,g,p,v;if(D(this,Ea)&&this.hasListeners()){const m=D(this,hr).variables,b=D(this,hr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,Ea)).onSuccess)==null||l.call(s,r.data,m,b),(f=(c=D(this,Ea)).onSettled)==null||f.call(c,r.data,null,m,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,Ea)).onError)==null||g.call(h,r.error,m,b),(v=(p=D(this,Ea)).onSettled)==null||v.call(p,void 0,r.error,m,b))}this.listeners.forEach(m=>{m(D(this,hr))})})},Cb),cx=_.createContext(void 0),fx=n=>{const a=_.useContext(cx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},o3=({client:n,children:a})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),T.jsx(cx.Provider,{value:n,children:a})),dx=_.createContext(!1),l3=()=>_.useContext(dx);dx.Provider;function u3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var c3=_.createContext(u3()),f3=()=>_.useContext(c3),d3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},h3=n=>{_.useEffect(()=>{n.clearReset()},[n])},m3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||nx(r,[n.error,s])),p3=n=>{if(n.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...s)=>a(r(...s)):a(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},g3=(n,a)=>n.isLoading&&n.isFetching&&!a,v3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,hb=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function y3(n,a,r){var m,b,E,S,x;const s=l3(),l=f3(),c=fx(),f=c.defaultQueryOptions(n);(b=(m=c.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||b.call(m,f),f._optimisticResults=s?"isRestoring":"optimistic",p3(f),d3(f,l),h3(l);const h=!c.getQueryCache().get(f.queryHash),[g]=_.useState(()=>new a(c,f)),p=g.getOptimisticResult(f),v=!s&&n.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(R=>{const A=v?g.subscribe(Ee.batchCalls(R)):Ve;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),_.useEffect(()=>{g.setOptions(f)},[f,g]),v3(f,p))throw hb(f,g,l);if(m3({result:p,errorResetBoundary:l,throwOnError:f.throwOnError,query:c.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((S=(E=c.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||S.call(E,f,p),f.experimental_prefetchInRender&&!oi&&g3(p,s)){const R=h?hb(f,g,l):(x=c.getQueryCache().get(f.queryHash))==null?void 0:x.promise;R==null||R.catch(Ve).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?p:g.trackResult(p)}function b3(n,a){return y3(n,a3)}function S3(n,a){const r=fx(),[s]=_.useState(()=>new s3(r,n));_.useEffect(()=>{s.setOptions(n)},[s,n]);const l=_.useSyncExternalStore(_.useCallback(f=>s.subscribe(Ee.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=_.useCallback((f,h)=>{s.mutate(f,h).catch(Ve)},[s]);if(l.error&&nx(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function x3(){return T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(Qb,{className:"size-8 animate-spin"})})}function w3({className:n,...a}){const{setAuthenticated:r}=JS(),[s,l]=_.useState(""),[c,f]=_.useState(""),h=km(),{isPending:g,mutate:p}=S3({mutationFn:async()=>h.login(s,c),onError(){nb.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){nb.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?T.jsx(x3,{}):T.jsx("div",{className:Mt("flex flex-col gap-6 w-[20%]",n),...a,children:T.jsxs(aM,{children:[T.jsxs(rM,{children:[T.jsx(iM,{className:"text-2xl",children:"Login"}),T.jsx(sM,{children:"Enter your credentials below to proceed"})]}),T.jsx(oM,{children:T.jsxs("div",{className:"flex flex-col gap-6",children:[T.jsxs("div",{className:"grid gap-2",children:[T.jsx(W0,{htmlFor:"username",children:"Username"}),T.jsx(g0,{id:"username",type:"username",placeholder:"Enter your username",required:!0,value:s,onChange:v=>l(v.target.value)})]}),T.jsxs("div",{className:"grid gap-2",children:[T.jsx("div",{className:"flex items-center",children:T.jsx(W0,{htmlFor:"password",children:"Password"})}),T.jsx(g0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),T.jsx(u1,{type:"button",className:"w-full",onClick:()=>{p()},children:"Login"})]})})]})})}function E3({children:n}){const{authenticated:a,setAuthenticated:r}=JS(),s=km(),{isLoading:l,isError:c}=b3({queryKey:[],enabled:!a,queryFn:async()=>{const f=await s.fetchMe();return r(!!f),f},refetchOnWindowFocus:!0});return l?T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(Qb,{className:"size-8 animate-spin"})}):c?T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching user data."})}):a?T.jsx(T.Fragment,{children:n}):T.jsx("div",{className:"h-screen grid place-items-center",children:T.jsx(w3,{})})}function R3({...n}){return T.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function _3({className:n,...a}){return T.jsx("ol",{"data-slot":"breadcrumb-list",className:Mt("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",n),...a})}function mh({className:n,...a}){return T.jsx("li",{"data-slot":"breadcrumb-item",className:Mt("inline-flex items-center gap-1.5",n),...a})}function mb({asChild:n,className:a,...r}){const s=n?tl:"a";return T.jsx(s,{"data-slot":"breadcrumb-link",className:Mt("hover:text-foreground transition-colors",a),...r})}function T3({className:n,...a}){return T.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Mt("text-foreground font-normal",n),...a})}function pb({children:n,className:a,...r}){return T.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Mt("[&>svg]:size-3.5",a),...r,children:n??T.jsx(n2,{})})}function C3(){const{toggleSidebar:n}=Dm();return T.jsx("header",{className:"bg-background sticky top-0 z-50 flex w-full items-center border-b",children:T.jsxs("div",{className:"flex h-(--header-height) w-full items-center gap-2 px-4",children:[T.jsx(u1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:T.jsx(r2,{})}),T.jsx(N_,{orientation:"vertical",className:"mr-2 h-4"}),T.jsx(R3,{className:"hidden sm:block",children:T.jsxs(_3,{children:[T.jsx(mh,{children:T.jsx(mb,{href:"#",children:"/"})}),T.jsx(pb,{}),T.jsx(mh,{children:T.jsx(T3,{children:"CommandKit"})}),T.jsx(pb,{}),T.jsx(mh,{children:T.jsx(mb,{href:"#",children:"DevTools"})})]})})]})})}var A3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,p=["light","dark"];function v(E){(Array.isArray(n)?n:[n]).forEach(S=>{let x=S==="class",R=x&&c?l.map(A=>c[A]||A):l;x?(g.classList.remove(...R),g.classList.add(c&&c[E]?c[E]:E)):g.setAttribute(S,E)}),m(E)}function m(E){h&&p.includes(E)&&(g.style.colorScheme=E)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let E=localStorage.getItem(a)||r,S=f&&E==="system"?b():E;v(S)}catch{}},gb=["light","dark"],hx="(prefers-color-scheme: dark)",O3=typeof window>"u",Fm=_.createContext(void 0),M3={setTheme:n=>{},themes:[]},D3=()=>{var n;return(n=_.useContext(Fm))!=null?n:M3},N3=n=>_.useContext(Fm)?_.createElement(_.Fragment,null,n.children):_.createElement(L3,{...n}),j3=["light","dark"],L3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=j3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:p,nonce:v,scriptProps:m})=>{let[b,E]=_.useState(()=>U3(l,f)),[S,x]=_.useState(()=>b==="system"?ph():b),R=g?Object.values(g):c,A=_.useCallback(U=>{let K=U;if(!K)return;U==="system"&&r&&(K=ph());let H=g?g[K]:K,M=a?B3(v):null,F=document.documentElement,$=at=>{at==="class"?(F.classList.remove(...R),H&&F.classList.add(H)):at.startsWith("data-")&&(H?F.setAttribute(at,H):F.removeAttribute(at))};if(Array.isArray(h)?h.forEach($):$(h),s){let at=gb.includes(f)?f:null,rt=gb.includes(K)?K:at;F.style.colorScheme=rt}M==null||M()},[v]),z=_.useCallback(U=>{let K=typeof U=="function"?U(b):U;E(K);try{localStorage.setItem(l,K)}catch{}},[b]),N=_.useCallback(U=>{let K=ph(U);x(K),b==="system"&&r&&!n&&A("system")},[b,n]);_.useEffect(()=>{let U=window.matchMedia(hx);return U.addListener(N),N(U),()=>U.removeListener(N)},[N]),_.useEffect(()=>{let U=K=>{K.key===l&&(K.newValue?E(K.newValue):z(f))};return window.addEventListener("storage",U),()=>window.removeEventListener("storage",U)},[z]),_.useEffect(()=>{A(n??b)},[n,b]);let P=_.useMemo(()=>({theme:b,setTheme:z,forcedTheme:n,resolvedTheme:b==="system"?S:b,themes:r?[...c,"system"]:c,systemTheme:r?S:void 0}),[b,z,n,S,r,c]);return _.createElement(Fm.Provider,{value:P},_.createElement(z3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:m}),p)},z3=_.memo(({forcedTheme:n,storageKey:a,attribute:r,enableSystem:s,enableColorScheme:l,defaultTheme:c,value:f,themes:h,nonce:g,scriptProps:p})=>{let v=JSON.stringify([r,a,c,n,h,f,s,l]).slice(1,-1);return _.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${A3.toString()})(${v})`}})}),U3=(n,a)=>{if(O3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},B3=n=>{let a=document.createElement("style");return n&&a.setAttribute("nonce",n),a.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(a),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(a)},1)}},ph=n=>(n||(n=window.matchMedia(hx)),n.matches?"dark":"light");const k3=({...n})=>{const{theme:a="system"}=D3();return T.jsx(HM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},ci=zR({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:P3});function P3(){return T.jsxs(N3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[T.jsx(k3,{}),T.jsx(eM,{children:T.jsx(E3,{children:T.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:T.jsxs($A,{className:"flex flex-col",children:[T.jsx(C3,{}),T.jsxs("div",{className:"flex flex-1",children:[T.jsx(nM,{}),T.jsx(IA,{children:T.jsx(Vb,{})})]})]})})})})]})}const H3="modulepreload",q3=function(n){return"/"+n},vb={},zs=function(a,r,s){let l=Promise.resolve();if(r&&r.length>0){let f=function(p){return Promise.all(p.map(v=>Promise.resolve(v).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),g=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=f(r.map(p=>{if(p=q3(p),p in vb)return;vb[p]=!0;const v=p.endsWith(".css"),m=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":H3,v||(b.as="script"),b.crossOrigin="",b.href=p,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((E,S)=>{b.addEventListener("load",E),b.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return l.then(f=>{for(const h of f||[])h.status==="rejected"&&c(h.reason);return a().catch(c)})},V3=()=>zs(()=>import("./plugins-M_olWZMm.js"),[]),F3=gr("/plugins")({component:Cs(V3,"component")}),G3=()=>zs(()=>import("./guilds-DVvPSU_S.js"),[]),Y3=gr("/guilds")({component:Cs(G3,"component")}),Q3=()=>zs(()=>import("./feature-flags-C0M0v2hb.js"),[]),K3=gr("/feature-flags")({component:Cs(Q3,"component")}),X3=()=>zs(()=>import("./events-C-f860eI.js"),[]),$3=gr("/events")({component:Cs(X3,"component")}),Z3=()=>zs(()=>import("./commands-ATcq2LaP.js"),[]),I3=gr("/commands")({component:Cs(Z3,"component")}),J3=()=>zs(()=>import("./index-h48lariN.js"),[]),W3=gr("/")({component:Cs(J3,"component")}),tD=F3.update({id:"/plugins",path:"/plugins",getParentRoute:()=>ci}),eD=Y3.update({id:"/guilds",path:"/guilds",getParentRoute:()=>ci}),nD=K3.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>ci}),aD=$3.update({id:"/events",path:"/events",getParentRoute:()=>ci}),rD=I3.update({id:"/commands",path:"/commands",getParentRoute:()=>ci}),iD=W3.update({id:"/",path:"/",getParentRoute:()=>ci}),sD={IndexRoute:iD,CommandsRoute:rD,EventsRoute:aD,FeatureFlagsRoute:nD,GuildsRoute:eD,PluginsRoute:tD},oD=ci._addFileChildren(sD)._addFileTypes(),lD=YR({routeTree:oD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),uD=new n3;jE.createRoot(document.getElementById("root")).render(T.jsx(_.StrictMode,{children:T.jsx(o3,{client:uD,children:T.jsx(XR,{router:lD})})}));export{pO as A,bO as B,aM as C,x3 as L,b3 as a,rM as b,gO as c,vO as d,oM as e,iM as f,Ab as g,sM as h,br as i,T as j,n2 as k,zD as l,Ts as m,u1 as n,_ as r,km as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as c,u as h,j as e,B as s,C as a,b as t,f as r,e as l,l as x,h as m,m as n,n as i}from"./index-
|
|
1
|
+
import{i as c,u as h,j as e,B as s,C as a,b as t,f as r,e as l,l as x,h as m,m as n,n as i}from"./index-B-bnrkjI.js";/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as X,u as tt,a as et,j as y,L as nt,B as rt}from"./index-
|
|
1
|
+
import{g as X,u as tt,a as et,j as y,L as nt,B as rt}from"./index-B-bnrkjI.js";var U={exports:{}},st=U.exports,V;function it(){return V||(V=1,function(L,C){(function(_,D){L.exports=D()})(st,function(){var _=1e3,D=6e4,A=36e5,g="millisecond",O="second",b="minute",j="hour",p="day",W="week",m="month",J="quarter",v="year",Y="date",Z="Invalid Date",P=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Q=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,K={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},q=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},G={s:q,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+q(r,2,"0")+":"+q(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,m),i=t-e<0,a=n.clone().add(r+(i?-1:1),m);return+(-(r+(t-e)/(i?e-a:a-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y:v,w:W,d:p,D:Y,h:j,m:b,s:O,ms:g,Q:J}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},H="en",x={};x[H]=K;var z="$isDayjsObject",R=function(s){return s instanceof E||!(!s||!s[z])},F=function s(n,t,r){var e;if(!n)return H;if(typeof n=="string"){var i=n.toLowerCase();x[i]&&(e=i),t&&(x[i]=t,e=i);var a=n.split("-");if(!e&&a.length>1)return s(a[0])}else{var o=n.name;x[o]=n,e=o}return!r&&e&&(H=e),e||!r&&H},f=function(s,n){if(R(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new E(t)},u=G;u.l=F,u.i=R,u.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var E=function(){function s(t){this.$L=F(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[z]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(u.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var a=e.match(P);if(a){var o=a[2]-1||0,c=(a[7]||"0").substring(0,3);return i?new Date(Date.UTC(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)):new Date(a[1],o,a[3]||1,a[4]||0,a[5]||0,a[6]||0,c)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return u},n.isValid=function(){return this.$d.toString()!==Z},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<f(t)},n.$g=function(t,r,e){return u.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!u.u(r)||r,a=u.p(t),o=function(w,l){var M=u.w(e.$u?Date.UTC(e.$y,l,w):new Date(e.$y,l,w),e);return i?M:M.endOf(p)},c=function(w,l){return u.w(e.toDate()[w].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(l)),e)},d=this.$W,h=this.$M,$=this.$D,k="set"+(this.$u?"UTC":"");switch(a){case v:return i?o(1,0):o(31,11);case m:return i?o(1,h):o(0,h+1);case W:var S=this.$locale().weekStart||0,N=(d<S?d+7:d)-S;return o(i?$-N:$+(6-N),h);case p:case Y:return c(k+"Hours",0);case j:return c(k+"Minutes",1);case b:return c(k+"Seconds",2);case O:return c(k+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=u.p(t),a="set"+(this.$u?"UTC":""),o=(e={},e[p]=a+"Date",e[Y]=a+"Date",e[m]=a+"Month",e[v]=a+"FullYear",e[j]=a+"Hours",e[b]=a+"Minutes",e[O]=a+"Seconds",e[g]=a+"Milliseconds",e)[i],c=i===p?this.$D+(r-this.$W):r;if(i===m||i===v){var d=this.clone().set(Y,1);d.$d[o](c),d.init(),this.$d=d.set(Y,Math.min(this.$D,d.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[u.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var a=u.p(r),o=function(h){var $=f(i);return u.w($.date($.date()+Math.round(h*t)),i)};if(a===m)return this.set(m,this.$M+t);if(a===v)return this.set(v,this.$y+t);if(a===p)return o(1);if(a===W)return o(7);var c=(e={},e[b]=D,e[j]=A,e[O]=_,e)[a]||1,d=this.$d.getTime()+t*c;return u.w(d,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||Z;var i=t||"YYYY-MM-DDTHH:mm:ssZ",a=u.z(this),o=this.$H,c=this.$m,d=this.$M,h=e.weekdays,$=e.months,k=e.meridiem,S=function(l,M,T,I){return l&&(l[M]||l(r,i))||T[M].slice(0,I)},N=function(l){return u.s(o%12||12,l,"0")},w=k||function(l,M,T){var I=l<12?"AM":"PM";return T?I.toLowerCase():I};return i.replace(Q,function(l,M){return M||function(T){switch(T){case"YY":return String(r.$y).slice(-2);case"YYYY":return u.s(r.$y,4,"0");case"M":return d+1;case"MM":return u.s(d+1,2,"0");case"MMM":return S(e.monthsShort,d,$,3);case"MMMM":return S($,d);case"D":return r.$D;case"DD":return u.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return S(e.weekdaysMin,r.$W,h,2);case"ddd":return S(e.weekdaysShort,r.$W,h,3);case"dddd":return h[r.$W];case"H":return String(o);case"HH":return u.s(o,2,"0");case"h":return N(1);case"hh":return N(2);case"a":return w(o,c,!0);case"A":return w(o,c,!1);case"m":return String(c);case"mm":return u.s(c,2,"0");case"s":return String(r.$s);case"ss":return u.s(r.$s,2,"0");case"SSS":return u.s(r.$ms,3,"0");case"Z":return a}return null}(l)||a.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,a=this,o=u.p(r),c=f(t),d=(c.utcOffset()-this.utcOffset())*D,h=this-c,$=function(){return u.m(a,c)};switch(o){case v:i=$()/12;break;case m:i=$();break;case J:i=$()/3;break;case W:i=(h-d)/6048e5;break;case p:i=(h-d)/864e5;break;case j:i=h/A;break;case b:i=h/D;break;case O:i=h/_;break;default:i=h}return e?i:u.a(i)},n.daysInMonth=function(){return this.endOf(m).$D},n.$locale=function(){return x[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=F(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return u.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s}(),B=E.prototype;return f.prototype=B,[["$ms",g],["$s",O],["$m",b],["$H",j],["$W",p],["$M",m],["$y",v],["$D",Y]].forEach(function(s){B[s[1]]=function(n){return this.$g(n,s[0],s[1])}}),f.extend=function(s,n){return s.$i||(s(n,E,f),s.$i=!0),f},f.locale=F,f.isDayjs=R,f.unix=function(s){return f(1e3*s)},f.en=x[H],f.Ls=x,f.p={},f})}(U)),U.exports}var at=it();const ut=X(at),ot="YYYY-MM-DD HH:mm:ss";function ct(L,C=ot){return ut(L).format(C)}const dt=function(){const C=tt(),{data:_,isLoading:D,isError:A}=et({queryKey:["plugins"],queryFn:async()=>await C.plugins.fetch()});return D||!_?y.jsx(nt,{}):A?y.jsx("div",{className:"h-screen grid place-items-center",children:y.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching plugins data."})}):y.jsxs("div",{className:"p-4",children:[y.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Plugins"}),y.jsx("div",{className:"grid grid-cols-3 gap-4 py-4",children:_.map(g=>y.jsxs("div",{className:"border p-4 rounded",children:[y.jsx("h2",{className:"text-lg font-semibold",children:g.name}),y.jsx(rt,{variant:"outline",className:"text-sm text-gray-500 mt-2 font-mono",children:g.id}),y.jsxs("p",{className:"text-muted-foreground text-xs mt-2 font-medium",children:["Registered at ",ct(g.loadedAt)]})]},g.id))})]})};export{dt as component};
|
package/ui/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<style>
|
|
12
12
|
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-B-bnrkjI.js"></script>
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-D4m_49dy.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|