@kaitranntt/ccs 6.1.0-dev.2 → 6.1.0-dev.4

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.
Files changed (39) hide show
  1. package/VERSION +1 -1
  2. package/config/base-agy.settings.json +1 -1
  3. package/dist/cliproxy/model-config.d.ts.map +1 -1
  4. package/dist/cliproxy/model-config.js +1 -28
  5. package/dist/cliproxy/model-config.js.map +1 -1
  6. package/dist/ui/assets/accounts-BxzFSV6G.js +1 -0
  7. package/dist/ui/assets/analytics-CUMEmMmd.js +1 -0
  8. package/dist/ui/assets/api-ha2YIDmE.js +1 -0
  9. package/dist/ui/assets/{card-DtuB-tY2.js → card-z-W54K6T.js} +1 -1
  10. package/dist/ui/assets/charts-D_0N6JY8.js +64 -0
  11. package/dist/ui/assets/cliproxy-DeGbgy_I.js +1 -0
  12. package/dist/ui/assets/{cliproxy-control-panel-CCHewXLy.js → cliproxy-control-panel-vWvhZC3D.js} +1 -1
  13. package/dist/ui/assets/{code-editor-DrGnSi2g.js → code-editor-iaBb4ebN.js} +2 -2
  14. package/dist/ui/assets/code-highlight-C2TXE0-z.js +3 -0
  15. package/dist/ui/assets/{form-utils-CKETQmt9.js → form-utils-BXvNPyud.js} +1 -1
  16. package/dist/ui/assets/health-BsI6aKz3.js +1 -0
  17. package/dist/ui/assets/icons-DQ69xQew.js +1 -0
  18. package/dist/ui/assets/index-B_TDeSrG.js +44 -0
  19. package/dist/ui/assets/index-D6QWrdkq.css +1 -0
  20. package/dist/ui/assets/notifications-cqk-Qeo2.js +1 -0
  21. package/dist/ui/assets/radix-ui-VbLlN_Dz.js +51 -0
  22. package/dist/ui/assets/{react-vendor-DadlvKzT.js → react-vendor-DMek_JCF.js} +1 -1
  23. package/dist/ui/assets/settings-C0Gs0aA_.js +1 -0
  24. package/dist/ui/assets/shared-BWnoc9D5.js +1 -0
  25. package/dist/ui/assets/{tanstack-DZ3a6J0N.js → tanstack-yybD444-.js} +1 -1
  26. package/dist/ui/assets/utils-CzKF5WmX.js +1 -0
  27. package/dist/ui/index.html +10 -7
  28. package/package.json +1 -1
  29. package/dist/ui/assets/accounts-DjGgiBaT.js +0 -1
  30. package/dist/ui/assets/analytics-BMXXbe7n.js +0 -64
  31. package/dist/ui/assets/api-BxYCjnbV.js +0 -1
  32. package/dist/ui/assets/cliproxy-C7H0ktJS.js +0 -1
  33. package/dist/ui/assets/health-CUiIrsfV.js +0 -1
  34. package/dist/ui/assets/icons-CPPxUvb4.js +0 -1
  35. package/dist/ui/assets/index-BBNncLQd.js +0 -46
  36. package/dist/ui/assets/index-CbKJobGP.css +0 -1
  37. package/dist/ui/assets/radix-ui-Bhyw9pC9.js +0 -51
  38. package/dist/ui/assets/settings-D8SKgj9M.js +0 -1
  39. package/dist/ui/assets/shared-BSXhYf5P.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e,a8 as ie,a9 as oe}from"./radix-ui-VbLlN_Dz.js";import{r}from"./react-vendor-DMek_JCF.js";import{c as q,R as de,T as D,U as ce,V as me,i as xe,B as j,I as K,W as pe}from"./index-B_TDeSrG.js";import{CodeEditor as he}from"./code-editor-iaBb4ebN.js";import{m as u,a9 as ue,a4 as ge,h as be,V as z,s as L,r as R,a6 as F,g as fe,aa as J,k as je,l as Ne}from"./icons-DQ69xQew.js";import"./tanstack-yybD444-.js";import"./notifications-cqk-Qeo2.js";import"./utils-CzKF5WmX.js";import"./form-utils-BXvNPyud.js";import"./code-highlight-C2TXE0-z.js";function H({className:a,...d}){return e.jsx(ie,{"data-slot":"switch",className:q("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",a),...d,children:e.jsx(oe,{"data-slot":"switch-thumb",className:q("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Le(){const[a,d]=r.useState(null),[N,M]=r.useState(!0),[c,O]=r.useState(!1),[v,g]=r.useState(null),[$,T]=r.useState(!1),[n,X]=r.useState(null),[m,A]=r.useState(!0),[x,b]=r.useState(null),[w,P]=r.useState(!1),[Y,V]=r.useState(!1),[k,W]=r.useState(""),[y,_]=r.useState(""),[C,Z]=r.useState(!1),[S,Q]=r.useState(!1),[E,ee]=r.useState(!1);r.useEffect(()=>{B(),U(),G()},[]),r.useEffect(()=>{a&&(W(a.providers?.gemini?.model??"gemini-2.5-flash"),_(a.providers?.opencode?.model??"opencode/grok-code"))},[a]);const B=async()=>{try{M(!0),g(null);const s=await fetch("/api/websearch");if(!s.ok)throw new Error("Failed to load WebSearch config");const t=await s.json();d(t)}catch(s){g(s.message)}finally{M(!1)}},U=async()=>{try{A(!0);const s=await fetch("/api/websearch/status");if(!s.ok)throw new Error("Failed to load status");const t=await s.json();X(t)}catch(s){console.error("Failed to fetch WebSearch status:",s)}finally{A(!1)}},G=async()=>{try{P(!0);const s=await fetch("/api/config/raw");if(!s.ok){b(null);return}const t=await s.text();b(t)}catch(s){console.error("Failed to fetch raw config:",s),b(null)}finally{P(!1)}},se=async()=>{if(x)try{await navigator.clipboard.writeText(x),V(!0),setTimeout(()=>V(!1),2e3)}catch(s){console.error("Failed to copy:",s)}},te=()=>{const s=a?.providers||{},t=s.gemini?.enabled??!1,i=s.grok?.enabled??!1,I=s.opencode?.enabled??!1;p({enabled:!t||i||I,providers:{...s,gemini:{...s.gemini,enabled:!t}}})},p=async s=>{if(!a)return;const t={...a,...s};d(t);try{O(!0),g(null);const i=await fetch("/api/websearch",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){const o=await i.json();throw new Error(o.error||"Failed to save")}const I=await i.json();d(I.websearch),T(!0),setTimeout(()=>T(!1),1500),fetch("/api/config/raw").then(o=>o.ok?o.text():null).then(o=>o&&b(o)).catch(()=>{})}catch(i){d(a),g(i.message)}finally{O(!1)}},l=a?.providers?.gemini?.enabled??!1,f=a?.providers?.grok?.enabled??!1,h=a?.providers?.opencode?.enabled??!1,ae=()=>{const s=a?.providers||{},t=s.grok?.enabled??!1;p({enabled:l||!t||h,providers:{...s,grok:{...s.grok,enabled:!t}}})},re=()=>{const s=a?.providers||{},t=s.opencode?.enabled??!1;p({enabled:l||f||!t,providers:{...s,opencode:{...s.opencode,enabled:!t}}})},ne=()=>{const s=a?.providers?.gemini?.model??"gemini-2.5-flash";if(k!==s){const t=a?.providers||{};p({providers:{...t,gemini:{...t.gemini,model:k}}})}},le=()=>{const s=a?.providers?.opencode?.model??"opencode/grok-code";if(y!==s){const t=a?.providers||{};p({providers:{...t,opencode:{...t.opencode,model:y}}})}};return N?e.jsx("div",{className:"h-[calc(100vh-100px)] flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(u,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{className:"text-lg",children:"Loading configuration..."})]})}):e.jsx("div",{className:"h-[calc(100vh-100px)]",children:e.jsxs(de,{direction:"horizontal",className:"h-full",children:[e.jsx(D,{defaultSize:40,minSize:30,maxSize:55,children:e.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[e.jsx("div",{className:"p-5 border-b bg-background",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ue,{className:"w-6 h-6 text-primary"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold",children:"WebSearch"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"CLI-based web search for third-party profiles"})]})]})}),e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${v||$?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[v&&e.jsxs(ce,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(ge,{className:"h-4 w-4"}),e.jsx(me,{children:v})]}),$&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(be,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(xe,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:l?"WebSearch enabled":"WebSearch disabled"}),m?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking status..."}):n?.readiness?e.jsx("p",{className:"text-sm text-muted-foreground",children:n.readiness.message}):null]}),e.jsx(j,{variant:"ghost",size:"sm",onClick:U,disabled:m,children:e.jsx(u,{className:`w-4 h-4 ${m?"animate-spin":""}`})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Providers"}),e.jsxs("div",{className:`rounded-lg border transition-colors ${l?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${l?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"gemini"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),n?.geminiCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Google Gemini CLI (1000 req/day free)"})]})]}),e.jsx(H,{checked:l,onCheckedChange:te,disabled:c||!n?.geminiCli?.installed})]}),l&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx(K,{value:k,onChange:s=>W(s.target.value),onBlur:ne,placeholder:"gemini-2.5-flash",className:"h-8 text-sm font-mono",disabled:c})]})}),!n?.geminiCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>Z(!C),className:"flex items-center gap-2 text-sm text-amber-600 dark:text-amber-400 hover:underline w-full py-2",children:[C?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install Gemini CLI"]}),C&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-amber-50 dark:bg-amber-900/20 text-sm",children:[e.jsx("p",{className:"text-amber-700 dark:text-amber-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-amber-100 dark:bg-amber-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @google/gemini-cli"}),e.jsxs("a",{href:"https://github.com/google-gemini/gemini-cli",target:"_blank",rel:"noopener noreferrer",className:"text-amber-700 dark:text-amber-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${h?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${h?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"opencode"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),n?.opencodeCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"OpenCode (web search via Zen)"})]})]}),e.jsx(H,{checked:h,onCheckedChange:re,disabled:c||!n?.opencodeCli?.installed})]}),h&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx(K,{value:y,onChange:s=>_(s.target.value),onBlur:le,placeholder:"opencode/grok-code",className:"h-8 text-sm font-mono",disabled:c})]})}),!n?.opencodeCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>Q(!S),className:"flex items-center gap-2 text-sm text-purple-600 dark:text-purple-400 hover:underline w-full py-2",children:[S?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install OpenCode"]}),S&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-purple-50 dark:bg-purple-900/20 text-sm",children:[e.jsx("p",{className:"text-purple-700 dark:text-purple-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-purple-100 dark:bg-purple-900/40 px-2 py-1 rounded font-mono block mb-2",children:"curl -fsSL https://opencode.ai/install | bash"}),e.jsxs("a",{href:"https://github.com/sst/opencode",target:"_blank",rel:"noopener noreferrer",className:"text-purple-700 dark:text-purple-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${f?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${f?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"grok"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 font-medium",children:"GROK_API_KEY"}),n?.grokCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"xAI Grok CLI (web + X search)"})]})]}),e.jsx(H,{checked:f,onCheckedChange:ae,disabled:c||!n?.grokCli?.installed})]}),!n?.grokCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>ee(!E),className:"flex items-center gap-2 text-sm text-blue-600 dark:text-blue-400 hover:underline w-full py-2",children:[E?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install Grok CLI"]}),E&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-blue-50 dark:bg-blue-900/20 text-sm",children:[e.jsx("p",{className:"text-blue-700 dark:text-blue-300 mb-2",children:"Install globally (requires xAI API key):"}),e.jsx("code",{className:"text-sm bg-blue-100 dark:bg-blue-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @vibe-kit/grok-cli"}),e.jsxs("a",{href:"https://github.com/superagent-ai/grok-cli",target:"_blank",rel:"noopener noreferrer",className:"text-blue-700 dark:text-blue-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>{B(),G()},disabled:N||c,className:"w-full",children:[e.jsx(u,{className:`w-4 h-4 mr-2 ${N?"animate-spin":""}`}),"Refresh"]})})]})}),e.jsx(pe,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:e.jsx(fe,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),e.jsx(D,{defaultSize:60,minSize:35,children:e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(J,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold",children:"config.yaml"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{variant:"outline",size:"sm",onClick:se,disabled:!x,children:Y?e.jsxs(e.Fragment,{children:[e.jsx(je,{className:"w-4 h-4 mr-1"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 mr-1"}),"Copy"]})}),e.jsx(j,{variant:"outline",size:"sm",onClick:G,disabled:w,children:e.jsx(u,{className:`w-4 h-4 ${w?"animate-spin":""}`})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:w?e.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[e.jsx(u,{className:"w-5 h-5 animate-spin mr-2"}),"Loading..."]}):x?e.jsx(he,{value:x,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx(J,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"Config file not found"}),e.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})})}export{Le as SettingsPage};
@@ -0,0 +1 @@
1
+ import{j as s}from"./radix-ui-VbLlN_Dz.js";import{r as o}from"./react-vendor-DMek_JCF.js";import{C as l,a as m}from"./card-z-W54K6T.js";import{_ as c,$ as x,U as u,a0 as h,V as p,B as g}from"./index-B_TDeSrG.js";import{D as j,t as f,ad as N,T as b}from"./icons-DQ69xQew.js";import"./tanstack-yybD444-.js";import"./notifications-cqk-Qeo2.js";import"./utils-CzKF5WmX.js";import"./form-utils-BXvNPyud.js";import"./code-highlight-C2TXE0-z.js";function R(){const[t,r]=o.useState("commands"),{data:e}=c(),{data:n,isLoading:i}=x(t),d=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:N,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(u,{variant:"warning",children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx(h,{children:"Configuration Required"}),s.jsxs(p,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:d.map(a=>s.jsxs(g,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>r(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:i?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(l,{children:s.jsxs(m,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{R as SharedPage};
@@ -1,4 +1,4 @@
1
- import{r as w}from"./react-vendor-DadlvKzT.js";import{j as ot}from"./radix-ui-Bhyw9pC9.js";var j=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ut={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lt=class{#e=ut;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},z=new lt;function at(e){setTimeout(e,0)}var q=typeof window>"u"||"Deno"in globalThis;function x(){}function ct(e,t){return typeof e=="function"?e(t):e}function le(e){return typeof e=="number"&&e>=0&&e!==1/0}function be(e,t){return Math.max(e+(t||0)-Date.now(),0)}function L(e,t){return typeof e=="function"?e(t):e}function E(e,t){return typeof e=="function"?e(t):e}function Me(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:o,stale:u}=e;if(o){if(i){if(t.queryHash!==Ce(o,t.options))return!1}else if(!N(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||s&&s!==t.state.fetchStatus||r&&!r(t))}function Ie(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(Q(t.options.mutationKey)!==Q(r))return!1}else if(!N(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Ce(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(t,n)=>ae(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function N(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>N(e[n],t[n])):!1}var dt=Object.prototype.hasOwnProperty;function ze(e,t){if(e===t)return e;const n=xe(e)&&xe(t);if(!n&&!(ae(e)&&ae(t)))return t;const s=(n?e:Object.keys(e)).length,r=n?t:Object.keys(t),o=r.length,u=n?new Array(o):{};let l=0;for(let a=0;a<o;a++){const c=n?a:r[a],p=e[c],g=t[c];if(p===g){u[c]=p,(n?a<s:dt.call(e,c))&&l++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[c]=g;continue}const d=ze(p,g);u[c]=d,d===p&&l++}return s===o&&l===s?e:u}function Z(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function xe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ae(e){if(!$e(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$e(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $e(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return new Promise(t=>{z.setTimeout(t,e)})}function ce(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ze(e,t):t}function ft(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function ht(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var ye=Symbol();function qe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ye?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qe(e,t){return typeof e=="function"?e(...t):!!e}var pt=class extends j{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!q&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Re=new pt;function de(){let e,t;const n=new Promise((s,r)=>{e=s,t=r});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var mt=at;function vt(){let e=[],t=0,n=u=>{u()},i=u=>{u()},s=mt;const r=u=>{t?e.push(u):s(()=>{n(u)})},o=()=>{const u=e;e=[],u.length&&s(()=>{i(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;t++;try{l=u()}finally{t--,t||o()}return l},batchCalls:u=>(...l)=>{r(()=>{u(...l)})},schedule:r,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{s=u}}}var F=vt(),St=class extends j{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!q&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Y=new St;function Ct(e){return Math.min(1e3*2**e,3e4)}function Ue(e){return(e??"online")==="online"?Y.isOnline():!0}var ge=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function je(e){let t=!1,n=0,i;const s=de(),r=()=>s.status!=="pending",o=f=>{if(!r()){const C=new ge(f);g(C),e.onCancel?.(C)}},u=()=>{t=!0},l=()=>{t=!1},a=()=>Re.isFocused()&&(e.networkMode==="always"||Y.isOnline())&&e.canRun(),c=()=>Ue(e.networkMode)&&e.canRun(),p=f=>{r()||(i?.(),s.resolve(f))},g=f=>{r()||(i?.(),s.reject(f))},d=()=>new Promise(f=>{i=C=>{(r()||a())&&f(C)},e.onPause?.()}).then(()=>{i=void 0,r()||e.onContinue?.()}),h=()=>{if(r())return;let f;const C=n===0?e.initialPromise:void 0;try{f=C??e.fn()}catch(m){f=Promise.reject(m)}Promise.resolve(f).then(p).catch(m=>{if(r())return;const R=e.retry??(q?0:3),y=e.retryDelay??Ct,_=typeof y=="function"?y(n,m):y,M=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,m);if(t||!M){g(m);return}n++,e.onFail?.(n,m),gt(_).then(()=>a()?void 0:d()).then(()=>{t?g(m):h()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(i?.(),s),cancelRetry:u,continueRetry:l,canStart:c,start:()=>(c()?h():d().then(h),s)}}var ke=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),le(this.gcTime)&&(this.#e=z.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(q?1/0:300*1e3))}clearGcTimeout(){this.#e&&(z.clearTimeout(this.#e),this.#e=void 0)}},yt=class extends ke{#e;#t;#n;#s;#i;#o;#u;constructor(e){super(),this.#u=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ee(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ee(this.options);t.data!==void 0&&(this.setState(Oe(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ce(this.state.data,e,this.options);return this.#r({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#r({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(x).catch(x):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>E(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ye||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>L(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!be(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#u?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(l=>l.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#u=!0,n.signal)})},s=()=>{const u=qe(this.options,t),a=(()=>{const c={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(c),c})();return this.#u=!1,this.options.persister?this.options.persister(u,a,this):u(a)},o=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return i(u),u})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#r({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=je({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:u=>{u instanceof ge&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,l)=>{this.#r({type:"failed",failureCount:u,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const u=await this.#i.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof ge){if(u.silent)return this.#i.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#r({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Be(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...Oe(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),F.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ue(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Oe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ee(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Rt=class extends j{constructor(e,t){super(),this.options=t,this.#e=e,this.#r=null,this.#u=de(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#i;#o;#u;#r;#p;#g;#f;#a;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ve(this.#t,this.options)?this.#d():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#R(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof E(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Z(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&De(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||L(this.options.staleTime,this.#t)!==L(t.staleTime,this.#t))&&this.#m();const s=this.#v();i&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||s!==this.#l)&&this.#S(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ft(this,n)&&(this.#s=n,this.#o=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#u.status==="pending"&&this.#u.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(x)),t}#m(){this.#y();const e=L(this.options.staleTime,this.#t);if(q||this.#s.isStale||!le(e))return;const n=be(this.#s.dataUpdatedAt,e)+1;this.#a=z.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#l=e,!(q||E(this.options.enabled,this.#t)===!1||!le(this.#l)||this.#l===0)&&(this.#c=z.setInterval(()=>{(this.options.refetchIntervalInBackground||Re.isFocused())&&this.#d()},this.#l))}#C(){this.#m(),this.#S(this.#v())}#y(){this.#a&&(z.clearTimeout(this.#a),this.#a=void 0)}#R(){this.#c&&(z.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#s,r=this.#i,o=this.#o,l=e!==n?e.state:this.#n,{state:a}=e;let c={...a},p=!1,g;if(t._optimisticResults){const I=this.hasListeners(),U=!I&&Ve(e,t),A=I&&De(e,n,t,i);(U||A)&&(c={...c,...Be(a.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:h,status:f}=c;g=c.data;let C=!1;if(t.placeholderData!==void 0&&g===void 0&&f==="pending"){let I;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(I=s.data,C=!0):I=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,I!==void 0&&(f="success",g=ce(s?.data,I,t),p=!0)}if(t.select&&g!==void 0&&!C)if(s&&g===r?.data&&t.select===this.#p)g=this.#g;else try{this.#p=t.select,g=t.select(g),g=ce(s?.data,g,t),this.#g=g,this.#r=null}catch(I){this.#r=I}this.#r&&(d=this.#r,g=this.#g,h=Date.now(),f="error");const m=c.fetchStatus==="fetching",R=f==="pending",y=f==="error",_=R&&m,M=g!==void 0,$={status:f,fetchStatus:c.fetchStatus,isPending:R,isSuccess:f==="success",isError:y,isInitialLoading:_,isLoading:_,data:g,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:y&&!M,isPaused:c.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:y&&M,isStale:we(e,t),refetch:this.refetch,promise:this.#u,isEnabled:E(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=b=>{$.status==="error"?b.reject($.error):$.data!==void 0&&b.resolve($.data)},U=()=>{const b=this.#u=$.promise=de();I(b)},A=this.#u;switch(A.status){case"pending":e.queryHash===n.queryHash&&I(A);break;case"fulfilled":($.status==="error"||$.data!==A.value)&&U();break;case"rejected":($.status!=="error"||$.error!==A.reason)&&U();break}}return $}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#f=this.#t),Z(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#h.size)return!0;const r=new Set(s??this.#h);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(o=>{const u=o;return this.#s[u]!==e[u]&&r.has(u)})};this.#F({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#F(e){F.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function wt(e,t){return E(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ve(e,t){return wt(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,n){if(E(t.enabled,e)!==!1&&L(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&we(e,t)}return!1}function De(e,t,n,i){return(e!==t||E(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&we(e,n)}function we(e,t){return E(t.enabled,e)!==!1&&e.isStaleByTime(L(t.staleTime,e))}function Ft(e,t){return!Z(e.getCurrentResult(),t)}function Ae(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let c=!1;const p=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},g=qe(t.options,t.fetchOptions),d=async(h,f,C)=>{if(c)return Promise.reject();if(f==null&&h.pages.length)return Promise.resolve(h);const R=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:f,direction:C?"backward":"forward",meta:t.options.meta};return p(T),T})(),y=await g(R),{maxPages:_}=t.options,M=C?ht:ft;return{pages:M(h.pages,y,_),pageParams:M(h.pageParams,f,_)}};if(s&&r.length){const h=s==="backward",f=h?_t:He,C={pages:r,pageParams:o},m=f(i,C);u=await d(C,m,h)}else{const h=e??r.length;do{const f=l===0?o[0]??i.initialPageParam:He(i,u);if(l>0&&f==null)break;u=await d(u,f),l++}while(l<h)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=a}}}function He(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function _t(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pt=class extends ke{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ne(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=je({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#i({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#s.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#i({type:"success",data:r}),r}catch(r){try{throw await this.#n.config.onError?.(r,e,this.state.context,this,n),await this.options.onError?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,r,e,this.state.context,n),r}finally{this.#i({type:"error",error:r})}}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),F.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Ne(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt=class extends j{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new Pt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=K(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=K(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=K(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=K(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ie(t,n))}findAll(e={}){return this.getAll().filter(t=>Ie(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(x))))}};function K(e){return e.options.scope?.id}var It=class extends j{#e;#t=void 0;#n;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),Z(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){const e=this.#n?.state??Ne();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#o(e){F.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#s.onSuccess?.(e.data,t,n,i),this.#s.onSettled?.(e.data,null,t,n,i)):e?.type==="error"&&(this.#s.onError?.(e.error,t,n,i),this.#s.onSettled?.(void 0,e.error,t,n,i))}this.listeners.forEach(t=>{t(this.#t)})})}},xt=class extends j{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Ce(i,t);let r=this.get(s);return r||(r=new yt({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(r)),r}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Me(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Me(e,n)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vn=class{#e;#t;#n;#s;#i;#o;#u;#r;constructor(e={}){this.#e=e.queryCache||new xt,this.#t=e.mutationCache||new Mt,this.#n=e.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#u=Re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Y.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#u?.(),this.#u=void 0,this.#r?.(),this.#r=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(L(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#e.get(i.queryHash)?.state.data,o=ct(t,r);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;F.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return F.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=F.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(x).catch(x)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=F.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(x)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(x)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(L(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(x).catch(x)}fetchInfiniteQuery(e){return e.behavior=Ae(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(x).catch(x)}ensureInfiniteQueryData(e){return e.behavior=Ae(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Y.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(i=>{N(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{N(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ce(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ye&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ke=w.createContext(void 0),Xe=e=>{const t=w.useContext(Ke);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Dn=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),ot.jsx(Ke.Provider,{value:e,children:t})),We=w.createContext(!1),$t=()=>w.useContext(We);We.Provider;function Ot(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Et=w.createContext(Ot()),Vt=()=>w.useContext(Et),Dt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},At=e=>{w.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Qe(n,[e.error,i])),Lt=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Gt=(e,t)=>e.isLoading&&e.isFetching&&!t,Tt=(e,t)=>e?.suspense&&t.isPending,Le=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bt(e,t,n){const i=$t(),s=Vt(),r=Xe(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",Lt(o),Dt(o,s),At(s);const u=!r.getQueryCache().get(o.queryHash),[l]=w.useState(()=>new t(r,o)),a=l.getOptimisticResult(o),c=!i&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(p=>{const g=c?l.subscribe(F.batchCalls(p)):x;return l.updateResult(),g},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(o)},[o,l]),Tt(o,a))throw Le(o,l,s);if(Ht({result:a,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw a.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,a),o.experimental_prefetchInRender&&!q&&Gt(a,i)&&(u?Le(o,l,s):r.getQueryCache().get(o.queryHash)?.promise)?.catch(x).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?a:l.trackResult(a)}function An(e,t){return bt(e,Rt)}function Hn(e,t){const n=Xe(),[i]=w.useState(()=>new It(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const s=w.useSyncExternalStore(w.useCallback(o=>i.subscribe(F.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=w.useCallback((o,u)=>{i.mutate(o,u).catch(x)},[i]);if(s.error&&Qe(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function H(e,t){return typeof e=="function"?e(t):e}function O(e,t){return n=>{t.setState(i=>({...i,[e]:H(n,i[e])}))}}function ee(e){return e instanceof Function}function zt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function qt(e,t){const n=[],i=s=>{s.forEach(r=>{n.push(r);const o=t(r);o!=null&&o.length&&i(o)})};return i(e),n}function v(e,t,n){let i=[],s;return r=>{let o;n.key&&n.debug&&(o=Date.now());const u=e(r);if(!(u.length!==i.length||u.some((c,p)=>i[p]!==c)))return s;i=u;let a;if(n.key&&n.debug&&(a=Date.now()),s=t(...u),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,p=Math.round((Date.now()-a)*100)/100,g=p/16,d=(h,f)=>{for(h=String(h);h.length<f;)h=" "+h;return h};console.info(`%c⏱ ${d(p,5)} /${d(c,5)} ms`,`
1
+ import{r as w}from"./react-vendor-DMek_JCF.js";import{j as ot}from"./radix-ui-VbLlN_Dz.js";var j=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ut={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},lt=class{#e=ut;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},z=new lt;function at(e){setTimeout(e,0)}var q=typeof window>"u"||"Deno"in globalThis;function x(){}function ct(e,t){return typeof e=="function"?e(t):e}function le(e){return typeof e=="number"&&e>=0&&e!==1/0}function be(e,t){return Math.max(e+(t||0)-Date.now(),0)}function L(e,t){return typeof e=="function"?e(t):e}function E(e,t){return typeof e=="function"?e(t):e}function Me(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:o,stale:u}=e;if(o){if(i){if(t.queryHash!==Ce(o,t.options))return!1}else if(!N(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||s&&s!==t.state.fetchStatus||r&&!r(t))}function Ie(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(Q(t.options.mutationKey)!==Q(r))return!1}else if(!N(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Ce(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(t,n)=>ae(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function N(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>N(e[n],t[n])):!1}var dt=Object.prototype.hasOwnProperty;function ze(e,t){if(e===t)return e;const n=xe(e)&&xe(t);if(!n&&!(ae(e)&&ae(t)))return t;const s=(n?e:Object.keys(e)).length,r=n?t:Object.keys(t),o=r.length,u=n?new Array(o):{};let l=0;for(let a=0;a<o;a++){const c=n?a:r[a],p=e[c],g=t[c];if(p===g){u[c]=p,(n?a<s:dt.call(e,c))&&l++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[c]=g;continue}const d=ze(p,g);u[c]=d,d===p&&l++}return s===o&&l===s?e:u}function Z(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function xe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ae(e){if(!$e(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$e(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $e(e){return Object.prototype.toString.call(e)==="[object Object]"}function gt(e){return new Promise(t=>{z.setTimeout(t,e)})}function ce(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?ze(e,t):t}function ft(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function ht(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var ye=Symbol();function qe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ye?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qe(e,t){return typeof e=="function"?e(...t):!!e}var pt=class extends j{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!q&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Re=new pt;function de(){let e,t;const n=new Promise((s,r)=>{e=s,t=r});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var mt=at;function vt(){let e=[],t=0,n=u=>{u()},i=u=>{u()},s=mt;const r=u=>{t?e.push(u):s(()=>{n(u)})},o=()=>{const u=e;e=[],u.length&&s(()=>{i(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;t++;try{l=u()}finally{t--,t||o()}return l},batchCalls:u=>(...l)=>{r(()=>{u(...l)})},schedule:r,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{s=u}}}var F=vt(),St=class extends j{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!q&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Y=new St;function Ct(e){return Math.min(1e3*2**e,3e4)}function Ue(e){return(e??"online")==="online"?Y.isOnline():!0}var ge=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function je(e){let t=!1,n=0,i;const s=de(),r=()=>s.status!=="pending",o=f=>{if(!r()){const C=new ge(f);g(C),e.onCancel?.(C)}},u=()=>{t=!0},l=()=>{t=!1},a=()=>Re.isFocused()&&(e.networkMode==="always"||Y.isOnline())&&e.canRun(),c=()=>Ue(e.networkMode)&&e.canRun(),p=f=>{r()||(i?.(),s.resolve(f))},g=f=>{r()||(i?.(),s.reject(f))},d=()=>new Promise(f=>{i=C=>{(r()||a())&&f(C)},e.onPause?.()}).then(()=>{i=void 0,r()||e.onContinue?.()}),h=()=>{if(r())return;let f;const C=n===0?e.initialPromise:void 0;try{f=C??e.fn()}catch(m){f=Promise.reject(m)}Promise.resolve(f).then(p).catch(m=>{if(r())return;const R=e.retry??(q?0:3),y=e.retryDelay??Ct,_=typeof y=="function"?y(n,m):y,M=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,m);if(t||!M){g(m);return}n++,e.onFail?.(n,m),gt(_).then(()=>a()?void 0:d()).then(()=>{t?g(m):h()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(i?.(),s),cancelRetry:u,continueRetry:l,canStart:c,start:()=>(c()?h():d().then(h),s)}}var ke=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),le(this.gcTime)&&(this.#e=z.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(q?1/0:300*1e3))}clearGcTimeout(){this.#e&&(z.clearTimeout(this.#e),this.#e=void 0)}},yt=class extends ke{#e;#t;#n;#s;#i;#o;#u;constructor(e){super(),this.#u=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ee(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ee(this.options);t.data!==void 0&&(this.setState(Oe(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ce(this.state.data,e,this.options);return this.#r({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#r({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(x).catch(x):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>E(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ye||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>L(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!be(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#u?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(l=>l.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#u=!0,n.signal)})},s=()=>{const u=qe(this.options,t),a=(()=>{const c={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(c),c})();return this.#u=!1,this.options.persister?this.options.persister(u,a,this):u(a)},o=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:s};return i(u),u})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#r({type:"fetch",meta:o.fetchOptions?.meta}),this.#i=je({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:u=>{u instanceof ge&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,l)=>{this.#r({type:"failed",failureCount:u,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const u=await this.#i.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof ge){if(u.silent)return this.#i.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#r({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Be(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...Oe(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),F.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ue(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Oe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ee(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Rt=class extends j{constructor(e,t){super(),this.options=t,this.#e=e,this.#r=null,this.#u=de(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#i;#o;#u;#r;#p;#g;#f;#a;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ve(this.#t,this.options)?this.#d():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#R(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof E(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!Z(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&De(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||L(this.options.staleTime,this.#t)!==L(t.staleTime,this.#t))&&this.#m();const s=this.#v();i&&(this.#t!==n||E(this.options.enabled,this.#t)!==E(t.enabled,this.#t)||s!==this.#l)&&this.#S(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ft(this,n)&&(this.#s=n,this.#o=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#u.status==="pending"&&this.#u.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(x)),t}#m(){this.#y();const e=L(this.options.staleTime,this.#t);if(q||this.#s.isStale||!le(e))return;const n=be(this.#s.dataUpdatedAt,e)+1;this.#a=z.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#l=e,!(q||E(this.options.enabled,this.#t)===!1||!le(this.#l)||this.#l===0)&&(this.#c=z.setInterval(()=>{(this.options.refetchIntervalInBackground||Re.isFocused())&&this.#d()},this.#l))}#C(){this.#m(),this.#S(this.#v())}#y(){this.#a&&(z.clearTimeout(this.#a),this.#a=void 0)}#R(){this.#c&&(z.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#s,r=this.#i,o=this.#o,l=e!==n?e.state:this.#n,{state:a}=e;let c={...a},p=!1,g;if(t._optimisticResults){const I=this.hasListeners(),U=!I&&Ve(e,t),A=I&&De(e,n,t,i);(U||A)&&(c={...c,...Be(a.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:h,status:f}=c;g=c.data;let C=!1;if(t.placeholderData!==void 0&&g===void 0&&f==="pending"){let I;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(I=s.data,C=!0):I=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,I!==void 0&&(f="success",g=ce(s?.data,I,t),p=!0)}if(t.select&&g!==void 0&&!C)if(s&&g===r?.data&&t.select===this.#p)g=this.#g;else try{this.#p=t.select,g=t.select(g),g=ce(s?.data,g,t),this.#g=g,this.#r=null}catch(I){this.#r=I}this.#r&&(d=this.#r,g=this.#g,h=Date.now(),f="error");const m=c.fetchStatus==="fetching",R=f==="pending",y=f==="error",_=R&&m,M=g!==void 0,$={status:f,fetchStatus:c.fetchStatus,isPending:R,isSuccess:f==="success",isError:y,isInitialLoading:_,isLoading:_,data:g,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>l.dataUpdateCount||c.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!R,isLoadingError:y&&!M,isPaused:c.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:y&&M,isStale:we(e,t),refetch:this.refetch,promise:this.#u,isEnabled:E(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const I=b=>{$.status==="error"?b.reject($.error):$.data!==void 0&&b.resolve($.data)},U=()=>{const b=this.#u=$.promise=de();I(b)},A=this.#u;switch(A.status){case"pending":e.queryHash===n.queryHash&&I(A);break;case"fulfilled":($.status==="error"||$.data!==A.value)&&U();break;case"rejected":($.status!=="error"||$.error!==A.reason)&&U();break}}return $}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#f=this.#t),Z(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#h.size)return!0;const r=new Set(s??this.#h);return this.options.throwOnError&&r.add("error"),Object.keys(this.#s).some(o=>{const u=o;return this.#s[u]!==e[u]&&r.has(u)})};this.#F({listeners:n()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#F(e){F.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function wt(e,t){return E(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ve(e,t){return wt(e,t)||e.state.data!==void 0&&fe(e,t,t.refetchOnMount)}function fe(e,t,n){if(E(t.enabled,e)!==!1&&L(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&we(e,t)}return!1}function De(e,t,n,i){return(e!==t||E(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&we(e,n)}function we(e,t){return E(t.enabled,e)!==!1&&e.isStaleByTime(L(t.staleTime,e))}function Ft(e,t){return!Z(e.getCurrentResult(),t)}function Ae(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,r=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},l=0;const a=async()=>{let c=!1;const p=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},g=qe(t.options,t.fetchOptions),d=async(h,f,C)=>{if(c)return Promise.reject();if(f==null&&h.pages.length)return Promise.resolve(h);const R=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:f,direction:C?"backward":"forward",meta:t.options.meta};return p(T),T})(),y=await g(R),{maxPages:_}=t.options,M=C?ht:ft;return{pages:M(h.pages,y,_),pageParams:M(h.pageParams,f,_)}};if(s&&r.length){const h=s==="backward",f=h?_t:He,C={pages:r,pageParams:o},m=f(i,C);u=await d(C,m,h)}else{const h=e??r.length;do{const f=l===0?o[0]??i.initialPageParam:He(i,u);if(l>0&&f==null)break;u=await d(u,f),l++}while(l<h)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=a}}}function He(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function _t(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pt=class extends ke{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ne(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=je({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(r,o)=>{this.#i({type:"failed",failureCount:r,error:o})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",s=!this.#s.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:s})}const r=await this.#s.start();return await this.#n.config.onSuccess?.(r,e,this.state.context,this,n),await this.options.onSuccess?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(r,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(r,null,e,this.state.context,n),this.#i({type:"success",data:r}),r}catch(r){try{throw await this.#n.config.onError?.(r,e,this.state.context,this,n),await this.options.onError?.(r,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,r,e,this.state.context,n),r}finally{this.#i({type:"error",error:r})}}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),F.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Ne(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt=class extends j{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const i=new Pt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=K(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=K(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=K(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=K(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ie(t,n))}findAll(e={}){return this.getAll().filter(t=>Ie(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(x))))}};function K(e){return e.options.scope?.id}var It=class extends j{#e;#t=void 0;#n;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),Z(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#s=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){const e=this.#n?.state??Ne();this.#t={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#o(e){F.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#s.onSuccess?.(e.data,t,n,i),this.#s.onSettled?.(e.data,null,t,n,i)):e?.type==="error"&&(this.#s.onError?.(e.error,t,n,i),this.#s.onSettled?.(void 0,e.error,t,n,i))}this.listeners.forEach(t=>{t(this.#t)})})}},xt=class extends j{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Ce(i,t);let r=this.get(s);return r||(r=new yt({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(r)),r}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Me(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Me(e,n)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vn=class{#e;#t;#n;#s;#i;#o;#u;#r;constructor(e={}){this.#e=e.queryCache||new xt,this.#t=e.mutationCache||new Mt,this.#n=e.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#u=Re.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Y.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#u?.(),this.#u=void 0,this.#r?.(),this.#r=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(L(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),r=this.#e.get(i.queryHash)?.state.data,o=ct(t,r);if(o!==void 0)return this.#e.build(this,i).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;F.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return F.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=F.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(x).catch(x)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=F.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(x)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(x)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(L(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(x).catch(x)}fetchInfiniteQuery(e){return e.behavior=Ae(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(x).catch(x)}ensureInfiniteQueryData(e){return e.behavior=Ae(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Y.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(i=>{N(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{N(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ce(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ye&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ke=w.createContext(void 0),Xe=e=>{const t=w.useContext(Ke);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Dn=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),ot.jsx(Ke.Provider,{value:e,children:t})),We=w.createContext(!1),$t=()=>w.useContext(We);We.Provider;function Ot(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Et=w.createContext(Ot()),Vt=()=>w.useContext(Et),Dt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},At=e=>{w.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Qe(n,[e.error,i])),Lt=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Gt=(e,t)=>e.isLoading&&e.isFetching&&!t,Tt=(e,t)=>e?.suspense&&t.isPending,Le=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function bt(e,t,n){const i=$t(),s=Vt(),r=Xe(),o=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",Lt(o),Dt(o,s),At(s);const u=!r.getQueryCache().get(o.queryHash),[l]=w.useState(()=>new t(r,o)),a=l.getOptimisticResult(o),c=!i&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(p=>{const g=c?l.subscribe(F.batchCalls(p)):x;return l.updateResult(),g},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(o)},[o,l]),Tt(o,a))throw Le(o,l,s);if(Ht({result:a,errorResetBoundary:s,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw a.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(o,a),o.experimental_prefetchInRender&&!q&&Gt(a,i)&&(u?Le(o,l,s):r.getQueryCache().get(o.queryHash)?.promise)?.catch(x).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?a:l.trackResult(a)}function An(e,t){return bt(e,Rt)}function Hn(e,t){const n=Xe(),[i]=w.useState(()=>new It(n,e));w.useEffect(()=>{i.setOptions(e)},[i,e]);const s=w.useSyncExternalStore(w.useCallback(o=>i.subscribe(F.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=w.useCallback((o,u)=>{i.mutate(o,u).catch(x)},[i]);if(s.error&&Qe(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}function H(e,t){return typeof e=="function"?e(t):e}function O(e,t){return n=>{t.setState(i=>({...i,[e]:H(n,i[e])}))}}function ee(e){return e instanceof Function}function zt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function qt(e,t){const n=[],i=s=>{s.forEach(r=>{n.push(r);const o=t(r);o!=null&&o.length&&i(o)})};return i(e),n}function v(e,t,n){let i=[],s;return r=>{let o;n.key&&n.debug&&(o=Date.now());const u=e(r);if(!(u.length!==i.length||u.some((c,p)=>i[p]!==c)))return s;i=u;let a;if(n.key&&n.debug&&(a=Date.now()),s=t(...u),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,p=Math.round((Date.now()-a)*100)/100,g=p/16,d=(h,f)=>{for(h=String(h);h.length<f;)h=" "+h;return h};console.info(`%c⏱ ${d(p,5)} /${d(c,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
4
  color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return s}}function S(e,t,n,i){return{debug:()=>{var s;return(s=e?.debugAll)!=null?s:e[t]},key:!1,onChange:i}}function Qt(e,t,n,i){const s=()=>{var o;return(o=r.getValue())!=null?o:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:v(()=>[e,n,t,r],(o,u,l,a)=>({table:o,column:u,row:l,cell:a,getValue:a.getValue,renderValue:a.renderValue}),S(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(r,n,t,e)},{}),r}function Ut(e,t,n,i){var s,r;const u={...e._getDefaultColumnDef(),...t},l=u.accessorKey;let a=(s=(r=u.id)!=null?r:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?s:typeof u.header=="string"?u.header:void 0,c;if(u.accessorFn?c=u.accessorFn:l&&(l.includes(".")?c=g=>{let d=g;for(const f of l.split(".")){var h;d=(h=d)==null?void 0:h[f]}return d}:c=g=>g[u.accessorKey]),!a)throw new Error;let p={id:`${String(a)}`,accessorFn:c,parent:i,depth:n,columnDef:u,columns:[],getFlatColumns:v(()=>[!0],()=>{var g;return[p,...(g=p.columns)==null?void 0:g.flatMap(d=>d.getFlatColumns())]},S(e.options,"debugColumns")),getLeafColumns:v(()=>[e._getOrderColumnsFn()],g=>{var d;if((d=p.columns)!=null&&d.length){let h=p.columns.flatMap(f=>f.getLeafColumns());return g(h)}return[p]},S(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(p,e);return p}const P="debugHeaders";function Ge(e,t,n){var i;let r={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],u=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(u),o.push(l)};return u(r),o},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(r,e)}),r}const jt={createTable:e=>{e.getHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var r,o;const u=(r=i?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?r:[],l=(o=s?.map(p=>n.find(g=>g.id===p)).filter(Boolean))!=null?o:[],a=n.filter(p=>!(i!=null&&i.includes(p.id))&&!(s!=null&&s.includes(p.id)));return X(t,[...u,...a,...l],e)},S(e.options,P)),e.getCenterHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(r=>!(i!=null&&i.includes(r.id))&&!(s!=null&&s.includes(r.id))),X(t,n,e,"center")),S(e.options,P)),e.getLeftHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const r=(s=i?.map(o=>n.find(u=>u.id===o)).filter(Boolean))!=null?s:[];return X(t,r,e,"left")},S(e.options,P)),e.getRightHeaderGroups=v(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const r=(s=i?.map(o=>n.find(u=>u.id===o)).filter(Boolean))!=null?s:[];return X(t,r,e,"right")},S(e.options,P)),e.getFooterGroups=v(()=>[e.getHeaderGroups()],t=>[...t].reverse(),S(e.options,P)),e.getLeftFooterGroups=v(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),S(e.options,P)),e.getCenterFooterGroups=v(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),S(e.options,P)),e.getRightFooterGroups=v(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),S(e.options,P)),e.getFlatHeaders=v(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),S(e.options,P)),e.getLeftFlatHeaders=v(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),S(e.options,P)),e.getCenterFlatHeaders=v(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),S(e.options,P)),e.getRightFlatHeaders=v(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),S(e.options,P)),e.getCenterLeafHeaders=v(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),S(e.options,P)),e.getLeftLeafHeaders=v(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),S(e.options,P)),e.getRightLeafHeaders=v(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),S(e.options,P)),e.getLeafHeaders=v(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,r,o,u,l,a;return[...(s=(r=t[0])==null?void 0:r.headers)!=null?s:[],...(o=(u=n[0])==null?void 0:u.headers)!=null?o:[],...(l=(a=i[0])==null?void 0:a.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},S(e.options,P))}};function X(e,t,n,i){var s,r;let o=0;const u=function(g,d){d===void 0&&(d=1),o=Math.max(o,d),g.filter(h=>h.getIsVisible()).forEach(h=>{var f;(f=h.columns)!=null&&f.length&&u(h.columns,d+1)},0)};u(e);let l=[];const a=(g,d)=>{const h={depth:d,id:[i,`${d}`].filter(Boolean).join("_"),headers:[]},f=[];g.forEach(C=>{const m=[...f].reverse()[0],R=C.column.depth===h.depth;let y,_=!1;if(R&&C.column.parent?y=C.column.parent:(y=C.column,_=!0),m&&m?.column===y)m.subHeaders.push(C);else{const M=Ge(n,y,{id:[i,d,y.id,C?.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${f.filter(T=>T.column===y).length}`:void 0,depth:d,index:f.length});M.subHeaders.push(C),f.push(M)}h.headers.push(C),C.headerGroup=h}),l.push(h),d>0&&a(f,d-1)},c=t.map((g,d)=>Ge(n,g,{depth:o,index:d}));a(c,o-1),l.reverse();const p=g=>g.filter(h=>h.column.getIsVisible()).map(h=>{let f=0,C=0,m=[0];h.subHeaders&&h.subHeaders.length?(m=[],p(h.subHeaders).forEach(y=>{let{colSpan:_,rowSpan:M}=y;f+=_,m.push(M)})):f=1;const R=Math.min(...m);return C=C+R,h.colSpan=f,h.rowSpan=C,{colSpan:f,rowSpan:C}});return p((s=(r=l[0])==null?void 0:r.headers)!=null?s:[]),l}const kt=(e,t,n,i,s,r,o)=>{let u={id:t,index:i,original:n,depth:s,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(u._valuesCache.hasOwnProperty(l))return u._valuesCache[l];const a=e.getColumn(l);if(a!=null&&a.accessorFn)return u._valuesCache[l]=a.accessorFn(u.original,i),u._valuesCache[l]},getUniqueValues:l=>{if(u._uniqueValuesCache.hasOwnProperty(l))return u._uniqueValuesCache[l];const a=e.getColumn(l);if(a!=null&&a.accessorFn)return a.columnDef.getUniqueValues?(u._uniqueValuesCache[l]=a.columnDef.getUniqueValues(u.original,i),u._uniqueValuesCache[l]):(u._uniqueValuesCache[l]=[u.getValue(l)],u._uniqueValuesCache[l])},renderValue:l=>{var a;return(a=u.getValue(l))!=null?a:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>qt(u.subRows,l=>l.subRows),getParentRow:()=>u.parentId?e.getRow(u.parentId,!0):void 0,getParentRows:()=>{let l=[],a=u;for(;;){const c=a.getParentRow();if(!c)break;l.push(c),a=c}return l.reverse()},getAllCells:v(()=>[e.getAllLeafColumns()],l=>l.map(a=>Qt(e,u,a,a.id)),S(e.options,"debugRows")),_getAllCellsByColumnId:v(()=>[u.getAllCells()],l=>l.reduce((a,c)=>(a[c.column.id]=c,a),{}),S(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const a=e._features[l];a==null||a.createRow==null||a.createRow(u,e)}return u},Bt={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Je=(e,t,n)=>{var i,s;const r=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(r))};Je.autoRemove=e=>V(e);const Ze=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};Ze.autoRemove=e=>V(e);const Ye=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};Ye.autoRemove=e=>V(e);const et=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};et.autoRemove=e=>V(e);const tt=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});tt.autoRemove=e=>V(e)||!(e!=null&&e.length);const nt=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});nt.autoRemove=e=>V(e)||!(e!=null&&e.length);const it=(e,t,n)=>e.getValue(t)===n;it.autoRemove=e=>V(e);const st=(e,t,n)=>e.getValue(t)==n;st.autoRemove=e=>V(e);const Fe=(e,t,n)=>{let[i,s]=n;const r=e.getValue(t);return r>=i&&r<=s};Fe.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(i)?-1/0:i,o=n===null||Number.isNaN(s)?1/0:s;if(r>o){const u=r;r=o,o=u}return[r,o]};Fe.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const D={includesString:Je,includesStringSensitive:Ze,equalsString:Ye,arrIncludes:et,arrIncludesAll:tt,arrIncludesSome:nt,equals:it,weakEquals:st,inNumberRange:Fe};function V(e){return e==null||e===""}const Nt={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:O("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);return typeof i=="string"?D.includesString:typeof i=="number"?D.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?D.equals:Array.isArray(i)?D.arrIncludes:D.weakEquals},e.getFilterFn=()=>{var n,i;return ee(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:D[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),r=i?.find(c=>c.id===e.id),o=H(n,r?r.value:void 0);if(Te(s,o,e)){var u;return(u=i?.filter(c=>c.id!==e.id))!=null?u:[]}const l={id:e.id,value:o};if(r){var a;return(a=i?.map(c=>c.id===e.id?l:c))!=null?a:[]}return i!=null&&i.length?[...i,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var r;return(r=H(t,s))==null?void 0:r.filter(o=>{const u=n.find(l=>l.id===o.id);if(u){const l=u.getFilterFn();if(Te(l,o.value,u))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Te(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Kt=(e,t,n)=>n.reduce((i,s)=>{const r=s.getValue(e);return i+(typeof r=="number"?r:0)},0),Xt=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i>r||i===void 0&&r>=r)&&(i=r)}),i},Wt=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i<r||i===void 0&&r>=r)&&(i=r)}),i},Jt=(e,t,n)=>{let i,s;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i===void 0?o>=o&&(i=s=o):(i>o&&(i=o),s<o&&(s=o)))}),[i,s]},Zt=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let r=s.getValue(e);r!=null&&(r=+r)>=r&&(++n,i+=r)}),n)return i/n},Yt=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!zt(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((r,o)=>r-o);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},en=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),tn=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,nn=(e,t)=>t.length,te={sum:Kt,min:Xt,max:Wt,extent:Jt,mean:Zt,median:Yt,unique:en,uniqueCount:tn,count:nn},sn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:O("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n?.getValue(e.id);if(typeof i=="number")return te.sum;if(Object.prototype.toString.call(i)==="[object Date]")return te.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return ee(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:te[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function rn(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(r=>!t.includes(r.id));return n==="remove"?i:[...t.map(r=>e.find(o=>o.id===r)).filter(Boolean),...i]}const on={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:O("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=v(n=>[B(t,n)],n=>n.findIndex(i=>i.id===e.id),S(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=B(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=B(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=v(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let r=[];if(!(t!=null&&t.length))r=s;else{const o=[...t],u=[...s];for(;u.length&&o.length;){const l=o.shift(),a=u.findIndex(c=>c.id===l);a>-1&&r.push(u.splice(a,1)[0])}r=[...r,...u]}return rn(r,n,i)},S(e.options,"debugTable"))}},ne=()=>({left:[],right:[]}),un={getInitialState:e=>({columnPinning:ne(),...e}),getDefaultOptions:e=>({onColumnPinningChange:O("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var r,o;if(n==="right"){var u,l;return{left:((u=s?.left)!=null?u:[]).filter(p=>!(i!=null&&i.includes(p))),right:[...((l=s?.right)!=null?l:[]).filter(p=>!(i!=null&&i.includes(p))),...i]}}if(n==="left"){var a,c;return{left:[...((a=s?.left)!=null?a:[]).filter(p=>!(i!=null&&i.includes(p))),...i],right:((c=s?.right)!=null?c:[]).filter(p=>!(i!=null&&i.includes(p)))}}return{left:((r=s?.left)!=null?r:[]).filter(p=>!(i!=null&&i.includes(p))),right:((o=s?.right)!=null?o:[]).filter(p=>!(i!=null&&i.includes(p)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,r,o;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((r=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?r:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(u=>u.id),{left:i,right:s}=t.getState().columnPinning,r=n.some(u=>i?.includes(u)),o=n.some(u=>s?.includes(u));return r?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=v(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const r=[...i??[],...s??[]];return n.filter(o=>!r.includes(o.column.id))},S(t.options,"debugRows")),e.getLeftVisibleCells=v(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),S(t.options,"debugRows")),e.getRightVisibleCells=v(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),S(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?ne():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:ne())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,r;return!!((s=i.left)!=null&&s.length||(r=i.right)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),S(e.options,"debugColumns")),e.getRightLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),S(e.options,"debugColumns")),e.getCenterLeafColumns=v(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(r=>!s.includes(r.id))},S(e.options,"debugColumns"))}};function ln(e){return e||(typeof document<"u"?document:null)}const W={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ie=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),an={getDefaultColumnDef:()=>W,getInitialState:e=>({columnSizing:{},columnSizingInfo:ie(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:O("columnSizing",e),onColumnSizingInfoChange:O("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:W.minSize,(i=r??e.columnDef.size)!=null?i:W.size),(s=e.columnDef.maxSize)!=null?s:W.maxSize)},e.getStart=v(n=>[n,B(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,r)=>s+r.getSize(),0),S(t.options,"debugColumns")),e.getAfter=v(n=>[n,B(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,r)=>s+r.getSize(),0),S(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var r;n+=(r=s.column.getSize())!=null?r:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i?.getCanResize();return r=>{if(!i||!s||(r.persist==null||r.persist(),se(r)&&r.touches&&r.touches.length>1))return;const o=e.getSize(),u=e?e.getLeafHeaders().map(m=>[m.column.id,m.column.getSize()]):[[i.id,i.getSize()]],l=se(r)?Math.round(r.touches[0].clientX):r.clientX,a={},c=(m,R)=>{typeof R=="number"&&(t.setColumnSizingInfo(y=>{var _,M;const T=t.options.columnResizeDirection==="rtl"?-1:1,$=(R-((_=y?.startOffset)!=null?_:0))*T,I=Math.max($/((M=y?.startSize)!=null?M:0),-.999999);return y.columnSizingStart.forEach(U=>{let[A,b]=U;a[A]=Math.round(Math.max(b+b*I,0)*100)/100}),{...y,deltaOffset:$,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||m==="end")&&t.setColumnSizing(y=>({...y,...a})))},p=m=>c("move",m),g=m=>{c("end",m),t.setColumnSizingInfo(R=>({...R,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},d=ln(n),h={moveHandler:m=>p(m.clientX),upHandler:m=>{d?.removeEventListener("mousemove",h.moveHandler),d?.removeEventListener("mouseup",h.upHandler),g(m.clientX)}},f={moveHandler:m=>(m.cancelable&&(m.preventDefault(),m.stopPropagation()),p(m.touches[0].clientX),!1),upHandler:m=>{var R;d?.removeEventListener("touchmove",f.moveHandler),d?.removeEventListener("touchend",f.upHandler),m.cancelable&&(m.preventDefault(),m.stopPropagation()),g((R=m.touches[0])==null?void 0:R.clientX)}},C=cn()?{passive:!1}:!1;se(r)?(d?.addEventListener("touchmove",f.moveHandler,C),d?.addEventListener("touchend",f.upHandler,C)):(d?.addEventListener("mousemove",h.moveHandler,C),d?.addEventListener("mouseup",h.upHandler,C)),t.setColumnSizingInfo(m=>({...m,startOffset:l,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:u,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ie():(n=e.initialState.columnSizingInfo)!=null?n:ie())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let J=null;function cn(){if(typeof J=="boolean")return J;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return J=e,J}function se(e){return e.type==="touchstart"}const dn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:O("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(r=>r.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=v(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),S(t.options,"debugRows")),e.getVisibleCells=v(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],S(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>v(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),S(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,r)=>({...s,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function B(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const gn={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},fn={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:O("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>D.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return ee(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:D[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},hn={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:O("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,r;e.setExpanded(i?{}:(s=(r=e.initialState)==null?void 0:r.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(r=>{const o=r.split(".");i=Math.max(i,o.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const r=i===!0?!0:!!(i!=null&&i[e.id]);let o={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(u=>{o[u]=!0}):o=i,n=(s=n)!=null?s:!r,!r&&n)return{...o,[e.id]:!0};if(r&&!n){const{[e.id]:u,...l}=o;return l}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i?.[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},he=0,pe=10,re=()=>({pageIndex:he,pageSize:pe}),pn={getInitialState:e=>({...e,pagination:{...re(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:O("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=r=>H(i,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?re():(s=e.initialState.pagination)!=null?s:re())},e.setPageIndex=i=>{e.setPagination(s=>{let r=H(i,s.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...s,pageIndex:r}})},e.resetPageIndex=i=>{var s,r;e.setPageIndex(i?he:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?s:he)},e.resetPageSize=i=>{var s,r;e.setPageSize(i?pe:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?s:pe)},e.setPageSize=i=>{e.setPagination(s=>{const r=Math.max(1,H(i,s.pageSize)),o=s.pageSize*s.pageIndex,u=Math.floor(o/r);return{...s,pageIndex:u,pageSize:r}})},e.setPageCount=i=>e.setPagination(s=>{var r;let o=H(i,(r=e.options.pageCount)!=null?r:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...s,pageCount:o}}),e.getPageOptions=v(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((r,o)=>o)),s},S(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},oe=()=>({top:[],bottom:[]}),mn={getInitialState:e=>({rowPinning:oe(),...e}),getDefaultOptions:e=>({onRowPinningChange:O("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const r=i?e.getLeafRows().map(l=>{let{id:a}=l;return a}):[],o=s?e.getParentRows().map(l=>{let{id:a}=l;return a}):[],u=new Set([...o,e.id,...r]);t.setRowPinning(l=>{var a,c;if(n==="bottom"){var p,g;return{top:((p=l?.top)!=null?p:[]).filter(f=>!(u!=null&&u.has(f))),bottom:[...((g=l?.bottom)!=null?g:[]).filter(f=>!(u!=null&&u.has(f))),...Array.from(u)]}}if(n==="top"){var d,h;return{top:[...((d=l?.top)!=null?d:[]).filter(f=>!(u!=null&&u.has(f))),...Array.from(u)],bottom:((h=l?.bottom)!=null?h:[]).filter(f=>!(u!=null&&u.has(f)))}}return{top:((a=l?.top)!=null?a:[]).filter(f=>!(u!=null&&u.has(f))),bottom:((c=l?.bottom)!=null?c:[]).filter(f=>!(u!=null&&u.has(f)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,r=n.some(u=>i?.includes(u)),o=n.some(u=>s?.includes(u));return r?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const r=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:u}=o;return u});return(i=r?.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?oe():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:oe())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,r;return!!((s=i.top)!=null&&s.length||(r=i.bottom)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(o=>{const u=e.getRow(o,!0);return u.getIsAllParentsExpanded()?u:null}):(n??[]).map(o=>t.find(u=>u.id===o))).filter(Boolean).map(o=>({...o,position:i}))},e.getTopRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),S(e.options,"debugRows")),e.getBottomRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),S(e.options,"debugRows")),e.getCenterRows=v(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>{const s=new Set([...n??[],...i??[]]);return t.filter(r=>!s.has(r.id))},S(e.options,"debugRows"))}},vn={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:O("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(r=>{r.getCanSelect()&&(i[r.id]=!0)}):s.forEach(r=>{delete i[r.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(r=>{me(s,r.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=v(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ue(e,n):{rows:[],flatRows:[],rowsById:{}},S(e.options,"debugTable")),e.getFilteredSelectedRowModel=v(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ue(e,n):{rows:[],flatRows:[],rowsById:{}},S(e.options,"debugTable")),e.getGroupedSelectedRowModel=v(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ue(e,n):{rows:[],flatRows:[],rowsById:{}},S(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(r=>{var o;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return r;const u={...r};return me(u,e.id,n,(o=i?.selectChildren)!=null?o:!0,t),u})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return _e(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ve(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ve(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},me=(e,t,n,i,s)=>{var r;const o=s.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(u=>delete e[u]),o.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(r=o.subRows)!=null&&r.length&&o.getCanSelectSubRows()&&o.subRows.forEach(u=>me(e,u.id,n,i,s))};function ue(e,t){const n=e.getState().rowSelection,i=[],s={},r=function(o,u){return o.map(l=>{var a;const c=_e(l,n);if(c&&(i.push(l),s[l.id]=l),(a=l.subRows)!=null&&a.length&&(l={...l,subRows:r(l.subRows)}),c)return l}).filter(Boolean)};return{rows:r(t.rows),flatRows:i,rowsById:s}}function _e(e,t){var n;return(n=t[e.id])!=null?n:!1}function ve(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,r=!1;return e.subRows.forEach(o=>{if(!(r&&!s)&&(o.getCanSelect()&&(_e(o,t)?r=!0:s=!1),o.subRows&&o.subRows.length)){const u=ve(o,t);u==="all"?r=!0:(u==="some"&&(r=!0),s=!1)}}),s?"all":r?"some":!1}const Se=/([0-9]+)/gm,Sn=(e,t,n)=>rt(G(e.getValue(n)).toLowerCase(),G(t.getValue(n)).toLowerCase()),Cn=(e,t,n)=>rt(G(e.getValue(n)),G(t.getValue(n))),yn=(e,t,n)=>Pe(G(e.getValue(n)).toLowerCase(),G(t.getValue(n)).toLowerCase()),Rn=(e,t,n)=>Pe(G(e.getValue(n)),G(t.getValue(n))),wn=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},Fn=(e,t,n)=>Pe(e.getValue(n),t.getValue(n));function Pe(e,t){return e===t?0:e>t?1:-1}function G(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function rt(e,t){const n=e.split(Se).filter(Boolean),i=t.split(Se).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),r=i.shift(),o=parseInt(s,10),u=parseInt(r,10),l=[o,u].sort();if(isNaN(l[0])){if(s>r)return 1;if(r>s)return-1;continue}if(isNaN(l[1]))return isNaN(o)?-1:1;if(o>u)return 1;if(u>o)return-1}return n.length-i.length}const k={alphanumeric:Sn,alphanumericCaseSensitive:Cn,text:yn,textCaseSensitive:Rn,datetime:wn,basic:Fn},_n={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:O("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const r=s?.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return k.datetime;if(typeof r=="string"&&(i=!0,r.split(Se).length>1))return k.alphanumeric}return i?k.text:k.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return ee(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:k[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(o=>{const u=o?.find(d=>d.id===e.id),l=o?.findIndex(d=>d.id===e.id);let a=[],c,p=r?n:s==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&i?u?c="toggle":c="add":o!=null&&o.length&&l!==o.length-1?c="replace":u?c="toggle":c="replace",c==="toggle"&&(r||s||(c="remove")),c==="add"){var g;a=[...o,{id:e.id,desc:p}],a.splice(0,a.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else c==="toggle"?a=o.map(d=>d.id===e.id?{...d,desc:p}:d):c==="remove"?a=o.filter(d=>d.id!==e.id):a=[{id:e.id,desc:p}];return a})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const r=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==r&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:o==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Pn=[jt,dn,on,un,Bt,Nt,gn,fn,_n,sn,hn,pn,mn,vn,an];function Mn(e){var t,n;const i=[...Pn,...(t=e._features)!=null?t:[]];let s={_features:i};const r=s._features.reduce((g,d)=>Object.assign(g,d.getDefaultOptions==null?void 0:d.getDefaultOptions(s)),{}),o=g=>s.options.mergeOptions?s.options.mergeOptions(r,g):{...r,...g};let l={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(g=>{var d;l=(d=g.getInitialState==null?void 0:g.getInitialState(l))!=null?d:l});const a=[];let c=!1;const p={_features:i,options:{...r,...e},initialState:l,_queue:g=>{a.push(g),c||(c=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();c=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{s.setState(s.initialState)},setOptions:g=>{const d=H(g,s.options);s.options=o(d)},getState:()=>s.options.state,setState:g=>{s.options.onStateChange==null||s.options.onStateChange(g)},_getRowId:(g,d,h)=>{var f;return(f=s.options.getRowId==null?void 0:s.options.getRowId(g,d,h))!=null?f:`${h?[h.id,d].join("."):d}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(g,d)=>{let h=(d?s.getPrePaginationRowModel():s.getRowModel()).rowsById[g];if(!h&&(h=s.getCoreRowModel().rowsById[g],!h))throw new Error;return h},_getDefaultColumnDef:v(()=>[s.options.defaultColumn],g=>{var d;return g=(d=g)!=null?d:{},{header:h=>{const f=h.header.column.columnDef;return f.accessorKey?f.accessorKey:f.accessorFn?f.id:null},cell:h=>{var f,C;return(f=(C=h.renderValue())==null||C.toString==null?void 0:C.toString())!=null?f:null},...s._features.reduce((h,f)=>Object.assign(h,f.getDefaultColumnDef==null?void 0:f.getDefaultColumnDef()),{}),...g}},S(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:v(()=>[s._getColumnDefs()],g=>{const d=function(h,f,C){return C===void 0&&(C=0),h.map(m=>{const R=Ut(s,m,C,f),y=m;return R.columns=y.columns?d(y.columns,R,C+1):[],R})};return d(g)},S(e,"debugColumns")),getAllFlatColumns:v(()=>[s.getAllColumns()],g=>g.flatMap(d=>d.getFlatColumns()),S(e,"debugColumns")),_getAllFlatColumnsById:v(()=>[s.getAllFlatColumns()],g=>g.reduce((d,h)=>(d[h.id]=h,d),{}),S(e,"debugColumns")),getAllLeafColumns:v(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(g,d)=>{let h=g.flatMap(f=>f.getLeafColumns());return d(h)},S(e,"debugColumns")),getColumn:g=>s._getAllFlatColumnsById()[g]};Object.assign(s,p);for(let g=0;g<s._features.length;g++){const d=s._features[g];d==null||d.createTable==null||d.createTable(s)}return s}function Ln(){return e=>v(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,r,o){r===void 0&&(r=0);const u=[];for(let a=0;a<s.length;a++){const c=kt(e,e._getRowId(s[a],a,o),s[a],a,r,void 0,o?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,u.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(s[a],a),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=i(c.originalSubRows,r+1,c))}}return u};return n.rows=i(t),n},S(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Gn(e,t){return e?In(e)?w.createElement(e,t):e:null}function In(e){return xn(e)||typeof e=="function"||$n(e)}function xn(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function $n(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Tn(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=w.useState(()=>({current:Mn(t)})),[i,s]=w.useState(()=>n.current.initialState);return n.current.setOptions(r=>({...r,...e,state:{...i,...e.state},onStateChange:o=>{s(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}export{Vn as Q,An as a,Hn as b,Dn as c,Tn as d,Gn as f,Ln as g,Xe as u};
@@ -0,0 +1 @@
1
+ function qe(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=qe(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function lt(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=qe(e))&&(r&&(r+=" "),r+=n);return r}const Te=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,We=lt,gr=(e,n)=>t=>{var r;if(n?.variants==null)return We(e,t?.class,t?.className);const{variants:o,defaultVariants:a}=n,s=Object.keys(o).map(u=>{const f=t?.[u],b=a?.[u];if(f===null)return null;const p=Te(f)||Te(b);return o[u][p]}),i=t&&Object.entries(t).reduce((u,f)=>{let[b,p]=f;return p===void 0||(u[b]=p),u},{}),c=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:b,className:p,...S}=f;return Object.entries(S).every(v=>{let[M,D]=v;return Array.isArray(D)?D.includes({...a,...i}[M]):{...a,...i}[M]===D})?[...u,b,p]:u},[]);return We(e,s,c,t?.class,t?.className)},dt=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r<e.length;r++)t[r]=e[r];for(let r=0;r<n.length;r++)t[e.length+r]=n[r];return t},ut=(e,n)=>({classGroupId:e,validator:n}),He=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),de="-",Ne=[],ft="arbitrary..",mt=e=>{const n=gt(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ht(s);const i=s.split(de),c=i[0]===""&&i.length>1?1:0;return Ve(i,c,n)},getConflictingClassGroupIds:(s,i)=>{if(i){const c=r[s],u=t[s];return c?u?dt(u,c):c:u||Ne}return t[s]||Ne}}},Ve=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const o=e[n],a=t.nextPart.get(o);if(a){const u=Ve(e,n+1,a);if(u)return u}const s=t.validators;if(s===null)return;const i=n===0?e.join(de):e.slice(n).join(de),c=s.length;for(let u=0;u<c;u++){const f=s[u];if(f.validator(i))return f.classGroupId}},ht=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?ft+r:void 0})(),gt=e=>{const{theme:n,classGroups:t}=e;return bt(t,n)},bt=(e,n)=>{const t=He();for(const r in e){const o=e[r];xe(o,t,r,n)}return t},xe=(e,n,t,r)=>{const o=e.length;for(let a=0;a<o;a++){const s=e[a];pt(s,n,t,r)}},pt=(e,n,t,r)=>{if(typeof e=="string"){wt(e,n,t);return}if(typeof e=="function"){yt(e,n,t,r);return}kt(e,n,t,r)},wt=(e,n,t)=>{const r=e===""?n:Xe(n,e);r.classGroupId=t},yt=(e,n,t,r)=>{if(xt(e)){xe(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ut(t,e))},kt=(e,n,t,r)=>{const o=Object.entries(e),a=o.length;for(let s=0;s<a;s++){const[i,c]=o[s];xe(c,Xe(n,i),t,r)}},Xe=(e,n)=>{let t=e;const r=n.split(de),o=r.length;for(let a=0;a<o;a++){const s=r[a];let i=t.nextPart.get(s);i||(i=He(),t.nextPart.set(s,i)),t=i}return t},xt=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const o=(a,s)=>{t[a]=s,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let s=t[a];if(s!==void 0)return s;if((s=r[a])!==void 0)return o(a,s),s},set(a,s){a in t?t[a]=s:o(a,s)}}},ke="!",Fe=":",Mt=[],Ae=(e,n,t,r,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:o}),Ot=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=o=>{const a=[];let s=0,i=0,c=0,u;const f=o.length;for(let M=0;M<f;M++){const D=o[M];if(s===0&&i===0){if(D===Fe){a.push(o.slice(c,M)),c=M+1;continue}if(D==="/"){u=M;continue}}D==="["?s++:D==="]"?s--:D==="("?i++:D===")"&&i--}const b=a.length===0?o:o.slice(c);let p=b,S=!1;b.endsWith(ke)?(p=b.slice(0,-1),S=!0):b.startsWith(ke)&&(p=b.slice(1),S=!0);const v=u&&u>c?u-c:void 0;return Ae(a,S,p,v)};if(n){const o=n+Fe,a=r;r=s=>s.startsWith(o)?a(s.slice(o.length)):Ae(Mt,!1,s,void 0,!0)}if(t){const o=r;r=a=>t({className:a,parseClassName:o})}return r},Dt=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let o=[];for(let a=0;a<t.length;a++){const s=t[a],i=s[0]==="[",c=n.has(s);i||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},St=e=>({cache:vt(e.cacheSize),parseClassName:Ot(e),sortModifiers:Dt(e),...mt(e)}),Pt=/\s+/,Ct=(e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=n,s=[],i=e.trim().split(Pt);let c="";for(let u=i.length-1;u>=0;u-=1){const f=i[u],{isExternal:b,modifiers:p,hasImportantModifier:S,baseClassName:v,maybePostfixModifierPosition:M}=t(f);if(b){c=f+(c.length>0?" "+c:c);continue}let D=!!M,z=r(D?v.substring(0,M):v);if(!z){if(!D){c=f+(c.length>0?" "+c:c);continue}if(z=r(v),!z){c=f+(c.length>0?" "+c:c);continue}D=!1}const ee=p.length===0?"":p.length===1?p[0]:a(p).join(":"),Q=S?ee+ke:ee,G=Q+z;if(s.indexOf(G)>-1)continue;s.push(G);const j=o(z,D);for(let E=0;E<j.length;++E){const $=j[E];s.push(Q+$)}c=f+(c.length>0?" "+c:c)}return c},Yt=(...e)=>{let n=0,t,r,o="";for(;n<e.length;)(t=e[n++])&&(r=Be(t))&&(o&&(o+=" "),o+=r);return o},Be=e=>{if(typeof e=="string")return e;let n,t="";for(let r=0;r<e.length;r++)e[r]&&(n=Be(e[r]))&&(t&&(t+=" "),t+=n);return t},Tt=(e,...n)=>{let t,r,o,a;const s=c=>{const u=n.reduce((f,b)=>b(f),e());return t=St(u),r=t.cache.get,o=t.cache.set,a=i,i(c)},i=c=>{const u=r(c);if(u)return u;const f=Ct(c,t);return o(c,f),f};return a=s,(...c)=>a(Yt(...c))},Wt=[],x=e=>{const n=t=>t[e]||Wt;return n.isThemeGetter=!0,n},Qe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$e=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nt=/^\d+\/\d+$/,Ft=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,At=/\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$/,zt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Et=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,It=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,q=e=>Nt.test(e),g=e=>!!e&&!Number.isNaN(Number(e)),N=e=>!!e&&Number.isInteger(Number(e)),pe=e=>e.endsWith("%")&&g(e.slice(0,-1)),W=e=>Ft.test(e),_t=()=>!0,Rt=e=>At.test(e)&&!zt.test(e),Je=()=>!1,Gt=e=>Et.test(e),jt=e=>It.test(e),Lt=e=>!l(e)&&!d(e),qt=e=>V(e,Ze,Je),l=e=>Qe.test(e),_=e=>V(e,et,Rt),we=e=>V(e,Qt,g),ze=e=>V(e,Ue,Je),Ht=e=>V(e,Ke,jt),se=e=>V(e,tt,Gt),d=e=>$e.test(e),J=e=>X(e,et),Vt=e=>X(e,$t),Ee=e=>X(e,Ue),Xt=e=>X(e,Ze),Bt=e=>X(e,Ke),ie=e=>X(e,tt,!0),V=(e,n,t)=>{const r=Qe.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},X=(e,n,t=!1)=>{const r=$e.exec(e);return r?r[1]?n(r[1]):t:!1},Ue=e=>e==="position"||e==="percentage",Ke=e=>e==="image"||e==="url",Ze=e=>e==="length"||e==="size"||e==="bg-size",et=e=>e==="length",Qt=e=>e==="number",$t=e=>e==="family-name",tt=e=>e==="shadow",Jt=()=>{const e=x("color"),n=x("font"),t=x("text"),r=x("font-weight"),o=x("tracking"),a=x("leading"),s=x("breakpoint"),i=x("container"),c=x("spacing"),u=x("radius"),f=x("shadow"),b=x("inset-shadow"),p=x("text-shadow"),S=x("drop-shadow"),v=x("blur"),M=x("perspective"),D=x("aspect"),z=x("ease"),ee=x("animate"),Q=()=>["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"],j=()=>[...G(),d,l],E=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],h=()=>[d,l,c],Y=()=>[q,"full","auto",...h()],ve=()=>[N,"none","subgrid",d,l],Me=()=>["auto",{span:["full",N,d,l]},N,d,l],te=()=>[N,"auto",d,l],Oe=()=>["auto","min","max","fr",d,l],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...h()],I=()=>[q,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...h()],m=()=>[e,d,l],De=()=>[...G(),Ee,ze,{position:[d,l]}],Se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Pe=()=>["auto","cover","contain",Xt,qt,{size:[d,l]}],ge=()=>[pe,J,_],P=()=>["","none","full",u,d,l],C=()=>["",g,J,_],ne=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],O=()=>[g,pe,Ee,ze],Ye=()=>["","none",v,d,l],re=()=>["none",g,d,l],oe=()=>["none",g,d,l],be=()=>[g,d,l],ae=()=>[q,"full",...h()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[W],breakpoint:[W],color:[_t],container:[W],"drop-shadow":[W],ease:["in","out","in-out"],font:[Lt],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[W],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[W],shadow:[W],spacing:["px",g],text:[W],"text-shadow":[W],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",q,l,d,D]}],container:["container"],columns:[{columns:[g,l,d,i]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:j()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[N,"auto",d,l]}],basis:[{basis:[q,"full","auto",i,...h()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[g,q,"auto","initial","none",l]}],grow:[{grow:["",g,d,l]}],shrink:[{shrink:["",g,d,l]}],order:[{order:[N,"first","last","none",d,l]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:Me()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:Me()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:h()}],"gap-x":[{"gap-x":h()}],"gap-y":[{"gap-y":h()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:h()}],px:[{px:h()}],py:[{py:h()}],ps:[{ps:h()}],pe:[{pe:h()}],pt:[{pt:h()}],pr:[{pr:h()}],pb:[{pb:h()}],pl:[{pl:h()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":h()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":h()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",t,J,_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,d,we]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pe,l]}],"font-family":[{font:[Vt,l,n]}],"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:[o,d,l]}],"line-clamp":[{"line-clamp":[g,"none",d,we]}],leading:[{leading:[a,...h()]}],"list-image":[{"list-image":["none",d,l]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",d,l]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:m()}],"text-color":[{text:m()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[g,"from-font","auto",d,_]}],"text-decoration-color":[{decoration:m()}],"underline-offset":[{"underline-offset":[g,"auto",d,l]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d,l]}],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",d,l]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:De()}],"bg-repeat":[{bg:Se()}],"bg-size":[{bg:Pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},N,d,l],radial:["",d,l],conic:[N,d,l]},Bt,Ht]}],"bg-color":[{bg:m()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:m()}],"gradient-via":[{via:m()}],"gradient-to":[{to:m()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:m()}],"border-color-x":[{"border-x":m()}],"border-color-y":[{"border-y":m()}],"border-color-s":[{"border-s":m()}],"border-color-e":[{"border-e":m()}],"border-color-t":[{"border-t":m()}],"border-color-r":[{"border-r":m()}],"border-color-b":[{"border-b":m()}],"border-color-l":[{"border-l":m()}],"divide-color":[{divide:m()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[g,d,l]}],"outline-w":[{outline:["",g,J,_]}],"outline-color":[{outline:m()}],shadow:[{shadow:["","none",f,ie,se]}],"shadow-color":[{shadow:m()}],"inset-shadow":[{"inset-shadow":["none",b,ie,se]}],"inset-shadow-color":[{"inset-shadow":m()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:m()}],"ring-offset-w":[{"ring-offset":[g,_]}],"ring-offset-color":[{"ring-offset":m()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":m()}],"text-shadow":[{"text-shadow":["none",p,ie,se]}],"text-shadow-color":[{"text-shadow":m()}],opacity:[{opacity:[g,d,l]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"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":[g]}],"mask-image-linear-from-pos":[{"mask-linear-from":O()}],"mask-image-linear-to-pos":[{"mask-linear-to":O()}],"mask-image-linear-from-color":[{"mask-linear-from":m()}],"mask-image-linear-to-color":[{"mask-linear-to":m()}],"mask-image-t-from-pos":[{"mask-t-from":O()}],"mask-image-t-to-pos":[{"mask-t-to":O()}],"mask-image-t-from-color":[{"mask-t-from":m()}],"mask-image-t-to-color":[{"mask-t-to":m()}],"mask-image-r-from-pos":[{"mask-r-from":O()}],"mask-image-r-to-pos":[{"mask-r-to":O()}],"mask-image-r-from-color":[{"mask-r-from":m()}],"mask-image-r-to-color":[{"mask-r-to":m()}],"mask-image-b-from-pos":[{"mask-b-from":O()}],"mask-image-b-to-pos":[{"mask-b-to":O()}],"mask-image-b-from-color":[{"mask-b-from":m()}],"mask-image-b-to-color":[{"mask-b-to":m()}],"mask-image-l-from-pos":[{"mask-l-from":O()}],"mask-image-l-to-pos":[{"mask-l-to":O()}],"mask-image-l-from-color":[{"mask-l-from":m()}],"mask-image-l-to-color":[{"mask-l-to":m()}],"mask-image-x-from-pos":[{"mask-x-from":O()}],"mask-image-x-to-pos":[{"mask-x-to":O()}],"mask-image-x-from-color":[{"mask-x-from":m()}],"mask-image-x-to-color":[{"mask-x-to":m()}],"mask-image-y-from-pos":[{"mask-y-from":O()}],"mask-image-y-to-pos":[{"mask-y-to":O()}],"mask-image-y-from-color":[{"mask-y-from":m()}],"mask-image-y-to-color":[{"mask-y-to":m()}],"mask-image-radial":[{"mask-radial":[d,l]}],"mask-image-radial-from-pos":[{"mask-radial-from":O()}],"mask-image-radial-to-pos":[{"mask-radial-to":O()}],"mask-image-radial-from-color":[{"mask-radial-from":m()}],"mask-image-radial-to-color":[{"mask-radial-to":m()}],"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":[g]}],"mask-image-conic-from-pos":[{"mask-conic-from":O()}],"mask-image-conic-to-pos":[{"mask-conic-to":O()}],"mask-image-conic-from-color":[{"mask-conic-from":m()}],"mask-image-conic-to-color":[{"mask-conic-to":m()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:De()}],"mask-repeat":[{mask:Se()}],"mask-size":[{mask:Pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",d,l]}],filter:[{filter:["","none",d,l]}],blur:[{blur:Ye()}],brightness:[{brightness:[g,d,l]}],contrast:[{contrast:[g,d,l]}],"drop-shadow":[{"drop-shadow":["","none",S,ie,se]}],"drop-shadow-color":[{"drop-shadow":m()}],grayscale:[{grayscale:["",g,d,l]}],"hue-rotate":[{"hue-rotate":[g,d,l]}],invert:[{invert:["",g,d,l]}],saturate:[{saturate:[g,d,l]}],sepia:[{sepia:["",g,d,l]}],"backdrop-filter":[{"backdrop-filter":["","none",d,l]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[g,d,l]}],"backdrop-contrast":[{"backdrop-contrast":[g,d,l]}],"backdrop-grayscale":[{"backdrop-grayscale":["",g,d,l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g,d,l]}],"backdrop-invert":[{"backdrop-invert":["",g,d,l]}],"backdrop-opacity":[{"backdrop-opacity":[g,d,l]}],"backdrop-saturate":[{"backdrop-saturate":[g,d,l]}],"backdrop-sepia":[{"backdrop-sepia":["",g,d,l]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":h()}],"border-spacing-x":[{"border-spacing-x":h()}],"border-spacing-y":[{"border-spacing-y":h()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",d,l]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[g,"initial",d,l]}],ease:[{ease:["linear","initial",z,d,l]}],delay:[{delay:[g,d,l]}],animate:[{animate:["none",ee,d,l]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,d,l]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[d,l,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:m()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:m()}],"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",d,l]}],"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":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"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",d,l]}],fill:[{fill:["none",...m()]}],"stroke-w":[{stroke:[g,J,_,we]}],stroke:[{stroke:["none",...m()]}],"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"]}},br=Tt(Jt),nt=6048e5,Ut=864e5,ce=43200,Ie=1440,_e=Symbol.for("constructDateFrom");function k(e,n){return typeof e=="function"?e(n):e&&typeof e=="object"&&_e in e?e[_e](n):e instanceof Date?new e.constructor(n):new Date(n)}function w(e,n){return k(n||e,e)}function rt(e,n,t){const r=w(e,t?.in);return isNaN(n)?k(e,NaN):(n&&r.setDate(r.getDate()+n),r)}function Kt(e,n,t){const r=w(e,t?.in);if(isNaN(n))return k(e,NaN);if(!n)return r;const o=r.getDate(),a=k(e,r.getTime());a.setMonth(r.getMonth()+n+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Zt={};function B(){return Zt}function Z(e,n){const t=B(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,o=w(e,n?.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function ue(e,n){return Z(e,{...n,weekStartsOn:1})}function ot(e,n){const t=w(e,n?.in),r=t.getFullYear(),o=k(t,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ue(o),s=k(t,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=ue(s);return t.getTime()>=a.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function fe(e){const n=w(e),t=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return t.setUTCFullYear(n.getFullYear()),+e-+t}function A(e,...n){const t=k.bind(null,e||n.find(r=>typeof r=="object"));return n.map(t)}function me(e,n){const t=w(e,n?.in);return t.setHours(0,0,0,0),t}function en(e,n,t){const[r,o]=A(t?.in,e,n),a=me(r),s=me(o),i=+a-fe(a),c=+s-fe(s);return Math.round((i-c)/Ut)}function tn(e,n){const t=ot(e,n),r=k(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),ue(r)}function pr(e,n,t){return rt(e,n*7,t)}function wr(e,n,t){return Kt(e,n*12,t)}function yr(e,n){let t,r=n?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=k.bind(null,o));const a=w(o,r);(!t||t<a||isNaN(+a))&&(t=a)}),k(r,t||NaN)}function kr(e,n){let t,r=n?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=k.bind(null,o));const a=w(o,r);(!t||t>a||isNaN(+a))&&(t=a)}),k(r,t||NaN)}function le(e,n){const t=+w(e)-+w(n);return t<0?-1:t>0?1:t}function nn(e){return k(e,Date.now())}function xr(e,n,t){const[r,o]=A(t?.in,e,n);return+me(r)==+me(o)}function rn(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function on(e){return!(!rn(e)&&typeof e!="number"||isNaN(+w(e)))}function an(e,n,t){const[r,o]=A(t?.in,e,n),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function sn(e){return n=>{const r=(e?Math[e]:Math.trunc)(n);return r===0?0:r}}function cn(e,n){return+w(e)-+w(n)}function ln(e,n){const t=w(e,n?.in);return t.setHours(23,59,59,999),t}function dn(e,n){const t=w(e,n?.in),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function un(e,n){const t=w(e,n?.in);return+ln(t,n)==+dn(t,n)}function fn(e,n,t){const[r,o,a]=A(t?.in,e,e,n),s=le(o,a),i=Math.abs(an(o,a));if(i<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-s*i);let c=le(o,a)===-s;un(r)&&i===1&&le(r,a)===1&&(c=!1);const u=s*(i-+c);return u===0?0:u}function mn(e,n,t){const r=cn(e,n)/1e3;return sn(t?.roundingMethod)(r)}function at(e,n){const[t,r]=A(e,n.start,n.end);return{start:t,end:r}}function vr(e,n){const{start:t,end:r}=at(n?.in,e);let o=+t>+r;const a=o?+t:+r,s=o?r:t;s.setHours(0,0,0,0),s.setDate(1);let i=1;const c=[];for(;+s<=a;)c.push(k(t,s)),s.setMonth(s.getMonth()+i);return o?c.reverse():c}function Mr(e,n){const t=w(e,n?.in);return t.setDate(1),t.setHours(0,0,0,0),t}function Or(e,n){const t=w(e,n?.in),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function hn(e,n){const t=w(e,n?.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Dr(e,n){const{start:t,end:r}=at(n?.in,e);let o=+t>+r;const a=o?+t:+r,s=o?r:t;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const c=[];for(;+s<=a;)c.push(k(t,s)),s.setFullYear(s.getFullYear()+i);return o?c.reverse():c}function gn(e,n){const t=B(),r=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??t.weekStartsOn??t.locale?.options?.weekStartsOn??0,o=w(e,n?.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function Sr(e,n){return gn(e,{...n,weekStartsOn:1})}const bn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pn=(e,n,t)=>{let r;const o=bn[e];return typeof o=="string"?r=o:n===1?r=o.one:r=o.other.replace("{{count}}",n.toString()),t?.addSuffix?t.comparison&&t.comparison>0?"in "+r:r+" ago":r};function ye(e){return(n={})=>{const t=n.width?String(n.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}const wn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},kn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xn={date:ye({formats:wn,defaultWidth:"full"}),time:ye({formats:yn,defaultWidth:"full"}),dateTime:ye({formats:kn,defaultWidth:"full"})},vn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Mn=(e,n,t,r)=>vn[e];function U(e){return(n,t)=>{const r=t?.context?String(t.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=t?.width?String(t.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=t?.width?String(t.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(n):n;return o[a]}}const On={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Dn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Pn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Cn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Yn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Tn=(e,n)=>{const t=Number(e),r=t%100;if(r>20||r<10)switch(r%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},Wn={ordinalNumber:Tn,era:U({values:On,defaultWidth:"wide"}),quarter:U({values:Dn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:U({values:Sn,defaultWidth:"wide"}),day:U({values:Pn,defaultWidth:"wide"}),dayPeriod:U({values:Cn,defaultWidth:"wide",formattingValues:Yn,defaultFormattingWidth:"wide"})};function K(e){return(n,t={})=>{const r=t.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=n.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(i)?Fn(i,b=>b.test(s)):Nn(i,b=>b.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=t.valueCallback?t.valueCallback(u):u;const f=n.slice(s.length);return{value:u,rest:f}}}function Nn(e,n){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&n(e[t]))return t}function Fn(e,n){for(let t=0;t<e.length;t++)if(n(e[t]))return t}function An(e){return(n,t={})=>{const r=n.match(e.matchPattern);if(!r)return null;const o=r[0],a=n.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=t.valueCallback?t.valueCallback(s):s;const i=n.slice(o.length);return{value:s,rest:i}}}const zn=/^(\d+)(th|st|nd|rd)?/i,En=/\d+/i,In={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},_n={any:[/^b/i,/^(a|c)/i]},Rn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gn={any:[/1/i,/2/i,/3/i,/4/i]},jn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ln={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Hn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Vn={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Bn={ordinalNumber:An({matchPattern:zn,parsePattern:En,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:In,defaultMatchWidth:"wide",parsePatterns:_n,defaultParseWidth:"any"}),quarter:K({matchPatterns:Rn,defaultMatchWidth:"wide",parsePatterns:Gn,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:jn,defaultMatchWidth:"wide",parsePatterns:Ln,defaultParseWidth:"any"}),day:K({matchPatterns:qn,defaultMatchWidth:"wide",parsePatterns:Hn,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:Vn,defaultMatchWidth:"any",parsePatterns:Xn,defaultParseWidth:"any"})},st={code:"en-US",formatDistance:pn,formatLong:xn,formatRelative:Mn,localize:Wn,match:Bn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Qn(e,n){const t=w(e,n?.in);return en(t,hn(t))+1}function $n(e,n){const t=w(e,n?.in),r=+ue(t)-+tn(t);return Math.round(r/nt)+1}function it(e,n){const t=w(e,n?.in),r=t.getFullYear(),o=B(),a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=k(n?.in||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Z(s,n),c=k(n?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Z(c,n);return+t>=+i?r+1:+t>=+u?r:r-1}function Jn(e,n){const t=B(),r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,o=it(e,n),a=k(n?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Z(a,n)}function Un(e,n){const t=w(e,n?.in),r=+Z(t,n)-+Jn(t,n);return Math.round(r/nt)+1}function y(e,n){const t=e<0?"-":"",r=Math.abs(e).toString().padStart(n,"0");return t+r}const F={y(e,n){const t=e.getFullYear(),r=t>0?t:1-t;return y(n==="yy"?r%100:r,n.length)},M(e,n){const t=e.getMonth();return n==="M"?String(t+1):y(t+1,2)},d(e,n){return y(e.getDate(),n.length)},a(e,n){const t=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(e,n){return y(e.getHours()%12||12,n.length)},H(e,n){return y(e.getHours(),n.length)},m(e,n){return y(e.getMinutes(),n.length)},s(e,n){return y(e.getSeconds(),n.length)},S(e,n){const t=n.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,t-3));return y(o,n.length)}},H={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Re={G:function(e,n,t){const r=e.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return t.era(r,{width:"abbreviated"});case"GGGGG":return t.era(r,{width:"narrow"});case"GGGG":default:return t.era(r,{width:"wide"})}},y:function(e,n,t){if(n==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return t.ordinalNumber(o,{unit:"year"})}return F.y(e,n)},Y:function(e,n,t,r){const o=it(e,r),a=o>0?o:1-o;if(n==="YY"){const s=a%100;return y(s,2)}return n==="Yo"?t.ordinalNumber(a,{unit:"year"}):y(a,n.length)},R:function(e,n){const t=ot(e);return y(t,n.length)},u:function(e,n){const t=e.getFullYear();return y(t,n.length)},Q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return y(r,2);case"Qo":return t.ordinalNumber(r,{unit:"quarter"});case"QQQ":return t.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,n,t){const r=Math.ceil((e.getMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return y(r,2);case"qo":return t.ordinalNumber(r,{unit:"quarter"});case"qqq":return t.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,n,t){const r=e.getMonth();switch(n){case"M":case"MM":return F.M(e,n);case"Mo":return t.ordinalNumber(r+1,{unit:"month"});case"MMM":return t.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(r,{width:"wide",context:"formatting"})}},L:function(e,n,t){const r=e.getMonth();switch(n){case"L":return String(r+1);case"LL":return y(r+1,2);case"Lo":return t.ordinalNumber(r+1,{unit:"month"});case"LLL":return t.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(r,{width:"wide",context:"standalone"})}},w:function(e,n,t,r){const o=Un(e,r);return n==="wo"?t.ordinalNumber(o,{unit:"week"}):y(o,n.length)},I:function(e,n,t){const r=$n(e);return n==="Io"?t.ordinalNumber(r,{unit:"week"}):y(r,n.length)},d:function(e,n,t){return n==="do"?t.ordinalNumber(e.getDate(),{unit:"date"}):F.d(e,n)},D:function(e,n,t){const r=Qn(e);return n==="Do"?t.ordinalNumber(r,{unit:"dayOfYear"}):y(r,n.length)},E:function(e,n,t){const r=e.getDay();switch(n){case"E":case"EE":case"EEE":return t.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(r,{width:"short",context:"formatting"});case"EEEE":default:return t.day(r,{width:"wide",context:"formatting"})}},e:function(e,n,t,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(a);case"ee":return y(a,2);case"eo":return t.ordinalNumber(a,{unit:"day"});case"eee":return t.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(o,{width:"short",context:"formatting"});case"eeee":default:return t.day(o,{width:"wide",context:"formatting"})}},c:function(e,n,t,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(a);case"cc":return y(a,n.length);case"co":return t.ordinalNumber(a,{unit:"day"});case"ccc":return t.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(o,{width:"narrow",context:"standalone"});case"cccccc":return t.day(o,{width:"short",context:"standalone"});case"cccc":default:return t.day(o,{width:"wide",context:"standalone"})}},i:function(e,n,t){const r=e.getDay(),o=r===0?7:r;switch(n){case"i":return String(o);case"ii":return y(o,n.length);case"io":return t.ordinalNumber(o,{unit:"day"});case"iii":return t.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(r,{width:"short",context:"formatting"});case"iiii":default:return t.day(r,{width:"wide",context:"formatting"})}},a:function(e,n,t){const o=e.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,n,t){const r=e.getHours();let o;switch(r===12?o=H.noon:r===0?o=H.midnight:o=r/12>=1?"pm":"am",n){case"b":case"bb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,n,t){const r=e.getHours();let o;switch(r>=17?o=H.evening:r>=12?o=H.afternoon:r>=4?o=H.morning:o=H.night,n){case"B":case"BB":case"BBB":return t.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,n,t){if(n==="ho"){let r=e.getHours()%12;return r===0&&(r=12),t.ordinalNumber(r,{unit:"hour"})}return F.h(e,n)},H:function(e,n,t){return n==="Ho"?t.ordinalNumber(e.getHours(),{unit:"hour"}):F.H(e,n)},K:function(e,n,t){const r=e.getHours()%12;return n==="Ko"?t.ordinalNumber(r,{unit:"hour"}):y(r,n.length)},k:function(e,n,t){let r=e.getHours();return r===0&&(r=24),n==="ko"?t.ordinalNumber(r,{unit:"hour"}):y(r,n.length)},m:function(e,n,t){return n==="mo"?t.ordinalNumber(e.getMinutes(),{unit:"minute"}):F.m(e,n)},s:function(e,n,t){return n==="so"?t.ordinalNumber(e.getSeconds(),{unit:"second"}):F.s(e,n)},S:function(e,n){return F.S(e,n)},X:function(e,n,t){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(n){case"X":return je(r);case"XXXX":case"XX":return R(r);case"XXXXX":case"XXX":default:return R(r,":")}},x:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"x":return je(r);case"xxxx":case"xx":return R(r);case"xxxxx":case"xxx":default:return R(r,":")}},O:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Ge(r,":");case"OOOO":default:return"GMT"+R(r,":")}},z:function(e,n,t){const r=e.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Ge(r,":");case"zzzz":default:return"GMT"+R(r,":")}},t:function(e,n,t){const r=Math.trunc(+e/1e3);return y(r,n.length)},T:function(e,n,t){return y(+e,n.length)}};function Ge(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?t+String(o):t+String(o)+n+y(a,2)}function je(e,n){return e%60===0?(e>0?"-":"+")+y(Math.abs(e)/60,2):R(e,n)}function R(e,n=""){const t=e>0?"-":"+",r=Math.abs(e),o=y(Math.trunc(r/60),2),a=y(r%60,2);return t+o+n+a}const Le=(e,n)=>{switch(e){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},ct=(e,n)=>{switch(e){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Kn=(e,n)=>{const t=e.match(/(P+)(p+)?/)||[],r=t[1],o=t[2];if(!o)return Le(e,n);let a;switch(r){case"P":a=n.dateTime({width:"short"});break;case"PP":a=n.dateTime({width:"medium"});break;case"PPP":a=n.dateTime({width:"long"});break;case"PPPP":default:a=n.dateTime({width:"full"});break}return a.replace("{{date}}",Le(r,n)).replace("{{time}}",ct(o,n))},Zn={p:ct,P:Kn},er=/^D+$/,tr=/^Y+$/,nr=["D","DD","YY","YYYY"];function rr(e){return er.test(e)}function or(e){return tr.test(e)}function ar(e,n,t){const r=sr(e,n,t);if(console.warn(r),nr.includes(e))throw new RangeError(r)}function sr(e,n,t){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${n}\`) for formatting ${r} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ir=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lr=/^'([^]*?)'?$/,dr=/''/g,ur=/[a-zA-Z]/;function Pr(e,n,t){const r=B(),o=t?.locale??r.locale??st,a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=w(e,t?.in);if(!on(i))throw new RangeError("Invalid time value");let c=n.match(cr).map(f=>{const b=f[0];if(b==="p"||b==="P"){const p=Zn[b];return p(f,o.formatLong)}return f}).join("").match(ir).map(f=>{if(f==="''")return{isToken:!1,value:"'"};const b=f[0];if(b==="'")return{isToken:!1,value:fr(f)};if(Re[b])return{isToken:!0,value:f};if(b.match(ur))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:f}});o.localize.preprocessor&&(c=o.localize.preprocessor(i,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return c.map(f=>{if(!f.isToken)return f.value;const b=f.value;(!t?.useAdditionalWeekYearTokens&&or(b)||!t?.useAdditionalDayOfYearTokens&&rr(b))&&ar(b,n,String(e));const p=Re[b[0]];return p(i,b,o.localize,u)}).join("")}function fr(e){const n=e.match(lr);return n?n[1].replace(dr,"'"):e}function mr(e,n,t){const r=B(),o=t?.locale??r.locale??st,a=2520,s=le(e,n);if(isNaN(s))throw new RangeError("Invalid time value");const i=Object.assign({},t,{addSuffix:t?.addSuffix,comparison:s}),[c,u]=A(t?.in,...s>0?[n,e]:[e,n]),f=mn(u,c),b=(fe(u)-fe(c))/1e3,p=Math.round((f-b)/60);let S;if(p<2)return t?.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,i):f<10?o.formatDistance("lessThanXSeconds",10,i):f<20?o.formatDistance("lessThanXSeconds",20,i):f<40?o.formatDistance("halfAMinute",0,i):f<60?o.formatDistance("lessThanXMinutes",1,i):o.formatDistance("xMinutes",1,i):p===0?o.formatDistance("lessThanXMinutes",1,i):o.formatDistance("xMinutes",p,i);if(p<45)return o.formatDistance("xMinutes",p,i);if(p<90)return o.formatDistance("aboutXHours",1,i);if(p<Ie){const v=Math.round(p/60);return o.formatDistance("aboutXHours",v,i)}else{if(p<a)return o.formatDistance("xDays",1,i);if(p<ce){const v=Math.round(p/Ie);return o.formatDistance("xDays",v,i)}else if(p<ce*2)return S=Math.round(p/ce),o.formatDistance("aboutXMonths",S,i)}if(S=fn(u,c),S<12){const v=Math.round(p/ce);return o.formatDistance("xMonths",v,i)}else{const v=S%12,M=Math.trunc(S/12);return v<3?o.formatDistance("aboutXYears",M,i):v<9?o.formatDistance("overXYears",M,i):o.formatDistance("almostXYears",M+1,i)}}function Cr(e,n){return mr(e,nn(e),n)}function hr(e,n){const t=w(e,n?.in),r=t.getFullYear(),o=t.getMonth(),a=k(t,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Yr(e,n){return w(e,n?.in).getMonth()}function Tr(e,n){return w(e,n?.in).getFullYear()}function Wr(e,n){return+w(e)>+w(n)}function Nr(e,n){return+w(e)<+w(n)}function Fr(e,n,t){const[r,o]=A(t?.in,e,n);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Ar(e,n,t){const[r,o]=A(t?.in,e,n);return r.getFullYear()===o.getFullYear()}function zr(e,n,t){return rt(e,-n,t)}function Er(e,n,t){const r=w(e,t?.in),o=r.getFullYear(),a=r.getDate(),s=k(e,0);s.setFullYear(o,n,15),s.setHours(0,0,0,0);const i=hr(s);return r.setMonth(n,Math.min(a,i)),r}function Ir(e,n,t){const r=w(e,t?.in);return isNaN(+r)?k(e,NaN):(r.setFullYear(n),r)}export{Ar as A,yr as B,kr as C,Er as D,Ir as E,me as F,ue as G,Mr as H,Z as I,hn as J,zr as K,Cr as L,gr as a,rt as b,lt as c,Kt as d,st as e,Pr as f,pr as g,wr as h,en as i,an as j,vr as k,Dr as l,Sr as m,dn as n,gn as o,Or as p,$n as q,Yr as r,Tr as s,br as t,Un as u,Wr as v,Nr as w,rn as x,xr as y,Fr as z};
@@ -24,13 +24,16 @@
24
24
  href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
25
25
  rel="stylesheet"
26
26
  />
27
- <script type="module" crossorigin src="/assets/index-BBNncLQd.js"></script>
28
- <link rel="modulepreload" crossorigin href="/assets/react-vendor-DadlvKzT.js">
29
- <link rel="modulepreload" crossorigin href="/assets/radix-ui-Bhyw9pC9.js">
30
- <link rel="modulepreload" crossorigin href="/assets/tanstack-DZ3a6J0N.js">
31
- <link rel="modulepreload" crossorigin href="/assets/icons-CPPxUvb4.js">
32
- <link rel="modulepreload" crossorigin href="/assets/form-utils-CKETQmt9.js">
33
- <link rel="stylesheet" crossorigin href="/assets/index-CbKJobGP.css">
27
+ <script type="module" crossorigin src="/assets/index-B_TDeSrG.js"></script>
28
+ <link rel="modulepreload" crossorigin href="/assets/react-vendor-DMek_JCF.js">
29
+ <link rel="modulepreload" crossorigin href="/assets/radix-ui-VbLlN_Dz.js">
30
+ <link rel="modulepreload" crossorigin href="/assets/tanstack-yybD444-.js">
31
+ <link rel="modulepreload" crossorigin href="/assets/notifications-cqk-Qeo2.js">
32
+ <link rel="modulepreload" crossorigin href="/assets/utils-CzKF5WmX.js">
33
+ <link rel="modulepreload" crossorigin href="/assets/icons-DQ69xQew.js">
34
+ <link rel="modulepreload" crossorigin href="/assets/form-utils-BXvNPyud.js">
35
+ <link rel="modulepreload" crossorigin href="/assets/code-highlight-C2TXE0-z.js">
36
+ <link rel="stylesheet" crossorigin href="/assets/index-D6QWrdkq.css">
34
37
  </head>
35
38
  <body>
36
39
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaitranntt/ccs",
3
- "version": "6.1.0-dev.2",
3
+ "version": "6.1.0-dev.4",
4
4
  "description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
5
5
  "keywords": [
6
6
  "cli",
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-Bhyw9pC9.js";import{a as x,u as p,b as h,d as f,f as l,g as b}from"./tanstack-DZ3a6J0N.js";import"./react-vendor-DadlvKzT.js";import{c as r,O as u,Q as d,B as g}from"./index-BBNncLQd.js";import{k as j}from"./icons-CPPxUvb4.js";import"./form-utils-CKETQmt9.js";function y({className:s,...t}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-slot":"table",className:r("w-full caption-bottom text-sm",s),...t})})}function N({className:s,...t}){return e.jsx("thead",{"data-slot":"table-header",className:r("[&_tr]:border-b",s),...t})}function w({className:s,...t}){return e.jsx("tbody",{"data-slot":"table-body",className:r("[&_tr:last-child]:border-0",s),...t})}function i({className:s,...t}){return e.jsx("tr",{"data-slot":"table-row",className:r("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",s),...t})}function v({className:s,...t}){return e.jsx("th",{"data-slot":"table-head",className:r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function C({className:s,...t}){return e.jsx("td",{"data-slot":"table-cell",className:r("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...t})}function D(){return x({queryKey:["accounts"],queryFn:()=>u.accounts.list()})}function T(){const s=p();return h({mutationFn:t=>u.accounts.setDefault(t),onSuccess:(t,o)=>{s.invalidateQueries({queryKey:["accounts"]}),d.success(`Default account set to "${o}"`)},onError:t=>{d.error(t.message)}})}function A({data:s,defaultAccount:t}){const o=T(),c=f({data:s,columns:[{accessorKey:"name",header:"Name",size:200,cell:({row:a})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:a.original.name}),a.original.name===t&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:"default"})]})},{accessorKey:"type",header:"Type",size:100,cell:({row:a})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:a.original.type||"oauth"})},{accessorKey:"created",header:"Created",size:150,cell:({row:a})=>{const n=new Date(a.original.created);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{accessorKey:"last_used",header:"Last Used",size:150,cell:({row:a})=>{if(!a.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const n=new Date(a.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:n.toLocaleDateString()})}},{id:"actions",header:"Actions",size:100,cell:({row:a})=>{const n=a.original.name===t;return e.jsxs(g,{variant:n?"secondary":"default",size:"sm",className:"h-8 px-2 w-full",disabled:n||o.isPending,onClick:()=>o.mutate(a.original.name),children:[e.jsx(j,{className:`w-3 h-3 mr-1.5 ${n?"opacity-50":""}`}),n?"Active":"Set Default"]})}}],getCoreRowModel:b()});return s.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:["No accounts found. Use ",e.jsx("code",{className:"text-sm bg-muted px-1 rounded",children:"ccs login"})," to add accounts."]}):e.jsx("div",{className:"border rounded-md",children:e.jsxs(y,{children:[e.jsx(N,{children:c.getHeaderGroups().map(a=>e.jsx(i,{children:a.headers.map(n=>{const m={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",actions:"w-[100px]"}[n.id]||"w-auto";return e.jsx(v,{className:m,children:n.isPlaceholder?null:l(n.column.columnDef.header,n.getContext())},n.id)})},a.id))}),e.jsx(w,{children:c.getRowModel().rows.map(a=>e.jsx(i,{children:a.getVisibleCells().map(n=>e.jsx(C,{children:l(n.column.columnDef.cell,n.getContext())},n.id))},a.id))})]})})}function S(){const{data:s,isLoading:t}=D();return e.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Accounts"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage multi-account Claude sessions (profiles.json)"})]})}),t?e.jsx("div",{className:"text-muted-foreground",children:"Loading accounts..."}):e.jsx(A,{data:s?.accounts||[],defaultAccount:s?.default??null}),e.jsx("div",{className:"text-sm text-muted-foreground border-t pt-4 mt-4",children:e.jsxs("p",{children:["Accounts are isolated Claude instances with separate sessions.",e.jsx("br",{}),"Use ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"ccs auth create <name>"})," to add new accounts via CLI."]})})]})}export{S as AccountsPage};