@commandkit/devtools 0.0.0-dev.20250705020045 → 0.0.0-dev.20250705124848

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commandkit/devtools",
3
3
  "description": "CommandKit devtools",
4
- "version": "0.0.0-dev.20250705020045",
4
+ "version": "0.0.0-dev.20250705124848",
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.20250705020045",
14
- "tsconfig": "0.0.0-dev.20250705020045"
13
+ "commandkit": "1.0.0-dev.20250705124848",
14
+ "tsconfig": "0.0.0-dev.20250705124848"
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-QRiOOnxJ.js";/**
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-IGsUAs4N.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-QRiOOnxJ.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
+ import{u as x,a as p,r as o,j as e,L as u,B as c}from"./index-IGsUAs4N.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-QRiOOnxJ.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
+ import{u as i,a as o,j as e,L as c,B as d}from"./index-IGsUAs4N.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-QRiOOnxJ.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
+ 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-IGsUAs4N.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-QRiOOnxJ.js";/**
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-IGsUAs4N.js";/**
2
2
  * @license lucide-react v0.525.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -124,7 +124,7 @@ Error generating stack: `+i.message+`
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const fR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dR=vr("x",fR);var Hb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Jy=ot.createContext&&ot.createContext(Hb),hR=["attr","size","title"];function mR(n,a){if(n==null)return{};var r=pR(n,a),s,l;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(l=0;l<c.length;l++)s=c[l],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(r[s]=n[s])}return r}function pR(n,a){if(n==null)return{};var r={};for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){if(a.indexOf(s)>=0)continue;r[s]=n[s]}return r}function Iu(){return Iu=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Iu.apply(this,arguments)}function Wy(n,a){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),r.push.apply(r,s)}return r}function Ju(n){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?Wy(Object(r),!0).forEach(function(s){gR(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}function gR(n,a,r){return a=vR(a),a in n?Object.defineProperty(n,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[a]=r,n}function vR(n){var a=yR(n,"string");return typeof a=="symbol"?a:a+""}function yR(n,a){if(typeof n!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,a);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}function qb(n){return n&&n.map((a,r)=>ot.createElement(a.tag,Ju({key:r},a.attr),qb(a.child)))}function rm(n){return a=>ot.createElement(bR,Iu({attr:Ju({},n.attr)},a),qb(n.child))}function bR(n){var a=r=>{var{attr:s,size:l,title:c}=n,f=mR(n,hR),h=l||r.size||"1em",g;return r.className&&(g=r.className),n.className&&(g=(g?g+" ":"")+n.className),ot.createElement("svg",Iu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,s,f,{className:g,style:Ju(Ju({color:n.color||r.color},r.style),n.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),c&&ot.createElement("title",null,c),n.children)};return Jy!==void 0?ot.createElement(Jy.Consumer,null,r=>a(r)):a(Hb)}function SR(n){return rm({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm3.163 21.783h-.093a.513.513 0 0 1-.382-.14.513.513 0 0 1-.14-.372v-1.406c.006-.467.01-.94.01-1.416a3.693 3.693 0 0 0-.151-1.028 1.832 1.832 0 0 0-.542-.875 8.014 8.014 0 0 0 2.038-.471 4.051 4.051 0 0 0 1.466-.964c.407-.427.71-.943.885-1.506a6.77 6.77 0 0 0 .3-2.13 4.138 4.138 0 0 0-.26-1.476 3.892 3.892 0 0 0-.795-1.284 2.81 2.81 0 0 0 .162-.582c.033-.2.05-.402.05-.604 0-.26-.03-.52-.09-.773a5.309 5.309 0 0 0-.221-.763.293.293 0 0 0-.111-.02h-.11c-.23.002-.456.04-.674.111a5.34 5.34 0 0 0-.703.26 6.503 6.503 0 0 0-.661.343c-.215.127-.405.249-.573.362a9.578 9.578 0 0 0-5.143 0 13.507 13.507 0 0 0-.572-.362 6.022 6.022 0 0 0-.672-.342 4.516 4.516 0 0 0-.705-.261 2.203 2.203 0 0 0-.662-.111h-.11a.29.29 0 0 0-.11.02 5.844 5.844 0 0 0-.23.763c-.054.254-.08.513-.081.773 0 .202.017.404.051.604.033.199.086.394.16.582A3.888 3.888 0 0 0 5.702 10a4.142 4.142 0 0 0-.263 1.476 6.871 6.871 0 0 0 .292 2.12c.181.563.483 1.08.884 1.516.415.422.915.75 1.466.964.653.25 1.337.41 2.033.476a1.828 1.828 0 0 0-.452.633 2.99 2.99 0 0 0-.2.744 2.754 2.754 0 0 1-1.175.27 1.788 1.788 0 0 1-1.065-.3 2.904 2.904 0 0 1-.752-.824 3.1 3.1 0 0 0-.292-.382 2.693 2.693 0 0 0-.372-.343 1.841 1.841 0 0 0-.432-.24 1.2 1.2 0 0 0-.481-.101c-.04.001-.08.005-.12.01a.649.649 0 0 0-.162.02.408.408 0 0 0-.13.06.116.116 0 0 0-.06.1.33.33 0 0 0 .14.242c.093.074.17.131.232.171l.03.021c.133.103.261.214.382.333.112.098.213.209.3.33.09.119.168.246.231.381.073.134.15.288.231.463.188.474.522.875.954 1.145.453.243.961.364 1.476.351.174 0 .349-.01.522-.03.172-.028.343-.057.515-.091v1.743a.5.5 0 0 1-.533.521h-.062a10.286 10.286 0 1 1 6.324 0v.005z"},child:[]}]})(n)}function t0(n){return rm({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(n)}function Vb(n){return rm({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(n)}function Ge(n,a,{checkForDefaultPrevented:r=!0}={}){return function(l){if(n==null||n(l),r===!1||!l.defaultPrevented)return a==null?void 0:a(l)}}function xR(n,a){const r=E.createContext(a),s=c=>{const{children:f,...h}=c,g=E.useMemo(()=>h,Object.values(h));return _.jsx(r.Provider,{value:g,children:f})};s.displayName=n+"Provider";function l(c){const f=E.useContext(r);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[s,l]}function tl(n,a=[]){let r=[];function s(c,f){const h=E.createContext(f),g=r.length;r=[...r,f];const m=p=>{var A;const{scope:b,children:x,...R}=p,w=((A=b==null?void 0:b[n])==null?void 0:A[g])||h,T=E.useMemo(()=>R,Object.values(R));return _.jsx(w.Provider,{value:T,children:x})};m.displayName=c+"Provider";function v(p,b){var w;const x=((w=b==null?void 0:b[n])==null?void 0:w[g])||h,R=E.useContext(x);if(R)return R;if(f!==void 0)return f;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[m,v]}const l=()=>{const c=r.map(f=>E.createContext(f));return function(h){const g=(h==null?void 0:h[n])||c;return E.useMemo(()=>({[`__scope${n}`]:{...h,[n]:g}}),[h,g])}};return l.scopeName=n,[s,wR(l,...a)]}function wR(...n){const a=n[0];if(n.length===1)return a;const r=()=>{const s=n.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const f=s.reduce((h,{useScope:g,scopeName:m})=>{const p=g(c)[`__scope${m}`];return{...h,...p}},{});return E.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return r.scopeName=a.scopeName,r}var _n=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},ER=xb[" useInsertionEffect ".trim().toString()]||_n;function im({prop:n,defaultProp:a,onChange:r=()=>{},caller:s}){const[l,c,f]=RR({defaultProp:a,onChange:r}),h=n!==void 0,g=h?n:l;{const v=E.useRef(n!==void 0);E.useEffect(()=>{const p=v.current;p!==h&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,s])}const m=E.useCallback(v=>{var p;if(h){const b=_R(v)?v(n):v;b!==n&&((p=f.current)==null||p.call(f,b))}else c(v)},[h,n,c,f]);return[g,m]}function RR({defaultProp:n,onChange:a}){const[r,s]=E.useState(n),l=E.useRef(r),c=E.useRef(a);return ER(()=>{c.current=a},[a]),E.useEffect(()=>{var f;l.current!==r&&((f=c.current)==null||f.call(c,r),l.current=r)},[r,l]),[r,s,c]}function _R(n){return typeof n=="function"}function e0(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Gb(...n){return a=>{let r=!1;const s=n.map(l=>{const c=e0(l,a);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let l=0;l<s.length;l++){const c=s[l];typeof c=="function"?c():e0(n[l],null)}}}}function Tn(...n){return E.useCallback(Gb(...n),n)}function sm(n){const a=TR(n),r=E.forwardRef((s,l)=>{const{children:c,...f}=s,h=E.Children.toArray(c),g=h.find(AR);if(g){const m=g.props.children,v=h.map(p=>p===g?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:p);return _.jsx(a,{...f,ref:l,children:E.isValidElement(m)?E.cloneElement(m,void 0,v):null})}return _.jsx(a,{...f,ref:l,children:c})});return r.displayName=`${n}.Slot`,r}var el=sm("Slot");function TR(n){const a=E.forwardRef((r,s)=>{const{children:l,...c}=r;if(E.isValidElement(l)){const f=MR(l),h=OR(c,l.props);return l.type!==E.Fragment&&(h.ref=s?Gb(s,f):f),E.cloneElement(l,h)}return E.Children.count(l)>1?E.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var Fb=Symbol("radix.slottable");function CR(n){const a=({children:r})=>_.jsx(_.Fragment,{children:r});return a.displayName=`${n}.Slottable`,a.__radixId=Fb,a}function AR(n){return E.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Fb}function OR(n,a){const r={...a};for(const s in a){const l=n[s],c=a[s];/^on[A-Z]/.test(s)?l&&c?r[s]=(...h)=>{const g=c(...h);return l(...h),g}:l&&(r[s]=l):s==="style"?r[s]={...l,...c}:s==="className"&&(r[s]=[l,c].filter(Boolean).join(" "))}return{...n,...r}}function MR(n){var s,l;let a=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(l=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:l.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var DR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=DR.reduce((n,a)=>{const r=sm(`Primitive.${a}`),s=E.forwardRef((l,c)=>{const{asChild:f,...h}=l,g=f?r:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(g,{...h,ref:c})});return s.displayName=`Primitive.${a}`,{...n,[a]:s}},{});function NR(n,a){n&&fc.flushSync(()=>n.dispatchEvent(a))}function jR(n,a){return E.useReducer((r,s)=>a[r][s]??r,n)}var si=n=>{const{present:a,children:r}=n,s=LR(a),l=typeof r=="function"?r({present:s.isPresent}):E.Children.only(r),c=Tn(s.ref,zR(l));return typeof r=="function"||s.isPresent?E.cloneElement(l,{ref:c}):null};si.displayName="Presence";function LR(n){const[a,r]=E.useState(),s=E.useRef(null),l=E.useRef(n),c=E.useRef("none"),f=n?"mounted":"unmounted",[h,g]=jR(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const m=Tu(s.current);c.current=h==="mounted"?m:"none"},[h]),_n(()=>{const m=s.current,v=l.current;if(v!==n){const b=c.current,x=Tu(m);n?g("MOUNT"):x==="none"||(m==null?void 0:m.display)==="none"?g("UNMOUNT"):g(v&&b!==x?"ANIMATION_OUT":"UNMOUNT"),l.current=n}},[n,g]),_n(()=>{if(a){let m;const v=a.ownerDocument.defaultView??window,p=x=>{const w=Tu(s.current).includes(x.animationName);if(x.target===a&&w&&(g("ANIMATION_END"),!l.current)){const T=a.style.animationFillMode;a.style.animationFillMode="forwards",m=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=T)})}},b=x=>{x.target===a&&(c.current=Tu(s.current))};return a.addEventListener("animationstart",b),a.addEventListener("animationcancel",p),a.addEventListener("animationend",p),()=>{v.clearTimeout(m),a.removeEventListener("animationstart",b),a.removeEventListener("animationcancel",p),a.removeEventListener("animationend",p)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:E.useCallback(m=>{s.current=m?getComputedStyle(m):null,r(m)},[])}}function Tu(n){return(n==null?void 0:n.animationName)||"none"}function zR(n){var s,l;let a=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(l=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:l.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var UR=xb[" useId ".trim().toString()]||(()=>{}),BR=0;function Vo(n){const[a,r]=E.useState(UR());return _n(()=>{r(s=>s??String(BR++))},[n]),n||(a?`radix-${a}`:"")}var dc="Collapsible",[kR,iD]=tl(dc),[PR,om]=kR(dc),Yb=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,open:s,defaultOpen:l,disabled:c,onOpenChange:f,...h}=n,[g,m]=im({prop:s,defaultProp:l??!1,onChange:f,caller:dc});return _.jsx(PR,{scope:r,disabled:c,contentId:Vo(),open:g,onOpenToggle:E.useCallback(()=>m(v=>!v),[m]),children:_.jsx(re.div,{"data-state":um(g),"data-disabled":c?"":void 0,...h,ref:a})})});Yb.displayName=dc;var Qb="CollapsibleTrigger",HR=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,...s}=n,l=om(Qb,r);return _.jsx(re.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":um(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...s,ref:a,onClick:Ge(n.onClick,l.onOpenToggle)})});HR.displayName=Qb;var lm="CollapsibleContent",qR=E.forwardRef((n,a)=>{const{forceMount:r,...s}=n,l=om(lm,n.__scopeCollapsible);return _.jsx(si,{present:r||l.open,children:({present:c})=>_.jsx(VR,{...s,ref:a,present:c})})});qR.displayName=lm;var VR=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,present:s,children:l,...c}=n,f=om(lm,r),[h,g]=E.useState(s),m=E.useRef(null),v=Tn(a,m),p=E.useRef(0),b=p.current,x=E.useRef(0),R=x.current,w=f.open||h,T=E.useRef(w),A=E.useRef(void 0);return E.useEffect(()=>{const L=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(L)},[]),_n(()=>{const L=m.current;if(L){A.current=A.current||{transitionDuration:L.style.transitionDuration,animationName:L.style.animationName},L.style.transitionDuration="0s",L.style.animationName="none";const z=L.getBoundingClientRect();p.current=z.height,x.current=z.width,T.current||(L.style.transitionDuration=A.current.transitionDuration,L.style.animationName=A.current.animationName),g(s)}},[f.open,s]),_.jsx(re.div,{"data-state":um(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!w,...c,ref:v,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":R?`${R}px`:void 0,...n.style},children:w&&l})});function um(n){return n?"open":"closed"}var GR=Yb;function FR({...n}){return _.jsx(GR,{"data-slot":"collapsible",...n})}function Xb(n){var a,r,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(a=0;a<l;a++)n[a]&&(r=Xb(n[a]))&&(s&&(s+=" "),s+=r)}else for(r in n)n[r]&&(s&&(s+=" "),s+=r);return s}function Kb(){for(var n,a,r=0,s="",l=arguments.length;r<l;r++)(n=arguments[r])&&(a=Xb(n))&&(s&&(s+=" "),s+=a);return s}const n0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,a0=Kb,cm=(n,a)=>r=>{var s;if((a==null?void 0:a.variants)==null)return a0(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:l,defaultVariants:c}=a,f=Object.keys(l).map(m=>{const v=r==null?void 0:r[m],p=c==null?void 0:c[m];if(v===null)return null;const b=n0(v)||n0(p);return l[m][b]}),h=r&&Object.entries(r).reduce((m,v)=>{let[p,b]=v;return b===void 0||(m[p]=b),m},{}),g=a==null||(s=a.compoundVariants)===null||s===void 0?void 0:s.reduce((m,v)=>{let{class:p,className:b,...x}=v;return Object.entries(x).every(R=>{let[w,T]=R;return Array.isArray(T)?T.includes({...c,...h}[w]):{...c,...h}[w]===T})?[...m,p,b]:m},[]);return a0(n,f,g,r==null?void 0:r.class,r==null?void 0:r.className)},th=768;function YR(){const[n,a]=E.useState(void 0);return E.useEffect(()=>{const r=window.matchMedia(`(max-width: ${th-1}px)`),s=()=>{a(window.innerWidth<th)};return r.addEventListener("change",s),a(window.innerWidth<th),()=>r.removeEventListener("change",s)},[]),!!n}const fm="-",QR=n=>{const a=KR(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:f=>{const h=f.split(fm);return h[0]===""&&h.length!==1&&h.shift(),Zb(h,a)||XR(f)},getConflictingClassGroupIds:(f,h)=>{const g=r[f]||[];return h&&s[f]?[...g,...s[f]]:g}}},Zb=(n,a)=>{var f;if(n.length===0)return a.classGroupId;const r=n[0],s=a.nextPart.get(r),l=s?Zb(n.slice(1),s):void 0;if(l)return l;if(a.validators.length===0)return;const c=n.join(fm);return(f=a.validators.find(({validator:h})=>h(c)))==null?void 0:f.classGroupId},r0=/^\[(.+)\]$/,XR=n=>{if(r0.test(n)){const a=r0.exec(n)[1],r=a==null?void 0:a.substring(0,a.indexOf(":"));if(r)return"arbitrary.."+r}},KR=n=>{const{theme:a,classGroups:r}=n,s={nextPart:new Map,validators:[]};for(const l in r)Rh(r[l],s,l,a);return s},Rh=(n,a,r,s)=>{n.forEach(l=>{if(typeof l=="string"){const c=l===""?a:i0(a,l);c.classGroupId=r;return}if(typeof l=="function"){if(ZR(l)){Rh(l(s),a,r,s);return}a.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([c,f])=>{Rh(f,i0(a,c),r,s)})})},i0=(n,a)=>{let r=n;return a.split(fm).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},ZR=n=>n.isThemeGetter,$R=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,r=new Map,s=new Map;const l=(c,f)=>{r.set(c,f),a++,a>n&&(a=0,s=r,r=new Map)};return{get(c){let f=r.get(c);if(f!==void 0)return f;if((f=s.get(c))!==void 0)return l(c,f),f},set(c,f){r.has(c)?r.set(c,f):l(c,f)}}},_h="!",Th=":",IR=Th.length,JR=n=>{const{prefix:a,experimentalParseClassName:r}=n;let s=l=>{const c=[];let f=0,h=0,g=0,m;for(let R=0;R<l.length;R++){let w=l[R];if(f===0&&h===0){if(w===Th){c.push(l.slice(g,R)),g=R+IR;continue}if(w==="/"){m=R;continue}}w==="["?f++:w==="]"?f--:w==="("?h++:w===")"&&h--}const v=c.length===0?l:l.substring(g),p=WR(v),b=p!==v,x=m&&m>g?m-g:void 0;return{modifiers:c,hasImportantModifier:b,baseClassName:p,maybePostfixModifierPosition:x}};if(a){const l=a+Th,c=s;s=f=>f.startsWith(l)?c(f.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(r){const l=s;s=c=>r({className:c,parseClassName:l})}return s},WR=n=>n.endsWith(_h)?n.substring(0,n.length-1):n.startsWith(_h)?n.substring(1):n,t_=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const l=[];let c=[];return s.forEach(f=>{f[0]==="["||a[f]?(l.push(...c.sort(),f),c=[]):c.push(f)}),l.push(...c.sort()),l}},e_=n=>({cache:$R(n.cacheSize),parseClassName:JR(n),sortModifiers:t_(n),...QR(n)}),n_=/\s+/,a_=(n,a)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:l,sortModifiers:c}=a,f=[],h=n.trim().split(n_);let g="";for(let m=h.length-1;m>=0;m-=1){const v=h[m],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:R,maybePostfixModifierPosition:w}=r(v);if(p){g=v+(g.length>0?" "+g:g);continue}let T=!!w,A=s(T?R.substring(0,w):R);if(!A){if(!T){g=v+(g.length>0?" "+g:g);continue}if(A=s(R),!A){g=v+(g.length>0?" "+g:g);continue}T=!1}const L=c(b).join(":"),z=x?L+_h:L,G=z+A;if(f.includes(G))continue;f.push(G);const B=l(A,T);for(let P=0;P<B.length;++P){const Q=B[P];f.push(z+Q)}g=v+(g.length>0?" "+g:g)}return g};function r_(){let n=0,a,r,s="";for(;n<arguments.length;)(a=arguments[n++])&&(r=$b(a))&&(s&&(s+=" "),s+=r);return s}const $b=n=>{if(typeof n=="string")return n;let a,r="";for(let s=0;s<n.length;s++)n[s]&&(a=$b(n[s]))&&(r&&(r+=" "),r+=a);return r};function i_(n,...a){let r,s,l,c=f;function f(g){const m=a.reduce((v,p)=>p(v),n());return r=e_(m),s=r.cache.get,l=r.cache.set,c=h,h(g)}function h(g){const m=s(g);if(m)return m;const v=a_(g,r);return l(g,v),v}return function(){return c(r_.apply(null,arguments))}}const ye=n=>{const a=r=>r[n]||[];return a.isThemeGetter=!0,a},Ib=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,s_=/^\d+\/\d+$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,l_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,c_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ji=n=>s_.test(n),Dt=n=>!!n&&!Number.isNaN(Number(n)),Wa=n=>!!n&&Number.isInteger(Number(n)),eh=n=>n.endsWith("%")&&Dt(n.slice(0,-1)),ya=n=>o_.test(n),d_=()=>!0,h_=n=>l_.test(n)&&!u_.test(n),Wb=()=>!1,m_=n=>c_.test(n),p_=n=>f_.test(n),g_=n=>!pt(n)&&!gt(n),v_=n=>As(n,n1,Wb),pt=n=>Ib.test(n),Pr=n=>As(n,a1,h_),nh=n=>As(n,w_,Dt),s0=n=>As(n,t1,Wb),y_=n=>As(n,e1,p_),Cu=n=>As(n,r1,m_),gt=n=>Jb.test(n),Uo=n=>Os(n,a1),b_=n=>Os(n,E_),o0=n=>Os(n,t1),S_=n=>Os(n,n1),x_=n=>Os(n,e1),Au=n=>Os(n,r1,!0),As=(n,a,r)=>{const s=Ib.exec(n);return s?s[1]?a(s[1]):r(s[2]):!1},Os=(n,a,r=!1)=>{const s=Jb.exec(n);return s?s[1]?a(s[1]):r:!1},t1=n=>n==="position"||n==="percentage",e1=n=>n==="image"||n==="url",n1=n=>n==="length"||n==="size"||n==="bg-size",a1=n=>n==="length",w_=n=>n==="number",E_=n=>n==="family-name",r1=n=>n==="shadow",R_=()=>{const n=ye("color"),a=ye("font"),r=ye("text"),s=ye("font-weight"),l=ye("tracking"),c=ye("leading"),f=ye("breakpoint"),h=ye("container"),g=ye("spacing"),m=ye("radius"),v=ye("shadow"),p=ye("inset-shadow"),b=ye("text-shadow"),x=ye("drop-shadow"),R=ye("blur"),w=ye("perspective"),T=ye("aspect"),A=ye("ease"),L=ye("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...G(),gt,pt],P=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],N=()=>[gt,pt,g],U=()=>[Ji,"full","auto",...N()],at=()=>[Wa,"none","subgrid",gt,pt],rt=()=>["auto",{span:["full",Wa,gt,pt]},Wa,gt,pt],W=()=>[Wa,"auto",gt,pt],st=()=>["auto","min","max","fr",gt,pt],vt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],lt=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...N()],K=()=>[Ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],F=()=>[n,gt,pt],ut=()=>[...G(),o0,s0,{position:[gt,pt]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",S_,v_,{size:[gt,pt]}],et=()=>[eh,Uo,Pr],$=()=>["","none","full",m,gt,pt],tt=()=>["",Dt,Uo,Pr],ct=()=>["solid","dashed","dotted","double"],it=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>[Dt,eh,o0,s0],ft=()=>["","none",R,gt,pt],St=()=>["none",Dt,gt,pt],Tt=()=>["none",Dt,gt,pt],Ht=()=>[Dt,gt,pt],qt=()=>[Ji,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ya],breakpoint:[ya],color:[d_],container:[ya],"drop-shadow":[ya],ease:["in","out","in-out"],font:[g_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ya],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ya],shadow:[ya],spacing:["px",Dt],text:[ya],"text-shadow":[ya],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ji,pt,gt,T]}],container:["container"],columns:[{columns:[Dt,pt,gt,h]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[Wa,"auto",gt,pt]}],basis:[{basis:[Ji,"full","auto",h,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Dt,Ji,"auto","initial","none",pt]}],grow:[{grow:["",Dt,gt,pt]}],shrink:[{shrink:["",Dt,gt,pt]}],order:[{order:[Wa,"first","last","none",gt,pt]}],"grid-cols":[{"grid-cols":at()}],"col-start-end":[{col:rt()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":at()}],"row-start-end":[{row:rt()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":st()}],"auto-rows":[{"auto-rows":st()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...vt(),"normal"]}],"justify-items":[{"justify-items":[...lt(),"normal"]}],"justify-self":[{"justify-self":["auto",...lt()]}],"align-content":[{content:["normal",...vt()]}],"align-items":[{items:[...lt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...lt(),{baseline:["","last"]}]}],"place-content":[{"place-content":vt()}],"place-items":[{"place-items":[...lt(),"baseline"]}],"place-self":[{"place-self":["auto",...lt()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[h,"screen",...K()]}],"min-w":[{"min-w":[h,"screen","none",...K()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,Uo,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,gt,nh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eh,pt]}],"font-family":[{font:[b_,pt,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,gt,pt]}],"line-clamp":[{"line-clamp":[Dt,"none",gt,nh]}],leading:[{leading:[c,...N()]}],"list-image":[{"list-image":["none",gt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",gt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:[Dt,"from-font","auto",gt,Pr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Dt,"auto",gt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",gt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",gt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ut()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wa,gt,pt],radial:["",gt,pt],conic:[Wa,gt,pt]},x_,y_]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:tt()}],"border-w-x":[{"border-x":tt()}],"border-w-y":[{"border-y":tt()}],"border-w-s":[{"border-s":tt()}],"border-w-e":[{"border-e":tt()}],"border-w-t":[{"border-t":tt()}],"border-w-r":[{"border-r":tt()}],"border-w-b":[{"border-b":tt()}],"border-w-l":[{"border-l":tt()}],"divide-x":[{"divide-x":tt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":tt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ct(),"hidden","none"]}],"divide-style":[{divide:[...ct(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ct(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Dt,gt,pt]}],"outline-w":[{outline:["",Dt,Uo,Pr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",v,Au,Cu]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Au,Cu]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:tt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Dt,Pr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":tt()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",b,Au,Cu]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Dt,gt,pt]}],"mix-blend":[{"mix-blend":[...it(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":it()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ht()}],"mask-image-linear-to-pos":[{"mask-linear-to":ht()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ht()}],"mask-image-t-to-pos":[{"mask-t-to":ht()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ht()}],"mask-image-r-to-pos":[{"mask-r-to":ht()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ht()}],"mask-image-b-to-pos":[{"mask-b-to":ht()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ht()}],"mask-image-l-to-pos":[{"mask-l-to":ht()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ht()}],"mask-image-x-to-pos":[{"mask-x-to":ht()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ht()}],"mask-image-y-to-pos":[{"mask-y-to":ht()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[gt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ht()}],"mask-image-radial-to-pos":[{"mask-radial-to":ht()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":G()}],"mask-image-conic-pos":[{"mask-conic":[Dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ht()}],"mask-image-conic-to-pos":[{"mask-conic-to":ht()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ut()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",gt,pt]}],filter:[{filter:["","none",gt,pt]}],blur:[{blur:ft()}],brightness:[{brightness:[Dt,gt,pt]}],contrast:[{contrast:[Dt,gt,pt]}],"drop-shadow":[{"drop-shadow":["","none",x,Au,Cu]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Dt,gt,pt]}],"hue-rotate":[{"hue-rotate":[Dt,gt,pt]}],invert:[{invert:["",Dt,gt,pt]}],saturate:[{saturate:[Dt,gt,pt]}],sepia:[{sepia:["",Dt,gt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",gt,pt]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Dt,gt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Dt,gt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Dt,gt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Dt,gt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Dt,gt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Dt,gt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Dt,gt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Dt,gt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",gt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Dt,"initial",gt,pt]}],ease:[{ease:["linear","initial",A,gt,pt]}],delay:[{delay:[Dt,gt,pt]}],animate:[{animate:["none",L,gt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,gt,pt]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:St()}],"rotate-x":[{"rotate-x":St()}],"rotate-y":[{"rotate-y":St()}],"rotate-z":[{"rotate-z":St()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:Ht()}],"skew-x":[{"skew-x":Ht()}],"skew-y":[{"skew-y":Ht()}],transform:[{transform:[gt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qt()}],"translate-x":[{"translate-x":qt()}],"translate-y":[{"translate-y":qt()}],"translate-z":[{"translate-z":qt()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",gt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",gt,pt]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Dt,Uo,Pr,nh]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},__=i_(R_);function Ot(...n){return __(Kb(n))}const T_=cm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i1({className:n,variant:a,size:r,asChild:s=!1,...l}){const c=s?el:"button";return _.jsx(c,{"data-slot":"button",className:Ot(T_({variant:a,size:r,className:n})),...l})}function l0({className:n,type:a,...r}){return _.jsx("input",{type:a,"data-slot":"input",className:Ot("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...r})}var C_="Separator",u0="horizontal",A_=["horizontal","vertical"],s1=E.forwardRef((n,a)=>{const{decorative:r,orientation:s=u0,...l}=n,c=O_(s)?s:u0,h=r?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return _.jsx(re.div,{"data-orientation":c,...h,...l,ref:a})});s1.displayName=C_;function O_(n){return A_.includes(n)}var M_=s1;function D_({className:n,orientation:a="horizontal",decorative:r=!0,...s}){return _.jsx(M_,{"data-slot":"separator-root",decorative:r,orientation:a,className:Ot("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),...s})}function ti(n){const a=E.useRef(n);return E.useEffect(()=>{a.current=n}),E.useMemo(()=>(...r)=>{var s;return(s=a.current)==null?void 0:s.call(a,...r)},[])}function N_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n);E.useEffect(()=>{const s=l=>{l.key==="Escape"&&r(l)};return a.addEventListener("keydown",s,{capture:!0}),()=>a.removeEventListener("keydown",s,{capture:!0})},[r,a])}var j_="DismissableLayer",Ch="dismissableLayer.update",L_="dismissableLayer.pointerDownOutside",z_="dismissableLayer.focusOutside",c0,o1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dm=E.forwardRef((n,a)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...g}=n,m=E.useContext(o1),[v,p]=E.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=E.useState({}),R=Tn(a,Q=>p(Q)),w=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=w.indexOf(T),L=v?w.indexOf(v):-1,z=m.layersWithOutsidePointerEventsDisabled.size>0,G=L>=A,B=k_(Q=>{const N=Q.target,U=[...m.branches].some(at=>at.contains(N));!G||U||(l==null||l(Q),f==null||f(Q),Q.defaultPrevented||h==null||h())},b),P=P_(Q=>{const N=Q.target;[...m.branches].some(at=>at.contains(N))||(c==null||c(Q),f==null||f(Q),Q.defaultPrevented||h==null||h())},b);return N_(Q=>{L===m.layers.size-1&&(s==null||s(Q),!Q.defaultPrevented&&h&&(Q.preventDefault(),h()))},b),E.useEffect(()=>{if(v)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(c0=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),f0(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=c0)}},[v,b,r,m]),E.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),f0())},[v,m]),E.useEffect(()=>{const Q=()=>x({});return document.addEventListener(Ch,Q),()=>document.removeEventListener(Ch,Q)},[]),_.jsx(re.div,{...g,ref:R,style:{pointerEvents:z?G?"auto":"none":void 0,...n.style},onFocusCapture:Ge(n.onFocusCapture,P.onFocusCapture),onBlurCapture:Ge(n.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ge(n.onPointerDownCapture,B.onPointerDownCapture)})});dm.displayName=j_;var U_="DismissableLayerBranch",B_=E.forwardRef((n,a)=>{const r=E.useContext(o1),s=E.useRef(null),l=Tn(a,s);return E.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),_.jsx(re.div,{...n,ref:l})});B_.displayName=U_;function k_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n),s=E.useRef(!1),l=E.useRef(()=>{});return E.useEffect(()=>{const c=h=>{if(h.target&&!s.current){let g=function(){l1(L_,r,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",l.current),l.current=g,a.addEventListener("click",l.current,{once:!0})):g()}else a.removeEventListener("click",l.current);s.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",c),a.removeEventListener("click",l.current)}},[a,r]),{onPointerDownCapture:()=>s.current=!0}}function P_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n),s=E.useRef(!1);return E.useEffect(()=>{const l=c=>{c.target&&!s.current&&l1(z_,r,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",l),()=>a.removeEventListener("focusin",l)},[a,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function f0(){const n=new CustomEvent(Ch);document.dispatchEvent(n)}function l1(n,a,r,{discrete:s}){const l=r.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});a&&l.addEventListener(n,a,{once:!0}),s?NR(l,c):l.dispatchEvent(c)}var ah="focusScope.autoFocusOnMount",rh="focusScope.autoFocusOnUnmount",d0={bubbles:!1,cancelable:!0},H_="FocusScope",u1=E.forwardRef((n,a)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...f}=n,[h,g]=E.useState(null),m=ti(l),v=ti(c),p=E.useRef(null),b=Tn(a,w=>g(w)),x=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(s){let w=function(z){if(x.paused||!h)return;const G=z.target;h.contains(G)?p.current=G:tr(p.current,{select:!0})},T=function(z){if(x.paused||!h)return;const G=z.relatedTarget;G!==null&&(h.contains(G)||tr(p.current,{select:!0}))},A=function(z){if(document.activeElement===document.body)for(const B of z)B.removedNodes.length>0&&tr(h)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const L=new MutationObserver(A);return h&&L.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),L.disconnect()}}},[s,h,x.paused]),E.useEffect(()=>{if(h){m0.add(x);const w=document.activeElement;if(!h.contains(w)){const A=new CustomEvent(ah,d0);h.addEventListener(ah,m),h.dispatchEvent(A),A.defaultPrevented||(q_(Q_(c1(h)),{select:!0}),document.activeElement===w&&tr(h))}return()=>{h.removeEventListener(ah,m),setTimeout(()=>{const A=new CustomEvent(rh,d0);h.addEventListener(rh,v),h.dispatchEvent(A),A.defaultPrevented||tr(w??document.body,{select:!0}),h.removeEventListener(rh,v),m0.remove(x)},0)}}},[h,m,v,x]);const R=E.useCallback(w=>{if(!r&&!s||x.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,A=document.activeElement;if(T&&A){const L=w.currentTarget,[z,G]=V_(L);z&&G?!w.shiftKey&&A===G?(w.preventDefault(),r&&tr(z,{select:!0})):w.shiftKey&&A===z&&(w.preventDefault(),r&&tr(G,{select:!0})):A===L&&w.preventDefault()}},[r,s,x.paused]);return _.jsx(re.div,{tabIndex:-1,...f,ref:b,onKeyDown:R})});u1.displayName=H_;function q_(n,{select:a=!1}={}){const r=document.activeElement;for(const s of n)if(tr(s,{select:a}),document.activeElement!==r)return}function V_(n){const a=c1(n),r=h0(a,n),s=h0(a.reverse(),n);return[r,s]}function c1(n){const a=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const l=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||l?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)a.push(r.currentNode);return a}function h0(n,a){for(const r of n)if(!G_(r,{upTo:a}))return r}function G_(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function F_(n){return n instanceof HTMLInputElement&&"select"in n}function tr(n,{select:a=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&F_(n)&&a&&n.select()}}var m0=Y_();function Y_(){let n=[];return{add(a){const r=n[0];a!==r&&(r==null||r.pause()),n=p0(n,a),n.unshift(a)},remove(a){var r;n=p0(n,a),(r=n[0])==null||r.resume()}}}function p0(n,a){const r=[...n],s=r.indexOf(a);return s!==-1&&r.splice(s,1),r}function Q_(n){return n.filter(a=>a.tagName!=="A")}var X_="Portal",hm=E.forwardRef((n,a)=>{var h;const{container:r,...s}=n,[l,c]=E.useState(!1);_n(()=>c(!0),[]);const f=r||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?Ub.createPortal(_.jsx(re.div,{...s,ref:a}),f):null});hm.displayName=X_;var ih=0;function K_(){E.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??g0()),document.body.insertAdjacentElement("beforeend",n[1]??g0()),ih++,()=>{ih===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),ih--}},[])}function g0(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var In=function(){return In=Object.assign||function(a){for(var r,s=1,l=arguments.length;s<l;s++){r=arguments[s];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(a[c]=r[c])}return a},In.apply(this,arguments)};function f1(n,a){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&a.indexOf(s)<0&&(r[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(n);l<s.length;l++)a.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(n,s[l])&&(r[s[l]]=n[s[l]]);return r}function Z_(n,a,r){if(r||arguments.length===2)for(var s=0,l=a.length,c;s<l;s++)(c||!(s in a))&&(c||(c=Array.prototype.slice.call(a,0,s)),c[s]=a[s]);return n.concat(c||Array.prototype.slice.call(a))}var ku="right-scroll-bar-position",Pu="width-before-scroll-bar",$_="with-scroll-bars-hidden",I_="--removed-body-scroll-bar-size";function sh(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function J_(n,a){var r=E.useState(function(){return{value:n,callback:a,facade:{get current(){return r.value},set current(s){var l=r.value;l!==s&&(r.value=s,r.callback(s,l))}}}})[0];return r.callback=a,r.facade}var W_=typeof window<"u"?E.useLayoutEffect:E.useEffect,v0=new WeakMap;function tT(n,a){var r=J_(null,function(s){return n.forEach(function(l){return sh(l,s)})});return W_(function(){var s=v0.get(r);if(s){var l=new Set(s),c=new Set(n),f=r.current;l.forEach(function(h){c.has(h)||sh(h,null)}),c.forEach(function(h){l.has(h)||sh(h,f)})}v0.set(r,n)},[n]),r}function eT(n){return n}function nT(n,a){a===void 0&&(a=eT);var r=[],s=!1,l={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(c){var f=a(c,s);return r.push(f),function(){r=r.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(s=!0;r.length;){var f=r;r=[],f.forEach(c)}r={push:function(h){return c(h)},filter:function(){return r}}},assignMedium:function(c){s=!0;var f=[];if(r.length){var h=r;r=[],h.forEach(c),f=r}var g=function(){var v=f;f=[],v.forEach(c)},m=function(){return Promise.resolve().then(g)};m(),r={push:function(v){f.push(v),m()},filter:function(v){return f=f.filter(v),r}}}};return l}function aT(n){n===void 0&&(n={});var a=nT(null);return a.options=In({async:!0,ssr:!1},n),a}var d1=function(n){var a=n.sideCar,r=f1(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=a.read();if(!s)throw new Error("Sidecar medium not found");return E.createElement(s,In({},r))};d1.isSideCarExport=!0;function rT(n,a){return n.useMedium(a),d1}var h1=aT(),oh=function(){},hc=E.forwardRef(function(n,a){var r=E.useRef(null),s=E.useState({onScrollCapture:oh,onWheelCapture:oh,onTouchMoveCapture:oh}),l=s[0],c=s[1],f=n.forwardProps,h=n.children,g=n.className,m=n.removeScrollBar,v=n.enabled,p=n.shards,b=n.sideCar,x=n.noRelative,R=n.noIsolation,w=n.inert,T=n.allowPinchZoom,A=n.as,L=A===void 0?"div":A,z=n.gapMode,G=f1(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=b,P=tT([r,a]),Q=In(In({},G),l);return E.createElement(E.Fragment,null,v&&E.createElement(B,{sideCar:h1,removeScrollBar:m,shards:p,noRelative:x,noIsolation:R,inert:w,setCallbacks:c,allowPinchZoom:!!T,lockRef:r,gapMode:z}),f?E.cloneElement(E.Children.only(h),In(In({},Q),{ref:P})):E.createElement(L,In({},Q,{className:g,ref:P}),h))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hc.classNames={fullWidth:Pu,zeroRight:ku};var iT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sT(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=iT();return a&&n.setAttribute("nonce",a),n}function oT(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function lT(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var uT=function(){var n=0,a=null;return{add:function(r){n==0&&(a=sT())&&(oT(a,r),lT(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},cT=function(){var n=uT();return function(a,r){E.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&r])}},m1=function(){var n=cT(),a=function(r){var s=r.styles,l=r.dynamic;return n(s,l),null};return a},fT={left:0,top:0,right:0,gap:0},lh=function(n){return parseInt(n||"",10)||0},dT=function(n){var a=window.getComputedStyle(document.body),r=a[n==="padding"?"paddingLeft":"marginLeft"],s=a[n==="padding"?"paddingTop":"marginTop"],l=a[n==="padding"?"paddingRight":"marginRight"];return[lh(r),lh(s),lh(l)]},hT=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return fT;var a=dT(n),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,s-r+a[2]-a[0])}},mT=m1(),os="data-scroll-locked",pT=function(n,a,r,s){var l=n.left,c=n.top,f=n.right,h=n.gap;return r===void 0&&(r="margin"),`
127
+ */const fR=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dR=vr("x",fR);var Hb={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Jy=ot.createContext&&ot.createContext(Hb),hR=["attr","size","title"];function mR(n,a){if(n==null)return{};var r=pR(n,a),s,l;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);for(l=0;l<c.length;l++)s=c[l],!(a.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(r[s]=n[s])}return r}function pR(n,a){if(n==null)return{};var r={};for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){if(a.indexOf(s)>=0)continue;r[s]=n[s]}return r}function Iu(){return Iu=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},Iu.apply(this,arguments)}function Wy(n,a){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);a&&(s=s.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),r.push.apply(r,s)}return r}function Ju(n){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?Wy(Object(r),!0).forEach(function(s){gR(n,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Wy(Object(r)).forEach(function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(r,s))})}return n}function gR(n,a,r){return a=vR(a),a in n?Object.defineProperty(n,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[a]=r,n}function vR(n){var a=yR(n,"string");return typeof a=="symbol"?a:a+""}function yR(n,a){if(typeof n!="object"||!n)return n;var r=n[Symbol.toPrimitive];if(r!==void 0){var s=r.call(n,a);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(n)}function qb(n){return n&&n.map((a,r)=>ot.createElement(a.tag,Ju({key:r},a.attr),qb(a.child)))}function rm(n){return a=>ot.createElement(bR,Iu({attr:Ju({},n.attr)},a),qb(n.child))}function bR(n){var a=r=>{var{attr:s,size:l,title:c}=n,f=mR(n,hR),h=l||r.size||"1em",g;return r.className&&(g=r.className),n.className&&(g=(g?g+" ":"")+n.className),ot.createElement("svg",Iu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,s,f,{className:g,style:Ju(Ju({color:n.color||r.color},r.style),n.style),height:h,width:h,xmlns:"http://www.w3.org/2000/svg"}),c&&ot.createElement("title",null,c),n.children)};return Jy!==void 0?ot.createElement(Jy.Consumer,null,r=>a(r)):a(Hb)}function SR(n){return rm({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm3.163 21.783h-.093a.513.513 0 0 1-.382-.14.513.513 0 0 1-.14-.372v-1.406c.006-.467.01-.94.01-1.416a3.693 3.693 0 0 0-.151-1.028 1.832 1.832 0 0 0-.542-.875 8.014 8.014 0 0 0 2.038-.471 4.051 4.051 0 0 0 1.466-.964c.407-.427.71-.943.885-1.506a6.77 6.77 0 0 0 .3-2.13 4.138 4.138 0 0 0-.26-1.476 3.892 3.892 0 0 0-.795-1.284 2.81 2.81 0 0 0 .162-.582c.033-.2.05-.402.05-.604 0-.26-.03-.52-.09-.773a5.309 5.309 0 0 0-.221-.763.293.293 0 0 0-.111-.02h-.11c-.23.002-.456.04-.674.111a5.34 5.34 0 0 0-.703.26 6.503 6.503 0 0 0-.661.343c-.215.127-.405.249-.573.362a9.578 9.578 0 0 0-5.143 0 13.507 13.507 0 0 0-.572-.362 6.022 6.022 0 0 0-.672-.342 4.516 4.516 0 0 0-.705-.261 2.203 2.203 0 0 0-.662-.111h-.11a.29.29 0 0 0-.11.02 5.844 5.844 0 0 0-.23.763c-.054.254-.08.513-.081.773 0 .202.017.404.051.604.033.199.086.394.16.582A3.888 3.888 0 0 0 5.702 10a4.142 4.142 0 0 0-.263 1.476 6.871 6.871 0 0 0 .292 2.12c.181.563.483 1.08.884 1.516.415.422.915.75 1.466.964.653.25 1.337.41 2.033.476a1.828 1.828 0 0 0-.452.633 2.99 2.99 0 0 0-.2.744 2.754 2.754 0 0 1-1.175.27 1.788 1.788 0 0 1-1.065-.3 2.904 2.904 0 0 1-.752-.824 3.1 3.1 0 0 0-.292-.382 2.693 2.693 0 0 0-.372-.343 1.841 1.841 0 0 0-.432-.24 1.2 1.2 0 0 0-.481-.101c-.04.001-.08.005-.12.01a.649.649 0 0 0-.162.02.408.408 0 0 0-.13.06.116.116 0 0 0-.06.1.33.33 0 0 0 .14.242c.093.074.17.131.232.171l.03.021c.133.103.261.214.382.333.112.098.213.209.3.33.09.119.168.246.231.381.073.134.15.288.231.463.188.474.522.875.954 1.145.453.243.961.364 1.476.351.174 0 .349-.01.522-.03.172-.028.343-.057.515-.091v1.743a.5.5 0 0 1-.533.521h-.062a10.286 10.286 0 1 1 6.324 0v.005z"},child:[]}]})(n)}function t0(n){return rm({attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"},child:[]}]})(n)}function Vb(n){return rm({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"},child:[]}]})(n)}function Ge(n,a,{checkForDefaultPrevented:r=!0}={}){return function(l){if(n==null||n(l),r===!1||!l.defaultPrevented)return a==null?void 0:a(l)}}function xR(n,a){const r=E.createContext(a),s=c=>{const{children:f,...h}=c,g=E.useMemo(()=>h,Object.values(h));return _.jsx(r.Provider,{value:g,children:f})};s.displayName=n+"Provider";function l(c){const f=E.useContext(r);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[s,l]}function tl(n,a=[]){let r=[];function s(c,f){const h=E.createContext(f),g=r.length;r=[...r,f];const m=p=>{var A;const{scope:b,children:x,...R}=p,w=((A=b==null?void 0:b[n])==null?void 0:A[g])||h,T=E.useMemo(()=>R,Object.values(R));return _.jsx(w.Provider,{value:T,children:x})};m.displayName=c+"Provider";function v(p,b){var w;const x=((w=b==null?void 0:b[n])==null?void 0:w[g])||h,R=E.useContext(x);if(R)return R;if(f!==void 0)return f;throw new Error(`\`${p}\` must be used within \`${c}\``)}return[m,v]}const l=()=>{const c=r.map(f=>E.createContext(f));return function(h){const g=(h==null?void 0:h[n])||c;return E.useMemo(()=>({[`__scope${n}`]:{...h,[n]:g}}),[h,g])}};return l.scopeName=n,[s,wR(l,...a)]}function wR(...n){const a=n[0];if(n.length===1)return a;const r=()=>{const s=n.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(c){const f=s.reduce((h,{useScope:g,scopeName:m})=>{const p=g(c)[`__scope${m}`];return{...h,...p}},{});return E.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return r.scopeName=a.scopeName,r}var _n=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},ER=xb[" useInsertionEffect ".trim().toString()]||_n;function im({prop:n,defaultProp:a,onChange:r=()=>{},caller:s}){const[l,c,f]=RR({defaultProp:a,onChange:r}),h=n!==void 0,g=h?n:l;{const v=E.useRef(n!==void 0);E.useEffect(()=>{const p=v.current;p!==h&&console.warn(`${s} is changing from ${p?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,s])}const m=E.useCallback(v=>{var p;if(h){const b=_R(v)?v(n):v;b!==n&&((p=f.current)==null||p.call(f,b))}else c(v)},[h,n,c,f]);return[g,m]}function RR({defaultProp:n,onChange:a}){const[r,s]=E.useState(n),l=E.useRef(r),c=E.useRef(a);return ER(()=>{c.current=a},[a]),E.useEffect(()=>{var f;l.current!==r&&((f=c.current)==null||f.call(c,r),l.current=r)},[r,l]),[r,s,c]}function _R(n){return typeof n=="function"}function e0(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Gb(...n){return a=>{let r=!1;const s=n.map(l=>{const c=e0(l,a);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let l=0;l<s.length;l++){const c=s[l];typeof c=="function"?c():e0(n[l],null)}}}}function Tn(...n){return E.useCallback(Gb(...n),n)}function sm(n){const a=TR(n),r=E.forwardRef((s,l)=>{const{children:c,...f}=s,h=E.Children.toArray(c),g=h.find(AR);if(g){const m=g.props.children,v=h.map(p=>p===g?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:p);return _.jsx(a,{...f,ref:l,children:E.isValidElement(m)?E.cloneElement(m,void 0,v):null})}return _.jsx(a,{...f,ref:l,children:c})});return r.displayName=`${n}.Slot`,r}var el=sm("Slot");function TR(n){const a=E.forwardRef((r,s)=>{const{children:l,...c}=r;if(E.isValidElement(l)){const f=MR(l),h=OR(c,l.props);return l.type!==E.Fragment&&(h.ref=s?Gb(s,f):f),E.cloneElement(l,h)}return E.Children.count(l)>1?E.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var Fb=Symbol("radix.slottable");function CR(n){const a=({children:r})=>_.jsx(_.Fragment,{children:r});return a.displayName=`${n}.Slottable`,a.__radixId=Fb,a}function AR(n){return E.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Fb}function OR(n,a){const r={...a};for(const s in a){const l=n[s],c=a[s];/^on[A-Z]/.test(s)?l&&c?r[s]=(...h)=>{const g=c(...h);return l(...h),g}:l&&(r[s]=l):s==="style"?r[s]={...l,...c}:s==="className"&&(r[s]=[l,c].filter(Boolean).join(" "))}return{...n,...r}}function MR(n){var s,l;let a=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(l=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:l.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var DR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=DR.reduce((n,a)=>{const r=sm(`Primitive.${a}`),s=E.forwardRef((l,c)=>{const{asChild:f,...h}=l,g=f?r:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(g,{...h,ref:c})});return s.displayName=`Primitive.${a}`,{...n,[a]:s}},{});function NR(n,a){n&&fc.flushSync(()=>n.dispatchEvent(a))}function jR(n,a){return E.useReducer((r,s)=>a[r][s]??r,n)}var si=n=>{const{present:a,children:r}=n,s=LR(a),l=typeof r=="function"?r({present:s.isPresent}):E.Children.only(r),c=Tn(s.ref,zR(l));return typeof r=="function"||s.isPresent?E.cloneElement(l,{ref:c}):null};si.displayName="Presence";function LR(n){const[a,r]=E.useState(),s=E.useRef(null),l=E.useRef(n),c=E.useRef("none"),f=n?"mounted":"unmounted",[h,g]=jR(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const m=Tu(s.current);c.current=h==="mounted"?m:"none"},[h]),_n(()=>{const m=s.current,v=l.current;if(v!==n){const b=c.current,x=Tu(m);n?g("MOUNT"):x==="none"||(m==null?void 0:m.display)==="none"?g("UNMOUNT"):g(v&&b!==x?"ANIMATION_OUT":"UNMOUNT"),l.current=n}},[n,g]),_n(()=>{if(a){let m;const v=a.ownerDocument.defaultView??window,p=x=>{const w=Tu(s.current).includes(x.animationName);if(x.target===a&&w&&(g("ANIMATION_END"),!l.current)){const T=a.style.animationFillMode;a.style.animationFillMode="forwards",m=v.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=T)})}},b=x=>{x.target===a&&(c.current=Tu(s.current))};return a.addEventListener("animationstart",b),a.addEventListener("animationcancel",p),a.addEventListener("animationend",p),()=>{v.clearTimeout(m),a.removeEventListener("animationstart",b),a.removeEventListener("animationcancel",p),a.removeEventListener("animationend",p)}}else g("ANIMATION_END")},[a,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:E.useCallback(m=>{s.current=m?getComputedStyle(m):null,r(m)},[])}}function Tu(n){return(n==null?void 0:n.animationName)||"none"}function zR(n){var s,l;let a=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(l=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:l.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var UR=xb[" useId ".trim().toString()]||(()=>{}),BR=0;function Vo(n){const[a,r]=E.useState(UR());return _n(()=>{r(s=>s??String(BR++))},[n]),n||(a?`radix-${a}`:"")}var dc="Collapsible",[kR,iD]=tl(dc),[PR,om]=kR(dc),Yb=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,open:s,defaultOpen:l,disabled:c,onOpenChange:f,...h}=n,[g,m]=im({prop:s,defaultProp:l??!1,onChange:f,caller:dc});return _.jsx(PR,{scope:r,disabled:c,contentId:Vo(),open:g,onOpenToggle:E.useCallback(()=>m(v=>!v),[m]),children:_.jsx(re.div,{"data-state":um(g),"data-disabled":c?"":void 0,...h,ref:a})})});Yb.displayName=dc;var Qb="CollapsibleTrigger",HR=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,...s}=n,l=om(Qb,r);return _.jsx(re.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":um(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...s,ref:a,onClick:Ge(n.onClick,l.onOpenToggle)})});HR.displayName=Qb;var lm="CollapsibleContent",qR=E.forwardRef((n,a)=>{const{forceMount:r,...s}=n,l=om(lm,n.__scopeCollapsible);return _.jsx(si,{present:r||l.open,children:({present:c})=>_.jsx(VR,{...s,ref:a,present:c})})});qR.displayName=lm;var VR=E.forwardRef((n,a)=>{const{__scopeCollapsible:r,present:s,children:l,...c}=n,f=om(lm,r),[h,g]=E.useState(s),m=E.useRef(null),v=Tn(a,m),p=E.useRef(0),b=p.current,x=E.useRef(0),R=x.current,w=f.open||h,T=E.useRef(w),A=E.useRef(void 0);return E.useEffect(()=>{const L=requestAnimationFrame(()=>T.current=!1);return()=>cancelAnimationFrame(L)},[]),_n(()=>{const L=m.current;if(L){A.current=A.current||{transitionDuration:L.style.transitionDuration,animationName:L.style.animationName},L.style.transitionDuration="0s",L.style.animationName="none";const z=L.getBoundingClientRect();p.current=z.height,x.current=z.width,T.current||(L.style.transitionDuration=A.current.transitionDuration,L.style.animationName=A.current.animationName),g(s)}},[f.open,s]),_.jsx(re.div,{"data-state":um(f.open),"data-disabled":f.disabled?"":void 0,id:f.contentId,hidden:!w,...c,ref:v,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":R?`${R}px`:void 0,...n.style},children:w&&l})});function um(n){return n?"open":"closed"}var GR=Yb;function FR({...n}){return _.jsx(GR,{"data-slot":"collapsible",...n})}function Xb(n){var a,r,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var l=n.length;for(a=0;a<l;a++)n[a]&&(r=Xb(n[a]))&&(s&&(s+=" "),s+=r)}else for(r in n)n[r]&&(s&&(s+=" "),s+=r);return s}function Kb(){for(var n,a,r=0,s="",l=arguments.length;r<l;r++)(n=arguments[r])&&(a=Xb(n))&&(s&&(s+=" "),s+=a);return s}const n0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,a0=Kb,cm=(n,a)=>r=>{var s;if((a==null?void 0:a.variants)==null)return a0(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:l,defaultVariants:c}=a,f=Object.keys(l).map(m=>{const v=r==null?void 0:r[m],p=c==null?void 0:c[m];if(v===null)return null;const b=n0(v)||n0(p);return l[m][b]}),h=r&&Object.entries(r).reduce((m,v)=>{let[p,b]=v;return b===void 0||(m[p]=b),m},{}),g=a==null||(s=a.compoundVariants)===null||s===void 0?void 0:s.reduce((m,v)=>{let{class:p,className:b,...x}=v;return Object.entries(x).every(R=>{let[w,T]=R;return Array.isArray(T)?T.includes({...c,...h}[w]):{...c,...h}[w]===T})?[...m,p,b]:m},[]);return a0(n,f,g,r==null?void 0:r.class,r==null?void 0:r.className)},th=768;function YR(){const[n,a]=E.useState(void 0);return E.useEffect(()=>{const r=window.matchMedia(`(max-width: ${th-1}px)`),s=()=>{a(window.innerWidth<th)};return r.addEventListener("change",s),a(window.innerWidth<th),()=>r.removeEventListener("change",s)},[]),!!n}const fm="-",QR=n=>{const a=KR(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:f=>{const h=f.split(fm);return h[0]===""&&h.length!==1&&h.shift(),Zb(h,a)||XR(f)},getConflictingClassGroupIds:(f,h)=>{const g=r[f]||[];return h&&s[f]?[...g,...s[f]]:g}}},Zb=(n,a)=>{var f;if(n.length===0)return a.classGroupId;const r=n[0],s=a.nextPart.get(r),l=s?Zb(n.slice(1),s):void 0;if(l)return l;if(a.validators.length===0)return;const c=n.join(fm);return(f=a.validators.find(({validator:h})=>h(c)))==null?void 0:f.classGroupId},r0=/^\[(.+)\]$/,XR=n=>{if(r0.test(n)){const a=r0.exec(n)[1],r=a==null?void 0:a.substring(0,a.indexOf(":"));if(r)return"arbitrary.."+r}},KR=n=>{const{theme:a,classGroups:r}=n,s={nextPart:new Map,validators:[]};for(const l in r)Rh(r[l],s,l,a);return s},Rh=(n,a,r,s)=>{n.forEach(l=>{if(typeof l=="string"){const c=l===""?a:i0(a,l);c.classGroupId=r;return}if(typeof l=="function"){if(ZR(l)){Rh(l(s),a,r,s);return}a.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([c,f])=>{Rh(f,i0(a,c),r,s)})})},i0=(n,a)=>{let r=n;return a.split(fm).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},ZR=n=>n.isThemeGetter,$R=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,r=new Map,s=new Map;const l=(c,f)=>{r.set(c,f),a++,a>n&&(a=0,s=r,r=new Map)};return{get(c){let f=r.get(c);if(f!==void 0)return f;if((f=s.get(c))!==void 0)return l(c,f),f},set(c,f){r.has(c)?r.set(c,f):l(c,f)}}},_h="!",Th=":",IR=Th.length,JR=n=>{const{prefix:a,experimentalParseClassName:r}=n;let s=l=>{const c=[];let f=0,h=0,g=0,m;for(let R=0;R<l.length;R++){let w=l[R];if(f===0&&h===0){if(w===Th){c.push(l.slice(g,R)),g=R+IR;continue}if(w==="/"){m=R;continue}}w==="["?f++:w==="]"?f--:w==="("?h++:w===")"&&h--}const v=c.length===0?l:l.substring(g),p=WR(v),b=p!==v,x=m&&m>g?m-g:void 0;return{modifiers:c,hasImportantModifier:b,baseClassName:p,maybePostfixModifierPosition:x}};if(a){const l=a+Th,c=s;s=f=>f.startsWith(l)?c(f.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:f,maybePostfixModifierPosition:void 0}}if(r){const l=s;s=c=>r({className:c,parseClassName:l})}return s},WR=n=>n.endsWith(_h)?n.substring(0,n.length-1):n.startsWith(_h)?n.substring(1):n,t_=n=>{const a=Object.fromEntries(n.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const l=[];let c=[];return s.forEach(f=>{f[0]==="["||a[f]?(l.push(...c.sort(),f),c=[]):c.push(f)}),l.push(...c.sort()),l}},e_=n=>({cache:$R(n.cacheSize),parseClassName:JR(n),sortModifiers:t_(n),...QR(n)}),n_=/\s+/,a_=(n,a)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:l,sortModifiers:c}=a,f=[],h=n.trim().split(n_);let g="";for(let m=h.length-1;m>=0;m-=1){const v=h[m],{isExternal:p,modifiers:b,hasImportantModifier:x,baseClassName:R,maybePostfixModifierPosition:w}=r(v);if(p){g=v+(g.length>0?" "+g:g);continue}let T=!!w,A=s(T?R.substring(0,w):R);if(!A){if(!T){g=v+(g.length>0?" "+g:g);continue}if(A=s(R),!A){g=v+(g.length>0?" "+g:g);continue}T=!1}const L=c(b).join(":"),z=x?L+_h:L,G=z+A;if(f.includes(G))continue;f.push(G);const B=l(A,T);for(let P=0;P<B.length;++P){const Q=B[P];f.push(z+Q)}g=v+(g.length>0?" "+g:g)}return g};function r_(){let n=0,a,r,s="";for(;n<arguments.length;)(a=arguments[n++])&&(r=$b(a))&&(s&&(s+=" "),s+=r);return s}const $b=n=>{if(typeof n=="string")return n;let a,r="";for(let s=0;s<n.length;s++)n[s]&&(a=$b(n[s]))&&(r&&(r+=" "),r+=a);return r};function i_(n,...a){let r,s,l,c=f;function f(g){const m=a.reduce((v,p)=>p(v),n());return r=e_(m),s=r.cache.get,l=r.cache.set,c=h,h(g)}function h(g){const m=s(g);if(m)return m;const v=a_(g,r);return l(g,v),v}return function(){return c(r_.apply(null,arguments))}}const ye=n=>{const a=r=>r[n]||[];return a.isThemeGetter=!0,a},Ib=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,s_=/^\d+\/\d+$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,l_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,c_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,f_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ji=n=>s_.test(n),Dt=n=>!!n&&!Number.isNaN(Number(n)),Wa=n=>!!n&&Number.isInteger(Number(n)),eh=n=>n.endsWith("%")&&Dt(n.slice(0,-1)),ya=n=>o_.test(n),d_=()=>!0,h_=n=>l_.test(n)&&!u_.test(n),Wb=()=>!1,m_=n=>c_.test(n),p_=n=>f_.test(n),g_=n=>!pt(n)&&!gt(n),v_=n=>As(n,n1,Wb),pt=n=>Ib.test(n),Pr=n=>As(n,a1,h_),nh=n=>As(n,w_,Dt),s0=n=>As(n,t1,Wb),y_=n=>As(n,e1,p_),Cu=n=>As(n,r1,m_),gt=n=>Jb.test(n),Uo=n=>Os(n,a1),b_=n=>Os(n,E_),o0=n=>Os(n,t1),S_=n=>Os(n,n1),x_=n=>Os(n,e1),Au=n=>Os(n,r1,!0),As=(n,a,r)=>{const s=Ib.exec(n);return s?s[1]?a(s[1]):r(s[2]):!1},Os=(n,a,r=!1)=>{const s=Jb.exec(n);return s?s[1]?a(s[1]):r:!1},t1=n=>n==="position"||n==="percentage",e1=n=>n==="image"||n==="url",n1=n=>n==="length"||n==="size"||n==="bg-size",a1=n=>n==="length",w_=n=>n==="number",E_=n=>n==="family-name",r1=n=>n==="shadow",R_=()=>{const n=ye("color"),a=ye("font"),r=ye("text"),s=ye("font-weight"),l=ye("tracking"),c=ye("leading"),f=ye("breakpoint"),h=ye("container"),g=ye("spacing"),m=ye("radius"),v=ye("shadow"),p=ye("inset-shadow"),b=ye("text-shadow"),x=ye("drop-shadow"),R=ye("blur"),w=ye("perspective"),T=ye("aspect"),A=ye("ease"),L=ye("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...G(),gt,pt],P=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],N=()=>[gt,pt,g],U=()=>[Ji,"full","auto",...N()],at=()=>[Wa,"none","subgrid",gt,pt],rt=()=>["auto",{span:["full",Wa,gt,pt]},Wa,gt,pt],W=()=>[Wa,"auto",gt,pt],st=()=>["auto","min","max","fr",gt,pt],vt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],lt=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...N()],K=()=>[Ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],F=()=>[n,gt,pt],ut=()=>[...G(),o0,s0,{position:[gt,pt]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",S_,v_,{size:[gt,pt]}],et=()=>[eh,Uo,Pr],$=()=>["","none","full",m,gt,pt],tt=()=>["",Dt,Uo,Pr],ct=()=>["solid","dashed","dotted","double"],it=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>[Dt,eh,o0,s0],ft=()=>["","none",R,gt,pt],St=()=>["none",Dt,gt,pt],Tt=()=>["none",Dt,gt,pt],Ht=()=>[Dt,gt,pt],qt=()=>[Ji,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ya],breakpoint:[ya],color:[d_],container:[ya],"drop-shadow":[ya],ease:["in","out","in-out"],font:[g_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ya],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ya],shadow:[ya],spacing:["px",Dt],text:[ya],"text-shadow":[ya],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ji,pt,gt,T]}],container:["container"],columns:[{columns:[Dt,pt,gt,h]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[Wa,"auto",gt,pt]}],basis:[{basis:[Ji,"full","auto",h,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Dt,Ji,"auto","initial","none",pt]}],grow:[{grow:["",Dt,gt,pt]}],shrink:[{shrink:["",Dt,gt,pt]}],order:[{order:[Wa,"first","last","none",gt,pt]}],"grid-cols":[{"grid-cols":at()}],"col-start-end":[{col:rt()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":at()}],"row-start-end":[{row:rt()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":st()}],"auto-rows":[{"auto-rows":st()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...vt(),"normal"]}],"justify-items":[{"justify-items":[...lt(),"normal"]}],"justify-self":[{"justify-self":["auto",...lt()]}],"align-content":[{content:["normal",...vt()]}],"align-items":[{items:[...lt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...lt(),{baseline:["","last"]}]}],"place-content":[{"place-content":vt()}],"place-items":[{"place-items":[...lt(),"baseline"]}],"place-self":[{"place-self":["auto",...lt()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[h,"screen",...K()]}],"min-w":[{"min-w":[h,"screen","none",...K()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,Uo,Pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,gt,nh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eh,pt]}],"font-family":[{font:[b_,pt,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,gt,pt]}],"line-clamp":[{"line-clamp":[Dt,"none",gt,nh]}],leading:[{leading:[c,...N()]}],"list-image":[{"list-image":["none",gt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",gt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:[Dt,"from-font","auto",gt,Pr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Dt,"auto",gt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",gt,pt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",gt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ut()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wa,gt,pt],radial:["",gt,pt],conic:[Wa,gt,pt]},x_,y_]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:et()}],"gradient-via-pos":[{via:et()}],"gradient-to-pos":[{to:et()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:tt()}],"border-w-x":[{"border-x":tt()}],"border-w-y":[{"border-y":tt()}],"border-w-s":[{"border-s":tt()}],"border-w-e":[{"border-e":tt()}],"border-w-t":[{"border-t":tt()}],"border-w-r":[{"border-r":tt()}],"border-w-b":[{"border-b":tt()}],"border-w-l":[{"border-l":tt()}],"divide-x":[{"divide-x":tt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":tt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ct(),"hidden","none"]}],"divide-style":[{divide:[...ct(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ct(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Dt,gt,pt]}],"outline-w":[{outline:["",Dt,Uo,Pr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",v,Au,Cu]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Au,Cu]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:tt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Dt,Pr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":tt()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",b,Au,Cu]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Dt,gt,pt]}],"mix-blend":[{"mix-blend":[...it(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":it()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ht()}],"mask-image-linear-to-pos":[{"mask-linear-to":ht()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ht()}],"mask-image-t-to-pos":[{"mask-t-to":ht()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ht()}],"mask-image-r-to-pos":[{"mask-r-to":ht()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ht()}],"mask-image-b-to-pos":[{"mask-b-to":ht()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ht()}],"mask-image-l-to-pos":[{"mask-l-to":ht()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ht()}],"mask-image-x-to-pos":[{"mask-x-to":ht()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ht()}],"mask-image-y-to-pos":[{"mask-y-to":ht()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[gt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ht()}],"mask-image-radial-to-pos":[{"mask-radial-to":ht()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":G()}],"mask-image-conic-pos":[{"mask-conic":[Dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ht()}],"mask-image-conic-to-pos":[{"mask-conic-to":ht()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ut()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",gt,pt]}],filter:[{filter:["","none",gt,pt]}],blur:[{blur:ft()}],brightness:[{brightness:[Dt,gt,pt]}],contrast:[{contrast:[Dt,gt,pt]}],"drop-shadow":[{"drop-shadow":["","none",x,Au,Cu]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",Dt,gt,pt]}],"hue-rotate":[{"hue-rotate":[Dt,gt,pt]}],invert:[{invert:["",Dt,gt,pt]}],saturate:[{saturate:[Dt,gt,pt]}],sepia:[{sepia:["",Dt,gt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",gt,pt]}],"backdrop-blur":[{"backdrop-blur":ft()}],"backdrop-brightness":[{"backdrop-brightness":[Dt,gt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[Dt,gt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Dt,gt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Dt,gt,pt]}],"backdrop-invert":[{"backdrop-invert":["",Dt,gt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[Dt,gt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[Dt,gt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",Dt,gt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",gt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Dt,"initial",gt,pt]}],ease:[{ease:["linear","initial",A,gt,pt]}],delay:[{delay:[Dt,gt,pt]}],animate:[{animate:["none",L,gt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,gt,pt]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:St()}],"rotate-x":[{"rotate-x":St()}],"rotate-y":[{"rotate-y":St()}],"rotate-z":[{"rotate-z":St()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"scale-3d":["scale-3d"],skew:[{skew:Ht()}],"skew-x":[{"skew-x":Ht()}],"skew-y":[{"skew-y":Ht()}],transform:[{transform:[gt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qt()}],"translate-x":[{"translate-x":qt()}],"translate-y":[{"translate-y":qt()}],"translate-z":[{"translate-z":qt()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",gt,pt]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",gt,pt]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[Dt,Uo,Pr,nh]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},__=i_(R_);function Ot(...n){return __(Kb(n))}const T_=cm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function i1({className:n,variant:a,size:r,asChild:s=!1,...l}){const c=s?el:"button";return _.jsx(c,{"data-slot":"button",className:Ot(T_({variant:a,size:r,className:n})),...l})}function l0({className:n,type:a,...r}){return _.jsx("input",{type:a,"data-slot":"input",className:Ot("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",n),...r})}var C_="Separator",u0="horizontal",A_=["horizontal","vertical"],s1=E.forwardRef((n,a)=>{const{decorative:r,orientation:s=u0,...l}=n,c=O_(s)?s:u0,h=r?{role:"none"}:{"aria-orientation":c==="vertical"?c:void 0,role:"separator"};return _.jsx(re.div,{"data-orientation":c,...h,...l,ref:a})});s1.displayName=C_;function O_(n){return A_.includes(n)}var M_=s1;function D_({className:n,orientation:a="horizontal",decorative:r=!0,...s}){return _.jsx(M_,{"data-slot":"separator-root",decorative:r,orientation:a,className:Ot("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),...s})}function ti(n){const a=E.useRef(n);return E.useEffect(()=>{a.current=n}),E.useMemo(()=>(...r)=>{var s;return(s=a.current)==null?void 0:s.call(a,...r)},[])}function N_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n);E.useEffect(()=>{const s=l=>{l.key==="Escape"&&r(l)};return a.addEventListener("keydown",s,{capture:!0}),()=>a.removeEventListener("keydown",s,{capture:!0})},[r,a])}var j_="DismissableLayer",Ch="dismissableLayer.update",L_="dismissableLayer.pointerDownOutside",z_="dismissableLayer.focusOutside",c0,o1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dm=E.forwardRef((n,a)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...g}=n,m=E.useContext(o1),[v,p]=E.useState(null),b=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=E.useState({}),R=Tn(a,Q=>p(Q)),w=Array.from(m.layers),[T]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=w.indexOf(T),L=v?w.indexOf(v):-1,z=m.layersWithOutsidePointerEventsDisabled.size>0,G=L>=A,B=k_(Q=>{const N=Q.target,U=[...m.branches].some(at=>at.contains(N));!G||U||(l==null||l(Q),f==null||f(Q),Q.defaultPrevented||h==null||h())},b),P=P_(Q=>{const N=Q.target;[...m.branches].some(at=>at.contains(N))||(c==null||c(Q),f==null||f(Q),Q.defaultPrevented||h==null||h())},b);return N_(Q=>{L===m.layers.size-1&&(s==null||s(Q),!Q.defaultPrevented&&h&&(Q.preventDefault(),h()))},b),E.useEffect(()=>{if(v)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(c0=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),f0(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=c0)}},[v,b,r,m]),E.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),f0())},[v,m]),E.useEffect(()=>{const Q=()=>x({});return document.addEventListener(Ch,Q),()=>document.removeEventListener(Ch,Q)},[]),_.jsx(re.div,{...g,ref:R,style:{pointerEvents:z?G?"auto":"none":void 0,...n.style},onFocusCapture:Ge(n.onFocusCapture,P.onFocusCapture),onBlurCapture:Ge(n.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Ge(n.onPointerDownCapture,B.onPointerDownCapture)})});dm.displayName=j_;var U_="DismissableLayerBranch",B_=E.forwardRef((n,a)=>{const r=E.useContext(o1),s=E.useRef(null),l=Tn(a,s);return E.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),_.jsx(re.div,{...n,ref:l})});B_.displayName=U_;function k_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n),s=E.useRef(!1),l=E.useRef(()=>{});return E.useEffect(()=>{const c=h=>{if(h.target&&!s.current){let g=function(){l1(L_,r,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",l.current),l.current=g,a.addEventListener("click",l.current,{once:!0})):g()}else a.removeEventListener("click",l.current);s.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",c),a.removeEventListener("click",l.current)}},[a,r]),{onPointerDownCapture:()=>s.current=!0}}function P_(n,a=globalThis==null?void 0:globalThis.document){const r=ti(n),s=E.useRef(!1);return E.useEffect(()=>{const l=c=>{c.target&&!s.current&&l1(z_,r,{originalEvent:c},{discrete:!1})};return a.addEventListener("focusin",l),()=>a.removeEventListener("focusin",l)},[a,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function f0(){const n=new CustomEvent(Ch);document.dispatchEvent(n)}function l1(n,a,r,{discrete:s}){const l=r.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});a&&l.addEventListener(n,a,{once:!0}),s?NR(l,c):l.dispatchEvent(c)}var ah="focusScope.autoFocusOnMount",rh="focusScope.autoFocusOnUnmount",d0={bubbles:!1,cancelable:!0},H_="FocusScope",u1=E.forwardRef((n,a)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:c,...f}=n,[h,g]=E.useState(null),m=ti(l),v=ti(c),p=E.useRef(null),b=Tn(a,w=>g(w)),x=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(s){let w=function(z){if(x.paused||!h)return;const G=z.target;h.contains(G)?p.current=G:tr(p.current,{select:!0})},T=function(z){if(x.paused||!h)return;const G=z.relatedTarget;G!==null&&(h.contains(G)||tr(p.current,{select:!0}))},A=function(z){if(document.activeElement===document.body)for(const B of z)B.removedNodes.length>0&&tr(h)};document.addEventListener("focusin",w),document.addEventListener("focusout",T);const L=new MutationObserver(A);return h&&L.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",T),L.disconnect()}}},[s,h,x.paused]),E.useEffect(()=>{if(h){m0.add(x);const w=document.activeElement;if(!h.contains(w)){const A=new CustomEvent(ah,d0);h.addEventListener(ah,m),h.dispatchEvent(A),A.defaultPrevented||(q_(Q_(c1(h)),{select:!0}),document.activeElement===w&&tr(h))}return()=>{h.removeEventListener(ah,m),setTimeout(()=>{const A=new CustomEvent(rh,d0);h.addEventListener(rh,v),h.dispatchEvent(A),A.defaultPrevented||tr(w??document.body,{select:!0}),h.removeEventListener(rh,v),m0.remove(x)},0)}}},[h,m,v,x]);const R=E.useCallback(w=>{if(!r&&!s||x.paused)return;const T=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,A=document.activeElement;if(T&&A){const L=w.currentTarget,[z,G]=V_(L);z&&G?!w.shiftKey&&A===G?(w.preventDefault(),r&&tr(z,{select:!0})):w.shiftKey&&A===z&&(w.preventDefault(),r&&tr(G,{select:!0})):A===L&&w.preventDefault()}},[r,s,x.paused]);return _.jsx(re.div,{tabIndex:-1,...f,ref:b,onKeyDown:R})});u1.displayName=H_;function q_(n,{select:a=!1}={}){const r=document.activeElement;for(const s of n)if(tr(s,{select:a}),document.activeElement!==r)return}function V_(n){const a=c1(n),r=h0(a,n),s=h0(a.reverse(),n);return[r,s]}function c1(n){const a=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const l=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||l?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)a.push(r.currentNode);return a}function h0(n,a){for(const r of n)if(!G_(r,{upTo:a}))return r}function G_(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function F_(n){return n instanceof HTMLInputElement&&"select"in n}function tr(n,{select:a=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&F_(n)&&a&&n.select()}}var m0=Y_();function Y_(){let n=[];return{add(a){const r=n[0];a!==r&&(r==null||r.pause()),n=p0(n,a),n.unshift(a)},remove(a){var r;n=p0(n,a),(r=n[0])==null||r.resume()}}}function p0(n,a){const r=[...n],s=r.indexOf(a);return s!==-1&&r.splice(s,1),r}function Q_(n){return n.filter(a=>a.tagName!=="A")}var X_="Portal",hm=E.forwardRef((n,a)=>{var h;const{container:r,...s}=n,[l,c]=E.useState(!1);_n(()=>c(!0),[]);const f=r||l&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?Ub.createPortal(_.jsx(re.div,{...s,ref:a}),f):null});hm.displayName=X_;var ih=0;function K_(){E.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??g0()),document.body.insertAdjacentElement("beforeend",n[1]??g0()),ih++,()=>{ih===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),ih--}},[])}function g0(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var In=function(){return In=Object.assign||function(a){for(var r,s=1,l=arguments.length;s<l;s++){r=arguments[s];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(a[c]=r[c])}return a},In.apply(this,arguments)};function f1(n,a){var r={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&a.indexOf(s)<0&&(r[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(n);l<s.length;l++)a.indexOf(s[l])<0&&Object.prototype.propertyIsEnumerable.call(n,s[l])&&(r[s[l]]=n[s[l]]);return r}function Z_(n,a,r){if(r||arguments.length===2)for(var s=0,l=a.length,c;s<l;s++)(c||!(s in a))&&(c||(c=Array.prototype.slice.call(a,0,s)),c[s]=a[s]);return n.concat(c||Array.prototype.slice.call(a))}var ku="right-scroll-bar-position",Pu="width-before-scroll-bar",$_="with-scroll-bars-hidden",I_="--removed-body-scroll-bar-size";function sh(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function J_(n,a){var r=E.useState(function(){return{value:n,callback:a,facade:{get current(){return r.value},set current(s){var l=r.value;l!==s&&(r.value=s,r.callback(s,l))}}}})[0];return r.callback=a,r.facade}var W_=typeof window<"u"?E.useLayoutEffect:E.useEffect,v0=new WeakMap;function tT(n,a){var r=J_(null,function(s){return n.forEach(function(l){return sh(l,s)})});return W_(function(){var s=v0.get(r);if(s){var l=new Set(s),c=new Set(n),f=r.current;l.forEach(function(h){c.has(h)||sh(h,null)}),c.forEach(function(h){l.has(h)||sh(h,f)})}v0.set(r,n)},[n]),r}function eT(n){return n}function nT(n,a){a===void 0&&(a=eT);var r=[],s=!1,l={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(c){var f=a(c,s);return r.push(f),function(){r=r.filter(function(h){return h!==f})}},assignSyncMedium:function(c){for(s=!0;r.length;){var f=r;r=[],f.forEach(c)}r={push:function(h){return c(h)},filter:function(){return r}}},assignMedium:function(c){s=!0;var f=[];if(r.length){var h=r;r=[],h.forEach(c),f=r}var g=function(){var v=f;f=[],v.forEach(c)},m=function(){return Promise.resolve().then(g)};m(),r={push:function(v){f.push(v),m()},filter:function(v){return f=f.filter(v),r}}}};return l}function aT(n){n===void 0&&(n={});var a=nT(null);return a.options=In({async:!0,ssr:!1},n),a}var d1=function(n){var a=n.sideCar,r=f1(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=a.read();if(!s)throw new Error("Sidecar medium not found");return E.createElement(s,In({},r))};d1.isSideCarExport=!0;function rT(n,a){return n.useMedium(a),d1}var h1=aT(),oh=function(){},hc=E.forwardRef(function(n,a){var r=E.useRef(null),s=E.useState({onScrollCapture:oh,onWheelCapture:oh,onTouchMoveCapture:oh}),l=s[0],c=s[1],f=n.forwardProps,h=n.children,g=n.className,m=n.removeScrollBar,v=n.enabled,p=n.shards,b=n.sideCar,x=n.noRelative,R=n.noIsolation,w=n.inert,T=n.allowPinchZoom,A=n.as,L=A===void 0?"div":A,z=n.gapMode,G=f1(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=b,P=tT([r,a]),Q=In(In({},G),l);return E.createElement(E.Fragment,null,v&&E.createElement(B,{sideCar:h1,removeScrollBar:m,shards:p,noRelative:x,noIsolation:R,inert:w,setCallbacks:c,allowPinchZoom:!!T,lockRef:r,gapMode:z}),f?E.cloneElement(E.Children.only(h),In(In({},Q),{ref:P})):E.createElement(L,In({},Q,{className:g,ref:P}),h))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hc.classNames={fullWidth:Pu,zeroRight:ku};var iT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sT(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=iT();return a&&n.setAttribute("nonce",a),n}function oT(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function lT(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var uT=function(){var n=0,a=null;return{add:function(r){n==0&&(a=sT())&&(oT(a,r),lT(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},cT=function(){var n=uT();return function(a,r){E.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&r])}},m1=function(){var n=cT(),a=function(r){var s=r.styles,l=r.dynamic;return n(s,l),null};return a},fT={left:0,top:0,right:0,gap:0},lh=function(n){return parseInt(n||"",10)||0},dT=function(n){var a=window.getComputedStyle(document.body),r=a[n==="padding"?"paddingLeft":"marginLeft"],s=a[n==="padding"?"paddingTop":"marginTop"],l=a[n==="padding"?"paddingRight":"marginRight"];return[lh(r),lh(s),lh(l)]},hT=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return fT;var a=dT(n),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,s-r+a[2]-a[0])}},mT=m1(),os="data-scroll-locked",pT=function(n,a,r,s){var l=n.left,c=n.top,f=n.right,h=n.gap;return r===void 0&&(r="margin"),`
128
128
  .`.concat($_,` {
129
129
  overflow: hidden `).concat(s,`;
130
130
  padding-right: `).concat(h,"px ").concat(s,`;
@@ -173,4 +173,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
173
173
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...r){const s=new this(a);return r.forEach(l=>s.set(l)),s}static accessor(a){const s=(this[z0]=this[z0]={accessors:{}}).accessors,l=this.prototype;function c(f){const h=Bo(f);s[h]||(T4(l,f),s[h]=!0)}return Z.isArray(a)?a.forEach(c):c(a),this}};Je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Je.prototype,({value:n},a)=>{let r=a[0].toUpperCase()+a.slice(1);return{get:()=>n,set(s){this[r]=s}}});Z.freezeMethods(Je);function hh(n,a){const r=this||ll,s=a||r,l=Je.from(s.headers);let c=s.data;return Z.forEach(n,function(h){c=h.call(r,c,l.normalize(),a?a.status:void 0)}),l.normalize(),c}function US(n){return!!(n&&n.__CANCEL__)}function js(n,a,r){_t.call(this,n??"canceled",_t.ERR_CANCELED,a,r),this.name="CanceledError"}Z.inherits(js,_t,{__CANCEL__:!0});function BS(n,a,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?n(r):a(new _t("Request failed with status code "+r.status,[_t.ERR_BAD_REQUEST,_t.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function C4(n){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return a&&a[1]||""}function A4(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 m=Date.now(),v=s[c];f||(f=m),r[l]=g,s[l]=m;let p=c,b=0;for(;p!==l;)b+=r[p++],p=p%n;if(l=(l+1)%n,l===c&&(c=(c+1)%n),m-f<a)return;const x=v&&m-v;return x?Math.round(b*1e3/x):void 0}}function O4(n,a){let r=0,s=1e3/a,l,c;const f=(m,v=Date.now())=>{r=v,l=null,c&&(clearTimeout(c),c=null),n.apply(null,m)};return[(...m)=>{const v=Date.now(),p=v-r;p>=s?f(m,v):(l=m,c||(c=setTimeout(()=>{c=null,f(l)},s-p)))},()=>l&&f(l)]}const rc=(n,a,r=3)=>{let s=0;const l=A4(50,250);return O4(c=>{const f=c.loaded,h=c.lengthComputable?c.total:void 0,g=f-s,m=l(g),v=f<=h;s=f;const p={loaded:f,total:h,progress:h?f/h:void 0,bytes:g,rate:m||void 0,estimated:m&&h&&v?(h-f)/m:void 0,event:c,lengthComputable:h!=null,[a?"download":"upload"]:!0};n(p)},r)},U0=(n,a)=>{const r=n!=null;return[s=>a[0]({lengthComputable:r,total:n,loaded:s}),a[1]]},B0=n=>(...a)=>Z.asap(()=>n(...a)),M4=Ue.hasStandardBrowserEnv?((n,a)=>r=>(r=new URL(r,Ue.origin),n.protocol===r.protocol&&n.host===r.host&&(a||n.port===r.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,D4=Ue.hasStandardBrowserEnv?{write(n,a,r,s,l,c){const f=[n+"="+encodeURIComponent(a)];Z.isNumber(r)&&f.push("expires="+new Date(r).toGMTString()),Z.isString(s)&&f.push("path="+s),Z.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 N4(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function j4(n,a){return a?n.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):n}function kS(n,a,r){let s=!N4(a);return n&&(s||r==!1)?j4(n,a):a}const k0=n=>n instanceof Je?{...n}:n;function ai(n,a){a=a||{};const r={};function s(m,v,p,b){return Z.isPlainObject(m)&&Z.isPlainObject(v)?Z.merge.call({caseless:b},m,v):Z.isPlainObject(v)?Z.merge({},v):Z.isArray(v)?v.slice():v}function l(m,v,p,b){if(Z.isUndefined(v)){if(!Z.isUndefined(m))return s(void 0,m,p,b)}else return s(m,v,p,b)}function c(m,v){if(!Z.isUndefined(v))return s(void 0,v)}function f(m,v){if(Z.isUndefined(v)){if(!Z.isUndefined(m))return s(void 0,m)}else return s(void 0,v)}function h(m,v,p){if(p in a)return s(m,v);if(p in n)return s(void 0,m)}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:(m,v,p)=>l(k0(m),k0(v),p,!0)};return Z.forEach(Object.keys(Object.assign({},n,a)),function(v){const p=g[v]||l,b=p(n[v],a[v],v);Z.isUndefined(b)&&p!==h||(r[v]=b)}),r}const PS=n=>{const a=ai({},n);let{data:r,withXSRFToken:s,xsrfHeaderName:l,xsrfCookieName:c,headers:f,auth:h}=a;a.headers=f=Je.from(f),a.url=jS(kS(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(Z.isFormData(r)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if((g=f.getContentType())!==!1){const[m,...v]=g?g.split(";").map(p=>p.trim()).filter(Boolean):[];f.setContentType([m||"multipart/form-data",...v].join("; "))}}if(Ue.hasStandardBrowserEnv&&(s&&Z.isFunction(s)&&(s=s(a)),s||s!==!1&&M4(a.url))){const m=l&&c&&D4.read(c);m&&f.set(l,m)}return a},L4=typeof XMLHttpRequest<"u",z4=L4&&function(n){return new Promise(function(r,s){const l=PS(n);let c=l.data;const f=Je.from(l.headers).normalize();let{responseType:h,onUploadProgress:g,onDownloadProgress:m}=l,v,p,b,x,R;function w(){x&&x(),R&&R(),l.cancelToken&&l.cancelToken.unsubscribe(v),l.signal&&l.signal.removeEventListener("abort",v)}let T=new XMLHttpRequest;T.open(l.method.toUpperCase(),l.url,!0),T.timeout=l.timeout;function A(){if(!T)return;const z=Je.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),B={data:!h||h==="text"||h==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:z,config:n,request:T};BS(function(Q){r(Q),w()},function(Q){s(Q),w()},B),T=null}"onloadend"in T?T.onloadend=A:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(A)},T.onabort=function(){T&&(s(new _t("Request aborted",_t.ECONNABORTED,n,T)),T=null)},T.onerror=function(){s(new _t("Network Error",_t.ERR_NETWORK,n,T)),T=null},T.ontimeout=function(){let G=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const B=l.transitional||LS;l.timeoutErrorMessage&&(G=l.timeoutErrorMessage),s(new _t(G,B.clarifyTimeoutError?_t.ETIMEDOUT:_t.ECONNABORTED,n,T)),T=null},c===void 0&&f.setContentType(null),"setRequestHeader"in T&&Z.forEach(f.toJSON(),function(G,B){T.setRequestHeader(B,G)}),Z.isUndefined(l.withCredentials)||(T.withCredentials=!!l.withCredentials),h&&h!=="json"&&(T.responseType=l.responseType),m&&([b,R]=rc(m,!0),T.addEventListener("progress",b)),g&&T.upload&&([p,x]=rc(g),T.upload.addEventListener("progress",p),T.upload.addEventListener("loadend",x)),(l.cancelToken||l.signal)&&(v=z=>{T&&(s(!z||z.type?new js(null,n,T):z),T.abort(),T=null)},l.cancelToken&&l.cancelToken.subscribe(v),l.signal&&(l.signal.aborted?v():l.signal.addEventListener("abort",v)));const L=C4(l.url);if(L&&Ue.protocols.indexOf(L)===-1){s(new _t("Unsupported protocol "+L+":",_t.ERR_BAD_REQUEST,n));return}T.send(c||null)})},U4=(n,a)=>{const{length:r}=n=n?n.filter(Boolean):[];if(a||r){let s=new AbortController,l;const c=function(m){if(!l){l=!0,h();const v=m instanceof Error?m:this.reason;s.abort(v instanceof _t?v:new js(v instanceof Error?v.message:v))}};let f=a&&setTimeout(()=>{f=null,c(new _t(`timeout ${a} of ms exceeded`,_t.ETIMEDOUT))},a);const h=()=>{n&&(f&&clearTimeout(f),f=null,n.forEach(m=>{m.unsubscribe?m.unsubscribe(c):m.removeEventListener("abort",c)}),n=null)};n.forEach(m=>m.addEventListener("abort",c));const{signal:g}=s;return g.unsubscribe=()=>Z.asap(h),g}},B4=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},k4=async function*(n,a){for await(const r of P4(n))yield*B4(r,a)},P4=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()}},P0=(n,a,r,s)=>{const l=k4(n,a);let c=0,f,h=g=>{f||(f=!0,s&&s(g))};return new ReadableStream({async pull(g){try{const{done:m,value:v}=await l.next();if(m){h(),g.close();return}let p=v.byteLength;if(r){let b=c+=p;r(b)}g.enqueue(new Uint8Array(v))}catch(m){throw h(m),m}},cancel(g){return h(g),l.return()}},{highWaterMark:2})},_c=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",HS=_c&&typeof ReadableStream=="function",H4=_c&&(typeof TextEncoder=="function"?(n=>a=>n.encode(a))(new TextEncoder):async n=>new Uint8Array(await new Response(n).arrayBuffer())),qS=(n,...a)=>{try{return!!n(...a)}catch{return!1}},q4=HS&&qS(()=>{let n=!1;const a=new Request(Ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return n=!0,"half"}}).headers.has("Content-Type");return n&&!a}),H0=64*1024,Bh=HS&&qS(()=>Z.isReadableStream(new Response("").body)),ic={stream:Bh&&(n=>n.body)};_c&&(n=>{["text","arrayBuffer","blob","formData","stream"].forEach(a=>{!ic[a]&&(ic[a]=Z.isFunction(n[a])?r=>r[a]():(r,s)=>{throw new _t(`Response type '${a}' is not supported`,_t.ERR_NOT_SUPPORT,s)})})})(new Response);const V4=async n=>{if(n==null)return 0;if(Z.isBlob(n))return n.size;if(Z.isSpecCompliantForm(n))return(await new Request(Ue.origin,{method:"POST",body:n}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(n)||Z.isArrayBuffer(n))return n.byteLength;if(Z.isURLSearchParams(n)&&(n=n+""),Z.isString(n))return(await H4(n)).byteLength},G4=async(n,a)=>{const r=Z.toFiniteNumber(n.getContentLength());return r??V4(a)},F4=_c&&(async n=>{let{url:a,method:r,data:s,signal:l,cancelToken:c,timeout:f,onDownloadProgress:h,onUploadProgress:g,responseType:m,headers:v,withCredentials:p="same-origin",fetchOptions:b}=PS(n);m=m?(m+"").toLowerCase():"text";let x=U4([l,c&&c.toAbortSignal()],f),R;const w=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let T;try{if(g&&q4&&r!=="get"&&r!=="head"&&(T=await G4(v,s))!==0){let B=new Request(a,{method:"POST",body:s,duplex:"half"}),P;if(Z.isFormData(s)&&(P=B.headers.get("content-type"))&&v.setContentType(P),B.body){const[Q,N]=U0(T,rc(B0(g)));s=P0(B.body,H0,Q,N)}}Z.isString(p)||(p=p?"include":"omit");const A="credentials"in Request.prototype;R=new Request(a,{...b,signal:x,method:r.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:A?p:void 0});let L=await fetch(R);const z=Bh&&(m==="stream"||m==="response");if(Bh&&(h||z&&w)){const B={};["status","statusText","headers"].forEach(U=>{B[U]=L[U]});const P=Z.toFiniteNumber(L.headers.get("content-length")),[Q,N]=h&&U0(P,rc(B0(h),!0))||[];L=new Response(P0(L.body,H0,Q,()=>{N&&N(),w&&w()}),B)}m=m||"text";let G=await ic[Z.findKey(ic,m)||"text"](L,n);return!z&&w&&w(),await new Promise((B,P)=>{BS(B,P,{data:G,headers:Je.from(L.headers),status:L.status,statusText:L.statusText,config:n,request:R})})}catch(A){throw w&&w(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new _t("Network Error",_t.ERR_NETWORK,n,R),{cause:A.cause||A}):_t.from(A,A&&A.code,n,R)}}),kh={http:i4,xhr:z4,fetch:F4};Z.forEach(kh,(n,a)=>{if(n){try{Object.defineProperty(n,"name",{value:a})}catch{}Object.defineProperty(n,"adapterName",{value:a})}});const q0=n=>`- ${n}`,Y4=n=>Z.isFunction(n)||n===null||n===!1,VS={getAdapter:n=>{n=Z.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,!Y4(r)&&(s=kh[(f=String(r)).toLowerCase()],s===void 0))throw new _t(`Unknown adapter '${f}'`);if(s)break;l[f||"#"+c]=s}if(!s){const c=Object.entries(l).map(([h,g])=>`adapter ${h} `+(g===!1?"is not supported by the environment":"is not available in the build"));let f=a?c.length>1?`since :
174
174
  `+c.map(q0).join(`
175
175
  `):" "+q0(c[0]):"as no adapter specified";throw new _t("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return s},adapters:kh};function mh(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new js(null,n)}function V0(n){return mh(n),n.headers=Je.from(n.headers),n.data=hh.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),VS.getAdapter(n.adapter||ll.adapter)(n).then(function(s){return mh(n),s.data=hh.call(n,n.transformResponse,s),s.headers=Je.from(s.headers),s},function(s){return US(s)||(mh(n),s&&s.response&&(s.response.data=hh.call(n,n.transformResponse,s.response),s.response.headers=Je.from(s.response.headers))),Promise.reject(s)})}const GS="1.9.0",Tc={};["object","boolean","number","function","string","symbol"].forEach((n,a)=>{Tc[n]=function(s){return typeof s===n||"a"+(a<1?"n ":" ")+n}});const G0={};Tc.transitional=function(a,r,s){function l(c,f){return"[Axios v"+GS+"] Transitional option '"+c+"'"+f+(s?". "+s:"")}return(c,f,h)=>{if(a===!1)throw new _t(l(f," has been removed"+(r?" in "+r:"")),_t.ERR_DEPRECATED);return r&&!G0[f]&&(G0[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}};Tc.spelling=function(a){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${a}`),!0)};function Q4(n,a,r){if(typeof n!="object")throw new _t("options must be an object",_t.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 _t("option "+c+" must be "+g,_t.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new _t("Unknown option "+c,_t.ERR_BAD_OPTION)}}const Gu={assertOptions:Q4,validators:Tc},Qn=Gu.validators;let Wr=class{constructor(a){this.defaults=a||{},this.interceptors={request:new L0,response:new L0}}async request(a,r){try{return await this._request(a,r)}catch(s){if(s instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const c=l.stack?l.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=`
176
- `+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=ai(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Gu.assertOptions(s,{silentJSONParsing:Qn.transitional(Qn.boolean),forcedJSONParsing:Qn.transitional(Qn.boolean),clarifyTimeoutError:Qn.transitional(Qn.boolean)},!1),l!=null&&(Z.isFunction(l)?r.paramsSerializer={serialize:l}:Gu.assertOptions(l,{encode:Qn.function,serialize:Qn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gu.assertOptions(r,{baseUrl:Qn.spelling("baseURL"),withXsrfToken:Qn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&Z.merge(c.common,c[r.method]);c&&Z.forEach(["delete","get","head","post","put","patch","common"],R=>{delete c[R]}),r.headers=Je.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(g=g&&w.synchronous,h.unshift(w.fulfilled,w.rejected))});const m=[];this.interceptors.response.forEach(function(w){m.push(w.fulfilled,w.rejected)});let v,p=0,b;if(!g){const R=[V0.bind(this),void 0];for(R.unshift.apply(R,h),R.push.apply(R,m),b=R.length,v=Promise.resolve(r);p<b;)v=v.then(R[p++],R[p++]);return v}b=h.length;let x=r;for(p=0;p<b;){const R=h[p++],w=h[p++];try{x=R(x)}catch(T){w.call(this,T);break}}try{v=V0.call(this,x)}catch(R){return Promise.reject(R)}for(p=0,b=m.length;p<b;)v=v.then(m[p++],m[p++]);return v}getUri(a){a=ai(this.defaults,a);const r=kS(a.baseURL,a.url,a.allowAbsoluteUrls);return jS(r,a.params,a.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(a){Wr.prototype[a]=function(r,s){return this.request(ai(s||{},{method:a,url:r,data:(s||{}).data}))}});Z.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(ai(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Wr.prototype[a]=r(),Wr.prototype[a+"Form"]=r(!0)});let X4=class FS{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 FS(function(l){a=l}),cancel:a}}};function K4(n){return function(r){return n.apply(null,r)}}function Z4(n){return Z.isObject(n)&&n.isAxiosError===!0}const Ph={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(Ph).forEach(([n,a])=>{Ph[a]=n});function YS(n){const a=new Wr(n),r=xS(Wr.prototype.request,a);return Z.extend(r,Wr.prototype,a,{allOwnKeys:!0}),Z.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return YS(ai(n,l))},r}const ce=YS(ll);ce.Axios=Wr;ce.CanceledError=js;ce.CancelToken=X4;ce.isCancel=US;ce.VERSION=GS;ce.toFormData=Rc;ce.AxiosError=_t;ce.Cancel=ce.CanceledError;ce.all=function(a){return Promise.all(a)};ce.spread=K4;ce.isAxiosError=Z4;ce.mergeConfig=ai;ce.AxiosHeaders=Je;ce.formToJSON=n=>zS(Z.isHTMLForm(n)?new FormData(n):n);ce.getAdapter=VS.getAdapter;ce.HttpStatusCode=Ph;ce.default=ce;const{Axios:dD,AxiosError:hD,CanceledError:mD,isCancel:pD,CancelToken:gD,VERSION:vD,all:yD,Cancel:bD,isAxiosError:SD,spread:xD,toFormData:wD,AxiosHeaders:ED,HttpStatusCode:RD,formToJSON:_D,getAdapter:TD,mergeConfig:CD}=ce,Lm=ce.create({baseURL:"/api"});Lm.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Lm.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class F0{constructor(a,r){this.client=a,this.data=r}}class $4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class I4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class J4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class W4{constructor(){$i(this,"api",Lm);$i(this,"guilds",new I4(this));$i(this,"plugins",new J4(this));$i(this,"events",new $4(this));$i(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 F0(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 F0(this,s.user),s}}const QS=E.createContext(null);function tM({children:n}){const[a,r]=E.useState(()=>new W4);return _.jsx(QS.Provider,{value:{client:a,setClient:r},children:n})}function zm(){const n=E.use(QS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const ph={navMain:[{title:"Commands",url:"/commands",icon:Iy,isActive:!1},{title:"Events",url:"/events",icon:$y,isActive:!1},{title:"Plugins",url:"/plugins",icon:iR,isActive:!1},{title:"Guilds",url:"/guilds",icon:t0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:oR,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:SR},{title:"Discord",url:"https://ctrl.lol/discord",icon:t0}],projects:[{name:"Commands",url:"#",icon:Iy},{name:"Middlewares",url:"#",icon:cR},{name:"Events",url:"#",icon:$y}]};function eM({...n}){var r;const a=zm();return _.jsxs(ZA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[_.jsx(IA,{children:_.jsx(rl,{children:_.jsx(il,{children:_.jsx(sl,{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(WA,{children:[_.jsx(nO,{items:ph.navMain}),_.jsx(aO,{projects:ph.projects}),_.jsx(rO,{items:ph.navSecondary,className:"mt-auto"})]}),_.jsx(JA,{children:_.jsx(bO,{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 nM({className:n,...a}){return _.jsx("div",{"data-slot":"card",className:Ot("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function aM({className:n,...a}){return _.jsx("div",{"data-slot":"card-header",className:Ot("@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 rM({className:n,...a}){return _.jsx("div",{"data-slot":"card-title",className:Ot("leading-none font-semibold",n),...a})}function iM({className:n,...a}){return _.jsx("div",{"data-slot":"card-description",className:Ot("text-muted-foreground text-sm",n),...a})}function sM({className:n,...a}){return _.jsx("div",{"data-slot":"card-content",className:Ot("px-6",n),...a})}function AD({className:n,...a}){return _.jsx("div",{"data-slot":"card-footer",className:Ot("flex items-center px-6 [.border-t]:pt-6",n),...a})}var oM="Label",XS=E.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())}}));XS.displayName=oM;var lM=XS;function Y0({className:n,...a}){return _.jsx(lM,{"data-slot":"label",className:Ot("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 Q0=n=>{let a;const r=new Set,s=(m,v)=>{const p=typeof m=="function"?m(a):m;if(!Object.is(p,a)){const b=a;a=v??(typeof p!="object"||p===null)?p:Object.assign({},a,p),r.forEach(x=>x(a,b))}},l=()=>a,h={setState:s,getState:l,getInitialState:()=>g,subscribe:m=>(r.add(m),()=>r.delete(m))},g=a=n(s,l,h);return h},uM=n=>n?Q0(n):Q0,cM=n=>n;function fM(n,a=cM){const r=ot.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return ot.useDebugValue(r),r}const X0=n=>{const a=uM(n),r=s=>fM(a,s);return Object.assign(r,a),r},dM=n=>n?X0(n):X0,KS=dM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function hM(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 mM=n=>{switch(n){case"success":return vM;case"info":return bM;case"warning":return yM;case"error":return SM;default:return null}},pM=Array(12).fill(0),gM=({visible:n,className:a})=>ot.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},ot.createElement("div",{className:"sonner-spinner"},pM.map((r,s)=>ot.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),vM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),yM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ot.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"})),bM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),SM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),xM=ot.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"},ot.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ot.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wM=()=>{const[n,a]=ot.useState(document.hidden);return ot.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Hh=1;class EM{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:Hh++,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 m=>{if(f=["resolve",m],ot.isValidElement(m))c=!1,this.create({id:s,type:"default",message:m});else if(_M(m)&&!m.ok){c=!1;const p=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...R})}else if(m instanceof Error){c=!1;const p=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...R})}else if(r.success!==void 0){c=!1;const p=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"success",description:b,...R})}}).catch(async m=>{if(f=["reject",m],r.error!==void 0){c=!1;const v=typeof r.error=="function"?await r.error(m):r.error,p=typeof r.description=="function"?await r.description(m):r.description,x=typeof v=="object"&&!ot.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:p,...x})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((m,v)=>h.then(()=>f[0]==="reject"?v(f[1]):m(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)||Hh++;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 $e=new EM,RM=(n,a)=>{const r=(a==null?void 0:a.id)||Hh++;return $e.addToast({title:n,...a,id:r}),r},_M=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",TM=RM,CM=()=>$e.toasts,AM=()=>$e.getActiveToasts(),K0=Object.assign(TM,{success:$e.success,info:$e.info,warning:$e.warning,error:$e.error,custom:$e.custom,message:$e.message,promise:$e.promise,dismiss:$e.dismiss,loading:$e.loading},{getHistory:CM,getToasts:AM});hM("[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 Lu(n){return n.label!==void 0}const OM=3,MM="24px",DM="16px",Z0=4e3,NM=356,jM=14,LM=45,zM=200;function Xn(...n){return n.filter(Boolean).join(" ")}function UM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const BM=n=>{var a,r,s,l,c,f,h,g,m;const{invert:v,toast:p,unstyled:b,interacting:x,setHeights:R,visibleToasts:w,heights:T,index:A,toasts:L,expanded:z,removeToast:G,defaultRichColors:B,closeButton:P,style:Q,cancelButtonStyle:N,actionButtonStyle:U,className:at="",descriptionClassName:rt="",duration:W,position:st,gap:vt,expandByDefault:lt,classNames:M,icons:K,closeButtonAriaLabel:F="Close toast"}=n,[ut,C]=ot.useState(null),[H,et]=ot.useState(null),[$,tt]=ot.useState(!1),[ct,it]=ot.useState(!1),[ht,ft]=ot.useState(!1),[St,Tt]=ot.useState(!1),[Ht,qt]=ot.useState(!1),[Te,Se]=ot.useState(0),[fn,Ce]=ot.useState(0),$t=ot.useRef(p.duration||W||Z0),We=ot.useRef(null),fe=ot.useRef(null),yr=A===0,kt=A+1<=w,jt=p.type,tn=p.dismissible!==!1,li=p.className||"",Us=p.descriptionClassName||"",dn=ot.useMemo(()=>T.findIndex(Rt=>Rt.toastId===p.id)||0,[T,p.id]),ke=ot.useMemo(()=>{var Rt;return(Rt=p.closeButton)!=null?Rt:P},[p.closeButton,P]),Cn=ot.useMemo(()=>p.duration||W||Z0,[p.duration,W]),Ae=ot.useRef(0),Aa=ot.useRef(0),ul=ot.useRef(0),Oa=ot.useRef(null),[ui,ci]=st.split("-"),Hn=ot.useMemo(()=>T.reduce((Rt,ie,de)=>de>=dn?Rt:Rt+ie.height,0),[T,dn]),br=wM(),Sr=p.invert||v,Bs=jt==="loading";Aa.current=ot.useMemo(()=>dn*vt+Hn,[dn,Hn]),ot.useEffect(()=>{$t.current=Cn},[Cn]),ot.useEffect(()=>{tt(!0)},[]),ot.useEffect(()=>{const Rt=fe.current;if(Rt){const ie=Rt.getBoundingClientRect().height;return Ce(ie),R(de=>[{toastId:p.id,height:ie,position:p.position},...de]),()=>R(de=>de.filter(Oe=>Oe.toastId!==p.id))}},[R,p.id]),ot.useLayoutEffect(()=>{if(!$)return;const Rt=fe.current,ie=Rt.style.height;Rt.style.height="auto";const de=Rt.getBoundingClientRect().height;Rt.style.height=ie,Ce(de),R(Oe=>Oe.find(pe=>pe.toastId===p.id)?Oe.map(pe=>pe.toastId===p.id?{...pe,height:de}:pe):[{toastId:p.id,height:de,position:p.position},...Oe])},[$,p.title,p.description,R,p.id,p.jsx,p.action,p.cancel]);const An=ot.useCallback(()=>{it(!0),Se(Aa.current),R(Rt=>Rt.filter(ie=>ie.toastId!==p.id)),setTimeout(()=>{G(p)},zM)},[p,G,R,Aa]);ot.useEffect(()=>{if(p.promise&&jt==="loading"||p.duration===1/0||p.type==="loading")return;let Rt;return z||x||br?(()=>{if(ul.current<Ae.current){const Oe=new Date().getTime()-Ae.current;$t.current=$t.current-Oe}ul.current=new Date().getTime()})():(()=>{$t.current!==1/0&&(Ae.current=new Date().getTime(),Rt=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),An()},$t.current))})(),()=>clearTimeout(Rt)},[z,x,p,jt,br,An]),ot.useEffect(()=>{p.delete&&(An(),p.onDismiss==null||p.onDismiss.call(p,p))},[An,p.delete]);function cl(){var Rt;if(K!=null&&K.loading){var ie;return ot.createElement("div",{className:Xn(M==null?void 0:M.loader,p==null||(ie=p.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":jt==="loading"},K.loading)}return ot.createElement(gM,{className:Xn(M==null?void 0:M.loader,p==null||(Rt=p.classNames)==null?void 0:Rt.loader),visible:jt==="loading"})}const ks=p.icon||(K==null?void 0:K[jt])||mM(jt);var Ma,fl;return ot.createElement("li",{tabIndex:0,ref:fe,className:Xn(at,li,M==null?void 0:M.toast,p==null||(a=p.classNames)==null?void 0:a.toast,M==null?void 0:M.default,M==null?void 0:M[jt],p==null||(r=p.classNames)==null?void 0:r[jt]),"data-sonner-toast":"","data-rich-colors":(Ma=p.richColors)!=null?Ma:B,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":$,"data-promise":!!p.promise,"data-swiped":Ht,"data-removed":ct,"data-visible":kt,"data-y-position":ui,"data-x-position":ci,"data-index":A,"data-front":yr,"data-swiping":ht,"data-dismissible":tn,"data-type":jt,"data-invert":Sr,"data-swipe-out":St,"data-swipe-direction":H,"data-expanded":!!(z||lt&&$),style:{"--index":A,"--toasts-before":A,"--z-index":L.length-A,"--offset":`${ct?Te:Aa.current}px`,"--initial-height":lt?"auto":`${fn}px`,...Q,...p.style},onDragEnd:()=>{ft(!1),C(null),Oa.current=null},onPointerDown:Rt=>{Rt.button!==2&&(Bs||!tn||(We.current=new Date,Se(Aa.current),Rt.target.setPointerCapture(Rt.pointerId),Rt.target.tagName!=="BUTTON"&&(ft(!0),Oa.current={x:Rt.clientX,y:Rt.clientY})))},onPointerUp:()=>{var Rt,ie,de;if(St||!tn)return;Oa.current=null;const Oe=Number(((Rt=fe.current)==null?void 0:Rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xr=Number(((ie=fe.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pe=new Date().getTime()-((de=We.current)==null?void 0:de.getTime()),se=ut==="x"?Oe:xr,oe=Math.abs(se)/pe;if(Math.abs(se)>=LM||oe>.11){Se(Aa.current),p.onDismiss==null||p.onDismiss.call(p,p),et(ut==="x"?Oe>0?"right":"left":xr>0?"down":"up"),An(),Tt(!0);return}else{var It,xe;(It=fe.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(xe=fe.current)==null||xe.style.setProperty("--swipe-amount-y","0px")}qt(!1),ft(!1),C(null)},onPointerMove:Rt=>{var ie,de,Oe;if(!Oa.current||!tn||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;const pe=Rt.clientY-Oa.current.y,se=Rt.clientX-Oa.current.x;var oe;const It=(oe=n.swipeDirections)!=null?oe:UM(st);!ut&&(Math.abs(se)>1||Math.abs(pe)>1)&&C(Math.abs(se)>Math.abs(pe)?"x":"y");let xe={x:0,y:0};const fi=na=>1/(1.5+Math.abs(na)/20);if(ut==="y"){if(It.includes("top")||It.includes("bottom"))if(It.includes("top")&&pe<0||It.includes("bottom")&&pe>0)xe.y=pe;else{const na=pe*fi(pe);xe.y=Math.abs(na)<Math.abs(pe)?na:pe}}else if(ut==="x"&&(It.includes("left")||It.includes("right")))if(It.includes("left")&&se<0||It.includes("right")&&se>0)xe.x=se;else{const na=se*fi(se);xe.x=Math.abs(na)<Math.abs(se)?na:se}(Math.abs(xe.x)>0||Math.abs(xe.y)>0)&&qt(!0),(de=fe.current)==null||de.style.setProperty("--swipe-amount-x",`${xe.x}px`),(Oe=fe.current)==null||Oe.style.setProperty("--swipe-amount-y",`${xe.y}px`)}},ke&&!p.jsx&&jt!=="loading"?ot.createElement("button",{"aria-label":F,"data-disabled":Bs,"data-close-button":!0,onClick:Bs||!tn?()=>{}:()=>{An(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Xn(M==null?void 0:M.closeButton,p==null||(s=p.classNames)==null?void 0:s.closeButton)},(fl=K==null?void 0:K.close)!=null?fl:xM):null,(jt||p.icon||p.promise)&&p.icon!==null&&((K==null?void 0:K[jt])!==null||p.icon)?ot.createElement("div",{"data-icon":"",className:Xn(M==null?void 0:M.icon,p==null||(l=p.classNames)==null?void 0:l.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||cl():null,p.type!=="loading"?ks:null):null,ot.createElement("div",{"data-content":"",className:Xn(M==null?void 0:M.content,p==null||(c=p.classNames)==null?void 0:c.content)},ot.createElement("div",{"data-title":"",className:Xn(M==null?void 0:M.title,p==null||(f=p.classNames)==null?void 0:f.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ot.createElement("div",{"data-description":"",className:Xn(rt,Us,M==null?void 0:M.description,p==null||(h=p.classNames)==null?void 0:h.description)},typeof p.description=="function"?p.description():p.description):null),ot.isValidElement(p.cancel)?p.cancel:p.cancel&&Lu(p.cancel)?ot.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Rt=>{Lu(p.cancel)&&tn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Rt),An())},className:Xn(M==null?void 0:M.cancelButton,p==null||(g=p.classNames)==null?void 0:g.cancelButton)},p.cancel.label):null,ot.isValidElement(p.action)?p.action:p.action&&Lu(p.action)?ot.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||U,onClick:Rt=>{Lu(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Rt),!Rt.defaultPrevented&&An())},className:Xn(M==null?void 0:M.actionButton,p==null||(m=p.classNames)==null?void 0:m.actionButton)},p.action.label):null)};function $0(){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 kM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?DM:MM;function g(m){["top","right","bottom","left"].forEach(v=>{r[`${f}-${v}`]=typeof m=="number"?`${m}px`:m})}typeof s=="number"||typeof s=="string"?g(s):typeof s=="object"?["top","right","bottom","left"].forEach(m=>{s[m]===void 0?r[`${f}-${m}`]=h:r[`${f}-${m}`]=typeof s[m]=="number"?`${s[m]}px`:s[m]}):g(h)}),r}const PM=ot.forwardRef(function(a,r){const{invert:s,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:h,className:g,offset:m,mobileOffset:v,theme:p="light",richColors:b,duration:x,style:R,visibleToasts:w=OM,toastOptions:T,dir:A=$0(),gap:L=jM,icons:z,containerAriaLabel:G="Notifications"}=a,[B,P]=ot.useState([]),Q=ot.useMemo(()=>Array.from(new Set([l].concat(B.filter(H=>H.position).map(H=>H.position)))),[B,l]),[N,U]=ot.useState([]),[at,rt]=ot.useState(!1),[W,st]=ot.useState(!1),[vt,lt]=ot.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=ot.useRef(null),K=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=ot.useRef(null),ut=ot.useRef(!1),C=ot.useCallback(H=>{P(et=>{var $;return($=et.find(tt=>tt.id===H.id))!=null&&$.delete||$e.dismiss(H.id),et.filter(({id:tt})=>tt!==H.id)})},[]);return ot.useEffect(()=>$e.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{P(et=>et.map($=>$.id===H.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Ub.flushSync(()=>{P(et=>{const $=et.findIndex(tt=>tt.id===H.id);return $!==-1?[...et.slice(0,$),{...et[$],...H},...et.slice($+1)]:[H,...et]})})})}),[B]),ot.useEffect(()=>{if(p!=="system"){lt(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?lt("dark"):lt("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:et})=>{lt(et?"dark":"light")})}catch{H.addListener(({matches:$})=>{try{lt($?"dark":"light")}catch(tt){console.error(tt)}})}},[p]),ot.useEffect(()=>{B.length<=1&&rt(!1)},[B]),ot.useEffect(()=>{const H=et=>{var $;if(c.every(it=>et[it]||et.code===it)){var ct;rt(!0),(ct=M.current)==null||ct.focus()}et.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&rt(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[c]),ot.useEffect(()=>{if(M.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,ut.current=!1)}},[M.current]),ot.createElement("section",{ref:r,"aria-label":`${G} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((H,et)=>{var $;const[tt,ct]=H.split("-");return B.length?ot.createElement("ol",{key:H,dir:A==="auto"?$0():A,tabIndex:-1,ref:M,className:g,"data-sonner-toaster":!0,"data-sonner-theme":vt,"data-y-position":tt,"data-x-position":ct,style:{"--front-toast-height":`${(($=N[0])==null?void 0:$.height)||0}px`,"--width":`${NM}px`,"--gap":`${L}px`,...R,...kM(m,v)},onBlur:it=>{ut.current&&!it.currentTarget.contains(it.relatedTarget)&&(ut.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:it=>{it.target instanceof HTMLElement&&it.target.dataset.dismissible==="false"||ut.current||(ut.current=!0,F.current=it.relatedTarget)},onMouseEnter:()=>rt(!0),onMouseMove:()=>rt(!0),onMouseLeave:()=>{W||rt(!1)},onDragEnd:()=>rt(!1),onPointerDown:it=>{it.target instanceof HTMLElement&&it.target.dataset.dismissible==="false"||st(!0)},onPointerUp:()=>st(!1)},B.filter(it=>!it.position&&et===0||it.position===H).map((it,ht)=>{var ft,St;return ot.createElement(BM,{key:it.id,icons:z,index:ht,toast:it,defaultRichColors:b,duration:(ft=T==null?void 0:T.duration)!=null?ft:x,className:T==null?void 0:T.className,descriptionClassName:T==null?void 0:T.descriptionClassName,invert:s,visibleToasts:w,closeButton:(St=T==null?void 0:T.closeButton)!=null?St:h,interacting:W,position:H,style:T==null?void 0:T.style,unstyled:T==null?void 0:T.unstyled,classNames:T==null?void 0:T.classNames,cancelButtonStyle:T==null?void 0:T.cancelButtonStyle,actionButtonStyle:T==null?void 0:T.actionButtonStyle,closeButtonAriaLabel:T==null?void 0:T.closeButtonAriaLabel,removeToast:C,toasts:B.filter(Tt=>Tt.position==it.position),heights:N.filter(Tt=>Tt.position==it.position),setHeights:U,expandByDefault:f,gap:L,expanded:at,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(){}},ri=typeof window>"u"||"Deno"in globalThis;function Ve(){}function HM(n,a){return typeof n=="function"?n(a):n}function qh(n){return typeof n=="number"&&n>=0&&n!==1/0}function ZS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function hr(n,a){return typeof n=="function"?n(a):n}function zn(n,a){return typeof n=="function"?n(a):n}function I0(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==Um(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 J0(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(ii(a.options.mutationKey)!==ii(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function Um(n,a){return((a==null?void 0:a.queryKeyHashFn)||ii)(n)}function ii(n){return JSON.stringify(n,(a,r)=>Vh(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 $S(n,a){if(n===a)return n;const r=W0(n)&&W0(a);if(r||Vh(n)&&Vh(a)){const s=r?n:Object.keys(n),l=s.length,c=r?a:Object.keys(a),f=c.length,h=r?[]:{};let g=0;for(let m=0;m<f;m++){const v=r?m:c[m];(!r&&s.includes(v)||r)&&n[v]===void 0&&a[v]===void 0?(h[v]=void 0,g++):(h[v]=$S(n[v],a[v]),h[v]===n[v]&&n[v]!==void 0&&g++)}return l===f&&g===l?n:h}return a}function sc(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 W0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Vh(n){if(!tb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!tb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function tb(n){return Object.prototype.toString.call(n)==="[object Object]"}function qM(n){return new Promise(a=>{setTimeout(a,n)})}function Gh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?$S(n,a):a}function VM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function GM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Bm=Symbol();function IS(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Bm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function JS(n,a){return typeof n=="function"?n(...a):!!n}var Fr,nr,us,cb,FM=(cb=class extends Ls{constructor(){super();bt(this,Fr);bt(this,nr);bt(this,us);dt(this,us,a=>{if(!ri&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,nr)||this.setEventListener(D(this,us))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,nr))==null||a.call(this),dt(this,nr,void 0))}setEventListener(a){var r;dt(this,us,a),(r=D(this,nr))==null||r.call(this),dt(this,nr,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Fr)!==a&&(dt(this,Fr,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(r=>{r(a)})}isFocused(){var a;return typeof D(this,Fr)=="boolean"?D(this,Fr):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},Fr=new WeakMap,nr=new WeakMap,us=new WeakMap,cb),km=new FM,cs,ar,fs,fb,YM=(fb=class extends Ls{constructor(){super();bt(this,cs,!0);bt(this,ar);bt(this,fs);dt(this,fs,a=>{if(!ri&&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,ar)||this.setEventListener(D(this,fs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ar))==null||a.call(this),dt(this,ar,void 0))}setEventListener(a){var r;dt(this,fs,a),(r=D(this,ar))==null||r.call(this),dt(this,ar,a(this.setOnline.bind(this)))}setOnline(a){D(this,cs)!==a&&(dt(this,cs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,cs)}},cs=new WeakMap,ar=new WeakMap,fs=new WeakMap,fb),oc=new YM;function Fh(){let n,a;const r=new Promise((l,c)=>{n=l,a=c});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),n(l)},r.reject=l=>{s({status:"rejected",reason:l}),a(l)},r}function QM(n){return Math.min(1e3*2**n,3e4)}function WS(n){return(n??"online")==="online"?oc.isOnline():!0}var tx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function gh(n){return n instanceof tx}function ex(n){let a=!1,r=0,s=!1,l;const c=Fh(),f=w=>{var T;s||(b(new tx(w)),(T=n.abort)==null||T.call(n))},h=()=>{a=!0},g=()=>{a=!1},m=()=>km.isFocused()&&(n.networkMode==="always"||oc.isOnline())&&n.canRun(),v=()=>WS(n.networkMode)&&n.canRun(),p=w=>{var T;s||(s=!0,(T=n.onSuccess)==null||T.call(n,w),l==null||l(),c.resolve(w))},b=w=>{var T;s||(s=!0,(T=n.onError)==null||T.call(n,w),l==null||l(),c.reject(w))},x=()=>new Promise(w=>{var T;l=A=>{(s||m())&&w(A)},(T=n.onPause)==null||T.call(n)}).then(()=>{var w;l=void 0,s||(w=n.onContinue)==null||w.call(n)}),R=()=>{if(s)return;let w;const T=r===0?n.initialPromise:void 0;try{w=T??n.fn()}catch(A){w=Promise.reject(A)}Promise.resolve(w).then(p).catch(A=>{var P;if(s)return;const L=n.retry??(ri?0:3),z=n.retryDelay??QM,G=typeof z=="function"?z(r,A):z,B=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,A);if(a||!B){b(A);return}r++,(P=n.onFail)==null||P.call(n,r,A),qM(G).then(()=>m()?void 0:x()).then(()=>{a?b(A):R()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?R():x().then(R),c)}}var XM=n=>setTimeout(n,0);function KM(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=XM;const c=h=>{a?n.push(h):l(()=>{r(h)})},f=()=>{const h=n;n=[],h.length&&l(()=>{s(()=>{h.forEach(g=>{r(g)})})})};return{batch:h=>{let g;a++;try{g=h()}finally{a--,a||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var be=KM(),Yr,db,nx=(db=class{constructor(){bt(this,Yr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qh(this.gcTime)&&dt(this,Yr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ri?1/0:5*60*1e3))}clearGcTimeout(){D(this,Yr)&&(clearTimeout(D(this,Yr)),dt(this,Yr,void 0))}},Yr=new WeakMap,db),ds,hs,En,Qr,ze,Zo,Xr,Nn,ba,hb,ZM=(hb=class extends nx{constructor(a){super();bt(this,Nn);bt(this,ds);bt(this,hs);bt(this,En);bt(this,Qr);bt(this,ze);bt(this,Zo);bt(this,Xr);dt(this,Xr,!1),dt(this,Zo,a.defaultOptions),this.setOptions(a.options),this.observers=[],dt(this,Qr,a.client),dt(this,En,D(this,Qr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,dt(this,ds,$M(this.options)),this.state=a.state??D(this,ds),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var a;return(a=D(this,ze))==null?void 0:a.promise}setOptions(a){this.options={...D(this,Zo),...a},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,En).remove(this)}setData(a,r){const s=Gh(this.state.data,a,this.options);return At(this,Nn,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){At(this,Nn,ba).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,ze))==null?void 0:s.promise;return(l=D(this,ze))==null||l.cancel(a),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,ds))}isActive(){return this.observers.some(a=>zn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>hr(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:!ZS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,ze))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,ze))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,En).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,ze)&&(D(this,Xr)?D(this,ze).cancel({revert:!0}):D(this,ze).cancelRetry()),this.scheduleGc()),D(this,En).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||At(this,Nn,ba).call(this,{type:"invalidate"})}fetch(a,r){var g,m,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(D(this,ze))return D(this,ze).continueRetry(),D(this,ze).promise}if(a&&this.setOptions(a),!this.options.queryFn){const p=this.observers.find(b=>b.options.queryFn);p&&this.setOptions(p.options)}const s=new AbortController,l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(dt(this,Xr,!0),s.signal)})},c=()=>{const p=IS(this.options,r),b={client:D(this,Qr),queryKey:this.queryKey,meta:this.meta};return l(b),dt(this,Xr,!1),this.options.persister?this.options.persister(p,b,this):p(b)},f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Qr),state:this.state,fetchFn:c};l(f),(g=this.options.behavior)==null||g.onFetch(f,this),dt(this,hs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=f.fetchOptions)==null?void 0:m.meta))&&At(this,Nn,ba).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const h=p=>{var b,x,R,w;gh(p)&&p.silent||At(this,Nn,ba).call(this,{type:"error",error:p}),gh(p)||((x=(b=D(this,En).config).onError)==null||x.call(b,p,this),(w=(R=D(this,En).config).onSettled)==null||w.call(R,this.state.data,p,this)),this.scheduleGc()};return dt(this,ze,ex({initialPromise:r==null?void 0:r.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:p=>{var b,x,R,w;if(p===void 0){h(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(T){h(T);return}(x=(b=D(this,En).config).onSuccess)==null||x.call(b,p,this),(w=(R=D(this,En).config).onSettled)==null||w.call(R,p,this.state.error,this),this.scheduleGc()},onError:h,onFail:(p,b)=>{At(this,Nn,ba).call(this,{type:"failed",failureCount:p,error:b})},onPause:()=>{At(this,Nn,ba).call(this,{type:"pause"})},onContinue:()=>{At(this,Nn,ba).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),D(this,ze).start()}},ds=new WeakMap,hs=new WeakMap,En=new WeakMap,Qr=new WeakMap,ze=new WeakMap,Zo=new WeakMap,Xr=new WeakMap,Nn=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,...ax(s.data,this.options),fetchMeta:a.meta??null};case"success":return{...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 gh(l)&&l.revert&&D(this,hs)?{...D(this,hs),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),be.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,En).notify({query:this,type:"updated",action:a})})},hb);function ax(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WS(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function $M(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 Kn,mb,IM=(mb=class extends Ls{constructor(a={}){super();bt(this,Kn);this.config=a,dt(this,Kn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??Um(l,r);let f=this.get(c);return f||(f=new ZM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Kn).has(a.queryHash)||(D(this,Kn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Kn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Kn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){be.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Kn).get(a)}getAll(){return[...D(this,Kn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>I0(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>I0(a,s)):r}notify(a){be.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){be.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){be.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Kn=new WeakMap,mb),Zn,He,Kr,$n,er,pb,JM=(pb=class extends nx{constructor(a){super();bt(this,$n);bt(this,Zn);bt(this,He);bt(this,Kr);this.mutationId=a.mutationId,dt(this,He,a.mutationCache),dt(this,Zn,[]),this.state=a.state||rx(),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,Zn).includes(a)||(D(this,Zn).push(a),this.clearGcTimeout(),D(this,He).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){dt(this,Zn,D(this,Zn).filter(r=>r!==a)),this.scheduleGc(),D(this,He).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():D(this,He).remove(this))}continue(){var a;return((a=D(this,Kr))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,m,v,p,b,x,R,w,T,A,L,z,G,B,P,Q,N;const r=()=>{At(this,$n,er).call(this,{type:"continue"})};dt(this,Kr,ex({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(U,at)=>{At(this,$n,er).call(this,{type:"failed",failureCount:U,error:at})},onPause:()=>{At(this,$n,er).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,He).canRun(this)}));const s=this.state.status==="pending",l=!D(this,Kr).canStart();try{if(s)r();else{At(this,$n,er).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,He).config).onMutate)==null?void 0:f.call(c,a,this));const at=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));at!==this.state.context&&At(this,$n,er).call(this,{type:"pending",context:at,variables:a,isPaused:l})}const U=await D(this,Kr).start();return await((v=(m=D(this,He).config).onSuccess)==null?void 0:v.call(m,U,a,this.state.context,this)),await((b=(p=this.options).onSuccess)==null?void 0:b.call(p,U,a,this.state.context)),await((R=(x=D(this,He).config).onSettled)==null?void 0:R.call(x,U,null,this.state.variables,this.state.context,this)),await((T=(w=this.options).onSettled)==null?void 0:T.call(w,U,null,a,this.state.context)),At(this,$n,er).call(this,{type:"success",data:U}),U}catch(U){try{throw await((L=(A=D(this,He).config).onError)==null?void 0:L.call(A,U,a,this.state.context,this)),await((G=(z=this.options).onError)==null?void 0:G.call(z,U,a,this.state.context)),await((P=(B=D(this,He).config).onSettled)==null?void 0:P.call(B,void 0,U,this.state.variables,this.state.context,this)),await((N=(Q=this.options).onSettled)==null?void 0:N.call(Q,void 0,U,a,this.state.context)),U}finally{At(this,$n,er).call(this,{type:"error",error:U})}}finally{D(this,He).runNext(this)}}},Zn=new WeakMap,He=new WeakMap,Kr=new WeakMap,$n=new WeakSet,er=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),be.batch(()=>{D(this,Zn).forEach(s=>{s.onMutationUpdate(a)}),D(this,He).notify({mutation:this,type:"updated",action:a})})},pb);function rx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,jn,$o,gb,WM=(gb=class extends Ls{constructor(a={}){super();bt(this,Sa);bt(this,jn);bt(this,$o);this.config=a,dt(this,Sa,new Set),dt(this,jn,new Map),dt(this,$o,0)}build(a,r,s){const l=new JM({mutationCache:this,mutationId:++wu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,Sa).add(a);const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r);s?s.push(a):D(this,jn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,Sa).delete(a)){const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r);if(s)if(s.length>1){const l=s.indexOf(a);l!==-1&&s.splice(l,1)}else s[0]===a&&D(this,jn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r),l=s==null?void 0:s.find(c=>c.state.status==="pending");return!l||l===a}else return!0}runNext(a){var s;const r=zu(a);if(typeof r=="string"){const l=(s=D(this,jn).get(r))==null?void 0:s.find(c=>c!==a&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){be.batch(()=>{D(this,Sa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,Sa).clear(),D(this,jn).clear()})}getAll(){return Array.from(D(this,Sa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>J0(r,s))}findAll(a={}){return this.getAll().filter(r=>J0(a,r))}notify(a){be.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return be.batch(()=>Promise.all(a.map(r=>r.continue().catch(Ve))))}},Sa=new WeakMap,jn=new WeakMap,$o=new WeakMap,gb);function zu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function eb(n){return{onFetch:(a,r)=>{var v,p,b,x,R;const s=a.options,l=(b=(p=(v=a.fetchOptions)==null?void 0:v.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,c=((x=a.state.data)==null?void 0:x.pages)||[],f=((R=a.state.data)==null?void 0:R.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const m=async()=>{let w=!1;const T=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(a.signal.aborted?w=!0:a.signal.addEventListener("abort",()=>{w=!0}),a.signal)})},A=IS(a.options,a.fetchOptions),L=async(z,G,B)=>{if(w)return Promise.reject();if(G==null&&z.pages.length)return Promise.resolve(z);const P={client:a.client,queryKey:a.queryKey,pageParam:G,direction:B?"backward":"forward",meta:a.options.meta};T(P);const Q=await A(P),{maxPages:N}=a.options,U=B?GM:VM;return{pages:U(z.pages,Q,N),pageParams:U(z.pageParams,G,N)}};if(l&&c.length){const z=l==="backward",G=z?t3:nb,B={pages:c,pageParams:f},P=G(s,B);h=await L(B,P,z)}else{const z=n??c.length;do{const G=g===0?f[0]??s.initialPageParam:nb(s,h);if(g>0&&G==null)break;h=await L(h,G),g++}while(g<z)}return h};a.options.persister?a.fetchFn=()=>{var w,T;return(T=(w=a.options).persister)==null?void 0:T.call(w,m,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=m}}}function nb(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 t3(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,rr,ir,ms,ps,sr,gs,vs,vb,e3=(vb=class{constructor(n={}){bt(this,ae);bt(this,rr);bt(this,ir);bt(this,ms);bt(this,ps);bt(this,sr);bt(this,gs);bt(this,vs);dt(this,ae,n.queryCache||new IM),dt(this,rr,n.mutationCache||new WM),dt(this,ir,n.defaultOptions||{}),dt(this,ms,new Map),dt(this,ps,new Map),dt(this,sr,0)}mount(){wu(this,sr)._++,D(this,sr)===1&&(dt(this,gs,km.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onFocus())})),dt(this,vs,oc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onOnline())})))}unmount(){var n,a;wu(this,sr)._--,D(this,sr)===0&&((n=D(this,gs))==null||n.call(this),dt(this,gs,void 0),(a=D(this,vs))==null||a.call(this),dt(this,vs,void 0))}isFetching(n){return D(this,ae).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,rr).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(hr(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=HM(a,c);if(f!==void 0)return D(this,ae).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return be.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);be.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,ae);return be.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=be.batch(()=>D(this,ae).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(n,a={}){return be.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=be.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(Ve)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Ve)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,ae).build(this,a);return r.isStaleByTime(hr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ve).catch(Ve)}fetchInfiniteQuery(n){return n.behavior=eb(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ve).catch(Ve)}ensureInfiniteQueryData(n){return n.behavior=eb(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return oc.isOnline()?D(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,ae)}getMutationCache(){return D(this,rr)}getDefaultOptions(){return D(this,ir)}setDefaultOptions(n){dt(this,ir,n)}setQueryDefaults(n,a){D(this,ms).set(ii(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(ii(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,ir).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Um(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===Bm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,ir).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,ae).clear(),D(this,rr).clear()}},ae=new WeakMap,rr=new WeakMap,ir=new WeakMap,ms=new WeakMap,ps=new WeakMap,sr=new WeakMap,gs=new WeakMap,vs=new WeakMap,vb),Ke,Ut,Io,qe,Zr,ys,or,lr,Jo,bs,Ss,$r,Ir,ur,xs,Gt,Ho,Yh,Qh,Xh,Kh,Zh,$h,Ih,ix,yb,n3=(yb=class extends Ls{constructor(a,r){super();bt(this,Gt);bt(this,Ke);bt(this,Ut);bt(this,Io);bt(this,qe);bt(this,Zr);bt(this,ys);bt(this,or);bt(this,lr);bt(this,Jo);bt(this,bs);bt(this,Ss);bt(this,$r);bt(this,Ir);bt(this,ur);bt(this,xs,new Set);this.options=r,dt(this,Ke,a),dt(this,lr,null),dt(this,or,Fh()),this.options.experimental_prefetchInRender||D(this,or).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),ab(D(this,Ut),this.options)?At(this,Gt,Ho).call(this):this.updateResult(),At(this,Gt,Kh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jh(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jh(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,At(this,Gt,Zh).call(this),At(this,Gt,$h).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,Ke).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,D(this,Ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");At(this,Gt,Ih).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!sc(this.options,r)&&D(this,Ke).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&rb(D(this,Ut),s,this.options,r)&&At(this,Gt,Ho).call(this),this.updateResult(),l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||hr(this.options.staleTime,D(this,Ut))!==hr(r.staleTime,D(this,Ut)))&&At(this,Gt,Yh).call(this);const c=At(this,Gt,Qh).call(this);l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||c!==D(this,ur))&&At(this,Gt,Xh).call(this,c)}getOptimisticResult(a){const r=D(this,Ke).getQueryCache().build(D(this,Ke),a),s=this.createResult(r,a);return r3(this,s)&&(dt(this,qe,s),dt(this,ys,this.options),dt(this,Zr,D(this,Ut).state)),s}getCurrentResult(){return D(this,qe)}trackResult(a,r){return new Proxy(a,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(a){D(this,xs).add(a)}getCurrentQuery(){return D(this,Ut)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const r=D(this,Ke).defaultQueryOptions(a),s=D(this,Ke).getQueryCache().build(D(this,Ke),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return At(this,Gt,Ho).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,qe)))}createResult(a,r){var U;const s=D(this,Ut),l=this.options,c=D(this,qe),f=D(this,Zr),h=D(this,ys),m=a!==s?a.state:D(this,Io),{state:v}=a;let p={...v},b=!1,x;if(r._optimisticResults){const at=this.hasListeners(),rt=!at&&ab(a,r),W=at&&rb(a,s,r,l);(rt||W)&&(p={...p,...ax(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:R,errorUpdatedAt:w,status:T}=p;x=p.data;let A=!1;if(r.placeholderData!==void 0&&x===void 0&&T==="pending"){let at;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(at=c.data,A=!0):at=typeof r.placeholderData=="function"?r.placeholderData((U=D(this,Ss))==null?void 0:U.state.data,D(this,Ss)):r.placeholderData,at!==void 0&&(T="success",x=Gh(c==null?void 0:c.data,at,r),b=!0)}if(r.select&&x!==void 0&&!A)if(c&&x===(f==null?void 0:f.data)&&r.select===D(this,Jo))x=D(this,bs);else try{dt(this,Jo,r.select),x=r.select(x),x=Gh(c==null?void 0:c.data,x,r),dt(this,bs,x),dt(this,lr,null)}catch(at){dt(this,lr,at)}D(this,lr)&&(R=D(this,lr),x=D(this,bs),w=Date.now(),T="error");const L=p.fetchStatus==="fetching",z=T==="pending",G=T==="error",B=z&&L,P=x!==void 0,N={status:T,fetchStatus:p.fetchStatus,isPending:z,isSuccess:T==="success",isError:G,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:p.dataUpdatedAt,error:R,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>m.dataUpdateCount||p.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!z,isLoadingError:G&&!P,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:G&&P,isStale:Pm(a,r),refetch:this.refetch,promise:D(this,or)};if(this.options.experimental_prefetchInRender){const at=st=>{N.status==="error"?st.reject(N.error):N.data!==void 0&&st.resolve(N.data)},rt=()=>{const st=dt(this,or,N.promise=Fh());at(st)},W=D(this,or);switch(W.status){case"pending":a.queryHash===s.queryHash&&at(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&rt();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&rt();break}}return N}updateResult(){const a=D(this,qe),r=this.createResult(D(this,Ut),this.options);if(dt(this,Zr,D(this,Ut).state),dt(this,ys,this.options),D(this,Zr).data!==void 0&&dt(this,Ss,D(this,Ut)),sc(r,a))return;dt(this,qe,r);const s=()=>{if(!a)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!D(this,xs).size)return!0;const f=new Set(c??D(this,xs));return this.options.throwOnError&&f.add("error"),Object.keys(D(this,qe)).some(h=>{const g=h;return D(this,qe)[g]!==a[g]&&f.has(g)})};At(this,Gt,ix).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&At(this,Gt,Kh).call(this)}},Ke=new WeakMap,Ut=new WeakMap,Io=new WeakMap,qe=new WeakMap,Zr=new WeakMap,ys=new WeakMap,or=new WeakMap,lr=new WeakMap,Jo=new WeakMap,bs=new WeakMap,Ss=new WeakMap,$r=new WeakMap,Ir=new WeakMap,ur=new WeakMap,xs=new WeakMap,Gt=new WeakSet,Ho=function(a){At(this,Gt,Ih).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Ve)),r},Yh=function(){At(this,Gt,Zh).call(this);const a=hr(this.options.staleTime,D(this,Ut));if(ri||D(this,qe).isStale||!qh(a))return;const s=ZS(D(this,qe).dataUpdatedAt,a)+1;dt(this,$r,setTimeout(()=>{D(this,qe).isStale||this.updateResult()},s))},Qh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Xh=function(a){At(this,Gt,$h).call(this),dt(this,ur,a),!(ri||zn(this.options.enabled,D(this,Ut))===!1||!qh(D(this,ur))||D(this,ur)===0)&&dt(this,Ir,setInterval(()=>{(this.options.refetchIntervalInBackground||km.isFocused())&&At(this,Gt,Ho).call(this)},D(this,ur)))},Kh=function(){At(this,Gt,Yh).call(this),At(this,Gt,Xh).call(this,At(this,Gt,Qh).call(this))},Zh=function(){D(this,$r)&&(clearTimeout(D(this,$r)),dt(this,$r,void 0))},$h=function(){D(this,Ir)&&(clearInterval(D(this,Ir)),dt(this,Ir,void 0))},Ih=function(){const a=D(this,Ke).getQueryCache().build(D(this,Ke),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);dt(this,Ut,a),dt(this,Io,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ix=function(a){be.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,qe))}),D(this,Ke).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},yb);function a3(n,a){return zn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function ab(n,a){return a3(n,a)||n.state.data!==void 0&&Jh(n,a,a.refetchOnMount)}function Jh(n,a,r){if(zn(a.enabled,n)!==!1&&hr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Pm(n,a)}return!1}function rb(n,a,r,s){return(n!==a||zn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Pm(n,r)}function Pm(n,a){return zn(a.enabled,n)!==!1&&n.isStaleByTime(hr(a.staleTime,n))}function r3(n,a){return!sc(n.getCurrentResult(),a)}var cr,fr,Ze,xa,_a,Fu,Wh,bb,i3=(bb=class extends Ls{constructor(r,s){super();bt(this,_a);bt(this,cr);bt(this,fr);bt(this,Ze);bt(this,xa);dt(this,cr,r),this.setOptions(s),this.bindMethods(),At(this,_a,Fu).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,cr).defaultMutationOptions(r),sc(this.options,s)||D(this,cr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Ze),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&ii(s.mutationKey)!==ii(this.options.mutationKey)?this.reset():((l=D(this,Ze))==null?void 0:l.state.status)==="pending"&&D(this,Ze).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Ze))==null||r.removeObserver(this)}onMutationUpdate(r){At(this,_a,Fu).call(this),At(this,_a,Wh).call(this,r)}getCurrentResult(){return D(this,fr)}reset(){var r;(r=D(this,Ze))==null||r.removeObserver(this),dt(this,Ze,void 0),At(this,_a,Fu).call(this),At(this,_a,Wh).call(this)}mutate(r,s){var l;return dt(this,xa,s),(l=D(this,Ze))==null||l.removeObserver(this),dt(this,Ze,D(this,cr).getMutationCache().build(D(this,cr),this.options)),D(this,Ze).addObserver(this),D(this,Ze).execute(r)}},cr=new WeakMap,fr=new WeakMap,Ze=new WeakMap,xa=new WeakMap,_a=new WeakSet,Fu=function(){var s;const r=((s=D(this,Ze))==null?void 0:s.state)??rx();dt(this,fr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Wh=function(r){be.batch(()=>{var s,l,c,f,h,g,m,v;if(D(this,xa)&&this.hasListeners()){const p=D(this,fr).variables,b=D(this,fr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,xa)).onSuccess)==null||l.call(s,r.data,p,b),(f=(c=D(this,xa)).onSettled)==null||f.call(c,r.data,null,p,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,xa)).onError)==null||g.call(h,r.error,p,b),(v=(m=D(this,xa)).onSettled)==null||v.call(m,void 0,r.error,p,b))}this.listeners.forEach(p=>{p(D(this,fr))})})},bb),sx=E.createContext(void 0),ox=n=>{const a=E.useContext(sx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},s3=({client:n,children:a})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),_.jsx(sx.Provider,{value:n,children:a})),lx=E.createContext(!1),o3=()=>E.useContext(lx);lx.Provider;function l3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var u3=E.createContext(l3()),c3=()=>E.useContext(u3),f3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},d3=n=>{E.useEffect(()=>{n.clearReset()},[n])},h3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||JS(r,[n.error,s])),m3=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))}},p3=(n,a)=>n.isLoading&&n.isFetching&&!a,g3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,ib=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function v3(n,a,r){var p,b,x,R,w;const s=ox(),l=o3(),c=c3(),f=s.defaultQueryOptions(n);(b=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||b.call(p,f),f._optimisticResults=l?"isRestoring":"optimistic",m3(f),f3(f,c),d3(c);const h=!s.getQueryCache().get(f.queryHash),[g]=E.useState(()=>new a(s,f)),m=g.getOptimisticResult(f),v=!l&&n.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(T=>{const A=v?g.subscribe(be.batchCalls(T)):Ve;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),E.useEffect(()=>{g.setOptions(f)},[f,g]),g3(f,m))throw ib(f,g,c);if(h3({result:m,errorResetBoundary:c,throwOnError:f.throwOnError,query:s.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw m.error;if((R=(x=s.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||R.call(x,f,m),f.experimental_prefetchInRender&&!ri&&p3(m,l)){const T=h?ib(f,g,c):(w=s.getQueryCache().get(f.queryHash))==null?void 0:w.promise;T==null||T.catch(Ve).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?m:g.trackResult(m)}function y3(n,a){return v3(n,n3)}function b3(n,a){const r=ox(),[s]=E.useState(()=>new i3(r,n));E.useEffect(()=>{s.setOptions(n)},[s,n]);const l=E.useSyncExternalStore(E.useCallback(f=>s.subscribe(be.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=E.useCallback((f,h)=>{s.mutate(f,h).catch(Ve)},[s]);if(l.error&&JS(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function S3(){return _.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Vb,{className:"size-8 animate-spin"})})}function x3({className:n,...a}){const{setAuthenticated:r}=KS(),[s,l]=E.useState(""),[c,f]=E.useState(""),h=zm(),{isPending:g,mutate:m}=b3({mutationFn:async()=>h.login(s,c),onError(){K0.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){K0.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?_.jsx(S3,{}):_.jsx("div",{className:Ot("flex flex-col gap-6 w-[20%]",n),...a,children:_.jsxs(nM,{children:[_.jsxs(aM,{children:[_.jsx(rM,{className:"text-2xl",children:"Login"}),_.jsx(iM,{children:"Enter your credentials below to proceed"})]}),_.jsx(sM,{children:_.jsxs("div",{className:"flex flex-col gap-6",children:[_.jsxs("div",{className:"grid gap-2",children:[_.jsx(Y0,{htmlFor:"username",children:"Username"}),_.jsx(l0,{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(Y0,{htmlFor:"password",children:"Password"})}),_.jsx(l0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),_.jsx(i1,{type:"button",className:"w-full",onClick:()=>{m()},children:"Login"})]})})]})})}function w3({children:n}){const{authenticated:a,setAuthenticated:r}=KS(),s=zm(),{isLoading:l,isError:c}=y3({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(Vb,{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(x3,{})})}function E3({...n}){return _.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function R3({className:n,...a}){return _.jsx("ol",{"data-slot":"breadcrumb-list",className:Ot("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",n),...a})}function vh({className:n,...a}){return _.jsx("li",{"data-slot":"breadcrumb-item",className:Ot("inline-flex items-center gap-1.5",n),...a})}function sb({asChild:n,className:a,...r}){const s=n?el:"a";return _.jsx(s,{"data-slot":"breadcrumb-link",className:Ot("hover:text-foreground transition-colors",a),...r})}function _3({className:n,...a}){return _.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ot("text-foreground font-normal",n),...a})}function ob({children:n,className:a,...r}){return _.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ot("[&>svg]:size-3.5",a),...r,children:n??_.jsx(eR,{})})}function T3(){const{toggleSidebar:n}=Am();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(i1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:_.jsx(aR,{})}),_.jsx(D_,{orientation:"vertical",className:"mr-2 h-4"}),_.jsx(E3,{className:"hidden sm:block",children:_.jsxs(R3,{children:[_.jsx(vh,{children:_.jsx(sb,{href:"#",children:"/"})}),_.jsx(ob,{}),_.jsx(vh,{children:_.jsx(_3,{children:"CommandKit"})}),_.jsx(ob,{}),_.jsx(vh,{children:_.jsx(sb,{href:"#",children:"DevTools"})})]})})]})})}var C3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,m=["light","dark"];function v(x){(Array.isArray(n)?n:[n]).forEach(R=>{let w=R==="class",T=w&&c?l.map(A=>c[A]||A):l;w?(g.classList.remove(...T),g.classList.add(c&&c[x]?c[x]:x)):g.setAttribute(R,x)}),p(x)}function p(x){h&&m.includes(x)&&(g.style.colorScheme=x)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let x=localStorage.getItem(a)||r,R=f&&x==="system"?b():x;v(R)}catch{}},lb=["light","dark"],ux="(prefers-color-scheme: dark)",A3=typeof window>"u",Hm=E.createContext(void 0),O3={setTheme:n=>{},themes:[]},M3=()=>{var n;return(n=E.useContext(Hm))!=null?n:O3},D3=n=>E.useContext(Hm)?E.createElement(E.Fragment,null,n.children):E.createElement(j3,{...n}),N3=["light","dark"],j3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=N3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:m,nonce:v,scriptProps:p})=>{let[b,x]=E.useState(()=>z3(l,f)),[R,w]=E.useState(()=>b==="system"?yh():b),T=g?Object.values(g):c,A=E.useCallback(B=>{let P=B;if(!P)return;B==="system"&&r&&(P=yh());let Q=g?g[P]:P,N=a?U3(v):null,U=document.documentElement,at=rt=>{rt==="class"?(U.classList.remove(...T),Q&&U.classList.add(Q)):rt.startsWith("data-")&&(Q?U.setAttribute(rt,Q):U.removeAttribute(rt))};if(Array.isArray(h)?h.forEach(at):at(h),s){let rt=lb.includes(f)?f:null,W=lb.includes(P)?P:rt;U.style.colorScheme=W}N==null||N()},[v]),L=E.useCallback(B=>{let P=typeof B=="function"?B(b):B;x(P);try{localStorage.setItem(l,P)}catch{}},[b]),z=E.useCallback(B=>{let P=yh(B);w(P),b==="system"&&r&&!n&&A("system")},[b,n]);E.useEffect(()=>{let B=window.matchMedia(ux);return B.addListener(z),z(B),()=>B.removeListener(z)},[z]),E.useEffect(()=>{let B=P=>{P.key===l&&(P.newValue?x(P.newValue):L(f))};return window.addEventListener("storage",B),()=>window.removeEventListener("storage",B)},[L]),E.useEffect(()=>{A(n??b)},[n,b]);let G=E.useMemo(()=>({theme:b,setTheme:L,forcedTheme:n,resolvedTheme:b==="system"?R:b,themes:r?[...c,"system"]:c,systemTheme:r?R:void 0}),[b,L,n,R,r,c]);return E.createElement(Hm.Provider,{value:G},E.createElement(L3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:p}),m)},L3=E.memo(({forcedTheme:n,storageKey:a,attribute:r,enableSystem:s,enableColorScheme:l,defaultTheme:c,value:f,themes:h,nonce:g,scriptProps:m})=>{let v=JSON.stringify([r,a,c,n,h,f,s,l]).slice(1,-1);return E.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${C3.toString()})(${v})`}})}),z3=(n,a)=>{if(A3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},U3=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)}},yh=n=>(n||(n=window.matchMedia(ux)),n.matches?"dark":"light");const B3=({...n})=>{const{theme:a="system"}=M3();return _.jsx(PM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},oi=q2({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:k3});function k3(){return _.jsxs(D3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[_.jsx(B3,{}),_.jsx(tM,{children:_.jsx(w3,{children:_.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:_.jsxs(KA,{className:"flex flex-col",children:[_.jsx(T3,{}),_.jsxs("div",{className:"flex flex-1",children:[_.jsx(eM,{}),_.jsx($A,{children:_.jsx(am,{})})]})]})})})})]})}const P3="modulepreload",H3=function(n){return"/"+n},ub={},zs=function(a,r,s){let l=Promise.resolve();if(r&&r.length>0){let f=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};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(m=>{if(m=H3(m),m in ub)return;ub[m]=!0;const v=m.endsWith(".css"),p=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":P3,v||(b.as="script"),b.crossOrigin="",b.href=m,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((x,R)=>{b.addEventListener("load",x),b.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${m}`)))})}))}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)})},q3=()=>zs(()=>import("./plugins-C8Pd_zLA.js"),[]),cx=Ts("/plugins")({component:Cs(q3,"component",()=>cx.ssr)}),V3=()=>zs(()=>import("./guilds-mCllU8AE.js"),[]),fx=Ts("/guilds")({component:Cs(V3,"component",()=>fx.ssr)}),G3=()=>zs(()=>import("./feature-flags-Dvnj13aJ.js"),[]),dx=Ts("/feature-flags")({component:Cs(G3,"component",()=>dx.ssr)}),F3=()=>zs(()=>import("./events-D5WQ6lnx.js"),[]),hx=Ts("/events")({component:Cs(F3,"component",()=>hx.ssr)}),Y3=()=>zs(()=>import("./commands-doiMx1V-.js"),[]),mx=Ts("/commands")({component:Cs(Y3,"component",()=>mx.ssr)}),Q3=()=>zs(()=>import("./index-DWrw0hjQ.js"),[]),px=Ts("/")({component:Cs(Q3,"component",()=>px.ssr)}),X3=cx.update({id:"/plugins",path:"/plugins",getParentRoute:()=>oi}),K3=fx.update({id:"/guilds",path:"/guilds",getParentRoute:()=>oi}),Z3=dx.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>oi}),$3=hx.update({id:"/events",path:"/events",getParentRoute:()=>oi}),I3=mx.update({id:"/commands",path:"/commands",getParentRoute:()=>oi}),J3=px.update({id:"/",path:"/",getParentRoute:()=>oi}),W3={IndexRoute:J3,CommandsRoute:I3,EventsRoute:$3,FeatureFlagsRoute:Z3,GuildsRoute:K3,PluginsRoute:X3},tD=oi._addFileChildren(W3)._addFileTypes(),eD=F2({routeTree:tD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),nD=new e3;zE.createRoot(document.getElementById("root")).render(_.jsx(E.StrictMode,{children:_.jsx(s3,{client:nD,children:_.jsx(X2,{router:eD})})}));export{mO as A,yO as B,nM as C,S3 as L,y3 as a,aM as b,pO as c,gO as d,sM as e,rM as f,Sb as g,iM as h,vr as i,_ as j,eR as k,AD as l,_s as m,i1 as n,E as r,zm as u};
176
+ `+c):s.stack=c}catch{}}throw s}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=ai(this.defaults,r);const{transitional:s,paramsSerializer:l,headers:c}=r;s!==void 0&&Gu.assertOptions(s,{silentJSONParsing:Qn.transitional(Qn.boolean),forcedJSONParsing:Qn.transitional(Qn.boolean),clarifyTimeoutError:Qn.transitional(Qn.boolean)},!1),l!=null&&(Z.isFunction(l)?r.paramsSerializer={serialize:l}:Gu.assertOptions(l,{encode:Qn.function,serialize:Qn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gu.assertOptions(r,{baseUrl:Qn.spelling("baseURL"),withXsrfToken:Qn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let f=c&&Z.merge(c.common,c[r.method]);c&&Z.forEach(["delete","get","head","post","put","patch","common"],R=>{delete c[R]}),r.headers=Je.concat(f,c);const h=[];let g=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(g=g&&w.synchronous,h.unshift(w.fulfilled,w.rejected))});const m=[];this.interceptors.response.forEach(function(w){m.push(w.fulfilled,w.rejected)});let v,p=0,b;if(!g){const R=[V0.bind(this),void 0];for(R.unshift.apply(R,h),R.push.apply(R,m),b=R.length,v=Promise.resolve(r);p<b;)v=v.then(R[p++],R[p++]);return v}b=h.length;let x=r;for(p=0;p<b;){const R=h[p++],w=h[p++];try{x=R(x)}catch(T){w.call(this,T);break}}try{v=V0.call(this,x)}catch(R){return Promise.reject(R)}for(p=0,b=m.length;p<b;)v=v.then(m[p++],m[p++]);return v}getUri(a){a=ai(this.defaults,a);const r=kS(a.baseURL,a.url,a.allowAbsoluteUrls);return jS(r,a.params,a.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(a){Wr.prototype[a]=function(r,s){return this.request(ai(s||{},{method:a,url:r,data:(s||{}).data}))}});Z.forEach(["post","put","patch"],function(a){function r(s){return function(c,f,h){return this.request(ai(h||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}Wr.prototype[a]=r(),Wr.prototype[a+"Form"]=r(!0)});let X4=class FS{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 FS(function(l){a=l}),cancel:a}}};function K4(n){return function(r){return n.apply(null,r)}}function Z4(n){return Z.isObject(n)&&n.isAxiosError===!0}const Ph={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(Ph).forEach(([n,a])=>{Ph[a]=n});function YS(n){const a=new Wr(n),r=xS(Wr.prototype.request,a);return Z.extend(r,Wr.prototype,a,{allOwnKeys:!0}),Z.extend(r,a,null,{allOwnKeys:!0}),r.create=function(l){return YS(ai(n,l))},r}const ce=YS(ll);ce.Axios=Wr;ce.CanceledError=js;ce.CancelToken=X4;ce.isCancel=US;ce.VERSION=GS;ce.toFormData=Rc;ce.AxiosError=_t;ce.Cancel=ce.CanceledError;ce.all=function(a){return Promise.all(a)};ce.spread=K4;ce.isAxiosError=Z4;ce.mergeConfig=ai;ce.AxiosHeaders=Je;ce.formToJSON=n=>zS(Z.isHTMLForm(n)?new FormData(n):n);ce.getAdapter=VS.getAdapter;ce.HttpStatusCode=Ph;ce.default=ce;const{Axios:dD,AxiosError:hD,CanceledError:mD,isCancel:pD,CancelToken:gD,VERSION:vD,all:yD,Cancel:bD,isAxiosError:SD,spread:xD,toFormData:wD,AxiosHeaders:ED,HttpStatusCode:RD,formToJSON:_D,getAdapter:TD,mergeConfig:CD}=ce,Lm=ce.create({baseURL:"/api"});Lm.interceptors.request.use(n=>{const a=localStorage.getItem("access_token");return a&&(n.headers.Authorization=`Bearer ${a}`),n});Lm.interceptors.response.use(n=>n,n=>(n.response.status===401&&(localStorage.removeItem("access_token"),window.location.href="/"),Promise.reject(n)));class F0{constructor(a,r){this.client=a,this.data=r}}class $4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/events");return a.events}}class I4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/guilds");return a.guilds}}class J4{constructor(a){this.client=a}async fetch(){const{data:a}=await this.client.api.get("/plugins");return a.plugins}}class W4{constructor(){$i(this,"api",Lm);$i(this,"guilds",new I4(this));$i(this,"plugins",new J4(this));$i(this,"events",new $4(this));$i(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 F0(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 F0(this,s.user),s}}const QS=E.createContext(null);function tM({children:n}){const[a,r]=E.useState(()=>new W4);return _.jsx(QS.Provider,{value:{client:a,setClient:r},children:n})}function zm(){const n=E.use(QS);if(!n)throw new Error("useClient must be used within a ClientProvider");return n.client}const ph={navMain:[{title:"Commands",url:"/commands",icon:Iy,isActive:!1},{title:"Events",url:"/events",icon:$y,isActive:!1},{title:"Plugins",url:"/plugins",icon:iR,isActive:!1},{title:"Guilds",url:"/guilds",icon:t0,isActive:!1},{title:"Feature Flags",url:"/feature-flags",icon:oR,isActive:!1}],navSecondary:[{title:"GitHub",url:"https://github.com/underctrl-io/commandkit",icon:SR},{title:"Discord",url:"https://ctrl.lol/discord",icon:t0}],projects:[{name:"Commands",url:"#",icon:Iy},{name:"Middlewares",url:"#",icon:cR},{name:"Events",url:"#",icon:$y}]};function eM({...n}){var r;const a=zm();return _.jsxs(ZA,{className:"top-(--header-height) h-[calc(100svh-var(--header-height))]!",...n,children:[_.jsx(IA,{children:_.jsx(rl,{children:_.jsx(il,{children:_.jsx(sl,{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(WA,{children:[_.jsx(nO,{items:ph.navMain}),_.jsx(aO,{projects:ph.projects}),_.jsx(rO,{items:ph.navSecondary,className:"mt-auto"})]}),_.jsx(JA,{children:_.jsx(bO,{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 nM({className:n,...a}){return _.jsx("div",{"data-slot":"card",className:Ot("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",n),...a})}function aM({className:n,...a}){return _.jsx("div",{"data-slot":"card-header",className:Ot("@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 rM({className:n,...a}){return _.jsx("div",{"data-slot":"card-title",className:Ot("leading-none font-semibold",n),...a})}function iM({className:n,...a}){return _.jsx("div",{"data-slot":"card-description",className:Ot("text-muted-foreground text-sm",n),...a})}function sM({className:n,...a}){return _.jsx("div",{"data-slot":"card-content",className:Ot("px-6",n),...a})}function AD({className:n,...a}){return _.jsx("div",{"data-slot":"card-footer",className:Ot("flex items-center px-6 [.border-t]:pt-6",n),...a})}var oM="Label",XS=E.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())}}));XS.displayName=oM;var lM=XS;function Y0({className:n,...a}){return _.jsx(lM,{"data-slot":"label",className:Ot("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 Q0=n=>{let a;const r=new Set,s=(m,v)=>{const p=typeof m=="function"?m(a):m;if(!Object.is(p,a)){const b=a;a=v??(typeof p!="object"||p===null)?p:Object.assign({},a,p),r.forEach(x=>x(a,b))}},l=()=>a,h={setState:s,getState:l,getInitialState:()=>g,subscribe:m=>(r.add(m),()=>r.delete(m))},g=a=n(s,l,h);return h},uM=n=>n?Q0(n):Q0,cM=n=>n;function fM(n,a=cM){const r=ot.useSyncExternalStore(n.subscribe,()=>a(n.getState()),()=>a(n.getInitialState()));return ot.useDebugValue(r),r}const X0=n=>{const a=uM(n),r=s=>fM(a,s);return Object.assign(r,a),r},dM=n=>n?X0(n):X0,KS=dM(n=>({authenticated:!1,setAuthenticated:a=>n({authenticated:a})}));function hM(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 mM=n=>{switch(n){case"success":return vM;case"info":return bM;case"warning":return yM;case"error":return SM;default:return null}},pM=Array(12).fill(0),gM=({visible:n,className:a})=>ot.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},ot.createElement("div",{className:"sonner-spinner"},pM.map((r,s)=>ot.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),vM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),yM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ot.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"})),bM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),SM=ot.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ot.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"})),xM=ot.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"},ot.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ot.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wM=()=>{const[n,a]=ot.useState(document.hidden);return ot.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let Hh=1;class EM{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:Hh++,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 m=>{if(f=["resolve",m],ot.isValidElement(m))c=!1,this.create({id:s,type:"default",message:m});else if(_M(m)&&!m.ok){c=!1;const p=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,b=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...R})}else if(m instanceof Error){c=!1;const p=typeof r.error=="function"?await r.error(m):r.error,b=typeof r.description=="function"?await r.description(m):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"error",description:b,...R})}else if(r.success!==void 0){c=!1;const p=typeof r.success=="function"?await r.success(m):r.success,b=typeof r.description=="function"?await r.description(m):r.description,R=typeof p=="object"&&!ot.isValidElement(p)?p:{message:p};this.create({id:s,type:"success",description:b,...R})}}).catch(async m=>{if(f=["reject",m],r.error!==void 0){c=!1;const v=typeof r.error=="function"?await r.error(m):r.error,p=typeof r.description=="function"?await r.description(m):r.description,x=typeof v=="object"&&!ot.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:p,...x})}}).finally(()=>{c&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),g=()=>new Promise((m,v)=>h.then(()=>f[0]==="reject"?v(f[1]):m(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)||Hh++;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 $e=new EM,RM=(n,a)=>{const r=(a==null?void 0:a.id)||Hh++;return $e.addToast({title:n,...a,id:r}),r},_M=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",TM=RM,CM=()=>$e.toasts,AM=()=>$e.getActiveToasts(),K0=Object.assign(TM,{success:$e.success,info:$e.info,warning:$e.warning,error:$e.error,custom:$e.custom,message:$e.message,promise:$e.promise,dismiss:$e.dismiss,loading:$e.loading},{getHistory:CM,getToasts:AM});hM("[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 Lu(n){return n.label!==void 0}const OM=3,MM="24px",DM="16px",Z0=4e3,NM=356,jM=14,LM=45,zM=200;function Xn(...n){return n.filter(Boolean).join(" ")}function UM(n){const[a,r]=n.split("-"),s=[];return a&&s.push(a),r&&s.push(r),s}const BM=n=>{var a,r,s,l,c,f,h,g,m;const{invert:v,toast:p,unstyled:b,interacting:x,setHeights:R,visibleToasts:w,heights:T,index:A,toasts:L,expanded:z,removeToast:G,defaultRichColors:B,closeButton:P,style:Q,cancelButtonStyle:N,actionButtonStyle:U,className:at="",descriptionClassName:rt="",duration:W,position:st,gap:vt,expandByDefault:lt,classNames:M,icons:K,closeButtonAriaLabel:F="Close toast"}=n,[ut,C]=ot.useState(null),[H,et]=ot.useState(null),[$,tt]=ot.useState(!1),[ct,it]=ot.useState(!1),[ht,ft]=ot.useState(!1),[St,Tt]=ot.useState(!1),[Ht,qt]=ot.useState(!1),[Te,Se]=ot.useState(0),[fn,Ce]=ot.useState(0),$t=ot.useRef(p.duration||W||Z0),We=ot.useRef(null),fe=ot.useRef(null),yr=A===0,kt=A+1<=w,jt=p.type,tn=p.dismissible!==!1,li=p.className||"",Us=p.descriptionClassName||"",dn=ot.useMemo(()=>T.findIndex(Rt=>Rt.toastId===p.id)||0,[T,p.id]),ke=ot.useMemo(()=>{var Rt;return(Rt=p.closeButton)!=null?Rt:P},[p.closeButton,P]),Cn=ot.useMemo(()=>p.duration||W||Z0,[p.duration,W]),Ae=ot.useRef(0),Aa=ot.useRef(0),ul=ot.useRef(0),Oa=ot.useRef(null),[ui,ci]=st.split("-"),Hn=ot.useMemo(()=>T.reduce((Rt,ie,de)=>de>=dn?Rt:Rt+ie.height,0),[T,dn]),br=wM(),Sr=p.invert||v,Bs=jt==="loading";Aa.current=ot.useMemo(()=>dn*vt+Hn,[dn,Hn]),ot.useEffect(()=>{$t.current=Cn},[Cn]),ot.useEffect(()=>{tt(!0)},[]),ot.useEffect(()=>{const Rt=fe.current;if(Rt){const ie=Rt.getBoundingClientRect().height;return Ce(ie),R(de=>[{toastId:p.id,height:ie,position:p.position},...de]),()=>R(de=>de.filter(Oe=>Oe.toastId!==p.id))}},[R,p.id]),ot.useLayoutEffect(()=>{if(!$)return;const Rt=fe.current,ie=Rt.style.height;Rt.style.height="auto";const de=Rt.getBoundingClientRect().height;Rt.style.height=ie,Ce(de),R(Oe=>Oe.find(pe=>pe.toastId===p.id)?Oe.map(pe=>pe.toastId===p.id?{...pe,height:de}:pe):[{toastId:p.id,height:de,position:p.position},...Oe])},[$,p.title,p.description,R,p.id,p.jsx,p.action,p.cancel]);const An=ot.useCallback(()=>{it(!0),Se(Aa.current),R(Rt=>Rt.filter(ie=>ie.toastId!==p.id)),setTimeout(()=>{G(p)},zM)},[p,G,R,Aa]);ot.useEffect(()=>{if(p.promise&&jt==="loading"||p.duration===1/0||p.type==="loading")return;let Rt;return z||x||br?(()=>{if(ul.current<Ae.current){const Oe=new Date().getTime()-Ae.current;$t.current=$t.current-Oe}ul.current=new Date().getTime()})():(()=>{$t.current!==1/0&&(Ae.current=new Date().getTime(),Rt=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),An()},$t.current))})(),()=>clearTimeout(Rt)},[z,x,p,jt,br,An]),ot.useEffect(()=>{p.delete&&(An(),p.onDismiss==null||p.onDismiss.call(p,p))},[An,p.delete]);function cl(){var Rt;if(K!=null&&K.loading){var ie;return ot.createElement("div",{className:Xn(M==null?void 0:M.loader,p==null||(ie=p.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":jt==="loading"},K.loading)}return ot.createElement(gM,{className:Xn(M==null?void 0:M.loader,p==null||(Rt=p.classNames)==null?void 0:Rt.loader),visible:jt==="loading"})}const ks=p.icon||(K==null?void 0:K[jt])||mM(jt);var Ma,fl;return ot.createElement("li",{tabIndex:0,ref:fe,className:Xn(at,li,M==null?void 0:M.toast,p==null||(a=p.classNames)==null?void 0:a.toast,M==null?void 0:M.default,M==null?void 0:M[jt],p==null||(r=p.classNames)==null?void 0:r[jt]),"data-sonner-toast":"","data-rich-colors":(Ma=p.richColors)!=null?Ma:B,"data-styled":!(p.jsx||p.unstyled||b),"data-mounted":$,"data-promise":!!p.promise,"data-swiped":Ht,"data-removed":ct,"data-visible":kt,"data-y-position":ui,"data-x-position":ci,"data-index":A,"data-front":yr,"data-swiping":ht,"data-dismissible":tn,"data-type":jt,"data-invert":Sr,"data-swipe-out":St,"data-swipe-direction":H,"data-expanded":!!(z||lt&&$),style:{"--index":A,"--toasts-before":A,"--z-index":L.length-A,"--offset":`${ct?Te:Aa.current}px`,"--initial-height":lt?"auto":`${fn}px`,...Q,...p.style},onDragEnd:()=>{ft(!1),C(null),Oa.current=null},onPointerDown:Rt=>{Rt.button!==2&&(Bs||!tn||(We.current=new Date,Se(Aa.current),Rt.target.setPointerCapture(Rt.pointerId),Rt.target.tagName!=="BUTTON"&&(ft(!0),Oa.current={x:Rt.clientX,y:Rt.clientY})))},onPointerUp:()=>{var Rt,ie,de;if(St||!tn)return;Oa.current=null;const Oe=Number(((Rt=fe.current)==null?void 0:Rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),xr=Number(((ie=fe.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pe=new Date().getTime()-((de=We.current)==null?void 0:de.getTime()),se=ut==="x"?Oe:xr,oe=Math.abs(se)/pe;if(Math.abs(se)>=LM||oe>.11){Se(Aa.current),p.onDismiss==null||p.onDismiss.call(p,p),et(ut==="x"?Oe>0?"right":"left":xr>0?"down":"up"),An(),Tt(!0);return}else{var It,xe;(It=fe.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(xe=fe.current)==null||xe.style.setProperty("--swipe-amount-y","0px")}qt(!1),ft(!1),C(null)},onPointerMove:Rt=>{var ie,de,Oe;if(!Oa.current||!tn||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;const pe=Rt.clientY-Oa.current.y,se=Rt.clientX-Oa.current.x;var oe;const It=(oe=n.swipeDirections)!=null?oe:UM(st);!ut&&(Math.abs(se)>1||Math.abs(pe)>1)&&C(Math.abs(se)>Math.abs(pe)?"x":"y");let xe={x:0,y:0};const fi=na=>1/(1.5+Math.abs(na)/20);if(ut==="y"){if(It.includes("top")||It.includes("bottom"))if(It.includes("top")&&pe<0||It.includes("bottom")&&pe>0)xe.y=pe;else{const na=pe*fi(pe);xe.y=Math.abs(na)<Math.abs(pe)?na:pe}}else if(ut==="x"&&(It.includes("left")||It.includes("right")))if(It.includes("left")&&se<0||It.includes("right")&&se>0)xe.x=se;else{const na=se*fi(se);xe.x=Math.abs(na)<Math.abs(se)?na:se}(Math.abs(xe.x)>0||Math.abs(xe.y)>0)&&qt(!0),(de=fe.current)==null||de.style.setProperty("--swipe-amount-x",`${xe.x}px`),(Oe=fe.current)==null||Oe.style.setProperty("--swipe-amount-y",`${xe.y}px`)}},ke&&!p.jsx&&jt!=="loading"?ot.createElement("button",{"aria-label":F,"data-disabled":Bs,"data-close-button":!0,onClick:Bs||!tn?()=>{}:()=>{An(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Xn(M==null?void 0:M.closeButton,p==null||(s=p.classNames)==null?void 0:s.closeButton)},(fl=K==null?void 0:K.close)!=null?fl:xM):null,(jt||p.icon||p.promise)&&p.icon!==null&&((K==null?void 0:K[jt])!==null||p.icon)?ot.createElement("div",{"data-icon":"",className:Xn(M==null?void 0:M.icon,p==null||(l=p.classNames)==null?void 0:l.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||cl():null,p.type!=="loading"?ks:null):null,ot.createElement("div",{"data-content":"",className:Xn(M==null?void 0:M.content,p==null||(c=p.classNames)==null?void 0:c.content)},ot.createElement("div",{"data-title":"",className:Xn(M==null?void 0:M.title,p==null||(f=p.classNames)==null?void 0:f.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ot.createElement("div",{"data-description":"",className:Xn(rt,Us,M==null?void 0:M.description,p==null||(h=p.classNames)==null?void 0:h.description)},typeof p.description=="function"?p.description():p.description):null),ot.isValidElement(p.cancel)?p.cancel:p.cancel&&Lu(p.cancel)?ot.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Rt=>{Lu(p.cancel)&&tn&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Rt),An())},className:Xn(M==null?void 0:M.cancelButton,p==null||(g=p.classNames)==null?void 0:g.cancelButton)},p.cancel.label):null,ot.isValidElement(p.action)?p.action:p.action&&Lu(p.action)?ot.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||U,onClick:Rt=>{Lu(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Rt),!Rt.defaultPrevented&&An())},className:Xn(M==null?void 0:M.actionButton,p==null||(m=p.classNames)==null?void 0:m.actionButton)},p.action.label):null)};function $0(){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 kM(n,a){const r={};return[n,a].forEach((s,l)=>{const c=l===1,f=c?"--mobile-offset":"--offset",h=c?DM:MM;function g(m){["top","right","bottom","left"].forEach(v=>{r[`${f}-${v}`]=typeof m=="number"?`${m}px`:m})}typeof s=="number"||typeof s=="string"?g(s):typeof s=="object"?["top","right","bottom","left"].forEach(m=>{s[m]===void 0?r[`${f}-${m}`]=h:r[`${f}-${m}`]=typeof s[m]=="number"?`${s[m]}px`:s[m]}):g(h)}),r}const PM=ot.forwardRef(function(a,r){const{invert:s,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:h,className:g,offset:m,mobileOffset:v,theme:p="light",richColors:b,duration:x,style:R,visibleToasts:w=OM,toastOptions:T,dir:A=$0(),gap:L=jM,icons:z,containerAriaLabel:G="Notifications"}=a,[B,P]=ot.useState([]),Q=ot.useMemo(()=>Array.from(new Set([l].concat(B.filter(H=>H.position).map(H=>H.position)))),[B,l]),[N,U]=ot.useState([]),[at,rt]=ot.useState(!1),[W,st]=ot.useState(!1),[vt,lt]=ot.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=ot.useRef(null),K=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=ot.useRef(null),ut=ot.useRef(!1),C=ot.useCallback(H=>{P(et=>{var $;return($=et.find(tt=>tt.id===H.id))!=null&&$.delete||$e.dismiss(H.id),et.filter(({id:tt})=>tt!==H.id)})},[]);return ot.useEffect(()=>$e.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{P(et=>et.map($=>$.id===H.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Ub.flushSync(()=>{P(et=>{const $=et.findIndex(tt=>tt.id===H.id);return $!==-1?[...et.slice(0,$),{...et[$],...H},...et.slice($+1)]:[H,...et]})})})}),[B]),ot.useEffect(()=>{if(p!=="system"){lt(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?lt("dark"):lt("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:et})=>{lt(et?"dark":"light")})}catch{H.addListener(({matches:$})=>{try{lt($?"dark":"light")}catch(tt){console.error(tt)}})}},[p]),ot.useEffect(()=>{B.length<=1&&rt(!1)},[B]),ot.useEffect(()=>{const H=et=>{var $;if(c.every(it=>et[it]||et.code===it)){var ct;rt(!0),(ct=M.current)==null||ct.focus()}et.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&rt(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[c]),ot.useEffect(()=>{if(M.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,ut.current=!1)}},[M.current]),ot.createElement("section",{ref:r,"aria-label":`${G} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((H,et)=>{var $;const[tt,ct]=H.split("-");return B.length?ot.createElement("ol",{key:H,dir:A==="auto"?$0():A,tabIndex:-1,ref:M,className:g,"data-sonner-toaster":!0,"data-sonner-theme":vt,"data-y-position":tt,"data-x-position":ct,style:{"--front-toast-height":`${(($=N[0])==null?void 0:$.height)||0}px`,"--width":`${NM}px`,"--gap":`${L}px`,...R,...kM(m,v)},onBlur:it=>{ut.current&&!it.currentTarget.contains(it.relatedTarget)&&(ut.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:it=>{it.target instanceof HTMLElement&&it.target.dataset.dismissible==="false"||ut.current||(ut.current=!0,F.current=it.relatedTarget)},onMouseEnter:()=>rt(!0),onMouseMove:()=>rt(!0),onMouseLeave:()=>{W||rt(!1)},onDragEnd:()=>rt(!1),onPointerDown:it=>{it.target instanceof HTMLElement&&it.target.dataset.dismissible==="false"||st(!0)},onPointerUp:()=>st(!1)},B.filter(it=>!it.position&&et===0||it.position===H).map((it,ht)=>{var ft,St;return ot.createElement(BM,{key:it.id,icons:z,index:ht,toast:it,defaultRichColors:b,duration:(ft=T==null?void 0:T.duration)!=null?ft:x,className:T==null?void 0:T.className,descriptionClassName:T==null?void 0:T.descriptionClassName,invert:s,visibleToasts:w,closeButton:(St=T==null?void 0:T.closeButton)!=null?St:h,interacting:W,position:H,style:T==null?void 0:T.style,unstyled:T==null?void 0:T.unstyled,classNames:T==null?void 0:T.classNames,cancelButtonStyle:T==null?void 0:T.cancelButtonStyle,actionButtonStyle:T==null?void 0:T.actionButtonStyle,closeButtonAriaLabel:T==null?void 0:T.closeButtonAriaLabel,removeToast:C,toasts:B.filter(Tt=>Tt.position==it.position),heights:N.filter(Tt=>Tt.position==it.position),setHeights:U,expandByDefault:f,gap:L,expanded:at,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(){}},ri=typeof window>"u"||"Deno"in globalThis;function Ve(){}function HM(n,a){return typeof n=="function"?n(a):n}function qh(n){return typeof n=="number"&&n>=0&&n!==1/0}function ZS(n,a){return Math.max(n+(a||0)-Date.now(),0)}function hr(n,a){return typeof n=="function"?n(a):n}function zn(n,a){return typeof n=="function"?n(a):n}function I0(n,a){const{type:r="all",exact:s,fetchStatus:l,predicate:c,queryKey:f,stale:h}=n;if(f){if(s){if(a.queryHash!==Um(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 J0(n,a){const{exact:r,status:s,predicate:l,mutationKey:c}=n;if(c){if(!a.options.mutationKey)return!1;if(r){if(ii(a.options.mutationKey)!==ii(c))return!1}else if(!Ko(a.options.mutationKey,c))return!1}return!(s&&a.state.status!==s||l&&!l(a))}function Um(n,a){return((a==null?void 0:a.queryKeyHashFn)||ii)(n)}function ii(n){return JSON.stringify(n,(a,r)=>Vh(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 $S(n,a){if(n===a)return n;const r=W0(n)&&W0(a);if(r||Vh(n)&&Vh(a)){const s=r?n:Object.keys(n),l=s.length,c=r?a:Object.keys(a),f=c.length,h=r?[]:{};let g=0;for(let m=0;m<f;m++){const v=r?m:c[m];(!r&&s.includes(v)||r)&&n[v]===void 0&&a[v]===void 0?(h[v]=void 0,g++):(h[v]=$S(n[v],a[v]),h[v]===n[v]&&n[v]!==void 0&&g++)}return l===f&&g===l?n:h}return a}function sc(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 W0(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Vh(n){if(!tb(n))return!1;const a=n.constructor;if(a===void 0)return!0;const r=a.prototype;return!(!tb(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function tb(n){return Object.prototype.toString.call(n)==="[object Object]"}function qM(n){return new Promise(a=>{setTimeout(a,n)})}function Gh(n,a,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,a):r.structuralSharing!==!1?$S(n,a):a}function VM(n,a,r=0){const s=[...n,a];return r&&s.length>r?s.slice(1):s}function GM(n,a,r=0){const s=[a,...n];return r&&s.length>r?s.slice(0,-1):s}var Bm=Symbol();function IS(n,a){return!n.queryFn&&(a!=null&&a.initialPromise)?()=>a.initialPromise:!n.queryFn||n.queryFn===Bm?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function JS(n,a){return typeof n=="function"?n(...a):!!n}var Fr,nr,us,cb,FM=(cb=class extends Ls{constructor(){super();bt(this,Fr);bt(this,nr);bt(this,us);dt(this,us,a=>{if(!ri&&window.addEventListener){const r=()=>a();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){D(this,nr)||this.setEventListener(D(this,us))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,nr))==null||a.call(this),dt(this,nr,void 0))}setEventListener(a){var r;dt(this,us,a),(r=D(this,nr))==null||r.call(this),dt(this,nr,a(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(a){D(this,Fr)!==a&&(dt(this,Fr,a),this.onFocus())}onFocus(){const a=this.isFocused();this.listeners.forEach(r=>{r(a)})}isFocused(){var a;return typeof D(this,Fr)=="boolean"?D(this,Fr):((a=globalThis.document)==null?void 0:a.visibilityState)!=="hidden"}},Fr=new WeakMap,nr=new WeakMap,us=new WeakMap,cb),km=new FM,cs,ar,fs,fb,YM=(fb=class extends Ls{constructor(){super();bt(this,cs,!0);bt(this,ar);bt(this,fs);dt(this,fs,a=>{if(!ri&&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,ar)||this.setEventListener(D(this,fs))}onUnsubscribe(){var a;this.hasListeners()||((a=D(this,ar))==null||a.call(this),dt(this,ar,void 0))}setEventListener(a){var r;dt(this,fs,a),(r=D(this,ar))==null||r.call(this),dt(this,ar,a(this.setOnline.bind(this)))}setOnline(a){D(this,cs)!==a&&(dt(this,cs,a),this.listeners.forEach(s=>{s(a)}))}isOnline(){return D(this,cs)}},cs=new WeakMap,ar=new WeakMap,fs=new WeakMap,fb),oc=new YM;function Fh(){let n,a;const r=new Promise((l,c)=>{n=l,a=c});r.status="pending",r.catch(()=>{});function s(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{s({status:"fulfilled",value:l}),n(l)},r.reject=l=>{s({status:"rejected",reason:l}),a(l)},r}function QM(n){return Math.min(1e3*2**n,3e4)}function WS(n){return(n??"online")==="online"?oc.isOnline():!0}var tx=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function gh(n){return n instanceof tx}function ex(n){let a=!1,r=0,s=!1,l;const c=Fh(),f=w=>{var T;s||(b(new tx(w)),(T=n.abort)==null||T.call(n))},h=()=>{a=!0},g=()=>{a=!1},m=()=>km.isFocused()&&(n.networkMode==="always"||oc.isOnline())&&n.canRun(),v=()=>WS(n.networkMode)&&n.canRun(),p=w=>{var T;s||(s=!0,(T=n.onSuccess)==null||T.call(n,w),l==null||l(),c.resolve(w))},b=w=>{var T;s||(s=!0,(T=n.onError)==null||T.call(n,w),l==null||l(),c.reject(w))},x=()=>new Promise(w=>{var T;l=A=>{(s||m())&&w(A)},(T=n.onPause)==null||T.call(n)}).then(()=>{var w;l=void 0,s||(w=n.onContinue)==null||w.call(n)}),R=()=>{if(s)return;let w;const T=r===0?n.initialPromise:void 0;try{w=T??n.fn()}catch(A){w=Promise.reject(A)}Promise.resolve(w).then(p).catch(A=>{var P;if(s)return;const L=n.retry??(ri?0:3),z=n.retryDelay??QM,G=typeof z=="function"?z(r,A):z,B=L===!0||typeof L=="number"&&r<L||typeof L=="function"&&L(r,A);if(a||!B){b(A);return}r++,(P=n.onFail)==null||P.call(n,r,A),qM(G).then(()=>m()?void 0:x()).then(()=>{a?b(A):R()})})};return{promise:c,cancel:f,continue:()=>(l==null||l(),c),cancelRetry:h,continueRetry:g,canStart:v,start:()=>(v()?R():x().then(R),c)}}var XM=n=>setTimeout(n,0);function KM(){let n=[],a=0,r=h=>{h()},s=h=>{h()},l=XM;const c=h=>{a?n.push(h):l(()=>{r(h)})},f=()=>{const h=n;n=[],h.length&&l(()=>{s(()=>{h.forEach(g=>{r(g)})})})};return{batch:h=>{let g;a++;try{g=h()}finally{a--,a||f()}return g},batchCalls:h=>(...g)=>{c(()=>{h(...g)})},schedule:c,setNotifyFunction:h=>{r=h},setBatchNotifyFunction:h=>{s=h},setScheduler:h=>{l=h}}}var be=KM(),Yr,db,nx=(db=class{constructor(){bt(this,Yr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qh(this.gcTime)&&dt(this,Yr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ri?1/0:5*60*1e3))}clearGcTimeout(){D(this,Yr)&&(clearTimeout(D(this,Yr)),dt(this,Yr,void 0))}},Yr=new WeakMap,db),ds,hs,En,Qr,ze,Zo,Xr,Nn,ba,hb,ZM=(hb=class extends nx{constructor(a){super();bt(this,Nn);bt(this,ds);bt(this,hs);bt(this,En);bt(this,Qr);bt(this,ze);bt(this,Zo);bt(this,Xr);dt(this,Xr,!1),dt(this,Zo,a.defaultOptions),this.setOptions(a.options),this.observers=[],dt(this,Qr,a.client),dt(this,En,D(this,Qr).getQueryCache()),this.queryKey=a.queryKey,this.queryHash=a.queryHash,dt(this,ds,$M(this.options)),this.state=a.state??D(this,ds),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var a;return(a=D(this,ze))==null?void 0:a.promise}setOptions(a){this.options={...D(this,Zo),...a},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,En).remove(this)}setData(a,r){const s=Gh(this.state.data,a,this.options);return At(this,Nn,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){At(this,Nn,ba).call(this,{type:"setState",state:a,setStateOptions:r})}cancel(a){var s,l;const r=(s=D(this,ze))==null?void 0:s.promise;return(l=D(this,ze))==null||l.cancel(a),r?r.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,ds))}isActive(){return this.observers.some(a=>zn(a.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(a=>hr(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:!ZS(this.state.dataUpdatedAt,a)}onFocus(){var r;const a=this.observers.find(s=>s.shouldFetchOnWindowFocus());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,ze))==null||r.continue()}onOnline(){var r;const a=this.observers.find(s=>s.shouldFetchOnReconnect());a==null||a.refetch({cancelRefetch:!1}),(r=D(this,ze))==null||r.continue()}addObserver(a){this.observers.includes(a)||(this.observers.push(a),this.clearGcTimeout(),D(this,En).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,ze)&&(D(this,Xr)?D(this,ze).cancel({revert:!0}):D(this,ze).cancelRetry()),this.scheduleGc()),D(this,En).notify({type:"observerRemoved",query:this,observer:a}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||At(this,Nn,ba).call(this,{type:"invalidate"})}fetch(a,r){var g,m,v;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(D(this,ze))return D(this,ze).continueRetry(),D(this,ze).promise}if(a&&this.setOptions(a),!this.options.queryFn){const p=this.observers.find(b=>b.options.queryFn);p&&this.setOptions(p.options)}const s=new AbortController,l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(dt(this,Xr,!0),s.signal)})},c=()=>{const p=IS(this.options,r),b={client:D(this,Qr),queryKey:this.queryKey,meta:this.meta};return l(b),dt(this,Xr,!1),this.options.persister?this.options.persister(p,b,this):p(b)},f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:D(this,Qr),state:this.state,fetchFn:c};l(f),(g=this.options.behavior)==null||g.onFetch(f,this),dt(this,hs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=f.fetchOptions)==null?void 0:m.meta))&&At(this,Nn,ba).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta});const h=p=>{var b,x,R,w;gh(p)&&p.silent||At(this,Nn,ba).call(this,{type:"error",error:p}),gh(p)||((x=(b=D(this,En).config).onError)==null||x.call(b,p,this),(w=(R=D(this,En).config).onSettled)==null||w.call(R,this.state.data,p,this)),this.scheduleGc()};return dt(this,ze,ex({initialPromise:r==null?void 0:r.initialPromise,fn:f.fetchFn,abort:s.abort.bind(s),onSuccess:p=>{var b,x,R,w;if(p===void 0){h(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(T){h(T);return}(x=(b=D(this,En).config).onSuccess)==null||x.call(b,p,this),(w=(R=D(this,En).config).onSettled)==null||w.call(R,p,this.state.error,this),this.scheduleGc()},onError:h,onFail:(p,b)=>{At(this,Nn,ba).call(this,{type:"failed",failureCount:p,error:b})},onPause:()=>{At(this,Nn,ba).call(this,{type:"pause"})},onContinue:()=>{At(this,Nn,ba).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0})),D(this,ze).start()}},ds=new WeakMap,hs=new WeakMap,En=new WeakMap,Qr=new WeakMap,ze=new WeakMap,Zo=new WeakMap,Xr=new WeakMap,Nn=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,...ax(s.data,this.options),fetchMeta:a.meta??null};case"success":return{...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 gh(l)&&l.revert&&D(this,hs)?{...D(this,hs),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),be.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),D(this,En).notify({query:this,type:"updated",action:a})})},hb);function ax(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WS(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function $M(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 Kn,mb,IM=(mb=class extends Ls{constructor(a={}){super();bt(this,Kn);this.config=a,dt(this,Kn,new Map)}build(a,r,s){const l=r.queryKey,c=r.queryHash??Um(l,r);let f=this.get(c);return f||(f=new ZM({client:a,queryKey:l,queryHash:c,options:a.defaultQueryOptions(r),state:s,defaultOptions:a.getQueryDefaults(l)}),this.add(f)),f}add(a){D(this,Kn).has(a.queryHash)||(D(this,Kn).set(a.queryHash,a),this.notify({type:"added",query:a}))}remove(a){const r=D(this,Kn).get(a.queryHash);r&&(a.destroy(),r===a&&D(this,Kn).delete(a.queryHash),this.notify({type:"removed",query:a}))}clear(){be.batch(()=>{this.getAll().forEach(a=>{this.remove(a)})})}get(a){return D(this,Kn).get(a)}getAll(){return[...D(this,Kn).values()]}find(a){const r={exact:!0,...a};return this.getAll().find(s=>I0(r,s))}findAll(a={}){const r=this.getAll();return Object.keys(a).length>0?r.filter(s=>I0(a,s)):r}notify(a){be.batch(()=>{this.listeners.forEach(r=>{r(a)})})}onFocus(){be.batch(()=>{this.getAll().forEach(a=>{a.onFocus()})})}onOnline(){be.batch(()=>{this.getAll().forEach(a=>{a.onOnline()})})}},Kn=new WeakMap,mb),Zn,He,Kr,$n,er,pb,JM=(pb=class extends nx{constructor(a){super();bt(this,$n);bt(this,Zn);bt(this,He);bt(this,Kr);this.mutationId=a.mutationId,dt(this,He,a.mutationCache),dt(this,Zn,[]),this.state=a.state||rx(),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,Zn).includes(a)||(D(this,Zn).push(a),this.clearGcTimeout(),D(this,He).notify({type:"observerAdded",mutation:this,observer:a}))}removeObserver(a){dt(this,Zn,D(this,Zn).filter(r=>r!==a)),this.scheduleGc(),D(this,He).notify({type:"observerRemoved",mutation:this,observer:a})}optionalRemove(){D(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():D(this,He).remove(this))}continue(){var a;return((a=D(this,Kr))==null?void 0:a.continue())??this.execute(this.state.variables)}async execute(a){var c,f,h,g,m,v,p,b,x,R,w,T,A,L,z,G,B,P,Q,N;const r=()=>{At(this,$n,er).call(this,{type:"continue"})};dt(this,Kr,ex({fn:()=>this.options.mutationFn?this.options.mutationFn(a):Promise.reject(new Error("No mutationFn found")),onFail:(U,at)=>{At(this,$n,er).call(this,{type:"failed",failureCount:U,error:at})},onPause:()=>{At(this,$n,er).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,He).canRun(this)}));const s=this.state.status==="pending",l=!D(this,Kr).canStart();try{if(s)r();else{At(this,$n,er).call(this,{type:"pending",variables:a,isPaused:l}),await((f=(c=D(this,He).config).onMutate)==null?void 0:f.call(c,a,this));const at=await((g=(h=this.options).onMutate)==null?void 0:g.call(h,a));at!==this.state.context&&At(this,$n,er).call(this,{type:"pending",context:at,variables:a,isPaused:l})}const U=await D(this,Kr).start();return await((v=(m=D(this,He).config).onSuccess)==null?void 0:v.call(m,U,a,this.state.context,this)),await((b=(p=this.options).onSuccess)==null?void 0:b.call(p,U,a,this.state.context)),await((R=(x=D(this,He).config).onSettled)==null?void 0:R.call(x,U,null,this.state.variables,this.state.context,this)),await((T=(w=this.options).onSettled)==null?void 0:T.call(w,U,null,a,this.state.context)),At(this,$n,er).call(this,{type:"success",data:U}),U}catch(U){try{throw await((L=(A=D(this,He).config).onError)==null?void 0:L.call(A,U,a,this.state.context,this)),await((G=(z=this.options).onError)==null?void 0:G.call(z,U,a,this.state.context)),await((P=(B=D(this,He).config).onSettled)==null?void 0:P.call(B,void 0,U,this.state.variables,this.state.context,this)),await((N=(Q=this.options).onSettled)==null?void 0:N.call(Q,void 0,U,a,this.state.context)),U}finally{At(this,$n,er).call(this,{type:"error",error:U})}}finally{D(this,He).runNext(this)}}},Zn=new WeakMap,He=new WeakMap,Kr=new WeakMap,$n=new WeakSet,er=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),be.batch(()=>{D(this,Zn).forEach(s=>{s.onMutationUpdate(a)}),D(this,He).notify({mutation:this,type:"updated",action:a})})},pb);function rx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,jn,$o,gb,WM=(gb=class extends Ls{constructor(a={}){super();bt(this,Sa);bt(this,jn);bt(this,$o);this.config=a,dt(this,Sa,new Set),dt(this,jn,new Map),dt(this,$o,0)}build(a,r,s){const l=new JM({mutationCache:this,mutationId:++wu(this,$o)._,options:a.defaultMutationOptions(r),state:s});return this.add(l),l}add(a){D(this,Sa).add(a);const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r);s?s.push(a):D(this,jn).set(r,[a])}this.notify({type:"added",mutation:a})}remove(a){if(D(this,Sa).delete(a)){const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r);if(s)if(s.length>1){const l=s.indexOf(a);l!==-1&&s.splice(l,1)}else s[0]===a&&D(this,jn).delete(r)}}this.notify({type:"removed",mutation:a})}canRun(a){const r=zu(a);if(typeof r=="string"){const s=D(this,jn).get(r),l=s==null?void 0:s.find(c=>c.state.status==="pending");return!l||l===a}else return!0}runNext(a){var s;const r=zu(a);if(typeof r=="string"){const l=(s=D(this,jn).get(r))==null?void 0:s.find(c=>c!==a&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){be.batch(()=>{D(this,Sa).forEach(a=>{this.notify({type:"removed",mutation:a})}),D(this,Sa).clear(),D(this,jn).clear()})}getAll(){return Array.from(D(this,Sa))}find(a){const r={exact:!0,...a};return this.getAll().find(s=>J0(r,s))}findAll(a={}){return this.getAll().filter(r=>J0(a,r))}notify(a){be.batch(()=>{this.listeners.forEach(r=>{r(a)})})}resumePausedMutations(){const a=this.getAll().filter(r=>r.state.isPaused);return be.batch(()=>Promise.all(a.map(r=>r.continue().catch(Ve))))}},Sa=new WeakMap,jn=new WeakMap,$o=new WeakMap,gb);function zu(n){var a;return(a=n.options.scope)==null?void 0:a.id}function eb(n){return{onFetch:(a,r)=>{var v,p,b,x,R;const s=a.options,l=(b=(p=(v=a.fetchOptions)==null?void 0:v.meta)==null?void 0:p.fetchMore)==null?void 0:b.direction,c=((x=a.state.data)==null?void 0:x.pages)||[],f=((R=a.state.data)==null?void 0:R.pageParams)||[];let h={pages:[],pageParams:[]},g=0;const m=async()=>{let w=!1;const T=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(a.signal.aborted?w=!0:a.signal.addEventListener("abort",()=>{w=!0}),a.signal)})},A=IS(a.options,a.fetchOptions),L=async(z,G,B)=>{if(w)return Promise.reject();if(G==null&&z.pages.length)return Promise.resolve(z);const P={client:a.client,queryKey:a.queryKey,pageParam:G,direction:B?"backward":"forward",meta:a.options.meta};T(P);const Q=await A(P),{maxPages:N}=a.options,U=B?GM:VM;return{pages:U(z.pages,Q,N),pageParams:U(z.pageParams,G,N)}};if(l&&c.length){const z=l==="backward",G=z?t3:nb,B={pages:c,pageParams:f},P=G(s,B);h=await L(B,P,z)}else{const z=n??c.length;do{const G=g===0?f[0]??s.initialPageParam:nb(s,h);if(g>0&&G==null)break;h=await L(h,G),g++}while(g<z)}return h};a.options.persister?a.fetchFn=()=>{var w,T;return(T=(w=a.options).persister)==null?void 0:T.call(w,m,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},r)}:a.fetchFn=m}}}function nb(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 t3(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,rr,ir,ms,ps,sr,gs,vs,vb,e3=(vb=class{constructor(n={}){bt(this,ae);bt(this,rr);bt(this,ir);bt(this,ms);bt(this,ps);bt(this,sr);bt(this,gs);bt(this,vs);dt(this,ae,n.queryCache||new IM),dt(this,rr,n.mutationCache||new WM),dt(this,ir,n.defaultOptions||{}),dt(this,ms,new Map),dt(this,ps,new Map),dt(this,sr,0)}mount(){wu(this,sr)._++,D(this,sr)===1&&(dt(this,gs,km.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onFocus())})),dt(this,vs,oc.subscribe(async n=>{n&&(await this.resumePausedMutations(),D(this,ae).onOnline())})))}unmount(){var n,a;wu(this,sr)._--,D(this,sr)===0&&((n=D(this,gs))==null||n.call(this),dt(this,gs,void 0),(a=D(this,vs))==null||a.call(this),dt(this,vs,void 0))}isFetching(n){return D(this,ae).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return D(this,rr).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(hr(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=HM(a,c);if(f!==void 0)return D(this,ae).build(this,s).setData(f,{...r,manual:!0})}setQueriesData(n,a,r){return be.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);be.batch(()=>{a.findAll(n).forEach(r=>{a.remove(r)})})}resetQueries(n,a){const r=D(this,ae);return be.batch(()=>(r.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const r={revert:!0,...a},s=be.batch(()=>D(this,ae).findAll(n).map(l=>l.cancel(r)));return Promise.all(s).then(Ve).catch(Ve)}invalidateQueries(n,a={}){return be.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=be.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(Ve)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(s).then(Ve)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const r=D(this,ae).build(this,a);return r.isStaleByTime(hr(a.staleTime,r))?r.fetch(a):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ve).catch(Ve)}fetchInfiniteQuery(n){return n.behavior=eb(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ve).catch(Ve)}ensureInfiniteQueryData(n){return n.behavior=eb(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return oc.isOnline()?D(this,rr).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,ae)}getMutationCache(){return D(this,rr)}getDefaultOptions(){return D(this,ir)}setDefaultOptions(n){dt(this,ir,n)}setQueryDefaults(n,a){D(this,ms).set(ii(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(ii(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,ir).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Um(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===Bm&&(a.enabled=!1),a}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...D(this,ir).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){D(this,ae).clear(),D(this,rr).clear()}},ae=new WeakMap,rr=new WeakMap,ir=new WeakMap,ms=new WeakMap,ps=new WeakMap,sr=new WeakMap,gs=new WeakMap,vs=new WeakMap,vb),Ke,Ut,Io,qe,Zr,ys,or,lr,Jo,bs,Ss,$r,Ir,ur,xs,Gt,Ho,Yh,Qh,Xh,Kh,Zh,$h,Ih,ix,yb,n3=(yb=class extends Ls{constructor(a,r){super();bt(this,Gt);bt(this,Ke);bt(this,Ut);bt(this,Io);bt(this,qe);bt(this,Zr);bt(this,ys);bt(this,or);bt(this,lr);bt(this,Jo);bt(this,bs);bt(this,Ss);bt(this,$r);bt(this,Ir);bt(this,ur);bt(this,xs,new Set);this.options=r,dt(this,Ke,a),dt(this,lr,null),dt(this,or,Fh()),this.options.experimental_prefetchInRender||D(this,or).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),ab(D(this,Ut),this.options)?At(this,Gt,Ho).call(this):this.updateResult(),At(this,Gt,Kh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jh(D(this,Ut),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jh(D(this,Ut),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,At(this,Gt,Zh).call(this),At(this,Gt,$h).call(this),D(this,Ut).removeObserver(this)}setOptions(a){const r=this.options,s=D(this,Ut);if(this.options=D(this,Ke).defaultQueryOptions(a),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof zn(this.options.enabled,D(this,Ut))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");At(this,Gt,Ih).call(this),D(this,Ut).setOptions(this.options),r._defaulted&&!sc(this.options,r)&&D(this,Ke).getQueryCache().notify({type:"observerOptionsUpdated",query:D(this,Ut),observer:this});const l=this.hasListeners();l&&rb(D(this,Ut),s,this.options,r)&&At(this,Gt,Ho).call(this),this.updateResult(),l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||hr(this.options.staleTime,D(this,Ut))!==hr(r.staleTime,D(this,Ut)))&&At(this,Gt,Yh).call(this);const c=At(this,Gt,Qh).call(this);l&&(D(this,Ut)!==s||zn(this.options.enabled,D(this,Ut))!==zn(r.enabled,D(this,Ut))||c!==D(this,ur))&&At(this,Gt,Xh).call(this,c)}getOptimisticResult(a){const r=D(this,Ke).getQueryCache().build(D(this,Ke),a),s=this.createResult(r,a);return r3(this,s)&&(dt(this,qe,s),dt(this,ys,this.options),dt(this,Zr,D(this,Ut).state)),s}getCurrentResult(){return D(this,qe)}trackResult(a,r){return new Proxy(a,{get:(s,l)=>(this.trackProp(l),r==null||r(l),Reflect.get(s,l))})}trackProp(a){D(this,xs).add(a)}getCurrentQuery(){return D(this,Ut)}refetch({...a}={}){return this.fetch({...a})}fetchOptimistic(a){const r=D(this,Ke).defaultQueryOptions(a),s=D(this,Ke).getQueryCache().build(D(this,Ke),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(a){return At(this,Gt,Ho).call(this,{...a,cancelRefetch:a.cancelRefetch??!0}).then(()=>(this.updateResult(),D(this,qe)))}createResult(a,r){var U;const s=D(this,Ut),l=this.options,c=D(this,qe),f=D(this,Zr),h=D(this,ys),m=a!==s?a.state:D(this,Io),{state:v}=a;let p={...v},b=!1,x;if(r._optimisticResults){const at=this.hasListeners(),rt=!at&&ab(a,r),W=at&&rb(a,s,r,l);(rt||W)&&(p={...p,...ax(v.data,a.options)}),r._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:R,errorUpdatedAt:w,status:T}=p;x=p.data;let A=!1;if(r.placeholderData!==void 0&&x===void 0&&T==="pending"){let at;c!=null&&c.isPlaceholderData&&r.placeholderData===(h==null?void 0:h.placeholderData)?(at=c.data,A=!0):at=typeof r.placeholderData=="function"?r.placeholderData((U=D(this,Ss))==null?void 0:U.state.data,D(this,Ss)):r.placeholderData,at!==void 0&&(T="success",x=Gh(c==null?void 0:c.data,at,r),b=!0)}if(r.select&&x!==void 0&&!A)if(c&&x===(f==null?void 0:f.data)&&r.select===D(this,Jo))x=D(this,bs);else try{dt(this,Jo,r.select),x=r.select(x),x=Gh(c==null?void 0:c.data,x,r),dt(this,bs,x),dt(this,lr,null)}catch(at){dt(this,lr,at)}D(this,lr)&&(R=D(this,lr),x=D(this,bs),w=Date.now(),T="error");const L=p.fetchStatus==="fetching",z=T==="pending",G=T==="error",B=z&&L,P=x!==void 0,N={status:T,fetchStatus:p.fetchStatus,isPending:z,isSuccess:T==="success",isError:G,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:p.dataUpdatedAt,error:R,errorUpdatedAt:w,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>m.dataUpdateCount||p.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!z,isLoadingError:G&&!P,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:G&&P,isStale:Pm(a,r),refetch:this.refetch,promise:D(this,or)};if(this.options.experimental_prefetchInRender){const at=st=>{N.status==="error"?st.reject(N.error):N.data!==void 0&&st.resolve(N.data)},rt=()=>{const st=dt(this,or,N.promise=Fh());at(st)},W=D(this,or);switch(W.status){case"pending":a.queryHash===s.queryHash&&at(W);break;case"fulfilled":(N.status==="error"||N.data!==W.value)&&rt();break;case"rejected":(N.status!=="error"||N.error!==W.reason)&&rt();break}}return N}updateResult(){const a=D(this,qe),r=this.createResult(D(this,Ut),this.options);if(dt(this,Zr,D(this,Ut).state),dt(this,ys,this.options),D(this,Zr).data!==void 0&&dt(this,Ss,D(this,Ut)),sc(r,a))return;dt(this,qe,r);const s=()=>{if(!a)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!D(this,xs).size)return!0;const f=new Set(c??D(this,xs));return this.options.throwOnError&&f.add("error"),Object.keys(D(this,qe)).some(h=>{const g=h;return D(this,qe)[g]!==a[g]&&f.has(g)})};At(this,Gt,ix).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&At(this,Gt,Kh).call(this)}},Ke=new WeakMap,Ut=new WeakMap,Io=new WeakMap,qe=new WeakMap,Zr=new WeakMap,ys=new WeakMap,or=new WeakMap,lr=new WeakMap,Jo=new WeakMap,bs=new WeakMap,Ss=new WeakMap,$r=new WeakMap,Ir=new WeakMap,ur=new WeakMap,xs=new WeakMap,Gt=new WeakSet,Ho=function(a){At(this,Gt,Ih).call(this);let r=D(this,Ut).fetch(this.options,a);return a!=null&&a.throwOnError||(r=r.catch(Ve)),r},Yh=function(){At(this,Gt,Zh).call(this);const a=hr(this.options.staleTime,D(this,Ut));if(ri||D(this,qe).isStale||!qh(a))return;const s=ZS(D(this,qe).dataUpdatedAt,a)+1;dt(this,$r,setTimeout(()=>{D(this,qe).isStale||this.updateResult()},s))},Qh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(D(this,Ut)):this.options.refetchInterval)??!1},Xh=function(a){At(this,Gt,$h).call(this),dt(this,ur,a),!(ri||zn(this.options.enabled,D(this,Ut))===!1||!qh(D(this,ur))||D(this,ur)===0)&&dt(this,Ir,setInterval(()=>{(this.options.refetchIntervalInBackground||km.isFocused())&&At(this,Gt,Ho).call(this)},D(this,ur)))},Kh=function(){At(this,Gt,Yh).call(this),At(this,Gt,Xh).call(this,At(this,Gt,Qh).call(this))},Zh=function(){D(this,$r)&&(clearTimeout(D(this,$r)),dt(this,$r,void 0))},$h=function(){D(this,Ir)&&(clearInterval(D(this,Ir)),dt(this,Ir,void 0))},Ih=function(){const a=D(this,Ke).getQueryCache().build(D(this,Ke),this.options);if(a===D(this,Ut))return;const r=D(this,Ut);dt(this,Ut,a),dt(this,Io,a.state),this.hasListeners()&&(r==null||r.removeObserver(this),a.addObserver(this))},ix=function(a){be.batch(()=>{a.listeners&&this.listeners.forEach(r=>{r(D(this,qe))}),D(this,Ke).getQueryCache().notify({query:D(this,Ut),type:"observerResultsUpdated"})})},yb);function a3(n,a){return zn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function ab(n,a){return a3(n,a)||n.state.data!==void 0&&Jh(n,a,a.refetchOnMount)}function Jh(n,a,r){if(zn(a.enabled,n)!==!1&&hr(a.staleTime,n)!=="static"){const s=typeof r=="function"?r(n):r;return s==="always"||s!==!1&&Pm(n,a)}return!1}function rb(n,a,r,s){return(n!==a||zn(s.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&Pm(n,r)}function Pm(n,a){return zn(a.enabled,n)!==!1&&n.isStaleByTime(hr(a.staleTime,n))}function r3(n,a){return!sc(n.getCurrentResult(),a)}var cr,fr,Ze,xa,_a,Fu,Wh,bb,i3=(bb=class extends Ls{constructor(r,s){super();bt(this,_a);bt(this,cr);bt(this,fr);bt(this,Ze);bt(this,xa);dt(this,cr,r),this.setOptions(s),this.bindMethods(),At(this,_a,Fu).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,cr).defaultMutationOptions(r),sc(this.options,s)||D(this,cr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:D(this,Ze),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&ii(s.mutationKey)!==ii(this.options.mutationKey)?this.reset():((l=D(this,Ze))==null?void 0:l.state.status)==="pending"&&D(this,Ze).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=D(this,Ze))==null||r.removeObserver(this)}onMutationUpdate(r){At(this,_a,Fu).call(this),At(this,_a,Wh).call(this,r)}getCurrentResult(){return D(this,fr)}reset(){var r;(r=D(this,Ze))==null||r.removeObserver(this),dt(this,Ze,void 0),At(this,_a,Fu).call(this),At(this,_a,Wh).call(this)}mutate(r,s){var l;return dt(this,xa,s),(l=D(this,Ze))==null||l.removeObserver(this),dt(this,Ze,D(this,cr).getMutationCache().build(D(this,cr),this.options)),D(this,Ze).addObserver(this),D(this,Ze).execute(r)}},cr=new WeakMap,fr=new WeakMap,Ze=new WeakMap,xa=new WeakMap,_a=new WeakSet,Fu=function(){var s;const r=((s=D(this,Ze))==null?void 0:s.state)??rx();dt(this,fr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Wh=function(r){be.batch(()=>{var s,l,c,f,h,g,m,v;if(D(this,xa)&&this.hasListeners()){const p=D(this,fr).variables,b=D(this,fr).context;(r==null?void 0:r.type)==="success"?((l=(s=D(this,xa)).onSuccess)==null||l.call(s,r.data,p,b),(f=(c=D(this,xa)).onSettled)==null||f.call(c,r.data,null,p,b)):(r==null?void 0:r.type)==="error"&&((g=(h=D(this,xa)).onError)==null||g.call(h,r.error,p,b),(v=(m=D(this,xa)).onSettled)==null||v.call(m,void 0,r.error,p,b))}this.listeners.forEach(p=>{p(D(this,fr))})})},bb),sx=E.createContext(void 0),ox=n=>{const a=E.useContext(sx);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},s3=({client:n,children:a})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),_.jsx(sx.Provider,{value:n,children:a})),lx=E.createContext(!1),o3=()=>E.useContext(lx);lx.Provider;function l3(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var u3=E.createContext(l3()),c3=()=>E.useContext(u3),f3=(n,a)=>{(n.suspense||n.throwOnError||n.experimental_prefetchInRender)&&(a.isReset()||(n.retryOnMount=!1))},d3=n=>{E.useEffect(()=>{n.clearReset()},[n])},h3=({result:n,errorResetBoundary:a,throwOnError:r,query:s,suspense:l})=>n.isError&&!a.isReset()&&!n.isFetching&&s&&(l&&n.data===void 0||JS(r,[n.error,s])),m3=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))}},p3=(n,a)=>n.isLoading&&n.isFetching&&!a,g3=(n,a)=>(n==null?void 0:n.suspense)&&a.isPending,ib=(n,a,r)=>a.fetchOptimistic(n).catch(()=>{r.clearReset()});function v3(n,a,r){var p,b,x,R,w;const s=ox(),l=o3(),c=c3(),f=s.defaultQueryOptions(n);(b=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||b.call(p,f),f._optimisticResults=l?"isRestoring":"optimistic",m3(f),f3(f,c),d3(c);const h=!s.getQueryCache().get(f.queryHash),[g]=E.useState(()=>new a(s,f)),m=g.getOptimisticResult(f),v=!l&&n.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(T=>{const A=v?g.subscribe(be.batchCalls(T)):Ve;return g.updateResult(),A},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),E.useEffect(()=>{g.setOptions(f)},[f,g]),g3(f,m))throw ib(f,g,c);if(h3({result:m,errorResetBoundary:c,throwOnError:f.throwOnError,query:s.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw m.error;if((R=(x=s.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||R.call(x,f,m),f.experimental_prefetchInRender&&!ri&&p3(m,l)){const T=h?ib(f,g,c):(w=s.getQueryCache().get(f.queryHash))==null?void 0:w.promise;T==null||T.catch(Ve).finally(()=>{g.updateResult()})}return f.notifyOnChangeProps?m:g.trackResult(m)}function y3(n,a){return v3(n,n3)}function b3(n,a){const r=ox(),[s]=E.useState(()=>new i3(r,n));E.useEffect(()=>{s.setOptions(n)},[s,n]);const l=E.useSyncExternalStore(E.useCallback(f=>s.subscribe(be.batchCalls(f)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),c=E.useCallback((f,h)=>{s.mutate(f,h).catch(Ve)},[s]);if(l.error&&JS(s.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}function S3(){return _.jsx("div",{className:"h-screen grid place-items-center",children:_.jsx(Vb,{className:"size-8 animate-spin"})})}function x3({className:n,...a}){const{setAuthenticated:r}=KS(),[s,l]=E.useState(""),[c,f]=E.useState(""),h=zm(),{isPending:g,mutate:m}=b3({mutationFn:async()=>h.login(s,c),onError(){K0.error("Invalid credentials",{description:"The credentials you provided are invalid."})},onSuccess(){K0.success("Login successful",{description:"You have successfully logged in."}),r(!0)}});return g?_.jsx(S3,{}):_.jsx("div",{className:Ot("flex flex-col gap-6 w-[20%]",n),...a,children:_.jsxs(nM,{children:[_.jsxs(aM,{children:[_.jsx(rM,{className:"text-2xl",children:"Login"}),_.jsx(iM,{children:"Enter your credentials below to proceed"})]}),_.jsx(sM,{children:_.jsxs("div",{className:"flex flex-col gap-6",children:[_.jsxs("div",{className:"grid gap-2",children:[_.jsx(Y0,{htmlFor:"username",children:"Username"}),_.jsx(l0,{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(Y0,{htmlFor:"password",children:"Password"})}),_.jsx(l0,{id:"password",type:"password",required:!0,value:c,onChange:v=>f(v.target.value)})]}),_.jsx(i1,{type:"button",className:"w-full",onClick:()=>{m()},children:"Login"})]})})]})})}function w3({children:n}){const{authenticated:a,setAuthenticated:r}=KS(),s=zm(),{isLoading:l,isError:c}=y3({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(Vb,{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(x3,{})})}function E3({...n}){return _.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...n})}function R3({className:n,...a}){return _.jsx("ol",{"data-slot":"breadcrumb-list",className:Ot("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",n),...a})}function vh({className:n,...a}){return _.jsx("li",{"data-slot":"breadcrumb-item",className:Ot("inline-flex items-center gap-1.5",n),...a})}function sb({asChild:n,className:a,...r}){const s=n?el:"a";return _.jsx(s,{"data-slot":"breadcrumb-link",className:Ot("hover:text-foreground transition-colors",a),...r})}function _3({className:n,...a}){return _.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ot("text-foreground font-normal",n),...a})}function ob({children:n,className:a,...r}){return _.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ot("[&>svg]:size-3.5",a),...r,children:n??_.jsx(eR,{})})}function T3(){const{toggleSidebar:n}=Am();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(i1,{className:"h-8 w-8",variant:"ghost",size:"icon",onClick:n,children:_.jsx(aR,{})}),_.jsx(D_,{orientation:"vertical",className:"mr-2 h-4"}),_.jsx(E3,{className:"hidden sm:block",children:_.jsxs(R3,{children:[_.jsx(vh,{children:_.jsx(sb,{href:"#",children:"/"})}),_.jsx(ob,{}),_.jsx(vh,{children:_.jsx(_3,{children:"CommandKit"})}),_.jsx(ob,{}),_.jsx(vh,{children:_.jsx(sb,{href:"#",children:"DevTools"})})]})})]})})}var C3=(n,a,r,s,l,c,f,h)=>{let g=document.documentElement,m=["light","dark"];function v(x){(Array.isArray(n)?n:[n]).forEach(R=>{let w=R==="class",T=w&&c?l.map(A=>c[A]||A):l;w?(g.classList.remove(...T),g.classList.add(c&&c[x]?c[x]:x)):g.setAttribute(R,x)}),p(x)}function p(x){h&&m.includes(x)&&(g.style.colorScheme=x)}function b(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)v(s);else try{let x=localStorage.getItem(a)||r,R=f&&x==="system"?b():x;v(R)}catch{}},lb=["light","dark"],ux="(prefers-color-scheme: dark)",A3=typeof window>"u",Hm=E.createContext(void 0),O3={setTheme:n=>{},themes:[]},M3=()=>{var n;return(n=E.useContext(Hm))!=null?n:O3},D3=n=>E.useContext(Hm)?E.createElement(E.Fragment,null,n.children):E.createElement(j3,{...n}),N3=["light","dark"],j3=({forcedTheme:n,disableTransitionOnChange:a=!1,enableSystem:r=!0,enableColorScheme:s=!0,storageKey:l="theme",themes:c=N3,defaultTheme:f=r?"system":"light",attribute:h="data-theme",value:g,children:m,nonce:v,scriptProps:p})=>{let[b,x]=E.useState(()=>z3(l,f)),[R,w]=E.useState(()=>b==="system"?yh():b),T=g?Object.values(g):c,A=E.useCallback(B=>{let P=B;if(!P)return;B==="system"&&r&&(P=yh());let Q=g?g[P]:P,N=a?U3(v):null,U=document.documentElement,at=rt=>{rt==="class"?(U.classList.remove(...T),Q&&U.classList.add(Q)):rt.startsWith("data-")&&(Q?U.setAttribute(rt,Q):U.removeAttribute(rt))};if(Array.isArray(h)?h.forEach(at):at(h),s){let rt=lb.includes(f)?f:null,W=lb.includes(P)?P:rt;U.style.colorScheme=W}N==null||N()},[v]),L=E.useCallback(B=>{let P=typeof B=="function"?B(b):B;x(P);try{localStorage.setItem(l,P)}catch{}},[b]),z=E.useCallback(B=>{let P=yh(B);w(P),b==="system"&&r&&!n&&A("system")},[b,n]);E.useEffect(()=>{let B=window.matchMedia(ux);return B.addListener(z),z(B),()=>B.removeListener(z)},[z]),E.useEffect(()=>{let B=P=>{P.key===l&&(P.newValue?x(P.newValue):L(f))};return window.addEventListener("storage",B),()=>window.removeEventListener("storage",B)},[L]),E.useEffect(()=>{A(n??b)},[n,b]);let G=E.useMemo(()=>({theme:b,setTheme:L,forcedTheme:n,resolvedTheme:b==="system"?R:b,themes:r?[...c,"system"]:c,systemTheme:r?R:void 0}),[b,L,n,R,r,c]);return E.createElement(Hm.Provider,{value:G},E.createElement(L3,{forcedTheme:n,storageKey:l,attribute:h,enableSystem:r,enableColorScheme:s,defaultTheme:f,value:g,themes:c,nonce:v,scriptProps:p}),m)},L3=E.memo(({forcedTheme:n,storageKey:a,attribute:r,enableSystem:s,enableColorScheme:l,defaultTheme:c,value:f,themes:h,nonce:g,scriptProps:m})=>{let v=JSON.stringify([r,a,c,n,h,f,s,l]).slice(1,-1);return E.createElement("script",{...m,suppressHydrationWarning:!0,nonce:typeof window>"u"?g:"",dangerouslySetInnerHTML:{__html:`(${C3.toString()})(${v})`}})}),z3=(n,a)=>{if(A3)return;let r;try{r=localStorage.getItem(n)||void 0}catch{}return r||a},U3=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)}},yh=n=>(n||(n=window.matchMedia(ux)),n.matches?"dark":"light");const B3=({...n})=>{const{theme:a="system"}=M3();return _.jsx(PM,{theme:a,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...n})},oi=q2({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"CommandKit DevTools"}]}),component:k3});function k3(){return _.jsxs(D3,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!1,children:[_.jsx(B3,{}),_.jsx(tM,{children:_.jsx(w3,{children:_.jsx("div",{className:"[--header-height:calc(theme(spacing.14))]",children:_.jsxs(KA,{className:"flex flex-col",children:[_.jsx(T3,{}),_.jsxs("div",{className:"flex flex-1",children:[_.jsx(eM,{}),_.jsx($A,{children:_.jsx(am,{})})]})]})})})})]})}const P3="modulepreload",H3=function(n){return"/"+n},ub={},zs=function(a,r,s){let l=Promise.resolve();if(r&&r.length>0){let f=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};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(m=>{if(m=H3(m),m in ub)return;ub[m]=!0;const v=m.endsWith(".css"),p=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${p}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":P3,v||(b.as="script"),b.crossOrigin="",b.href=m,g&&b.setAttribute("nonce",g),document.head.appendChild(b),v)return new Promise((x,R)=>{b.addEventListener("load",x),b.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${m}`)))})}))}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)})},q3=()=>zs(()=>import("./plugins-C3wg1M3F.js"),[]),cx=Ts("/plugins")({component:Cs(q3,"component",()=>cx.ssr)}),V3=()=>zs(()=>import("./guilds-6si6mkna.js"),[]),fx=Ts("/guilds")({component:Cs(V3,"component",()=>fx.ssr)}),G3=()=>zs(()=>import("./feature-flags-D3jXHH1t.js"),[]),dx=Ts("/feature-flags")({component:Cs(G3,"component",()=>dx.ssr)}),F3=()=>zs(()=>import("./events-D2Cn1FiQ.js"),[]),hx=Ts("/events")({component:Cs(F3,"component",()=>hx.ssr)}),Y3=()=>zs(()=>import("./commands-BAdI_8ju.js"),[]),mx=Ts("/commands")({component:Cs(Y3,"component",()=>mx.ssr)}),Q3=()=>zs(()=>import("./index-4xIlXKyv.js"),[]),px=Ts("/")({component:Cs(Q3,"component",()=>px.ssr)}),X3=cx.update({id:"/plugins",path:"/plugins",getParentRoute:()=>oi}),K3=fx.update({id:"/guilds",path:"/guilds",getParentRoute:()=>oi}),Z3=dx.update({id:"/feature-flags",path:"/feature-flags",getParentRoute:()=>oi}),$3=hx.update({id:"/events",path:"/events",getParentRoute:()=>oi}),I3=mx.update({id:"/commands",path:"/commands",getParentRoute:()=>oi}),J3=px.update({id:"/",path:"/",getParentRoute:()=>oi}),W3={IndexRoute:J3,CommandsRoute:I3,EventsRoute:$3,FeatureFlagsRoute:Z3,GuildsRoute:K3,PluginsRoute:X3},tD=oi._addFileChildren(W3)._addFileTypes(),eD=F2({routeTree:tD,defaultPreload:"intent",defaultStaleTime:5e3,scrollRestoration:!0,defaultViewTransition:!0}),nD=new e3;zE.createRoot(document.getElementById("root")).render(_.jsx(E.StrictMode,{children:_.jsx(s3,{client:nD,children:_.jsx(X2,{router:eD})})}));export{mO as A,yO as B,nM as C,S3 as L,y3 as a,aM as b,pO as c,gO as d,sM as e,rM as f,Sb as g,iM as h,vr as i,_ as j,eR as k,AD as l,_s as m,i1 as n,E as r,zm 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-QRiOOnxJ.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};
1
+ import{g as X,u as tt,a as et,j as y,L as nt,B as rt}from"./index-IGsUAs4N.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-QRiOOnxJ.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-IGsUAs4N.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-D2XYo2en.css">
16
16
  </head>
17
17
  <body>