@commandkit/devtools 0.0.0-dev.20250715125556 → 0.0.0-dev.20250716021102
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-Bh8voic5.js → commands-CjiilQm0.js} +1 -1
- package/ui/assets/{events-DKI4ARJl.js → events-KulS_s3p.js} +1 -1
- package/ui/assets/{feature-flags--OWGxogL.js → feature-flags-aoUi_pnz.js} +1 -1
- package/ui/assets/{guilds-BKe1-8Zw.js → guilds-DhkTpEDq.js} +1 -1
- package/ui/assets/{index-D4rH4URo.js → index-BG6A6wjb.js} +1 -1
- package/ui/assets/{index-DU6pOU2O.js → index-O-pLm2wg.js} +3 -3
- package/ui/assets/{plugins-DCTN3SQ4.js → plugins-CErjVBuO.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.20250716021102",
|
|
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
|
-
"commandkit": "1.0.0-dev.
|
|
14
|
-
"tsconfig": "0.0.0-dev.
|
|
13
|
+
"commandkit": "1.0.0-dev.20250716021102",
|
|
14
|
+
"tsconfig": "0.0.0-dev.20250716021102"
|
|
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-O-pLm2wg.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-O-pLm2wg.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-O-pLm2wg.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-O-pLm2wg.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};
|
|
@@ -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-O-pLm2wg.js";/**
|
|
2
2
|
* @license lucide-react v0.525.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -62,8 +62,8 @@ 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 $y;function SR(){if($y)return Fd;$y=1;var n=Jo(),a=zb();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 Fd.useSyncExternalStoreWithSelector=function(p,v,m,b,w){var x=c(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=h(function(){function A(K){if(!L){if(L=!0,N=K,K=b(K),w!==void 0&&S.hasValue){var q=S.value;if(w(q,K))return B=q}return B=K}if(q=B,s(N,K))return q;var P=b(K);return w!==void 0&&w(q,P)?(N=K,q):(N=K,B=P)}var L=!1,N,B,z=m===void 0?null:m;return[function(){return A(v())},z===null?void 0:function(){return A(z())}]},[v,m,b,w]);var R=l(p,x[0],x[1]);return f(function(){S.hasValue=!0,S.value=R},[R]),g(R),R},Fd}var Zy;function xR(){return Zy||(Zy=1,Yd.exports=SR()),Yd.exports}var wR=xR();function ER(n,a=r=>r){return wR.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,a,RR)}function RR(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=T.createContext(null);function Ub(){return typeof document>"u"?Xd:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xd,Xd)}function zn(n){const a=T.useContext(Ub());return n==null||n.warn,a}function Xe(n){const a=zn({warn:(n==null?void 0:n.router)===void 0}),r=(n==null?void 0:n.router)||a,s=T.useRef(void 0);return ER(r.__store,l=>{if(n!=null&&n.select){if(n.structuralSharing??r.options.defaultStructuralSharing){const c=yn(s.current,n.select(l));return s.current=c,c}return n.select(l)}return l})}const oc=T.createContext(void 0),TR=T.createContext(void 0);function En(n){const a=T.useContext(n.from?TR:oc);return Xe({select:s=>{const l=s.matches.find(c=>n.from?n.from===c.routeId:c.id===a);if(Ta(!((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 em(n){return En({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.loaderData):a.loaderData})}function nm(n){const{select:a,...r}=n;return En({...r,select:s=>a?a(s.loaderDeps):s.loaderDeps})}function am(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 rm(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 im(n){const{navigate:a,state:r}=zn(),s=En({strict:!1,select:l=>l.index});return T.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=Ab();const Bb=_b(lc),ko=typeof window<"u"?T.useLayoutEffect:T.useEffect;function $d(n){const a=T.useRef({value:n,prev:null}),r=a.current.value;return n!==r&&(a.current={value:n,prev:r}),a.current.prev}function _R(n,a,r={},s={}){const l=T.useRef(typeof IntersectionObserver=="function"),c=T.useRef(null);return T.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 CR(n){const a=T.useRef(null);return T.useImperativeHandle(n,()=>a.current,[]),a}function AR(n,a){const r=zn(),[s,l]=T.useState(!1),c=T.useRef(!1),f=CR(a),{activeProps:h=()=>({className:"active"}),inactiveProps:g=()=>({}),activeOptions:p,to:v,preload:m,preloadDelay:b,hashScrollIntoView:w,replace:x,startTransition:S,resetScroll:R,viewTransition:A,children:L,target:N,disabled:B,style:z,className:K,onClick:q,onFocus:P,onMouseEnter:et,onMouseLeave:Z,onTouchStart:st,ignoreBlocker:rt,...lt}=n,{params:gt,search:ut,hash:M,state:X,mask:k,reloadDocument:ot,unsafeRelative:C,...G}=lt,tt=T.useMemo(()=>{try{return new URL(`${v}`),"external"}catch{}return"internal"},[v]),$=Xe({select:Ct=>Ct.location.search,structuralSharing:!0}),at=En({strict:!1,select:Ct=>Ct.fullPath}),ft=n.from??at;n={...n,from:ft};const nt=T.useMemo(()=>r.buildLocation(n),[r,n,$]),pt=T.useMemo(()=>n.reloadDocument?!1:m??r.options.defaultPreload,[r.options.defaultPreload,m,n.reloadDocument]),yt=b??r.options.defaultPreloadDelay??0,Et=Xe({select:Ct=>{if(p!=null&&p.exact){if(!HE(Ct.location.pathname,nt.pathname,r.basepath))return!1}else{const Yt=Gu(Ct.location.pathname,r.basepath).split("/");if(!Gu(nt.pathname,r.basepath).split("/").every((ln,_e)=>ln===Yt[_e]))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}}),_t=T.useCallback(()=>{r.preloadRoute(n).catch(Ct=>{console.warn(Ct),console.warn(hR)})},[n,r]),It=T.useCallback(Ct=>{Ct!=null&&Ct.isIntersecting&&_t()},[_t]);if(_R(f,It,{rootMargin:"100px"},{disabled:!!B||pt!=="viewport"}),ko(()=>{c.current||!B&&pt==="render"&&(_t(),c.current=!0)},[B,_t,pt]),tt==="external")return{...G,ref:f,type:tt,href:v,...L&&{children:L},...N&&{target:N},...B&&{disabled:B},...z&&{style:z},...K&&{className:K},...q&&{onClick:q},...P&&{onFocus:P},...et&&{onMouseEnter:et},...Z&&{onMouseLeave:Z},...st&&{onTouchStart:st}};const Gt=Ct=>{if(!B&&!OR(Ct)&&!Ct.defaultPrevented&&(!N||N==="_self")&&Ct.button===0){Ct.preventDefault(),lc.flushSync(()=>{l(!0)});const Yt=r.subscribe("onResolved",()=>{Yt(),l(!1)});return r.navigate({...n,replace:x,resetScroll:R,hashScrollIntoView:w,startTransition:S,viewTransition:A,ignoreBlocker:rt})}},pe=Ct=>{B||pt&&_t()},on=pe,br=Ct=>{if(B)return;const Yt=Ct.target||{};if(pt){if(Yt.preloadTimeout)return;yt?Yt.preloadTimeout=setTimeout(()=>{Yt.preloadTimeout=null,_t()},yt):_t()}},Aa=Ct=>{if(B)return;const Yt=Ct.target||{};Yt.preloadTimeout&&(clearTimeout(Yt.preloadTimeout),Yt.preloadTimeout=null)},Jt=Ct=>Yt=>{var xr;(xr=Yt.persist)==null||xr.call(Yt),Ct.filter(Boolean).forEach(ci=>{Yt.defaultPrevented||ci(Yt)})},kn=Et?Wr(h,{})??{}:{},ie=Et?{}:Wr(g,{}),Sr=[K,kn.className,ie.className].filter(Boolean).join(" "),ea={...z,...kn.style,...ie.style};return{...G,...kn,...ie,href:B?void 0:nt.maskedLocation?r.history.createHref(nt.maskedLocation.href):r.history.createHref(nt.href),ref:f,onClick:Jt([q,Gt]),onFocus:Jt([P,pe]),onMouseEnter:Jt([et,br]),onMouseLeave:Jt([Z,Aa]),onTouchStart:Jt([st,on]),disabled:!!B,target:N,...Object.keys(ea).length&&{style:ea},...Sr&&{className:Sr},...B&&{role:"link","aria-disabled":!0},...Et&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const _s=T.forwardRef((n,a)=>{const{_asChild:r,...s}=n,{type:l,ref:c,...f}=AR(s,a),h=typeof s.children=="function"?s.children({isActive:f["data-status"]==="active"}):s.children;return typeof r>"u"&&delete f.disabled,T.createElement(r||"a",{...f,ref:c},h)});function OR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}let MR=class extends Lb{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>nm({...r,from:this.id}),this.useLoaderData=r=>em({...r,from:this.id}),this.useNavigate=()=>im({from:this.fullPath}),this.Link=it.forwardRef((r,s)=>_.jsx(_s,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function DR(n){return new MR(n)}class NR extends mR{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>nm({...r,from:this.id}),this.useLoaderData=r=>em({...r,from:this.id}),this.useNavigate=()=>im({from:this.fullPath}),this.Link=it.forwardRef((r,s)=>_.jsx(_s,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function jR(n){return new NR(n)}function pr(n){return typeof n=="object"?new Iy(n,{silent:!0}).createRoute(n):new Iy(n,{silent:!0}).createRoute}class Iy{constructor(a,r){this.path=a,this.createRoute=s=>{this.silent;const l=DR(s);return l.isRoot=!1,l},this.silent=r==null?void 0:r.silent}}class Jy{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>nm({...r,from:this.options.id}),this.useLoaderData=r=>em({...r,from:this.options.id}),this.useNavigate=()=>{const r=zn();return im({from:r.routesById[this.options.id].fullPath})},this.options=a,this.$$typeof=Symbol.for("react.memo")}}function Wy(n){return typeof n=="object"?new Jy(n):a=>new Jy({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,PE(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 T.createElement(s,p)};return h.preload=f,h}function LR(){const n=zn(),a=T.useRef({router:n,mounted:!1}),[r,s]=T.useState(!1),{hasPendingMatches:l,isLoading:c}=Xe({select:m=>({isLoading:m.isLoading,hasPendingMatches:m.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),f=$d(c),h=c||r||l,g=$d(h),p=c||l,v=$d(p);return n.isServer||(n.startTransition=m=>{s(!0),T.startTransition(()=>{m(),s(!1)})}),T.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.ssr||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&&!c&&n.emit({type:"onLoad",...ti(n.state)})},[f,n,c]),ko(()=>{v&&!p&&n.emit({type:"onBeforeRouteMount",...ti(n.state)})},[p,v,n]),ko(()=>{g&&!h&&(n.emit({type:"onResolved",...ti(n.state)}),n.__store.setState(m=>({...m,status:"idle",resolvedLocation:m.location})),WE(n))},[h,g,n]),null}function zR(n){const a=Xe({select:r=>`not-found-${r.location.pathname}-${r.status}`});return _.jsx(tm,{getResetKey:()=>a,onCatch:(r,s)=>{var l;if(Sn(r))(l=n.onCatch)==null||l.call(n,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Sn(r))return(s=n.fallback)==null?void 0:s.call(n,r);throw r},children:n.children})}function UR(){return _.jsx("p",{children:"Not Found"})}function rs(n){return _.jsx(_.Fragment,{children:n.children})}function kb(n,a,r){return a.options.notFoundComponent?_.jsx(a.options.notFoundComponent,{data:r}):n.options.defaultNotFoundComponent?_.jsx(n.options.defaultNotFoundComponent,{data:r}):_.jsx(UR,{})}function BR({children:n}){return typeof document<"u"?null:_.jsx("script",{className:"$tsr",dangerouslySetInnerHTML:{__html:[n].filter(Boolean).join(`
|
|
66
|
-
`)}})}function kR(){const n=zn(),r=(n.options.getScrollRestorationKey||Sh)(n.latestLocation),s=r!==Sh(n.latestLocation)?r:null;return!n.isScrollRestoring||!n.isServer?null:_.jsx(BR,{children:`(${Nb.toString()})(${JSON.stringify(Fu)},${JSON.stringify(s)}, undefined, true)`})}const Pb=T.memo(function({matchId:a}){var r,s;const l=zn(),c=Xe({select:N=>{const B=N.matches.find(z=>z.id===a);return Ta(B),Vu(B,["routeId","ssr","_displayPending"])},structuralSharing:!0}),f=l.routesById[c.routeId],h=f.options.pendingComponent??l.options.defaultPendingComponent,g=h?_.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",w=(!f.isRoot||f.options.wrapInSuspense||b)&&(f.options.wrapInSuspense??h??(((s=f.options.errorComponent)==null?void 0:s.preload)||b))?T.Suspense:rs,x=p?tm:rs,S=m?zR:rs,R=Xe({select:N=>N.loadedAt}),A=Xe({select:N=>{var B;const z=N.matches.findIndex(K=>K.id===a);return(B=N.matches[z-1])==null?void 0:B.routeId}}),L=f.isRoot?f.options.shellComponent??rs:rs;return _.jsxs(L,{children:[_.jsx(oc.Provider,{value:a,children:_.jsx(w,{fallback:g,children:_.jsx(x,{getResetKey:()=>R,errorComponent:p||sc,onCatch:(N,B)=>{if(Sn(N))throw N;v==null||v(N,B)},children:_.jsx(S,{fallback:N=>{if(!m||N.routeId&&N.routeId!==c.routeId||!N.routeId&&!f.isRoot)throw N;return T.createElement(m,N)},children:b||c._displayPending?_.jsx(gR,{fallback:g,children:_.jsx(t0,{matchId:a})}):_.jsx(t0,{matchId:a})})})})}),A===xn&&l.options.scrollRestoration?_.jsxs(_.Fragment,{children:[_.jsx(PR,{}),_.jsx(kR,{})]}):null]})});function PR(){const n=zn(),a=T.useRef(void 0);return _.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(a.current===void 0||a.current.href!==n.latestLocation.href)&&(n.emit({type:"onRendered",...ti(n.state)}),a.current=n.latestLocation)}},n.latestLocation.state.__TSR_key)}const t0=T.memo(function({matchId:a}){var r,s,l,c,f;const h=zn(),{match:g,key:p,routeId:v}=Xe({select:w=>{const x=w.matches.findIndex(B=>B.id===a),S=w.matches[x],R=S.routeId,A=h.routesById[R].options.remountDeps??h.options.defaultRemountDeps,L=A==null?void 0:A({routeId:R,loaderDeps:S.loaderDeps,params:S._strictParams,search:S._strictSearch});return{key:L?JSON.stringify(L):void 0,routeId:R,match:Vu(S,["id","status","error","_forcePending","_displayPending"])}},structuralSharing:!0}),m=h.routesById[v],b=T.useMemo(()=>{const w=m.options.component??h.options.defaultComponent;return w?_.jsx(w,{},p):_.jsx(Hb,{})},[p,m.options.component,h.options.defaultComponent]);if(g._displayPending)throw(r=h.getMatch(g.id))==null?void 0:r.displayPendingPromise;if(g._forcePending)throw(s=h.getMatch(g.id))==null?void 0:s.minPendingPromise;if(g.status==="pending"){const w=m.options.pendingMinMs??h.options.defaultPendingMinMs;if(w&&!((l=h.getMatch(g.id))!=null&&l.minPendingPromise)&&!h.isServer){const x=as();Promise.resolve().then(()=>{h.updateMatch(g.id,S=>({...S,minPendingPromise:x}))}),setTimeout(()=>{x.resolve(),h.updateMatch(g.id,S=>({...S,minPendingPromise:void 0}))},w)}throw(c=h.getMatch(g.id))==null?void 0:c.loadPromise}if(g.status==="notFound")return Ta(Sn(g.error)),kb(h,m,g.error);if(g.status==="redirected")throw Ta(Kn(g.error)),(f=h.getMatch(g.id))==null?void 0:f.loadPromise;if(g.status==="error"){if(h.isServer){const w=(m.options.errorComponent??h.options.defaultErrorComponent)||sc;return _.jsx(w,{error:g.error,reset:void 0,info:{componentStack:""}})}throw g.error}return b}),Hb=T.memo(function(){const a=zn(),r=T.useContext(oc),s=Xe({select:p=>{var v;return(v=p.matches.find(m=>m.id===r))==null?void 0:v.routeId}}),l=a.routesById[s],c=Xe({select:p=>{const m=p.matches.find(b=>b.id===r);return Ta(m),m.globalNotFound}}),f=Xe({select:p=>{var v;const m=p.matches,b=m.findIndex(w=>w.id===r);return(v=m[b+1])==null?void 0:v.id}}),h=a.options.defaultPendingComponent?_.jsx(a.options.defaultPendingComponent,{}):null;if(c)return kb(a,l,void 0);if(!f)return null;const g=_.jsx(Pb,{matchId:f});return r===xn?_.jsx(T.Suspense,{fallback:h,children:g}):g});function HR(){const n=zn(),a=n.options.defaultPendingComponent?_.jsx(n.options.defaultPendingComponent,{}):null,r=n.isServer||typeof document<"u"&&n.ssr?rs:T.Suspense,s=_.jsxs(r,{fallback:a,children:[_.jsx(LR,{}),_.jsx(qR,{})]});return n.options.InnerWrap?_.jsx(n.options.InnerWrap,{children:s}):s}function qR(){const n=Xe({select:r=>{var s;return(s=r.matches[0])==null?void 0:s.id}}),a=Xe({select:r=>r.loadedAt});return _.jsx(oc.Provider,{value:n,children:_.jsx(tm,{getResetKey:()=>a,errorComponent:sc,onCatch:r=>{r.message||r.toString()},children:n?_.jsx(Pb,{matchId:n}):null})})}const VR=n=>new GR(n);class GR extends oR{constructor(a){super(a)}}typeof globalThis<"u"?(globalThis.createFileRoute=pr,globalThis.createLazyFileRoute=Wy):typeof window<"u"&&(window.createFileRoute=pr,window.createFileRoute=Wy);function YR({router:n,children:a,...r}){Object.keys(r).length>0&&n.update({...n.options,...r,context:{...n.options.context,...r.context}});const s=Ub(),l=_.jsx(s.Provider,{value:n,children:a});return n.options.Wrap?_.jsx(n.options.Wrap,{children:l}):l}function FR({router:n,...a}){return _.jsx(YR,{router:n,...a,children:_.jsx(HR,{})})}/**
|
|
65
|
+
*/var $y;function SR(){if($y)return Fd;$y=1;var n=Jo(),a=zb();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 Fd.useSyncExternalStoreWithSelector=function(p,v,m,b,w){var x=c(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=h(function(){function A(K){if(!L){if(L=!0,N=K,K=b(K),w!==void 0&&S.hasValue){var q=S.value;if(w(q,K))return B=q}return B=K}if(q=B,s(N,K))return q;var P=b(K);return w!==void 0&&w(q,P)?(N=K,q):(N=K,B=P)}var L=!1,N,B,z=m===void 0?null:m;return[function(){return A(v())},z===null?void 0:function(){return A(z())}]},[v,m,b,w]);var R=l(p,x[0],x[1]);return f(function(){S.hasValue=!0,S.value=R},[R]),g(R),R},Fd}var Zy;function xR(){return Zy||(Zy=1,Yd.exports=SR()),Yd.exports}var wR=xR();function ER(n,a=r=>r){return wR.useSyncExternalStoreWithSelector(n.subscribe,()=>n.state,()=>n.state,a,RR)}function RR(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=T.createContext(null);function Ub(){return typeof document>"u"?Xd:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xd,Xd)}function zn(n){const a=T.useContext(Ub());return n==null||n.warn,a}function Xe(n){const a=zn({warn:(n==null?void 0:n.router)===void 0}),r=(n==null?void 0:n.router)||a,s=T.useRef(void 0);return ER(r.__store,l=>{if(n!=null&&n.select){if(n.structuralSharing??r.options.defaultStructuralSharing){const c=yn(s.current,n.select(l));return s.current=c,c}return n.select(l)}return l})}const oc=T.createContext(void 0),TR=T.createContext(void 0);function En(n){const a=T.useContext(n.from?TR:oc);return Xe({select:s=>{const l=s.matches.find(c=>n.from?n.from===c.routeId:c.id===a);if(Ta(!((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 em(n){return En({from:n.from,strict:n.strict,structuralSharing:n.structuralSharing,select:a=>n.select?n.select(a.loaderData):a.loaderData})}function nm(n){const{select:a,...r}=n;return En({...r,select:s=>a?a(s.loaderDeps):s.loaderDeps})}function am(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 rm(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 im(n){const{navigate:a,state:r}=zn(),s=En({strict:!1,select:l=>l.index});return T.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=Ab();const Bb=_b(lc),ko=typeof window<"u"?T.useLayoutEffect:T.useEffect;function $d(n){const a=T.useRef({value:n,prev:null}),r=a.current.value;return n!==r&&(a.current={value:n,prev:r}),a.current.prev}function _R(n,a,r={},s={}){const l=T.useRef(typeof IntersectionObserver=="function"),c=T.useRef(null);return T.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 CR(n){const a=T.useRef(null);return T.useImperativeHandle(n,()=>a.current,[]),a}function AR(n,a){const r=zn(),[s,l]=T.useState(!1),c=T.useRef(!1),f=CR(a),{activeProps:h=()=>({className:"active"}),inactiveProps:g=()=>({}),activeOptions:p,to:v,preload:m,preloadDelay:b,hashScrollIntoView:w,replace:x,startTransition:S,resetScroll:R,viewTransition:A,children:L,target:N,disabled:B,style:z,className:K,onClick:q,onFocus:P,onMouseEnter:et,onMouseLeave:Z,onTouchStart:st,ignoreBlocker:rt,...lt}=n,{params:gt,search:ut,hash:M,state:X,mask:k,reloadDocument:ot,unsafeRelative:C,...G}=lt,tt=T.useMemo(()=>{try{return new URL(`${v}`),"external"}catch{}return"internal"},[v]),$=Xe({select:Ct=>Ct.location.search,structuralSharing:!0}),at=En({strict:!1,select:Ct=>Ct.fullPath}),ft=n.from??at;n={...n,from:ft};const nt=T.useMemo(()=>r.buildLocation(n),[r,n,$]),pt=T.useMemo(()=>n.reloadDocument?!1:m??r.options.defaultPreload,[r.options.defaultPreload,m,n.reloadDocument]),yt=b??r.options.defaultPreloadDelay??0,Et=Xe({select:Ct=>{if(p!=null&&p.exact){if(!HE(Ct.location.pathname,nt.pathname,r.basepath))return!1}else{const Yt=Gu(Ct.location.pathname,r.basepath).split("/");if(!Gu(nt.pathname,r.basepath).split("/").every((ln,_e)=>ln===Yt[_e]))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}}),_t=T.useCallback(()=>{r.preloadRoute(n).catch(Ct=>{console.warn(Ct),console.warn(hR)})},[n,r]),It=T.useCallback(Ct=>{Ct!=null&&Ct.isIntersecting&&_t()},[_t]);if(_R(f,It,{rootMargin:"100px"},{disabled:!!B||pt!=="viewport"}),ko(()=>{c.current||!B&&pt==="render"&&(_t(),c.current=!0)},[B,_t,pt]),tt==="external")return{...G,ref:f,type:tt,href:v,...L&&{children:L},...N&&{target:N},...B&&{disabled:B},...z&&{style:z},...K&&{className:K},...q&&{onClick:q},...P&&{onFocus:P},...et&&{onMouseEnter:et},...Z&&{onMouseLeave:Z},...st&&{onTouchStart:st}};const Gt=Ct=>{if(!B&&!OR(Ct)&&!Ct.defaultPrevented&&(!N||N==="_self")&&Ct.button===0){Ct.preventDefault(),lc.flushSync(()=>{l(!0)});const Yt=r.subscribe("onResolved",()=>{Yt(),l(!1)});return r.navigate({...n,replace:x,resetScroll:R,hashScrollIntoView:w,startTransition:S,viewTransition:A,ignoreBlocker:rt})}},pe=Ct=>{B||pt&&_t()},on=pe,br=Ct=>{if(B)return;const Yt=Ct.target||{};if(pt){if(Yt.preloadTimeout)return;yt?Yt.preloadTimeout=setTimeout(()=>{Yt.preloadTimeout=null,_t()},yt):_t()}},Aa=Ct=>{if(B)return;const Yt=Ct.target||{};Yt.preloadTimeout&&(clearTimeout(Yt.preloadTimeout),Yt.preloadTimeout=null)},Jt=Ct=>Yt=>{var xr;(xr=Yt.persist)==null||xr.call(Yt),Ct.filter(Boolean).forEach(ci=>{Yt.defaultPrevented||ci(Yt)})},kn=Et?Wr(h,{})??{}:{},ie=Et?{}:Wr(g,{}),Sr=[K,kn.className,ie.className].filter(Boolean).join(" "),ea={...z,...kn.style,...ie.style};return{...G,...kn,...ie,href:B?void 0:nt.maskedLocation?r.history.createHref(nt.maskedLocation.href):r.history.createHref(nt.href),ref:f,onClick:Jt([q,Gt]),onFocus:Jt([P,pe]),onMouseEnter:Jt([et,br]),onMouseLeave:Jt([Z,Aa]),onTouchStart:Jt([st,on]),disabled:!!B,target:N,...Object.keys(ea).length&&{style:ea},...Sr&&{className:Sr},...B&&{role:"link","aria-disabled":!0},...Et&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const _s=T.forwardRef((n,a)=>{const{_asChild:r,...s}=n,{type:l,ref:c,...f}=AR(s,a),h=typeof s.children=="function"?s.children({isActive:f["data-status"]==="active"}):s.children;return typeof r>"u"&&delete f.disabled,T.createElement(r||"a",{...f,ref:c},h)});function OR(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}let MR=class extends Lb{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>nm({...r,from:this.id}),this.useLoaderData=r=>em({...r,from:this.id}),this.useNavigate=()=>im({from:this.fullPath}),this.Link=it.forwardRef((r,s)=>_.jsx(_s,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function DR(n){return new MR(n)}class NR extends mR{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>nm({...r,from:this.id}),this.useLoaderData=r=>em({...r,from:this.id}),this.useNavigate=()=>im({from:this.fullPath}),this.Link=it.forwardRef((r,s)=>_.jsx(_s,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function jR(n){return new NR(n)}function pr(n){return typeof n=="object"?new Iy(n,{silent:!0}).createRoute(n):new Iy(n,{silent:!0}).createRoute}class Iy{constructor(a,r){this.path=a,this.createRoute=s=>{this.silent;const l=DR(s);return l.isRoot=!1,l},this.silent=r==null?void 0:r.silent}}class Jy{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=>rm({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useParams=r=>am({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>nm({...r,from:this.options.id}),this.useLoaderData=r=>em({...r,from:this.options.id}),this.useNavigate=()=>{const r=zn();return im({from:r.routesById[this.options.id].fullPath})},this.options=a,this.$$typeof=Symbol.for("react.memo")}}function Wy(n){return typeof n=="object"?new Jy(n):a=>new Jy({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,PE(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 T.createElement(s,p)};return h.preload=f,h}function LR(){const n=zn(),a=T.useRef({router:n,mounted:!1}),[r,s]=T.useState(!1),{hasPendingMatches:l,isLoading:c}=Xe({select:m=>({isLoading:m.isLoading,hasPendingMatches:m.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),f=$d(c),h=c||r||l,g=$d(h),p=c||l,v=$d(p);return n.startTransition=m=>{s(!0),T.startTransition(()=>{m(),s(!1)})},T.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.ssr||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&&!c&&n.emit({type:"onLoad",...ti(n.state)})},[f,n,c]),ko(()=>{v&&!p&&n.emit({type:"onBeforeRouteMount",...ti(n.state)})},[p,v,n]),ko(()=>{g&&!h&&(n.emit({type:"onResolved",...ti(n.state)}),n.__store.setState(m=>({...m,status:"idle",resolvedLocation:m.location})),WE(n))},[h,g,n]),null}function zR(n){const a=Xe({select:r=>`not-found-${r.location.pathname}-${r.status}`});return _.jsx(tm,{getResetKey:()=>a,onCatch:(r,s)=>{var l;if(Sn(r))(l=n.onCatch)==null||l.call(n,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Sn(r))return(s=n.fallback)==null?void 0:s.call(n,r);throw r},children:n.children})}function UR(){return _.jsx("p",{children:"Not Found"})}function rs(n){return _.jsx(_.Fragment,{children:n.children})}function kb(n,a,r){return a.options.notFoundComponent?_.jsx(a.options.notFoundComponent,{data:r}):n.options.defaultNotFoundComponent?_.jsx(n.options.defaultNotFoundComponent,{data:r}):_.jsx(UR,{})}function BR({children:n}){return typeof document<"u"?null:_.jsx("script",{className:"$tsr",dangerouslySetInnerHTML:{__html:[n].filter(Boolean).join(`
|
|
66
|
+
`)}})}function kR(){const n=zn(),r=(n.options.getScrollRestorationKey||Sh)(n.latestLocation),s=r!==Sh(n.latestLocation)?r:null;return!n.isScrollRestoring||!n.isServer?null:_.jsx(BR,{children:`(${Nb.toString()})(${JSON.stringify(Fu)},${JSON.stringify(s)}, undefined, true)`})}const Pb=T.memo(function({matchId:a}){var r,s;const l=zn(),c=Xe({select:N=>{const B=N.matches.find(z=>z.id===a);return Ta(B),Vu(B,["routeId","ssr","_displayPending"])},structuralSharing:!0}),f=l.routesById[c.routeId],h=f.options.pendingComponent??l.options.defaultPendingComponent,g=h?_.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",w=(!f.isRoot||f.options.wrapInSuspense||b)&&(f.options.wrapInSuspense??h??(((s=f.options.errorComponent)==null?void 0:s.preload)||b))?T.Suspense:rs,x=p?tm:rs,S=m?zR:rs,R=Xe({select:N=>N.loadedAt}),A=Xe({select:N=>{var B;const z=N.matches.findIndex(K=>K.id===a);return(B=N.matches[z-1])==null?void 0:B.routeId}}),L=f.isRoot?f.options.shellComponent??rs:rs;return _.jsxs(L,{children:[_.jsx(oc.Provider,{value:a,children:_.jsx(w,{fallback:g,children:_.jsx(x,{getResetKey:()=>R,errorComponent:p||sc,onCatch:(N,B)=>{if(Sn(N))throw N;v==null||v(N,B)},children:_.jsx(S,{fallback:N=>{if(!m||N.routeId&&N.routeId!==c.routeId||!N.routeId&&!f.isRoot)throw N;return T.createElement(m,N)},children:b||c._displayPending?_.jsx(gR,{fallback:g,children:_.jsx(t0,{matchId:a})}):_.jsx(t0,{matchId:a})})})})}),A===xn&&l.options.scrollRestoration?_.jsxs(_.Fragment,{children:[_.jsx(PR,{}),_.jsx(kR,{})]}):null]})});function PR(){const n=zn(),a=T.useRef(void 0);return _.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(a.current===void 0||a.current.href!==n.latestLocation.href)&&(n.emit({type:"onRendered",...ti(n.state)}),a.current=n.latestLocation)}},n.latestLocation.state.__TSR_key)}const t0=T.memo(function({matchId:a}){var r,s,l,c,f;const h=zn(),{match:g,key:p,routeId:v}=Xe({select:w=>{const x=w.matches.findIndex(B=>B.id===a),S=w.matches[x],R=S.routeId,A=h.routesById[R].options.remountDeps??h.options.defaultRemountDeps,L=A==null?void 0:A({routeId:R,loaderDeps:S.loaderDeps,params:S._strictParams,search:S._strictSearch});return{key:L?JSON.stringify(L):void 0,routeId:R,match:Vu(S,["id","status","error","_forcePending","_displayPending"])}},structuralSharing:!0}),m=h.routesById[v],b=T.useMemo(()=>{const w=m.options.component??h.options.defaultComponent;return w?_.jsx(w,{},p):_.jsx(Hb,{})},[p,m.options.component,h.options.defaultComponent]);if(g._displayPending)throw(r=h.getMatch(g.id))==null?void 0:r.displayPendingPromise;if(g._forcePending)throw(s=h.getMatch(g.id))==null?void 0:s.minPendingPromise;if(g.status==="pending"){const w=m.options.pendingMinMs??h.options.defaultPendingMinMs;if(w&&!((l=h.getMatch(g.id))!=null&&l.minPendingPromise)&&!h.isServer){const x=as();Promise.resolve().then(()=>{h.updateMatch(g.id,S=>({...S,minPendingPromise:x}))}),setTimeout(()=>{x.resolve(),h.updateMatch(g.id,S=>({...S,minPendingPromise:void 0}))},w)}throw(c=h.getMatch(g.id))==null?void 0:c.loadPromise}if(g.status==="notFound")return Ta(Sn(g.error)),kb(h,m,g.error);if(g.status==="redirected")throw Ta(Kn(g.error)),(f=h.getMatch(g.id))==null?void 0:f.loadPromise;if(g.status==="error"){if(h.isServer){const w=(m.options.errorComponent??h.options.defaultErrorComponent)||sc;return _.jsx(w,{error:g.error,reset:void 0,info:{componentStack:""}})}throw g.error}return b}),Hb=T.memo(function(){const a=zn(),r=T.useContext(oc),s=Xe({select:p=>{var v;return(v=p.matches.find(m=>m.id===r))==null?void 0:v.routeId}}),l=a.routesById[s],c=Xe({select:p=>{const m=p.matches.find(b=>b.id===r);return Ta(m),m.globalNotFound}}),f=Xe({select:p=>{var v;const m=p.matches,b=m.findIndex(w=>w.id===r);return(v=m[b+1])==null?void 0:v.id}}),h=a.options.defaultPendingComponent?_.jsx(a.options.defaultPendingComponent,{}):null;if(c)return kb(a,l,void 0);if(!f)return null;const g=_.jsx(Pb,{matchId:f});return r===xn?_.jsx(T.Suspense,{fallback:h,children:g}):g});function HR(){const n=zn(),a=n.options.defaultPendingComponent?_.jsx(n.options.defaultPendingComponent,{}):null,r=n.isServer||typeof document<"u"&&n.ssr?rs:T.Suspense,s=_.jsxs(r,{fallback:a,children:[!n.isServer&&_.jsx(LR,{}),_.jsx(qR,{})]});return n.options.InnerWrap?_.jsx(n.options.InnerWrap,{children:s}):s}function qR(){const n=Xe({select:r=>{var s;return(s=r.matches[0])==null?void 0:s.id}}),a=Xe({select:r=>r.loadedAt});return _.jsx(oc.Provider,{value:n,children:_.jsx(tm,{getResetKey:()=>a,errorComponent:sc,onCatch:r=>{r.message||r.toString()},children:n?_.jsx(Pb,{matchId:n}):null})})}const VR=n=>new GR(n);class GR extends oR{constructor(a){super(a)}}typeof globalThis<"u"?(globalThis.createFileRoute=pr,globalThis.createLazyFileRoute=Wy):typeof window<"u"&&(window.createFileRoute=pr,window.createFileRoute=Wy);function YR({router:n,children:a,...r}){Object.keys(r).length>0&&n.update({...n.options,...r,context:{...n.options.context,...r.context}});const s=Ub(),l=_.jsx(s.Provider,{value:n,children:a});return n.options.Wrap?_.jsx(n.options.Wrap,{children:l}):l}function FR({router:n,...a}){return _.jsx(YR,{router:n,...a,children:_.jsx(HR,{})})}/**
|
|
67
67
|
* @license lucide-react v0.525.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
@@ -172,4 +172,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
|
|
|
172
172
|
`)}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[q0]=this[q0]={accessors:{}}).accessors,l=this.prototype;function c(f){const h=Uo(f);s[h]||(R4(l,f),s[h]=!0)}return Q.isArray(a)?a.forEach(c):c(a),this}};Ze.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Q.reduceDescriptors(Ze.prototype,({value:n},a)=>{let r=a[0].toUpperCase()+a.slice(1);return{get:()=>n,set(s){this[r]=s}}});Q.freezeMethods(Ze);function uh(n,a){const r=this||ol,s=a||r,l=Ze.from(s.headers);let c=s.data;return Q.forEach(n,function(h){c=h.call(r,c,l.normalize(),a?a.status:void 0)}),l.normalize(),c}function kS(n){return!!(n&&n.__CANCEL__)}function js(n,a,r){Tt.call(this,n??"canceled",Tt.ERR_CANCELED,a,r),this.name="CanceledError"}Q.inherits(js,Tt,{__CANCEL__:!0});function PS(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 T4(n){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return a&&a[1]||""}function _4(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 w=v&&p-v;return w?Math.round(b*1e3/w):void 0}}function C4(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=_4(50,250);return C4(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)},V0=(n,a)=>{const r=n!=null;return[s=>a[0]({lengthComputable:r,total:n,loaded:s}),a[1]]},G0=n=>(...a)=>Q.asap(()=>n(...a)),A4=ze.hasStandardBrowserEnv?((n,a)=>r=>(r=new URL(r,ze.origin),n.protocol===r.protocol&&n.host===r.host&&(a||n.port===r.port)))(new URL(ze.origin),ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent)):()=>!0,O4=ze.hasStandardBrowserEnv?{write(n,a,r,s,l,c){const f=[n+"="+encodeURIComponent(a)];Q.isNumber(r)&&f.push("expires="+new Date(r).toGMTString()),Q.isString(s)&&f.push("path="+s),Q.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 M4(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function D4(n,a){return a?n.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):n}function HS(n,a,r){let s=!M4(a);return n&&(s||r==!1)?D4(n,a):a}const Y0=n=>n instanceof Ze?{...n}:n;function ii(n,a){a=a||{};const r={};function s(p,v,m,b){return Q.isPlainObject(p)&&Q.isPlainObject(v)?Q.merge.call({caseless:b},p,v):Q.isPlainObject(v)?Q.merge({},v):Q.isArray(v)?v.slice():v}function l(p,v,m,b){if(Q.isUndefined(v)){if(!Q.isUndefined(p))return s(void 0,p,m,b)}else return s(p,v,m,b)}function c(p,v){if(!Q.isUndefined(v))return s(void 0,v)}function f(p,v){if(Q.isUndefined(v)){if(!Q.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(Y0(p),Y0(v),m,!0)};return Q.forEach(Object.keys(Object.assign({},n,a)),function(v){const m=g[v]||l,b=m(n[v],a[v],v);Q.isUndefined(b)&&m!==h||(r[v]=b)}),r}const qS=n=>{const a=ii({},n);let{data:r,withXSRFToken:s,xsrfHeaderName:l,xsrfCookieName:c,headers:f,auth:h}=a;a.headers=f=Ze.from(f),a.url=zS(HS(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(Q.isFormData(r)){if(ze.hasStandardBrowserEnv||ze.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(ze.hasStandardBrowserEnv&&(s&&Q.isFunction(s)&&(s=s(a)),s||s!==!1&&A4(a.url))){const p=l&&c&&O4.read(c);p&&f.set(l,p)}return a},N4=typeof XMLHttpRequest<"u",j4=N4&&function(n){return new Promise(function(r,s){const l=qS(n);let c=l.data;const f=Ze.from(l.headers).normalize();let{responseType:h,onUploadProgress:g,onDownloadProgress:p}=l,v,m,b,w,x;function S(){w&&w(),x&&x(),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=Ze.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),z={data:!h||h==="text"||h==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:N,config:n,request:R};PS(function(q){r(q),S()},function(q){s(q),S()},z),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 B=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const z=l.transitional||US;l.timeoutErrorMessage&&(B=l.timeoutErrorMessage),s(new Tt(B,z.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,n,R)),R=null},c===void 0&&f.setContentType(null),"setRequestHeader"in R&&Q.forEach(f.toJSON(),function(B,z){R.setRequestHeader(z,B)}),Q.isUndefined(l.withCredentials)||(R.withCredentials=!!l.withCredentials),h&&h!=="json"&&(R.responseType=l.responseType),p&&([b,x]=ec(p,!0),R.addEventListener("progress",b)),g&&R.upload&&([m,w]=ec(g),R.upload.addEventListener("progress",m),R.upload.addEventListener("loadend",w)),(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 L=T4(l.url);if(L&&ze.protocols.indexOf(L)===-1){s(new Tt("Unsupported protocol "+L+":",Tt.ERR_BAD_REQUEST,n));return}R.send(c||null)})},L4=(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=()=>Q.asap(h),g}},z4=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},U4=async function*(n,a){for await(const r of B4(n))yield*z4(r,a)},B4=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()}},F0=(n,a,r,s)=>{const l=U4(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",VS=wc&&typeof ReadableStream=="function",k4=wc&&(typeof TextEncoder=="function"?(n=>a=>n.encode(a))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),GS=(n,...a)=>{try{return!!n(...a)}catch{return!1}},P4=VS&&GS(()=>{let n=!1;const a=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!a}),Q0=64*1024,zh=VS&&GS(()=>Q.isReadableStream(new Response("").body)),nc={stream:zh&&(n=>n.body)};wc&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!nc[a]&&(nc[a]=Q.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 H4=async n=>{if(n==null)return 0;if(Q.isBlob(n))return n.size;if(Q.isSpecCompliantForm(n))return(await new Request(ze.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(n)||Q.isArrayBuffer(n))return n.byteLength;if(Q.isURLSearchParams(n)&&(n=n+""),Q.isString(n))return(await k4(n)).byteLength},q4=async(n,a)=>{const r=Q.toFiniteNumber(n.getContentLength());return r??H4(a)},V4=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}=qS(n);p=p?(p+"").toLowerCase():"text";let w=L4([l,c&&c.toAbortSignal()],f),x;const S=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let R;try{if(g&&P4&&r!=="get"&&r!=="head"&&(R=await q4(v,s))!==0){let z=new Request(a,{method:"POST",body:s,duplex:"half"}),K;if(Q.isFormData(s)&&(K=z.headers.get("content-type"))&&v.setContentType(K),z.body){const[q,P]=V0(R,ec(G0(g)));s=F0(z.body,Q0,q,P)}}Q.isString(m)||(m=m?"include":"omit");const A="credentials"in Request.prototype;x=new Request(a,{...b,signal:w,method:r.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:A?m:void 0});let L=await fetch(x,b);const N=zh&&(p==="stream"||p==="response");if(zh&&(h||N&&S)){const z={};["status","statusText","headers"].forEach(et=>{z[et]=L[et]});const K=Q.toFiniteNumber(L.headers.get("content-length")),[q,P]=h&&V0(K,ec(G0(h),!0))||[];L=new Response(F0(L.body,Q0,q,()=>{P&&P(),S&&S()}),z)}p=p||"text";let B=await nc[Q.findKey(nc,p)||"text"](L,n);return!N&&S&&S(),await new Promise((z,K)=>{PS(z,K,{data:B,headers:Ze.from(L.headers),status:L.status,statusText:L.statusText,config:n,request:x})})}catch(A){throw S&&S(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new Tt("Network Error",Tt.ERR_NETWORK,n,x),{cause:A.cause||A}):Tt.from(A,A&&A.code,n,x)}}),Uh={http:a4,xhr:j4,fetch:V4};Q.forEach(Uh,(n,a)=>{if(n){try{Object.defineProperty(n,"name",{value:a})}catch{}Object.defineProperty(n,"adapterName",{value:a})}});const K0=n=>`- ${n}`,G4=n=>Q.isFunction(n)||n===null||n===!1,YS={getAdapter:n=>{n=Q.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,!G4(r)&&(s=Uh[(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 :
|
|
173
173
|
`+c.map(K0).join(`
|
|
174
174
|
`):" "+K0(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:Uh};function ch(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new js(null,n)}function X0(n){return ch(n),n.headers=Ze.from(n.headers),n.data=uh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),YS.getAdapter(n.adapter||ol.adapter)(n).then(function(s){return ch(n),s.data=uh.call(n,n.transformResponse,s),s.headers=Ze.from(s.headers),s},function(s){return kS(s)||(ch(n),s&&s.response&&(s.response.data=uh.call(n,n.transformResponse,s.response),s.response.headers=Ze.from(s.response.headers))),Promise.reject(s)})}const FS="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 $0={};Ec.transitional=function(a,r,s){function l(c,f){return"[Axios v"+FS+"] 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&&!$0[f]&&($0[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 Y4(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:Y4,validators:Ec},Fn=Pu.validators;let ei=class{constructor(a){this.defaults=a||{},this.interceptors={request:new H0,response:new H0}}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+=`
|
|
175
|
-
`+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=ii(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Pu.assertOptions(s,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),l!=null&&(Q.isFunction(l)?r.paramsSerializer={serialize:l}:Pu.assertOptions(l,{encode:Fn.function,serialize:Fn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Pu.assertOptions(r,{baseUrl:Fn.spelling("baseURL"),withXsrfToken:Fn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&Q.merge(c.common,c[r.method]);c&&Q.forEach(["delete","get","head","post","put","patch","common"],x=>{delete c[x]}),r.headers=Ze.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(g=g&&S.synchronous,h.unshift(S.fulfilled,S.rejected))});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let v,m=0,b;if(!g){const x=[X0.bind(this),void 0];for(x.unshift.apply(x,h),x.push.apply(x,p),b=x.length,v=Promise.resolve(r);m<b;)v=v.then(x[m++],x[m++]);return v}b=h.length;let w=r;for(m=0;m<b;){const x=h[m++],S=h[m++];try{w=x(w)}catch(R){S.call(this,R);break}}try{v=X0.call(this,w)}catch(x){return Promise.reject(x)}for(m=0,b=p.length;m<b;)v=v.then(p[m++],p[m++]);return v}getUri(a){a=ii(this.defaults,a);const r=HS(a.baseURL,a.url,a.allowAbsoluteUrls);return zS(r,a.params,a.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(a){ei.prototype[a]=function(r,s){return this.request(ii(s||{},{method:a,url:r,data:(s||{}).data}))}});Q.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(ii(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}ei.prototype[a]=r(),ei.prototype[a+"Form"]=r(!0)});let F4=class QS{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 QS(function(l){a=l}),cancel:a}}};function Q4(n){return function(r){return n.apply(null,r)}}function K4(n){return Q.isObject(n)&&n.isAxiosError===!0}const Bh={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(Bh).forEach(([n,a])=>{Bh[a]=n});function KS(n){const a=new ei(n),r=ES(ei.prototype.request,a);return Q.extend(r,ei.prototype,a,{allOwnKeys:!0}),Q.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return KS(ii(n,l))},r}const fe=KS(ol);fe.Axios=ei;fe.CanceledError=js;fe.CancelToken=F4;fe.isCancel=kS;fe.VERSION=FS;fe.toFormData=xc;fe.AxiosError=Tt;fe.Cancel=fe.CanceledError;fe.all=function(a){return Promise.all(a)};fe.spread=Q4;fe.isAxiosError=K4;fe.mergeConfig=ii;fe.AxiosHeaders=Ze;fe.formToJSON=n=>BS(Q.isHTMLForm(n)?new FormData(n):n);fe.getAdapter=YS.getAdapter;fe.HttpStatusCode=Bh;fe.default=fe;const{Axios:gD,AxiosError:vD,CanceledError:yD,isCancel:bD,CancelToken:SD,VERSION:xD,all:wD,Cancel:ED,isAxiosError:RD,spread:TD,toFormData:_D,AxiosHeaders:CD,HttpStatusCode:AD,formToJSON:OD,getAdapter:MD,mergeConfig:DD}=fe,Um=fe.create({baseURL:"/api"});Um.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Um.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class Z0{constructor(a,r){this.client=a,this.data=r}}class X4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class $4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class Z4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class I4{constructor(){Ji(this,"api",Um);Ji(this,"guilds",new $4(this));Ji(this,"plugins",new Z4(this));Ji(this,"events",new X4(this));Ji(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 Z0(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 Z0(this,s.user),s}}const XS=T.createContext(null);function J4({children:n}){const[a,r]=T.useState(()=>new I4);return _.jsx(XS.Provider,{value:{client:a,setClient:r},children:n})}function Bm(){const n=T.use(XS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const fh={navMain:[{title:"Commands",url:"/commands",icon:a0,isActive:!1},{title:"Events",url:"/events",icon:n0,isActive:!1},{title:"Plugins",url:"/plugins",icon:a2,isActive:!1},{title:"Guilds",url:"/guilds",icon:s0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:i2,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:y2},{title:"Discord",url:"https://ctrl.lol/discord",icon:s0}],projects:[{name:"Commands",url:"#",icon:a0},{name:"Middlewares",url:"#",icon:l2},{name:"Events",url:"#",icon:n0}]};function W4({...n}){var r;const a=Bm();return _.jsxs(KA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[_.jsx($A,{children:_.jsx(al,{children:_.jsx(rl,{children:_.jsx(il,{size:"lg",asChild:!0,children:_.jsxs(_s,{to:"/",children:[_.jsx("div",{className:"border-sidebar-primary border text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg",children:_.jsx("img",{src:"/logo.webp",alt:"Logo",className:"size-6"})}),_.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[_.jsx("span",{className:"truncate font-medium",children:"CommandKit"}),_.jsx("span",{className:"truncate text-xs",children:"DevTools"})]})]})})})})}),_.jsxs(IA,{children:[_.jsx(tO,{items:fh.navMain}),_.jsx(eO,{projects:fh.projects}),_.jsx(nO,{items:fh.navSecondary,className:"mt-auto"})]}),_.jsx(ZA,{children:_.jsx(vO,{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 tM({className:n,...a}){return _.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 eM({className:n,...a}){return _.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 nM({className:n,...a}){return _.jsx("div",{"data-slot":"card-title",className:Mt("leading-none font-semibold",n),...a})}function aM({className:n,...a}){return _.jsx("div",{"data-slot":"card-description",className:Mt("text-muted-foreground text-sm",n),...a})}function rM({className:n,...a}){return _.jsx("div",{"data-slot":"card-content",className:Mt("px-6",n),...a})}function ND({className:n,...a}){return _.jsx("div",{"data-slot":"card-footer",className:Mt("flex items-center px-6 [.border-t]:pt-6",n),...a})}var iM="Label",$S=T.forwardRef((n,a)=>_.jsx(re.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())}}));$S.displayName=iM;var sM=$S;function I0({className:n,...a}){return _.jsx(sM,{"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 J0=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(w=>w(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},oM=n=>n?J0(n):J0,lM=n=>n;function uM(n,a=lM){const r=it.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return it.useDebugValue(r),r}const W0=n=>{const a=oM(n),r=s=>uM(a,s);return Object.assign(r,a),r},cM=n=>n?W0(n):W0,ZS=cM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function fM(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 dM=n=>{switch(n){case"success":return pM;case"info":return vM;case"warning":return gM;case"error":return yM;default:return null}},hM=Array(12).fill(0),mM=({visible:n,className:a})=>it.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},it.createElement("div",{className:"sonner-spinner"},hM.map((r,s)=>it.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),pM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),gM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},it.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"})),vM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),yM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),bM=it.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"},it.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),it.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),SM=()=>{const[n,a]=it.useState(document.hidden);return it.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let kh=1;class xM{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:kh++,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],it.isValidElement(p))c=!1,this.create({id:s,type:"default",message:p});else if(EM(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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...x})}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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...x})}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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...x})}}).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,w=typeof v=="object"&&!it.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:m,...w})}}).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)||kh++;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 Ke=new xM,wM=(n,a)=>{const r=(a==null?void 0:a.id)||kh++;return Ke.addToast({title:n,...a,id:r}),r},EM=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",RM=wM,TM=()=>Ke.toasts,_M=()=>Ke.getActiveToasts(),tb=Object.assign(RM,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:TM,getToasts:_M});fM("[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 CM=3,AM="24px",OM="16px",eb=4e3,MM=356,DM=14,NM=45,jM=200;function Qn(...n){return n.filter(Boolean).join(" ")}function LM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const zM=n=>{var a,r,s,l,c,f,h,g,p;const{invert:v,toast:m,unstyled:b,interacting:w,setHeights:x,visibleToasts:S,heights:R,index:A,toasts:L,expanded:N,removeToast:B,defaultRichColors:z,closeButton:K,style:q,cancelButtonStyle:P,actionButtonStyle:et,className:Z="",descriptionClassName:st="",duration:rt,position:lt,gap:gt,expandByDefault:ut,classNames:M,icons:X,closeButtonAriaLabel:k="Close toast"}=n,[ot,C]=it.useState(null),[G,tt]=it.useState(null),[$,at]=it.useState(!1),[ft,nt]=it.useState(!1),[pt,yt]=it.useState(!1),[Et,_t]=it.useState(!1),[It,Gt]=it.useState(!1),[pe,on]=it.useState(0),[br,Aa]=it.useState(0),Jt=it.useRef(m.duration||rt||eb),kn=it.useRef(null),ie=it.useRef(null),Sr=A===0,ea=A+1<=S,Ct=m.type,Yt=m.dismissible!==!1,xr=m.className||"",ci=m.descriptionClassName||"",ln=it.useMemo(()=>R.findIndex(Rt=>Rt.toastId===m.id)||0,[R,m.id]),_e=it.useMemo(()=>{var Rt;return(Rt=m.closeButton)!=null?Rt:K},[m.closeButton,K]),_n=it.useMemo(()=>m.duration||rt||eb,[m.duration,rt]),Ce=it.useRef(0),Oa=it.useRef(0),ll=it.useRef(0),Ma=it.useRef(null),[fi,di]=lt.split("-"),Pn=it.useMemo(()=>R.reduce((Rt,se,de)=>de>=ln?Rt:Rt+se.height,0),[R,ln]),wr=SM(),Er=m.invert||v,Us=Ct==="loading";Oa.current=it.useMemo(()=>ln*gt+Pn,[ln,Pn]),it.useEffect(()=>{Jt.current=_n},[_n]),it.useEffect(()=>{at(!0)},[]),it.useEffect(()=>{const Rt=ie.current;if(Rt){const se=Rt.getBoundingClientRect().height;return Aa(se),x(de=>[{toastId:m.id,height:se,position:m.position},...de]),()=>x(de=>de.filter(Ae=>Ae.toastId!==m.id))}},[x,m.id]),it.useLayoutEffect(()=>{if(!$)return;const Rt=ie.current,se=Rt.style.height;Rt.style.height="auto";const de=Rt.getBoundingClientRect().height;Rt.style.height=se,Aa(de),x(Ae=>Ae.find(ge=>ge.toastId===m.id)?Ae.map(ge=>ge.toastId===m.id?{...ge,height:de}:ge):[{toastId:m.id,height:de,position:m.position},...Ae])},[$,m.title,m.description,x,m.id,m.jsx,m.action,m.cancel]);const Cn=it.useCallback(()=>{nt(!0),on(Oa.current),x(Rt=>Rt.filter(se=>se.toastId!==m.id)),setTimeout(()=>{B(m)},jM)},[m,B,x,Oa]);it.useEffect(()=>{if(m.promise&&Ct==="loading"||m.duration===1/0||m.type==="loading")return;let Rt;return N||w||wr?(()=>{if(ll.current<Ce.current){const Ae=new Date().getTime()-Ce.current;Jt.current=Jt.current-Ae}ll.current=new Date().getTime()})():(()=>{Jt.current!==1/0&&(Ce.current=new Date().getTime(),Rt=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Cn()},Jt.current))})(),()=>clearTimeout(Rt)},[N,w,m,Ct,wr,Cn]),it.useEffect(()=>{m.delete&&(Cn(),m.onDismiss==null||m.onDismiss.call(m,m))},[Cn,m.delete]);function ul(){var Rt;if(X!=null&&X.loading){var se;return it.createElement("div",{className:Qn(M==null?void 0:M.loader,m==null||(se=m.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":Ct==="loading"},X.loading)}return it.createElement(mM,{className:Qn(M==null?void 0:M.loader,m==null||(Rt=m.classNames)==null?void 0:Rt.loader),visible:Ct==="loading"})}const Bs=m.icon||(X==null?void 0:X[Ct])||dM(Ct);var Da,cl;return it.createElement("li",{tabIndex:0,ref:ie,className:Qn(Z,xr,M==null?void 0:M.toast,m==null||(a=m.classNames)==null?void 0:a.toast,M==null?void 0:M.default,M==null?void 0:M[Ct],m==null||(r=m.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(Da=m.richColors)!=null?Da:z,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":$,"data-promise":!!m.promise,"data-swiped":It,"data-removed":ft,"data-visible":ea,"data-y-position":fi,"data-x-position":di,"data-index":A,"data-front":Sr,"data-swiping":pt,"data-dismissible":Yt,"data-type":Ct,"data-invert":Er,"data-swipe-out":Et,"data-swipe-direction":G,"data-expanded":!!(N||ut&&$),style:{"--index":A,"--toasts-before":A,"--z-index":L.length-A,"--offset":`${ft?pe:Oa.current}px`,"--initial-height":ut?"auto":`${br}px`,...q,...m.style},onDragEnd:()=>{yt(!1),C(null),Ma.current=null},onPointerDown:Rt=>{Rt.button!==2&&(Us||!Yt||(kn.current=new Date,on(Oa.current),Rt.target.setPointerCapture(Rt.pointerId),Rt.target.tagName!=="BUTTON"&&(yt(!0),Ma.current={x:Rt.clientX,y:Rt.clientY})))},onPointerUp:()=>{var Rt,se,de;if(Et||!Yt)return;Ma.current=null;const Ae=Number(((Rt=ie.current)==null?void 0:Rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rr=Number(((se=ie.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((de=kn.current)==null?void 0:de.getTime()),oe=ot==="x"?Ae:Rr,le=Math.abs(oe)/ge;if(Math.abs(oe)>=NM||le>.11){on(Oa.current),m.onDismiss==null||m.onDismiss.call(m,m),tt(ot==="x"?Ae>0?"right":"left":Rr>0?"down":"up"),Cn(),_t(!0);return}else{var $t,xe;($t=ie.current)==null||$t.style.setProperty("--swipe-amount-x","0px"),(xe=ie.current)==null||xe.style.setProperty("--swipe-amount-y","0px")}Gt(!1),yt(!1),C(null)},onPointerMove:Rt=>{var se,de,Ae;if(!Ma.current||!Yt||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;const ge=Rt.clientY-Ma.current.y,oe=Rt.clientX-Ma.current.x;var le;const $t=(le=n.swipeDirections)!=null?le:LM(lt);!ot&&(Math.abs(oe)>1||Math.abs(ge)>1)&&C(Math.abs(oe)>Math.abs(ge)?"x":"y");let xe={x:0,y:0};const hi=na=>1/(1.5+Math.abs(na)/20);if(ot==="y"){if($t.includes("top")||$t.includes("bottom"))if($t.includes("top")&&ge<0||$t.includes("bottom")&&ge>0)xe.y=ge;else{const na=ge*hi(ge);xe.y=Math.abs(na)<Math.abs(ge)?na:ge}}else if(ot==="x"&&($t.includes("left")||$t.includes("right")))if($t.includes("left")&&oe<0||$t.includes("right")&&oe>0)xe.x=oe;else{const na=oe*hi(oe);xe.x=Math.abs(na)<Math.abs(oe)?na:oe}(Math.abs(xe.x)>0||Math.abs(xe.y)>0)&&Gt(!0),(de=ie.current)==null||de.style.setProperty("--swipe-amount-x",`${xe.x}px`),(Ae=ie.current)==null||Ae.style.setProperty("--swipe-amount-y",`${xe.y}px`)}},_e&&!m.jsx&&Ct!=="loading"?it.createElement("button",{"aria-label":k,"data-disabled":Us,"data-close-button":!0,onClick:Us||!Yt?()=>{}:()=>{Cn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Qn(M==null?void 0:M.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(cl=X==null?void 0:X.close)!=null?cl:bM):null,(Ct||m.icon||m.promise)&&m.icon!==null&&((X==null?void 0:X[Ct])!==null||m.icon)?it.createElement("div",{"data-icon":"",className:Qn(M==null?void 0:M.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,it.createElement("div",{"data-content":"",className:Qn(M==null?void 0:M.content,m==null||(c=m.classNames)==null?void 0:c.content)},it.createElement("div",{"data-title":"",className:Qn(M==null?void 0:M.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?it.createElement("div",{"data-description":"",className:Qn(st,ci,M==null?void 0:M.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),it.isValidElement(m.cancel)?m.cancel:m.cancel&&Du(m.cancel)?it.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:Rt=>{Du(m.cancel)&&Yt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Rt),Cn())},className:Qn(M==null?void 0:M.cancelButton,m==null||(g=m.classNames)==null?void 0:g.cancelButton)},m.cancel.label):null,it.isValidElement(m.action)?m.action:m.action&&Du(m.action)?it.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||et,onClick:Rt=>{Du(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Rt),!Rt.defaultPrevented&&Cn())},className:Qn(M==null?void 0:M.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function nb(){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 UM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?OM:AM;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 BM=it.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:w,style:x,visibleToasts:S=CM,toastOptions:R,dir:A=nb(),gap:L=DM,icons:N,containerAriaLabel:B="Notifications"}=a,[z,K]=it.useState([]),q=it.useMemo(()=>Array.from(new Set([l].concat(z.filter(G=>G.position).map(G=>G.position)))),[z,l]),[P,et]=it.useState([]),[Z,st]=it.useState(!1),[rt,lt]=it.useState(!1),[gt,ut]=it.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=it.useRef(null),X=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=it.useRef(null),ot=it.useRef(!1),C=it.useCallback(G=>{K(tt=>{var $;return($=tt.find(at=>at.id===G.id))!=null&&$.delete||Ke.dismiss(G.id),tt.filter(({id:at})=>at!==G.id)})},[]);return it.useEffect(()=>Ke.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{K(tt=>tt.map($=>$.id===G.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Bb.flushSync(()=>{K(tt=>{const $=tt.findIndex(at=>at.id===G.id);return $!==-1?[...tt.slice(0,$),{...tt[$],...G},...tt.slice($+1)]:[G,...tt]})})})}),[z]),it.useEffect(()=>{if(m!=="system"){ut(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ut("dark"):ut("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:tt})=>{ut(tt?"dark":"light")})}catch{G.addListener(({matches:$})=>{try{ut($?"dark":"light")}catch(at){console.error(at)}})}},[m]),it.useEffect(()=>{z.length<=1&&st(!1)},[z]),it.useEffect(()=>{const G=tt=>{var $;if(c.every(nt=>tt[nt]||tt.code===nt)){var ft;st(!0),(ft=M.current)==null||ft.focus()}tt.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&st(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[c]),it.useEffect(()=>{if(M.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,ot.current=!1)}},[M.current]),it.createElement("section",{ref:r,"aria-label":`${B} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},q.map((G,tt)=>{var $;const[at,ft]=G.split("-");return z.length?it.createElement("ol",{key:G,dir:A==="auto"?nb():A,tabIndex:-1,ref:M,className:g,"data-sonner-toaster":!0,"data-sonner-theme":gt,"data-y-position":at,"data-x-position":ft,style:{"--front-toast-height":`${(($=P[0])==null?void 0:$.height)||0}px`,"--width":`${MM}px`,"--gap":`${L}px`,...x,...UM(p,v)},onBlur:nt=>{ot.current&&!nt.currentTarget.contains(nt.relatedTarget)&&(ot.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ot.current||(ot.current=!0,k.current=nt.relatedTarget)},onMouseEnter:()=>st(!0),onMouseMove:()=>st(!0),onMouseLeave:()=>{rt||st(!1)},onDragEnd:()=>st(!1),onPointerDown:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||lt(!0)},onPointerUp:()=>lt(!1)},z.filter(nt=>!nt.position&&tt===0||nt.position===G).map((nt,pt)=>{var yt,Et;return it.createElement(zM,{key:nt.id,icons:N,index:pt,toast:nt,defaultRichColors:b,duration:(yt=R==null?void 0:R.duration)!=null?yt:w,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:S,closeButton:(Et=R==null?void 0:R.closeButton)!=null?Et:h,interacting:rt,position:G,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:z.filter(_t=>_t.position==nt.position),heights:P.filter(_t=>_t.position==nt.position),setHeights:et,expandByDefault:f,gap:L,expanded:Z,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(){}},si=typeof window>"u"||"Deno"in globalThis;function Pe(){}function kM(n,a){return typeof n=="function"?n(a):n}function Ph(n){return typeof n=="number"&&n>=0&&n!==1/0}function IS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function mr(n,a){return typeof n=="function"?n(a):n}function wn(n,a){return typeof n=="function"?n(a):n}function ab(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==km(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 rb(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(oi(a.options.mutationKey)!==oi(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function km(n,a){return((a==null?void 0:a.queryKeyHashFn)||oi)(n)}function oi(n){return JSON.stringify(n,(a,r)=>Hh(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 JS(n,a){if(n===a)return n;const r=ib(n)&&ib(a);if(r||Hh(n)&&Hh(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]=JS(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 ib(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Hh(n){if(!sb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!sb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function sb(n){return Object.prototype.toString.call(n)==="[object Object]"}function PM(n){return new Promise(a=>{setTimeout(a,n)})}function qh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?JS(n,a):a}function HM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function qM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Pm=Symbol();function WS(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Pm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function tx(n,a){return typeof n=="function"?n(...a):!!n}var Yr,ar,cs,gb,VM=(gb=class extends Ls{constructor(){super();bt(this,Yr);bt(this,ar);bt(this,cs);ct(this,cs,a=>{if(!si&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,ar)||this.setEventListener(D(this,cs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ar))==null||a.call(this),ct(this,ar,void 0))}setEventListener(a){var r;ct(this,cs,a),(r=D(this,ar))==null||r.call(this),ct(this,ar,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Yr)!==a&&(ct(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,ar=new WeakMap,cs=new WeakMap,gb),Hm=new VM,fs,rr,ds,vb,GM=(vb=class extends Ls{constructor(){super();bt(this,fs,!0);bt(this,rr);bt(this,ds);ct(this,ds,a=>{if(!si&&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,rr)||this.setEventListener(D(this,ds))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,rr))==null||a.call(this),ct(this,rr,void 0))}setEventListener(a){var r;ct(this,ds,a),(r=D(this,rr))==null||r.call(this),ct(this,rr,a(this.setOnline.bind(this)))}setOnline(a){D(this,fs)!==a&&(ct(this,fs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,fs)}},fs=new WeakMap,rr=new WeakMap,ds=new WeakMap,vb),rc=new GM;function Vh(){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 YM(n){return Math.min(1e3*2**n,3e4)}function ex(n){return(n??"online")==="online"?rc.isOnline():!0}var nx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function dh(n){return n instanceof nx}function ax(n){let a=!1,r=0,s=!1,l;const c=Vh(),f=S=>{var R;s||(b(new nx(S)),(R=n.abort)==null||R.call(n))},h=()=>{a=!0},g=()=>{a=!1},p=()=>Hm.isFocused()&&(n.networkMode==="always"||rc.isOnline())&&n.canRun(),v=()=>ex(n.networkMode)&&n.canRun(),m=S=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,S),l==null||l(),c.resolve(S))},b=S=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,S),l==null||l(),c.reject(S))},w=()=>new Promise(S=>{var R;l=A=>{(s||p())&&S(A)},(R=n.onPause)==null||R.call(n)}).then(()=>{var S;l=void 0,s||(S=n.onContinue)==null||S.call(n)}),x=()=>{if(s)return;let S;const R=r===0?n.initialPromise:void 0;try{S=R??n.fn()}catch(A){S=Promise.reject(A)}Promise.resolve(S).then(m).catch(A=>{var K;if(s)return;const L=n.retry??(si?0:3),N=n.retryDelay??YM,B=typeof N=="function"?N(r,A):N,z=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,A);if(a||!z){b(A);return}r++,(K=n.onFail)==null||K.call(n,r,A),PM(B).then(()=>p()?void 0:w()).then(()=>{a?b(A):x()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?x():w().then(x),c)}}var FM=n=>setTimeout(n,0);function QM(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=FM;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 Se=QM(),Fr,yb,rx=(yb=class{constructor(){bt(this,Fr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ph(this.gcTime)&&ct(this,Fr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(si?1/0:5*60*1e3))}clearGcTimeout(){D(this,Fr)&&(clearTimeout(D(this,Fr)),ct(this,Fr,void 0))}},Fr=new WeakMap,yb),hs,Qr,bn,Kr,Le,Xo,Xr,Dn,ba,bb,KM=(bb=class extends rx{constructor(a){super();bt(this,Dn);bt(this,hs);bt(this,Qr);bt(this,bn);bt(this,Kr);bt(this,Le);bt(this,Xo);bt(this,Xr);ct(this,Xr,!1),ct(this,Xo,a.defaultOptions),this.setOptions(a.options),this.observers=[],ct(this,Kr,a.client),ct(this,bn,D(this,Kr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,ct(this,hs,XM(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,Le))==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,bn).remove(this)}setData(a,r){const s=qh(this.state.data,a,this.options);return Ot(this,Dn,ba).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,Dn,ba).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,Le))==null?void 0:s.promise;return(l=D(this,Le))==null||l.cancel(a),r?r.then(Pe).catch(Pe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,hs))}isActive(){return this.observers.some(a=>wn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>mr(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:!IS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Le))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Le))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,bn).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,Le)&&(D(this,Xr)?D(this,Le).cancel({revert:!0}):D(this,Le).cancelRetry()),this.scheduleGc()),D(this,bn).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,Dn,ba).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,Le))return D(this,Le).continueRetry(),D(this,Le).promise}if(a&&this.setOptions(a),!this.options.queryFn){const b=this.observers.find(w=>w.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,l=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ct(this,Xr,!0),s.signal)})},c=()=>{const b=WS(this.options,r),x=(()=>{const S={client:D(this,Kr),queryKey:this.queryKey,meta:this.meta};return l(S),S})();return ct(this,Xr,!1),this.options.persister?this.options.persister(b,x,this):b(x)},h=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Kr),state:this.state,fetchFn:c};return l(b),b})();(p=this.options.behavior)==null||p.onFetch(h,this),ct(this,Qr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ot(this,Dn,ba).call(this,{type:"fetch",meta:(m=h.fetchOptions)==null?void 0:m.meta});const g=b=>{var w,x,S,R;dh(b)&&b.silent||Ot(this,Dn,ba).call(this,{type:"error",error:b}),dh(b)||((x=(w=D(this,bn).config).onError)==null||x.call(w,b,this),(R=(S=D(this,bn).config).onSettled)==null||R.call(S,this.state.data,b,this)),this.scheduleGc()};return ct(this,Le,ax({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var w,x,S,R;if(b===void 0){g(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(A){g(A);return}(x=(w=D(this,bn).config).onSuccess)==null||x.call(w,b,this),(R=(S=D(this,bn).config).onSettled)==null||R.call(S,b,this.state.error,this),this.scheduleGc()},onError:g,onFail:(b,w)=>{Ot(this,Dn,ba).call(this,{type:"failed",failureCount:b,error:w})},onPause:()=>{Ot(this,Dn,ba).call(this,{type:"pause"})},onContinue:()=>{Ot(this,Dn,ba).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),D(this,Le).start()}},hs=new WeakMap,Qr=new WeakMap,bn=new WeakMap,Kr=new WeakMap,Le=new WeakMap,Xo=new WeakMap,Xr=new WeakMap,Dn=new WeakSet,ba=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,...ix(s.data,this.options),fetchMeta:a.meta??null};case"success":return ct(this,Qr,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 dh(l)&&l.revert&&D(this,Qr)?{...D(this,Qr),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),Se.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,bn).notify({query:this,type:"updated",action:a})})},bb);function ix(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ex(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function XM(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 Xn,Sb,$M=(Sb=class extends Ls{constructor(a={}){super();bt(this,Xn);this.config=a,ct(this,Xn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??km(l,r);let f=this.get(c);return f||(f=new KM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Xn).has(a.queryHash)||(D(this,Xn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Xn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Xn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Se.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Xn).get(a)}getAll(){return[...D(this,Xn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>ab(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>ab(a,s)):r}notify(a){Se.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){Se.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Se.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Xn=new WeakMap,Sb),$n,Be,$r,Zn,nr,xb,ZM=(xb=class extends rx{constructor(a){super();bt(this,Zn);bt(this,$n);bt(this,Be);bt(this,$r);this.mutationId=a.mutationId,ct(this,Be,a.mutationCache),ct(this,$n,[]),this.state=a.state||sx(),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,$n).includes(a)||(D(this,$n).push(a),this.clearGcTimeout(),D(this,Be).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){ct(this,$n,D(this,$n).filter(r=>r!==a)),this.scheduleGc(),D(this,Be).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,$n).length||(this.state.status==="pending"?this.scheduleGc():D(this,Be).remove(this))}continue(){var a;return((a=D(this,$r))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,p,v,m,b,w,x,S,R,A,L,N,B,z,K,q,P;const r=()=>{Ot(this,Zn,nr).call(this,{type:"continue"})};ct(this,$r,ax({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(et,Z)=>{Ot(this,Zn,nr).call(this,{type:"failed",failureCount:et,error:Z})},onPause:()=>{Ot(this,Zn,nr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Be).canRun(this)}));const s=this.state.status==="pending",l=!D(this,$r).canStart();try{if(s)r();else{Ot(this,Zn,nr).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,Be).config).onMutate)==null?void 0:f.call(c,a,this));const Z=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));Z!==this.state.context&&Ot(this,Zn,nr).call(this,{type:"pending",context:Z,variables:a,isPaused:l})}const et=await D(this,$r).start();return await((v=(p=D(this,Be).config).onSuccess)==null?void 0:v.call(p,et,a,this.state.context,this)),await((b=(m=this.options).onSuccess)==null?void 0:b.call(m,et,a,this.state.context)),await((x=(w=D(this,Be).config).onSettled)==null?void 0:x.call(w,et,null,this.state.variables,this.state.context,this)),await((R=(S=this.options).onSettled)==null?void 0:R.call(S,et,null,a,this.state.context)),Ot(this,Zn,nr).call(this,{type:"success",data:et}),et}catch(et){try{throw await((L=(A=D(this,Be).config).onError)==null?void 0:L.call(A,et,a,this.state.context,this)),await((B=(N=this.options).onError)==null?void 0:B.call(N,et,a,this.state.context)),await((K=(z=D(this,Be).config).onSettled)==null?void 0:K.call(z,void 0,et,this.state.variables,this.state.context,this)),await((P=(q=this.options).onSettled)==null?void 0:P.call(q,void 0,et,a,this.state.context)),et}finally{Ot(this,Zn,nr).call(this,{type:"error",error:et})}}finally{D(this,Be).runNext(this)}}},$n=new WeakMap,Be=new WeakMap,$r=new WeakMap,Zn=new WeakSet,nr=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),Se.batch(()=>{D(this,$n).forEach(s=>{s.onMutationUpdate(a)}),D(this,Be).notify({mutation:this,type:"updated",action:a})})},xb);function sx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,Nn,$o,wb,IM=(wb=class extends Ls{constructor(a={}){super();bt(this,Sa);bt(this,Nn);bt(this,$o);this.config=a,ct(this,Sa,new Set),ct(this,Nn,new Map),ct(this,$o,0)}build(a,r,s){const l=new ZM({mutationCache:this,mutationId:++xu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,Sa).add(a);const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).get(r);s?s.push(a):D(this,Nn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,Sa).delete(a)){const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).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,Nn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).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,Nn).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(){Se.batch(()=>{D(this,Sa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,Sa).clear(),D(this,Nn).clear()})}getAll(){return Array.from(D(this,Sa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>rb(r,s))}findAll(a={}){return this.getAll().filter(r=>rb(a,r))}notify(a){Se.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return Se.batch(()=>Promise.all(a.map(r=>r.continue().catch(Pe))))}},Sa=new WeakMap,Nn=new WeakMap,$o=new WeakMap,wb);function Nu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function ob(n){return{onFetch:(a,r)=>{var v,m,b,w,x;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=((w=a.state.data)==null?void 0:w.pages)||[],f=((x=a.state.data)==null?void 0:x.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const p=async()=>{let S=!1;const R=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(a.signal.aborted?S=!0:a.signal.addEventListener("abort",()=>{S=!0}),a.signal)})},A=WS(a.options,a.fetchOptions),L=async(N,B,z)=>{if(S)return Promise.reject();if(B==null&&N.pages.length)return Promise.resolve(N);const q=(()=>{const st={client:a.client,queryKey:a.queryKey,pageParam:B,direction:z?"backward":"forward",meta:a.options.meta};return R(st),st})(),P=await A(q),{maxPages:et}=a.options,Z=z?qM:HM;return{pages:Z(N.pages,P,et),pageParams:Z(N.pageParams,B,et)}};if(l&&c.length){const N=l==="backward",B=N?JM:lb,z={pages:c,pageParams:f},K=B(s,z);h=await L(z,K,N)}else{const N=n??c.length;do{const B=g===0?f[0]??s.initialPageParam:lb(s,h);if(g>0&&B==null)break;h=await L(h,B),g++}while(g<N)}return h};a.options.persister?a.fetchFn=()=>{var S,R;return(R=(S=a.options).persister)==null?void 0:R.call(S,p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=p}}}function lb(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 JM(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 ae,ir,sr,ms,ps,or,gs,vs,Eb,WM=(Eb=class{constructor(n={}){bt(this,ae);bt(this,ir);bt(this,sr);bt(this,ms);bt(this,ps);bt(this,or);bt(this,gs);bt(this,vs);ct(this,ae,n.queryCache||new $M),ct(this,ir,n.mutationCache||new IM),ct(this,sr,n.defaultOptions||{}),ct(this,ms,new Map),ct(this,ps,new Map),ct(this,or,0)}mount(){xu(this,or)._++,D(this,or)===1&&(ct(this,gs,Hm.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onFocus())})),ct(this,vs,rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onOnline())})))}unmount(){var n,a;xu(this,or)._--,D(this,or)===0&&((n=D(this,gs))==null||n.call(this),ct(this,gs,void 0),(a=D(this,vs))==null||a.call(this),ct(this,vs,void 0))}isFetching(n){return D(this,ae).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,ir).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,ae).get(a.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=D(this,ae).build(this,a),s=r.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(mr(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(s))}getQueriesData(n){return D(this,ae).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,ae).get(s.queryHash),c=l==null?void 0:l.state.data,f=kM(a,c);if(f!==void 0)return D(this,ae).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return Se.batch(()=>D(this,ae).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,ae).get(a.queryHash))==null?void 0:r.state}removeQueries(n){const a=D(this,ae);Se.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,ae);return Se.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=Se.batch(()=>D(this,ae).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Pe).catch(Pe)}invalidateQueries(n,a={}){return Se.batch(()=>(D(this,ae).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=Se.batch(()=>D(this,ae).findAll(n).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(Pe)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Pe)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,ae).build(this,a);return r.isStaleByTime(mr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Pe).catch(Pe)}fetchInfiniteQuery(n){return n.behavior=ob(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Pe).catch(Pe)}ensureInfiniteQueryData(n){return n.behavior=ob(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return rc.isOnline()?D(this,ir).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,ae)}getMutationCache(){return D(this,ir)}getDefaultOptions(){return D(this,sr)}setDefaultOptions(n){ct(this,sr,n)}setQueryDefaults(n,a){D(this,ms).set(oi(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(oi(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,sr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=km(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===Pm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,sr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,ae).clear(),D(this,ir).clear()}},ae=new WeakMap,ir=new WeakMap,sr=new WeakMap,ms=new WeakMap,ps=new WeakMap,or=new WeakMap,gs=new WeakMap,vs=new WeakMap,Eb),Fe,Ut,Zo,ke,Zr,ys,lr,ur,Io,bs,Ss,Ir,Jr,cr,xs,Ht,Po,Gh,Yh,Fh,Qh,Kh,Xh,$h,ox,Rb,t3=(Rb=class extends Ls{constructor(a,r){super();bt(this,Ht);bt(this,Fe);bt(this,Ut);bt(this,Zo);bt(this,ke);bt(this,Zr);bt(this,ys);bt(this,lr);bt(this,ur);bt(this,Io);bt(this,bs);bt(this,Ss);bt(this,Ir);bt(this,Jr);bt(this,cr);bt(this,xs,new Set);this.options=r,ct(this,Fe,a),ct(this,ur,null),ct(this,lr,Vh()),this.options.experimental_prefetchInRender||D(this,lr).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),ub(D(this,Ut),this.options)?Ot(this,Ht,Po).call(this):this.updateResult(),Ot(this,Ht,Qh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,Ht,Kh).call(this),Ot(this,Ht,Xh).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,Fe).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wn(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,Ht,$h).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!ac(this.options,r)&&D(this,Fe).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&cb(D(this,Ut),s,this.options,r)&&Ot(this,Ht,Po).call(this),this.updateResult(),l&&(D(this,Ut)!==s||wn(this.options.enabled,D(this,Ut))!==wn(r.enabled,D(this,Ut))||mr(this.options.staleTime,D(this,Ut))!==mr(r.staleTime,D(this,Ut)))&&Ot(this,Ht,Gh).call(this);const c=Ot(this,Ht,Yh).call(this);l&&(D(this,Ut)!==s||wn(this.options.enabled,D(this,Ut))!==wn(r.enabled,D(this,Ut))||c!==D(this,cr))&&Ot(this,Ht,Fh).call(this,c)}getOptimisticResult(a){const r=D(this,Fe).getQueryCache().build(D(this,Fe),a),s=this.createResult(r,a);return n3(this,s)&&(ct(this,ke,s),ct(this,ys,this.options),ct(this,Zr,D(this,Ut).state)),s}getCurrentResult(){return D(this,ke)}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,Fe).defaultQueryOptions(a),s=D(this,Fe).getQueryCache().build(D(this,Fe),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return Ot(this,Ht,Po).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,ke)))}createResult(a,r){var et;const s=D(this,Ut),l=this.options,c=D(this,ke),f=D(this,Zr),h=D(this,ys),p=a!==s?a.state:D(this,Zo),{state:v}=a;let m={...v},b=!1,w;if(r._optimisticResults){const Z=this.hasListeners(),st=!Z&&ub(a,r),rt=Z&&cb(a,s,r,l);(st||rt)&&(m={...m,...ix(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:R}=m;w=m.data;let A=!1;if(r.placeholderData!==void 0&&w===void 0&&R==="pending"){let Z;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(Z=c.data,A=!0):Z=typeof r.placeholderData=="function"?r.placeholderData((et=D(this,Ss))==null?void 0:et.state.data,D(this,Ss)):r.placeholderData,Z!==void 0&&(R="success",w=qh(c==null?void 0:c.data,Z,r),b=!0)}if(r.select&&w!==void 0&&!A)if(c&&w===(f==null?void 0:f.data)&&r.select===D(this,Io))w=D(this,bs);else try{ct(this,Io,r.select),w=r.select(w),w=qh(c==null?void 0:c.data,w,r),ct(this,bs,w),ct(this,ur,null)}catch(Z){ct(this,ur,Z)}D(this,ur)&&(x=D(this,ur),w=D(this,bs),S=Date.now(),R="error");const L=m.fetchStatus==="fetching",N=R==="pending",B=R==="error",z=N&&L,K=w!==void 0,P={status:R,fetchStatus:m.fetchStatus,isPending:N,isSuccess:R==="success",isError:B,isInitialLoading:z,isLoading:z,data:w,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:S,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:L,isRefetching:L&&!N,isLoadingError:B&&!K,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:B&&K,isStale:qm(a,r),refetch:this.refetch,promise:D(this,lr),isEnabled:wn(r.enabled,a)!==!1};if(this.options.experimental_prefetchInRender){const Z=lt=>{P.status==="error"?lt.reject(P.error):P.data!==void 0&<.resolve(P.data)},st=()=>{const lt=ct(this,lr,P.promise=Vh());Z(lt)},rt=D(this,lr);switch(rt.status){case"pending":a.queryHash===s.queryHash&&Z(rt);break;case"fulfilled":(P.status==="error"||P.data!==rt.value)&&st();break;case"rejected":(P.status!=="error"||P.error!==rt.reason)&&st();break}}return P}updateResult(){const a=D(this,ke),r=this.createResult(D(this,Ut),this.options);if(ct(this,Zr,D(this,Ut).state),ct(this,ys,this.options),D(this,Zr).data!==void 0&&ct(this,Ss,D(this,Ut)),ac(r,a))return;ct(this,ke,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,ke)).some(h=>{const g=h;return D(this,ke)[g]!==a[g]&&f.has(g)})};Ot(this,Ht,ox).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,Ht,Qh).call(this)}},Fe=new WeakMap,Ut=new WeakMap,Zo=new WeakMap,ke=new WeakMap,Zr=new WeakMap,ys=new WeakMap,lr=new WeakMap,ur=new WeakMap,Io=new WeakMap,bs=new WeakMap,Ss=new WeakMap,Ir=new WeakMap,Jr=new WeakMap,cr=new WeakMap,xs=new WeakMap,Ht=new WeakSet,Po=function(a){Ot(this,Ht,$h).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Pe)),r},Gh=function(){Ot(this,Ht,Kh).call(this);const a=mr(this.options.staleTime,D(this,Ut));if(si||D(this,ke).isStale||!Ph(a))return;const s=IS(D(this,ke).dataUpdatedAt,a)+1;ct(this,Ir,setTimeout(()=>{D(this,ke).isStale||this.updateResult()},s))},Yh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Fh=function(a){Ot(this,Ht,Xh).call(this),ct(this,cr,a),!(si||wn(this.options.enabled,D(this,Ut))===!1||!Ph(D(this,cr))||D(this,cr)===0)&&ct(this,Jr,setInterval(()=>{(this.options.refetchIntervalInBackground||Hm.isFocused())&&Ot(this,Ht,Po).call(this)},D(this,cr)))},Qh=function(){Ot(this,Ht,Gh).call(this),Ot(this,Ht,Fh).call(this,Ot(this,Ht,Yh).call(this))},Kh=function(){D(this,Ir)&&(clearTimeout(D(this,Ir)),ct(this,Ir,void 0))},Xh=function(){D(this,Jr)&&(clearInterval(D(this,Jr)),ct(this,Jr,void 0))},$h=function(){const a=D(this,Fe).getQueryCache().build(D(this,Fe),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);ct(this,Ut,a),ct(this,Zo,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ox=function(a){Se.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,ke))}),D(this,Fe).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},Rb);function e3(n,a){return wn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function ub(n,a){return e3(n,a)||n.state.data!==void 0&&Zh(n,a,a.refetchOnMount)}function Zh(n,a,r){if(wn(a.enabled,n)!==!1&&mr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&qm(n,a)}return!1}function cb(n,a,r,s){return(n!==a||wn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&qm(n,r)}function qm(n,a){return wn(a.enabled,n)!==!1&&n.isStaleByTime(mr(a.staleTime,n))}function n3(n,a){return!ac(n.getCurrentResult(),a)}var fr,dr,Qe,xa,Ra,Hu,Ih,Tb,a3=(Tb=class extends Ls{constructor(r,s){super();bt(this,Ra);bt(this,fr);bt(this,dr);bt(this,Qe);bt(this,xa);ct(this,fr,r),this.setOptions(s),this.bindMethods(),Ot(this,Ra,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,fr).defaultMutationOptions(r),ac(this.options,s)||D(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Qe),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&oi(s.mutationKey)!==oi(this.options.mutationKey)?this.reset():((l=D(this,Qe))==null?void 0:l.state.status)==="pending"&&D(this,Qe).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Qe))==null||r.removeObserver(this)}onMutationUpdate(r){Ot(this,Ra,Hu).call(this),Ot(this,Ra,Ih).call(this,r)}getCurrentResult(){return D(this,dr)}reset(){var r;(r=D(this,Qe))==null||r.removeObserver(this),ct(this,Qe,void 0),Ot(this,Ra,Hu).call(this),Ot(this,Ra,Ih).call(this)}mutate(r,s){var l;return ct(this,xa,s),(l=D(this,Qe))==null||l.removeObserver(this),ct(this,Qe,D(this,fr).getMutationCache().build(D(this,fr),this.options)),D(this,Qe).addObserver(this),D(this,Qe).execute(r)}},fr=new WeakMap,dr=new WeakMap,Qe=new WeakMap,xa=new WeakMap,Ra=new WeakSet,Hu=function(){var s;const r=((s=D(this,Qe))==null?void 0:s.state)??sx();ct(this,dr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ih=function(r){Se.batch(()=>{var s,l,c,f,h,g,p,v;if(D(this,xa)&&this.hasListeners()){const m=D(this,dr).variables,b=D(this,dr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,xa)).onSuccess)==null||l.call(s,r.data,m,b),(f=(c=D(this,xa)).onSettled)==null||f.call(c,r.data,null,m,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,xa)).onError)==null||g.call(h,r.error,m,b),(v=(p=D(this,xa)).onSettled)==null||v.call(p,void 0,r.error,m,b))}this.listeners.forEach(m=>{m(D(this,dr))})})},Tb),lx=T.createContext(void 0),ux=n=>{const a=T.useContext(lx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},r3=({client:n,children:a})=>(T.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),_.jsx(lx.Provider,{value:n,children:a})),cx=T.createContext(!1),i3=()=>T.useContext(cx);cx.Provider;function s3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var o3=T.createContext(s3()),l3=()=>T.useContext(o3),u3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},c3=n=>{T.useEffect(()=>{n.clearReset()},[n])},f3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||tx(r,[n.error,s])),d3=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))}},h3=(n,a)=>n.isLoading&&n.isFetching&&!a,m3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,fb=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function p3(n,a,r){var m,b,w,x,S;const s=i3(),l=l3(),c=ux(),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",d3(f),u3(f,l),c3(l);const h=!c.getQueryCache().get(f.queryHash),[g]=T.useState(()=>new a(c,f)),p=g.getOptimisticResult(f),v=!s&&n.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(R=>{const A=v?g.subscribe(Se.batchCalls(R)):Pe;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),T.useEffect(()=>{g.setOptions(f)},[f,g]),m3(f,p))throw fb(f,g,l);if(f3({result:p,errorResetBoundary:l,throwOnError:f.throwOnError,query:c.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((x=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||x.call(w,f,p),f.experimental_prefetchInRender&&!si&&h3(p,s)){const R=h?fb(f,g,l):(S=c.getQueryCache().get(f.queryHash))==null?void 0:S.promise;R==null||R.catch(Pe).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?p:g.trackResult(p)}function g3(n,a){return p3(n,t3)}function v3(n,a){const r=ux(),[s]=T.useState(()=>new a3(r,n));T.useEffect(()=>{s.setOptions(n)},[s,n]);const l=T.useSyncExternalStore(T.useCallback(f=>s.subscribe(Se.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=T.useCallback((f,h)=>{s.mutate(f,h).catch(Pe)},[s]);if(l.error&&tx(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function y3(){return _.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Yb,{className:"size-8 animate-spin"})})}function b3({className:n,...a}){const{setAuthenticated:r}=ZS(),[s,l]=T.useState(""),[c,f]=T.useState(""),h=Bm(),{isPending:g,mutate:p}=v3({mutationFn:async()=>h.login(s,c),onError(){tb.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){tb.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?_.jsx(y3,{}):_.jsx("div",{className:Mt("flex flex-col gap-6 w-[20%]",n),...a,children:_.jsxs(tM,{children:[_.jsxs(eM,{children:[_.jsx(nM,{className:"text-2xl",children:"Login"}),_.jsx(aM,{children:"Enter your credentials below to proceed"})]}),_.jsx(rM,{children:_.jsxs("div",{className:"flex flex-col gap-6",children:[_.jsxs("div",{className:"grid gap-2",children:[_.jsx(I0,{htmlFor:"username",children:"Username"}),_.jsx(m0,{id:"username",type:"username",placeholder:"Enter your username",required:!0,value:s,onChange:v=>l(v.target.value)})]}),_.jsxs("div",{className:"grid gap-2",children:[_.jsx("div",{className:"flex items-center",children:_.jsx(I0,{htmlFor:"password",children:"Password"})}),_.jsx(m0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),_.jsx(o1,{type:"button",className:"w-full",onClick:()=>{p()},children:"Login"})]})})]})})}function S3({children:n}){const{authenticated:a,setAuthenticated:r}=ZS(),s=Bm(),{isLoading:l,isError:c}=g3({queryKey:[],enabled:!a,queryFn:async()=>{const f=await s.fetchMe();return r(!!f),f},refetchOnWindowFocus:!0});return l?_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Yb,{className:"size-8 animate-spin"})}):c?_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching user data."})}):a?_.jsx(_.Fragment,{children:n}):_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(b3,{})})}function x3({...n}){return _.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function w3({className:n,...a}){return _.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 hh({className:n,...a}){return _.jsx("li",{"data-slot":"breadcrumb-item",className:Mt("inline-flex items-center gap-1.5",n),...a})}function db({asChild:n,className:a,...r}){const s=n?tl:"a";return _.jsx(s,{"data-slot":"breadcrumb-link",className:Mt("hover:text-foreground transition-colors",a),...r})}function E3({className:n,...a}){return _.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Mt("text-foreground font-normal",n),...a})}function hb({children:n,className:a,...r}){return _.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Mt("[&>svg]:size-3.5",a),...r,children:n??_.jsx(WR,{})})}function R3(){const{toggleSidebar:n}=Mm();return _.jsx("header",{className:"bg-background sticky top-0 z-50 flex w-full items-center border-b",children:_.jsxs("div",{className:"flex h-(--header-height) w-full items-center gap-2 px-4",children:[_.jsx(o1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:_.jsx(e2,{})}),_.jsx(OT,{orientation:"vertical",className:"mr-2 h-4"}),_.jsx(x3,{className:"hidden sm:block",children:_.jsxs(w3,{children:[_.jsx(hh,{children:_.jsx(db,{href:"#",children:"/"})}),_.jsx(hb,{}),_.jsx(hh,{children:_.jsx(E3,{children:"CommandKit"})}),_.jsx(hb,{}),_.jsx(hh,{children:_.jsx(db,{href:"#",children:"DevTools"})})]})})]})})}var T3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,p=["light","dark"];function v(w){(Array.isArray(n)?n:[n]).forEach(x=>{let S=x==="class",R=S&&c?l.map(A=>c[A]||A):l;S?(g.classList.remove(...R),g.classList.add(c&&c[w]?c[w]:w)):g.setAttribute(x,w)}),m(w)}function m(w){h&&p.includes(w)&&(g.style.colorScheme=w)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let w=localStorage.getItem(a)||r,x=f&&w==="system"?b():w;v(x)}catch{}},mb=["light","dark"],fx="(prefers-color-scheme: dark)",_3=typeof window>"u",Vm=T.createContext(void 0),C3={setTheme:n=>{},themes:[]},A3=()=>{var n;return(n=T.useContext(Vm))!=null?n:C3},O3=n=>T.useContext(Vm)?T.createElement(T.Fragment,null,n.children):T.createElement(D3,{...n}),M3=["light","dark"],D3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=M3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:p,nonce:v,scriptProps:m})=>{let[b,w]=T.useState(()=>j3(l,f)),[x,S]=T.useState(()=>b==="system"?mh():b),R=g?Object.values(g):c,A=T.useCallback(z=>{let K=z;if(!K)return;z==="system"&&r&&(K=mh());let q=g?g[K]:K,P=a?L3(v):null,et=document.documentElement,Z=st=>{st==="class"?(et.classList.remove(...R),q&&et.classList.add(q)):st.startsWith("data-")&&(q?et.setAttribute(st,q):et.removeAttribute(st))};if(Array.isArray(h)?h.forEach(Z):Z(h),s){let st=mb.includes(f)?f:null,rt=mb.includes(K)?K:st;et.style.colorScheme=rt}P==null||P()},[v]),L=T.useCallback(z=>{let K=typeof z=="function"?z(b):z;w(K);try{localStorage.setItem(l,K)}catch{}},[b]),N=T.useCallback(z=>{let K=mh(z);S(K),b==="system"&&r&&!n&&A("system")},[b,n]);T.useEffect(()=>{let z=window.matchMedia(fx);return z.addListener(N),N(z),()=>z.removeListener(N)},[N]),T.useEffect(()=>{let z=K=>{K.key===l&&(K.newValue?w(K.newValue):L(f))};return window.addEventListener("storage",z),()=>window.removeEventListener("storage",z)},[L]),T.useEffect(()=>{A(n??b)},[n,b]);let B=T.useMemo(()=>({theme:b,setTheme:L,forcedTheme:n,resolvedTheme:b==="system"?x:b,themes:r?[...c,"system"]:c,systemTheme:r?x:void 0}),[b,L,n,x,r,c]);return T.createElement(Vm.Provider,{value:B},T.createElement(N3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:m}),p)},N3=T.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 T.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${T3.toString()})(${v})`}})}),j3=(n,a)=>{if(_3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},L3=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)}},mh=n=>(n||(n=window.matchMedia(fx)),n.matches?"dark":"light");const z3=({...n})=>{const{theme:a="system"}=A3();return _.jsx(BM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},ui=jR({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:U3});function U3(){return _.jsxs(O3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[_.jsx(z3,{}),_.jsx(J4,{children:_.jsx(S3,{children:_.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:_.jsxs(QA,{className:"flex flex-col",children:[_.jsx(R3,{}),_.jsxs("div",{className:"flex flex-1",children:[_.jsx(W4,{}),_.jsx(XA,{children:_.jsx(Hb,{})})]})]})})})})]})}const B3="modulepreload",k3=function(n){return"/"+n},pb={},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=k3(p),p in pb)return;pb[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":B3,v||(b.as="script"),b.crossOrigin="",b.href=p,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((w,x)=>{b.addEventListener("load",w),b.addEventListener("error",()=>x(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)})},P3=()=>zs(()=>import("./plugins-DCTN3SQ4.js"),[]),H3=pr("/plugins")({component:Cs(P3,"component")}),q3=()=>zs(()=>import("./guilds-BKe1-8Zw.js"),[]),V3=pr("/guilds")({component:Cs(q3,"component")}),G3=()=>zs(()=>import("./feature-flags--OWGxogL.js"),[]),Y3=pr("/feature-flags")({component:Cs(G3,"component")}),F3=()=>zs(()=>import("./events-DKI4ARJl.js"),[]),Q3=pr("/events")({component:Cs(F3,"component")}),K3=()=>zs(()=>import("./commands-Bh8voic5.js"),[]),X3=pr("/commands")({component:Cs(K3,"component")}),$3=()=>zs(()=>import("./index-D4rH4URo.js"),[]),Z3=pr("/")({component:Cs($3,"component")}),I3=H3.update({id:"/plugins",path:"/plugins",getParentRoute:()=>ui}),J3=V3.update({id:"/guilds",path:"/guilds",getParentRoute:()=>ui}),W3=Y3.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>ui}),tD=Q3.update({id:"/events",path:"/events",getParentRoute:()=>ui}),eD=X3.update({id:"/commands",path:"/commands",getParentRoute:()=>ui}),nD=Z3.update({id:"/",path:"/",getParentRoute:()=>ui}),aD={IndexRoute:nD,CommandsRoute:eD,EventsRoute:tD,FeatureFlagsRoute:W3,GuildsRoute:J3,PluginsRoute:I3},rD=ui._addFileChildren(aD)._addFileTypes(),iD=VR({routeTree:rD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),sD=new WM;DE.createRoot(document.getElementById("root")).render(_.jsx(T.StrictMode,{children:_.jsx(r3,{client:sD,children:_.jsx(FR,{router:iD})})}));export{dO as A,gO as B,tM as C,y3 as L,g3 as a,eM as b,hO as c,mO as d,rM as e,nM as f,_b as g,aM as h,yr as i,_ as j,WR as k,ND as l,_s as m,o1 as n,T as r,Bm as u};
|
|
175
|
+
`+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=ii(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Pu.assertOptions(s,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),l!=null&&(Q.isFunction(l)?r.paramsSerializer={serialize:l}:Pu.assertOptions(l,{encode:Fn.function,serialize:Fn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Pu.assertOptions(r,{baseUrl:Fn.spelling("baseURL"),withXsrfToken:Fn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&Q.merge(c.common,c[r.method]);c&&Q.forEach(["delete","get","head","post","put","patch","common"],x=>{delete c[x]}),r.headers=Ze.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(g=g&&S.synchronous,h.unshift(S.fulfilled,S.rejected))});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let v,m=0,b;if(!g){const x=[X0.bind(this),void 0];for(x.unshift.apply(x,h),x.push.apply(x,p),b=x.length,v=Promise.resolve(r);m<b;)v=v.then(x[m++],x[m++]);return v}b=h.length;let w=r;for(m=0;m<b;){const x=h[m++],S=h[m++];try{w=x(w)}catch(R){S.call(this,R);break}}try{v=X0.call(this,w)}catch(x){return Promise.reject(x)}for(m=0,b=p.length;m<b;)v=v.then(p[m++],p[m++]);return v}getUri(a){a=ii(this.defaults,a);const r=HS(a.baseURL,a.url,a.allowAbsoluteUrls);return zS(r,a.params,a.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(a){ei.prototype[a]=function(r,s){return this.request(ii(s||{},{method:a,url:r,data:(s||{}).data}))}});Q.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(ii(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}ei.prototype[a]=r(),ei.prototype[a+"Form"]=r(!0)});let F4=class QS{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 QS(function(l){a=l}),cancel:a}}};function Q4(n){return function(r){return n.apply(null,r)}}function K4(n){return Q.isObject(n)&&n.isAxiosError===!0}const Bh={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(Bh).forEach(([n,a])=>{Bh[a]=n});function KS(n){const a=new ei(n),r=ES(ei.prototype.request,a);return Q.extend(r,ei.prototype,a,{allOwnKeys:!0}),Q.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return KS(ii(n,l))},r}const fe=KS(ol);fe.Axios=ei;fe.CanceledError=js;fe.CancelToken=F4;fe.isCancel=kS;fe.VERSION=FS;fe.toFormData=xc;fe.AxiosError=Tt;fe.Cancel=fe.CanceledError;fe.all=function(a){return Promise.all(a)};fe.spread=Q4;fe.isAxiosError=K4;fe.mergeConfig=ii;fe.AxiosHeaders=Ze;fe.formToJSON=n=>BS(Q.isHTMLForm(n)?new FormData(n):n);fe.getAdapter=YS.getAdapter;fe.HttpStatusCode=Bh;fe.default=fe;const{Axios:gD,AxiosError:vD,CanceledError:yD,isCancel:bD,CancelToken:SD,VERSION:xD,all:wD,Cancel:ED,isAxiosError:RD,spread:TD,toFormData:_D,AxiosHeaders:CD,HttpStatusCode:AD,formToJSON:OD,getAdapter:MD,mergeConfig:DD}=fe,Um=fe.create({baseURL:"/api"});Um.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Um.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class Z0{constructor(a,r){this.client=a,this.data=r}}class X4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class $4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class Z4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class I4{constructor(){Ji(this,"api",Um);Ji(this,"guilds",new $4(this));Ji(this,"plugins",new Z4(this));Ji(this,"events",new X4(this));Ji(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 Z0(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 Z0(this,s.user),s}}const XS=T.createContext(null);function J4({children:n}){const[a,r]=T.useState(()=>new I4);return _.jsx(XS.Provider,{value:{client:a,setClient:r},children:n})}function Bm(){const n=T.use(XS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const fh={navMain:[{title:"Commands",url:"/commands",icon:a0,isActive:!1},{title:"Events",url:"/events",icon:n0,isActive:!1},{title:"Plugins",url:"/plugins",icon:a2,isActive:!1},{title:"Guilds",url:"/guilds",icon:s0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:i2,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:y2},{title:"Discord",url:"https://ctrl.lol/discord",icon:s0}],projects:[{name:"Commands",url:"#",icon:a0},{name:"Middlewares",url:"#",icon:l2},{name:"Events",url:"#",icon:n0}]};function W4({...n}){var r;const a=Bm();return _.jsxs(KA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[_.jsx($A,{children:_.jsx(al,{children:_.jsx(rl,{children:_.jsx(il,{size:"lg",asChild:!0,children:_.jsxs(_s,{to:"/",children:[_.jsx("div",{className:"border-sidebar-primary border text-sidebar-primary-foreground flex aspect-square size-8 items-center justify-center rounded-lg",children:_.jsx("img",{src:"/logo.webp",alt:"Logo",className:"size-6"})}),_.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[_.jsx("span",{className:"truncate font-medium",children:"CommandKit"}),_.jsx("span",{className:"truncate text-xs",children:"DevTools"})]})]})})})})}),_.jsxs(IA,{children:[_.jsx(tO,{items:fh.navMain}),_.jsx(eO,{projects:fh.projects}),_.jsx(nO,{items:fh.navSecondary,className:"mt-auto"})]}),_.jsx(ZA,{children:_.jsx(vO,{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 tM({className:n,...a}){return _.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 eM({className:n,...a}){return _.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 nM({className:n,...a}){return _.jsx("div",{"data-slot":"card-title",className:Mt("leading-none font-semibold",n),...a})}function aM({className:n,...a}){return _.jsx("div",{"data-slot":"card-description",className:Mt("text-muted-foreground text-sm",n),...a})}function rM({className:n,...a}){return _.jsx("div",{"data-slot":"card-content",className:Mt("px-6",n),...a})}function ND({className:n,...a}){return _.jsx("div",{"data-slot":"card-footer",className:Mt("flex items-center px-6 [.border-t]:pt-6",n),...a})}var iM="Label",$S=T.forwardRef((n,a)=>_.jsx(re.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())}}));$S.displayName=iM;var sM=$S;function I0({className:n,...a}){return _.jsx(sM,{"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 J0=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(w=>w(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},oM=n=>n?J0(n):J0,lM=n=>n;function uM(n,a=lM){const r=it.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return it.useDebugValue(r),r}const W0=n=>{const a=oM(n),r=s=>uM(a,s);return Object.assign(r,a),r},cM=n=>n?W0(n):W0,ZS=cM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function fM(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 dM=n=>{switch(n){case"success":return pM;case"info":return vM;case"warning":return gM;case"error":return yM;default:return null}},hM=Array(12).fill(0),mM=({visible:n,className:a})=>it.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},it.createElement("div",{className:"sonner-spinner"},hM.map((r,s)=>it.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),pM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),gM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},it.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"})),vM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),yM=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},it.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"})),bM=it.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"},it.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),it.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),SM=()=>{const[n,a]=it.useState(document.hidden);return it.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let kh=1;class xM{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:kh++,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],it.isValidElement(p))c=!1,this.create({id:s,type:"default",message:p});else if(EM(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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...x})}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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:b,...x})}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,x=typeof m=="object"&&!it.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:b,...x})}}).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,w=typeof v=="object"&&!it.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:m,...w})}}).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)||kh++;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 Ke=new xM,wM=(n,a)=>{const r=(a==null?void 0:a.id)||kh++;return Ke.addToast({title:n,...a,id:r}),r},EM=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",RM=wM,TM=()=>Ke.toasts,_M=()=>Ke.getActiveToasts(),tb=Object.assign(RM,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:TM,getToasts:_M});fM("[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 CM=3,AM="24px",OM="16px",eb=4e3,MM=356,DM=14,NM=45,jM=200;function Qn(...n){return n.filter(Boolean).join(" ")}function LM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const zM=n=>{var a,r,s,l,c,f,h,g,p;const{invert:v,toast:m,unstyled:b,interacting:w,setHeights:x,visibleToasts:S,heights:R,index:A,toasts:L,expanded:N,removeToast:B,defaultRichColors:z,closeButton:K,style:q,cancelButtonStyle:P,actionButtonStyle:et,className:Z="",descriptionClassName:st="",duration:rt,position:lt,gap:gt,expandByDefault:ut,classNames:M,icons:X,closeButtonAriaLabel:k="Close toast"}=n,[ot,C]=it.useState(null),[G,tt]=it.useState(null),[$,at]=it.useState(!1),[ft,nt]=it.useState(!1),[pt,yt]=it.useState(!1),[Et,_t]=it.useState(!1),[It,Gt]=it.useState(!1),[pe,on]=it.useState(0),[br,Aa]=it.useState(0),Jt=it.useRef(m.duration||rt||eb),kn=it.useRef(null),ie=it.useRef(null),Sr=A===0,ea=A+1<=S,Ct=m.type,Yt=m.dismissible!==!1,xr=m.className||"",ci=m.descriptionClassName||"",ln=it.useMemo(()=>R.findIndex(Rt=>Rt.toastId===m.id)||0,[R,m.id]),_e=it.useMemo(()=>{var Rt;return(Rt=m.closeButton)!=null?Rt:K},[m.closeButton,K]),_n=it.useMemo(()=>m.duration||rt||eb,[m.duration,rt]),Ce=it.useRef(0),Oa=it.useRef(0),ll=it.useRef(0),Ma=it.useRef(null),[fi,di]=lt.split("-"),Pn=it.useMemo(()=>R.reduce((Rt,se,de)=>de>=ln?Rt:Rt+se.height,0),[R,ln]),wr=SM(),Er=m.invert||v,Us=Ct==="loading";Oa.current=it.useMemo(()=>ln*gt+Pn,[ln,Pn]),it.useEffect(()=>{Jt.current=_n},[_n]),it.useEffect(()=>{at(!0)},[]),it.useEffect(()=>{const Rt=ie.current;if(Rt){const se=Rt.getBoundingClientRect().height;return Aa(se),x(de=>[{toastId:m.id,height:se,position:m.position},...de]),()=>x(de=>de.filter(Ae=>Ae.toastId!==m.id))}},[x,m.id]),it.useLayoutEffect(()=>{if(!$)return;const Rt=ie.current,se=Rt.style.height;Rt.style.height="auto";const de=Rt.getBoundingClientRect().height;Rt.style.height=se,Aa(de),x(Ae=>Ae.find(ge=>ge.toastId===m.id)?Ae.map(ge=>ge.toastId===m.id?{...ge,height:de}:ge):[{toastId:m.id,height:de,position:m.position},...Ae])},[$,m.title,m.description,x,m.id,m.jsx,m.action,m.cancel]);const Cn=it.useCallback(()=>{nt(!0),on(Oa.current),x(Rt=>Rt.filter(se=>se.toastId!==m.id)),setTimeout(()=>{B(m)},jM)},[m,B,x,Oa]);it.useEffect(()=>{if(m.promise&&Ct==="loading"||m.duration===1/0||m.type==="loading")return;let Rt;return N||w||wr?(()=>{if(ll.current<Ce.current){const Ae=new Date().getTime()-Ce.current;Jt.current=Jt.current-Ae}ll.current=new Date().getTime()})():(()=>{Jt.current!==1/0&&(Ce.current=new Date().getTime(),Rt=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Cn()},Jt.current))})(),()=>clearTimeout(Rt)},[N,w,m,Ct,wr,Cn]),it.useEffect(()=>{m.delete&&(Cn(),m.onDismiss==null||m.onDismiss.call(m,m))},[Cn,m.delete]);function ul(){var Rt;if(X!=null&&X.loading){var se;return it.createElement("div",{className:Qn(M==null?void 0:M.loader,m==null||(se=m.classNames)==null?void 0:se.loader,"sonner-loader"),"data-visible":Ct==="loading"},X.loading)}return it.createElement(mM,{className:Qn(M==null?void 0:M.loader,m==null||(Rt=m.classNames)==null?void 0:Rt.loader),visible:Ct==="loading"})}const Bs=m.icon||(X==null?void 0:X[Ct])||dM(Ct);var Da,cl;return it.createElement("li",{tabIndex:0,ref:ie,className:Qn(Z,xr,M==null?void 0:M.toast,m==null||(a=m.classNames)==null?void 0:a.toast,M==null?void 0:M.default,M==null?void 0:M[Ct],m==null||(r=m.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(Da=m.richColors)!=null?Da:z,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":$,"data-promise":!!m.promise,"data-swiped":It,"data-removed":ft,"data-visible":ea,"data-y-position":fi,"data-x-position":di,"data-index":A,"data-front":Sr,"data-swiping":pt,"data-dismissible":Yt,"data-type":Ct,"data-invert":Er,"data-swipe-out":Et,"data-swipe-direction":G,"data-expanded":!!(N||ut&&$),style:{"--index":A,"--toasts-before":A,"--z-index":L.length-A,"--offset":`${ft?pe:Oa.current}px`,"--initial-height":ut?"auto":`${br}px`,...q,...m.style},onDragEnd:()=>{yt(!1),C(null),Ma.current=null},onPointerDown:Rt=>{Rt.button!==2&&(Us||!Yt||(kn.current=new Date,on(Oa.current),Rt.target.setPointerCapture(Rt.pointerId),Rt.target.tagName!=="BUTTON"&&(yt(!0),Ma.current={x:Rt.clientX,y:Rt.clientY})))},onPointerUp:()=>{var Rt,se,de;if(Et||!Yt)return;Ma.current=null;const Ae=Number(((Rt=ie.current)==null?void 0:Rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rr=Number(((se=ie.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((de=kn.current)==null?void 0:de.getTime()),oe=ot==="x"?Ae:Rr,le=Math.abs(oe)/ge;if(Math.abs(oe)>=NM||le>.11){on(Oa.current),m.onDismiss==null||m.onDismiss.call(m,m),tt(ot==="x"?Ae>0?"right":"left":Rr>0?"down":"up"),Cn(),_t(!0);return}else{var $t,xe;($t=ie.current)==null||$t.style.setProperty("--swipe-amount-x","0px"),(xe=ie.current)==null||xe.style.setProperty("--swipe-amount-y","0px")}Gt(!1),yt(!1),C(null)},onPointerMove:Rt=>{var se,de,Ae;if(!Ma.current||!Yt||((se=window.getSelection())==null?void 0:se.toString().length)>0)return;const ge=Rt.clientY-Ma.current.y,oe=Rt.clientX-Ma.current.x;var le;const $t=(le=n.swipeDirections)!=null?le:LM(lt);!ot&&(Math.abs(oe)>1||Math.abs(ge)>1)&&C(Math.abs(oe)>Math.abs(ge)?"x":"y");let xe={x:0,y:0};const hi=na=>1/(1.5+Math.abs(na)/20);if(ot==="y"){if($t.includes("top")||$t.includes("bottom"))if($t.includes("top")&&ge<0||$t.includes("bottom")&&ge>0)xe.y=ge;else{const na=ge*hi(ge);xe.y=Math.abs(na)<Math.abs(ge)?na:ge}}else if(ot==="x"&&($t.includes("left")||$t.includes("right")))if($t.includes("left")&&oe<0||$t.includes("right")&&oe>0)xe.x=oe;else{const na=oe*hi(oe);xe.x=Math.abs(na)<Math.abs(oe)?na:oe}(Math.abs(xe.x)>0||Math.abs(xe.y)>0)&&Gt(!0),(de=ie.current)==null||de.style.setProperty("--swipe-amount-x",`${xe.x}px`),(Ae=ie.current)==null||Ae.style.setProperty("--swipe-amount-y",`${xe.y}px`)}},_e&&!m.jsx&&Ct!=="loading"?it.createElement("button",{"aria-label":k,"data-disabled":Us,"data-close-button":!0,onClick:Us||!Yt?()=>{}:()=>{Cn(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Qn(M==null?void 0:M.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(cl=X==null?void 0:X.close)!=null?cl:bM):null,(Ct||m.icon||m.promise)&&m.icon!==null&&((X==null?void 0:X[Ct])!==null||m.icon)?it.createElement("div",{"data-icon":"",className:Qn(M==null?void 0:M.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,it.createElement("div",{"data-content":"",className:Qn(M==null?void 0:M.content,m==null||(c=m.classNames)==null?void 0:c.content)},it.createElement("div",{"data-title":"",className:Qn(M==null?void 0:M.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?it.createElement("div",{"data-description":"",className:Qn(st,ci,M==null?void 0:M.description,m==null||(h=m.classNames)==null?void 0:h.description)},typeof m.description=="function"?m.description():m.description):null),it.isValidElement(m.cancel)?m.cancel:m.cancel&&Du(m.cancel)?it.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||P,onClick:Rt=>{Du(m.cancel)&&Yt&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Rt),Cn())},className:Qn(M==null?void 0:M.cancelButton,m==null||(g=m.classNames)==null?void 0:g.cancelButton)},m.cancel.label):null,it.isValidElement(m.action)?m.action:m.action&&Du(m.action)?it.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||et,onClick:Rt=>{Du(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Rt),!Rt.defaultPrevented&&Cn())},className:Qn(M==null?void 0:M.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function nb(){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 UM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?OM:AM;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 BM=it.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:w,style:x,visibleToasts:S=CM,toastOptions:R,dir:A=nb(),gap:L=DM,icons:N,containerAriaLabel:B="Notifications"}=a,[z,K]=it.useState([]),q=it.useMemo(()=>Array.from(new Set([l].concat(z.filter(G=>G.position).map(G=>G.position)))),[z,l]),[P,et]=it.useState([]),[Z,st]=it.useState(!1),[rt,lt]=it.useState(!1),[gt,ut]=it.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=it.useRef(null),X=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=it.useRef(null),ot=it.useRef(!1),C=it.useCallback(G=>{K(tt=>{var $;return($=tt.find(at=>at.id===G.id))!=null&&$.delete||Ke.dismiss(G.id),tt.filter(({id:at})=>at!==G.id)})},[]);return it.useEffect(()=>Ke.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{K(tt=>tt.map($=>$.id===G.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Bb.flushSync(()=>{K(tt=>{const $=tt.findIndex(at=>at.id===G.id);return $!==-1?[...tt.slice(0,$),{...tt[$],...G},...tt.slice($+1)]:[G,...tt]})})})}),[z]),it.useEffect(()=>{if(m!=="system"){ut(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ut("dark"):ut("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:tt})=>{ut(tt?"dark":"light")})}catch{G.addListener(({matches:$})=>{try{ut($?"dark":"light")}catch(at){console.error(at)}})}},[m]),it.useEffect(()=>{z.length<=1&&st(!1)},[z]),it.useEffect(()=>{const G=tt=>{var $;if(c.every(nt=>tt[nt]||tt.code===nt)){var ft;st(!0),(ft=M.current)==null||ft.focus()}tt.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&st(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[c]),it.useEffect(()=>{if(M.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,ot.current=!1)}},[M.current]),it.createElement("section",{ref:r,"aria-label":`${B} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},q.map((G,tt)=>{var $;const[at,ft]=G.split("-");return z.length?it.createElement("ol",{key:G,dir:A==="auto"?nb():A,tabIndex:-1,ref:M,className:g,"data-sonner-toaster":!0,"data-sonner-theme":gt,"data-y-position":at,"data-x-position":ft,style:{"--front-toast-height":`${(($=P[0])==null?void 0:$.height)||0}px`,"--width":`${MM}px`,"--gap":`${L}px`,...x,...UM(p,v)},onBlur:nt=>{ot.current&&!nt.currentTarget.contains(nt.relatedTarget)&&(ot.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||ot.current||(ot.current=!0,k.current=nt.relatedTarget)},onMouseEnter:()=>st(!0),onMouseMove:()=>st(!0),onMouseLeave:()=>{rt||st(!1)},onDragEnd:()=>st(!1),onPointerDown:nt=>{nt.target instanceof HTMLElement&&nt.target.dataset.dismissible==="false"||lt(!0)},onPointerUp:()=>lt(!1)},z.filter(nt=>!nt.position&&tt===0||nt.position===G).map((nt,pt)=>{var yt,Et;return it.createElement(zM,{key:nt.id,icons:N,index:pt,toast:nt,defaultRichColors:b,duration:(yt=R==null?void 0:R.duration)!=null?yt:w,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:S,closeButton:(Et=R==null?void 0:R.closeButton)!=null?Et:h,interacting:rt,position:G,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:z.filter(_t=>_t.position==nt.position),heights:P.filter(_t=>_t.position==nt.position),setHeights:et,expandByDefault:f,gap:L,expanded:Z,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(){}},si=typeof window>"u"||"Deno"in globalThis;function Pe(){}function kM(n,a){return typeof n=="function"?n(a):n}function Ph(n){return typeof n=="number"&&n>=0&&n!==1/0}function IS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function mr(n,a){return typeof n=="function"?n(a):n}function wn(n,a){return typeof n=="function"?n(a):n}function ab(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==km(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 rb(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(oi(a.options.mutationKey)!==oi(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function km(n,a){return((a==null?void 0:a.queryKeyHashFn)||oi)(n)}function oi(n){return JSON.stringify(n,(a,r)=>Hh(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 JS(n,a){if(n===a)return n;const r=ib(n)&&ib(a);if(r||Hh(n)&&Hh(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]=JS(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 ib(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Hh(n){if(!sb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!sb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function sb(n){return Object.prototype.toString.call(n)==="[object Object]"}function PM(n){return new Promise(a=>{setTimeout(a,n)})}function qh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?JS(n,a):a}function HM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function qM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Pm=Symbol();function WS(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Pm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function tx(n,a){return typeof n=="function"?n(...a):!!n}var Yr,ar,cs,gb,VM=(gb=class extends Ls{constructor(){super();bt(this,Yr);bt(this,ar);bt(this,cs);ct(this,cs,a=>{if(!si&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,ar)||this.setEventListener(D(this,cs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ar))==null||a.call(this),ct(this,ar,void 0))}setEventListener(a){var r;ct(this,cs,a),(r=D(this,ar))==null||r.call(this),ct(this,ar,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Yr)!==a&&(ct(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,ar=new WeakMap,cs=new WeakMap,gb),Hm=new VM,fs,rr,ds,vb,GM=(vb=class extends Ls{constructor(){super();bt(this,fs,!0);bt(this,rr);bt(this,ds);ct(this,ds,a=>{if(!si&&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,rr)||this.setEventListener(D(this,ds))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,rr))==null||a.call(this),ct(this,rr,void 0))}setEventListener(a){var r;ct(this,ds,a),(r=D(this,rr))==null||r.call(this),ct(this,rr,a(this.setOnline.bind(this)))}setOnline(a){D(this,fs)!==a&&(ct(this,fs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,fs)}},fs=new WeakMap,rr=new WeakMap,ds=new WeakMap,vb),rc=new GM;function Vh(){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 YM(n){return Math.min(1e3*2**n,3e4)}function ex(n){return(n??"online")==="online"?rc.isOnline():!0}var nx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function dh(n){return n instanceof nx}function ax(n){let a=!1,r=0,s=!1,l;const c=Vh(),f=S=>{var R;s||(b(new nx(S)),(R=n.abort)==null||R.call(n))},h=()=>{a=!0},g=()=>{a=!1},p=()=>Hm.isFocused()&&(n.networkMode==="always"||rc.isOnline())&&n.canRun(),v=()=>ex(n.networkMode)&&n.canRun(),m=S=>{var R;s||(s=!0,(R=n.onSuccess)==null||R.call(n,S),l==null||l(),c.resolve(S))},b=S=>{var R;s||(s=!0,(R=n.onError)==null||R.call(n,S),l==null||l(),c.reject(S))},w=()=>new Promise(S=>{var R;l=A=>{(s||p())&&S(A)},(R=n.onPause)==null||R.call(n)}).then(()=>{var S;l=void 0,s||(S=n.onContinue)==null||S.call(n)}),x=()=>{if(s)return;let S;const R=r===0?n.initialPromise:void 0;try{S=R??n.fn()}catch(A){S=Promise.reject(A)}Promise.resolve(S).then(m).catch(A=>{var K;if(s)return;const L=n.retry??(si?0:3),N=n.retryDelay??YM,B=typeof N=="function"?N(r,A):N,z=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,A);if(a||!z){b(A);return}r++,(K=n.onFail)==null||K.call(n,r,A),PM(B).then(()=>p()?void 0:w()).then(()=>{a?b(A):x()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?x():w().then(x),c)}}var FM=n=>setTimeout(n,0);function QM(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=FM;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 Se=QM(),Fr,yb,rx=(yb=class{constructor(){bt(this,Fr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ph(this.gcTime)&&ct(this,Fr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(si?1/0:5*60*1e3))}clearGcTimeout(){D(this,Fr)&&(clearTimeout(D(this,Fr)),ct(this,Fr,void 0))}},Fr=new WeakMap,yb),hs,Qr,bn,Kr,Le,Xo,Xr,Dn,ba,bb,KM=(bb=class extends rx{constructor(a){super();bt(this,Dn);bt(this,hs);bt(this,Qr);bt(this,bn);bt(this,Kr);bt(this,Le);bt(this,Xo);bt(this,Xr);ct(this,Xr,!1),ct(this,Xo,a.defaultOptions),this.setOptions(a.options),this.observers=[],ct(this,Kr,a.client),ct(this,bn,D(this,Kr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,ct(this,hs,XM(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,Le))==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,bn).remove(this)}setData(a,r){const s=qh(this.state.data,a,this.options);return Ot(this,Dn,ba).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,Dn,ba).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,Le))==null?void 0:s.promise;return(l=D(this,Le))==null||l.cancel(a),r?r.then(Pe).catch(Pe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,hs))}isActive(){return this.observers.some(a=>wn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>mr(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:!IS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Le))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,Le))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,bn).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,Le)&&(D(this,Xr)?D(this,Le).cancel({revert:!0}):D(this,Le).cancelRetry()),this.scheduleGc()),D(this,bn).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,Dn,ba).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,Le))return D(this,Le).continueRetry(),D(this,Le).promise}if(a&&this.setOptions(a),!this.options.queryFn){const b=this.observers.find(w=>w.options.queryFn);b&&this.setOptions(b.options)}const s=new AbortController,l=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ct(this,Xr,!0),s.signal)})},c=()=>{const b=WS(this.options,r),x=(()=>{const S={client:D(this,Kr),queryKey:this.queryKey,meta:this.meta};return l(S),S})();return ct(this,Xr,!1),this.options.persister?this.options.persister(b,x,this):b(x)},h=(()=>{const b={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Kr),state:this.state,fetchFn:c};return l(b),b})();(p=this.options.behavior)==null||p.onFetch(h,this),ct(this,Qr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ot(this,Dn,ba).call(this,{type:"fetch",meta:(m=h.fetchOptions)==null?void 0:m.meta});const g=b=>{var w,x,S,R;dh(b)&&b.silent||Ot(this,Dn,ba).call(this,{type:"error",error:b}),dh(b)||((x=(w=D(this,bn).config).onError)==null||x.call(w,b,this),(R=(S=D(this,bn).config).onSettled)==null||R.call(S,this.state.data,b,this)),this.scheduleGc()};return ct(this,Le,ax({initialPromise:r==null?void 0:r.initialPromise,fn:h.fetchFn,abort:s.abort.bind(s),onSuccess:b=>{var w,x,S,R;if(b===void 0){g(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(b)}catch(A){g(A);return}(x=(w=D(this,bn).config).onSuccess)==null||x.call(w,b,this),(R=(S=D(this,bn).config).onSettled)==null||R.call(S,b,this.state.error,this),this.scheduleGc()},onError:g,onFail:(b,w)=>{Ot(this,Dn,ba).call(this,{type:"failed",failureCount:b,error:w})},onPause:()=>{Ot(this,Dn,ba).call(this,{type:"pause"})},onContinue:()=>{Ot(this,Dn,ba).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0})),D(this,Le).start()}},hs=new WeakMap,Qr=new WeakMap,bn=new WeakMap,Kr=new WeakMap,Le=new WeakMap,Xo=new WeakMap,Xr=new WeakMap,Dn=new WeakSet,ba=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,...ix(s.data,this.options),fetchMeta:a.meta??null};case"success":return ct(this,Qr,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 dh(l)&&l.revert&&D(this,Qr)?{...D(this,Qr),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),Se.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,bn).notify({query:this,type:"updated",action:a})})},bb);function ix(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ex(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function XM(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 Xn,Sb,$M=(Sb=class extends Ls{constructor(a={}){super();bt(this,Xn);this.config=a,ct(this,Xn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??km(l,r);let f=this.get(c);return f||(f=new KM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Xn).has(a.queryHash)||(D(this,Xn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Xn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Xn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){Se.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Xn).get(a)}getAll(){return[...D(this,Xn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>ab(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>ab(a,s)):r}notify(a){Se.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){Se.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){Se.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Xn=new WeakMap,Sb),$n,Be,$r,Zn,nr,xb,ZM=(xb=class extends rx{constructor(a){super();bt(this,Zn);bt(this,$n);bt(this,Be);bt(this,$r);this.mutationId=a.mutationId,ct(this,Be,a.mutationCache),ct(this,$n,[]),this.state=a.state||sx(),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,$n).includes(a)||(D(this,$n).push(a),this.clearGcTimeout(),D(this,Be).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){ct(this,$n,D(this,$n).filter(r=>r!==a)),this.scheduleGc(),D(this,Be).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,$n).length||(this.state.status==="pending"?this.scheduleGc():D(this,Be).remove(this))}continue(){var a;return((a=D(this,$r))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,p,v,m,b,w,x,S,R,A,L,N,B,z,K,q,P;const r=()=>{Ot(this,Zn,nr).call(this,{type:"continue"})};ct(this,$r,ax({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(et,Z)=>{Ot(this,Zn,nr).call(this,{type:"failed",failureCount:et,error:Z})},onPause:()=>{Ot(this,Zn,nr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Be).canRun(this)}));const s=this.state.status==="pending",l=!D(this,$r).canStart();try{if(s)r();else{Ot(this,Zn,nr).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,Be).config).onMutate)==null?void 0:f.call(c,a,this));const Z=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));Z!==this.state.context&&Ot(this,Zn,nr).call(this,{type:"pending",context:Z,variables:a,isPaused:l})}const et=await D(this,$r).start();return await((v=(p=D(this,Be).config).onSuccess)==null?void 0:v.call(p,et,a,this.state.context,this)),await((b=(m=this.options).onSuccess)==null?void 0:b.call(m,et,a,this.state.context)),await((x=(w=D(this,Be).config).onSettled)==null?void 0:x.call(w,et,null,this.state.variables,this.state.context,this)),await((R=(S=this.options).onSettled)==null?void 0:R.call(S,et,null,a,this.state.context)),Ot(this,Zn,nr).call(this,{type:"success",data:et}),et}catch(et){try{throw await((L=(A=D(this,Be).config).onError)==null?void 0:L.call(A,et,a,this.state.context,this)),await((B=(N=this.options).onError)==null?void 0:B.call(N,et,a,this.state.context)),await((K=(z=D(this,Be).config).onSettled)==null?void 0:K.call(z,void 0,et,this.state.variables,this.state.context,this)),await((P=(q=this.options).onSettled)==null?void 0:P.call(q,void 0,et,a,this.state.context)),et}finally{Ot(this,Zn,nr).call(this,{type:"error",error:et})}}finally{D(this,Be).runNext(this)}}},$n=new WeakMap,Be=new WeakMap,$r=new WeakMap,Zn=new WeakSet,nr=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),Se.batch(()=>{D(this,$n).forEach(s=>{s.onMutationUpdate(a)}),D(this,Be).notify({mutation:this,type:"updated",action:a})})},xb);function sx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,Nn,$o,wb,IM=(wb=class extends Ls{constructor(a={}){super();bt(this,Sa);bt(this,Nn);bt(this,$o);this.config=a,ct(this,Sa,new Set),ct(this,Nn,new Map),ct(this,$o,0)}build(a,r,s){const l=new ZM({mutationCache:this,mutationId:++xu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,Sa).add(a);const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).get(r);s?s.push(a):D(this,Nn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,Sa).delete(a)){const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).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,Nn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=Nu(a);if(typeof r=="string"){const s=D(this,Nn).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,Nn).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(){Se.batch(()=>{D(this,Sa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,Sa).clear(),D(this,Nn).clear()})}getAll(){return Array.from(D(this,Sa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>rb(r,s))}findAll(a={}){return this.getAll().filter(r=>rb(a,r))}notify(a){Se.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return Se.batch(()=>Promise.all(a.map(r=>r.continue().catch(Pe))))}},Sa=new WeakMap,Nn=new WeakMap,$o=new WeakMap,wb);function Nu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function ob(n){return{onFetch:(a,r)=>{var v,m,b,w,x;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=((w=a.state.data)==null?void 0:w.pages)||[],f=((x=a.state.data)==null?void 0:x.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const p=async()=>{let S=!1;const R=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(a.signal.aborted?S=!0:a.signal.addEventListener("abort",()=>{S=!0}),a.signal)})},A=WS(a.options,a.fetchOptions),L=async(N,B,z)=>{if(S)return Promise.reject();if(B==null&&N.pages.length)return Promise.resolve(N);const q=(()=>{const st={client:a.client,queryKey:a.queryKey,pageParam:B,direction:z?"backward":"forward",meta:a.options.meta};return R(st),st})(),P=await A(q),{maxPages:et}=a.options,Z=z?qM:HM;return{pages:Z(N.pages,P,et),pageParams:Z(N.pageParams,B,et)}};if(l&&c.length){const N=l==="backward",B=N?JM:lb,z={pages:c,pageParams:f},K=B(s,z);h=await L(z,K,N)}else{const N=n??c.length;do{const B=g===0?f[0]??s.initialPageParam:lb(s,h);if(g>0&&B==null)break;h=await L(h,B),g++}while(g<N)}return h};a.options.persister?a.fetchFn=()=>{var S,R;return(R=(S=a.options).persister)==null?void 0:R.call(S,p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=p}}}function lb(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 JM(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 ae,ir,sr,ms,ps,or,gs,vs,Eb,WM=(Eb=class{constructor(n={}){bt(this,ae);bt(this,ir);bt(this,sr);bt(this,ms);bt(this,ps);bt(this,or);bt(this,gs);bt(this,vs);ct(this,ae,n.queryCache||new $M),ct(this,ir,n.mutationCache||new IM),ct(this,sr,n.defaultOptions||{}),ct(this,ms,new Map),ct(this,ps,new Map),ct(this,or,0)}mount(){xu(this,or)._++,D(this,or)===1&&(ct(this,gs,Hm.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onFocus())})),ct(this,vs,rc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onOnline())})))}unmount(){var n,a;xu(this,or)._--,D(this,or)===0&&((n=D(this,gs))==null||n.call(this),ct(this,gs,void 0),(a=D(this,vs))==null||a.call(this),ct(this,vs,void 0))}isFetching(n){return D(this,ae).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,ir).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const a=this.defaultQueryOptions({queryKey:n});return(r=D(this,ae).get(a.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),r=D(this,ae).build(this,a),s=r.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(mr(a.staleTime,r))&&this.prefetchQuery(a),Promise.resolve(s))}getQueriesData(n){return D(this,ae).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,ae).get(s.queryHash),c=l==null?void 0:l.state.data,f=kM(a,c);if(f!==void 0)return D(this,ae).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return Se.batch(()=>D(this,ae).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,ae).get(a.queryHash))==null?void 0:r.state}removeQueries(n){const a=D(this,ae);Se.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,ae);return Se.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=Se.batch(()=>D(this,ae).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Pe).catch(Pe)}invalidateQueries(n,a={}){return Se.batch(()=>(D(this,ae).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=Se.batch(()=>D(this,ae).findAll(n).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,r);return r.throwOnError||(c=c.catch(Pe)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Pe)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,ae).build(this,a);return r.isStaleByTime(mr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Pe).catch(Pe)}fetchInfiniteQuery(n){return n.behavior=ob(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Pe).catch(Pe)}ensureInfiniteQueryData(n){return n.behavior=ob(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return rc.isOnline()?D(this,ir).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,ae)}getMutationCache(){return D(this,ir)}getDefaultOptions(){return D(this,sr)}setDefaultOptions(n){ct(this,sr,n)}setQueryDefaults(n,a){D(this,ms).set(oi(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(oi(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,sr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=km(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===Pm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,sr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,ae).clear(),D(this,ir).clear()}},ae=new WeakMap,ir=new WeakMap,sr=new WeakMap,ms=new WeakMap,ps=new WeakMap,or=new WeakMap,gs=new WeakMap,vs=new WeakMap,Eb),Fe,Ut,Zo,ke,Zr,ys,lr,ur,Io,bs,Ss,Ir,Jr,cr,xs,Ht,Po,Gh,Yh,Fh,Qh,Kh,Xh,$h,ox,Rb,t3=(Rb=class extends Ls{constructor(a,r){super();bt(this,Ht);bt(this,Fe);bt(this,Ut);bt(this,Zo);bt(this,ke);bt(this,Zr);bt(this,ys);bt(this,lr);bt(this,ur);bt(this,Io);bt(this,bs);bt(this,Ss);bt(this,Ir);bt(this,Jr);bt(this,cr);bt(this,xs,new Set);this.options=r,ct(this,Fe,a),ct(this,ur,null),ct(this,lr,Vh()),this.options.experimental_prefetchInRender||D(this,lr).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),ub(D(this,Ut),this.options)?Ot(this,Ht,Po).call(this):this.updateResult(),Ot(this,Ht,Qh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zh(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zh(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,Ht,Kh).call(this),Ot(this,Ht,Xh).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,Fe).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wn(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,Ht,$h).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!ac(this.options,r)&&D(this,Fe).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&cb(D(this,Ut),s,this.options,r)&&Ot(this,Ht,Po).call(this),this.updateResult(),l&&(D(this,Ut)!==s||wn(this.options.enabled,D(this,Ut))!==wn(r.enabled,D(this,Ut))||mr(this.options.staleTime,D(this,Ut))!==mr(r.staleTime,D(this,Ut)))&&Ot(this,Ht,Gh).call(this);const c=Ot(this,Ht,Yh).call(this);l&&(D(this,Ut)!==s||wn(this.options.enabled,D(this,Ut))!==wn(r.enabled,D(this,Ut))||c!==D(this,cr))&&Ot(this,Ht,Fh).call(this,c)}getOptimisticResult(a){const r=D(this,Fe).getQueryCache().build(D(this,Fe),a),s=this.createResult(r,a);return n3(this,s)&&(ct(this,ke,s),ct(this,ys,this.options),ct(this,Zr,D(this,Ut).state)),s}getCurrentResult(){return D(this,ke)}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,Fe).defaultQueryOptions(a),s=D(this,Fe).getQueryCache().build(D(this,Fe),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return Ot(this,Ht,Po).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,ke)))}createResult(a,r){var et;const s=D(this,Ut),l=this.options,c=D(this,ke),f=D(this,Zr),h=D(this,ys),p=a!==s?a.state:D(this,Zo),{state:v}=a;let m={...v},b=!1,w;if(r._optimisticResults){const Z=this.hasListeners(),st=!Z&&ub(a,r),rt=Z&&cb(a,s,r,l);(st||rt)&&(m={...m,...ix(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:R}=m;w=m.data;let A=!1;if(r.placeholderData!==void 0&&w===void 0&&R==="pending"){let Z;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(Z=c.data,A=!0):Z=typeof r.placeholderData=="function"?r.placeholderData((et=D(this,Ss))==null?void 0:et.state.data,D(this,Ss)):r.placeholderData,Z!==void 0&&(R="success",w=qh(c==null?void 0:c.data,Z,r),b=!0)}if(r.select&&w!==void 0&&!A)if(c&&w===(f==null?void 0:f.data)&&r.select===D(this,Io))w=D(this,bs);else try{ct(this,Io,r.select),w=r.select(w),w=qh(c==null?void 0:c.data,w,r),ct(this,bs,w),ct(this,ur,null)}catch(Z){ct(this,ur,Z)}D(this,ur)&&(x=D(this,ur),w=D(this,bs),S=Date.now(),R="error");const L=m.fetchStatus==="fetching",N=R==="pending",B=R==="error",z=N&&L,K=w!==void 0,P={status:R,fetchStatus:m.fetchStatus,isPending:N,isSuccess:R==="success",isError:B,isInitialLoading:z,isLoading:z,data:w,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:S,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:L,isRefetching:L&&!N,isLoadingError:B&&!K,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:B&&K,isStale:qm(a,r),refetch:this.refetch,promise:D(this,lr),isEnabled:wn(r.enabled,a)!==!1};if(this.options.experimental_prefetchInRender){const Z=lt=>{P.status==="error"?lt.reject(P.error):P.data!==void 0&<.resolve(P.data)},st=()=>{const lt=ct(this,lr,P.promise=Vh());Z(lt)},rt=D(this,lr);switch(rt.status){case"pending":a.queryHash===s.queryHash&&Z(rt);break;case"fulfilled":(P.status==="error"||P.data!==rt.value)&&st();break;case"rejected":(P.status!=="error"||P.error!==rt.reason)&&st();break}}return P}updateResult(){const a=D(this,ke),r=this.createResult(D(this,Ut),this.options);if(ct(this,Zr,D(this,Ut).state),ct(this,ys,this.options),D(this,Zr).data!==void 0&&ct(this,Ss,D(this,Ut)),ac(r,a))return;ct(this,ke,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,ke)).some(h=>{const g=h;return D(this,ke)[g]!==a[g]&&f.has(g)})};Ot(this,Ht,ox).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,Ht,Qh).call(this)}},Fe=new WeakMap,Ut=new WeakMap,Zo=new WeakMap,ke=new WeakMap,Zr=new WeakMap,ys=new WeakMap,lr=new WeakMap,ur=new WeakMap,Io=new WeakMap,bs=new WeakMap,Ss=new WeakMap,Ir=new WeakMap,Jr=new WeakMap,cr=new WeakMap,xs=new WeakMap,Ht=new WeakSet,Po=function(a){Ot(this,Ht,$h).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Pe)),r},Gh=function(){Ot(this,Ht,Kh).call(this);const a=mr(this.options.staleTime,D(this,Ut));if(si||D(this,ke).isStale||!Ph(a))return;const s=IS(D(this,ke).dataUpdatedAt,a)+1;ct(this,Ir,setTimeout(()=>{D(this,ke).isStale||this.updateResult()},s))},Yh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Fh=function(a){Ot(this,Ht,Xh).call(this),ct(this,cr,a),!(si||wn(this.options.enabled,D(this,Ut))===!1||!Ph(D(this,cr))||D(this,cr)===0)&&ct(this,Jr,setInterval(()=>{(this.options.refetchIntervalInBackground||Hm.isFocused())&&Ot(this,Ht,Po).call(this)},D(this,cr)))},Qh=function(){Ot(this,Ht,Gh).call(this),Ot(this,Ht,Fh).call(this,Ot(this,Ht,Yh).call(this))},Kh=function(){D(this,Ir)&&(clearTimeout(D(this,Ir)),ct(this,Ir,void 0))},Xh=function(){D(this,Jr)&&(clearInterval(D(this,Jr)),ct(this,Jr,void 0))},$h=function(){const a=D(this,Fe).getQueryCache().build(D(this,Fe),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);ct(this,Ut,a),ct(this,Zo,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ox=function(a){Se.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,ke))}),D(this,Fe).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},Rb);function e3(n,a){return wn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function ub(n,a){return e3(n,a)||n.state.data!==void 0&&Zh(n,a,a.refetchOnMount)}function Zh(n,a,r){if(wn(a.enabled,n)!==!1&&mr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&qm(n,a)}return!1}function cb(n,a,r,s){return(n!==a||wn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&qm(n,r)}function qm(n,a){return wn(a.enabled,n)!==!1&&n.isStaleByTime(mr(a.staleTime,n))}function n3(n,a){return!ac(n.getCurrentResult(),a)}var fr,dr,Qe,xa,Ra,Hu,Ih,Tb,a3=(Tb=class extends Ls{constructor(r,s){super();bt(this,Ra);bt(this,fr);bt(this,dr);bt(this,Qe);bt(this,xa);ct(this,fr,r),this.setOptions(s),this.bindMethods(),Ot(this,Ra,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,fr).defaultMutationOptions(r),ac(this.options,s)||D(this,fr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Qe),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&oi(s.mutationKey)!==oi(this.options.mutationKey)?this.reset():((l=D(this,Qe))==null?void 0:l.state.status)==="pending"&&D(this,Qe).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Qe))==null||r.removeObserver(this)}onMutationUpdate(r){Ot(this,Ra,Hu).call(this),Ot(this,Ra,Ih).call(this,r)}getCurrentResult(){return D(this,dr)}reset(){var r;(r=D(this,Qe))==null||r.removeObserver(this),ct(this,Qe,void 0),Ot(this,Ra,Hu).call(this),Ot(this,Ra,Ih).call(this)}mutate(r,s){var l;return ct(this,xa,s),(l=D(this,Qe))==null||l.removeObserver(this),ct(this,Qe,D(this,fr).getMutationCache().build(D(this,fr),this.options)),D(this,Qe).addObserver(this),D(this,Qe).execute(r)}},fr=new WeakMap,dr=new WeakMap,Qe=new WeakMap,xa=new WeakMap,Ra=new WeakSet,Hu=function(){var s;const r=((s=D(this,Qe))==null?void 0:s.state)??sx();ct(this,dr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ih=function(r){Se.batch(()=>{var s,l,c,f,h,g,p,v;if(D(this,xa)&&this.hasListeners()){const m=D(this,dr).variables,b=D(this,dr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,xa)).onSuccess)==null||l.call(s,r.data,m,b),(f=(c=D(this,xa)).onSettled)==null||f.call(c,r.data,null,m,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,xa)).onError)==null||g.call(h,r.error,m,b),(v=(p=D(this,xa)).onSettled)==null||v.call(p,void 0,r.error,m,b))}this.listeners.forEach(m=>{m(D(this,dr))})})},Tb),lx=T.createContext(void 0),ux=n=>{const a=T.useContext(lx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},r3=({client:n,children:a})=>(T.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),_.jsx(lx.Provider,{value:n,children:a})),cx=T.createContext(!1),i3=()=>T.useContext(cx);cx.Provider;function s3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var o3=T.createContext(s3()),l3=()=>T.useContext(o3),u3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},c3=n=>{T.useEffect(()=>{n.clearReset()},[n])},f3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||tx(r,[n.error,s])),d3=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))}},h3=(n,a)=>n.isLoading&&n.isFetching&&!a,m3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,fb=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function p3(n,a,r){var m,b,w,x,S;const s=i3(),l=l3(),c=ux(),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",d3(f),u3(f,l),c3(l);const h=!c.getQueryCache().get(f.queryHash),[g]=T.useState(()=>new a(c,f)),p=g.getOptimisticResult(f),v=!s&&n.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(R=>{const A=v?g.subscribe(Se.batchCalls(R)):Pe;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),T.useEffect(()=>{g.setOptions(f)},[f,g]),m3(f,p))throw fb(f,g,l);if(f3({result:p,errorResetBoundary:l,throwOnError:f.throwOnError,query:c.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw p.error;if((x=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||x.call(w,f,p),f.experimental_prefetchInRender&&!si&&h3(p,s)){const R=h?fb(f,g,l):(S=c.getQueryCache().get(f.queryHash))==null?void 0:S.promise;R==null||R.catch(Pe).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?p:g.trackResult(p)}function g3(n,a){return p3(n,t3)}function v3(n,a){const r=ux(),[s]=T.useState(()=>new a3(r,n));T.useEffect(()=>{s.setOptions(n)},[s,n]);const l=T.useSyncExternalStore(T.useCallback(f=>s.subscribe(Se.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=T.useCallback((f,h)=>{s.mutate(f,h).catch(Pe)},[s]);if(l.error&&tx(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function y3(){return _.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Yb,{className:"size-8 animate-spin"})})}function b3({className:n,...a}){const{setAuthenticated:r}=ZS(),[s,l]=T.useState(""),[c,f]=T.useState(""),h=Bm(),{isPending:g,mutate:p}=v3({mutationFn:async()=>h.login(s,c),onError(){tb.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){tb.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?_.jsx(y3,{}):_.jsx("div",{className:Mt("flex flex-col gap-6 w-[20%]",n),...a,children:_.jsxs(tM,{children:[_.jsxs(eM,{children:[_.jsx(nM,{className:"text-2xl",children:"Login"}),_.jsx(aM,{children:"Enter your credentials below to proceed"})]}),_.jsx(rM,{children:_.jsxs("div",{className:"flex flex-col gap-6",children:[_.jsxs("div",{className:"grid gap-2",children:[_.jsx(I0,{htmlFor:"username",children:"Username"}),_.jsx(m0,{id:"username",type:"username",placeholder:"Enter your username",required:!0,value:s,onChange:v=>l(v.target.value)})]}),_.jsxs("div",{className:"grid gap-2",children:[_.jsx("div",{className:"flex items-center",children:_.jsx(I0,{htmlFor:"password",children:"Password"})}),_.jsx(m0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),_.jsx(o1,{type:"button",className:"w-full",onClick:()=>{p()},children:"Login"})]})})]})})}function S3({children:n}){const{authenticated:a,setAuthenticated:r}=ZS(),s=Bm(),{isLoading:l,isError:c}=g3({queryKey:[],enabled:!a,queryFn:async()=>{const f=await s.fetchMe();return r(!!f),f},refetchOnWindowFocus:!0});return l?_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Yb,{className:"size-8 animate-spin"})}):c?_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx("h1",{className:"text-2xl text-red-500",children:"An error occurred while fetching user data."})}):a?_.jsx(_.Fragment,{children:n}):_.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(b3,{})})}function x3({...n}){return _.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function w3({className:n,...a}){return _.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 hh({className:n,...a}){return _.jsx("li",{"data-slot":"breadcrumb-item",className:Mt("inline-flex items-center gap-1.5",n),...a})}function db({asChild:n,className:a,...r}){const s=n?tl:"a";return _.jsx(s,{"data-slot":"breadcrumb-link",className:Mt("hover:text-foreground transition-colors",a),...r})}function E3({className:n,...a}){return _.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Mt("text-foreground font-normal",n),...a})}function hb({children:n,className:a,...r}){return _.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Mt("[&>svg]:size-3.5",a),...r,children:n??_.jsx(WR,{})})}function R3(){const{toggleSidebar:n}=Mm();return _.jsx("header",{className:"bg-background sticky top-0 z-50 flex w-full items-center border-b",children:_.jsxs("div",{className:"flex h-(--header-height) w-full items-center gap-2 px-4",children:[_.jsx(o1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:_.jsx(e2,{})}),_.jsx(OT,{orientation:"vertical",className:"mr-2 h-4"}),_.jsx(x3,{className:"hidden sm:block",children:_.jsxs(w3,{children:[_.jsx(hh,{children:_.jsx(db,{href:"#",children:"/"})}),_.jsx(hb,{}),_.jsx(hh,{children:_.jsx(E3,{children:"CommandKit"})}),_.jsx(hb,{}),_.jsx(hh,{children:_.jsx(db,{href:"#",children:"DevTools"})})]})})]})})}var T3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,p=["light","dark"];function v(w){(Array.isArray(n)?n:[n]).forEach(x=>{let S=x==="class",R=S&&c?l.map(A=>c[A]||A):l;S?(g.classList.remove(...R),g.classList.add(c&&c[w]?c[w]:w)):g.setAttribute(x,w)}),m(w)}function m(w){h&&p.includes(w)&&(g.style.colorScheme=w)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let w=localStorage.getItem(a)||r,x=f&&w==="system"?b():w;v(x)}catch{}},mb=["light","dark"],fx="(prefers-color-scheme: dark)",_3=typeof window>"u",Vm=T.createContext(void 0),C3={setTheme:n=>{},themes:[]},A3=()=>{var n;return(n=T.useContext(Vm))!=null?n:C3},O3=n=>T.useContext(Vm)?T.createElement(T.Fragment,null,n.children):T.createElement(D3,{...n}),M3=["light","dark"],D3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=M3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:p,nonce:v,scriptProps:m})=>{let[b,w]=T.useState(()=>j3(l,f)),[x,S]=T.useState(()=>b==="system"?mh():b),R=g?Object.values(g):c,A=T.useCallback(z=>{let K=z;if(!K)return;z==="system"&&r&&(K=mh());let q=g?g[K]:K,P=a?L3(v):null,et=document.documentElement,Z=st=>{st==="class"?(et.classList.remove(...R),q&&et.classList.add(q)):st.startsWith("data-")&&(q?et.setAttribute(st,q):et.removeAttribute(st))};if(Array.isArray(h)?h.forEach(Z):Z(h),s){let st=mb.includes(f)?f:null,rt=mb.includes(K)?K:st;et.style.colorScheme=rt}P==null||P()},[v]),L=T.useCallback(z=>{let K=typeof z=="function"?z(b):z;w(K);try{localStorage.setItem(l,K)}catch{}},[b]),N=T.useCallback(z=>{let K=mh(z);S(K),b==="system"&&r&&!n&&A("system")},[b,n]);T.useEffect(()=>{let z=window.matchMedia(fx);return z.addListener(N),N(z),()=>z.removeListener(N)},[N]),T.useEffect(()=>{let z=K=>{K.key===l&&(K.newValue?w(K.newValue):L(f))};return window.addEventListener("storage",z),()=>window.removeEventListener("storage",z)},[L]),T.useEffect(()=>{A(n??b)},[n,b]);let B=T.useMemo(()=>({theme:b,setTheme:L,forcedTheme:n,resolvedTheme:b==="system"?x:b,themes:r?[...c,"system"]:c,systemTheme:r?x:void 0}),[b,L,n,x,r,c]);return T.createElement(Vm.Provider,{value:B},T.createElement(N3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:m}),p)},N3=T.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 T.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${T3.toString()})(${v})`}})}),j3=(n,a)=>{if(_3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},L3=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)}},mh=n=>(n||(n=window.matchMedia(fx)),n.matches?"dark":"light");const z3=({...n})=>{const{theme:a="system"}=A3();return _.jsx(BM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},ui=jR({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:U3});function U3(){return _.jsxs(O3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[_.jsx(z3,{}),_.jsx(J4,{children:_.jsx(S3,{children:_.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:_.jsxs(QA,{className:"flex flex-col",children:[_.jsx(R3,{}),_.jsxs("div",{className:"flex flex-1",children:[_.jsx(W4,{}),_.jsx(XA,{children:_.jsx(Hb,{})})]})]})})})})]})}const B3="modulepreload",k3=function(n){return"/"+n},pb={},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=k3(p),p in pb)return;pb[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":B3,v||(b.as="script"),b.crossOrigin="",b.href=p,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((w,x)=>{b.addEventListener("load",w),b.addEventListener("error",()=>x(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)})},P3=()=>zs(()=>import("./plugins-CErjVBuO.js"),[]),H3=pr("/plugins")({component:Cs(P3,"component")}),q3=()=>zs(()=>import("./guilds-DhkTpEDq.js"),[]),V3=pr("/guilds")({component:Cs(q3,"component")}),G3=()=>zs(()=>import("./feature-flags-aoUi_pnz.js"),[]),Y3=pr("/feature-flags")({component:Cs(G3,"component")}),F3=()=>zs(()=>import("./events-KulS_s3p.js"),[]),Q3=pr("/events")({component:Cs(F3,"component")}),K3=()=>zs(()=>import("./commands-CjiilQm0.js"),[]),X3=pr("/commands")({component:Cs(K3,"component")}),$3=()=>zs(()=>import("./index-BG6A6wjb.js"),[]),Z3=pr("/")({component:Cs($3,"component")}),I3=H3.update({id:"/plugins",path:"/plugins",getParentRoute:()=>ui}),J3=V3.update({id:"/guilds",path:"/guilds",getParentRoute:()=>ui}),W3=Y3.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>ui}),tD=Q3.update({id:"/events",path:"/events",getParentRoute:()=>ui}),eD=X3.update({id:"/commands",path:"/commands",getParentRoute:()=>ui}),nD=Z3.update({id:"/",path:"/",getParentRoute:()=>ui}),aD={IndexRoute:nD,CommandsRoute:eD,EventsRoute:tD,FeatureFlagsRoute:W3,GuildsRoute:J3,PluginsRoute:I3},rD=ui._addFileChildren(aD)._addFileTypes(),iD=VR({routeTree:rD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),sD=new WM;DE.createRoot(document.getElementById("root")).render(_.jsx(T.StrictMode,{children:_.jsx(r3,{client:sD,children:_.jsx(FR,{router:iD})})}));export{dO as A,gO as B,tM as C,y3 as L,g3 as a,eM as b,hO as c,mO as d,rM as e,nM as f,_b as g,aM as h,yr as i,_ as j,WR as k,ND as l,_s as m,o1 as n,T as r,Bm as u};
|
|
@@ -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-O-pLm2wg.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-O-pLm2wg.js"></script>
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-D4m_49dy.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|