@nicorp/nui 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +10 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +338 -0
- package/dist/index.es.js +6448 -5067
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react"),$o=require("@radix-ui/react-slot"),Ga=require("@radix-ui/react-label"),qa=require("@radix-ui/react-separator"),Ua=require("@radix-ui/react-avatar"),Wa=require("@radix-ui/react-checkbox"),I=require("lucide-react"),Xa=require("@radix-ui/react-switch"),Ya=require("@radix-ui/react-select"),Ka=require("@radix-ui/react-radio-group"),Ja=require("@radix-ui/react-slider"),Za=require("@radix-ui/react-toggle"),Qa=require("@radix-ui/react-toggle-group"),be=require("date-fns"),ei=require("@radix-ui/react-popover"),ti=require("@radix-ui/react-aspect-ratio"),ni=require("@radix-ui/react-collapsible"),oi=require("@radix-ui/react-scroll-area"),ri=require("@radix-ui/react-tabs"),si=require("@radix-ui/react-accordion"),ai=require("@radix-ui/react-dialog"),ii=require("@radix-ui/react-dropdown-menu"),li=require("@radix-ui/react-tooltip"),Me=require("cmdk"),di=require("@radix-ui/react-alert-dialog"),ci=require("@radix-ui/react-progress"),ui=require("react-dom"),fi=require("@radix-ui/react-navigation-menu"),mi=require("@radix-ui/react-context-menu"),gi=require("@radix-ui/react-hover-card"),En=require("recharts");function ee(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const v=ee(S),Lo=ee(Ga),zo=ee(qa),ct=ee(Ua),Sn=ee(Wa),Nn=ee(Xa),ae=ee(Ya),kt=ee(Ka),yt=ee(Ja),Oo=ee(Za),tn=ee(Qa),Mt=ee(ei),pi=ee(ti),An=ee(ni),tt=ee(oi),rt=ee(ri),nt=ee(si),K=ee(ai),Z=ee(ii),Tt=ee(li),je=ee(di),Rn=ee(ci),_e=ee(fi),Q=ee(mi),nn=ee(gi);function Bo(e){var n,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(n=0;n<r;n++)e[n]&&(t=Bo(e[n]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Ho(){for(var e,n,t=0,o="",r=arguments.length;t<r;t++)(e=arguments[t])&&(n=Bo(e))&&(o&&(o+=" "),o+=n);return o}const hi=(e,n)=>{const t=new Array(e.length+n.length);for(let o=0;o<e.length;o++)t[o]=e[o];for(let o=0;o<n.length;o++)t[e.length+o]=n[o];return t},xi=(e,n)=>({classGroupId:e,validator:n}),Go=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Jt="-",yo=[],bi="arbitrary..",vi=e=>{const n=yi(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return wi(i);const l=i.split(Jt),u=l[0]===""&&l.length>1?1:0;return qo(l,u,n)},getConflictingClassGroupIds:(i,l)=>{if(l){const u=o[i],d=t[i];return u?d?hi(d,u):u:d||yo}return t[i]||yo}}},qo=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const r=e[n],s=t.nextPart.get(r);if(s){const d=qo(e,n+1,s);if(d)return d}const i=t.validators;if(i===null)return;const l=n===0?e.join(Jt):e.slice(n).join(Jt),u=i.length;for(let d=0;d<u;d++){const f=i[d];if(f.validator(l))return f.classGroupId}},wi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),o=n.slice(0,t);return o?bi+o:void 0})(),yi=e=>{const{theme:n,classGroups:t}=e;return Ci(t,n)},Ci=(e,n)=>{const t=Go();for(const o in e){const r=e[o];Vn(r,t,o,n)}return t},Vn=(e,n,t,o)=>{const r=e.length;for(let s=0;s<r;s++){const i=e[s];Si(i,n,t,o)}},Si=(e,n,t,o)=>{if(typeof e=="string"){Ni(e,n,t);return}if(typeof e=="function"){Ri(e,n,t,o);return}ji(e,n,t,o)},Ni=(e,n,t)=>{const o=e===""?n:Uo(n,e);o.classGroupId=t},Ri=(e,n,t,o)=>{if(ki(e)){Vn(e(o),n,t,o);return}n.validators===null&&(n.validators=[]),n.validators.push(xi(t,e))},ji=(e,n,t,o)=>{const r=Object.entries(e),s=r.length;for(let i=0;i<s;i++){const[l,u]=r[i];Vn(u,Uo(n,l),t,o)}},Uo=(e,n)=>{let t=e;const o=n.split(Jt),r=o.length;for(let s=0;s<r;s++){const i=o[s];let l=t.nextPart.get(i);l||(l=Go(),t.nextPart.set(i,l)),t=l}return t},ki=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Mi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),o=Object.create(null);const r=(s,i)=>{t[s]=i,n++,n>e&&(n=0,o=t,t=Object.create(null))};return{get(s){let i=t[s];if(i!==void 0)return i;if((i=o[s])!==void 0)return r(s,i),i},set(s,i){s in t?t[s]=i:r(s,i)}}},jn="!",Co=":",_i=[],So=(e,n,t,o,r)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:o,isExternal:r}),Pi=e=>{const{prefix:n,experimentalParseClassName:t}=e;let o=r=>{const s=[];let i=0,l=0,u=0,d;const f=r.length;for(let x=0;x<f;x++){const w=r[x];if(i===0&&l===0){if(w===Co){s.push(r.slice(u,x)),u=x+1;continue}if(w==="/"){d=x;continue}}w==="["?i++:w==="]"?i--:w==="("?l++:w===")"&&l--}const c=s.length===0?r:r.slice(u);let g=c,m=!1;c.endsWith(jn)?(g=c.slice(0,-1),m=!0):c.startsWith(jn)&&(g=c.slice(1),m=!0);const p=d&&d>u?d-u:void 0;return So(s,m,g,p)};if(n){const r=n+Co,s=o;o=i=>i.startsWith(r)?s(i.slice(r.length)):So(_i,!1,i,void 0,!0)}if(t){const r=o;o=s=>t({className:s,parseClassName:r})}return o},Ii=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,o)=>{n.set(t,1e6+o)}),t=>{const o=[];let r=[];for(let s=0;s<t.length;s++){const i=t[s],l=i[0]==="[",u=n.has(i);l||u?(r.length>0&&(r.sort(),o.push(...r),r=[]),o.push(i)):r.push(i)}return r.length>0&&(r.sort(),o.push(...r)),o}},Ti=e=>({cache:Mi(e.cacheSize),parseClassName:Pi(e),sortModifiers:Ii(e),...vi(e)}),Di=/\s+/,Fi=(e,n)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:r,sortModifiers:s}=n,i=[],l=e.trim().split(Di);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:c,modifiers:g,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:x}=t(f);if(c){u=f+(u.length>0?" "+u:u);continue}let w=!!x,h=o(w?p.substring(0,x):p);if(!h){if(!w){u=f+(u.length>0?" "+u:u);continue}if(h=o(p),!h){u=f+(u.length>0?" "+u:u);continue}w=!1}const y=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=m?y+jn:y,_=C+h;if(i.indexOf(_)>-1)continue;i.push(_);const F=r(h,w);for(let T=0;T<F.length;++T){const D=F[T];i.push(C+D)}u=f+(u.length>0?" "+u:u)}return u},Ei=(...e)=>{let n=0,t,o,r="";for(;n<e.length;)(t=e[n++])&&(o=Wo(t))&&(r&&(r+=" "),r+=o);return r},Wo=e=>{if(typeof e=="string")return e;let n,t="";for(let o=0;o<e.length;o++)e[o]&&(n=Wo(e[o]))&&(t&&(t+=" "),t+=n);return t},Ai=(e,...n)=>{let t,o,r,s;const i=u=>{const d=n.reduce((f,c)=>c(f),e());return t=Ti(d),o=t.cache.get,r=t.cache.set,s=l,l(u)},l=u=>{const d=o(u);if(d)return d;const f=Fi(u,t);return r(u,f),f};return s=i,(...u)=>s(Ei(...u))},Vi=[],he=e=>{const n=t=>t[e]||Vi;return n.isThemeGetter=!0,n},Xo=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yo=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$i=/^\d+\/\d+$/,Li=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zi=/\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$/,Oi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Bi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dt=e=>$i.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),mn=e=>e.endsWith("%")&&H(e.slice(0,-1)),qe=e=>Li.test(e),Gi=()=>!0,qi=e=>zi.test(e)&&!Oi.test(e),Ko=()=>!1,Ui=e=>Bi.test(e),Wi=e=>Hi.test(e),Xi=e=>!k(e)&&!M(e),Yi=e=>ut(e,Qo,Ko),k=e=>Xo.test(e),et=e=>ut(e,er,qi),gn=e=>ut(e,el,H),No=e=>ut(e,Jo,Ko),Ki=e=>ut(e,Zo,Wi),Gt=e=>ut(e,tr,Ui),M=e=>Yo.test(e),bt=e=>ft(e,er),Ji=e=>ft(e,tl),Ro=e=>ft(e,Jo),Zi=e=>ft(e,Qo),Qi=e=>ft(e,Zo),qt=e=>ft(e,tr,!0),ut=(e,n,t)=>{const o=Xo.exec(e);return o?o[1]?n(o[1]):t(o[2]):!1},ft=(e,n,t=!1)=>{const o=Yo.exec(e);return o?o[1]?n(o[1]):t:!1},Jo=e=>e==="position"||e==="percentage",Zo=e=>e==="image"||e==="url",Qo=e=>e==="length"||e==="size"||e==="bg-size",er=e=>e==="length",el=e=>e==="number",tl=e=>e==="family-name",tr=e=>e==="shadow",nl=()=>{const e=he("color"),n=he("font"),t=he("text"),o=he("font-weight"),r=he("tracking"),s=he("leading"),i=he("breakpoint"),l=he("container"),u=he("spacing"),d=he("radius"),f=he("shadow"),c=he("inset-shadow"),g=he("text-shadow"),m=he("drop-shadow"),p=he("blur"),x=he("perspective"),w=he("aspect"),h=he("ease"),y=he("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[..._(),M,k],T=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],N=()=>[M,k,u],$=()=>[dt,"full","auto",...N()],X=()=>[We,"none","subgrid",M,k],G=()=>["auto",{span:["full",We,M,k]},We,M,k],J=()=>[We,"auto",M,k],te=()=>["auto","min","max","fr",M,k],ge=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...N()],q=()=>[dt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],j=()=>[e,M,k],ue=()=>[..._(),Ro,No,{position:[M,k]}],fe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ie=()=>["auto","cover","contain",Zi,Yi,{size:[M,k]}],Se=()=>[mn,bt,et],P=()=>["","none","full",d,M,k],V=()=>["",H,bt,et],U=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>[H,mn,Ro,No],z=()=>["","none",p,M,k],de=()=>["none",H,M,k],se=()=>["none",H,M,k],W=()=>[H,M,k],R=()=>[dt,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qe],breakpoint:[qe],color:[Gi],container:[qe],"drop-shadow":[qe],ease:["in","out","in-out"],font:[Xi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qe],shadow:[qe],spacing:["px",H],text:[qe],"text-shadow":[qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dt,k,M,w]}],container:["container"],columns:[{columns:[H,k,M,l]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:F()}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",M,k]}],basis:[{basis:[dt,"full","auto",l,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,dt,"auto","initial","none",k]}],grow:[{grow:["",H,M,k]}],shrink:[{shrink:["",H,M,k]}],order:[{order:[We,"first","last","none",M,k]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...ge(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...ge()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":ge()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],w:[{w:[l,"screen",...q()]}],"min-w":[{"min-w":[l,"screen","none",...q()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",t,bt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,M,gn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mn,k]}],"font-family":[{font:[Ji,k,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:[r,M,k]}],"line-clamp":[{"line-clamp":[H,"none",M,gn]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",M,k]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,k]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",M,et]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[H,"auto",M,k]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,k]}],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",M,k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:fe()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,M,k],radial:["",M,k],conic:[We,M,k]},Qi,Ki]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],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:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":V()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,M,k]}],"outline-w":[{outline:["",H,bt,et]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",f,qt,Gt]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",c,qt,Gt]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[H,et]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",g,qt,Gt]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[H,M,k]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":B()}],"mask-image-linear-to-pos":[{"mask-linear-to":B()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":B()}],"mask-image-t-to-pos":[{"mask-t-to":B()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":B()}],"mask-image-r-to-pos":[{"mask-r-to":B()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":B()}],"mask-image-b-to-pos":[{"mask-b-to":B()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":B()}],"mask-image-l-to-pos":[{"mask-l-to":B()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":B()}],"mask-image-x-to-pos":[{"mask-x-to":B()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":B()}],"mask-image-y-to-pos":[{"mask-y-to":B()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[M,k]}],"mask-image-radial-from-pos":[{"mask-radial-from":B()}],"mask-image-radial-to-pos":[{"mask-radial-to":B()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":B()}],"mask-image-conic-to-pos":[{"mask-conic-to":B()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:fe()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",M,k]}],filter:[{filter:["","none",M,k]}],blur:[{blur:z()}],brightness:[{brightness:[H,M,k]}],contrast:[{contrast:[H,M,k]}],"drop-shadow":[{"drop-shadow":["","none",m,qt,Gt]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",H,M,k]}],"hue-rotate":[{"hue-rotate":[H,M,k]}],invert:[{invert:["",H,M,k]}],saturate:[{saturate:[H,M,k]}],sepia:[{sepia:["",H,M,k]}],"backdrop-filter":[{"backdrop-filter":["","none",M,k]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[H,M,k]}],"backdrop-contrast":[{"backdrop-contrast":[H,M,k]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,M,k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,M,k]}],"backdrop-invert":[{"backdrop-invert":["",H,M,k]}],"backdrop-opacity":[{"backdrop-opacity":[H,M,k]}],"backdrop-saturate":[{"backdrop-saturate":[H,M,k]}],"backdrop-sepia":[{"backdrop-sepia":["",H,M,k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,k]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",M,k]}],ease:[{ease:["linear","initial",h,M,k]}],delay:[{delay:[H,M,k]}],animate:[{animate:["none",y,M,k]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,M,k]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[M,k,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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",M,k]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,k]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[H,bt,et,gn]}],stroke:[{stroke:["none",...j()]}],"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"]}},ol=Ai(nl);function b(...e){return ol(Ho(e))}const jo=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ko=Ho,Fe=(e,n)=>t=>{var o;if((n==null?void 0:n.variants)==null)return ko(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:s}=n,i=Object.keys(r).map(d=>{const f=t==null?void 0:t[d],c=s==null?void 0:s[d];if(f===null)return null;const g=jo(f)||jo(c);return r[d][g]}),l=t&&Object.entries(t).reduce((d,f)=>{let[c,g]=f;return g===void 0||(d[c]=g),d},{}),u=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((d,f)=>{let{class:c,className:g,...m}=f;return Object.entries(m).every(p=>{let[x,w]=p;return Array.isArray(w)?w.includes({...s,...l}[x]):{...s,...l}[x]===w})?[...d,c,g]:d},[]);return ko(e,i,u,t==null?void 0:t.class,t==null?void 0:t.className)},Dt=Fe("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",brand:"bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-500 hover:to-indigo-500 shadow-lg shadow-violet-500/25 hover:shadow-violet-500/40 hover:scale-[1.02] active:scale-[0.98]",glow:"bg-primary text-primary-foreground shadow-[0_0_20px_rgba(139,92,246,0.5)] hover:shadow-[0_0_30px_rgba(139,92,246,0.7)] hover:scale-[1.02] active:scale-[0.98]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-lg px-10 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),me=v.forwardRef(({className:e,variant:n,size:t,asChild:o=!1,...r},s)=>{const i=o?$o.Slot:"button";return a.jsx(i,{className:b(Dt({variant:n,size:t,className:e})),ref:s,...r})});me.displayName="Button";const nr=Fe("flex w-full rounded-lg text-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",filled:"h-10 border-0 bg-muted/50 px-3 py-2 focus-visible:outline-none focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",glow:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:border-violet-500/50 focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:shadow-[0_0_15px_rgba(139,92,246,0.3)]",ghost:"h-10 border-0 bg-transparent px-3 py-2 focus-visible:outline-none focus-visible:bg-muted/30"},inputSize:{default:"h-10",sm:"h-9 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",inputSize:"default"}}),Ke=v.forwardRef(({className:e,type:n,variant:t,inputSize:o,...r},s)=>a.jsx("input",{type:n,className:b(nr({variant:t,inputSize:o}),e),ref:s,...r}));Ke.displayName="Input";const or=v.forwardRef(({className:e,...n},t)=>a.jsx("textarea",{className:b("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:t,...n}));or.displayName="Textarea";const rl=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),on=v.forwardRef(({className:e,...n},t)=>a.jsx(Lo.Root,{ref:t,className:b(rl(),e),...n}));on.displayName=Lo.Root.displayName;const rr=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function $n({className:e,variant:n,...t}){return a.jsx("div",{className:b(rr({variant:n}),e),...t})}const sr=v.forwardRef(({className:e,orientation:n="horizontal",...t},o)=>a.jsx(zo.Root,{ref:o,decorative:!0,orientation:n,className:b("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...t}));sr.displayName=zo.Root.displayName;const ar=v.forwardRef(({className:e,...n},t)=>a.jsx(ct.Root,{ref:t,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));ar.displayName=ct.Root.displayName;const ir=v.forwardRef(({className:e,...n},t)=>a.jsx(ct.Image,{ref:t,className:b("aspect-square h-full w-full",e),...n}));ir.displayName=ct.Image.displayName;const lr=v.forwardRef(({className:e,...n},t)=>a.jsx(ct.Fallback,{ref:t,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...n}));lr.displayName=ct.Fallback.displayName;const dr=v.forwardRef(({className:e,...n},t)=>a.jsx(Sn.Root,{ref:t,className:b("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:a.jsx(Sn.Indicator,{className:b("flex items-center justify-center text-current"),children:a.jsx(I.Check,{className:"h-4 w-4"})})}));dr.displayName=Sn.Root.displayName;const cr=v.forwardRef(({className:e,...n},t)=>a.jsx(Nn.Root,{className:b("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...n,ref:t,children:a.jsx(Nn.Thumb,{className:b("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));cr.displayName=Nn.Root.displayName;const sl=ae.Root,al=ae.Group,il=ae.Value,ur=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(ae.Trigger,{ref:o,className:b("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...t,children:[n,a.jsx(ae.Icon,{asChild:!0,children:a.jsx(I.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ur.displayName=ae.Trigger.displayName;const Ln=v.forwardRef(({className:e,...n},t)=>a.jsx(ae.ScrollUpButton,{ref:t,className:b("flex cursor-default items-center justify-center py-1",e),...n,children:a.jsx(I.ChevronUp,{className:"h-4 w-4"})}));Ln.displayName=ae.ScrollUpButton.displayName;const zn=v.forwardRef(({className:e,...n},t)=>a.jsx(ae.ScrollDownButton,{ref:t,className:b("flex cursor-default items-center justify-center py-1",e),...n,children:a.jsx(I.ChevronDown,{className:"h-4 w-4"})}));zn.displayName=ae.ScrollDownButton.displayName;const fr=v.forwardRef(({className:e,children:n,position:t="popper",...o},r)=>a.jsx(ae.Portal,{children:a.jsxs(ae.Content,{ref:r,className:b("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:t,...o,children:[a.jsx(Ln,{}),a.jsx(ae.Viewport,{className:b("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),a.jsx(zn,{})]})}));fr.displayName=ae.Content.displayName;const mr=v.forwardRef(({className:e,...n},t)=>a.jsx(ae.Label,{ref:t,className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...n}));mr.displayName=ae.Label.displayName;const gr=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(ae.Item,{ref:o,className:b("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ae.ItemIndicator,{children:a.jsx(I.Check,{className:"h-4 w-4"})})}),a.jsx(ae.ItemText,{children:n})]}));gr.displayName=ae.Item.displayName;const pr=v.forwardRef(({className:e,...n},t)=>a.jsx(ae.Separator,{ref:t,className:b("-mx-1 my-1 h-px bg-muted",e),...n}));pr.displayName=ae.Separator.displayName;const hr=v.forwardRef(({className:e,...n},t)=>a.jsx(kt.Root,{className:b("grid gap-2",e),...n,ref:t}));hr.displayName=kt.Root.displayName;const xr=v.forwardRef(({className:e,...n},t)=>a.jsx(kt.Item,{ref:t,className:b("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:a.jsx(kt.Indicator,{className:"flex items-center justify-center",children:a.jsx(I.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));xr.displayName=kt.Item.displayName;const br=v.forwardRef(({className:e,...n},t)=>a.jsxs(yt.Root,{ref:t,className:b("relative flex w-full touch-none select-none items-center",e),...n,children:[a.jsx(yt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:a.jsx(yt.Range,{className:"absolute h-full bg-primary"})}),a.jsx(yt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));br.displayName=yt.Root.displayName;const On=Fe("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),vr=v.forwardRef(({className:e,variant:n,size:t,...o},r)=>a.jsx(Oo.Root,{ref:r,className:b(On({variant:n,size:t,className:e})),...o}));vr.displayName=Oo.Root.displayName;const wr=v.forwardRef(({className:e,variant:n,size:t,children:o,...r},s)=>a.jsx(tn.Root,{ref:s,className:b("flex items-center justify-center gap-1",e),...r,children:a.jsx(yr.Provider,{value:{variant:n,size:t},children:o})}));wr.displayName=tn.Root.displayName;const yr=v.createContext({size:"default",variant:"default"}),Cr=v.forwardRef(({className:e,children:n,variant:t,size:o,...r},s)=>{const i=v.useContext(yr);return a.jsx(tn.Item,{ref:s,className:b(On({variant:i.variant||t,size:i.size||o}),e),...r,children:n})});Cr.displayName=tn.Item.displayName;function Bn({selected:e,onSelect:n,className:t,disabled:o}){const[r,s]=v.useState(()=>e?be.startOfMonth(e):be.startOfMonth(new Date)),i=be.startOfMonth(r),l=be.endOfMonth(r),u=be.startOfWeek(i,{weekStartsOn:1}),d=be.endOfWeek(l,{weekStartsOn:1}),f=be.eachDayOfInterval({start:u,end:d}),c=["Mo","Tu","We","Th","Fr","Sa","Su"],g=()=>{s(be.subMonths(r,1))},m=()=>{s(be.addMonths(r,1))},p=x=>{o!=null&&o(x)||n==null||n(be.isSameDay(x,e||new Date(0))?void 0:x)};return a.jsxs("div",{className:b("p-4 bg-card rounded-xl border shadow-sm w-[320px]",t),children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx(me,{variant:"ghost",size:"icon",onClick:g,className:"h-8 w-8 rounded-full hover:bg-accent",children:a.jsx(I.ChevronLeft,{className:"h-4 w-4"})}),a.jsx("h2",{className:"text-base font-semibold",children:be.format(r,"MMMM yyyy")}),a.jsx(me,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:a.jsx(I.ChevronRight,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:c.map(x=>a.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:x},x))}),a.jsx("div",{className:"grid grid-cols-7 gap-1",children:f.map((x,w)=>{const h=be.isSameMonth(x,r),y=e&&be.isSameDay(x,e),C=be.isToday(x),_=o==null?void 0:o(x);return a.jsx("button",{onClick:()=>p(x),disabled:_,className:b("h-10 w-10 rounded-lg text-sm font-medium transition-all duration-150","flex items-center justify-center","hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1",!h&&"text-muted-foreground/40",h&&!y&&"text-foreground hover:text-foreground",y&&"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md",C&&!y&&"bg-accent text-accent-foreground font-bold",_&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:be.format(x,"d")},w)})}),a.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[a.jsx(me,{variant:"ghost",size:"sm",onClick:()=>{const x=new Date;s(be.startOfMonth(x)),n==null||n(x)},className:"text-xs",children:"Today"}),e&&a.jsx("span",{className:"text-xs text-muted-foreground",children:be.format(e,"MMM d, yyyy")})]})]})}Bn.displayName="Calendar";const mt=Mt.Root,gt=Mt.Trigger,st=v.forwardRef(({className:e,align:n="center",sideOffset:t=4,...o},r)=>a.jsx(Mt.Portal,{children:a.jsx(Mt.Content,{ref:r,align:n,sideOffset:t,className:b("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));st.displayName=Mt.Content.displayName;function ll({value:e,onChange:n,placeholder:t="Pick a date",disabled:o,className:r}){const[s,i]=v.useState(!1);return a.jsxs(mt,{open:s,onOpenChange:i,children:[a.jsx(gt,{asChild:!0,children:a.jsxs(me,{variant:"outline",disabled:o,className:b("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",r),children:[a.jsx(I.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?be.format(e,"PPP"):a.jsx("span",{children:t})]})}),a.jsx(st,{className:"w-auto p-0",align:"start",children:a.jsx(Bn,{selected:e,onSelect:l=>{n==null||n(l),i(!1)}})})]})}function dl({value:e={hours:12,minutes:0},onChange:n,is24Hour:t=!1,disabled:o,className:r}){const[s,i]=v.useState(!1),[l,u]=v.useState(e.hours>=12?"PM":"AM"),d=t?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,f=()=>{const w=d.toString().padStart(2,"0"),h=e.minutes.toString().padStart(2,"0");return t?`${w}:${h}`:`${w}:${h} ${l}`},c=w=>{let h=w;t||(l==="PM"&&w!==12&&(h+=12),l==="AM"&&w===12&&(h=0)),n==null||n({...e,hours:h})},g=w=>{n==null||n({...e,minutes:w})},m=w=>{u(w);let h=e.hours;w==="PM"&&e.hours<12&&(h+=12),w==="AM"&&e.hours>=12&&(h-=12),n==null||n({...e,hours:h})},p=t?Array.from({length:24},(w,h)=>h):Array.from({length:12},(w,h)=>h+1),x=Array.from({length:12},(w,h)=>h*5);return a.jsxs(mt,{open:s,onOpenChange:i,children:[a.jsx(gt,{asChild:!0,children:a.jsxs(me,{variant:"outline",disabled:o,className:b("w-full justify-start font-normal",r),children:[a.jsx(I.Clock,{className:"mr-2 h-4 w-4"}),f()]})}),a.jsx(st,{className:"w-auto p-2",align:"start",children:a.jsxs("div",{className:"flex gap-1",children:[a.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:p.map(w=>a.jsx("button",{onClick:()=>c(w),className:b("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",d===w&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:w.toString().padStart(2,"0")},w))}),a.jsx("div",{className:"flex items-center text-muted-foreground font-bold",children:":"}),a.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:x.map(w=>a.jsx("button",{onClick:()=>g(w),className:b("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",e.minutes===w&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:w.toString().padStart(2,"0")},w))}),!t&&a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsx("button",{onClick:()=>m("AM"),className:b("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="AM"&&"bg-primary text-primary-foreground border-primary"),children:"AM"}),a.jsx("button",{onClick:()=>m("PM"),className:b("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="PM"&&"bg-primary text-primary-foreground border-primary"),children:"PM"})]})]})})]})}function cl({value:e=0,onChange:n,min:t=-1/0,max:o=1/0,step:r=1,disabled:s,className:i}){const l=()=>{const f=Math.min(e+r,o);n==null||n(f)},u=()=>{const f=Math.max(e-r,t);n==null||n(f)},d=f=>{const c=parseFloat(f.target.value);if(!isNaN(c)){const g=Math.min(Math.max(c,t),o);n==null||n(g)}};return a.jsxs("div",{className:b("flex items-center gap-2",i),children:[a.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:u,disabled:s||e<=t,className:"h-9 w-9",children:a.jsx(I.Minus,{className:"h-4 w-4"})}),a.jsx(Ke,{type:"number",value:e,onChange:d,disabled:s,className:"w-20 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:t,max:o,step:r}),a.jsx(me,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:s||e>=o,className:"h-9 w-9",children:a.jsx(I.Plus,{className:"h-4 w-4"})})]})}function ul({values:e=[],onChange:n,placeholder:t="Add tag...",disabled:o,className:r,maxTags:s}){const[i,l]=v.useState(""),u=v.useRef(null),d=c=>{if(c.key==="Enter"&&i.trim()){if(c.preventDefault(),s&&e.length>=s)return;e.includes(i.trim())||n==null||n([...e,i.trim()]),l("")}else c.key==="Backspace"&&!i&&e.length>0&&(n==null||n(e.slice(0,-1)))},f=c=>{n==null||n(e.filter(g=>g!==c))};return a.jsxs("div",{className:b("flex flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",o&&"opacity-50 cursor-not-allowed",r),onClick:()=>{var c;return(c=u.current)==null?void 0:c.focus()},children:[e.map(c=>a.jsxs($n,{variant:"secondary",className:"gap-1",children:[c,!o&&a.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),f(c)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:a.jsx(I.X,{className:"h-3 w-3"})})]},c)),a.jsx("input",{ref:u,type:"text",value:i,onChange:c=>l(c.target.value),onKeyDown:d,placeholder:e.length===0?t:"",disabled:o||(s?e.length>=s:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function fl({options:e,value:n,onChange:t,placeholder:o="Select option...",searchPlaceholder:r="Search...",emptyText:s="No results found.",disabled:i,className:l}){const[u,d]=v.useState(!1),[f,c]=v.useState(""),g=e.filter(p=>p.label.toLowerCase().includes(f.toLowerCase())),m=e.find(p=>p.value===n);return a.jsxs(mt,{open:u,onOpenChange:d,children:[a.jsx(gt,{asChild:!0,children:a.jsxs(me,{variant:"outline",role:"combobox","aria-expanded":u,disabled:i,className:b("w-full justify-between font-normal",!n&&"text-muted-foreground",l),children:[m?m.label:o,a.jsx(I.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),a.jsxs(st,{className:"w-full p-0",align:"start",children:[a.jsx("div",{className:"p-2 border-b",children:a.jsx(Ke,{placeholder:r,value:f,onChange:p=>c(p.target.value),className:"h-8"})}),a.jsx("div",{className:"max-h-60 overflow-auto p-1",children:g.length===0?a.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}):g.map(p=>a.jsxs("button",{onClick:()=>{t==null||t(p.value===n?"":p.value),d(!1),c("")},className:b("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",n===p.value&&"bg-accent"),children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:n===p.value&&a.jsx(I.Check,{className:"h-4 w-4"})}),p.label]},p.value))})]})]})}function ml({options:e,value:n=[],onChange:t,placeholder:o="Select options...",searchPlaceholder:r="Search...",emptyText:s="No results found.",disabled:i,className:l,maxDisplay:u=3}){const[d,f]=v.useState(!1),[c,g]=v.useState(""),m=e.filter(y=>y.label.toLowerCase().includes(c.toLowerCase())),p=e.filter(y=>n.includes(y.value)),x=y=>{const C=n.includes(y)?n.filter(_=>_!==y):[...n,y];t==null||t(C)},w=(y,C)=>{C.stopPropagation(),t==null||t(n.filter(_=>_!==y))},h=()=>n.length===0?o:n.length<=u?p.map(y=>y.label).join(", "):`${n.length} selected`;return a.jsxs(mt,{open:d,onOpenChange:f,children:[a.jsx(gt,{asChild:!0,children:a.jsxs(me,{variant:"outline",role:"combobox","aria-expanded":d,disabled:i,className:b("w-full justify-between font-normal",n.length===0&&"text-muted-foreground",l),children:[a.jsx("span",{className:"truncate",children:h()}),a.jsx(I.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),a.jsxs(st,{className:"w-full p-0",align:"start",children:[a.jsx("div",{className:"p-2 border-b",children:a.jsx(Ke,{placeholder:r,value:c,onChange:y=>g(y.target.value),className:"h-8"})}),n.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:p.map(y=>a.jsxs($n,{variant:"secondary",className:"pr-1",children:[y.label,a.jsx("button",{onClick:C=>w(y.value,C),className:"ml-1 rounded-full hover:bg-muted",children:a.jsx(I.X,{className:"h-3 w-3"})})]},y.value))}),a.jsx("div",{className:"max-h-60 overflow-auto p-1",children:m.length===0?a.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:s}):m.map(y=>{const C=n.includes(y.value);return a.jsxs("button",{onClick:()=>x(y.value),className:b("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",C&&"bg-accent"),children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:C&&a.jsx(I.Check,{className:"h-4 w-4"})}),y.label]},y.value)})})]})]})}function gl({length:e=6,value:n="",onChange:t,onComplete:o,disabled:r,className:s}){const i=v.useRef([]),l=(f,c)=>{var p;if(!/^\d*$/.test(c))return;const g=n.split("");g[f]=c;const m=g.join("").slice(0,e);t==null||t(m),c&&f<e-1&&((p=i.current[f+1])==null||p.focus()),m.length===e&&(o==null||o(m))},u=(f,c)=>{var g;c.key==="Backspace"&&!n[f]&&f>0&&((g=i.current[f-1])==null||g.focus())},d=f=>{var g;f.preventDefault();const c=f.clipboardData.getData("text").replace(/\D/g,"").slice(0,e);t==null||t(c),c.length===e&&(o==null||o(c)),(g=i.current[Math.min(c.length,e-1)])==null||g.focus()};return a.jsx("div",{className:b("flex gap-2",s),children:Array.from({length:e}).map((f,c)=>a.jsx("input",{ref:g=>{i.current[c]=g},type:"text",inputMode:"numeric",maxLength:1,value:n[c]||"",onChange:g=>l(c,g.target.value),onKeyDown:g=>u(c,g),onPaste:d,disabled:r,className:b("h-12 w-12 rounded-lg border border-input bg-background text-center text-lg font-semibold","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed")},c))})}function pl({accept:e,maxSize:n,multiple:t=!1,onUpload:o,disabled:r,className:s}){const[i,l]=v.useState([]),[u,d]=v.useState(!1),f=v.useRef(null),c=h=>{if(!h)return;const y=Array.from(h).filter(_=>!(n&&_.size>n)),C=t?[...i,...y]:y.slice(0,1);l(C),o==null||o(C)},g=h=>{h.preventDefault(),d(!1),r||c(h.dataTransfer.files)},m=h=>{h.preventDefault(),r||d(!0)},p=()=>{d(!1)},x=h=>{const y=i.filter((C,_)=>_!==h);l(y),o==null||o(y)},w=h=>h<1024?h+" B":h<1024*1024?(h/1024).toFixed(1)+" KB":(h/(1024*1024)).toFixed(1)+" MB";return a.jsxs("div",{className:b("space-y-4",s),children:[a.jsxs("div",{onClick:()=>{var h;return!r&&((h=f.current)==null?void 0:h.click())},onDrop:g,onDragOver:m,onDragLeave:p,className:b("border-2 border-dashed rounded-lg p-8 text-center transition-colors cursor-pointer",u?"border-primary bg-primary/5":"border-muted-foreground/25",r&&"opacity-50 cursor-not-allowed","hover:border-primary/50"),children:[a.jsx(I.Upload,{className:"h-10 w-10 mx-auto mb-4 text-muted-foreground"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Drag & drop files here, or click to select"}),n&&a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max file size: ",w(n)]}),a.jsx("input",{ref:f,type:"file",accept:e,multiple:t,onChange:h=>c(h.target.files),disabled:r,className:"hidden"})]}),i.length>0&&a.jsx("div",{className:"space-y-2",children:i.map((h,y)=>a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[a.jsx(I.FileIcon,{className:"h-8 w-8 text-muted-foreground"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:h.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:w(h.size)})]}),a.jsx(me,{type:"button",variant:"ghost",size:"icon",onClick:()=>x(y),className:"h-8 w-8",children:a.jsx(I.X,{className:"h-4 w-4"})})]},y))})]})}const hl=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899","#000000","#ffffff"];function Ut(e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!n)return{h:0,s:100,l:50};let t=parseInt(n[1],16)/255,o=parseInt(n[2],16)/255,r=parseInt(n[3],16)/255;const s=Math.max(t,o,r),i=Math.min(t,o,r);let l=0,u=0;const d=(s+i)/2;if(s!==i){const f=s-i;switch(u=d>.5?f/(2-s-i):f/(s+i),s){case t:l=((o-r)/f+(o<r?6:0))/6;break;case o:l=((r-t)/f+2)/6;break;case r:l=((t-o)/f+4)/6;break}}return{h:Math.round(l*360),s:Math.round(u*100),l:Math.round(d*100)}}function xl(e,n,t){n/=100,t/=100;const o=n*Math.min(t,1-t),r=s=>{const i=(s+e/30)%12,l=t-o*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*l).toString(16).padStart(2,"0")};return`#${r(0)}${r(8)}${r(4)}`}function bl({value:e="#3b82f6",onChange:n,disabled:t,className:o}){const[r,s]=v.useState(!1),[i,l]=v.useState(()=>Ut(e)),[u,d]=v.useState(e),f=v.useRef(null);v.useEffect(()=>{l(Ut(e)),d(e)},[e]);const c=p=>{l(p);const x=xl(p.h,p.s,p.l);d(x),n==null||n(x)},g=p=>{if(!f.current)return;const x=f.current.getBoundingClientRect(),w=Math.max(0,Math.min(1,(p.clientX-x.left)/x.width)),h=Math.max(0,Math.min(1,(p.clientY-x.top)/x.height));c({...i,s:Math.round(w*100),l:Math.round((1-h)*100)})},m=p=>{if(d(p),/^#[0-9A-Fa-f]{6}$/.test(p)){const x=Ut(p);l(x),n==null||n(p)}};return a.jsxs(mt,{open:r,onOpenChange:s,children:[a.jsx(gt,{asChild:!0,children:a.jsxs(me,{variant:"outline",disabled:t,className:b("w-full justify-start gap-2",o),children:[a.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:e}}),a.jsx("span",{className:"font-mono text-sm",children:e})]})}),a.jsx(st,{className:"w-72 p-3",align:"start",children:a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{ref:f,onClick:g,className:"relative h-40 rounded-lg cursor-crosshair overflow-hidden border",style:{background:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("react"),Or=require("@radix-ui/react-slot"),li=require("@radix-ui/react-label"),di=require("@radix-ui/react-separator"),ci=require("@radix-ui/react-avatar"),ui=require("@radix-ui/react-checkbox"),E=require("lucide-react"),fi=require("@radix-ui/react-switch"),mi=require("@radix-ui/react-select"),gi=require("@radix-ui/react-radio-group"),pi=require("@radix-ui/react-slider"),hi=require("@radix-ui/react-toggle"),xi=require("@radix-ui/react-toggle-group"),ve=require("date-fns"),vi=require("@radix-ui/react-popover"),wi=require("@radix-ui/react-aspect-ratio"),bi=require("@radix-ui/react-collapsible"),yi=require("@radix-ui/react-scroll-area"),Ni=require("@radix-ui/react-tabs"),Ci=require("@radix-ui/react-accordion"),ji=require("@radix-ui/react-dialog"),Si=require("@radix-ui/react-dropdown-menu"),ki=require("@radix-ui/react-tooltip"),Me=require("cmdk"),Ri=require("@radix-ui/react-alert-dialog"),Mi=require("@radix-ui/react-progress"),_i=require("react-dom"),Ii=require("@radix-ui/react-navigation-menu"),Pi=require("@radix-ui/react-context-menu"),Di=require("@radix-ui/react-hover-card"),Ln=require("recharts");function re(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=re(C),Hr=re(li),Gr=re(di),ut=re(ci),Cn=re(ui),jn=re(fi),ie=re(mi),Rt=re(gi),yt=re(pi),qr=re(hi),tn=re(xi),Mt=re(vi),Ti=re(wi),En=re(bi),nt=re(yi),st=re(Ni),rt=re(Ci),ee=re(ji),te=re(Si),Dt=re(ki),ke=re(Ri),Sn=re(Mi),_e=re(Ii),ne=re(Pi),nn=re(Di);function Wr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Wr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ur(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Wr(e))&&(r&&(r+=" "),r+=t);return r}const Fi=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Li=(e,t)=>({classGroupId:e,validator:t}),Yr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Zt="-",yr=[],Ei="arbitrary..",Ai=e=>{const t=$i(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Vi(i);const l=i.split(Zt),c=l[0]===""&&l.length>1?1:0;return Xr(l,c,t)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?Fi(d,c):c:d||yr}return n[i]||yr}}},Xr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],a=n.nextPart.get(s);if(a){const d=Xr(e,t+1,a);if(d)return d}const i=n.validators;if(i===null)return;const l=t===0?e.join(Zt):e.slice(t).join(Zt),c=i.length;for(let d=0;d<c;d++){const h=i[d];if(h.validator(l))return h.classGroupId}},Vi=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Ei+r:void 0})(),$i=e=>{const{theme:t,classGroups:n}=e;return zi(n,t)},zi=(e,t)=>{const n=Yr();for(const r in e){const s=e[r];An(s,n,r,t)}return n},An=(e,t,n,r)=>{const s=e.length;for(let a=0;a<s;a++){const i=e[a];Bi(i,t,n,r)}},Bi=(e,t,n,r)=>{if(typeof e=="string"){Oi(e,t,n);return}if(typeof e=="function"){Hi(e,t,n,r);return}Gi(e,t,n,r)},Oi=(e,t,n)=>{const r=e===""?t:Kr(t,e);r.classGroupId=n},Hi=(e,t,n,r)=>{if(qi(e)){An(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Li(n,e))},Gi=(e,t,n,r)=>{const s=Object.entries(e),a=s.length;for(let i=0;i<a;i++){const[l,c]=s[i];An(c,Kr(t,l),n,r)}},Kr=(e,t)=>{let n=e;const r=t.split(Zt),s=r.length;for(let a=0;a<s;a++){const i=r[a];let l=n.nextPart.get(i);l||(l=Yr(),n.nextPart.set(i,l)),n=l}return n},qi=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Wi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(a,i)=>{n[a]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let i=n[a];if(i!==void 0)return i;if((i=r[a])!==void 0)return s(a,i),i},set(a,i){a in n?n[a]=i:s(a,i)}}},kn="!",Nr=":",Ui=[],Cr=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),Yi=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const a=[];let i=0,l=0,c=0,d;const h=s.length;for(let v=0;v<h;v++){const b=s[v];if(i===0&&l===0){if(b===Nr){a.push(s.slice(c,v)),c=v+1;continue}if(b==="/"){d=v;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=a.length===0?s:s.slice(c);let f=u,m=!1;u.endsWith(kn)?(f=u.slice(0,-1),m=!0):u.startsWith(kn)&&(f=u.slice(1),m=!0);const g=d&&d>c?d-c:void 0;return Cr(a,m,f,g)};if(t){const s=t+Nr,a=r;r=i=>i.startsWith(s)?a(i.slice(s.length)):Cr(Ui,!1,i,void 0,!0)}if(n){const s=r;r=a=>n({className:a,parseClassName:s})}return r},Xi=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let a=0;a<n.length;a++){const i=n[a],l=i[0]==="[",c=t.has(i);l||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(i)):s.push(i)}return s.length>0&&(s.sort(),r.push(...s)),r}},Ki=e=>({cache:Wi(e.cacheSize),parseClassName:Yi(e),sortModifiers:Xi(e),...Ai(e)}),Zi=/\s+/,Ji=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a}=t,i=[],l=e.trim().split(Zi);let c="";for(let d=l.length-1;d>=0;d-=1){const h=l[d],{isExternal:u,modifiers:f,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(h);if(u){c=h+(c.length>0?" "+c:c);continue}let b=!!v,p=r(b?g.substring(0,v):g);if(!p){if(!b){c=h+(c.length>0?" "+c:c);continue}if(p=r(g),!p){c=h+(c.length>0?" "+c:c);continue}b=!1}const y=f.length===0?"":f.length===1?f[0]:a(f).join(":"),N=m?y+kn:y,S=N+p;if(i.indexOf(S)>-1)continue;i.push(S);const M=s(p,b);for(let R=0;R<M.length;++R){const T=M[R];i.push(N+T)}c=h+(c.length>0?" "+c:c)}return c},Qi=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=Zr(n))&&(s&&(s+=" "),s+=r);return s},Zr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Zr(e[r]))&&(n&&(n+=" "),n+=t);return n},el=(e,...t)=>{let n,r,s,a;const i=c=>{const d=t.reduce((h,u)=>u(h),e());return n=Ki(d),r=n.cache.get,s=n.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const h=Ji(c,n);return s(c,h),h};return a=i,(...c)=>a(Qi(...c))},tl=[],he=e=>{const t=n=>n[e]||tl;return t.isThemeGetter=!0,t},Jr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nl=/^\d+\/\d+$/,rl=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ol=/\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$/,sl=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,al=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,il=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>nl.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),Ue=e=>!!e&&Number.isInteger(Number(e)),mn=e=>e.endsWith("%")&&q(e.slice(0,-1)),qe=e=>rl.test(e),ll=()=>!0,dl=e=>ol.test(e)&&!sl.test(e),eo=()=>!1,cl=e=>al.test(e),ul=e=>il.test(e),fl=e=>!P(e)&&!D(e),ml=e=>ft(e,ro,eo),P=e=>Jr.test(e),et=e=>ft(e,oo,dl),gn=e=>ft(e,vl,q),jr=e=>ft(e,to,eo),gl=e=>ft(e,no,ul),Gt=e=>ft(e,so,cl),D=e=>Qr.test(e),wt=e=>mt(e,oo),pl=e=>mt(e,wl),Sr=e=>mt(e,to),hl=e=>mt(e,ro),xl=e=>mt(e,no),qt=e=>mt(e,so,!0),ft=(e,t,n)=>{const r=Jr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},mt=(e,t,n=!1)=>{const r=Qr.exec(e);return r?r[1]?t(r[1]):n:!1},to=e=>e==="position"||e==="percentage",no=e=>e==="image"||e==="url",ro=e=>e==="length"||e==="size"||e==="bg-size",oo=e=>e==="length",vl=e=>e==="number",wl=e=>e==="family-name",so=e=>e==="shadow",bl=()=>{const e=he("color"),t=he("font"),n=he("text"),r=he("font-weight"),s=he("tracking"),a=he("leading"),i=he("breakpoint"),l=he("container"),c=he("spacing"),d=he("radius"),h=he("shadow"),u=he("inset-shadow"),f=he("text-shadow"),m=he("drop-shadow"),g=he("blur"),v=he("perspective"),b=he("aspect"),p=he("ease"),y=he("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...S(),D,P],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],j=()=>[D,P,c],F=()=>[ct,"full","auto",...j()],W=()=>[Ue,"none","subgrid",D,P],H=()=>["auto",{span:["full",Ue,D,P]},Ue,D,P],K=()=>[Ue,"auto",D,P],k=()=>["auto","min","max","fr",D,P],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...j()],U=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],I=()=>[e,D,P],fe=()=>[...S(),Sr,jr,{position:[D,P]}],me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",hl,ml,{size:[D,P]}],Ce=()=>[mn,wt,et],L=()=>["","none","full",d,D,P],z=()=>["",q,wt,et],Y=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[q,mn,Sr,jr],B=()=>["","none",g,D,P],ce=()=>["none",q,D,P],ae=()=>["none",q,D,P],X=()=>[q,D,P],_=()=>[ct,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qe],breakpoint:[qe],color:[ll],container:[qe],"drop-shadow":[qe],ease:["in","out","in-out"],font:[fl],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qe],shadow:[qe],spacing:["px",q],text:[qe],"text-shadow":[qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,P,D,b]}],container:["container"],columns:[{columns:[q,P,D,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:M()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Ue,"auto",D,P]}],basis:[{basis:[ct,"full","auto",l,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[q,ct,"auto","initial","none",P]}],grow:[{grow:["",q,D,P]}],shrink:[{shrink:["",q,D,P]}],order:[{order:[Ue,"first","last","none",D,P]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[l,"screen",...U()]}],"min-w":[{"min-w":[l,"screen","none",...U()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,wt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,D,gn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mn,P]}],"font-family":[{font:[pl,P,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,D,P]}],"line-clamp":[{"line-clamp":[q,"none",D,gn]}],leading:[{leading:[a,...j()]}],"list-image":[{"list-image":["none",D,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[q,"from-font","auto",D,et]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[q,"auto",D,P]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D,P]}],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,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:fe()}],"bg-repeat":[{bg:me()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ue,D,P],radial:["",D,P],conic:[Ue,D,P]},xl,gl]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:Ce()}],"gradient-via-pos":[{via:Ce()}],"gradient-to-pos":[{to:Ce()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[q,D,P]}],"outline-w":[{outline:["",q,wt,et]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",h,qt,Gt]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",u,qt,Gt]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[q,et]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",f,qt,Gt]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[q,D,P]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[D,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:fe()}],"mask-repeat":[{mask:me()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",D,P]}],filter:[{filter:["","none",D,P]}],blur:[{blur:B()}],brightness:[{brightness:[q,D,P]}],contrast:[{contrast:[q,D,P]}],"drop-shadow":[{"drop-shadow":["","none",m,qt,Gt]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",q,D,P]}],"hue-rotate":[{"hue-rotate":[q,D,P]}],invert:[{invert:["",q,D,P]}],saturate:[{saturate:[q,D,P]}],sepia:[{sepia:["",q,D,P]}],"backdrop-filter":[{"backdrop-filter":["","none",D,P]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[q,D,P]}],"backdrop-contrast":[{"backdrop-contrast":[q,D,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",q,D,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,D,P]}],"backdrop-invert":[{"backdrop-invert":["",q,D,P]}],"backdrop-opacity":[{"backdrop-opacity":[q,D,P]}],"backdrop-saturate":[{"backdrop-saturate":[q,D,P]}],"backdrop-sepia":[{"backdrop-sepia":["",q,D,P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",D,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[q,"initial",D,P]}],ease:[{ease:["linear","initial",p,D,P]}],delay:[{delay:[q,D,P]}],animate:[{animate:["none",y,D,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,D,P]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[D,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_()}],"translate-x":[{"translate-x":_()}],"translate-y":[{"translate-y":_()}],"translate-z":[{"translate-z":_()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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,P]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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,P]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[q,wt,et,gn]}],stroke:[{stroke:["none",...I()]}],"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"]}},yl=el(bl);function x(...e){return yl(Ur(e))}const kr=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rr=Ur,Fe=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rr(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:a}=t,i=Object.keys(s).map(d=>{const h=n==null?void 0:n[d],u=a==null?void 0:a[d];if(h===null)return null;const f=kr(h)||kr(u);return s[d][f]}),l=n&&Object.entries(n).reduce((d,h)=>{let[u,f]=h;return f===void 0||(d[u]=f),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,h)=>{let{class:u,className:f,...m}=h;return Object.entries(m).every(g=>{let[v,b]=g;return Array.isArray(b)?b.includes({...a,...l}[v]):{...a,...l}[v]===b})?[...d,u,f]:d},[]);return Rr(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Tt=Fe("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",brand:"bg-gradient-to-r from-violet-600 to-indigo-600 text-white hover:from-violet-500 hover:to-indigo-500 shadow-lg shadow-violet-500/25 hover:shadow-violet-500/40 hover:scale-[1.02] active:scale-[0.98]",glow:"bg-primary text-primary-foreground shadow-[0_0_20px_rgba(139,92,246,0.5)] hover:shadow-[0_0_30px_rgba(139,92,246,0.7)] hover:scale-[1.02] active:scale-[0.98]"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",xl:"h-12 rounded-lg px-10 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ge=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},a)=>{const i=r?Or.Slot:"button";return o.jsx(i,{className:x(Tt({variant:t,size:n,className:e})),ref:a,...s})});ge.displayName="Button";const ao=Fe("flex w-full rounded-lg text-sm transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",filled:"h-10 border-0 bg-muted/50 px-3 py-2 focus-visible:outline-none focus-visible:bg-muted focus-visible:ring-2 focus-visible:ring-ring",glow:"h-10 border border-input bg-background px-3 py-2 ring-offset-background focus-visible:outline-none focus-visible:border-violet-500/50 focus-visible:ring-2 focus-visible:ring-violet-500/30 focus-visible:shadow-[0_0_15px_rgba(139,92,246,0.3)]",ghost:"h-10 border-0 bg-transparent px-3 py-2 focus-visible:outline-none focus-visible:bg-muted/30"},inputSize:{default:"h-10",sm:"h-9 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",inputSize:"default"}}),Ke=w.forwardRef(({className:e,type:t,variant:n,inputSize:r,...s},a)=>o.jsx("input",{type:t,className:x(ao({variant:n,inputSize:r}),e),ref:a,...s}));Ke.displayName="Input";const io=w.forwardRef(({className:e,...t},n)=>o.jsx("textarea",{className:x("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));io.displayName="Textarea";const Nl=Fe("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rn=w.forwardRef(({className:e,...t},n)=>o.jsx(Hr.Root,{ref:n,className:x(Nl(),e),...t}));rn.displayName=Hr.Root.displayName;const lo=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Vn({className:e,variant:t,...n}){return o.jsx("div",{className:x(lo({variant:t}),e),...n})}const co=w.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>o.jsx(Gr.Root,{ref:r,decorative:!0,orientation:t,className:x("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));co.displayName=Gr.Root.displayName;const uo=w.forwardRef(({className:e,...t},n)=>o.jsx(ut.Root,{ref:n,className:x("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));uo.displayName=ut.Root.displayName;const fo=w.forwardRef(({className:e,...t},n)=>o.jsx(ut.Image,{ref:n,className:x("aspect-square h-full w-full",e),...t}));fo.displayName=ut.Image.displayName;const mo=w.forwardRef(({className:e,...t},n)=>o.jsx(ut.Fallback,{ref:n,className:x("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));mo.displayName=ut.Fallback.displayName;const go=w.forwardRef(({className:e,...t},n)=>o.jsx(Cn.Root,{ref:n,className:x("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:o.jsx(Cn.Indicator,{className:x("flex items-center justify-center text-current"),children:o.jsx(E.Check,{className:"h-4 w-4"})})}));go.displayName=Cn.Root.displayName;const po=w.forwardRef(({className:e,...t},n)=>o.jsx(jn.Root,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:o.jsx(jn.Thumb,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));po.displayName=jn.Root.displayName;const Cl=ie.Root,jl=ie.Group,Sl=ie.Value,ho=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ie.Trigger,{ref:r,className:x("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,o.jsx(ie.Icon,{asChild:!0,children:o.jsx(E.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));ho.displayName=ie.Trigger.displayName;const $n=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.ScrollUpButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(E.ChevronUp,{className:"h-4 w-4"})}));$n.displayName=ie.ScrollUpButton.displayName;const zn=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.ScrollDownButton,{ref:n,className:x("flex cursor-default items-center justify-center py-1",e),...t,children:o.jsx(E.ChevronDown,{className:"h-4 w-4"})}));zn.displayName=ie.ScrollDownButton.displayName;const xo=w.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>o.jsx(ie.Portal,{children:o.jsxs(ie.Content,{ref:s,className:x("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[o.jsx($n,{}),o.jsx(ie.Viewport,{className:x("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),o.jsx(zn,{})]})}));xo.displayName=ie.Content.displayName;const vo=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.Label,{ref:n,className:x("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));vo.displayName=ie.Label.displayName;const wo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ie.Item,{ref:r,className:x("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ie.ItemIndicator,{children:o.jsx(E.Check,{className:"h-4 w-4"})})}),o.jsx(ie.ItemText,{children:t})]}));wo.displayName=ie.Item.displayName;const bo=w.forwardRef(({className:e,...t},n)=>o.jsx(ie.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));bo.displayName=ie.Separator.displayName;const yo=w.forwardRef(({className:e,...t},n)=>o.jsx(Rt.Root,{className:x("grid gap-2",e),...t,ref:n}));yo.displayName=Rt.Root.displayName;const No=w.forwardRef(({className:e,...t},n)=>o.jsx(Rt.Item,{ref:n,className:x("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:o.jsx(Rt.Indicator,{className:"flex items-center justify-center",children:o.jsx(E.Circle,{className:"h-2.5 w-2.5 fill-current text-current"})})}));No.displayName=Rt.Item.displayName;const Co=w.forwardRef(({className:e,...t},n)=>o.jsxs(yt.Root,{ref:n,className:x("relative flex w-full touch-none select-none items-center",e),...t,children:[o.jsx(yt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:o.jsx(yt.Range,{className:"absolute h-full bg-primary"})}),o.jsx(yt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Co.displayName=yt.Root.displayName;const Bn=Fe("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),jo=w.forwardRef(({className:e,variant:t,size:n,...r},s)=>o.jsx(qr.Root,{ref:s,className:x(Bn({variant:t,size:n,className:e})),...r}));jo.displayName=qr.Root.displayName;const So=w.forwardRef(({className:e,variant:t,size:n,children:r,...s},a)=>o.jsx(tn.Root,{ref:a,className:x("flex items-center justify-center gap-1",e),...s,children:o.jsx(ko.Provider,{value:{variant:t,size:n},children:r})}));So.displayName=tn.Root.displayName;const ko=w.createContext({size:"default",variant:"default"}),Ro=w.forwardRef(({className:e,children:t,variant:n,size:r,...s},a)=>{const i=w.useContext(ko);return o.jsx(tn.Item,{ref:a,className:x(Bn({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});Ro.displayName=tn.Item.displayName;function On({selected:e,onSelect:t,className:n,disabled:r}){const[s,a]=w.useState(()=>e?ve.startOfMonth(e):ve.startOfMonth(new Date)),i=ve.startOfMonth(s),l=ve.endOfMonth(s),c=ve.startOfWeek(i,{weekStartsOn:1}),d=ve.endOfWeek(l,{weekStartsOn:1}),h=ve.eachDayOfInterval({start:c,end:d}),u=["Mo","Tu","We","Th","Fr","Sa","Su"],f=()=>{a(ve.subMonths(s,1))},m=()=>{a(ve.addMonths(s,1))},g=v=>{r!=null&&r(v)||t==null||t(ve.isSameDay(v,e||new Date(0))?void 0:v)};return o.jsxs("div",{className:x("p-4 bg-card rounded-xl border shadow-sm w-[320px]",n),children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx(ge,{variant:"ghost",size:"icon",onClick:f,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(E.ChevronLeft,{className:"h-4 w-4"})}),o.jsx("h2",{className:"text-base font-semibold",children:ve.format(s,"MMMM yyyy")}),o.jsx(ge,{variant:"ghost",size:"icon",onClick:m,className:"h-8 w-8 rounded-full hover:bg-accent",children:o.jsx(E.ChevronRight,{className:"h-4 w-4"})})]}),o.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:u.map(v=>o.jsx("div",{className:"h-8 flex items-center justify-center text-xs font-medium text-muted-foreground",children:v},v))}),o.jsx("div",{className:"grid grid-cols-7 gap-1",children:h.map((v,b)=>{const p=ve.isSameMonth(v,s),y=e&&ve.isSameDay(v,e),N=ve.isToday(v),S=r==null?void 0:r(v);return o.jsx("button",{onClick:()=>g(v),disabled:S,className:x("h-10 w-10 rounded-lg text-sm font-medium transition-all duration-150","flex items-center justify-center","hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1",!p&&"text-muted-foreground/40",p&&!y&&"text-foreground hover:text-foreground",y&&"bg-primary text-primary-foreground hover:bg-primary/90 shadow-md",N&&!y&&"bg-accent text-accent-foreground font-bold",S&&"opacity-30 cursor-not-allowed hover:bg-transparent"),children:ve.format(v,"d")},b)})}),o.jsxs("div",{className:"mt-4 pt-3 border-t flex justify-between items-center",children:[o.jsx(ge,{variant:"ghost",size:"sm",onClick:()=>{const v=new Date;a(ve.startOfMonth(v)),t==null||t(v)},className:"text-xs",children:"Today"}),e&&o.jsx("span",{className:"text-xs text-muted-foreground",children:ve.format(e,"MMM d, yyyy")})]})]})}On.displayName="Calendar";const gt=Mt.Root,pt=Mt.Trigger,at=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(Mt.Portal,{children:o.jsx(Mt.Content,{ref:s,align:t,sideOffset:n,className:x("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));at.displayName=Mt.Content.displayName;function kl({value:e,onChange:t,placeholder:n="Pick a date",disabled:r,className:s}){const[a,i]=w.useState(!1);return o.jsxs(gt,{open:a,onOpenChange:i,children:[o.jsx(pt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:r,className:x("w-full justify-start text-left font-normal",!e&&"text-muted-foreground",s),children:[o.jsx(E.CalendarIcon,{className:"mr-2 h-4 w-4"}),e?ve.format(e,"PPP"):o.jsx("span",{children:n})]})}),o.jsx(at,{className:"w-auto p-0",align:"start",children:o.jsx(On,{selected:e,onSelect:l=>{t==null||t(l),i(!1)}})})]})}function Rl({value:e={hours:12,minutes:0},onChange:t,is24Hour:n=!1,disabled:r,className:s}){const[a,i]=w.useState(!1),[l,c]=w.useState(e.hours>=12?"PM":"AM"),d=n?e.hours:e.hours===0?12:e.hours>12?e.hours-12:e.hours,h=()=>{const b=d.toString().padStart(2,"0"),p=e.minutes.toString().padStart(2,"0");return n?`${b}:${p}`:`${b}:${p} ${l}`},u=b=>{let p=b;n||(l==="PM"&&b!==12&&(p+=12),l==="AM"&&b===12&&(p=0)),t==null||t({...e,hours:p})},f=b=>{t==null||t({...e,minutes:b})},m=b=>{c(b);let p=e.hours;b==="PM"&&e.hours<12&&(p+=12),b==="AM"&&e.hours>=12&&(p-=12),t==null||t({...e,hours:p})},g=n?Array.from({length:24},(b,p)=>p):Array.from({length:12},(b,p)=>p+1),v=Array.from({length:12},(b,p)=>p*5);return o.jsxs(gt,{open:a,onOpenChange:i,children:[o.jsx(pt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:r,className:x("w-full justify-start font-normal",s),children:[o.jsx(E.Clock,{className:"mr-2 h-4 w-4"}),h()]})}),o.jsx(at,{className:"w-auto p-2",align:"start",children:o.jsxs("div",{className:"flex gap-1",children:[o.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:g.map(b=>o.jsx("button",{onClick:()=>u(b),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",d===b&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:b.toString().padStart(2,"0")},b))}),o.jsx("div",{className:"flex items-center text-muted-foreground font-bold",children:":"}),o.jsx("div",{className:"h-32 w-12 overflow-y-auto rounded border bg-muted/30",children:v.map(b=>o.jsx("button",{onClick:()=>f(b),className:x("w-full py-1 text-sm font-medium transition-colors","hover:bg-accent",e.minutes===b&&"bg-primary text-primary-foreground hover:bg-primary/90"),children:b.toString().padStart(2,"0")},b))}),!n&&o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("button",{onClick:()=>m("AM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="AM"&&"bg-primary text-primary-foreground border-primary"),children:"AM"}),o.jsx("button",{onClick:()=>m("PM"),className:x("px-2 py-1 text-xs font-medium rounded border transition-colors flex-1","hover:bg-accent",l==="PM"&&"bg-primary text-primary-foreground border-primary"),children:"PM"})]})]})})]})}function Ml({value:e=0,onChange:t,min:n=-1/0,max:r=1/0,step:s=1,disabled:a,className:i}){const l=()=>{const h=Math.min(e+s,r);t==null||t(h)},c=()=>{const h=Math.max(e-s,n);t==null||t(h)},d=h=>{const u=parseFloat(h.target.value);if(!isNaN(u)){const f=Math.min(Math.max(u,n),r);t==null||t(f)}};return o.jsxs("div",{className:x("flex items-center gap-2",i),children:[o.jsx(ge,{type:"button",variant:"outline",size:"icon",onClick:c,disabled:a||e<=n,className:"h-9 w-9",children:o.jsx(E.Minus,{className:"h-4 w-4"})}),o.jsx(Ke,{type:"number",value:e,onChange:d,disabled:a,className:"w-20 text-center [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:n,max:r,step:s}),o.jsx(ge,{type:"button",variant:"outline",size:"icon",onClick:l,disabled:a||e>=r,className:"h-9 w-9",children:o.jsx(E.Plus,{className:"h-4 w-4"})})]})}function _l({values:e=[],onChange:t,placeholder:n="Add tag...",disabled:r,className:s,maxTags:a}){const[i,l]=w.useState(""),c=w.useRef(null),d=u=>{if(u.key==="Enter"&&i.trim()){if(u.preventDefault(),a&&e.length>=a)return;e.includes(i.trim())||t==null||t([...e,i.trim()]),l("")}else u.key==="Backspace"&&!i&&e.length>0&&(t==null||t(e.slice(0,-1)))},h=u=>{t==null||t(e.filter(f=>f!==u))};return o.jsxs("div",{className:x("flex flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",r&&"opacity-50 cursor-not-allowed",s),onClick:()=>{var u;return(u=c.current)==null?void 0:u.focus()},children:[e.map(u=>o.jsxs(Vn,{variant:"secondary",className:"gap-1",children:[u,!r&&o.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),h(u)},className:"ml-1 rounded-full outline-none hover:bg-muted",children:o.jsx(E.X,{className:"h-3 w-3"})})]},u)),o.jsx("input",{ref:c,type:"text",value:i,onChange:u=>l(u.target.value),onKeyDown:d,placeholder:e.length===0?n:"",disabled:r||(a?e.length>=a:!1),className:"flex-1 min-w-[120px] bg-transparent outline-none placeholder:text-muted-foreground text-sm"})]})}function Il({options:e,value:t,onChange:n,placeholder:r="Select option...",searchPlaceholder:s="Search...",emptyText:a="No results found.",disabled:i,className:l}){const[c,d]=w.useState(!1),[h,u]=w.useState(""),f=e.filter(g=>g.label.toLowerCase().includes(h.toLowerCase())),m=e.find(g=>g.value===t);return o.jsxs(gt,{open:c,onOpenChange:d,children:[o.jsx(pt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",role:"combobox","aria-expanded":c,disabled:i,className:x("w-full justify-between font-normal",!t&&"text-muted-foreground",l),children:[m?m.label:r,o.jsx(E.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o.jsxs(at,{className:"w-full p-0",align:"start",children:[o.jsx("div",{className:"p-2 border-b",children:o.jsx(Ke,{placeholder:s,value:h,onChange:g=>u(g.target.value),className:"h-8"})}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:f.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:a}):f.map(g=>o.jsxs("button",{onClick:()=>{n==null||n(g.value===t?"":g.value),d(!1),u("")},className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",t===g.value&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:t===g.value&&o.jsx(E.Check,{className:"h-4 w-4"})}),g.label]},g.value))})]})]})}function Pl({options:e,value:t=[],onChange:n,placeholder:r="Select options...",searchPlaceholder:s="Search...",emptyText:a="No results found.",disabled:i,className:l,maxDisplay:c=3}){const[d,h]=w.useState(!1),[u,f]=w.useState(""),m=e.filter(y=>y.label.toLowerCase().includes(u.toLowerCase())),g=e.filter(y=>t.includes(y.value)),v=y=>{const N=t.includes(y)?t.filter(S=>S!==y):[...t,y];n==null||n(N)},b=(y,N)=>{N.stopPropagation(),n==null||n(t.filter(S=>S!==y))},p=()=>t.length===0?r:t.length<=c?g.map(y=>y.label).join(", "):`${t.length} selected`;return o.jsxs(gt,{open:d,onOpenChange:h,children:[o.jsx(pt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",role:"combobox","aria-expanded":d,disabled:i,className:x("w-full justify-between font-normal",t.length===0&&"text-muted-foreground",l),children:[o.jsx("span",{className:"truncate",children:p()}),o.jsx(E.ChevronsUpDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o.jsxs(at,{className:"w-full p-0",align:"start",children:[o.jsx("div",{className:"p-2 border-b",children:o.jsx(Ke,{placeholder:s,value:u,onChange:y=>f(y.target.value),className:"h-8"})}),t.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 p-2 border-b",children:g.map(y=>o.jsxs(Vn,{variant:"secondary",className:"pr-1",children:[y.label,o.jsx("button",{onClick:N=>b(y.value,N),className:"ml-1 rounded-full hover:bg-muted",children:o.jsx(E.X,{className:"h-3 w-3"})})]},y.value))}),o.jsx("div",{className:"max-h-60 overflow-auto p-1",children:m.length===0?o.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:a}):m.map(y=>{const N=t.includes(y.value);return o.jsxs("button",{onClick:()=>v(y.value),className:x("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none hover:bg-accent hover:text-accent-foreground",N&&"bg-accent"),children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:N&&o.jsx(E.Check,{className:"h-4 w-4"})}),y.label]},y.value)})})]})]})}function Dl({length:e=6,value:t="",onChange:n,onComplete:r,disabled:s,className:a}){const i=w.useRef([]),l=(h,u)=>{var g;if(!/^\d*$/.test(u))return;const f=t.split("");f[h]=u;const m=f.join("").slice(0,e);n==null||n(m),u&&h<e-1&&((g=i.current[h+1])==null||g.focus()),m.length===e&&(r==null||r(m))},c=(h,u)=>{var f;u.key==="Backspace"&&!t[h]&&h>0&&((f=i.current[h-1])==null||f.focus())},d=h=>{var f;h.preventDefault();const u=h.clipboardData.getData("text").replace(/\D/g,"").slice(0,e);n==null||n(u),u.length===e&&(r==null||r(u)),(f=i.current[Math.min(u.length,e-1)])==null||f.focus()};return o.jsx("div",{className:x("flex gap-2",a),children:Array.from({length:e}).map((h,u)=>o.jsx("input",{ref:f=>{i.current[u]=f},type:"text",inputMode:"numeric",maxLength:1,value:t[u]||"",onChange:f=>l(u,f.target.value),onKeyDown:f=>c(u,f),onPaste:d,disabled:s,className:x("h-12 w-12 rounded-lg border border-input bg-background text-center text-lg font-semibold","focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed")},u))})}function Tl({accept:e,maxSize:t,multiple:n=!1,onUpload:r,disabled:s,className:a}){const[i,l]=w.useState([]),[c,d]=w.useState(!1),h=w.useRef(null),u=p=>{if(!p)return;const y=Array.from(p).filter(S=>!(t&&S.size>t)),N=n?[...i,...y]:y.slice(0,1);l(N),r==null||r(N)},f=p=>{p.preventDefault(),d(!1),s||u(p.dataTransfer.files)},m=p=>{p.preventDefault(),s||d(!0)},g=()=>{d(!1)},v=p=>{const y=i.filter((N,S)=>S!==p);l(y),r==null||r(y)},b=p=>p<1024?p+" B":p<1024*1024?(p/1024).toFixed(1)+" KB":(p/(1024*1024)).toFixed(1)+" MB";return o.jsxs("div",{className:x("space-y-4",a),children:[o.jsxs("div",{onClick:()=>{var p;return!s&&((p=h.current)==null?void 0:p.click())},onDrop:f,onDragOver:m,onDragLeave:g,className:x("border-2 border-dashed rounded-lg p-8 text-center transition-colors cursor-pointer",c?"border-primary bg-primary/5":"border-muted-foreground/25",s&&"opacity-50 cursor-not-allowed","hover:border-primary/50"),children:[o.jsx(E.Upload,{className:"h-10 w-10 mx-auto mb-4 text-muted-foreground"}),o.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Drag & drop files here, or click to select"}),t&&o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Max file size: ",b(t)]}),o.jsx("input",{ref:h,type:"file",accept:e,multiple:n,onChange:p=>u(p.target.files),disabled:s,className:"hidden"})]}),i.length>0&&o.jsx("div",{className:"space-y-2",children:i.map((p,y)=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/50",children:[o.jsx(E.FileIcon,{className:"h-8 w-8 text-muted-foreground"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm font-medium truncate",children:p.name}),o.jsx("p",{className:"text-xs text-muted-foreground",children:b(p.size)})]}),o.jsx(ge,{type:"button",variant:"ghost",size:"icon",onClick:()=>v(y),className:"h-8 w-8",children:o.jsx(E.X,{className:"h-4 w-4"})})]},y))})]})}const Fl=["#ef4444","#f97316","#eab308","#22c55e","#14b8a6","#3b82f6","#8b5cf6","#ec4899","#000000","#ffffff"];function Wt(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);if(!t)return{h:0,s:100,l:50};let n=parseInt(t[1],16)/255,r=parseInt(t[2],16)/255,s=parseInt(t[3],16)/255;const a=Math.max(n,r,s),i=Math.min(n,r,s);let l=0,c=0;const d=(a+i)/2;if(a!==i){const h=a-i;switch(c=d>.5?h/(2-a-i):h/(a+i),a){case n:l=((r-s)/h+(r<s?6:0))/6;break;case r:l=((s-n)/h+2)/6;break;case s:l=((n-r)/h+4)/6;break}}return{h:Math.round(l*360),s:Math.round(c*100),l:Math.round(d*100)}}function Ll(e,t,n){t/=100,n/=100;const r=t*Math.min(n,1-n),s=a=>{const i=(a+e/30)%12,l=n-r*Math.max(Math.min(i-3,9-i,1),-1);return Math.round(255*l).toString(16).padStart(2,"0")};return`#${s(0)}${s(8)}${s(4)}`}function El({value:e="#3b82f6",onChange:t,disabled:n,className:r}){const[s,a]=w.useState(!1),[i,l]=w.useState(()=>Wt(e)),[c,d]=w.useState(e),h=w.useRef(null);w.useEffect(()=>{l(Wt(e)),d(e)},[e]);const u=g=>{l(g);const v=Ll(g.h,g.s,g.l);d(v),t==null||t(v)},f=g=>{if(!h.current)return;const v=h.current.getBoundingClientRect(),b=Math.max(0,Math.min(1,(g.clientX-v.left)/v.width)),p=Math.max(0,Math.min(1,(g.clientY-v.top)/v.height));u({...i,s:Math.round(b*100),l:Math.round((1-p)*100)})},m=g=>{if(d(g),/^#[0-9A-Fa-f]{6}$/.test(g)){const v=Wt(g);l(v),t==null||t(g)}};return o.jsxs(gt,{open:s,onOpenChange:a,children:[o.jsx(pt,{asChild:!0,children:o.jsxs(ge,{variant:"outline",disabled:n,className:x("w-full justify-start gap-2",r),children:[o.jsx("div",{className:"h-5 w-5 rounded border shadow-sm",style:{backgroundColor:e}}),o.jsx("span",{className:"font-mono text-sm",children:e})]})}),o.jsx(at,{className:"w-72 p-3",align:"start",children:o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{ref:h,onClick:f,className:"relative h-40 rounded-lg cursor-crosshair overflow-hidden border",style:{background:`
|
|
2
2
|
linear-gradient(to top, #000 0%, transparent 100%),
|
|
3
3
|
linear-gradient(to right, #fff 0%, hsl(${i.h}, 100%, 50%) 100%)
|
|
4
|
-
`},children:
|
|
4
|
+
`},children:o.jsx("div",{className:"absolute w-4 h-4 rounded-full border-2 border-white shadow-md transform -translate-x-1/2 -translate-y-1/2 pointer-events-none",style:{left:`${i.s}%`,top:`${100-i.l}%`,backgroundColor:e}})}),o.jsxs("div",{className:"space-y-1",children:[o.jsx(rn,{className:"text-xs",children:"Hue"}),o.jsx("input",{type:"range",min:0,max:360,value:i.h,onChange:g=>u({...i,h:parseInt(g.target.value)}),className:"w-full h-3 rounded-lg appearance-none cursor-pointer",style:{background:`linear-gradient(to right,
|
|
5
5
|
hsl(0, 100%, 50%),
|
|
6
6
|
hsl(60, 100%, 50%),
|
|
7
7
|
hsl(120, 100%, 50%),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
hsl(240, 100%, 50%),
|
|
10
10
|
hsl(300, 100%, 50%),
|
|
11
11
|
hsl(360, 100%, 50%)
|
|
12
|
-
)`}})]}),a.jsxs("div",{className:"flex gap-2 items-center",children:[a.jsx("div",{className:"h-9 w-9 rounded-md border flex-shrink-0 shadow-inner",style:{backgroundColor:e}}),a.jsx(Ke,{value:u,onChange:p=>m(p.target.value),placeholder:"#000000",className:"font-mono text-sm"})]}),a.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:hl.map(p=>a.jsx("button",{onClick:()=>{n==null||n(p),l(Ut(p)),d(p)},className:b("h-7 w-7 rounded-md border-2 transition-transform hover:scale-110",e===p?"border-primary ring-2 ring-ring":"border-transparent"),style:{backgroundColor:p}},p))})]})})]})}const Sr=v.forwardRef(({className:e,as:n="div",...t},o)=>a.jsx(n,{ref:o,className:b(e),...t}));Sr.displayName="Box";const Nr=v.forwardRef(({className:e,direction:n,wrap:t,justify:o,align:r,gap:s,style:i,...l},u)=>a.jsx("div",{ref:u,className:b("flex",n&&`flex-${n}`,t&&`flex-${t}`,o&&`justify-${o}`,r&&`items-${r}`,typeof s=="number"&&`gap-${s}`,e),style:{...typeof s=="string"?{gap:s}:{},...i},...l}));Nr.displayName="Flex";const Rr=v.forwardRef(({className:e,spacing:n=4,align:t,style:o,...r},s)=>a.jsx("div",{ref:s,className:b("flex flex-col",typeof n=="number"&&`gap-${n}`,t&&`items-${t}`,e),style:{...typeof n=="string"?{gap:n}:{},...o},...r}));Rr.displayName="VStack";const jr=v.forwardRef(({className:e,spacing:n=4,align:t="center",style:o,...r},s)=>a.jsx("div",{ref:s,className:b("flex flex-row",typeof n=="number"&&`gap-${n}`,t&&`items-${t}`,e),style:{...typeof n=="string"?{gap:n}:{},...o},...r}));jr.displayName="HStack";const kr=v.forwardRef(({className:e,cols:n=1,gap:t=4,style:o,...r},s)=>{const i=typeof n=="number"?`grid-cols-${n}`:[n.sm&&`sm:grid-cols-${n.sm}`,n.md&&`md:grid-cols-${n.md}`,n.lg&&`lg:grid-cols-${n.lg}`,n.xl&&`xl:grid-cols-${n.xl}`].filter(Boolean).join(" ");return a.jsx("div",{ref:s,className:b("grid",i,typeof t=="number"&&`gap-${t}`,e),style:{...typeof t=="string"?{gap:t}:{},...o},...r})});kr.displayName="Grid";const vl={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},Mr=v.forwardRef(({className:e,maxWidth:n="lg",centered:t=!0,...o},r)=>a.jsx("div",{ref:r,className:b("w-full px-4",vl[n],t&&"mx-auto",e),...o}));Mr.displayName="Container";const wl=pi.Root,yl=An.Root,Cl=An.CollapsibleTrigger,_r=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx(An.CollapsibleContent,{ref:o,className:b("overflow-hidden transition-all duration-300 ease-in-out","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...t,children:a.jsx("div",{className:"pb-2",children:n})}));_r.displayName="CollapsibleContent";const Pr=Fe("rounded-xl text-card-foreground transition-all duration-300",{variants:{variant:{default:"border bg-card shadow-sm",elevated:"border border-white/10 bg-gradient-to-br from-card/80 to-card/40 backdrop-blur-xl shadow-2xl shadow-black/20",glass:"border border-white/10 bg-white/5 backdrop-blur-xl shadow-xl",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Hn=v.forwardRef(({className:e,variant:n,...t},o)=>a.jsx("div",{ref:o,className:b(Pr({variant:n}),e),...t}));Hn.displayName="Card";const Gn=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("flex flex-col space-y-1.5 p-6",e),...n}));Gn.displayName="CardHeader";const qn=v.forwardRef(({className:e,...n},t)=>a.jsx("h3",{ref:t,className:b("text-2xl font-semibold leading-none tracking-tight",e),...n}));qn.displayName="CardTitle";const Ir=v.forwardRef(({className:e,...n},t)=>a.jsx("p",{ref:t,className:b("text-sm text-muted-foreground",e),...n}));Ir.displayName="CardDescription";const Un=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("p-6 pt-0",e),...n}));Un.displayName="CardContent";const Tr=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("flex items-center p-6 pt-0",e),...n}));Tr.displayName="CardFooter";const Wn=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{ref:t,className:b("w-full caption-bottom text-sm",e),...n})}));Wn.displayName="Table";const Xn=v.forwardRef(({className:e,...n},t)=>a.jsx("thead",{ref:t,className:b("[&_tr]:border-b",e),...n}));Xn.displayName="TableHeader";const Yn=v.forwardRef(({className:e,...n},t)=>a.jsx("tbody",{ref:t,className:b("[&_tr:last-child]:border-0",e),...n}));Yn.displayName="TableBody";const Dr=v.forwardRef(({className:e,...n},t)=>a.jsx("tfoot",{ref:t,className:b("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...n}));Dr.displayName="TableFooter";const St=v.forwardRef(({className:e,...n},t)=>a.jsx("tr",{ref:t,className:b("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...n}));St.displayName="TableRow";const Kn=v.forwardRef(({className:e,...n},t)=>a.jsx("th",{ref:t,className:b("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...n}));Kn.displayName="TableHead";const Zt=v.forwardRef(({className:e,...n},t)=>a.jsx("td",{ref:t,className:b("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...n}));Zt.displayName="TableCell";const Fr=v.forwardRef(({className:e,...n},t)=>a.jsx("caption",{ref:t,className:b("mt-4 text-sm text-muted-foreground",e),...n}));Fr.displayName="TableCaption";const Jn=v.forwardRef(({className:e,children:n,orientation:t="vertical",...o},r)=>a.jsxs(tt.Root,{ref:r,className:b("relative overflow-hidden",e),...o,children:[a.jsx(tt.Viewport,{className:"h-full w-full rounded-[inherit]",children:n}),(t==="vertical"||t==="both")&&a.jsx(Qt,{orientation:"vertical"}),(t==="horizontal"||t==="both")&&a.jsx(Qt,{orientation:"horizontal"}),a.jsx(tt.Corner,{})]}));Jn.displayName=tt.Root.displayName;const Qt=v.forwardRef(({className:e,orientation:n="vertical",...t},o)=>a.jsx(tt.ScrollAreaScrollbar,{ref:o,orientation:n,className:b("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...t,children:a.jsx(tt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Qt.displayName=tt.ScrollAreaScrollbar.displayName;const Sl=rt.Root,Er=v.forwardRef(({className:e,...n},t)=>a.jsx(rt.List,{ref:t,className:b("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...n}));Er.displayName=rt.List.displayName;const Ar=v.forwardRef(({className:e,...n},t)=>a.jsx(rt.Trigger,{ref:t,className:b("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...n}));Ar.displayName=rt.Trigger.displayName;const Vr=v.forwardRef(({className:e,...n},t)=>a.jsx(rt.Content,{ref:t,className:b("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));Vr.displayName=rt.Content.displayName;const Nl=nt.Root,$r=v.forwardRef(({className:e,...n},t)=>a.jsx(nt.Item,{ref:t,className:b("border-b",e),...n}));$r.displayName="AccordionItem";const Lr=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx(nt.Header,{className:"flex",children:a.jsxs(nt.Trigger,{ref:o,className:b("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...t,children:[n,a.jsx(I.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Lr.displayName=nt.Trigger.displayName;const zr=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx(nt.Content,{ref:o,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...t,children:a.jsx("div",{className:b("pb-4 pt-0",e),children:n})}));zr.displayName=nt.Content.displayName;const Or=K.Root,Rl=K.Trigger,Br=K.Portal,jl=K.Close,Zn=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Overlay,{ref:t,className:b("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));Zn.displayName=K.Overlay.displayName;const Qn=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(Br,{children:[a.jsx(Zn,{}),a.jsxs(K.Content,{ref:o,className:b("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t,children:[n,a.jsxs(K.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(I.X,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qn.displayName=K.Content.displayName;const Hr=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});Hr.displayName="DialogHeader";const Gr=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});Gr.displayName="DialogFooter";const qr=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Title,{ref:t,className:b("text-lg font-semibold leading-none tracking-tight",e),...n}));qr.displayName=K.Title.displayName;const Ur=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Description,{ref:t,className:b("text-sm text-muted-foreground",e),...n}));Ur.displayName=K.Description.displayName;const Wr=K.Root,Xr=K.Trigger,Yr=K.Close,Kr=K.Portal,eo=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Overlay,{className:b("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:t}));eo.displayName=K.Overlay.displayName;const kl=Fe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),to=v.forwardRef(({side:e="right",className:n,children:t,...o},r)=>a.jsxs(Kr,{children:[a.jsx(eo,{}),a.jsxs(K.Content,{ref:r,className:b(kl({side:e}),n),...o,children:[t,a.jsxs(K.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[a.jsx(I.X,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));to.displayName=K.Content.displayName;const no=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col space-y-2 text-center sm:text-left",e),...n});no.displayName="SheetHeader";const oo=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});oo.displayName="SheetFooter";const ro=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Title,{ref:t,className:b("text-lg font-semibold text-foreground",e),...n}));ro.displayName=K.Title.displayName;const so=v.forwardRef(({className:e,...n},t)=>a.jsx(K.Description,{ref:t,className:b("text-sm text-muted-foreground",e),...n}));so.displayName=K.Description.displayName;const Jr=Z.Root,Zr=Z.Trigger,Ml=Z.Group,_l=Z.Portal,Pl=Z.Sub,Il=Z.RadioGroup,Qr=v.forwardRef(({className:e,inset:n,children:t,...o},r)=>a.jsxs(Z.SubTrigger,{ref:r,className:b("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...o,children:[t,a.jsx(I.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Qr.displayName=Z.SubTrigger.displayName;const es=v.forwardRef(({className:e,...n},t)=>a.jsx(Z.SubContent,{ref:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));es.displayName=Z.SubContent.displayName;const ao=v.forwardRef(({className:e,sideOffset:n=4,...t},o)=>a.jsx(Z.Portal,{children:a.jsx(Z.Content,{ref:o,sideOffset:n,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));ao.displayName=Z.Content.displayName;const Nt=v.forwardRef(({className:e,inset:n,...t},o)=>a.jsx(Z.Item,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...t}));Nt.displayName=Z.Item.displayName;const ts=v.forwardRef(({className:e,children:n,checked:t,...o},r)=>a.jsxs(Z.CheckboxItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...o,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Z.ItemIndicator,{children:a.jsx(I.Check,{className:"h-4 w-4"})})}),n]}));ts.displayName=Z.CheckboxItem.displayName;const ns=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(Z.RadioItem,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Z.ItemIndicator,{children:a.jsx(I.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));ns.displayName=Z.RadioItem.displayName;const os=v.forwardRef(({className:e,inset:n,...t},o)=>a.jsx(Z.Label,{ref:o,className:b("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...t}));os.displayName=Z.Label.displayName;const rs=v.forwardRef(({className:e,...n},t)=>a.jsx(Z.Separator,{ref:t,className:b("-mx-1 my-1 h-px bg-muted",e),...n}));rs.displayName=Z.Separator.displayName;const ss=({className:e,...n})=>a.jsx("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...n});ss.displayName="DropdownMenuShortcut";const Tl=Tt.Provider,Dl=Tt.Root,Fl=Tt.Trigger,as=v.forwardRef(({className:e,sideOffset:n=4,...t},o)=>a.jsx(Tt.Content,{ref:o,sideOffset:n,className:b("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));as.displayName=Tt.Content.displayName;const io=v.forwardRef(({className:e,...n},t)=>a.jsx(Me.Command,{ref:t,className:b("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));io.displayName=Me.Command.displayName;const El=({children:e,...n})=>a.jsx(Or,{...n,children:a.jsx(Qn,{className:"overflow-hidden p-0 shadow-lg",children:a.jsx(io,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),is=v.forwardRef(({className:e,...n},t)=>a.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[a.jsx(I.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),a.jsx(Me.Command.Input,{ref:t,className:b("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));is.displayName=Me.Command.Input.displayName;const ls=v.forwardRef(({className:e,...n},t)=>a.jsx(Me.Command.List,{ref:t,className:b("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...n}));ls.displayName=Me.Command.List.displayName;const ds=v.forwardRef((e,n)=>a.jsx(Me.Command.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));ds.displayName=Me.Command.Empty.displayName;const cs=v.forwardRef(({className:e,...n},t)=>a.jsx(Me.Command.Group,{ref:t,className:b("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));cs.displayName=Me.Command.Group.displayName;const us=v.forwardRef(({className:e,...n},t)=>a.jsx(Me.Command.Separator,{ref:t,className:b("-mx-1 h-px bg-border",e),...n}));us.displayName=Me.Command.Separator.displayName;const fs=v.forwardRef(({className:e,...n},t)=>a.jsx(Me.Command.Item,{ref:t,className:b("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected='true']:text-accent-foreground data-[disabled=true]:opacity-50",e),...n}));fs.displayName=Me.Command.Item.displayName;const ms=({className:e,...n})=>a.jsx("span",{className:b("ml-auto text-xs tracking-widest text-muted-foreground",e),...n});ms.displayName="CommandShortcut";const Al=Fe("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),gs=v.forwardRef(({className:e,variant:n,...t},o)=>a.jsx("div",{ref:o,role:"alert",className:b(Al({variant:n}),e),...t}));gs.displayName="Alert";const ps=v.forwardRef(({className:e,...n},t)=>a.jsx("h5",{ref:t,className:b("mb-1 font-medium leading-none tracking-tight",e),...n}));ps.displayName="AlertTitle";const hs=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("text-sm [&_p]:leading-relaxed",e),...n}));hs.displayName="AlertDescription";const Vl=je.Root,$l=je.Trigger,xs=je.Portal,lo=v.forwardRef(({className:e,...n},t)=>a.jsx(je.Overlay,{className:b("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:t}));lo.displayName=je.Overlay.displayName;const bs=v.forwardRef(({className:e,...n},t)=>a.jsxs(xs,{children:[a.jsx(lo,{}),a.jsx(je.Content,{ref:t,className:b("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n})]}));bs.displayName=je.Content.displayName;const vs=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col space-y-2 text-center sm:text-left",e),...n});vs.displayName="AlertDialogHeader";const ws=({className:e,...n})=>a.jsx("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});ws.displayName="AlertDialogFooter";const ys=v.forwardRef(({className:e,...n},t)=>a.jsx(je.Title,{ref:t,className:b("text-lg font-semibold",e),...n}));ys.displayName=je.Title.displayName;const Cs=v.forwardRef(({className:e,...n},t)=>a.jsx(je.Description,{ref:t,className:b("text-sm text-muted-foreground",e),...n}));Cs.displayName=je.Description.displayName;const Ss=v.forwardRef(({className:e,...n},t)=>a.jsx(je.Action,{ref:t,className:b(Dt(),e),...n}));Ss.displayName=je.Action.displayName;const Ns=v.forwardRef(({className:e,...n},t)=>a.jsx(je.Cancel,{ref:t,className:b(Dt({variant:"outline"}),"mt-2 sm:mt-0",e),...n}));Ns.displayName=je.Cancel.displayName;const Rs=v.forwardRef(({className:e,value:n,...t},o)=>a.jsx(Rn.Root,{ref:o,className:b("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...t,children:a.jsx(Rn.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));Rs.displayName=Rn.Root.displayName;function Ll({className:e,...n}){return a.jsx("div",{className:b("animate-pulse rounded-md bg-muted",e),...n})}function zl(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Ol=e=>{switch(e){case"success":return Gl;case"info":return Ul;case"warning":return ql;case"error":return Wl;default:return null}},Bl=Array(12).fill(0),Hl=({visible:e,className:n})=>S.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},S.createElement("div",{className:"sonner-spinner"},Bl.map((t,o)=>S.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),Gl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ql=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Ul=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Wl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},S.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Xl=S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},S.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Yl=()=>{const[e,n]=S.useState(document.hidden);return S.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),e};let kn=1;class Kl{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var t;const{message:o,...r}=n,s=typeof(n==null?void 0:n.id)=="number"||((t=n.id)==null?void 0:t.length)>0?n.id:kn++,i=this.toasts.find(u=>u.id===s),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(u=>u.id===s?(this.publish({...u,...n,id:s,title:o}),{...u,...n,id:s,dismissible:l,title:o}):u):this.addToast({title:o,...r,dismissible:l,id:s}),s},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:n,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(o=>o({id:t.id,dismiss:!0}))}),n),this.message=(n,t)=>this.create({...t,message:n}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let o;t.loading!==void 0&&(o=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const r=Promise.resolve(n instanceof Function?n():n);let s=o!==void 0,i;const l=r.then(async d=>{if(i=["resolve",d],S.isValidElement(d))s=!1,this.create({id:o,type:"default",message:d});else if(Zl(d)&&!d.ok){s=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,g=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,p=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:g,...p})}else if(d instanceof Error){s=!1;const c=typeof t.error=="function"?await t.error(d):t.error,g=typeof t.description=="function"?await t.description(d):t.description,p=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"error",description:g,...p})}else if(t.success!==void 0){s=!1;const c=typeof t.success=="function"?await t.success(d):t.success,g=typeof t.description=="function"?await t.description(d):t.description,p=typeof c=="object"&&!S.isValidElement(c)?c:{message:c};this.create({id:o,type:"success",description:g,...p})}}).catch(async d=>{if(i=["reject",d],t.error!==void 0){s=!1;const f=typeof t.error=="function"?await t.error(d):t.error,c=typeof t.description=="function"?await t.description(d):t.description,m=typeof f=="object"&&!S.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:c,...m})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),t.finally==null||t.finally.call(t)}),u=()=>new Promise((d,f)=>l.then(()=>i[0]==="reject"?f(i[1]):d(i[1])).catch(f));return typeof o!="string"&&typeof o!="number"?{unwrap:u}:Object.assign(o,{unwrap:u})},this.custom=(n,t)=>{const o=(t==null?void 0:t.id)||kn++;return this.create({jsx:n(o),id:o,...t}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ke=new Kl,Jl=(e,n)=>{const t=(n==null?void 0:n.id)||kn++;return ke.addToast({title:e,...n,id:t}),t},Zl=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Ql=Jl,ed=()=>ke.toasts,td=()=>ke.getActiveToasts(),nd=Object.assign(Ql,{success:ke.success,info:ke.info,warning:ke.warning,error:ke.error,custom:ke.custom,message:ke.message,promise:ke.promise,dismiss:ke.dismiss,loading:ke.loading},{getHistory:ed,getToasts:td});zl("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Wt(e){return e.label!==void 0}const od=3,rd="24px",sd="16px",Mo=4e3,ad=356,id=14,ld=45,dd=200;function He(...e){return e.filter(Boolean).join(" ")}function cd(e){const[n,t]=e.split("-"),o=[];return n&&o.push(n),t&&o.push(t),o}const ud=e=>{var n,t,o,r,s,i,l,u,d;const{invert:f,toast:c,unstyled:g,interacting:m,setHeights:p,visibleToasts:x,heights:w,index:h,toasts:y,expanded:C,removeToast:_,defaultRichColors:F,closeButton:T,style:D,cancelButtonStyle:N,actionButtonStyle:$,className:X="",descriptionClassName:G="",duration:J,position:te,gap:ge,expandByDefault:oe,classNames:L,icons:q,closeButtonAriaLabel:j="Close toast"}=e,[ue,fe]=S.useState(null),[ie,Se]=S.useState(null),[P,V]=S.useState(!1),[U,le]=S.useState(!1),[B,z]=S.useState(!1),[de,se]=S.useState(!1),[W,R]=S.useState(!1),[Y,ne]=S.useState(0),[ve,Pe]=S.useState(0),Ne=S.useRef(c.duration||J||Mo),ze=S.useRef(null),xe=S.useRef(null),Ge=h===0,Je=h+1<=x,we=c.type,Oe=c.dismissible!==!1,Et=c.className||"",At=c.descriptionClassName||"",at=S.useMemo(()=>w.findIndex(O=>O.toastId===c.id)||0,[w,c.id]),Vt=S.useMemo(()=>{var O;return(O=c.closeButton)!=null?O:T},[c.closeButton,T]),$t=S.useMemo(()=>c.duration||J||Mo,[c.duration,J]),Ze=S.useRef(0),Ie=S.useRef(0),it=S.useRef(0),Be=S.useRef(null),[lt,cn]=te.split("-"),Lt=S.useMemo(()=>w.reduce((O,ce,pe)=>pe>=at?O:O+ce.height,0),[w,at]),zt=Yl(),un=c.invert||f,pt=we==="loading";Ie.current=S.useMemo(()=>at*ge+Lt,[at,Lt]),S.useEffect(()=>{Ne.current=$t},[$t]),S.useEffect(()=>{V(!0)},[]),S.useEffect(()=>{const O=xe.current;if(O){const ce=O.getBoundingClientRect().height;return Pe(ce),p(pe=>[{toastId:c.id,height:ce,position:c.position},...pe]),()=>p(pe=>pe.filter(Re=>Re.toastId!==c.id))}},[p,c.id]),S.useLayoutEffect(()=>{if(!P)return;const O=xe.current,ce=O.style.height;O.style.height="auto";const pe=O.getBoundingClientRect().height;O.style.height=ce,Pe(pe),p(Re=>Re.find(ye=>ye.toastId===c.id)?Re.map(ye=>ye.toastId===c.id?{...ye,height:pe}:ye):[{toastId:c.id,height:pe,position:c.position},...Re])},[P,c.title,c.description,p,c.id,c.jsx,c.action,c.cancel]);const Ee=S.useCallback(()=>{le(!0),ne(Ie.current),p(O=>O.filter(ce=>ce.toastId!==c.id)),setTimeout(()=>{_(c)},dd)},[c,_,p,Ie]);S.useEffect(()=>{if(c.promise&&we==="loading"||c.duration===1/0||c.type==="loading")return;let O;return C||m||zt?(()=>{if(it.current<Ze.current){const Re=new Date().getTime()-Ze.current;Ne.current=Ne.current-Re}it.current=new Date().getTime()})():(()=>{Ne.current!==1/0&&(Ze.current=new Date().getTime(),O=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Ee()},Ne.current))})(),()=>clearTimeout(O)},[C,m,c,we,zt,Ee]),S.useEffect(()=>{c.delete&&(Ee(),c.onDismiss==null||c.onDismiss.call(c,c))},[Ee,c.delete]);function fn(){var O;if(q!=null&&q.loading){var ce;return S.createElement("div",{className:He(L==null?void 0:L.loader,c==null||(ce=c.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":we==="loading"},q.loading)}return S.createElement(Hl,{className:He(L==null?void 0:L.loader,c==null||(O=c.classNames)==null?void 0:O.loader),visible:we==="loading"})}const Ot=c.icon||(q==null?void 0:q[we])||Ol(we);var ht,xt;return S.createElement("li",{tabIndex:0,ref:xe,className:He(X,Et,L==null?void 0:L.toast,c==null||(n=c.classNames)==null?void 0:n.toast,L==null?void 0:L.default,L==null?void 0:L[we],c==null||(t=c.classNames)==null?void 0:t[we]),"data-sonner-toast":"","data-rich-colors":(ht=c.richColors)!=null?ht:F,"data-styled":!(c.jsx||c.unstyled||g),"data-mounted":P,"data-promise":!!c.promise,"data-swiped":W,"data-removed":U,"data-visible":Je,"data-y-position":lt,"data-x-position":cn,"data-index":h,"data-front":Ge,"data-swiping":B,"data-dismissible":Oe,"data-type":we,"data-invert":un,"data-swipe-out":de,"data-swipe-direction":ie,"data-expanded":!!(C||oe&&P),"data-testid":c.testId,style:{"--index":h,"--toasts-before":h,"--z-index":y.length-h,"--offset":`${U?Y:Ie.current}px`,"--initial-height":oe?"auto":`${ve}px`,...D,...c.style},onDragEnd:()=>{z(!1),fe(null),Be.current=null},onPointerDown:O=>{O.button!==2&&(pt||!Oe||(ze.current=new Date,ne(Ie.current),O.target.setPointerCapture(O.pointerId),O.target.tagName!=="BUTTON"&&(z(!0),Be.current={x:O.clientX,y:O.clientY})))},onPointerUp:()=>{var O,ce,pe;if(de||!Oe)return;Be.current=null;const Re=Number(((O=xe.current)==null?void 0:O.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Bt=Number(((ce=xe.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((pe=ze.current)==null?void 0:pe.getTime()),De=ue==="x"?Re:Bt,Ht=Math.abs(De)/ye;if(Math.abs(De)>=ld||Ht>.11){ne(Ie.current),c.onDismiss==null||c.onDismiss.call(c,c),Se(ue==="x"?Re>0?"right":"left":Bt>0?"down":"up"),Ee(),se(!0);return}else{var Ae,Ve;(Ae=xe.current)==null||Ae.style.setProperty("--swipe-amount-x","0px"),(Ve=xe.current)==null||Ve.style.setProperty("--swipe-amount-y","0px")}R(!1),z(!1),fe(null)},onPointerMove:O=>{var ce,pe,Re;if(!Be.current||!Oe||((ce=window.getSelection())==null?void 0:ce.toString().length)>0)return;const ye=O.clientY-Be.current.y,De=O.clientX-Be.current.x;var Ht;const Ae=(Ht=e.swipeDirections)!=null?Ht:cd(te);!ue&&(Math.abs(De)>1||Math.abs(ye)>1)&&fe(Math.abs(De)>Math.abs(ye)?"x":"y");let Ve={x:0,y:0};const wo=Qe=>1/(1.5+Math.abs(Qe)/20);if(ue==="y"){if(Ae.includes("top")||Ae.includes("bottom"))if(Ae.includes("top")&&ye<0||Ae.includes("bottom")&&ye>0)Ve.y=ye;else{const Qe=ye*wo(ye);Ve.y=Math.abs(Qe)<Math.abs(ye)?Qe:ye}}else if(ue==="x"&&(Ae.includes("left")||Ae.includes("right")))if(Ae.includes("left")&&De<0||Ae.includes("right")&&De>0)Ve.x=De;else{const Qe=De*wo(De);Ve.x=Math.abs(Qe)<Math.abs(De)?Qe:De}(Math.abs(Ve.x)>0||Math.abs(Ve.y)>0)&&R(!0),(pe=xe.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ve.x}px`),(Re=xe.current)==null||Re.style.setProperty("--swipe-amount-y",`${Ve.y}px`)}},Vt&&!c.jsx&&we!=="loading"?S.createElement("button",{"aria-label":j,"data-disabled":pt,"data-close-button":!0,onClick:pt||!Oe?()=>{}:()=>{Ee(),c.onDismiss==null||c.onDismiss.call(c,c)},className:He(L==null?void 0:L.closeButton,c==null||(o=c.classNames)==null?void 0:o.closeButton)},(xt=q==null?void 0:q.close)!=null?xt:Xl):null,(we||c.icon||c.promise)&&c.icon!==null&&((q==null?void 0:q[we])!==null||c.icon)?S.createElement("div",{"data-icon":"",className:He(L==null?void 0:L.icon,c==null||(r=c.classNames)==null?void 0:r.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||fn():null,c.type!=="loading"?Ot:null):null,S.createElement("div",{"data-content":"",className:He(L==null?void 0:L.content,c==null||(s=c.classNames)==null?void 0:s.content)},S.createElement("div",{"data-title":"",className:He(L==null?void 0:L.title,c==null||(i=c.classNames)==null?void 0:i.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?S.createElement("div",{"data-description":"",className:He(G,At,L==null?void 0:L.description,c==null||(l=c.classNames)==null?void 0:l.description)},typeof c.description=="function"?c.description():c.description):null),S.isValidElement(c.cancel)?c.cancel:c.cancel&&Wt(c.cancel)?S.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:O=>{Wt(c.cancel)&&Oe&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,O),Ee())},className:He(L==null?void 0:L.cancelButton,c==null||(u=c.classNames)==null?void 0:u.cancelButton)},c.cancel.label):null,S.isValidElement(c.action)?c.action:c.action&&Wt(c.action)?S.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:O=>{Wt(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,O),!O.defaultPrevented&&Ee())},className:He(L==null?void 0:L.actionButton,c==null||(d=c.classNames)==null?void 0:d.actionButton)},c.action.label):null)};function _o(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function fd(e,n){const t={};return[e,n].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",l=s?sd:rd;function u(d){["top","right","bottom","left"].forEach(f=>{t[`${i}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof o=="number"||typeof o=="string"?u(o):typeof o=="object"?["top","right","bottom","left"].forEach(d=>{o[d]===void 0?t[`${i}-${d}`]=l:t[`${i}-${d}`]=typeof o[d]=="number"?`${o[d]}px`:o[d]}):u(l)}),t}const md=S.forwardRef(function(n,t){const{id:o,invert:r,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:f,mobileOffset:c,theme:g="light",richColors:m,duration:p,style:x,visibleToasts:w=od,toastOptions:h,dir:y=_o(),gap:C=id,icons:_,containerAriaLabel:F="Notifications"}=n,[T,D]=S.useState([]),N=S.useMemo(()=>o?T.filter(P=>P.toasterId===o):T.filter(P=>!P.toasterId),[T,o]),$=S.useMemo(()=>Array.from(new Set([s].concat(N.filter(P=>P.position).map(P=>P.position)))),[N,s]),[X,G]=S.useState([]),[J,te]=S.useState(!1),[ge,oe]=S.useState(!1),[L,q]=S.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=S.useRef(null),ue=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),fe=S.useRef(null),ie=S.useRef(!1),Se=S.useCallback(P=>{D(V=>{var U;return(U=V.find(le=>le.id===P.id))!=null&&U.delete||ke.dismiss(P.id),V.filter(({id:le})=>le!==P.id)})},[]);return S.useEffect(()=>ke.subscribe(P=>{if(P.dismiss){requestAnimationFrame(()=>{D(V=>V.map(U=>U.id===P.id?{...U,delete:!0}:U))});return}setTimeout(()=>{ui.flushSync(()=>{D(V=>{const U=V.findIndex(le=>le.id===P.id);return U!==-1?[...V.slice(0,U),{...V[U],...P},...V.slice(U+1)]:[P,...V]})})})}),[T]),S.useEffect(()=>{if(g!=="system"){q(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;const P=window.matchMedia("(prefers-color-scheme: dark)");try{P.addEventListener("change",({matches:V})=>{q(V?"dark":"light")})}catch{P.addListener(({matches:U})=>{try{q(U?"dark":"light")}catch(le){console.error(le)}})}},[g]),S.useEffect(()=>{T.length<=1&&te(!1)},[T]),S.useEffect(()=>{const P=V=>{var U;if(i.every(z=>V[z]||V.code===z)){var B;te(!0),(B=j.current)==null||B.focus()}V.code==="Escape"&&(document.activeElement===j.current||(U=j.current)!=null&&U.contains(document.activeElement))&&te(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[i]),S.useEffect(()=>{if(j.current)return()=>{fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null,ie.current=!1)}},[j.current]),S.createElement("section",{ref:t,"aria-label":`${F} ${ue}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((P,V)=>{var U;const[le,B]=P.split("-");return N.length?S.createElement("ol",{key:P,dir:y==="auto"?_o():y,tabIndex:-1,ref:j,className:d,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":le,"data-x-position":B,style:{"--front-toast-height":`${((U=X[0])==null?void 0:U.height)||0}px`,"--width":`${ad}px`,"--gap":`${C}px`,...x,...fd(f,c)},onBlur:z=>{ie.current&&!z.currentTarget.contains(z.relatedTarget)&&(ie.current=!1,fe.current&&(fe.current.focus({preventScroll:!0}),fe.current=null))},onFocus:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||ie.current||(ie.current=!0,fe.current=z.relatedTarget)},onMouseEnter:()=>te(!0),onMouseMove:()=>te(!0),onMouseLeave:()=>{ge||te(!1)},onDragEnd:()=>te(!1),onPointerDown:z=>{z.target instanceof HTMLElement&&z.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},N.filter(z=>!z.position&&V===0||z.position===P).map((z,de)=>{var se,W;return S.createElement(ud,{key:z.id,icons:_,index:de,toast:z,defaultRichColors:m,duration:(se=h==null?void 0:h.duration)!=null?se:p,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:r,visibleToasts:w,closeButton:(W=h==null?void 0:h.closeButton)!=null?W:u,interacting:ge,position:P,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,closeButtonAriaLabel:h==null?void 0:h.closeButtonAriaLabel,removeToast:Se,toasts:N.filter(R=>R.position==z.position),heights:X.filter(R=>R.position==z.position),setHeights:G,expandByDefault:l,gap:C,expanded:J,swipeDirections:n.swipeDirections})})):null}))}),pn=["light","dark","system"];function gd(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Po(e){return e==="system"?gd():e}function pd(e){if(typeof document>"u")return()=>{};const n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*, *::before, *::after { transition: none !important; animation: none !important; }")),document.head.appendChild(n),window.getComputedStyle(document.body),()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{document.head.removeChild(n)})})}}function hd(e,n){const t=document.documentElement;n==="class"?(t.classList.remove("light","dark"),t.classList.add(e)):t.setAttribute("data-theme",e)}const js=S.createContext(void 0);function xd({children:e,defaultTheme:n="system",storageKey:t="nui-theme",attribute:o="class",enableSystem:r=!0,disableTransitionOnChange:s=!1,forcedTheme:i,nonce:l}){const[u,d]=S.useState(()=>{if(typeof window>"u")return n;const h=localStorage.getItem(t);return h&&pn.includes(h)?h:n}),[f,c]=S.useState(()=>Po(i??u)),g=S.useRef(u);g.current=u;const m=S.useCallback(()=>{const h=i??g.current,y=Po(h);c(y);let C;s&&(C=pd(l)),hd(y,o),C==null||C()},[i,o,s,l]);S.useEffect(()=>{m()},[u,i,m]),S.useEffect(()=>{if(!r)return;const h=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{(i??g.current)==="system"&&m()};return h.addEventListener("change",y),()=>h.removeEventListener("change",y)},[r,i,m]),S.useEffect(()=>{const h=y=>{if(y.key===t&&y.newValue){const C=y.newValue;pn.includes(C)&&d(C)}};return window.addEventListener("storage",h),()=>window.removeEventListener("storage",h)},[t]);const p=S.useCallback(h=>{!r&&h==="system"||(localStorage.setItem(t,h),d(h))},[t,r]),x=S.useMemo(()=>r?pn:["light","dark"],[r]),w=S.useMemo(()=>({theme:i??u,resolvedTheme:f,setTheme:p,themes:x}),[i,u,f,p,x]);return a.jsx(js.Provider,{value:w,children:e})}function rn(){const e=S.useContext(js);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const bd=({theme:e,...n})=>{let t=e;try{const{resolvedTheme:o}=rn();e||(t=o)}catch{t||(t="system")}return a.jsx(md,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...n})};function vd({icon:e,title:n,description:t,action:o,className:r}){return a.jsxs("div",{className:b("flex flex-col items-center justify-center py-12 px-4 text-center",r),children:[e&&a.jsx("div",{className:"mb-4 text-muted-foreground",children:e}),a.jsx("h3",{className:"text-lg font-semibold",children:n}),t&&a.jsx("p",{className:"mt-1 text-sm text-muted-foreground max-w-sm",children:t}),o&&a.jsx("div",{className:"mt-4",children:o})]})}const ks=v.forwardRef(({...e},n)=>a.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));ks.displayName="Breadcrumb";const Ms=v.forwardRef(({className:e,...n},t)=>a.jsx("ol",{ref:t,className:b("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));Ms.displayName="BreadcrumbList";const _s=v.forwardRef(({className:e,...n},t)=>a.jsx("li",{ref:t,className:b("inline-flex items-center gap-1.5",e),...n}));_s.displayName="BreadcrumbItem";const Ps=v.forwardRef(({asChild:e,className:n,...t},o)=>{const r=e?$o.Slot:"a";return a.jsx(r,{ref:o,className:b("transition-colors hover:text-foreground",n),...t})});Ps.displayName="BreadcrumbLink";const Is=v.forwardRef(({className:e,...n},t)=>a.jsx("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:b("font-normal text-foreground",e),...n}));Is.displayName="BreadcrumbPage";const Ts=({children:e,className:n,...t})=>a.jsx("li",{role:"presentation","aria-hidden":"true",className:b("[&>svg]:w-3.5 [&>svg]:h-3.5",n),...t,children:e??a.jsx(I.ChevronRight,{})});Ts.displayName="BreadcrumbSeparator";const Ds=({className:e,...n})=>a.jsxs("span",{role:"presentation","aria-hidden":"true",className:b("flex h-9 w-9 items-center justify-center",e),...n,children:[a.jsx("span",{className:"h-4 w-4",children:"..."}),a.jsx("span",{className:"sr-only",children:"More"})]});Ds.displayName="BreadcrumbEllipsis";const Fs=({className:e,...n})=>a.jsx("nav",{role:"navigation","aria-label":"pagination",className:b("mx-auto flex w-full justify-center",e),...n});Fs.displayName="Pagination";const Es=v.forwardRef(({className:e,...n},t)=>a.jsx("ul",{ref:t,className:b("flex flex-row items-center gap-1",e),...n}));Es.displayName="PaginationContent";const As=v.forwardRef(({className:e,...n},t)=>a.jsx("li",{ref:t,className:b("",e),...n}));As.displayName="PaginationItem";const sn=({className:e,isActive:n,size:t="icon",...o})=>a.jsx("a",{"aria-current":n?"page":void 0,className:b(Dt({variant:n?"outline":"ghost",size:t}),e),...o});sn.displayName="PaginationLink";const Vs=({className:e,...n})=>a.jsxs(sn,{"aria-label":"Go to previous page",size:"default",className:b("gap-1 pl-2.5",e),...n,children:[a.jsx(I.ChevronLeft,{className:"h-4 w-4"}),a.jsx("span",{children:"Previous"})]});Vs.displayName="PaginationPrevious";const $s=({className:e,...n})=>a.jsxs(sn,{"aria-label":"Go to next page",size:"default",className:b("gap-1 pr-2.5",e),...n,children:[a.jsx("span",{children:"Next"}),a.jsx(I.ChevronRight,{className:"h-4 w-4"})]});$s.displayName="PaginationNext";const Ls=({className:e,...n})=>a.jsxs("span",{"aria-hidden":!0,className:b("flex h-9 w-9 items-center justify-center",e),...n,children:[a.jsx(I.MoreHorizontal,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"More pages"})]});Ls.displayName="PaginationEllipsis";function wd({steps:e,activeStep:n,orientation:t="horizontal",className:o}){return a.jsx("div",{className:b("flex",t==="vertical"?"flex-col":"flex-row items-center",o),children:e.map((r,s)=>{const i=s<n,l=s===n,u=s===e.length-1;return a.jsxs(v.Fragment,{children:[a.jsxs("div",{className:b("flex items-center",t==="vertical"&&"flex-row"),children:[a.jsx("div",{className:b("flex h-10 w-10 items-center justify-center rounded-full border-2 font-semibold transition-colors",i&&"border-primary bg-primary text-primary-foreground",l&&"border-primary text-primary",!i&&!l&&"border-muted-foreground/30 text-muted-foreground"),children:i?a.jsx(I.Check,{className:"h-5 w-5"}):s+1}),a.jsxs("div",{className:b("ml-3",t==="horizontal"&&"hidden sm:block"),children:[a.jsx("p",{className:b("text-sm font-medium",l&&"text-foreground",!l&&"text-muted-foreground"),children:r.title}),r.description&&a.jsx("p",{className:"text-xs text-muted-foreground",children:r.description})]})]}),!u&&a.jsx("div",{className:b("flex-1",t==="horizontal"?"mx-4 h-0.5 min-w-[3rem]":"ml-5 my-2 w-0.5 min-h-[2rem]",i?"bg-primary":"bg-muted-foreground/30")})]},s)})})}const zs=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(_e.Root,{ref:o,className:b("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...t,children:[n,a.jsx(co,{})]}));zs.displayName=_e.Root.displayName;const Os=v.forwardRef(({className:e,...n},t)=>a.jsx(_e.List,{ref:t,className:b("group flex flex-1 list-none items-center justify-center space-x-1",e),...n}));Os.displayName=_e.List.displayName;const yd=_e.Item,Bs=Fe("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Hs=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(_e.Trigger,{ref:o,className:b(Bs(),"group",e),...t,children:[n," ",a.jsx(I.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Hs.displayName=_e.Trigger.displayName;const Gs=v.forwardRef(({className:e,...n},t)=>a.jsx(_e.Content,{ref:t,className:b("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...n}));Gs.displayName=_e.Content.displayName;const Cd=_e.Link,co=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{className:b("absolute left-0 top-full flex justify-center"),children:a.jsx(_e.Viewport,{className:b("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:t,...n})}));co.displayName=_e.Viewport.displayName;const qs=v.forwardRef(({className:e,...n},t)=>a.jsx(_e.Indicator,{ref:t,className:b("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...n,children:a.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));qs.displayName=_e.Indicator.displayName;const Sd=Q.Root,Nd=Q.Trigger,Rd=Q.Group,jd=Q.Portal,kd=Q.Sub,Md=Q.RadioGroup,Us=v.forwardRef(({className:e,inset:n,children:t,...o},r)=>a.jsxs(Q.SubTrigger,{ref:r,className:b("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",e),...o,children:[t,a.jsx(I.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Us.displayName=Q.SubTrigger.displayName;const Ws=v.forwardRef(({className:e,...n},t)=>a.jsx(Q.SubContent,{ref:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Ws.displayName=Q.SubContent.displayName;const Xs=v.forwardRef(({className:e,...n},t)=>a.jsx(Q.Portal,{children:a.jsx(Q.Content,{ref:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Xs.displayName=Q.Content.displayName;const Ys=v.forwardRef(({className:e,inset:n,...t},o)=>a.jsx(Q.Item,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...t}));Ys.displayName=Q.Item.displayName;const Ks=v.forwardRef(({className:e,children:n,checked:t,...o},r)=>a.jsxs(Q.CheckboxItem,{ref:r,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...o,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Q.ItemIndicator,{children:a.jsx(I.Check,{className:"h-4 w-4"})})}),n]}));Ks.displayName=Q.CheckboxItem.displayName;const Js=v.forwardRef(({className:e,children:n,...t},o)=>a.jsxs(Q.RadioItem,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Q.ItemIndicator,{children:a.jsx(I.Circle,{className:"h-2 w-2 fill-current"})})}),n]}));Js.displayName=Q.RadioItem.displayName;const Zs=v.forwardRef(({className:e,inset:n,...t},o)=>a.jsx(Q.Label,{ref:o,className:b("px-2 py-1.5 text-sm font-semibold text-foreground",n&&"pl-8",e),...t}));Zs.displayName=Q.Label.displayName;const Qs=v.forwardRef(({className:e,...n},t)=>a.jsx(Q.Separator,{ref:t,className:b("-mx-1 my-1 h-px bg-border",e),...n}));Qs.displayName=Q.Separator.displayName;const ea=({className:e,...n})=>a.jsx("span",{className:b("ml-auto text-xs tracking-widest text-muted-foreground",e),...n});ea.displayName="ContextMenuShortcut";const _d=nn.Root,Pd=nn.Trigger,ta=v.forwardRef(({className:e,align:n="center",sideOffset:t=4,...o},r)=>a.jsx(nn.Content,{ref:r,align:n,sideOffset:t,className:b("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));ta.displayName=nn.Content.displayName;function Id(e){return Object.prototype.toString.call(e)==="[object Object]"}function Io(e){return Id(e)||Array.isArray(e)}function Td(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function uo(e,n){const t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(n.breakpoints||{}));return r!==s?!1:t.every(i=>{const l=e[i],u=n[i];return typeof l=="function"?`${l}`==`${u}`:!Io(l)||!Io(u)?l===u:uo(l,u)})}function To(e){return e.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function Dd(e,n){if(e.length!==n.length)return!1;const t=To(e),o=To(n);return t.every((r,s)=>{const i=o[s];return uo(r,i)})}function fo(e){return typeof e=="number"}function Mn(e){return typeof e=="string"}function an(e){return typeof e=="boolean"}function Do(e){return Object.prototype.toString.call(e)==="[object Object]"}function re(e){return Math.abs(e)}function mo(e){return Math.sign(e)}function Rt(e,n){return re(e-n)}function Fd(e,n){if(e===0||n===0||re(e)<=re(n))return 0;const t=Rt(re(e),re(n));return re(t/e)}function Ed(e){return Math.round(e*100)/100}function _t(e){return Pt(e).map(Number)}function $e(e){return e[Ft(e)]}function Ft(e){return Math.max(0,e.length-1)}function go(e,n){return n===Ft(e)}function Fo(e,n=0){return Array.from(Array(e),(t,o)=>n+o)}function Pt(e){return Object.keys(e)}function na(e,n){return[e,n].reduce((t,o)=>(Pt(o).forEach(r=>{const s=t[r],i=o[r],l=Do(s)&&Do(i);t[r]=l?na(s,i):i}),t),{})}function _n(e,n){return typeof n.MouseEvent<"u"&&e instanceof n.MouseEvent}function Ad(e,n){const t={start:o,center:r,end:s};function o(){return 0}function r(u){return s(u)/2}function s(u){return n-u}function i(u,d){return Mn(e)?t[e](u):e(n,u,d)}return{measure:i}}function It(){let e=[];function n(r,s,i,l={passive:!0}){let u;if("addEventListener"in r)r.addEventListener(s,i,l),u=()=>r.removeEventListener(s,i,l);else{const d=r;d.addListener(i),u=()=>d.removeListener(i)}return e.push(u),o}function t(){e=e.filter(r=>r())}const o={add:n,clear:t};return o}function Vd(e,n,t,o){const r=It(),s=1e3/60;let i=null,l=0,u=0;function d(){r.add(e,"visibilitychange",()=>{e.hidden&&p()})}function f(){m(),r.clear()}function c(w){if(!u)return;i||(i=w,t(),t());const h=w-i;for(i=w,l+=h;l>=s;)t(),l-=s;const y=l/s;o(y),u&&(u=n.requestAnimationFrame(c))}function g(){u||(u=n.requestAnimationFrame(c))}function m(){n.cancelAnimationFrame(u),i=null,l=0,u=0}function p(){i=null,l=0}return{init:d,destroy:f,start:g,stop:m,update:t,render:o}}function $d(e,n){const t=n==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&t?-1:1,l=f(),u=c();function d(p){const{height:x,width:w}=p;return o?x:w}function f(){return o?"top":t?"right":"left"}function c(){return o?"bottom":t?"left":"right"}function g(p){return p*i}return{scroll:r,cross:s,startEdge:l,endEdge:u,measureSize:d,direction:g}}function ot(e=0,n=0){const t=re(e-n);function o(d){return d<e}function r(d){return d>n}function s(d){return o(d)||r(d)}function i(d){return s(d)?o(d)?e:n:d}function l(d){return t?d-t*Math.ceil((d-n)/t):d}return{length:t,max:n,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:l}}function oa(e,n,t){const{constrain:o}=ot(0,e),r=e+1;let s=i(n);function i(g){return t?re((r+g)%r):o(g)}function l(){return s}function u(g){return s=i(g),c}function d(g){return f().set(l()+g)}function f(){return oa(e,l(),t)}const c={get:l,set:u,add:d,clone:f};return c}function Ld(e,n,t,o,r,s,i,l,u,d,f,c,g,m,p,x,w,h,y){const{cross:C,direction:_}=e,F=["INPUT","SELECT","TEXTAREA"],T={passive:!1},D=It(),N=It(),$=ot(50,225).constrain(m.measure(20)),X={mouse:300,touch:400},G={mouse:500,touch:600},J=p?43:25;let te=!1,ge=0,oe=0,L=!1,q=!1,j=!1,ue=!1;function fe(R){if(!y)return;function Y(ve){(an(y)||y(R,ve))&&le(ve)}const ne=n;D.add(ne,"dragstart",ve=>ve.preventDefault(),T).add(ne,"touchmove",()=>{},T).add(ne,"touchend",()=>{}).add(ne,"touchstart",Y).add(ne,"mousedown",Y).add(ne,"touchcancel",z).add(ne,"contextmenu",z).add(ne,"click",de,!0)}function ie(){D.clear(),N.clear()}function Se(){const R=ue?t:n;N.add(R,"touchmove",B,T).add(R,"touchend",z).add(R,"mousemove",B,T).add(R,"mouseup",z)}function P(R){const Y=R.nodeName||"";return F.includes(Y)}function V(){return(p?G:X)[ue?"mouse":"touch"]}function U(R,Y){const ne=c.add(mo(R)*-1),ve=f.byDistance(R,!p).distance;return p||re(R)<$?ve:w&&Y?ve*.5:f.byIndex(ne.get(),0).distance}function le(R){const Y=_n(R,o);ue=Y,j=p&&Y&&!R.buttons&&te,te=Rt(r.get(),i.get())>=2,!(Y&&R.button!==0)&&(P(R.target)||(L=!0,s.pointerDown(R),d.useFriction(0).useDuration(0),r.set(i),Se(),ge=s.readPoint(R),oe=s.readPoint(R,C),g.emit("pointerDown")))}function B(R){if(!_n(R,o)&&R.touches.length>=2)return z(R);const ne=s.readPoint(R),ve=s.readPoint(R,C),Pe=Rt(ne,ge),Ne=Rt(ve,oe);if(!q&&!ue&&(!R.cancelable||(q=Pe>Ne,!q)))return z(R);const ze=s.pointerMove(R);Pe>x&&(j=!0),d.useFriction(.3).useDuration(.75),l.start(),r.add(_(ze)),R.preventDefault()}function z(R){const ne=f.byDistance(0,!1).index!==c.get(),ve=s.pointerUp(R)*V(),Pe=U(_(ve),ne),Ne=Fd(ve,Pe),ze=J-10*Ne,xe=h+Ne/50;q=!1,L=!1,N.clear(),d.useDuration(ze).useFriction(xe),u.distance(Pe,!p),ue=!1,g.emit("pointerUp")}function de(R){j&&(R.stopPropagation(),R.preventDefault(),j=!1)}function se(){return L}return{init:fe,destroy:ie,pointerDown:se}}function zd(e,n){let o,r;function s(c){return c.timeStamp}function i(c,g){const p=`client${(g||e.scroll)==="x"?"X":"Y"}`;return(_n(c,n)?c:c.touches[0])[p]}function l(c){return o=c,r=c,i(c)}function u(c){const g=i(c)-i(r),m=s(c)-s(o)>170;return r=c,m&&(o=c),g}function d(c){if(!o||!r)return 0;const g=i(r)-i(o),m=s(c)-s(o),p=s(c)-s(r)>170,x=g/m;return m&&!p&&re(x)>.1?x:0}return{pointerDown:l,pointerMove:u,pointerUp:d,readPoint:i}}function Od(){function e(t){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=t;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function Bd(e){function n(o){return e*(o/100)}return{measure:n}}function Hd(e,n,t,o,r,s,i){const l=[e].concat(o);let u,d,f=[],c=!1;function g(w){return r.measureSize(i.measure(w))}function m(w){if(!s)return;d=g(e),f=o.map(g);function h(y){for(const C of y){if(c)return;const _=C.target===e,F=o.indexOf(C.target),T=_?d:f[F],D=g(_?e:o[F]);if(re(D-T)>=.5){w.reInit(),n.emit("resize");break}}}u=new ResizeObserver(y=>{(an(s)||s(w,y))&&h(y)}),t.requestAnimationFrame(()=>{l.forEach(y=>u.observe(y))})}function p(){c=!0,u&&u.disconnect()}return{init:m,destroy:p}}function Gd(e,n,t,o,r,s){let i=0,l=0,u=r,d=s,f=e.get(),c=0;function g(){const T=o.get()-e.get(),D=!u;let N=0;return D?(i=0,t.set(o),e.set(o),N=T):(t.set(e),i+=T/u,i*=d,f+=i,e.add(i),N=f-c),l=mo(N),c=f,F}function m(){const T=o.get()-n.get();return re(T)<.001}function p(){return u}function x(){return l}function w(){return i}function h(){return C(r)}function y(){return _(s)}function C(T){return u=T,F}function _(T){return d=T,F}const F={direction:x,duration:p,velocity:w,seek:g,settled:m,useBaseFriction:y,useBaseDuration:h,useFriction:_,useDuration:C};return F}function qd(e,n,t,o,r){const s=r.measure(10),i=r.measure(50),l=ot(.1,.99);let u=!1;function d(){return!(u||!e.reachedAny(t.get())||!e.reachedAny(n.get()))}function f(m){if(!d())return;const p=e.reachedMin(n.get())?"min":"max",x=re(e[p]-n.get()),w=t.get()-n.get(),h=l.constrain(x/i);t.subtract(w*h),!m&&re(w)<s&&(t.set(e.constrain(t.get())),o.useDuration(25).useBaseFriction())}function c(m){u=!m}return{shouldConstrain:d,constrain:f,toggleActive:c}}function Ud(e,n,t,o,r){const s=ot(-n+e,0),i=c(),l=f(),u=g();function d(p,x){return Rt(p,x)<=1}function f(){const p=i[0],x=$e(i),w=i.lastIndexOf(p),h=i.indexOf(x)+1;return ot(w,h)}function c(){return t.map((p,x)=>{const{min:w,max:h}=s,y=s.constrain(p),C=!x,_=go(t,x);return C?h:_||d(w,y)?w:d(h,y)?h:y}).map(p=>parseFloat(p.toFixed(3)))}function g(){if(n<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:p,max:x}=l;return i.slice(p,x)}return{snapsContained:u,scrollContainLimit:l}}function Wd(e,n,t){const o=n[0],r=t?o-e:$e(n);return{limit:ot(r,o)}}function Xd(e,n,t,o){const s=n.min+.1,i=n.max+.1,{reachedMin:l,reachedMax:u}=ot(s,i);function d(g){return g===1?u(t.get()):g===-1?l(t.get()):!1}function f(g){if(!d(g))return;const m=e*(g*-1);o.forEach(p=>p.add(m))}return{loop:f}}function Yd(e){const{max:n,length:t}=e;function o(s){const i=s-n;return t?i/-t:0}return{get:o}}function Kd(e,n,t,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:l}=r,u=c().map(n.measure),d=g(),f=m();function c(){return l(o).map(x=>$e(x)[i]-x[0][s]).map(re)}function g(){return o.map(x=>t[s]-x[s]).map(x=>-re(x))}function m(){return l(d).map(x=>x[0]).map((x,w)=>x+u[w])}return{snaps:d,snapsAligned:f}}function Jd(e,n,t,o,r,s){const{groupSlides:i}=r,{min:l,max:u}=o,d=f();function f(){const g=i(s),m=!e||n==="keepSnaps";return t.length===1?[s]:m?g:g.slice(l,u).map((p,x,w)=>{const h=!x,y=go(w,x);if(h){const C=$e(w[0])+1;return Fo(C)}if(y){const C=Ft(s)-$e(w)[0]+1;return Fo(C,$e(w)[0])}return p})}return{slideRegistry:d}}function Zd(e,n,t,o,r){const{reachedAny:s,removeOffset:i,constrain:l}=o;function u(p){return p.concat().sort((x,w)=>re(x)-re(w))[0]}function d(p){const x=e?i(p):l(p),w=n.map((y,C)=>({diff:f(y-x,0),index:C})).sort((y,C)=>re(y.diff)-re(C.diff)),{index:h}=w[0];return{index:h,distance:x}}function f(p,x){const w=[p,p+t,p-t];if(!e)return p;if(!x)return u(w);const h=w.filter(y=>mo(y)===x);return h.length?u(h):$e(w)-t}function c(p,x){const w=n[p]-r.get(),h=f(w,x);return{index:p,distance:h}}function g(p,x){const w=r.get()+p,{index:h,distance:y}=d(w),C=!e&&s(w);if(!x||C)return{index:h,distance:p};const _=n[h]-y,F=p+f(_,0);return{index:h,distance:F}}return{byDistance:g,byIndex:c,shortcut:f}}function Qd(e,n,t,o,r,s,i){function l(c){const g=c.distance,m=c.index!==n.get();s.add(g),g&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(t.set(n.get()),n.set(c.index),i.emit("select"))}function u(c,g){const m=r.byDistance(c,g);l(m)}function d(c,g){const m=n.clone().set(c),p=r.byIndex(m.get(),g);l(p)}return{distance:u,index:d}}function ec(e,n,t,o,r,s,i,l){const u={passive:!0,capture:!0};let d=0;function f(m){if(!l)return;function p(x){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const y=t.findIndex(C=>C.includes(x));fo(y)&&(r.useDuration(0),o.index(y,0),i.emit("slideFocus"))}s.add(document,"keydown",c,!1),n.forEach((x,w)=>{s.add(x,"focus",h=>{(an(l)||l(m,h))&&p(w)},u)})}function c(m){m.code==="Tab"&&(d=new Date().getTime())}return{init:f}}function Ct(e){let n=e;function t(){return n}function o(u){n=i(u)}function r(u){n+=i(u)}function s(u){n-=i(u)}function i(u){return fo(u)?u:u.get()}return{get:t,set:o,add:r,subtract:s}}function ra(e,n){const t=e.scroll==="x"?i:l,o=n.style;let r=null,s=!1;function i(g){return`translate3d(${g}px,0px,0px)`}function l(g){return`translate3d(0px,${g}px,0px)`}function u(g){if(s)return;const m=Ed(e.direction(g));m!==r&&(o.transform=t(m),r=m)}function d(g){s=!g}function f(){s||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:f,to:u,toggleActive:d}}function tc(e,n,t,o,r,s,i,l,u){const f=_t(r),c=_t(r).reverse(),g=h().concat(y());function m(D,N){return D.reduce(($,X)=>$-r[X],N)}function p(D,N){return D.reduce(($,X)=>m($,N)>0?$.concat([X]):$,[])}function x(D){return s.map((N,$)=>({start:N-o[$]+.5+D,end:N+n-.5+D}))}function w(D,N,$){const X=x(N);return D.map(G=>{const J=$?0:-t,te=$?t:0,ge=$?"end":"start",oe=X[G][ge];return{index:G,loopPoint:oe,slideLocation:Ct(-1),translate:ra(e,u[G]),target:()=>l.get()>oe?J:te}})}function h(){const D=i[0],N=p(c,D);return w(N,t,!1)}function y(){const D=n-i[0]-1,N=p(f,D);return w(N,-t,!0)}function C(){return g.every(({index:D})=>{const N=f.filter($=>$!==D);return m(N,n)<=.1})}function _(){g.forEach(D=>{const{target:N,translate:$,slideLocation:X}=D,G=N();G!==X.get()&&($.to(G),X.set(G))})}function F(){g.forEach(D=>D.translate.clear())}return{canLoop:C,clear:F,loop:_,loopPoints:g}}function nc(e,n,t){let o,r=!1;function s(u){if(!t)return;function d(f){for(const c of f)if(c.type==="childList"){u.reInit(),n.emit("slidesChanged");break}}o=new MutationObserver(f=>{r||(an(t)||t(u,f))&&d(f)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function oc(e,n,t,o){const r={};let s=null,i=null,l,u=!1;function d(){l=new IntersectionObserver(p=>{u||(p.forEach(x=>{const w=n.indexOf(x.target);r[w]=x}),s=null,i=null,t.emit("slidesInView"))},{root:e.parentElement,threshold:o}),n.forEach(p=>l.observe(p))}function f(){l&&l.disconnect(),u=!0}function c(p){return Pt(r).reduce((x,w)=>{const h=parseInt(w),{isIntersecting:y}=r[h];return(p&&y||!p&&!y)&&x.push(h),x},[])}function g(p=!0){if(p&&s)return s;if(!p&&i)return i;const x=c(p);return p&&(s=x),p||(i=x),x}return{init:d,destroy:f,get:g}}function rc(e,n,t,o,r,s){const{measureSize:i,startEdge:l,endEdge:u}=e,d=t[0]&&r,f=p(),c=x(),g=t.map(i),m=w();function p(){if(!d)return 0;const y=t[0];return re(n[l]-y[l])}function x(){if(!d)return 0;const y=s.getComputedStyle($e(o));return parseFloat(y.getPropertyValue(`margin-${u}`))}function w(){return t.map((y,C,_)=>{const F=!C,T=go(_,C);return F?g[C]+f:T?g[C]+c:_[C+1][l]-y[l]}).map(re)}return{slideSizes:g,slideSizesWithGaps:m,startGap:f,endGap:c}}function sc(e,n,t,o,r,s,i,l,u){const{startEdge:d,endEdge:f,direction:c}=e,g=fo(t);function m(h,y){return _t(h).filter(C=>C%y===0).map(C=>h.slice(C,C+y))}function p(h){return h.length?_t(h).reduce((y,C,_)=>{const F=$e(y)||0,T=F===0,D=C===Ft(h),N=r[d]-s[F][d],$=r[d]-s[C][f],X=!o&&T?c(i):0,G=!o&&D?c(l):0,J=re($-G-(N+X));return _&&J>n+u&&y.push(C),D&&y.push(h.length),y},[]).map((y,C,_)=>{const F=Math.max(_[C-1]||0);return h.slice(F,y)}):[]}function x(h){return g?m(h,t):p(h)}return{groupSlides:x}}function ac(e,n,t,o,r,s,i){const{align:l,axis:u,direction:d,startIndex:f,loop:c,duration:g,dragFree:m,dragThreshold:p,inViewThreshold:x,slidesToScroll:w,skipSnaps:h,containScroll:y,watchResize:C,watchSlides:_,watchDrag:F,watchFocus:T}=s,D=2,N=Od(),$=N.measure(n),X=t.map(N.measure),G=$d(u,d),J=G.measureSize($),te=Bd(J),ge=Ad(l,J),oe=!c&&!!y,L=c||!!y,{slideSizes:q,slideSizesWithGaps:j,startGap:ue,endGap:fe}=rc(G,$,X,t,L,r),ie=sc(G,J,w,c,$,X,ue,fe,D),{snaps:Se,snapsAligned:P}=Kd(G,ge,$,X,ie),V=-$e(Se)+$e(j),{snapsContained:U,scrollContainLimit:le}=Ud(J,V,P,y,D),B=oe?U:P,{limit:z}=Wd(V,B,c),de=oa(Ft(B),f,c),se=de.clone(),W=_t(t),R=({dragHandler:Ie,scrollBody:it,scrollBounds:Be,options:{loop:lt}})=>{lt||Be.constrain(Ie.pointerDown()),it.seek()},Y=({scrollBody:Ie,translate:it,location:Be,offsetLocation:lt,previousLocation:cn,scrollLooper:Lt,slideLooper:zt,dragHandler:un,animation:pt,eventHandler:Ee,scrollBounds:fn,options:{loop:Ot}},ht)=>{const xt=Ie.settled(),O=!fn.shouldConstrain(),ce=Ot?xt:xt&&O,pe=ce&&!un.pointerDown();pe&&pt.stop();const Re=Be.get()*ht+cn.get()*(1-ht);lt.set(Re),Ot&&(Lt.loop(Ie.direction()),zt.loop()),it.to(lt.get()),pe&&Ee.emit("settle"),ce||Ee.emit("scroll")},ne=Vd(o,r,()=>R(Ze),Ie=>Y(Ze,Ie)),ve=.68,Pe=B[de.get()],Ne=Ct(Pe),ze=Ct(Pe),xe=Ct(Pe),Ge=Ct(Pe),Je=Gd(Ne,xe,ze,Ge,g,ve),we=Zd(c,B,V,z,Ge),Oe=Qd(ne,de,se,Je,we,Ge,i),Et=Yd(z),At=It(),at=oc(n,t,i,x),{slideRegistry:Vt}=Jd(oe,y,B,le,ie,W),$t=ec(e,t,Vt,Oe,Je,At,i,T),Ze={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:$,slideRects:X,animation:ne,axis:G,dragHandler:Ld(G,e,o,r,Ge,zd(G,r),Ne,ne,Oe,Je,we,de,i,te,m,p,h,ve,F),eventStore:At,percentOfView:te,index:de,indexPrevious:se,limit:z,location:Ne,offsetLocation:xe,previousLocation:ze,options:s,resizeHandler:Hd(n,i,r,t,G,C,N),scrollBody:Je,scrollBounds:qd(z,xe,Ge,Je,te),scrollLooper:Xd(V,z,xe,[Ne,xe,ze,Ge]),scrollProgress:Et,scrollSnapList:B.map(Et.get),scrollSnaps:B,scrollTarget:we,scrollTo:Oe,slideLooper:tc(G,J,V,q,j,Se,B,xe,t),slideFocus:$t,slidesHandler:nc(n,i,_),slidesInView:at,slideIndexes:W,slideRegistry:Vt,slidesToScroll:ie,target:Ge,translate:ra(G,n)};return Ze}function ic(){let e={},n;function t(d){n=d}function o(d){return e[d]||[]}function r(d){return o(d).forEach(f=>f(n,d)),u}function s(d,f){return e[d]=o(d).concat([f]),u}function i(d,f){return e[d]=o(d).filter(c=>c!==f),u}function l(){e={}}const u={init:t,emit:r,off:i,on:s,clear:l};return u}const lc={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function dc(e){function n(s,i){return na(s,i||{})}function t(s){const i=s.breakpoints||{},l=Pt(i).filter(u=>e.matchMedia(u).matches).map(u=>i[u]).reduce((u,d)=>n(u,d),{});return n(s,l)}function o(s){return s.map(i=>Pt(i.breakpoints||{})).reduce((i,l)=>i.concat(l),[]).map(e.matchMedia)}return{mergeOptions:n,optionsAtMedia:t,optionsMediaQueries:o}}function cc(e){let n=[];function t(s,i){return n=i.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),n.forEach(l=>l.init(s,e)),i.reduce((l,u)=>Object.assign(l,{[u.name]:u}),{})}function o(){n=n.filter(s=>s.destroy())}return{init:t,destroy:o}}function en(e,n,t){const o=e.ownerDocument,r=o.defaultView,s=dc(r),i=cc(s),l=It(),u=ic(),{mergeOptions:d,optionsAtMedia:f,optionsMediaQueries:c}=s,{on:g,off:m,emit:p}=u,x=G;let w=!1,h,y=d(lc,en.globalOptions),C=d(y),_=[],F,T,D;function N(){const{container:W,slides:R}=C;T=(Mn(W)?e.querySelector(W):W)||e.children[0];const ne=Mn(R)?T.querySelectorAll(R):R;D=[].slice.call(ne||T.children)}function $(W){const R=ac(e,T,D,o,r,W,u);if(W.loop&&!R.slideLooper.canLoop()){const Y=Object.assign({},W,{loop:!1});return $(Y)}return R}function X(W,R){w||(y=d(y,W),C=f(y),_=R||_,N(),h=$(C),c([y,..._.map(({options:Y})=>Y)]).forEach(Y=>l.add(Y,"change",G)),C.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(se),h.eventHandler.init(se),h.resizeHandler.init(se),h.slidesHandler.init(se),h.options.loop&&h.slideLooper.loop(),T.offsetParent&&D.length&&h.dragHandler.init(se),F=i.init(se,_)))}function G(W,R){const Y=ie();J(),X(d({startIndex:Y},W),R),u.emit("reInit")}function J(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),l.clear()}function te(){w||(w=!0,l.clear(),J(),u.emit("destroy"),u.clear())}function ge(W,R,Y){!C.active||w||(h.scrollBody.useBaseFriction().useDuration(R===!0?0:C.duration),h.scrollTo.index(W,Y||0))}function oe(W){const R=h.index.add(1).get();ge(R,W,-1)}function L(W){const R=h.index.add(-1).get();ge(R,W,1)}function q(){return h.index.add(1).get()!==ie()}function j(){return h.index.add(-1).get()!==ie()}function ue(){return h.scrollSnapList}function fe(){return h.scrollProgress.get(h.offsetLocation.get())}function ie(){return h.index.get()}function Se(){return h.indexPrevious.get()}function P(){return h.slidesInView.get()}function V(){return h.slidesInView.get(!1)}function U(){return F}function le(){return h}function B(){return e}function z(){return T}function de(){return D}const se={canScrollNext:q,canScrollPrev:j,containerNode:z,internalEngine:le,destroy:te,off:m,on:g,emit:p,plugins:U,previousScrollSnap:Se,reInit:x,rootNode:B,scrollNext:oe,scrollPrev:L,scrollProgress:fe,scrollSnapList:ue,scrollTo:ge,selectedScrollSnap:ie,slideNodes:de,slidesInView:P,slidesNotInView:V};return X(n,t),setTimeout(()=>u.emit("init"),0),se}en.globalOptions=void 0;function po(e={},n=[]){const t=S.useRef(e),o=S.useRef(n),[r,s]=S.useState(),[i,l]=S.useState(),u=S.useCallback(()=>{r&&r.reInit(t.current,o.current)},[r]);return S.useEffect(()=>{uo(t.current,e)||(t.current=e,u())},[e,u]),S.useEffect(()=>{Dd(o.current,n)||(o.current=n,u())},[n,u]),S.useEffect(()=>{if(Td()&&i){en.globalOptions=po.globalOptions;const d=en(i,t.current,o.current);return s(d),()=>d.destroy()}else s(void 0)},[i,s]),[l,r]}po.globalOptions=void 0;const sa=v.createContext(null);function ln(){const e=v.useContext(sa);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const aa=v.forwardRef(({orientation:e="horizontal",opts:n,setApi:t,plugins:o,className:r,children:s,...i},l)=>{const[u,d]=po({...n,axis:e==="horizontal"?"x":"y"},o),[f,c]=v.useState(!1),[g,m]=v.useState(!1),p=v.useCallback(y=>{y&&(c(y.canScrollPrev()),m(y.canScrollNext()))},[]),x=v.useCallback(()=>{d==null||d.scrollPrev()},[d]),w=v.useCallback(()=>{d==null||d.scrollNext()},[d]),h=v.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),x()):y.key==="ArrowRight"&&(y.preventDefault(),w())},[x,w]);return v.useEffect(()=>{!d||!t||t(d)},[d,t]),v.useEffect(()=>{if(d)return p(d),d.on("reInit",p),d.on("select",p),()=>{d==null||d.off("select",p)}},[d,p]),a.jsx(sa.Provider,{value:{carouselRef:u,api:d,opts:n,orientation:e,scrollPrev:x,scrollNext:w,canScrollPrev:f,canScrollNext:g},children:a.jsx("div",{ref:l,onKeyDownCapture:h,className:b("relative",r),role:"region","aria-roledescription":"carousel",...i,children:s})})});aa.displayName="Carousel";const ia=v.forwardRef(({className:e,...n},t)=>{const{carouselRef:o,orientation:r}=ln();return a.jsx("div",{ref:o,className:"overflow-hidden",children:a.jsx("div",{ref:t,className:b("flex",r==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...n})})});ia.displayName="CarouselContent";const la=v.forwardRef(({className:e,...n},t)=>{const{orientation:o}=ln();return a.jsx("div",{ref:t,role:"group","aria-roledescription":"slide",className:b("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...n})});la.displayName="CarouselItem";const da=v.forwardRef(({className:e,variant:n="outline",size:t="icon",...o},r)=>{const{orientation:s,scrollPrev:i,canScrollPrev:l}=ln();return a.jsxs(me,{ref:r,variant:n,size:t,className:b("absolute h-8 w-8 rounded-full",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...o,children:[a.jsx(I.ChevronLeft,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Previous slide"})]})});da.displayName="CarouselPrevious";const ca=v.forwardRef(({className:e,variant:n="outline",size:t="icon",...o},r)=>{const{orientation:s,scrollNext:i,canScrollNext:l}=ln();return a.jsxs(me,{ref:r,variant:n,size:t,className:b("absolute h-8 w-8 rounded-full",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...o,children:[a.jsx(I.ChevronRight,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Next slide"})]})});ca.displayName="CarouselNext";/**
|
|
12
|
+
)`}})]}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsx("div",{className:"h-9 w-9 rounded-md border flex-shrink-0 shadow-inner",style:{backgroundColor:e}}),o.jsx(Ke,{value:c,onChange:g=>m(g.target.value),placeholder:"#000000",className:"font-mono text-sm"})]}),o.jsx("div",{className:"grid grid-cols-5 gap-1.5",children:Fl.map(g=>o.jsx("button",{onClick:()=>{t==null||t(g),l(Wt(g)),d(g)},className:x("h-7 w-7 rounded-md border-2 transition-transform hover:scale-110",e===g?"border-primary ring-2 ring-ring":"border-transparent"),style:{backgroundColor:g}},g))})]})})]})}const Mo=w.forwardRef(({className:e,as:t="div",...n},r)=>o.jsx(t,{ref:r,className:x(e),...n}));Mo.displayName="Box";const _o=w.forwardRef(({className:e,direction:t,wrap:n,justify:r,align:s,gap:a,style:i,...l},c)=>o.jsx("div",{ref:c,className:x("flex",t&&`flex-${t}`,n&&`flex-${n}`,r&&`justify-${r}`,s&&`items-${s}`,typeof a=="number"&&`gap-${a}`,e),style:{...typeof a=="string"?{gap:a}:{},...i},...l}));_o.displayName="Flex";const Io=w.forwardRef(({className:e,spacing:t=4,align:n,style:r,...s},a)=>o.jsx("div",{ref:a,className:x("flex flex-col",typeof t=="number"&&`gap-${t}`,n&&`items-${n}`,e),style:{...typeof t=="string"?{gap:t}:{},...r},...s}));Io.displayName="VStack";const Po=w.forwardRef(({className:e,spacing:t=4,align:n="center",style:r,...s},a)=>o.jsx("div",{ref:a,className:x("flex flex-row",typeof t=="number"&&`gap-${t}`,n&&`items-${n}`,e),style:{...typeof t=="string"?{gap:t}:{},...r},...s}));Po.displayName="HStack";const Do=w.forwardRef(({className:e,cols:t=1,gap:n=4,style:r,...s},a)=>{const i=typeof t=="number"?`grid-cols-${t}`:[t.sm&&`sm:grid-cols-${t.sm}`,t.md&&`md:grid-cols-${t.md}`,t.lg&&`lg:grid-cols-${t.lg}`,t.xl&&`xl:grid-cols-${t.xl}`].filter(Boolean).join(" ");return o.jsx("div",{ref:a,className:x("grid",i,typeof n=="number"&&`gap-${n}`,e),style:{...typeof n=="string"?{gap:n}:{},...r},...s})});Do.displayName="Grid";const Al={sm:"max-w-screen-sm",md:"max-w-screen-md",lg:"max-w-screen-lg",xl:"max-w-screen-xl","2xl":"max-w-screen-2xl",full:"max-w-full"},To=w.forwardRef(({className:e,maxWidth:t="lg",centered:n=!0,...r},s)=>o.jsx("div",{ref:s,className:x("w-full px-4",Al[t],n&&"mx-auto",e),...r}));To.displayName="Container";const Vl=Ti.Root,$l=En.Root,zl=En.CollapsibleTrigger,Fo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx(En.CollapsibleContent,{ref:r,className:x("overflow-hidden transition-all duration-300 ease-in-out","data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",e),...n,children:o.jsx("div",{className:"pb-2",children:t})}));Fo.displayName="CollapsibleContent";const Lo=Fe("rounded-xl text-card-foreground transition-all duration-300",{variants:{variant:{default:"border bg-card shadow-sm",elevated:"border border-white/10 bg-gradient-to-br from-card/80 to-card/40 backdrop-blur-xl shadow-2xl shadow-black/20",glass:"border border-white/10 bg-white/5 backdrop-blur-xl shadow-xl",ghost:"bg-transparent"}},defaultVariants:{variant:"default"}}),Hn=w.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,className:x(Lo({variant:t}),e),...n}));Hn.displayName="Card";const Gn=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-1.5 p-6",e),...t}));Gn.displayName="CardHeader";const qn=w.forwardRef(({className:e,...t},n)=>o.jsx("h3",{ref:n,className:x("text-2xl font-semibold leading-none tracking-tight",e),...t}));qn.displayName="CardTitle";const Eo=w.forwardRef(({className:e,...t},n)=>o.jsx("p",{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Eo.displayName="CardDescription";const Wn=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("p-6 pt-0",e),...t}));Wn.displayName="CardContent";const Ao=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex items-center p-6 pt-0",e),...t}));Ao.displayName="CardFooter";const Un=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:"relative w-full overflow-auto",children:o.jsx("table",{ref:n,className:x("w-full caption-bottom text-sm",e),...t})}));Un.displayName="Table";const Yn=w.forwardRef(({className:e,...t},n)=>o.jsx("thead",{ref:n,className:x("[&_tr]:border-b",e),...t}));Yn.displayName="TableHeader";const Xn=w.forwardRef(({className:e,...t},n)=>o.jsx("tbody",{ref:n,className:x("[&_tr:last-child]:border-0",e),...t}));Xn.displayName="TableBody";const Vo=w.forwardRef(({className:e,...t},n)=>o.jsx("tfoot",{ref:n,className:x("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Vo.displayName="TableFooter";const Ct=w.forwardRef(({className:e,...t},n)=>o.jsx("tr",{ref:n,className:x("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ct.displayName="TableRow";const Kn=w.forwardRef(({className:e,...t},n)=>o.jsx("th",{ref:n,className:x("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Kn.displayName="TableHead";const Jt=w.forwardRef(({className:e,...t},n)=>o.jsx("td",{ref:n,className:x("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));Jt.displayName="TableCell";const $o=w.forwardRef(({className:e,...t},n)=>o.jsx("caption",{ref:n,className:x("mt-4 text-sm text-muted-foreground",e),...t}));$o.displayName="TableCaption";const Zn=w.forwardRef(({className:e,children:t,orientation:n="vertical",...r},s)=>o.jsxs(nt.Root,{ref:s,className:x("relative overflow-hidden",e),...r,children:[o.jsx(nt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(n==="vertical"||n==="both")&&o.jsx(Qt,{orientation:"vertical"}),(n==="horizontal"||n==="both")&&o.jsx(Qt,{orientation:"horizontal"}),o.jsx(nt.Corner,{})]}));Zn.displayName=nt.Root.displayName;const Qt=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>o.jsx(nt.ScrollAreaScrollbar,{ref:r,orientation:t,className:x("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:o.jsx(nt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Qt.displayName=nt.ScrollAreaScrollbar.displayName;const Bl=st.Root,zo=w.forwardRef(({className:e,...t},n)=>o.jsx(st.List,{ref:n,className:x("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));zo.displayName=st.List.displayName;const Bo=w.forwardRef(({className:e,...t},n)=>o.jsx(st.Trigger,{ref:n,className:x("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Bo.displayName=st.Trigger.displayName;const Oo=w.forwardRef(({className:e,...t},n)=>o.jsx(st.Content,{ref:n,className:x("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Oo.displayName=st.Content.displayName;const Ol=rt.Root,Ho=w.forwardRef(({className:e,...t},n)=>o.jsx(rt.Item,{ref:n,className:x("border-b",e),...t}));Ho.displayName="AccordionItem";const Go=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx(rt.Header,{className:"flex",children:o.jsxs(rt.Trigger,{ref:r,className:x("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,o.jsx(E.ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Go.displayName=rt.Trigger.displayName;const qo=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx(rt.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:o.jsx("div",{className:x("pb-4 pt-0",e),children:t})}));qo.displayName=rt.Content.displayName;const Wo=ee.Root,Hl=ee.Trigger,Uo=ee.Portal,Gl=ee.Close,Jn=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Overlay,{ref:n,className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Jn.displayName=ee.Overlay.displayName;const Qn=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(Uo,{children:[o.jsx(Jn,{}),o.jsxs(ee.Content,{ref:r,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,o.jsxs(ee.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[o.jsx(E.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Qn.displayName=ee.Content.displayName;const Yo=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Yo.displayName="DialogHeader";const Xo=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Xo.displayName="DialogFooter";const Ko=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Title,{ref:n,className:x("text-lg font-semibold leading-none tracking-tight",e),...t}));Ko.displayName=ee.Title.displayName;const Zo=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Zo.displayName=ee.Description.displayName;const Jo=ee.Root,Qo=ee.Trigger,es=ee.Close,ts=ee.Portal,er=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));er.displayName=ee.Overlay.displayName;const ql=Fe("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),tr=w.forwardRef(({side:e="right",className:t,children:n,...r},s)=>o.jsxs(ts,{children:[o.jsx(er,{}),o.jsxs(ee.Content,{ref:s,className:x(ql({side:e}),t),...r,children:[n,o.jsxs(ee.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[o.jsx(E.X,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));tr.displayName=ee.Content.displayName;const nr=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});nr.displayName="SheetHeader";const rr=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});rr.displayName="SheetFooter";const or=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Title,{ref:n,className:x("text-lg font-semibold text-foreground",e),...t}));or.displayName=ee.Title.displayName;const sr=w.forwardRef(({className:e,...t},n)=>o.jsx(ee.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));sr.displayName=ee.Description.displayName;const ns=te.Root,rs=te.Trigger,Wl=te.Group,Ul=te.Portal,Yl=te.Sub,Xl=te.RadioGroup,os=w.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(te.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,o.jsx(E.ChevronRight,{className:"ml-auto h-4 w-4"})]}));os.displayName=te.SubTrigger.displayName;const ss=w.forwardRef(({className:e,...t},n)=>o.jsx(te.SubContent,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));ss.displayName=te.SubContent.displayName;const ar=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(te.Portal,{children:o.jsx(te.Content,{ref:r,sideOffset:t,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));ar.displayName=te.Content.displayName;const jt=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(te.Item,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));jt.displayName=te.Item.displayName;const as=w.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(te.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(te.ItemIndicator,{children:o.jsx(E.Check,{className:"h-4 w-4"})})}),t]}));as.displayName=te.CheckboxItem.displayName;const is=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(te.RadioItem,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(te.ItemIndicator,{children:o.jsx(E.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));is.displayName=te.RadioItem.displayName;const ls=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(te.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));ls.displayName=te.Label.displayName;const ds=w.forwardRef(({className:e,...t},n)=>o.jsx(te.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-muted",e),...t}));ds.displayName=te.Separator.displayName;const cs=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest opacity-60",e),...t});cs.displayName="DropdownMenuShortcut";const Kl=Dt.Provider,Zl=Dt.Root,Jl=Dt.Trigger,us=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>o.jsx(Dt.Content,{ref:r,sideOffset:t,className:x("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));us.displayName=Dt.Content.displayName;const ir=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command,{ref:n,className:x("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ir.displayName=Me.Command.displayName;const Ql=({children:e,...t})=>o.jsx(Wo,{...t,children:o.jsx(Qn,{className:"overflow-hidden p-0 shadow-lg",children:o.jsx(ir,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),fs=w.forwardRef(({className:e,...t},n)=>o.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[o.jsx(E.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o.jsx(Me.Command.Input,{ref:n,className:x("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));fs.displayName=Me.Command.Input.displayName;const ms=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.List,{ref:n,className:x("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));ms.displayName=Me.Command.List.displayName;const gs=w.forwardRef((e,t)=>o.jsx(Me.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));gs.displayName=Me.Command.Empty.displayName;const ps=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Group,{ref:n,className:x("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ps.displayName=Me.Command.Group.displayName;const hs=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Separator,{ref:n,className:x("-mx-1 h-px bg-border",e),...t}));hs.displayName=Me.Command.Separator.displayName;const xs=w.forwardRef(({className:e,...t},n)=>o.jsx(Me.Command.Item,{ref:n,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected='true']:text-accent-foreground data-[disabled=true]:opacity-50",e),...t}));xs.displayName=Me.Command.Item.displayName;const vs=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});vs.displayName="CommandShortcut";const ed=Fe("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ws=w.forwardRef(({className:e,variant:t,...n},r)=>o.jsx("div",{ref:r,role:"alert",className:x(ed({variant:t}),e),...n}));ws.displayName="Alert";const bs=w.forwardRef(({className:e,...t},n)=>o.jsx("h5",{ref:n,className:x("mb-1 font-medium leading-none tracking-tight",e),...t}));bs.displayName="AlertTitle";const ys=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("text-sm [&_p]:leading-relaxed",e),...t}));ys.displayName="AlertDescription";const td=ke.Root,nd=ke.Trigger,Ns=ke.Portal,lr=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Overlay,{className:x("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));lr.displayName=ke.Overlay.displayName;const Cs=w.forwardRef(({className:e,...t},n)=>o.jsxs(Ns,{children:[o.jsx(lr,{}),o.jsx(ke.Content,{ref:n,className:x("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Cs.displayName=ke.Content.displayName;const js=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col space-y-2 text-center sm:text-left",e),...t});js.displayName="AlertDialogHeader";const Ss=({className:e,...t})=>o.jsx("div",{className:x("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ss.displayName="AlertDialogFooter";const ks=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Title,{ref:n,className:x("text-lg font-semibold",e),...t}));ks.displayName=ke.Title.displayName;const Rs=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Description,{ref:n,className:x("text-sm text-muted-foreground",e),...t}));Rs.displayName=ke.Description.displayName;const Ms=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Action,{ref:n,className:x(Tt(),e),...t}));Ms.displayName=ke.Action.displayName;const _s=w.forwardRef(({className:e,...t},n)=>o.jsx(ke.Cancel,{ref:n,className:x(Tt({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));_s.displayName=ke.Cancel.displayName;const Is=w.forwardRef(({className:e,value:t,...n},r)=>o.jsx(Sn.Root,{ref:r,className:x("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:o.jsx(Sn.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Is.displayName=Sn.Root.displayName;function rd({className:e,...t}){return o.jsx("div",{className:x("animate-pulse rounded-md bg-muted",e),...t})}function od(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const sd=e=>{switch(e){case"success":return ld;case"info":return cd;case"warning":return dd;case"error":return ud;default:return null}},ad=Array(12).fill(0),id=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},ad.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ld=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),dd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ud=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fd=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),md=()=>{const[e,t]=C.useState(document.hidden);return C.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Rn=1;class gd{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Rn++,i=this.toasts.find(c=>c.id===a),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:l,title:r}):c):this.addToast({title:r,...s,dismissible:l,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,i;const l=s.then(async d=>{if(i=["resolve",d],C.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(hd(d)&&!d.ok){a=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,g=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...g})}else if(d instanceof Error){a=!1;const u=typeof n.error=="function"?await n.error(d):n.error,f=typeof n.description=="function"?await n.description(d):n.description,g=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...g})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?await n.success(d):n.success,f=typeof n.description=="function"?await n.description(d):n.description,g=typeof u=="object"&&!C.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:f,...g})}}).catch(async d=>{if(i=["reject",d],n.error!==void 0){a=!1;const h=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,m=typeof h=="object"&&!C.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:u,...m})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((d,h)=>l.then(()=>i[0]==="reject"?h(i[1]):d(i[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Rn++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Re=new gd,pd=(e,t)=>{const n=(t==null?void 0:t.id)||Rn++;return Re.addToast({title:e,...t,id:n}),n},hd=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xd=pd,vd=()=>Re.toasts,wd=()=>Re.getActiveToasts(),bd=Object.assign(xd,{success:Re.success,info:Re.info,warning:Re.warning,error:Re.error,custom:Re.custom,message:Re.message,promise:Re.promise,dismiss:Re.dismiss,loading:Re.loading},{getHistory:vd,getToasts:wd});od("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ut(e){return e.label!==void 0}const yd=3,Nd="24px",Cd="16px",Mr=4e3,jd=356,Sd=14,kd=45,Rd=200;function He(...e){return e.filter(Boolean).join(" ")}function Md(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const _d=e=>{var t,n,r,s,a,i,l,c,d;const{invert:h,toast:u,unstyled:f,interacting:m,setHeights:g,visibleToasts:v,heights:b,index:p,toasts:y,expanded:N,removeToast:S,defaultRichColors:M,closeButton:R,style:T,cancelButtonStyle:j,actionButtonStyle:F,className:W="",descriptionClassName:H="",duration:K,position:k,gap:J,expandByDefault:Z,classNames:$,icons:U,closeButtonAriaLabel:I="Close toast"}=e,[fe,me]=C.useState(null),[le,Ce]=C.useState(null),[L,z]=C.useState(!1),[Y,de]=C.useState(!1),[G,B]=C.useState(!1),[ce,ae]=C.useState(!1),[X,_]=C.useState(!1),[Q,oe]=C.useState(0),[we,Ie]=C.useState(0),je=C.useRef(u.duration||K||Mr),ze=C.useRef(null),xe=C.useRef(null),Ge=p===0,Ze=p+1<=v,be=u.type,Be=u.dismissible!==!1,Lt=u.className||"",Et=u.descriptionClassName||"",it=C.useMemo(()=>b.findIndex(O=>O.toastId===u.id)||0,[b,u.id]),At=C.useMemo(()=>{var O;return(O=u.closeButton)!=null?O:R},[u.closeButton,R]),Vt=C.useMemo(()=>u.duration||K||Mr,[u.duration,K]),Je=C.useRef(0),Pe=C.useRef(0),lt=C.useRef(0),Oe=C.useRef(null),[dt,cn]=k.split("-"),$t=C.useMemo(()=>b.reduce((O,ue,pe)=>pe>=it?O:O+ue.height,0),[b,it]),zt=md(),un=u.invert||h,ht=be==="loading";Pe.current=C.useMemo(()=>it*J+$t,[it,$t]),C.useEffect(()=>{je.current=Vt},[Vt]),C.useEffect(()=>{z(!0)},[]),C.useEffect(()=>{const O=xe.current;if(O){const ue=O.getBoundingClientRect().height;return Ie(ue),g(pe=>[{toastId:u.id,height:ue,position:u.position},...pe]),()=>g(pe=>pe.filter(Se=>Se.toastId!==u.id))}},[g,u.id]),C.useLayoutEffect(()=>{if(!L)return;const O=xe.current,ue=O.style.height;O.style.height="auto";const pe=O.getBoundingClientRect().height;O.style.height=ue,Ie(pe),g(Se=>Se.find(ye=>ye.toastId===u.id)?Se.map(ye=>ye.toastId===u.id?{...ye,height:pe}:ye):[{toastId:u.id,height:pe,position:u.position},...Se])},[L,u.title,u.description,g,u.id,u.jsx,u.action,u.cancel]);const Le=C.useCallback(()=>{de(!0),oe(Pe.current),g(O=>O.filter(ue=>ue.toastId!==u.id)),setTimeout(()=>{S(u)},Rd)},[u,S,g,Pe]);C.useEffect(()=>{if(u.promise&&be==="loading"||u.duration===1/0||u.type==="loading")return;let O;return N||m||zt?(()=>{if(lt.current<Je.current){const Se=new Date().getTime()-Je.current;je.current=je.current-Se}lt.current=new Date().getTime()})():(()=>{je.current!==1/0&&(Je.current=new Date().getTime(),O=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Le()},je.current))})(),()=>clearTimeout(O)},[N,m,u,be,zt,Le]),C.useEffect(()=>{u.delete&&(Le(),u.onDismiss==null||u.onDismiss.call(u,u))},[Le,u.delete]);function fn(){var O;if(U!=null&&U.loading){var ue;return C.createElement("div",{className:He($==null?void 0:$.loader,u==null||(ue=u.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":be==="loading"},U.loading)}return C.createElement(id,{className:He($==null?void 0:$.loader,u==null||(O=u.classNames)==null?void 0:O.loader),visible:be==="loading"})}const Bt=u.icon||(U==null?void 0:U[be])||sd(be);var xt,vt;return C.createElement("li",{tabIndex:0,ref:xe,className:He(W,Lt,$==null?void 0:$.toast,u==null||(t=u.classNames)==null?void 0:t.toast,$==null?void 0:$.default,$==null?void 0:$[be],u==null||(n=u.classNames)==null?void 0:n[be]),"data-sonner-toast":"","data-rich-colors":(xt=u.richColors)!=null?xt:M,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":L,"data-promise":!!u.promise,"data-swiped":X,"data-removed":Y,"data-visible":Ze,"data-y-position":dt,"data-x-position":cn,"data-index":p,"data-front":Ge,"data-swiping":G,"data-dismissible":Be,"data-type":be,"data-invert":un,"data-swipe-out":ce,"data-swipe-direction":le,"data-expanded":!!(N||Z&&L),"data-testid":u.testId,style:{"--index":p,"--toasts-before":p,"--z-index":y.length-p,"--offset":`${Y?Q:Pe.current}px`,"--initial-height":Z?"auto":`${we}px`,...T,...u.style},onDragEnd:()=>{B(!1),me(null),Oe.current=null},onPointerDown:O=>{O.button!==2&&(ht||!Be||(ze.current=new Date,oe(Pe.current),O.target.setPointerCapture(O.pointerId),O.target.tagName!=="BUTTON"&&(B(!0),Oe.current={x:O.clientX,y:O.clientY})))},onPointerUp:()=>{var O,ue,pe;if(ce||!Be)return;Oe.current=null;const Se=Number(((O=xe.current)==null?void 0:O.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ot=Number(((ue=xe.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((pe=ze.current)==null?void 0:pe.getTime()),Te=fe==="x"?Se:Ot,Ht=Math.abs(Te)/ye;if(Math.abs(Te)>=kd||Ht>.11){oe(Pe.current),u.onDismiss==null||u.onDismiss.call(u,u),Ce(fe==="x"?Se>0?"right":"left":Ot>0?"down":"up"),Le(),ae(!0);return}else{var Ee,Ae;(Ee=xe.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Ae=xe.current)==null||Ae.style.setProperty("--swipe-amount-y","0px")}_(!1),B(!1),me(null)},onPointerMove:O=>{var ue,pe,Se;if(!Oe.current||!Be||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const ye=O.clientY-Oe.current.y,Te=O.clientX-Oe.current.x;var Ht;const Ee=(Ht=e.swipeDirections)!=null?Ht:Md(k);!fe&&(Math.abs(Te)>1||Math.abs(ye)>1)&&me(Math.abs(Te)>Math.abs(ye)?"x":"y");let Ae={x:0,y:0};const br=Qe=>1/(1.5+Math.abs(Qe)/20);if(fe==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&ye<0||Ee.includes("bottom")&&ye>0)Ae.y=ye;else{const Qe=ye*br(ye);Ae.y=Math.abs(Qe)<Math.abs(ye)?Qe:ye}}else if(fe==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&Te<0||Ee.includes("right")&&Te>0)Ae.x=Te;else{const Qe=Te*br(Te);Ae.x=Math.abs(Qe)<Math.abs(Te)?Qe:Te}(Math.abs(Ae.x)>0||Math.abs(Ae.y)>0)&&_(!0),(pe=xe.current)==null||pe.style.setProperty("--swipe-amount-x",`${Ae.x}px`),(Se=xe.current)==null||Se.style.setProperty("--swipe-amount-y",`${Ae.y}px`)}},At&&!u.jsx&&be!=="loading"?C.createElement("button",{"aria-label":I,"data-disabled":ht,"data-close-button":!0,onClick:ht||!Be?()=>{}:()=>{Le(),u.onDismiss==null||u.onDismiss.call(u,u)},className:He($==null?void 0:$.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(vt=U==null?void 0:U.close)!=null?vt:fd):null,(be||u.icon||u.promise)&&u.icon!==null&&((U==null?void 0:U[be])!==null||u.icon)?C.createElement("div",{"data-icon":"",className:He($==null?void 0:$.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||fn():null,u.type!=="loading"?Bt:null):null,C.createElement("div",{"data-content":"",className:He($==null?void 0:$.content,u==null||(a=u.classNames)==null?void 0:a.content)},C.createElement("div",{"data-title":"",className:He($==null?void 0:$.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?C.createElement("div",{"data-description":"",className:He(H,Et,$==null?void 0:$.description,u==null||(l=u.classNames)==null?void 0:l.description)},typeof u.description=="function"?u.description():u.description):null),C.isValidElement(u.cancel)?u.cancel:u.cancel&&Ut(u.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||j,onClick:O=>{Ut(u.cancel)&&Be&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,O),Le())},className:He($==null?void 0:$.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,C.isValidElement(u.action)?u.action:u.action&&Ut(u.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||F,onClick:O=>{Ut(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,O),!O.defaultPrevented&&Le())},className:He($==null?void 0:$.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function _r(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Id(e,t){const n={};return[e,t].forEach((r,s)=>{const a=s===1,i=a?"--mobile-offset":"--offset",l=a?Cd:Nd;function c(d){["top","right","bottom","left"].forEach(h=>{n[`${i}-${h}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?n[`${i}-${d}`]=l:n[`${i}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),n}const Pd=C.forwardRef(function(t,n){const{id:r,invert:s,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:h,mobileOffset:u,theme:f="light",richColors:m,duration:g,style:v,visibleToasts:b=yd,toastOptions:p,dir:y=_r(),gap:N=Sd,icons:S,containerAriaLabel:M="Notifications"}=t,[R,T]=C.useState([]),j=C.useMemo(()=>r?R.filter(L=>L.toasterId===r):R.filter(L=>!L.toasterId),[R,r]),F=C.useMemo(()=>Array.from(new Set([a].concat(j.filter(L=>L.position).map(L=>L.position)))),[j,a]),[W,H]=C.useState([]),[K,k]=C.useState(!1),[J,Z]=C.useState(!1),[$,U]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),I=C.useRef(null),fe=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),me=C.useRef(null),le=C.useRef(!1),Ce=C.useCallback(L=>{T(z=>{var Y;return(Y=z.find(de=>de.id===L.id))!=null&&Y.delete||Re.dismiss(L.id),z.filter(({id:de})=>de!==L.id)})},[]);return C.useEffect(()=>Re.subscribe(L=>{if(L.dismiss){requestAnimationFrame(()=>{T(z=>z.map(Y=>Y.id===L.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{_i.flushSync(()=>{T(z=>{const Y=z.findIndex(de=>de.id===L.id);return Y!==-1?[...z.slice(0,Y),{...z[Y],...L},...z.slice(Y+1)]:[L,...z]})})})}),[R]),C.useEffect(()=>{if(f!=="system"){U(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;const L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:z})=>{U(z?"dark":"light")})}catch{L.addListener(({matches:Y})=>{try{U(Y?"dark":"light")}catch(de){console.error(de)}})}},[f]),C.useEffect(()=>{R.length<=1&&k(!1)},[R]),C.useEffect(()=>{const L=z=>{var Y;if(i.every(B=>z[B]||z.code===B)){var G;k(!0),(G=I.current)==null||G.focus()}z.code==="Escape"&&(document.activeElement===I.current||(Y=I.current)!=null&&Y.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[i]),C.useEffect(()=>{if(I.current)return()=>{me.current&&(me.current.focus({preventScroll:!0}),me.current=null,le.current=!1)}},[I.current]),C.createElement("section",{ref:n,"aria-label":`${M} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((L,z)=>{var Y;const[de,G]=L.split("-");return j.length?C.createElement("ol",{key:L,dir:y==="auto"?_r():y,tabIndex:-1,ref:I,className:d,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":de,"data-x-position":G,style:{"--front-toast-height":`${((Y=W[0])==null?void 0:Y.height)||0}px`,"--width":`${jd}px`,"--gap":`${N}px`,...v,...Id(h,u)},onBlur:B=>{le.current&&!B.currentTarget.contains(B.relatedTarget)&&(le.current=!1,me.current&&(me.current.focus({preventScroll:!0}),me.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||le.current||(le.current=!0,me.current=B.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{J||k(!1)},onDragEnd:()=>k(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},j.filter(B=>!B.position&&z===0||B.position===L).map((B,ce)=>{var ae,X;return C.createElement(_d,{key:B.id,icons:S,index:ce,toast:B,defaultRichColors:m,duration:(ae=p==null?void 0:p.duration)!=null?ae:g,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:s,visibleToasts:b,closeButton:(X=p==null?void 0:p.closeButton)!=null?X:c,interacting:J,position:L,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,closeButtonAriaLabel:p==null?void 0:p.closeButtonAriaLabel,removeToast:Ce,toasts:j.filter(_=>_.position==B.position),heights:W.filter(_=>_.position==B.position),setHeights:H,expandByDefault:l,gap:N,expanded:K,swipeDirections:t.swipeDirections})})):null}))}),pn=["light","dark","system"];function Dd(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ir(e){return e==="system"?Dd():e}function Td(e){if(typeof document>"u")return()=>{};const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*, *::before, *::after { transition: none !important; animation: none !important; }")),document.head.appendChild(t),window.getComputedStyle(document.body),()=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{document.head.removeChild(t)})})}}function Fd(e,t){const n=document.documentElement;t==="class"?(n.classList.remove("light","dark"),n.classList.add(e)):n.setAttribute("data-theme",e)}const Ps=C.createContext(void 0);function Ld({children:e,defaultTheme:t="system",storageKey:n="nui-theme",attribute:r="class",enableSystem:s=!0,disableTransitionOnChange:a=!1,forcedTheme:i,nonce:l}){const[c,d]=C.useState(()=>{if(typeof window>"u")return t;const p=localStorage.getItem(n);return p&&pn.includes(p)?p:t}),[h,u]=C.useState(()=>Ir(i??c)),f=C.useRef(c);f.current=c;const m=C.useCallback(()=>{const p=i??f.current,y=Ir(p);u(y);let N;a&&(N=Td(l)),Fd(y,r),N==null||N()},[i,r,a,l]);C.useEffect(()=>{m()},[c,i,m]),C.useEffect(()=>{if(!s)return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{(i??f.current)==="system"&&m()};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[s,i,m]),C.useEffect(()=>{const p=y=>{if(y.key===n&&y.newValue){const N=y.newValue;pn.includes(N)&&d(N)}};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[n]);const g=C.useCallback(p=>{!s&&p==="system"||(localStorage.setItem(n,p),d(p))},[n,s]),v=C.useMemo(()=>s?pn:["light","dark"],[s]),b=C.useMemo(()=>({theme:i??c,resolvedTheme:h,setTheme:g,themes:v}),[i,c,h,g,v]);return o.jsx(Ps.Provider,{value:b,children:e})}function on(){const e=C.useContext(Ps);if(e===void 0)throw new Error("useTheme must be used within a <ThemeProvider>");return e}const Ed=({theme:e,...t})=>{let n=e;try{const{resolvedTheme:r}=on();e||(n=r)}catch{n||(n="system")}return o.jsx(Pd,{theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function Ad({icon:e,title:t,description:n,action:r,className:s}){return o.jsxs("div",{className:x("flex flex-col items-center justify-center py-12 px-4 text-center",s),children:[e&&o.jsx("div",{className:"mb-4 text-muted-foreground",children:e}),o.jsx("h3",{className:"text-lg font-semibold",children:t}),n&&o.jsx("p",{className:"mt-1 text-sm text-muted-foreground max-w-sm",children:n}),r&&o.jsx("div",{className:"mt-4",children:r})]})}const Ds=w.forwardRef(({...e},t)=>o.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Ds.displayName="Breadcrumb";const Ts=w.forwardRef(({className:e,...t},n)=>o.jsx("ol",{ref:n,className:x("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Ts.displayName="BreadcrumbList";const Fs=w.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("inline-flex items-center gap-1.5",e),...t}));Fs.displayName="BreadcrumbItem";const Ls=w.forwardRef(({asChild:e,className:t,...n},r)=>{const s=e?Or.Slot:"a";return o.jsx(s,{ref:r,className:x("transition-colors hover:text-foreground",t),...n})});Ls.displayName="BreadcrumbLink";const Es=w.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:x("font-normal text-foreground",e),...t}));Es.displayName="BreadcrumbPage";const As=({children:e,className:t,...n})=>o.jsx("li",{role:"presentation","aria-hidden":"true",className:x("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...n,children:e??o.jsx(E.ChevronRight,{})});As.displayName="BreadcrumbSeparator";const Vs=({className:e,...t})=>o.jsxs("span",{role:"presentation","aria-hidden":"true",className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx("span",{className:"h-4 w-4",children:"..."}),o.jsx("span",{className:"sr-only",children:"More"})]});Vs.displayName="BreadcrumbEllipsis";const $s=({className:e,...t})=>o.jsx("nav",{role:"navigation","aria-label":"pagination",className:x("mx-auto flex w-full justify-center",e),...t});$s.displayName="Pagination";const zs=w.forwardRef(({className:e,...t},n)=>o.jsx("ul",{ref:n,className:x("flex flex-row items-center gap-1",e),...t}));zs.displayName="PaginationContent";const Bs=w.forwardRef(({className:e,...t},n)=>o.jsx("li",{ref:n,className:x("",e),...t}));Bs.displayName="PaginationItem";const sn=({className:e,isActive:t,size:n="icon",...r})=>o.jsx("a",{"aria-current":t?"page":void 0,className:x(Tt({variant:t?"outline":"ghost",size:n}),e),...r});sn.displayName="PaginationLink";const Os=({className:e,...t})=>o.jsxs(sn,{"aria-label":"Go to previous page",size:"default",className:x("gap-1 pl-2.5",e),...t,children:[o.jsx(E.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{children:"Previous"})]});Os.displayName="PaginationPrevious";const Hs=({className:e,...t})=>o.jsxs(sn,{"aria-label":"Go to next page",size:"default",className:x("gap-1 pr-2.5",e),...t,children:[o.jsx("span",{children:"Next"}),o.jsx(E.ChevronRight,{className:"h-4 w-4"})]});Hs.displayName="PaginationNext";const Gs=({className:e,...t})=>o.jsxs("span",{"aria-hidden":!0,className:x("flex h-9 w-9 items-center justify-center",e),...t,children:[o.jsx(E.MoreHorizontal,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"More pages"})]});Gs.displayName="PaginationEllipsis";function Vd({steps:e,activeStep:t,orientation:n="horizontal",className:r}){return o.jsx("div",{className:x("flex",n==="vertical"?"flex-col":"flex-row items-center",r),children:e.map((s,a)=>{const i=a<t,l=a===t,c=a===e.length-1;return o.jsxs(w.Fragment,{children:[o.jsxs("div",{className:x("flex items-center",n==="vertical"&&"flex-row"),children:[o.jsx("div",{className:x("flex h-10 w-10 items-center justify-center rounded-full border-2 font-semibold transition-colors",i&&"border-primary bg-primary text-primary-foreground",l&&"border-primary text-primary",!i&&!l&&"border-muted-foreground/30 text-muted-foreground"),children:i?o.jsx(E.Check,{className:"h-5 w-5"}):a+1}),o.jsxs("div",{className:x("ml-3",n==="horizontal"&&"hidden sm:block"),children:[o.jsx("p",{className:x("text-sm font-medium",l&&"text-foreground",!l&&"text-muted-foreground"),children:s.title}),s.description&&o.jsx("p",{className:"text-xs text-muted-foreground",children:s.description})]})]}),!c&&o.jsx("div",{className:x("flex-1",n==="horizontal"?"mx-4 h-0.5 min-w-[3rem]":"ml-5 my-2 w-0.5 min-h-[2rem]",i?"bg-primary":"bg-muted-foreground/30")})]},a)})})}const qs=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(_e.Root,{ref:r,className:x("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,o.jsx(dr,{})]}));qs.displayName=_e.Root.displayName;const Ws=w.forwardRef(({className:e,...t},n)=>o.jsx(_e.List,{ref:n,className:x("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ws.displayName=_e.List.displayName;const $d=_e.Item,Us=Fe("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),Ys=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(_e.Trigger,{ref:r,className:x(Us(),"group",e),...n,children:[t," ",o.jsx(E.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));Ys.displayName=_e.Trigger.displayName;const Xs=w.forwardRef(({className:e,...t},n)=>o.jsx(_e.Content,{ref:n,className:x("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto",e),...t}));Xs.displayName=_e.Content.displayName;const zd=_e.Link,dr=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{className:x("absolute left-0 top-full flex justify-center"),children:o.jsx(_e.Viewport,{className:x("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));dr.displayName=_e.Viewport.displayName;const Ks=w.forwardRef(({className:e,...t},n)=>o.jsx(_e.Indicator,{ref:n,className:x("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:o.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));Ks.displayName=_e.Indicator.displayName;const Bd=ne.Root,Od=ne.Trigger,Hd=ne.Group,Gd=ne.Portal,qd=ne.Sub,Wd=ne.RadioGroup,Zs=w.forwardRef(({className:e,inset:t,children:n,...r},s)=>o.jsxs(ne.SubTrigger,{ref:s,className:x("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t&&"pl-8",e),...r,children:[n,o.jsx(E.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Zs.displayName=ne.SubTrigger.displayName;const Js=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.SubContent,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Js.displayName=ne.SubContent.displayName;const Qs=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.Portal,{children:o.jsx(ne.Content,{ref:n,className:x("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));Qs.displayName=ne.Content.displayName;const ea=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Item,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));ea.displayName=ne.Item.displayName;const ta=w.forwardRef(({className:e,children:t,checked:n,...r},s)=>o.jsxs(ne.CheckboxItem,{ref:s,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ne.ItemIndicator,{children:o.jsx(E.Check,{className:"h-4 w-4"})})}),t]}));ta.displayName=ne.CheckboxItem.displayName;const na=w.forwardRef(({className:e,children:t,...n},r)=>o.jsxs(ne.RadioItem,{ref:r,className:x("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[o.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:o.jsx(ne.ItemIndicator,{children:o.jsx(E.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));na.displayName=ne.RadioItem.displayName;const ra=w.forwardRef(({className:e,inset:t,...n},r)=>o.jsx(ne.Label,{ref:r,className:x("px-2 py-1.5 text-sm font-semibold text-foreground",t&&"pl-8",e),...n}));ra.displayName=ne.Label.displayName;const oa=w.forwardRef(({className:e,...t},n)=>o.jsx(ne.Separator,{ref:n,className:x("-mx-1 my-1 h-px bg-border",e),...t}));oa.displayName=ne.Separator.displayName;const sa=({className:e,...t})=>o.jsx("span",{className:x("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});sa.displayName="ContextMenuShortcut";const Ud=nn.Root,Yd=nn.Trigger,aa=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>o.jsx(nn.Content,{ref:s,align:t,sideOffset:n,className:x("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));aa.displayName=nn.Content.displayName;function Xd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pr(e){return Xd(e)||Array.isArray(e)}function Kd(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function cr(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const s=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return s!==a?!1:n.every(i=>{const l=e[i],c=t[i];return typeof l=="function"?`${l}`==`${c}`:!Pr(l)||!Pr(c)?l===c:cr(l,c)})}function Dr(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function Zd(e,t){if(e.length!==t.length)return!1;const n=Dr(e),r=Dr(t);return n.every((s,a)=>{const i=r[a];return cr(s,i)})}function ur(e){return typeof e=="number"}function Mn(e){return typeof e=="string"}function an(e){return typeof e=="boolean"}function Tr(e){return Object.prototype.toString.call(e)==="[object Object]"}function se(e){return Math.abs(e)}function fr(e){return Math.sign(e)}function St(e,t){return se(e-t)}function Jd(e,t){if(e===0||t===0||se(e)<=se(t))return 0;const n=St(se(e),se(t));return se(n/e)}function Qd(e){return Math.round(e*100)/100}function _t(e){return It(e).map(Number)}function Ve(e){return e[Ft(e)]}function Ft(e){return Math.max(0,e.length-1)}function mr(e,t){return t===Ft(e)}function Fr(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function It(e){return Object.keys(e)}function ia(e,t){return[e,t].reduce((n,r)=>(It(r).forEach(s=>{const a=n[s],i=r[s],l=Tr(a)&&Tr(i);n[s]=l?ia(a,i):i}),n),{})}function _n(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function ec(e,t){const n={start:r,center:s,end:a};function r(){return 0}function s(c){return a(c)/2}function a(c){return t-c}function i(c,d){return Mn(e)?n[e](c):e(t,c,d)}return{measure:i}}function Pt(){let e=[];function t(s,a,i,l={passive:!0}){let c;if("addEventListener"in s)s.addEventListener(a,i,l),c=()=>s.removeEventListener(a,i,l);else{const d=s;d.addListener(i),c=()=>d.removeListener(i)}return e.push(c),r}function n(){e=e.filter(s=>s())}const r={add:t,clear:n};return r}function tc(e,t,n,r){const s=Pt(),a=1e3/60;let i=null,l=0,c=0;function d(){s.add(e,"visibilitychange",()=>{e.hidden&&g()})}function h(){m(),s.clear()}function u(b){if(!c)return;i||(i=b,n(),n());const p=b-i;for(i=b,l+=p;l>=a;)n(),l-=a;const y=l/a;r(y),c&&(c=t.requestAnimationFrame(u))}function f(){c||(c=t.requestAnimationFrame(u))}function m(){t.cancelAnimationFrame(c),i=null,l=0,c=0}function g(){i=null,l=0}return{init:d,destroy:h,start:f,stop:m,update:n,render:r}}function nc(e,t){const n=t==="rtl",r=e==="y",s=r?"y":"x",a=r?"x":"y",i=!r&&n?-1:1,l=h(),c=u();function d(g){const{height:v,width:b}=g;return r?v:b}function h(){return r?"top":n?"right":"left"}function u(){return r?"bottom":n?"left":"right"}function f(g){return g*i}return{scroll:s,cross:a,startEdge:l,endEdge:c,measureSize:d,direction:f}}function ot(e=0,t=0){const n=se(e-t);function r(d){return d<e}function s(d){return d>t}function a(d){return r(d)||s(d)}function i(d){return a(d)?r(d)?e:t:d}function l(d){return n?d-n*Math.ceil((d-t)/n):d}return{length:n,max:t,min:e,constrain:i,reachedAny:a,reachedMax:s,reachedMin:r,removeOffset:l}}function la(e,t,n){const{constrain:r}=ot(0,e),s=e+1;let a=i(t);function i(f){return n?se((s+f)%s):r(f)}function l(){return a}function c(f){return a=i(f),u}function d(f){return h().set(l()+f)}function h(){return la(e,l(),n)}const u={get:l,set:c,add:d,clone:h};return u}function rc(e,t,n,r,s,a,i,l,c,d,h,u,f,m,g,v,b,p,y){const{cross:N,direction:S}=e,M=["INPUT","SELECT","TEXTAREA"],R={passive:!1},T=Pt(),j=Pt(),F=ot(50,225).constrain(m.measure(20)),W={mouse:300,touch:400},H={mouse:500,touch:600},K=g?43:25;let k=!1,J=0,Z=0,$=!1,U=!1,I=!1,fe=!1;function me(_){if(!y)return;function Q(we){(an(y)||y(_,we))&&de(we)}const oe=t;T.add(oe,"dragstart",we=>we.preventDefault(),R).add(oe,"touchmove",()=>{},R).add(oe,"touchend",()=>{}).add(oe,"touchstart",Q).add(oe,"mousedown",Q).add(oe,"touchcancel",B).add(oe,"contextmenu",B).add(oe,"click",ce,!0)}function le(){T.clear(),j.clear()}function Ce(){const _=fe?n:t;j.add(_,"touchmove",G,R).add(_,"touchend",B).add(_,"mousemove",G,R).add(_,"mouseup",B)}function L(_){const Q=_.nodeName||"";return M.includes(Q)}function z(){return(g?H:W)[fe?"mouse":"touch"]}function Y(_,Q){const oe=u.add(fr(_)*-1),we=h.byDistance(_,!g).distance;return g||se(_)<F?we:b&&Q?we*.5:h.byIndex(oe.get(),0).distance}function de(_){const Q=_n(_,r);fe=Q,I=g&&Q&&!_.buttons&&k,k=St(s.get(),i.get())>=2,!(Q&&_.button!==0)&&(L(_.target)||($=!0,a.pointerDown(_),d.useFriction(0).useDuration(0),s.set(i),Ce(),J=a.readPoint(_),Z=a.readPoint(_,N),f.emit("pointerDown")))}function G(_){if(!_n(_,r)&&_.touches.length>=2)return B(_);const oe=a.readPoint(_),we=a.readPoint(_,N),Ie=St(oe,J),je=St(we,Z);if(!U&&!fe&&(!_.cancelable||(U=Ie>je,!U)))return B(_);const ze=a.pointerMove(_);Ie>v&&(I=!0),d.useFriction(.3).useDuration(.75),l.start(),s.add(S(ze)),_.preventDefault()}function B(_){const oe=h.byDistance(0,!1).index!==u.get(),we=a.pointerUp(_)*z(),Ie=Y(S(we),oe),je=Jd(we,Ie),ze=K-10*je,xe=p+je/50;U=!1,$=!1,j.clear(),d.useDuration(ze).useFriction(xe),c.distance(Ie,!g),fe=!1,f.emit("pointerUp")}function ce(_){I&&(_.stopPropagation(),_.preventDefault(),I=!1)}function ae(){return $}return{init:me,destroy:le,pointerDown:ae}}function oc(e,t){let r,s;function a(u){return u.timeStamp}function i(u,f){const g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(_n(u,t)?u:u.touches[0])[g]}function l(u){return r=u,s=u,i(u)}function c(u){const f=i(u)-i(s),m=a(u)-a(r)>170;return s=u,m&&(r=u),f}function d(u){if(!r||!s)return 0;const f=i(s)-i(r),m=a(u)-a(r),g=a(u)-a(s)>170,v=f/m;return m&&!g&&se(v)>.1?v:0}return{pointerDown:l,pointerMove:c,pointerUp:d,readPoint:i}}function sc(){function e(n){const{offsetTop:r,offsetLeft:s,offsetWidth:a,offsetHeight:i}=n;return{top:r,right:s+a,bottom:r+i,left:s,width:a,height:i}}return{measure:e}}function ac(e){function t(r){return e*(r/100)}return{measure:t}}function ic(e,t,n,r,s,a,i){const l=[e].concat(r);let c,d,h=[],u=!1;function f(b){return s.measureSize(i.measure(b))}function m(b){if(!a)return;d=f(e),h=r.map(f);function p(y){for(const N of y){if(u)return;const S=N.target===e,M=r.indexOf(N.target),R=S?d:h[M],T=f(S?e:r[M]);if(se(T-R)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(an(a)||a(b,y))&&p(y)}),n.requestAnimationFrame(()=>{l.forEach(y=>c.observe(y))})}function g(){u=!0,c&&c.disconnect()}return{init:m,destroy:g}}function lc(e,t,n,r,s,a){let i=0,l=0,c=s,d=a,h=e.get(),u=0;function f(){const R=r.get()-e.get(),T=!c;let j=0;return T?(i=0,n.set(r),e.set(r),j=R):(n.set(e),i+=R/c,i*=d,h+=i,e.add(i),j=h-u),l=fr(j),u=h,M}function m(){const R=r.get()-t.get();return se(R)<.001}function g(){return c}function v(){return l}function b(){return i}function p(){return N(s)}function y(){return S(a)}function N(R){return c=R,M}function S(R){return d=R,M}const M={direction:v,duration:g,velocity:b,seek:f,settled:m,useBaseFriction:y,useBaseDuration:p,useFriction:S,useDuration:N};return M}function dc(e,t,n,r,s){const a=s.measure(10),i=s.measure(50),l=ot(.1,.99);let c=!1;function d(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function h(m){if(!d())return;const g=e.reachedMin(t.get())?"min":"max",v=se(e[g]-t.get()),b=n.get()-t.get(),p=l.constrain(v/i);n.subtract(b*p),!m&&se(b)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(m){c=!m}return{shouldConstrain:d,constrain:h,toggleActive:u}}function cc(e,t,n,r,s){const a=ot(-t+e,0),i=u(),l=h(),c=f();function d(g,v){return St(g,v)<=1}function h(){const g=i[0],v=Ve(i),b=i.lastIndexOf(g),p=i.indexOf(v)+1;return ot(b,p)}function u(){return n.map((g,v)=>{const{min:b,max:p}=a,y=a.constrain(g),N=!v,S=mr(n,v);return N?p:S||d(b,y)?b:d(p,y)?p:y}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+s)return[a.max];if(r==="keepSnaps")return i;const{min:g,max:v}=l;return i.slice(g,v)}return{snapsContained:c,scrollContainLimit:l}}function uc(e,t,n){const r=t[0],s=n?r-e:Ve(t);return{limit:ot(s,r)}}function fc(e,t,n,r){const a=t.min+.1,i=t.max+.1,{reachedMin:l,reachedMax:c}=ot(a,i);function d(f){return f===1?c(n.get()):f===-1?l(n.get()):!1}function h(f){if(!d(f))return;const m=e*(f*-1);r.forEach(g=>g.add(m))}return{loop:h}}function mc(e){const{max:t,length:n}=e;function r(a){const i=a-t;return n?i/-n:0}return{get:r}}function gc(e,t,n,r,s){const{startEdge:a,endEdge:i}=e,{groupSlides:l}=s,c=u().map(t.measure),d=f(),h=m();function u(){return l(r).map(v=>Ve(v)[i]-v[0][a]).map(se)}function f(){return r.map(v=>n[a]-v[a]).map(v=>-se(v))}function m(){return l(d).map(v=>v[0]).map((v,b)=>v+c[b])}return{snaps:d,snapsAligned:h}}function pc(e,t,n,r,s,a){const{groupSlides:i}=s,{min:l,max:c}=r,d=h();function h(){const f=i(a),m=!e||t==="keepSnaps";return n.length===1?[a]:m?f:f.slice(l,c).map((g,v,b)=>{const p=!v,y=mr(b,v);if(p){const N=Ve(b[0])+1;return Fr(N)}if(y){const N=Ft(a)-Ve(b)[0]+1;return Fr(N,Ve(b)[0])}return g})}return{slideRegistry:d}}function hc(e,t,n,r,s){const{reachedAny:a,removeOffset:i,constrain:l}=r;function c(g){return g.concat().sort((v,b)=>se(v)-se(b))[0]}function d(g){const v=e?i(g):l(g),b=t.map((y,N)=>({diff:h(y-v,0),index:N})).sort((y,N)=>se(y.diff)-se(N.diff)),{index:p}=b[0];return{index:p,distance:v}}function h(g,v){const b=[g,g+n,g-n];if(!e)return g;if(!v)return c(b);const p=b.filter(y=>fr(y)===v);return p.length?c(p):Ve(b)-n}function u(g,v){const b=t[g]-s.get(),p=h(b,v);return{index:g,distance:p}}function f(g,v){const b=s.get()+g,{index:p,distance:y}=d(b),N=!e&&a(b);if(!v||N)return{index:p,distance:g};const S=t[p]-y,M=g+h(S,0);return{index:p,distance:M}}return{byDistance:f,byIndex:u,shortcut:h}}function xc(e,t,n,r,s,a,i){function l(u){const f=u.distance,m=u.index!==t.get();a.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),m&&(n.set(t.get()),t.set(u.index),i.emit("select"))}function c(u,f){const m=s.byDistance(u,f);l(m)}function d(u,f){const m=t.clone().set(u),g=s.byIndex(m.get(),f);l(g)}return{distance:c,index:d}}function vc(e,t,n,r,s,a,i,l){const c={passive:!0,capture:!0};let d=0;function h(m){if(!l)return;function g(v){if(new Date().getTime()-d>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const y=n.findIndex(N=>N.includes(v));ur(y)&&(s.useDuration(0),r.index(y,0),i.emit("slideFocus"))}a.add(document,"keydown",u,!1),t.forEach((v,b)=>{a.add(v,"focus",p=>{(an(l)||l(m,p))&&g(b)},c)})}function u(m){m.code==="Tab"&&(d=new Date().getTime())}return{init:h}}function Nt(e){let t=e;function n(){return t}function r(c){t=i(c)}function s(c){t+=i(c)}function a(c){t-=i(c)}function i(c){return ur(c)?c:c.get()}return{get:n,set:r,add:s,subtract:a}}function da(e,t){const n=e.scroll==="x"?i:l,r=t.style;let s=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function l(f){return`translate3d(0px,${f}px,0px)`}function c(f){if(a)return;const m=Qd(e.direction(f));m!==s&&(r.transform=n(m),s=m)}function d(f){a=!f}function h(){a||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:h,to:c,toggleActive:d}}function wc(e,t,n,r,s,a,i,l,c){const h=_t(s),u=_t(s).reverse(),f=p().concat(y());function m(T,j){return T.reduce((F,W)=>F-s[W],j)}function g(T,j){return T.reduce((F,W)=>m(F,j)>0?F.concat([W]):F,[])}function v(T){return a.map((j,F)=>({start:j-r[F]+.5+T,end:j+t-.5+T}))}function b(T,j,F){const W=v(j);return T.map(H=>{const K=F?0:-n,k=F?n:0,J=F?"end":"start",Z=W[H][J];return{index:H,loopPoint:Z,slideLocation:Nt(-1),translate:da(e,c[H]),target:()=>l.get()>Z?K:k}})}function p(){const T=i[0],j=g(u,T);return b(j,n,!1)}function y(){const T=t-i[0]-1,j=g(h,T);return b(j,-n,!0)}function N(){return f.every(({index:T})=>{const j=h.filter(F=>F!==T);return m(j,t)<=.1})}function S(){f.forEach(T=>{const{target:j,translate:F,slideLocation:W}=T,H=j();H!==W.get()&&(F.to(H),W.set(H))})}function M(){f.forEach(T=>T.translate.clear())}return{canLoop:N,clear:M,loop:S,loopPoints:f}}function bc(e,t,n){let r,s=!1;function a(c){if(!n)return;function d(h){for(const u of h)if(u.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(h=>{s||(an(n)||n(c,h))&&d(h)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),s=!0}return{init:a,destroy:i}}function yc(e,t,n,r){const s={};let a=null,i=null,l,c=!1;function d(){l=new IntersectionObserver(g=>{c||(g.forEach(v=>{const b=t.indexOf(v.target);s[b]=v}),a=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(g=>l.observe(g))}function h(){l&&l.disconnect(),c=!0}function u(g){return It(s).reduce((v,b)=>{const p=parseInt(b),{isIntersecting:y}=s[p];return(g&&y||!g&&!y)&&v.push(p),v},[])}function f(g=!0){if(g&&a)return a;if(!g&&i)return i;const v=u(g);return g&&(a=v),g||(i=v),v}return{init:d,destroy:h,get:f}}function Nc(e,t,n,r,s,a){const{measureSize:i,startEdge:l,endEdge:c}=e,d=n[0]&&s,h=g(),u=v(),f=n.map(i),m=b();function g(){if(!d)return 0;const y=n[0];return se(t[l]-y[l])}function v(){if(!d)return 0;const y=a.getComputedStyle(Ve(r));return parseFloat(y.getPropertyValue(`margin-${c}`))}function b(){return n.map((y,N,S)=>{const M=!N,R=mr(S,N);return M?f[N]+h:R?f[N]+u:S[N+1][l]-y[l]}).map(se)}return{slideSizes:f,slideSizesWithGaps:m,startGap:h,endGap:u}}function Cc(e,t,n,r,s,a,i,l,c){const{startEdge:d,endEdge:h,direction:u}=e,f=ur(n);function m(p,y){return _t(p).filter(N=>N%y===0).map(N=>p.slice(N,N+y))}function g(p){return p.length?_t(p).reduce((y,N,S)=>{const M=Ve(y)||0,R=M===0,T=N===Ft(p),j=s[d]-a[M][d],F=s[d]-a[N][h],W=!r&&R?u(i):0,H=!r&&T?u(l):0,K=se(F-H-(j+W));return S&&K>t+c&&y.push(N),T&&y.push(p.length),y},[]).map((y,N,S)=>{const M=Math.max(S[N-1]||0);return p.slice(M,y)}):[]}function v(p){return f?m(p,n):g(p)}return{groupSlides:v}}function jc(e,t,n,r,s,a,i){const{align:l,axis:c,direction:d,startIndex:h,loop:u,duration:f,dragFree:m,dragThreshold:g,inViewThreshold:v,slidesToScroll:b,skipSnaps:p,containScroll:y,watchResize:N,watchSlides:S,watchDrag:M,watchFocus:R}=a,T=2,j=sc(),F=j.measure(t),W=n.map(j.measure),H=nc(c,d),K=H.measureSize(F),k=ac(K),J=ec(l,K),Z=!u&&!!y,$=u||!!y,{slideSizes:U,slideSizesWithGaps:I,startGap:fe,endGap:me}=Nc(H,F,W,n,$,s),le=Cc(H,K,b,u,F,W,fe,me,T),{snaps:Ce,snapsAligned:L}=gc(H,J,F,W,le),z=-Ve(Ce)+Ve(I),{snapsContained:Y,scrollContainLimit:de}=cc(K,z,L,y,T),G=Z?Y:L,{limit:B}=uc(z,G,u),ce=la(Ft(G),h,u),ae=ce.clone(),X=_t(n),_=({dragHandler:Pe,scrollBody:lt,scrollBounds:Oe,options:{loop:dt}})=>{dt||Oe.constrain(Pe.pointerDown()),lt.seek()},Q=({scrollBody:Pe,translate:lt,location:Oe,offsetLocation:dt,previousLocation:cn,scrollLooper:$t,slideLooper:zt,dragHandler:un,animation:ht,eventHandler:Le,scrollBounds:fn,options:{loop:Bt}},xt)=>{const vt=Pe.settled(),O=!fn.shouldConstrain(),ue=Bt?vt:vt&&O,pe=ue&&!un.pointerDown();pe&&ht.stop();const Se=Oe.get()*xt+cn.get()*(1-xt);dt.set(Se),Bt&&($t.loop(Pe.direction()),zt.loop()),lt.to(dt.get()),pe&&Le.emit("settle"),ue||Le.emit("scroll")},oe=tc(r,s,()=>_(Je),Pe=>Q(Je,Pe)),we=.68,Ie=G[ce.get()],je=Nt(Ie),ze=Nt(Ie),xe=Nt(Ie),Ge=Nt(Ie),Ze=lc(je,xe,ze,Ge,f,we),be=hc(u,G,z,B,Ge),Be=xc(oe,ce,ae,Ze,be,Ge,i),Lt=mc(B),Et=Pt(),it=yc(t,n,i,v),{slideRegistry:At}=pc(Z,y,G,de,le,X),Vt=vc(e,n,At,Be,Ze,Et,i,R),Je={ownerDocument:r,ownerWindow:s,eventHandler:i,containerRect:F,slideRects:W,animation:oe,axis:H,dragHandler:rc(H,e,r,s,Ge,oc(H,s),je,oe,Be,Ze,be,ce,i,k,m,g,p,we,M),eventStore:Et,percentOfView:k,index:ce,indexPrevious:ae,limit:B,location:je,offsetLocation:xe,previousLocation:ze,options:a,resizeHandler:ic(t,i,s,n,H,N,j),scrollBody:Ze,scrollBounds:dc(B,xe,Ge,Ze,k),scrollLooper:fc(z,B,xe,[je,xe,ze,Ge]),scrollProgress:Lt,scrollSnapList:G.map(Lt.get),scrollSnaps:G,scrollTarget:be,scrollTo:Be,slideLooper:wc(H,K,z,U,I,Ce,G,xe,n),slideFocus:Vt,slidesHandler:bc(t,i,S),slidesInView:it,slideIndexes:X,slideRegistry:At,slidesToScroll:le,target:Ge,translate:da(H,t)};return Je}function Sc(){let e={},t;function n(d){t=d}function r(d){return e[d]||[]}function s(d){return r(d).forEach(h=>h(t,d)),c}function a(d,h){return e[d]=r(d).concat([h]),c}function i(d,h){return e[d]=r(d).filter(u=>u!==h),c}function l(){e={}}const c={init:n,emit:s,off:i,on:a,clear:l};return c}const kc={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function Rc(e){function t(a,i){return ia(a,i||{})}function n(a){const i=a.breakpoints||{},l=It(i).filter(c=>e.matchMedia(c).matches).map(c=>i[c]).reduce((c,d)=>t(c,d),{});return t(a,l)}function r(a){return a.map(i=>It(i.breakpoints||{})).reduce((i,l)=>i.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Mc(e){let t=[];function n(a,i){return t=i.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(a,e)),i.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function en(e,t,n){const r=e.ownerDocument,s=r.defaultView,a=Rc(s),i=Mc(a),l=Pt(),c=Sc(),{mergeOptions:d,optionsAtMedia:h,optionsMediaQueries:u}=a,{on:f,off:m,emit:g}=c,v=H;let b=!1,p,y=d(kc,en.globalOptions),N=d(y),S=[],M,R,T;function j(){const{container:X,slides:_}=N;R=(Mn(X)?e.querySelector(X):X)||e.children[0];const oe=Mn(_)?R.querySelectorAll(_):_;T=[].slice.call(oe||R.children)}function F(X){const _=jc(e,R,T,r,s,X,c);if(X.loop&&!_.slideLooper.canLoop()){const Q=Object.assign({},X,{loop:!1});return F(Q)}return _}function W(X,_){b||(y=d(y,X),N=h(y),S=_||S,j(),p=F(N),u([y,...S.map(({options:Q})=>Q)]).forEach(Q=>l.add(Q,"change",H)),N.active&&(p.translate.to(p.location.get()),p.animation.init(),p.slidesInView.init(),p.slideFocus.init(ae),p.eventHandler.init(ae),p.resizeHandler.init(ae),p.slidesHandler.init(ae),p.options.loop&&p.slideLooper.loop(),R.offsetParent&&T.length&&p.dragHandler.init(ae),M=i.init(ae,S)))}function H(X,_){const Q=le();K(),W(d({startIndex:Q},X),_),c.emit("reInit")}function K(){p.dragHandler.destroy(),p.eventStore.clear(),p.translate.clear(),p.slideLooper.clear(),p.resizeHandler.destroy(),p.slidesHandler.destroy(),p.slidesInView.destroy(),p.animation.destroy(),i.destroy(),l.clear()}function k(){b||(b=!0,l.clear(),K(),c.emit("destroy"),c.clear())}function J(X,_,Q){!N.active||b||(p.scrollBody.useBaseFriction().useDuration(_===!0?0:N.duration),p.scrollTo.index(X,Q||0))}function Z(X){const _=p.index.add(1).get();J(_,X,-1)}function $(X){const _=p.index.add(-1).get();J(_,X,1)}function U(){return p.index.add(1).get()!==le()}function I(){return p.index.add(-1).get()!==le()}function fe(){return p.scrollSnapList}function me(){return p.scrollProgress.get(p.offsetLocation.get())}function le(){return p.index.get()}function Ce(){return p.indexPrevious.get()}function L(){return p.slidesInView.get()}function z(){return p.slidesInView.get(!1)}function Y(){return M}function de(){return p}function G(){return e}function B(){return R}function ce(){return T}const ae={canScrollNext:U,canScrollPrev:I,containerNode:B,internalEngine:de,destroy:k,off:m,on:f,emit:g,plugins:Y,previousScrollSnap:Ce,reInit:v,rootNode:G,scrollNext:Z,scrollPrev:$,scrollProgress:me,scrollSnapList:fe,scrollTo:J,selectedScrollSnap:le,slideNodes:ce,slidesInView:L,slidesNotInView:z};return W(t,n),setTimeout(()=>c.emit("init"),0),ae}en.globalOptions=void 0;function gr(e={},t=[]){const n=C.useRef(e),r=C.useRef(t),[s,a]=C.useState(),[i,l]=C.useState(),c=C.useCallback(()=>{s&&s.reInit(n.current,r.current)},[s]);return C.useEffect(()=>{cr(n.current,e)||(n.current=e,c())},[e,c]),C.useEffect(()=>{Zd(r.current,t)||(r.current=t,c())},[t,c]),C.useEffect(()=>{if(Kd()&&i){en.globalOptions=gr.globalOptions;const d=en(i,n.current,r.current);return a(d),()=>d.destroy()}else a(void 0)},[i,a]),[l,s]}gr.globalOptions=void 0;const ca=w.createContext(null);function ln(){const e=w.useContext(ca);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const ua=w.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:s,children:a,...i},l)=>{const[c,d]=gr({...t,axis:e==="horizontal"?"x":"y"},r),[h,u]=w.useState(!1),[f,m]=w.useState(!1),g=w.useCallback(y=>{y&&(u(y.canScrollPrev()),m(y.canScrollNext()))},[]),v=w.useCallback(()=>{d==null||d.scrollPrev()},[d]),b=w.useCallback(()=>{d==null||d.scrollNext()},[d]),p=w.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),v()):y.key==="ArrowRight"&&(y.preventDefault(),b())},[v,b]);return w.useEffect(()=>{!d||!n||n(d)},[d,n]),w.useEffect(()=>{if(d)return g(d),d.on("reInit",g),d.on("select",g),()=>{d==null||d.off("select",g)}},[d,g]),o.jsx(ca.Provider,{value:{carouselRef:c,api:d,opts:t,orientation:e,scrollPrev:v,scrollNext:b,canScrollPrev:h,canScrollNext:f},children:o.jsx("div",{ref:l,onKeyDownCapture:p,className:x("relative",s),role:"region","aria-roledescription":"carousel",...i,children:a})})});ua.displayName="Carousel";const fa=w.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:s}=ln();return o.jsx("div",{ref:r,className:"overflow-hidden",children:o.jsx("div",{ref:n,className:x("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});fa.displayName="CarouselContent";const ma=w.forwardRef(({className:e,...t},n)=>{const{orientation:r}=ln();return o.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:x("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})});ma.displayName="CarouselItem";const ga=w.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollPrev:i,canScrollPrev:l}=ln();return o.jsxs(ge,{ref:s,variant:t,size:n,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...r,children:[o.jsx(E.ChevronLeft,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Previous slide"})]})});ga.displayName="CarouselPrevious";const pa=w.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},s)=>{const{orientation:a,scrollNext:i,canScrollNext:l}=ln();return o.jsxs(ge,{ref:s,variant:t,size:n,className:x("absolute h-8 w-8 rounded-full",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:i,...r,children:[o.jsx(E.ChevronRight,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:"Next slide"})]})});pa.displayName="CarouselNext";/**
|
|
13
13
|
* table-core
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) TanStack
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
* LICENSE.md file in the root directory of this source tree.
|
|
19
19
|
*
|
|
20
20
|
* @license MIT
|
|
21
|
-
*/function
|
|
21
|
+
*/function Ye(e,t){return typeof e=="function"?e(t):e}function De(e,t){return n=>{t.setState(r=>({...r,[e]:Ye(n,r[e])}))}}function dn(e){return e instanceof Function}function _c(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Ic(e,t){const n=[],r=s=>{s.forEach(a=>{n.push(a);const i=t(a);i!=null&&i.length&&r(i)})};return r(e),n}function A(e,t,n){let r=[],s;return a=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(a);if(!(l.length!==r.length||l.some((h,u)=>r[u]!==h)))return s;r=l;let d;if(n.key&&n.debug&&(d=Date.now()),s=t(...l),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-i)*100)/100,u=Math.round((Date.now()-d)*100)/100,f=u/16,m=(g,v)=>{for(g=String(g);g.length<v;)g=" "+g;return g};console.info(`%c⏱ ${m(u,5)} /${m(h,5)} ms`,`
|
|
22
22
|
font-size: .6rem;
|
|
23
23
|
font-weight: bold;
|
|
24
|
-
color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,t==null?void 0:t.key)}return r}}function A(e,n,t,o){return{debug:()=>{var r;return(r=e==null?void 0:e.debugAll)!=null?r:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:o}}function mc(e,n,t,o){const r=()=>{var i;return(i=s.getValue())!=null?i:e.options.renderFallbackValue},s={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(o),renderValue:r,getContext:E(()=>[e,t,n,s],(i,l,u,d)=>({table:i,column:l,row:u,cell:d,getValue:d.getValue,renderValue:d.renderValue}),A(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(s,t,n,e)},{}),s}function gc(e,n,t,o){var r,s;const l={...e._getDefaultColumnDef(),...n},u=l.accessorKey;let d=(r=(s=l.id)!=null?s:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?r:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:u&&(u.includes(".")?f=g=>{let m=g;for(const x of u.split(".")){var p;m=(p=m)==null?void 0:p[x],process.env.NODE_ENV!=="production"&&m===void 0&&console.warn(`"${x}" in deeply nested key "${u}" returned undefined.`)}return m}:f=g=>g[l.accessorKey]),!d)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let c={id:`${String(d)}`,accessorFn:f,parent:o,depth:t,columnDef:l,columns:[],getFlatColumns:E(()=>[!0],()=>{var g;return[c,...(g=c.columns)==null?void 0:g.flatMap(m=>m.getFlatColumns())]},A(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:E(()=>[e._getOrderColumnsFn()],g=>{var m;if((m=c.columns)!=null&&m.length){let p=c.columns.flatMap(x=>x.getLeafColumns());return g(p)}return[c]},A(e.options,"debugColumns","column.getLeafColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(c,e);return c}const Ce="debugHeaders";function Eo(e,n,t){var o;let s={id:(o=t.id)!=null?o:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(l),i.push(u)};return l(s),i},getContext:()=>({table:e,header:s,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(s,e)}),s}const pc={createTable:e=>{e.getHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>{var s,i;const l=(s=o==null?void 0:o.map(c=>t.find(g=>g.id===c)).filter(Boolean))!=null?s:[],u=(i=r==null?void 0:r.map(c=>t.find(g=>g.id===c)).filter(Boolean))!=null?i:[],d=t.filter(c=>!(o!=null&&o.includes(c.id))&&!(r!=null&&r.includes(c.id)));return Xt(n,[...l,...d,...u],e)},A(e.options,Ce,"getHeaderGroups")),e.getCenterHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o,r)=>(t=t.filter(s=>!(o!=null&&o.includes(s.id))&&!(r!=null&&r.includes(s.id))),Xt(n,t,e,"center")),A(e.options,Ce,"getCenterHeaderGroups")),e.getLeftHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,o)=>{var r;const s=(r=o==null?void 0:o.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?r:[];return Xt(n,s,e,"left")},A(e.options,Ce,"getLeftHeaderGroups")),e.getRightHeaderGroups=E(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,o)=>{var r;const s=(r=o==null?void 0:o.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?r:[];return Xt(n,s,e,"right")},A(e.options,Ce,"getRightHeaderGroups")),e.getFooterGroups=E(()=>[e.getHeaderGroups()],n=>[...n].reverse(),A(e.options,Ce,"getFooterGroups")),e.getLeftFooterGroups=E(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),A(e.options,Ce,"getLeftFooterGroups")),e.getCenterFooterGroups=E(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),A(e.options,Ce,"getCenterFooterGroups")),e.getRightFooterGroups=E(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),A(e.options,Ce,"getRightFooterGroups")),e.getFlatHeaders=E(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),A(e.options,Ce,"getFlatHeaders")),e.getLeftFlatHeaders=E(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),A(e.options,Ce,"getLeftFlatHeaders")),e.getCenterFlatHeaders=E(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),A(e.options,Ce,"getCenterFlatHeaders")),e.getRightFlatHeaders=E(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),A(e.options,Ce,"getRightFlatHeaders")),e.getCenterLeafHeaders=E(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),A(e.options,Ce,"getCenterLeafHeaders")),e.getLeftLeafHeaders=E(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),A(e.options,Ce,"getLeftLeafHeaders")),e.getRightLeafHeaders=E(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var o;return!((o=t.subHeaders)!=null&&o.length)}),A(e.options,Ce,"getRightLeafHeaders")),e.getLeafHeaders=E(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,o)=>{var r,s,i,l,u,d;return[...(r=(s=n[0])==null?void 0:s.headers)!=null?r:[],...(i=(l=t[0])==null?void 0:l.headers)!=null?i:[],...(u=(d=o[0])==null?void 0:d.headers)!=null?u:[]].map(f=>f.getLeafHeaders()).flat()},A(e.options,Ce,"getLeafHeaders"))}};function Xt(e,n,t,o){var r,s;let i=0;const l=function(g,m){m===void 0&&(m=1),i=Math.max(i,m),g.filter(p=>p.getIsVisible()).forEach(p=>{var x;(x=p.columns)!=null&&x.length&&l(p.columns,m+1)},0)};l(e);let u=[];const d=(g,m)=>{const p={depth:m,id:[o,`${m}`].filter(Boolean).join("_"),headers:[]},x=[];g.forEach(w=>{const h=[...x].reverse()[0],y=w.column.depth===p.depth;let C,_=!1;if(y&&w.column.parent?C=w.column.parent:(C=w.column,_=!0),h&&(h==null?void 0:h.column)===C)h.subHeaders.push(w);else{const F=Eo(t,C,{id:[o,m,C.id,w==null?void 0:w.id].filter(Boolean).join("_"),isPlaceholder:_,placeholderId:_?`${x.filter(T=>T.column===C).length}`:void 0,depth:m,index:x.length});F.subHeaders.push(w),x.push(F)}p.headers.push(w),w.headerGroup=p}),u.push(p),m>0&&d(x,m-1)},f=n.map((g,m)=>Eo(t,g,{depth:i,index:m}));d(f,i-1),u.reverse();const c=g=>g.filter(p=>p.column.getIsVisible()).map(p=>{let x=0,w=0,h=[0];p.subHeaders&&p.subHeaders.length?(h=[],c(p.subHeaders).forEach(C=>{let{colSpan:_,rowSpan:F}=C;x+=_,h.push(F)})):x=1;const y=Math.min(...h);return w=w+y,p.colSpan=x,p.rowSpan=w,{colSpan:x,rowSpan:w}});return c((r=(s=u[0])==null?void 0:s.headers)!=null?r:[]),u}const ho=(e,n,t,o,r,s,i)=>{let l={id:n,index:o,original:t,depth:r,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(l._valuesCache.hasOwnProperty(u))return l._valuesCache[u];const d=e.getColumn(u);if(d!=null&&d.accessorFn)return l._valuesCache[u]=d.accessorFn(l.original,o),l._valuesCache[u]},getUniqueValues:u=>{if(l._uniqueValuesCache.hasOwnProperty(u))return l._uniqueValuesCache[u];const d=e.getColumn(u);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[u]=d.columnDef.getUniqueValues(l.original,o),l._uniqueValuesCache[u]):(l._uniqueValuesCache[u]=[l.getValue(u)],l._uniqueValuesCache[u])},renderValue:u=>{var d;return(d=l.getValue(u))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>fc(l.subRows,u=>u.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let u=[],d=l;for(;;){const f=d.getParentRow();if(!f)break;u.push(f),d=f}return u.reverse()},getAllCells:E(()=>[e.getAllLeafColumns()],u=>u.map(d=>mc(e,l,d,d.id)),A(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:E(()=>[l.getAllCells()],u=>u.reduce((d,f)=>(d[f.column.id]=f,d),{}),A(e.options,"debugRows","getAllCellsByColumnId"))};for(let u=0;u<e._features.length;u++){const d=e._features[u];d==null||d.createRow==null||d.createRow(l,e)}return l},hc={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},ua=(e,n,t)=>{var o,r;const s=t==null||(o=t.toString())==null?void 0:o.toLowerCase();return!!(!((r=e.getValue(n))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(s))};ua.autoRemove=e=>Le(e);const fa=(e,n,t)=>{var o;return!!(!((o=e.getValue(n))==null||(o=o.toString())==null)&&o.includes(t))};fa.autoRemove=e=>Le(e);const ma=(e,n,t)=>{var o;return((o=e.getValue(n))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(t==null?void 0:t.toLowerCase())};ma.autoRemove=e=>Le(e);const ga=(e,n,t)=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(t)};ga.autoRemove=e=>Le(e);const pa=(e,n,t)=>!t.some(o=>{var r;return!((r=e.getValue(n))!=null&&r.includes(o))});pa.autoRemove=e=>Le(e)||!(e!=null&&e.length);const ha=(e,n,t)=>t.some(o=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(o)});ha.autoRemove=e=>Le(e)||!(e!=null&&e.length);const xa=(e,n,t)=>e.getValue(n)===t;xa.autoRemove=e=>Le(e);const ba=(e,n,t)=>e.getValue(n)==t;ba.autoRemove=e=>Le(e);const xo=(e,n,t)=>{let[o,r]=t;const s=e.getValue(n);return s>=o&&s<=r};xo.resolveFilterValue=e=>{let[n,t]=e,o=typeof n!="number"?parseFloat(n):n,r=typeof t!="number"?parseFloat(t):t,s=n===null||Number.isNaN(o)?-1/0:o,i=t===null||Number.isNaN(r)?1/0:r;if(s>i){const l=s;s=i,i=l}return[s,i]};xo.autoRemove=e=>Le(e)||Le(e[0])&&Le(e[1]);const Ue={includesString:ua,includesStringSensitive:fa,equalsString:ma,arrIncludes:ga,arrIncludesAll:pa,arrIncludesSome:ha,equals:xa,weakEquals:ba,inNumberRange:xo};function Le(e){return e==null||e===""}const xc={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Te("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);return typeof o=="string"?Ue.includesString:typeof o=="number"?Ue.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Ue.equals:Array.isArray(o)?Ue.arrIncludes:Ue.weakEquals},e.getFilterFn=()=>{var t,o;return dn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(o=n.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?t:Ue[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,o,r;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((o=n.options.enableColumnFilters)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(o=>o.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,o;return(t=(o=n.getState().columnFilters)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(o=>{const r=e.getFilterFn(),s=o==null?void 0:o.find(f=>f.id===e.id),i=Xe(t,s?s.value:void 0);if(Ao(r,i,e)){var l;return(l=o==null?void 0:o.filter(f=>f.id!==e.id))!=null?l:[]}const u={id:e.id,value:i};if(s){var d;return(d=o==null?void 0:o.map(f=>f.id===e.id?u:f))!=null?d:[]}return o!=null&&o.length?[...o,u]:[u]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),o=r=>{var s;return(s=Xe(n,r))==null?void 0:s.filter(i=>{const l=t.find(u=>u.id===i.id);if(l){const u=l.getFilterFn();if(Ao(u,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=n=>{var t,o;e.setColumnFilters(n?[]:(t=(o=e.initialState)==null?void 0:o.columnFilters)!=null?t:[])},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 Ao(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const bc=(e,n,t)=>t.reduce((o,r)=>{const s=r.getValue(e);return o+(typeof s=="number"?s:0)},0),vc=(e,n,t)=>{let o;return t.forEach(r=>{const s=r.getValue(e);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},wc=(e,n,t)=>{let o;return t.forEach(r=>{const s=r.getValue(e);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},yc=(e,n,t)=>{let o,r;return t.forEach(s=>{const i=s.getValue(e);i!=null&&(o===void 0?i>=i&&(o=r=i):(o>i&&(o=i),r<i&&(r=i)))}),[o,r]},Cc=(e,n)=>{let t=0,o=0;if(n.forEach(r=>{let s=r.getValue(e);s!=null&&(s=+s)>=s&&(++t,o+=s)}),t)return o/t},Sc=(e,n)=>{if(!n.length)return;const t=n.map(s=>s.getValue(e));if(!uc(t))return;if(t.length===1)return t[0];const o=Math.floor(t.length/2),r=t.sort((s,i)=>s-i);return t.length%2!==0?r[o]:(r[o-1]+r[o])/2},Nc=(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),Rc=(e,n)=>new Set(n.map(t=>t.getValue(e))).size,jc=(e,n)=>n.length,hn={sum:bc,min:vc,max:wc,extent:yc,mean:Cc,median:Sc,unique:Nc,uniqueCount:Rc,count:jc},kc={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Te("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(o=>o!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,o;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((o=n.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],o=t==null?void 0:t.getValue(e.id);if(typeof o=="number")return hn.sum;if(Object.prototype.toString.call(o)==="[object Date]")return hn.extent},e.getAggregationFn=()=>{var t,o;if(!e)throw new Error;return dn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(o=n.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?t:hn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,o;e.setGrouping(n?[]:(t=(o=e.initialState)==null?void 0:o.grouping)!=null?t:[])},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,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const o=n.getColumn(t);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[t]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,o)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var r;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((r=t.subRows)!=null&&r.length)}}};function Mc(e,n,t){if(!(n!=null&&n.length)||!t)return e;const o=e.filter(s=>!n.includes(s.id));return t==="remove"?o:[...n.map(s=>e.find(i=>i.id===s)).filter(Boolean),...o]}const _c={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Te("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=E(t=>[jt(n,t)],t=>t.findIndex(o=>o.id===e.id),A(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var o;return((o=jt(n,t)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=t=>{var o;const r=jt(n,t);return((o=r[r.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=E(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,o)=>r=>{let s=[];if(!(n!=null&&n.length))s=r;else{const i=[...n],l=[...r];for(;l.length&&i.length;){const u=i.shift(),d=l.findIndex(f=>f.id===u);d>-1&&s.push(l.splice(d,1)[0])}s=[...s,...l]}return Mc(s,t,o)},A(e.options,"debugTable","_getOrderColumnsFn"))}},xn=()=>({left:[],right:[]}),Pc={getInitialState:e=>({columnPinning:xn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Te("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const o=e.getLeafColumns().map(r=>r.id).filter(Boolean);n.setColumnPinning(r=>{var s,i;if(t==="right"){var l,u;return{left:((l=r==null?void 0:r.left)!=null?l:[]).filter(c=>!(o!=null&&o.includes(c))),right:[...((u=r==null?void 0:r.right)!=null?u:[]).filter(c=>!(o!=null&&o.includes(c))),...o]}}if(t==="left"){var d,f;return{left:[...((d=r==null?void 0:r.left)!=null?d:[]).filter(c=>!(o!=null&&o.includes(c))),...o],right:((f=r==null?void 0:r.right)!=null?f:[]).filter(c=>!(o!=null&&o.includes(c)))}}return{left:((s=r==null?void 0:r.left)!=null?s:[]).filter(c=>!(o!=null&&o.includes(c))),right:((i=r==null?void 0:r.right)!=null?i:[]).filter(c=>!(o!=null&&o.includes(c)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var r,s,i;return((r=o.columnDef.enablePinning)!=null?r:!0)&&((s=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:o,right:r}=n.getState().columnPinning,s=t.some(l=>o==null?void 0:o.includes(l)),i=t.some(l=>r==null?void 0:r.includes(l));return s?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();return r?(t=(o=n.getState().columnPinning)==null||(o=o[r])==null?void 0:o.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=E(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,o,r)=>{const s=[...o??[],...r??[]];return t.filter(i=>!s.includes(i.column.id))},A(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=E(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,o)=>(o??[]).map(s=>t.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),A(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=E(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,o)=>(o??[]).map(s=>t.find(i=>i.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),A(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,o;return e.setColumnPinning(n?xn():(t=(o=e.initialState)==null?void 0:o.columnPinning)!=null?t:xn())},e.getIsSomeColumnsPinned=n=>{var t;const o=e.getState().columnPinning;if(!n){var r,s;return!!((r=o.left)!=null&&r.length||(s=o.right)!=null&&s.length)}return!!((t=o[n])!=null&&t.length)},e.getLeftLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),A(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(o=>n.find(r=>r.id===o)).filter(Boolean),A(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=E(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,o)=>{const r=[...t??[],...o??[]];return n.filter(s=>!r.includes(s.id))},A(e.options,"debugColumns","getCenterLeafColumns"))}};function Ic(e){return e||(typeof document<"u"?document:null)}const Yt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},bn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Tc={getDefaultColumnDef:()=>Yt,getInitialState:e=>({columnSizing:{},columnSizingInfo:bn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Te("columnSizing",e),onColumnSizingInfoChange:Te("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,o,r;const s=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:Yt.minSize,(o=s??e.columnDef.size)!=null?o:Yt.size),(r=e.columnDef.maxSize)!=null?r:Yt.maxSize)},e.getStart=E(t=>[t,jt(n,t),n.getState().columnSizing],(t,o)=>o.slice(0,e.getIndex(t)).reduce((r,s)=>r+s.getSize(),0),A(n.options,"debugColumns","getStart")),e.getAfter=E(t=>[t,jt(n,t),n.getState().columnSizing],(t,o)=>o.slice(e.getIndex(t)+1).reduce((r,s)=>r+s.getSize(),0),A(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:o,...r}=t;return r})},e.getCanResize=()=>{var t,o;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((o=n.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const o=r=>{if(r.subHeaders.length)r.subHeaders.forEach(o);else{var s;t+=(s=r.column.getSize())!=null?s:0}};return o(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const o=n.getColumn(e.column.id),r=o==null?void 0:o.getCanResize();return s=>{if(!o||!r||(s.persist==null||s.persist(),vn(s)&&s.touches&&s.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[o.id,o.getSize()]],u=vn(s)?Math.round(s.touches[0].clientX):s.clientX,d={},f=(h,y)=>{typeof y=="number"&&(n.setColumnSizingInfo(C=>{var _,F;const T=n.options.columnResizeDirection==="rtl"?-1:1,D=(y-((_=C==null?void 0:C.startOffset)!=null?_:0))*T,N=Math.max(D/((F=C==null?void 0:C.startSize)!=null?F:0),-.999999);return C.columnSizingStart.forEach($=>{let[X,G]=$;d[X]=Math.round(Math.max(G+G*N,0)*100)/100}),{...C,deltaOffset:D,deltaPercentage:N}}),(n.options.columnResizeMode==="onChange"||h==="end")&&n.setColumnSizing(C=>({...C,...d})))},c=h=>f("move",h),g=h=>{f("end",h),n.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=Ic(t),p={moveHandler:h=>c(h.clientX),upHandler:h=>{m==null||m.removeEventListener("mousemove",p.moveHandler),m==null||m.removeEventListener("mouseup",p.upHandler),g(h.clientX)}},x={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),c(h.touches[0].clientX),!1),upHandler:h=>{var y;m==null||m.removeEventListener("touchmove",x.moveHandler),m==null||m.removeEventListener("touchend",x.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),g((y=h.touches[0])==null?void 0:y.clientX)}},w=Dc()?{passive:!1}:!1;vn(s)?(m==null||m.addEventListener("touchmove",x.moveHandler,w),m==null||m.addEventListener("touchend",x.upHandler,w)):(m==null||m.addEventListener("mousemove",p.moveHandler,w),m==null||m.addEventListener("mouseup",p.upHandler,w)),n.setColumnSizingInfo(h=>({...h,startOffset:u,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:o.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?bn():(t=e.initialState.columnSizingInfo)!=null?t:bn())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((o,r)=>o+r.getSize(),0))!=null?n:0}}};let Kt=null;function Dc(){if(typeof Kt=="boolean")return Kt;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return Kt=e,Kt}function vn(e){return e.type==="touchstart"}const Fc={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Te("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(o=>({...o,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,o;const r=e.columns;return(t=r.length?r.some(s=>s.getIsVisible()):(o=n.getState().columnVisibility)==null?void 0:o[e.id])!=null?t:!0},e.getCanHide=()=>{var t,o;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((o=n.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=E(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(o=>o.column.getIsVisible()),A(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=E(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,o,r)=>[...t,...o,...r],A(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,o)=>E(()=>[o(),o().filter(r=>r.getIsVisible()).map(r=>r.id).join("_")],r=>r.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),A(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var o;e.setColumnVisibility(t?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=t=>{var o;t=(o=t)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((r,s)=>({...r,[s.id]:t||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var o;e.toggleAllColumnsVisible((o=t.target)==null?void 0:o.checked)}}};function jt(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ec={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()}}},Ac={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Te("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const o=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,o,r,s;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((o=n.options.enableGlobalFilter)!=null?o:!0)&&((r=n.options.enableFilters)!=null?r:!0)&&((s=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Ue.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:o}=e.options;return dn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[o])!=null?n:Ue[o]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},Vc={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Te("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var r,s;e.setExpanded(o?{}:(r=(s=e.initialState)==null?void 0:s.expanded)!=null?r:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(r=>!r.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const i=s.split(".");o=Math.max(o,i.length)}),o},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,n)=>{e.toggleExpanded=t=>{n.setExpanded(o=>{var r;const s=o===!0?!0:!!(o!=null&&o[e.id]);let i={};if(o===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=o,t=(r=t)!=null?r:!s,!s&&t)return{...i,[e.id]:!0};if(s&&!t){const{[e.id]:l,...u}=i;return u}return o})},e.getIsExpanded=()=>{var t;const o=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:o===!0||o!=null&&o[e.id])},e.getCanExpand=()=>{var t,o,r;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((o=n.options.enableExpanding)!=null?o:!0)&&!!((r=e.subRows)!=null&&r.length)},e.getIsAllParentsExpanded=()=>{let t=!0,o=e;for(;t&&o.parentId;)o=n.getRow(o.parentId,!0),t=o.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Pn=0,In=10,wn=()=>({pageIndex:Pn,pageSize:In}),$c={getInitialState:e=>({...e,pagination:{...wn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Te("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var o,r;if(!n){e._queue(()=>{n=!0});return}if((o=(r=e.options.autoResetAll)!=null?r:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=o=>{const r=s=>Xe(o,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(r)},e.resetPagination=o=>{var r;e.setPagination(o?wn():(r=e.initialState.pagination)!=null?r:wn())},e.setPageIndex=o=>{e.setPagination(r=>{let s=Xe(o,r.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,i)),{...r,pageIndex:s}})},e.resetPageIndex=o=>{var r,s;e.setPageIndex(o?Pn:(r=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?r:Pn)},e.resetPageSize=o=>{var r,s;e.setPageSize(o?In:(r=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?r:In)},e.setPageSize=o=>{e.setPagination(r=>{const s=Math.max(1,Xe(o,r.pageSize)),i=r.pageSize*r.pageIndex,l=Math.floor(i/s);return{...r,pageIndex:l,pageSize:s}})},e.setPageCount=o=>e.setPagination(r=>{var s;let i=Xe(o,(s=e.options.pageCount)!=null?s:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...r,pageCount:i}}),e.getPageOptions=E(()=>[e.getPageCount()],o=>{let r=[];return o&&o>0&&(r=[...new Array(o)].fill(null).map((s,i)=>i)),r},A(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,r=e.getPageCount();return r===-1?!0:r===0?!1:o<r-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+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 o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},yn=()=>({top:[],bottom:[]}),Lc={getInitialState:e=>({rowPinning:yn(),...e}),getDefaultOptions:e=>({onRowPinningChange:Te("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,o,r)=>{const s=o?e.getLeafRows().map(u=>{let{id:d}=u;return d}):[],i=r?e.getParentRows().map(u=>{let{id:d}=u;return d}):[],l=new Set([...i,e.id,...s]);n.setRowPinning(u=>{var d,f;if(t==="bottom"){var c,g;return{top:((c=u==null?void 0:u.top)!=null?c:[]).filter(x=>!(l!=null&&l.has(x))),bottom:[...((g=u==null?void 0:u.bottom)!=null?g:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)]}}if(t==="top"){var m,p;return{top:[...((m=u==null?void 0:u.top)!=null?m:[]).filter(x=>!(l!=null&&l.has(x))),...Array.from(l)],bottom:((p=u==null?void 0:u.bottom)!=null?p:[]).filter(x=>!(l!=null&&l.has(x)))}}return{top:((d=u==null?void 0:u.top)!=null?d:[]).filter(x=>!(l!=null&&l.has(x))),bottom:((f=u==null?void 0:u.bottom)!=null?f:[]).filter(x=>!(l!=null&&l.has(x)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:o,enablePinning:r}=n.options;return typeof o=="function"?o(e):(t=o??r)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:o,bottom:r}=n.getState().rowPinning,s=t.some(l=>o==null?void 0:o.includes(l)),i=t.some(l=>r==null?void 0:r.includes(l));return s?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,o;const r=e.getIsPinned();if(!r)return-1;const s=(t=r==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(i=>{let{id:l}=i;return l});return(o=s==null?void 0:s.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,o;return e.setRowPinning(n?yn():(t=(o=e.initialState)==null?void 0:o.rowPinning)!=null?t:yn())},e.getIsSomeRowsPinned=n=>{var t;const o=e.getState().rowPinning;if(!n){var r,s;return!!((r=o.top)!=null&&r.length||(s=o.bottom)!=null&&s.length)}return!!((t=o[n])!=null&&t.length)},e._getPinnedRows=(n,t,o)=>{var r;return((r=e.options.keepPinnedRows)==null||r?(t??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(i=>n.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),A(e.options,"debugRows","getTopRows")),e.getBottomRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),A(e.options,"debugRows","getBottomRows")),e.getCenterRows=E(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,o)=>{const r=new Set([...t??[],...o??[]]);return n.filter(s=>!r.has(s.id))},A(e.options,"debugRows","getCenterRows"))}},zc={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Te("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const o={...t},r=e.getPreGroupedRowModel().flatRows;return n?r.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):r.forEach(s=>{delete o[s.id]}),o})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const o=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),r={...t};return e.getRowModel().rows.forEach(s=>{Tn(r,s.id,o,!0,e)}),r}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=E(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Cn(e,t):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=E(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Cn(e,t):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=E(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Cn(e,t):{rows:[],flatRows:[],rowsById:{}},A(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let o=!!(n.length&&Object.keys(t).length);return o&&n.some(r=>r.getCanSelect()&&!t[r.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(r=>r.getCanSelect()),{rowSelection:t}=e.getState();let o=!!n.length;return o&&n.some(r=>!t[r.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,o)=>{const r=e.getIsSelected();n.setRowSelection(s=>{var i;if(t=typeof t<"u"?t:!r,e.getCanSelect()&&r===t)return s;const l={...s};return Tn(l,e.id,t,(i=o==null?void 0:o.selectChildren)!=null?i:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return bo(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Dn(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Dn(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return o=>{var r;t&&e.toggleSelected((r=o.target)==null?void 0:r.checked)}}}},Tn=(e,n,t,o,r)=>{var s;const i=r.getRow(n,!0);t?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[n]=!0)):delete e[n],o&&(s=i.subRows)!=null&&s.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Tn(e,l.id,t,o,r))};function Cn(e,n){const t=e.getState().rowSelection,o=[],r={},s=function(i,l){return i.map(u=>{var d;const f=bo(u,t);if(f&&(o.push(u),r[u.id]=u),(d=u.subRows)!=null&&d.length&&(u={...u,subRows:s(u.subRows)}),f)return u}).filter(Boolean)};return{rows:s(n.rows),flatRows:o,rowsById:r}}function bo(e,n){var t;return(t=n[e.id])!=null?t:!1}function Dn(e,n,t){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let r=!0,s=!1;return e.subRows.forEach(i=>{if(!(s&&!r)&&(i.getCanSelect()&&(bo(i,n)?s=!0:r=!1),i.subRows&&i.subRows.length)){const l=Dn(i,n);l==="all"?s=!0:(l==="some"&&(s=!0),r=!1)}}),r?"all":s?"some":!1}const Fn=/([0-9]+)/gm,Oc=(e,n,t)=>va(Ye(e.getValue(t)).toLowerCase(),Ye(n.getValue(t)).toLowerCase()),Bc=(e,n,t)=>va(Ye(e.getValue(t)),Ye(n.getValue(t))),Hc=(e,n,t)=>vo(Ye(e.getValue(t)).toLowerCase(),Ye(n.getValue(t)).toLowerCase()),Gc=(e,n,t)=>vo(Ye(e.getValue(t)),Ye(n.getValue(t))),qc=(e,n,t)=>{const o=e.getValue(t),r=n.getValue(t);return o>r?1:o<r?-1:0},Uc=(e,n,t)=>vo(e.getValue(t),n.getValue(t));function vo(e,n){return e===n?0:e>n?1:-1}function Ye(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function va(e,n){const t=e.split(Fn).filter(Boolean),o=n.split(Fn).filter(Boolean);for(;t.length&&o.length;){const r=t.shift(),s=o.shift(),i=parseInt(r,10),l=parseInt(s,10),u=[i,l].sort();if(isNaN(u[0])){if(r>s)return 1;if(s>r)return-1;continue}if(isNaN(u[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return t.length-o.length}const vt={alphanumeric:Oc,alphanumericCaseSensitive:Bc,text:Hc,textCaseSensitive:Gc,datetime:qc,basic:Uc},Wc={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Te("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const r of t){const s=r==null?void 0:r.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return vt.datetime;if(typeof s=="string"&&(o=!0,s.split(Fn).length>1))return vt.alphanumeric}return o?vt.text:vt.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,o;if(!e)throw new Error;return dn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(o=n.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?t:vt[e.columnDef.sortingFn]},e.toggleSorting=(t,o)=>{const r=e.getNextSortingOrder(),s=typeof t<"u"&&t!==null;n.setSorting(i=>{const l=i==null?void 0:i.find(m=>m.id===e.id),u=i==null?void 0:i.findIndex(m=>m.id===e.id);let d=[],f,c=s?t:r==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?l?f="toggle":f="add":i!=null&&i.length&&u!==i.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(s||r||(f="remove")),f==="add"){var g;d=[...i,{id:e.id,desc:c}],d.splice(0,d.length-((g=n.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else f==="toggle"?d=i.map(m=>m.id===e.id?{...m,desc:c}:m):f==="remove"?d=i.filter(m=>m.id!==e.id):d=[{id:e.id,desc:c}];return d})},e.getFirstSortDir=()=>{var t,o;return((t=(o=e.columnDef.sortDescFirst)!=null?o:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var o,r;const s=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==s&&((o=n.options.enableSortingRemoval)==null||o)&&(!(t&&(r=n.options.enableMultiRemove)!=null)||r)?!1:i==="desc"?"asc":"desc":s},e.getCanSort=()=>{var t,o;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((o=n.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,o;return(t=(o=e.columnDef.enableMultiSort)!=null?o:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const o=(t=n.getState().sorting)==null?void 0:t.find(r=>r.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,o;return(t=(o=n.getState().sorting)==null?void 0:o.findIndex(r=>r.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return o=>{t&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,o;e.setSorting(n?[]:(t=(o=e.initialState)==null?void 0:o.sorting)!=null?t:[])},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())}},Xc=[pc,Fc,_c,Pc,hc,xc,Ec,Ac,Wc,kc,Vc,$c,Lc,zc,Tc];function Yc(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...Xc,...(n=e._features)!=null?n:[]];let r={_features:o};const s=r._features.reduce((g,m)=>Object.assign(g,m.getDefaultOptions==null?void 0:m.getDefaultOptions(r)),{}),i=g=>r.options.mergeOptions?r.options.mergeOptions(s,g):{...s,...g};let u={...{},...(t=e.initialState)!=null?t:{}};r._features.forEach(g=>{var m;u=(m=g.getInitialState==null?void 0:g.getInitialState(u))!=null?m:u});const d=[];let f=!1;const c={_features:o,options:{...s,...e},initialState:u,_queue:g=>{d.push(g),f||(f=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();f=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{r.setState(r.initialState)},setOptions:g=>{const m=Xe(g,r.options);r.options=i(m)},getState:()=>r.options.state,setState:g=>{r.options.onStateChange==null||r.options.onStateChange(g)},_getRowId:(g,m,p)=>{var x;return(x=r.options.getRowId==null?void 0:r.options.getRowId(g,m,p))!=null?x:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(r._getCoreRowModel||(r._getCoreRowModel=r.options.getCoreRowModel(r)),r._getCoreRowModel()),getRowModel:()=>r.getPaginationRowModel(),getRow:(g,m)=>{let p=(m?r.getPrePaginationRowModel():r.getRowModel()).rowsById[g];if(!p&&(p=r.getCoreRowModel().rowsById[g],!p))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${g}`):new Error;return p},_getDefaultColumnDef:E(()=>[r.options.defaultColumn],g=>{var m;return g=(m=g)!=null?m:{},{header:p=>{const x=p.header.column.columnDef;return x.accessorKey?x.accessorKey:x.accessorFn?x.id:null},cell:p=>{var x,w;return(x=(w=p.renderValue())==null||w.toString==null?void 0:w.toString())!=null?x:null},...r._features.reduce((p,x)=>Object.assign(p,x.getDefaultColumnDef==null?void 0:x.getDefaultColumnDef()),{}),...g}},A(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>r.options.columns,getAllColumns:E(()=>[r._getColumnDefs()],g=>{const m=function(p,x,w){return w===void 0&&(w=0),p.map(h=>{const y=gc(r,h,w,x),C=h;return y.columns=C.columns?m(C.columns,y,w+1):[],y})};return m(g)},A(e,"debugColumns","getAllColumns")),getAllFlatColumns:E(()=>[r.getAllColumns()],g=>g.flatMap(m=>m.getFlatColumns()),A(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:E(()=>[r.getAllFlatColumns()],g=>g.reduce((m,p)=>(m[p.id]=p,m),{}),A(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:E(()=>[r.getAllColumns(),r._getOrderColumnsFn()],(g,m)=>{let p=g.flatMap(x=>x.getLeafColumns());return m(p)},A(e,"debugColumns","getAllLeafColumns")),getColumn:g=>{const m=r._getAllFlatColumnsById()[g];return process.env.NODE_ENV!=="production"&&!m&&console.error(`[Table] Column with id '${g}' does not exist.`),m}};Object.assign(r,c);for(let g=0;g<r._features.length;g++){const m=r._features[g];m==null||m.createTable==null||m.createTable(r)}return r}function Kc(){return e=>E(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},o=function(r,s,i){s===void 0&&(s=0);const l=[];for(let d=0;d<r.length;d++){const f=ho(e,e._getRowId(r[d],d,i),r[d],d,s,void 0,i==null?void 0:i.id);if(t.flatRows.push(f),t.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var u;f.originalSubRows=e.options.getSubRows(r[d],d),(u=f.originalSubRows)!=null&&u.length&&(f.subRows=o(f.originalSubRows,s+1,f))}}return l};return t.rows=o(n),t},A(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Jc(e){const n=[],t=o=>{var r;n.push(o),(r=o.subRows)!=null&&r.length&&o.getIsExpanded()&&o.subRows.forEach(t)};return e.rows.forEach(t),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function Zc(e,n,t){return t.options.filterFromLeafRows?Qc(e,n,t):eu(e,n,t)}function Qc(e,n,t){var o;const r=[],s={},i=(o=t.options.maxLeafRowFilterDepth)!=null?o:100,l=function(u,d){d===void 0&&(d=0);const f=[];for(let g=0;g<u.length;g++){var c;let m=u[g];const p=ho(t,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(p.columnFilters=m.columnFilters,(c=m.subRows)!=null&&c.length&&d<i){if(p.subRows=l(m.subRows,d+1),m=p,n(m)&&!p.subRows.length){f.push(m),s[m.id]=m,r.push(m);continue}if(n(m)||p.subRows.length){f.push(m),s[m.id]=m,r.push(m);continue}}else m=p,n(m)&&(f.push(m),s[m.id]=m,r.push(m))}return f};return{rows:l(e),flatRows:r,rowsById:s}}function eu(e,n,t){var o;const r=[],s={},i=(o=t.options.maxLeafRowFilterDepth)!=null?o:100,l=function(u,d){d===void 0&&(d=0);const f=[];for(let g=0;g<u.length;g++){let m=u[g];if(n(m)){var c;if((c=m.subRows)!=null&&c.length&&d<i){const x=ho(t,m.id,m.original,m.index,m.depth,void 0,m.parentId);x.subRows=l(m.subRows,d+1),m=x}f.push(m),r.push(m),s[m.id]=m}}return f};return{rows:l(e),flatRows:r,rowsById:s}}function tu(){return e=>E(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(n,t,o)=>{if(!n.rows.length||!(t!=null&&t.length)&&!o){for(let g=0;g<n.flatRows.length;g++)n.flatRows[g].columnFilters={},n.flatRows[g].columnFiltersMeta={};return n}const r=[],s=[];(t??[]).forEach(g=>{var m;const p=e.getColumn(g.id);if(!p)return;const x=p.getFilterFn();if(!x){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${p.id}.`);return}r.push({id:g.id,filterFn:x,resolvedValue:(m=x.resolveFilterValue==null?void 0:x.resolveFilterValue(g.value))!=null?m:g.value})});const i=(t??[]).map(g=>g.id),l=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(g=>g.getCanGlobalFilter());o&&l&&u.length&&(i.push("__global__"),u.forEach(g=>{var m;s.push({id:g.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(o))!=null?m:o})}));let d,f;for(let g=0;g<n.flatRows.length;g++){const m=n.flatRows[g];if(m.columnFilters={},r.length)for(let p=0;p<r.length;p++){d=r[p];const x=d.id;m.columnFilters[x]=d.filterFn(m,x,d.resolvedValue,w=>{m.columnFiltersMeta[x]=w})}if(s.length){for(let p=0;p<s.length;p++){f=s[p];const x=f.id;if(f.filterFn(m,x,f.resolvedValue,w=>{m.columnFiltersMeta[x]=w})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const c=g=>{for(let m=0;m<i.length;m++)if(g.columnFilters[i[m]]===!1)return!1;return!0};return Zc(n.rows,c,e)},A(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function nu(e){return n=>E(()=>[n.getState().pagination,n.getPrePaginationRowModel(),n.options.paginateExpandedRows?void 0:n.getState().expanded],(t,o)=>{if(!o.rows.length)return o;const{pageSize:r,pageIndex:s}=t;let{rows:i,flatRows:l,rowsById:u}=o;const d=r*s,f=d+r;i=i.slice(d,f);let c;n.options.paginateExpandedRows?c={rows:i,flatRows:l,rowsById:u}:c=Jc({rows:i,flatRows:l,rowsById:u}),c.flatRows=[];const g=m=>{c.flatRows.push(m),m.subRows.length&&m.subRows.forEach(g)};return c.rows.forEach(g),c},A(n.options,"debugTable","getPaginationRowModel"))}function ou(){return e=>E(()=>[e.getState().sorting,e.getPreSortedRowModel()],(n,t)=>{if(!t.rows.length||!(n!=null&&n.length))return t;const o=e.getState().sorting,r=[],s=o.filter(u=>{var d;return(d=e.getColumn(u.id))==null?void 0:d.getCanSort()}),i={};s.forEach(u=>{const d=e.getColumn(u.id);d&&(i[u.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const l=u=>{const d=u.map(f=>({...f}));return d.sort((f,c)=>{for(let m=0;m<s.length;m+=1){var g;const p=s[m],x=i[p.id],w=x.sortUndefined,h=(g=p==null?void 0:p.desc)!=null?g:!1;let y=0;if(w){const C=f.getValue(p.id),_=c.getValue(p.id),F=C===void 0,T=_===void 0;if(F||T){if(w==="first")return F?-1:1;if(w==="last")return F?1:-1;y=F&&T?0:F?w:-w}}if(y===0&&(y=x.sortingFn(f,c,p.id)),y!==0)return h&&(y*=-1),x.invertSorting&&(y*=-1),y}return f.index-c.index}),d.forEach(f=>{var c;r.push(f),(c=f.subRows)!=null&&c.length&&(f.subRows=l(f.subRows))}),d};return{rows:l(t.rows),flatRows:r,rowsById:t.rowsById}},A(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
24
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function V(e,t,n,r){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:r}}function Pc(e,t,n,r){const s=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:s,getContext:A(()=>[e,n,t,a],(i,l,c,d)=>({table:i,column:l,row:c,cell:d,getValue:d.getValue,renderValue:d.renderValue}),V(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,n,t,e)},{}),a}function Dc(e,t,n,r){var s,a;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let d=(s=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,h;if(l.accessorFn?h=l.accessorFn:c&&(c.includes(".")?h=f=>{let m=f;for(const v of c.split(".")){var g;m=(g=m)==null?void 0:g[v],process.env.NODE_ENV!=="production"&&m===void 0&&console.warn(`"${v}" in deeply nested key "${c}" returned undefined.`)}return m}:h=f=>f[l.accessorKey]),!d)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let u={id:`${String(d)}`,accessorFn:h,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:A(()=>[!0],()=>{var f;return[u,...(f=u.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},V(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:A(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=u.columns)!=null&&m.length){let g=u.columns.flatMap(v=>v.getLeafColumns());return f(g)}return[u]},V(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(u,e);return u}const Ne="debugHeaders";function Lr(e,t,n){var r;let a={id:(r=n.id)!=null?r: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 i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const Tc={createTable:e=>{e.getHeaderGroups=A(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>{var a,i;const l=(a=r==null?void 0:r.map(u=>n.find(f=>f.id===u)).filter(Boolean))!=null?a:[],c=(i=s==null?void 0:s.map(u=>n.find(f=>f.id===u)).filter(Boolean))!=null?i:[],d=n.filter(u=>!(r!=null&&r.includes(u.id))&&!(s!=null&&s.includes(u.id)));return Yt(t,[...l,...d,...c],e)},V(e.options,Ne,"getHeaderGroups")),e.getCenterHeaderGroups=A(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,s)=>(n=n.filter(a=>!(r!=null&&r.includes(a.id))&&!(s!=null&&s.includes(a.id))),Yt(t,n,e,"center")),V(e.options,Ne,"getCenterHeaderGroups")),e.getLeftHeaderGroups=A(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var s;const a=(s=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Yt(t,a,e,"left")},V(e.options,Ne,"getLeftHeaderGroups")),e.getRightHeaderGroups=A(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var s;const a=(s=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?s:[];return Yt(t,a,e,"right")},V(e.options,Ne,"getRightHeaderGroups")),e.getFooterGroups=A(()=>[e.getHeaderGroups()],t=>[...t].reverse(),V(e.options,Ne,"getFooterGroups")),e.getLeftFooterGroups=A(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),V(e.options,Ne,"getLeftFooterGroups")),e.getCenterFooterGroups=A(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),V(e.options,Ne,"getCenterFooterGroups")),e.getRightFooterGroups=A(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),V(e.options,Ne,"getRightFooterGroups")),e.getFlatHeaders=A(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),V(e.options,Ne,"getFlatHeaders")),e.getLeftFlatHeaders=A(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),V(e.options,Ne,"getLeftFlatHeaders")),e.getCenterFlatHeaders=A(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),V(e.options,Ne,"getCenterFlatHeaders")),e.getRightFlatHeaders=A(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),V(e.options,Ne,"getRightFlatHeaders")),e.getCenterLeafHeaders=A(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),V(e.options,Ne,"getCenterLeafHeaders")),e.getLeftLeafHeaders=A(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),V(e.options,Ne,"getLeftLeafHeaders")),e.getRightLeafHeaders=A(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),V(e.options,Ne,"getRightLeafHeaders")),e.getLeafHeaders=A(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var s,a,i,l,c,d;return[...(s=(a=t[0])==null?void 0:a.headers)!=null?s:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(d=r[0])==null?void 0:d.headers)!=null?c:[]].map(h=>h.getLeafHeaders()).flat()},V(e.options,Ne,"getLeafHeaders"))}};function Yt(e,t,n,r){var s,a;let i=0;const l=function(f,m){m===void 0&&(m=1),i=Math.max(i,m),f.filter(g=>g.getIsVisible()).forEach(g=>{var v;(v=g.columns)!=null&&v.length&&l(g.columns,m+1)},0)};l(e);let c=[];const d=(f,m)=>{const g={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},v=[];f.forEach(b=>{const p=[...v].reverse()[0],y=b.column.depth===g.depth;let N,S=!1;if(y&&b.column.parent?N=b.column.parent:(N=b.column,S=!0),p&&(p==null?void 0:p.column)===N)p.subHeaders.push(b);else{const M=Lr(n,N,{id:[r,m,N.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${v.filter(R=>R.column===N).length}`:void 0,depth:m,index:v.length});M.subHeaders.push(b),v.push(M)}g.headers.push(b),b.headerGroup=g}),c.push(g),m>0&&d(v,m-1)},h=t.map((f,m)=>Lr(n,f,{depth:i,index:m}));d(h,i-1),c.reverse();const u=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let v=0,b=0,p=[0];g.subHeaders&&g.subHeaders.length?(p=[],u(g.subHeaders).forEach(N=>{let{colSpan:S,rowSpan:M}=N;v+=S,p.push(M)})):v=1;const y=Math.min(...p);return b=b+y,g.colSpan=v,g.rowSpan=b,{colSpan:v,rowSpan:b}});return u((s=(a=c[0])==null?void 0:a.headers)!=null?s:[]),c}const pr=(e,t,n,r,s,a,i)=>{let l={id:t,index:r,original:n,depth:s,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return l._valuesCache[c]=d.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=d.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var d;return(d=l.getValue(c))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Ic(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],d=l;for(;;){const h=d.getParentRow();if(!h)break;c.push(h),d=h}return c.reverse()},getAllCells:A(()=>[e.getAllLeafColumns()],c=>c.map(d=>Pc(e,l,d,d.id)),V(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:A(()=>[l.getAllCells()],c=>c.reduce((d,h)=>(d[h.column.id]=h,d),{}),V(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const d=e._features[c];d==null||d.createRow==null||d.createRow(l,e)}return l},Fc={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()}}},ha=(e,t,n)=>{var r,s;const a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(a))};ha.autoRemove=e=>$e(e);const xa=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};xa.autoRemove=e=>$e(e);const va=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};va.autoRemove=e=>$e(e);const wa=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};wa.autoRemove=e=>$e(e);const ba=(e,t,n)=>!n.some(r=>{var s;return!((s=e.getValue(t))!=null&&s.includes(r))});ba.autoRemove=e=>$e(e)||!(e!=null&&e.length);const ya=(e,t,n)=>n.some(r=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(r)});ya.autoRemove=e=>$e(e)||!(e!=null&&e.length);const Na=(e,t,n)=>e.getValue(t)===n;Na.autoRemove=e=>$e(e);const Ca=(e,t,n)=>e.getValue(t)==n;Ca.autoRemove=e=>$e(e);const hr=(e,t,n)=>{let[r,s]=n;const a=e.getValue(t);return a>=r&&a<=s};hr.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,a=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(s)?1/0:s;if(a>i){const l=a;a=i,i=l}return[a,i]};hr.autoRemove=e=>$e(e)||$e(e[0])&&$e(e[1]);const We={includesString:ha,includesStringSensitive:xa,equalsString:va,arrIncludes:wa,arrIncludesAll:ba,arrIncludesSome:ya,equals:Na,weakEquals:Ca,inNumberRange:hr};function $e(e){return e==null||e===""}const Lc={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:De("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?We.includesString:typeof r=="number"?We.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?We.equals:Array.isArray(r)?We.arrIncludes:We.weakEquals},e.getFilterFn=()=>{var n,r;return dn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:We[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!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(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const s=e.getFilterFn(),a=r==null?void 0:r.find(h=>h.id===e.id),i=Ye(n,a?a.value:void 0);if(Er(s,i,e)){var l;return(l=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(a){var d;return(d=r==null?void 0:r.map(h=>h.id===e.id?c:h))!=null?d:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=s=>{var a;return(a=Ye(t,s))==null?void 0:a.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(Er(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.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 Er(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Ec=(e,t,n)=>n.reduce((r,s)=>{const a=s.getValue(e);return r+(typeof a=="number"?a:0)},0),Ac=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},Vc=(e,t,n)=>{let r;return n.forEach(s=>{const a=s.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},$c=(e,t,n)=>{let r,s;return n.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=s=i):(r>i&&(r=i),s<i&&(s=i)))}),[r,s]},zc=(e,t)=>{let n=0,r=0;if(t.forEach(s=>{let a=s.getValue(e);a!=null&&(a=+a)>=a&&(++n,r+=a)}),n)return r/n},Bc=(e,t)=>{if(!t.length)return;const n=t.map(a=>a.getValue(e));if(!_c(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),s=n.sort((a,i)=>a-i);return n.length%2!==0?s[r]:(s[r-1]+s[r])/2},Oc=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Hc=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,Gc=(e,t)=>t.length,hn={sum:Ec,min:Ac,max:Vc,extent:$c,mean:zc,median:Bc,unique:Oc,uniqueCount:Hc,count:Gc},qc={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:De("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!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],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return hn.sum;if(Object.prototype.toString.call(r)==="[object Date]")return hn.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return dn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:hn[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.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 r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{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 Wc(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(a=>!t.includes(a.id));return n==="remove"?r:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const Uc={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:De("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=A(n=>[kt(t,n)],n=>n.findIndex(r=>r.id===e.id),V(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var r;return((r=kt(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const s=kt(t,n);return((r=s[s.length-1])==null?void 0:r.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=A(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>s=>{let a=[];if(!(t!=null&&t.length))a=s;else{const i=[...t],l=[...s];for(;l.length&&i.length;){const c=i.shift(),d=l.findIndex(h=>h.id===c);d>-1&&a.push(l.splice(d,1)[0])}a=[...a,...l]}return Wc(a,n,r)},V(e.options,"debugTable","_getOrderColumnsFn"))}},xn=()=>({left:[],right:[]}),Yc={getInitialState:e=>({columnPinning:xn(),...e}),getDefaultOptions:e=>({onColumnPinningChange:De("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var a,i;if(n==="right"){var l,c;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(u=>!(r!=null&&r.includes(u))),right:[...((c=s==null?void 0:s.right)!=null?c:[]).filter(u=>!(r!=null&&r.includes(u))),...r]}}if(n==="left"){var d,h;return{left:[...((d=s==null?void 0:s.left)!=null?d:[]).filter(u=>!(r!=null&&r.includes(u))),...r],right:((h=s==null?void 0:s.right)!=null?h:[]).filter(u=>!(r!=null&&r.includes(u)))}}return{left:((a=s==null?void 0:s.left)!=null?a:[]).filter(u=>!(r!=null&&r.includes(u))),right:((i=s==null?void 0:s.right)!=null?i:[]).filter(u=>!(r!=null&&r.includes(u)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var s,a,i;return((s=r.columnDef.enablePinning)!=null?s:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:s}=t.getState().columnPinning,a=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>s==null?void 0:s.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();return s?(n=(r=t.getState().columnPinning)==null||(r=r[s])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=A(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,s)=>{const a=[...r??[],...s??[]];return n.filter(i=>!a.includes(i.column.id))},V(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=A(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),V(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=A(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(a=>n.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),V(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?xn():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:xn())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var s,a;return!!((s=r.left)!=null&&s.length||(a=r.right)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=A(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),V(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=A(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(s=>s.id===r)).filter(Boolean),V(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=A(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const s=[...n??[],...r??[]];return t.filter(a=>!s.includes(a.id))},V(e.options,"debugColumns","getCenterLeafColumns"))}};function Xc(e){return e||(typeof document<"u"?document:null)}const Xt={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vn=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Kc={getDefaultColumnDef:()=>Xt,getInitialState:e=>({columnSizing:{},columnSizingInfo:vn(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:De("columnSizing",e),onColumnSizingInfoChange:De("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,s;const a=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Xt.minSize,(r=a??e.columnDef.size)!=null?r:Xt.size),(s=e.columnDef.maxSize)!=null?s:Xt.maxSize)},e.getStart=A(n=>[n,kt(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((s,a)=>s+a.getSize(),0),V(t.options,"debugColumns","getStart")),e.getAfter=A(n=>[n,kt(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((s,a)=>s+a.getSize(),0),V(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...s}=n;return s})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=s=>{if(s.subHeaders.length)s.subHeaders.forEach(r);else{var a;n+=(a=s.column.getSize())!=null?a:0}};return r(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 r=t.getColumn(e.column.id),s=r==null?void 0:r.getCanResize();return a=>{if(!r||!s||(a.persist==null||a.persist(),wn(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[r.id,r.getSize()]],c=wn(a)?Math.round(a.touches[0].clientX):a.clientX,d={},h=(p,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(N=>{var S,M;const R=t.options.columnResizeDirection==="rtl"?-1:1,T=(y-((S=N==null?void 0:N.startOffset)!=null?S:0))*R,j=Math.max(T/((M=N==null?void 0:N.startSize)!=null?M:0),-.999999);return N.columnSizingStart.forEach(F=>{let[W,H]=F;d[W]=Math.round(Math.max(H+H*j,0)*100)/100}),{...N,deltaOffset:T,deltaPercentage:j}}),(t.options.columnResizeMode==="onChange"||p==="end")&&t.setColumnSizing(N=>({...N,...d})))},u=p=>h("move",p),f=p=>{h("end",p),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=Xc(n),g={moveHandler:p=>u(p.clientX),upHandler:p=>{m==null||m.removeEventListener("mousemove",g.moveHandler),m==null||m.removeEventListener("mouseup",g.upHandler),f(p.clientX)}},v={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),u(p.touches[0].clientX),!1),upHandler:p=>{var y;m==null||m.removeEventListener("touchmove",v.moveHandler),m==null||m.removeEventListener("touchend",v.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),f((y=p.touches[0])==null?void 0:y.clientX)}},b=Zc()?{passive:!1}:!1;wn(a)?(m==null||m.addEventListener("touchmove",v.moveHandler,b),m==null||m.addEventListener("touchend",v.upHandler,b)):(m==null||m.addEventListener("mousemove",g.moveHandler,b),m==null||m.addEventListener("mouseup",g.upHandler,b)),t.setColumnSizingInfo(p=>({...p,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.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?vn():(n=e.initialState.columnSizingInfo)!=null?n:vn())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,s)=>r+s.getSize(),0))!=null?t:0}}};let Kt=null;function Zc(){if(typeof Kt=="boolean")return Kt;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 Kt=e,Kt}function wn(e){return e.type==="touchstart"}const Jc={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:De("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const s=e.columns;return(n=s.length?s.some(a=>a.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=A(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),V(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=A(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,s)=>[...n,...r,...s],V(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,r)=>A(()=>[r(),r().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),V(e.options,"debugColumns",n));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 r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,a)=>({...s,[a.id]:n||!(a.getCanHide!=null&&a.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 r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function kt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Qc={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()}}},eu={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:De("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,s,a;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>We.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return dn(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:We[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},tu={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:De("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var s,a;e.setExpanded(r?{}:(s=(a=e.initialState)==null?void 0:a.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length)}),r},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(r=>{var s;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(s=n)!=null?s:!a,!a&&n)return{...i,[e.id]:!0};if(a&&!n){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},In=0,Pn=10,bn=()=>({pageIndex:In,pageSize:Pn}),nu={getInitialState:e=>({...e,pagination:{...bn(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:De("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,s;if(!t){e._queue(()=>{t=!0});return}if((r=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const s=a=>Ye(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=r=>{var s;e.setPagination(r?bn():(s=e.initialState.pagination)!=null?s:bn())},e.setPageIndex=r=>{e.setPagination(s=>{let a=Ye(r,s.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...s,pageIndex:a}})},e.resetPageIndex=r=>{var s,a;e.setPageIndex(r?In:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?s:In)},e.resetPageSize=r=>{var s,a;e.setPageSize(r?Pn:(s=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?s:Pn)},e.setPageSize=r=>{e.setPagination(s=>{const a=Math.max(1,Ye(r,s.pageSize)),i=s.pageSize*s.pageIndex,l=Math.floor(i/a);return{...s,pageIndex:l,pageSize:a}})},e.setPageCount=r=>e.setPagination(s=>{var a;let i=Ye(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...s,pageCount:i}}),e.getPageOptions=A(()=>[e.getPageCount()],r=>{let s=[];return r&&r>0&&(s=[...new Array(r)].fill(null).map((a,i)=>i)),s},V(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:r<s-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+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 r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},yn=()=>({top:[],bottom:[]}),ru={getInitialState:e=>({rowPinning:yn(),...e}),getDefaultOptions:e=>({onRowPinningChange:De("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,s)=>{const a=r?e.getLeafRows().map(c=>{let{id:d}=c;return d}):[],i=s?e.getParentRows().map(c=>{let{id:d}=c;return d}):[],l=new Set([...i,e.id,...a]);t.setRowPinning(c=>{var d,h;if(n==="bottom"){var u,f;return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(v=>!(l!=null&&l.has(v))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)]}}if(n==="top"){var m,g;return{top:[...((m=c==null?void 0:c.top)!=null?m:[]).filter(v=>!(l!=null&&l.has(v))),...Array.from(l)],bottom:((g=c==null?void 0:c.bottom)!=null?g:[]).filter(v=>!(l!=null&&l.has(v)))}}return{top:((d=c==null?void 0:c.top)!=null?d:[]).filter(v=>!(l!=null&&l.has(v))),bottom:((h=c==null?void 0:c.bottom)!=null?h:[]).filter(v=>!(l!=null&&l.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:s}=t.options;return typeof r=="function"?r(e):(n=r??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:s}=t.getState().rowPinning,a=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>s==null?void 0:s.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const s=e.getIsPinned();if(!s)return-1;const a=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=a==null?void 0:a.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?yn():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:yn())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var s,a;return!!((s=r.top)!=null&&s.length||(a=r.bottom)!=null&&a.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=A(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),V(e.options,"debugRows","getTopRows")),e.getBottomRows=A(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),V(e.options,"debugRows","getBottomRows")),e.getCenterRows=A(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const s=new Set([...n??[],...r??[]]);return t.filter(a=>!s.has(a.id))},V(e.options,"debugRows","getCenterRows"))}},ou={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:De("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 r={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):s.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(a=>{Dn(s,a.id,r,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=A(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Nn(e,n):{rows:[],flatRows:[],rowsById:{}},V(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=A(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Nn(e,n):{rows:[],flatRows:[],rowsById:{}},V(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=A(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Nn(e,n):{rows:[],flatRows:[],rowsById:{}},V(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(s=>!n[s.id])&&(r=!1),r},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,r)=>{const s=e.getIsSelected();t.setRowSelection(a=>{var i;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return a;const l={...a};return Dn(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return xr(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Tn(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Tn(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 r=>{var s;n&&e.toggleSelected((s=r.target)==null?void 0:s.checked)}}}},Dn=(e,t,n,r,s)=>{var a;const i=s.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Dn(e,l.id,n,r,s))};function Nn(e,t){const n=e.getState().rowSelection,r=[],s={},a=function(i,l){return i.map(c=>{var d;const h=xr(c,n);if(h&&(r.push(c),s[c.id]=c),(d=c.subRows)!=null&&d.length&&(c={...c,subRows:a(c.subRows)}),h)return c}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:s}}function xr(e,t){var n;return(n=t[e.id])!=null?n:!1}function Tn(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let s=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!s)&&(i.getCanSelect()&&(xr(i,t)?a=!0:s=!1),i.subRows&&i.subRows.length)){const l=Tn(i,t);l==="all"?a=!0:(l==="some"&&(a=!0),s=!1)}}),s?"all":a?"some":!1}const Fn=/([0-9]+)/gm,su=(e,t,n)=>ja(Xe(e.getValue(n)).toLowerCase(),Xe(t.getValue(n)).toLowerCase()),au=(e,t,n)=>ja(Xe(e.getValue(n)),Xe(t.getValue(n))),iu=(e,t,n)=>vr(Xe(e.getValue(n)).toLowerCase(),Xe(t.getValue(n)).toLowerCase()),lu=(e,t,n)=>vr(Xe(e.getValue(n)),Xe(t.getValue(n))),du=(e,t,n)=>{const r=e.getValue(n),s=t.getValue(n);return r>s?1:r<s?-1:0},cu=(e,t,n)=>vr(e.getValue(n),t.getValue(n));function vr(e,t){return e===t?0:e>t?1:-1}function Xe(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function ja(e,t){const n=e.split(Fn).filter(Boolean),r=t.split(Fn).filter(Boolean);for(;n.length&&r.length;){const s=n.shift(),a=r.shift(),i=parseInt(s,10),l=parseInt(a,10),c=[i,l].sort();if(isNaN(c[0])){if(s>a)return 1;if(a>s)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const bt={alphanumeric:su,alphanumericCaseSensitive:au,text:iu,textCaseSensitive:lu,datetime:du,basic:cu},uu={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:De("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const s of n){const a=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return bt.datetime;if(typeof a=="string"&&(r=!0,a.split(Fn).length>1))return bt.alphanumeric}return r?bt.text:bt.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return dn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:bt[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const s=e.getNextSortingOrder(),a=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(m=>m.id===e.id),c=i==null?void 0:i.findIndex(m=>m.id===e.id);let d=[],h,u=a?n:s==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?h="toggle":h="add":i!=null&&i.length&&c!==i.length-1?h="replace":l?h="toggle":h="replace",h==="toggle"&&(a||s||(h="remove")),h==="add"){var f;d=[...i,{id:e.id,desc:u}],d.splice(0,d.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else h==="toggle"?d=i.map(m=>m.id===e.id?{...m,desc:u}:m):h==="remove"?d=i.filter(m=>m.id!==e.id):d=[{id:e.id,desc:u}];return d})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,s;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.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())}},fu=[Tc,Jc,Uc,Yc,Fc,Lc,Qc,eu,uu,qc,tu,nu,ru,ou,Kc];function mu(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...fu,...(t=e._features)!=null?t:[]];let s={_features:r};const a=s._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(s)),{}),i=f=>s.options.mergeOptions?s.options.mergeOptions(a,f):{...a,...f};let c={...{},...(n=e.initialState)!=null?n:{}};s._features.forEach(f=>{var m;c=(m=f.getInitialState==null?void 0:f.getInitialState(c))!=null?m:c});const d=[];let h=!1;const u={_features:r,options:{...a,...e},initialState:c,_queue:f=>{d.push(f),h||(h=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();h=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{s.setState(s.initialState)},setOptions:f=>{const m=Ye(f,s.options);s.options=i(m)},getState:()=>s.options.state,setState:f=>{s.options.onStateChange==null||s.options.onStateChange(f)},_getRowId:(f,m,g)=>{var v;return(v=s.options.getRowId==null?void 0:s.options.getRowId(f,m,g))!=null?v:`${g?[g.id,m].join("."):m}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(f,m)=>{let g=(m?s.getPrePaginationRowModel():s.getRowModel()).rowsById[f];if(!g&&(g=s.getCoreRowModel().rowsById[f],!g))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return g},_getDefaultColumnDef:A(()=>[s.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:g=>{const v=g.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:g=>{var v,b;return(v=(b=g.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...s._features.reduce((g,v)=>Object.assign(g,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...f}},V(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>s.options.columns,getAllColumns:A(()=>[s._getColumnDefs()],f=>{const m=function(g,v,b){return b===void 0&&(b=0),g.map(p=>{const y=Dc(s,p,b,v),N=p;return y.columns=N.columns?m(N.columns,y,b+1):[],y})};return m(f)},V(e,"debugColumns","getAllColumns")),getAllFlatColumns:A(()=>[s.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),V(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:A(()=>[s.getAllFlatColumns()],f=>f.reduce((m,g)=>(m[g.id]=g,m),{}),V(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:A(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(f,m)=>{let g=f.flatMap(v=>v.getLeafColumns());return m(g)},V(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const m=s._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!m&&console.error(`[Table] Column with id '${f}' does not exist.`),m}};Object.assign(s,u);for(let f=0;f<s._features.length;f++){const m=s._features[f];m==null||m.createTable==null||m.createTable(s)}return s}function gu(){return e=>A(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(s,a,i){a===void 0&&(a=0);const l=[];for(let d=0;d<s.length;d++){const h=pr(e,e._getRowId(s[d],d,i),s[d],d,a,void 0,i==null?void 0:i.id);if(n.flatRows.push(h),n.rowsById[h.id]=h,l.push(h),e.options.getSubRows){var c;h.originalSubRows=e.options.getSubRows(s[d],d),(c=h.originalSubRows)!=null&&c.length&&(h.subRows=r(h.originalSubRows,a+1,h))}}return l};return n.rows=r(t),n},V(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function pu(e){const t=[],n=r=>{var s;t.push(r),(s=r.subRows)!=null&&s.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function hu(e,t,n){return n.options.filterFromLeafRows?xu(e,t,n):vu(e,t,n)}function xu(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,d){d===void 0&&(d=0);const h=[];for(let f=0;f<c.length;f++){var u;let m=c[f];const g=pr(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(g.columnFilters=m.columnFilters,(u=m.subRows)!=null&&u.length&&d<i){if(g.subRows=l(m.subRows,d+1),m=g,t(m)&&!g.subRows.length){h.push(m),a[m.id]=m,s.push(m);continue}if(t(m)||g.subRows.length){h.push(m),a[m.id]=m,s.push(m);continue}}else m=g,t(m)&&(h.push(m),a[m.id]=m,s.push(m))}return h};return{rows:l(e),flatRows:s,rowsById:a}}function vu(e,t,n){var r;const s=[],a={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,d){d===void 0&&(d=0);const h=[];for(let f=0;f<c.length;f++){let m=c[f];if(t(m)){var u;if((u=m.subRows)!=null&&u.length&&d<i){const v=pr(n,m.id,m.original,m.index,m.depth,void 0,m.parentId);v.subRows=l(m.subRows,d+1),m=v}h.push(m),s.push(m),a[m.id]=m}}return h};return{rows:l(e),flatRows:s,rowsById:a}}function wu(){return e=>A(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}const s=[],a=[];(n??[]).forEach(f=>{var m;const g=e.getColumn(f.id);if(!g)return;const v=g.getFilterFn();if(!v){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${g.id}.`);return}s.push({id:f.id,filterFn:v,resolvedValue:(m=v.resolveFilterValue==null?void 0:v.resolveFilterValue(f.value))!=null?m:f.value})});const i=(n??[]).map(f=>f.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&l&&c.length&&(i.push("__global__"),c.forEach(f=>{var m;a.push({id:f.id,filterFn:l,resolvedValue:(m=l.resolveFilterValue==null?void 0:l.resolveFilterValue(r))!=null?m:r})}));let d,h;for(let f=0;f<t.flatRows.length;f++){const m=t.flatRows[f];if(m.columnFilters={},s.length)for(let g=0;g<s.length;g++){d=s[g];const v=d.id;m.columnFilters[v]=d.filterFn(m,v,d.resolvedValue,b=>{m.columnFiltersMeta[v]=b})}if(a.length){for(let g=0;g<a.length;g++){h=a[g];const v=h.id;if(h.filterFn(m,v,h.resolvedValue,b=>{m.columnFiltersMeta[v]=b})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}const u=f=>{for(let m=0;m<i.length;m++)if(f.columnFilters[i[m]]===!1)return!1;return!0};return hu(t.rows,u,e)},V(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function bu(e){return t=>A(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:s,pageIndex:a}=n;let{rows:i,flatRows:l,rowsById:c}=r;const d=s*a,h=d+s;i=i.slice(d,h);let u;t.options.paginateExpandedRows?u={rows:i,flatRows:l,rowsById:c}:u=pu({rows:i,flatRows:l,rowsById:c}),u.flatRows=[];const f=m=>{u.flatRows.push(m),m.subRows.length&&m.subRows.forEach(f)};return u.rows.forEach(f),u},V(t.options,"debugTable","getPaginationRowModel"))}function yu(){return e=>A(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,s=[],a=r.filter(c=>{var d;return(d=e.getColumn(c.id))==null?void 0:d.getCanSort()}),i={};a.forEach(c=>{const d=e.getColumn(c.id);d&&(i[c.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const l=c=>{const d=c.map(h=>({...h}));return d.sort((h,u)=>{for(let m=0;m<a.length;m+=1){var f;const g=a[m],v=i[g.id],b=v.sortUndefined,p=(f=g==null?void 0:g.desc)!=null?f:!1;let y=0;if(b){const N=h.getValue(g.id),S=u.getValue(g.id),M=N===void 0,R=S===void 0;if(M||R){if(b==="first")return M?-1:1;if(b==="last")return M?1:-1;y=M&&R?0:M?b:-b}}if(y===0&&(y=v.sortingFn(h,u,g.id)),y!==0)return p&&(y*=-1),v.invertSorting&&(y*=-1),y}return h.index-u.index}),d.forEach(h=>{var u;s.push(h),(u=h.subRows)!=null&&u.length&&(h.subRows=l(h.subRows))}),d};return{rows:l(n.rows),flatRows:s,rowsById:n.rowsById}},V(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
|
|
25
25
|
* react-table
|
|
26
26
|
*
|
|
27
27
|
* Copyright (c) TanStack
|
|
@@ -30,8 +30,9 @@
|
|
|
30
30
|
* LICENSE.md file in the root directory of this source tree.
|
|
31
31
|
*
|
|
32
32
|
* @license MIT
|
|
33
|
-
*/function
|
|
34
|
-
`),o=n==="css"||n==="scss"||n==="less",r=n==="html"||n==="xml"||n==="svg",s=n==="json",i=n==="bash"||n==="sh"||n==="shell"||n==="zsh";return t.map(l=>{const u=[];let d=0;for(;d<l.length;){if(!o&&!s&&l[d]==="/"&&l[d+1]==="/"){u.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(i&&l[d]==="#"){u.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(l[d]==="/"&&l[d+1]==="*"){const f=l.indexOf("*/",d+2);f!==-1?(u.push({type:"comment",value:l.slice(d,f+2)}),d=f+2):(u.push({type:"comment",value:l.slice(d)}),d=l.length);continue}if(l[d]==="`"){let f=d+1;for(;f<l.length&&l[f]!=="`";)l[f]==="\\"&&f++,f++;u.push({type:"string",value:l.slice(d,f+1)}),d=f+1;continue}if(l[d]==='"'||l[d]==="'"){const f=l[d];let c=d+1;for(;c<l.length&&l[c]!==f;)l[c]==="\\"&&c++,c++;u.push({type:"string",value:l.slice(d,c+1)}),d=c+1;continue}if(/[0-9]/.test(l[d])&&(d===0||/[\s,\(\[:=+\-*/<>!&|^~?{]/.test(l[d-1]))){let f=d;for(;f<l.length&&/[0-9a-fA-FxXoObB._eE+\-n]/.test(l[f]);)f++;u.push({type:"number",value:l.slice(d,f)}),d=f;continue}if(l[d]==="<"&&/[a-zA-Z\/!]/.test(l[d+1]||"")||l[d]==="/"&&l[d+1]===">"){if(l[d]==="/"&&l[d+1]===">"){u.push({type:"punctuation",value:"/>"}),d+=2;continue}const f=l[d+1]==="/";let c=f?d+2:d+1;for(;c<l.length&&/[a-zA-Z0-9.\-_]/.test(l[c]);)c++;u.push({type:"punctuation",value:l[d]+(f?"/":"")});const g=l.slice(f?d+2:d+1,c);g&&u.push({type:"tag",value:g}),d=c;continue}if(l[d]===">"){u.push({type:"punctuation",value:">"}),d++;continue}if(/[a-zA-Z_$@]/.test(l[d])){let f=d;for(;f<l.length&&/[a-zA-Z0-9_$\-]/.test(l[f]);)f++;const c=l.slice(d,f);if(o&&uu.has(c))u.push({type:"keyword",value:c});else if(r||o){const g=l.slice(f).trimStart();g[0]==="="||g[0]===":"?u.push({type:"attr",value:c}):u.push({type:"plain",value:c})}else cu.has(c)?u.push({type:"keyword",value:c}):!s&&l[f]==="("?u.push({type:"function",value:c}):!s&&/^[A-Z]/.test(c)?u.push({type:"tag",value:c}):u.push({type:"plain",value:c});d=f;continue}if(/[=+\-*/%<>!&|^~?:]/.test(l[d])){let f=d;for(;f<l.length&&/[=+\-*/%<>!&|^~?:]/.test(l[f]);)f++;u.push({type:"operator",value:l.slice(d,f)}),d=f;continue}if(/[{}()\[\],;.]/.test(l[d])){u.push({type:"punctuation",value:l[d]}),d++;continue}if(/\s/.test(l[d])){let f=d;for(;f<l.length&&/\s/.test(l[f]);)f++;u.push({type:"plain",value:l.slice(d,f)}),d=f;continue}u.push({type:"plain",value:l[d]}),d++}return u})}const mu={comment:"var(--cb-comment, #6a9955)",string:"var(--cb-string, #ce9178)",keyword:"var(--cb-keyword, #569cd6)",number:"var(--cb-number, #b5cea8)",function:"var(--cb-function, #dcdcaa)",tag:"var(--cb-tag, #4ec9b0)",attr:"var(--cb-attr, #9cdcfe)",punctuation:"var(--cb-punctuation, #d4d4d4)",operator:"var(--cb-operator, #d4d4d4)",plain:"var(--cb-plain, #d4d4d4)"};function gu({code:e,language:n="tsx",showLineNumbers:t=!1,showCopy:o=!0,className:r}){const[s,i]=v.useState(!1),l=e.trim(),u=v.useMemo(()=>fu(l,n),[l,n]),d=async()=>{try{await navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return a.jsxs("div",{className:b("relative group",r),children:[o&&a.jsx("button",{type:"button",onClick:d,className:"absolute top-3 right-3 z-10 p-1.5 rounded-md bg-white/10 backdrop-blur text-white/60 hover:text-white opacity-0 group-hover:opacity-100 transition-opacity text-xs","aria-label":"Copy code",children:s?a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("polyline",{points:"20 6 9 17 4 12"})}):a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2"}),a.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})}),a.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:u.map((f,c)=>a.jsxs("div",{children:[t&&a.jsx("span",{className:"inline-block w-8 select-none text-right mr-4 opacity-40",style:{color:"var(--cb-plain, #d4d4d4)"},children:c+1}),f.map((g,m)=>a.jsx("span",{style:{color:mu[g.type]},children:g.value},m))]},c))})]})}const wa=Fe("font-bold tracking-tight",{variants:{level:{1:"text-2xl lg:text-3xl",2:"text-xl lg:text-2xl",3:"text-lg lg:text-xl",4:"text-base lg:text-lg",5:"text-sm lg:text-base",6:"text-xs lg:text-sm"}},defaultVariants:{level:2}});function pu({className:e,level:n=2,as:t,children:o,...r}){const s=t||`h${n}`;return a.jsx(s,{className:b(wa({level:n}),e),...r,children:o})}const ya=Fe("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive",success:"text-green-600 dark:text-green-400"},leading:{tight:"leading-tight",normal:"leading-normal",relaxed:"leading-relaxed"}},defaultVariants:{size:"base",weight:"normal",variant:"default",leading:"normal"}});function hu({className:e,size:n,weight:t,variant:o,leading:r,as:s="p",children:i,...l}){return a.jsx(s,{className:b(ya({size:n,weight:t,variant:o,leading:r}),e),...l,children:i})}function xu({className:e,...n}){return a.jsx("code",{className:b("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",e),...n})}function bu({className:e,...n}){return a.jsx("blockquote",{className:b("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...n})}function vu({className:e,...n}){return a.jsx("p",{className:b("text-xl text-muted-foreground",e),...n})}function wu({className:e,...n}){return a.jsx("p",{className:b("text-sm text-muted-foreground",e),...n})}const Ca=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("div",{ref:o,className:b("w-full h-full min-h-[300px]",e),...t,children:a.jsx(En.ResponsiveContainer,{width:"100%",height:"100%",children:n})}));Ca.displayName="ChartContainer";const yu=En.Tooltip,Cu=En.Legend,Sa=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("flex flex-col space-y-4",e),...n}));Sa.displayName="Timeline";const Na=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("relative flex gap-4 pb-4 last:pb-0",e),...n}));Na.displayName="TimelineItem";const Ra=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-background text-primary shadow-sm",e),...n}));Ra.displayName="TimelineIcon";const ja=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("absolute left-4 top-8 -bottom-4 w-px bg-border",e),...n}));ja.displayName="TimelineConnector";const ka=v.forwardRef(({className:e,...n},t)=>a.jsx("div",{ref:t,className:b("flex-1 space-y-1 pt-1",e),...n}));ka.displayName="TimelineContent";const Ma=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("div",{ref:o,className:b("grid min-h-screen w-full lg:grid-cols-[280px_1fr]",e),...t,children:n}));Ma.displayName="AppShell";const _a=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("div",{ref:o,className:b("hidden border-r bg-muted/40 lg:block dark:bg-muted/10",e),...t,children:a.jsx("div",{className:"flex h-full max-h-screen flex-col gap-2",children:n})}));_a.displayName="Sidebar";const Pa=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("header",{ref:o,className:b("flex h-14 items-center gap-4 border-b bg-background px-6 lg:h-[60px]",e),...t,children:n}));Pa.displayName="Header";const Ia=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("main",{ref:o,className:b("flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",e),...t,children:n}));Ia.displayName="Main";function Su({title:e,value:n,description:t,trend:o,trendLabel:r,icon:s,className:i,...l}){return a.jsxs(Hn,{className:b("overflow-hidden",i),...l,children:[a.jsxs(Gn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[a.jsx(qn,{className:"text-sm font-medium text-muted-foreground",children:e}),s&&a.jsx("div",{className:"text-muted-foreground",children:s})]}),a.jsxs(Un,{children:[a.jsx("div",{className:"text-2xl font-bold",children:n}),(t||o!==void 0)&&a.jsxs("div",{className:"text-xs flex items-center gap-1 mt-1 text-muted-foreground",children:[o!==void 0&&a.jsxs("span",{className:b("flex items-center font-medium",o>0?"text-green-500":o<0?"text-red-500":"text-muted-foreground"),children:[o>0?a.jsx(I.TrendingUp,{className:"mr-1 h-3 w-3"}):o<0?a.jsx(I.TrendingDown,{className:"mr-1 h-3 w-3"}):a.jsx(I.Minus,{className:"mr-1 h-3 w-3"}),o>0?"+":"",o,"%"]}),r&&a.jsx("span",{children:r}),t&&!o&&a.jsx("span",{children:t})]})]})]})}const Ta=v.forwardRef(({className:e,label:n,value:t,...o},r)=>{const[s,i]=v.useState(!1),l=()=>{navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)};return a.jsxs("div",{className:"space-y-2",children:[n&&a.jsx(on,{children:n}),a.jsxs("div",{className:"flex gap-2 relative",children:[a.jsx(Ke,{ref:r,value:t,readOnly:!0,className:b("pr-10 font-mono text-sm",e),...o}),a.jsx(me,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:s?a.jsx(I.Check,{className:"h-4 w-4 text-green-500"}):a.jsx(I.Copy,{className:"h-4 w-4"})})]})]})});Ta.displayName="CopyInput";const Da=v.forwardRef(({className:e,data:n,...t},o)=>a.jsx("pre",{ref:o,className:b("rounded-lg border bg-muted p-4 overflow-auto text-xs font-mono text-muted-foreground",e),...t,children:JSON.stringify(n,null,2)}));Da.displayName="JsonViewer";const Nu=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{status:{neutral:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-green-500/15 text-green-700 dark:text-green-400 hover:bg-green-500/25",warning:"border-transparent bg-yellow-500/15 text-yellow-700 dark:text-yellow-400 hover:bg-yellow-500/25",error:"border-transparent bg-red-500/15 text-red-700 dark:text-red-400 hover:bg-red-500/25",info:"border-transparent bg-blue-500/15 text-blue-700 dark:text-blue-400 hover:bg-blue-500/25"}},defaultVariants:{status:"neutral"}});function Ru({className:e,status:n,dot:t=!0,children:o,...r}){return a.jsxs("div",{className:b(Nu({status:n}),e),...r,children:[t&&a.jsx("span",{className:b("mr-1.5 h-2 w-2 rounded-full",{"bg-current":!0})}),o]})}function ju({className:e}){const{setTheme:n}=rn();return a.jsxs(Jr,{children:[a.jsx(Zr,{asChild:!0,children:a.jsxs(me,{variant:"outline",size:"icon",className:e,children:[a.jsx(I.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(I.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(ao,{align:"end",children:[a.jsxs(Nt,{onClick:()=>n("light"),children:[a.jsx(I.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),a.jsxs(Nt,{onClick:()=>n("dark"),children:[a.jsx(I.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),a.jsxs(Nt,{onClick:()=>n("system"),children:[a.jsx(I.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]})}const ku=[{value:"light",icon:I.Sun,label:"Light"},{value:"dark",icon:I.Moon,label:"Dark"},{value:"system",icon:I.Monitor,label:"System"}];function Mu({className:e}){const{theme:n,setTheme:t,themes:o}=rn();return a.jsx("div",{className:b("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),role:"radiogroup","aria-label":"Color theme",children:ku.filter(r=>o.includes(r.value)).map(({value:r,icon:s,label:i})=>a.jsxs("button",{role:"radio","aria-checked":n===r,"aria-label":i,onClick:()=>t(r),className:b("inline-flex items-center justify-center rounded-md px-2.5 py-1.5 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n===r?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[a.jsx(s,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:i})]},r))})}const Fa=v.forwardRef(({className:e,variant:n="received",children:t,...o},r)=>a.jsx("div",{ref:r,className:b("flex gap-2 max-w-[85%]",n==="sent"?"ml-auto flex-row-reverse":"mr-auto",e),"data-variant":n,...o,children:t}));Fa.displayName="ChatBubble";const Ea=v.forwardRef(({className:e,src:n,fallback:t,...o},r)=>a.jsx("div",{ref:r,className:b("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",e),...o,children:n?a.jsx("img",{src:n,alt:t??"avatar",className:"h-full w-full object-cover"}):a.jsx("span",{children:t??"?"})}));Ea.displayName="ChatBubbleAvatar";const Aa=v.forwardRef(({className:e,variant:n="received",isLoading:t,children:o,...r},s)=>a.jsx("div",{ref:s,className:b("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",n==="sent"?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md",e),...r,children:t?a.jsxs("div",{className:"flex items-center gap-1 py-1",children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):o}));Aa.displayName="ChatBubbleMessage";const Va=v.forwardRef(({className:e,...n},t)=>a.jsx("span",{ref:t,className:b("text-[10px] text-muted-foreground mt-1 px-1",e),...n}));Va.displayName="ChatBubbleTimestamp";const $a=v.forwardRef(({onSend:e,placeholder:n="Type a message...",disabled:t,isLoading:o,showAttach:r,className:s},i)=>{const l=v.useRef(null),[u,d]=v.useState(""),f=()=>{const m=l.current;m&&(m.style.height="auto",m.style.height=Math.min(m.scrollHeight,160)+"px")},c=()=>{const m=u.trim();!m||t||o||(e==null||e(m),d(""),l.current&&(l.current.style.height="auto"))},g=m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),c())};return a.jsxs("div",{ref:i,className:b("flex items-end gap-2 rounded-xl border border-border bg-background p-2",s),children:[r&&a.jsx("button",{type:"button",className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"Attach file",disabled:t,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:a.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}),a.jsx("textarea",{ref:l,value:u,onChange:m=>{d(m.target.value),f()},onKeyDown:g,placeholder:n,disabled:t||o,rows:1,className:"flex-1 resize-none bg-transparent text-sm outline-none placeholder:text-muted-foreground min-h-[36px] py-2 px-2 max-h-40"}),a.jsx("button",{type:"button",onClick:c,disabled:t||o||!u.trim(),className:b("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",u.trim()&&!t&&!o?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":"Send message",children:o?a.jsx("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"m5 12 7-7 7 7"}),a.jsx("path",{d:"M12 19V5"})]})})]})});$a.displayName="ChatInput";const La=v.forwardRef(({className:e,children:n,...t},o)=>a.jsx("div",{ref:o,className:b("flex flex-col h-full",e),...t,children:n}));La.displayName="ChatContainer";const za=v.forwardRef(({className:e,children:n,autoScroll:t=!0,...o},r)=>{const s=v.useRef(null),i=v.Children.count(n);return v.useEffect(()=>{t&&s.current&&s.current.scrollIntoView({behavior:"smooth"})},[i,t]),a.jsx(Jn,{className:"flex-1",orientation:"vertical",children:a.jsxs("div",{ref:r,className:b("flex flex-col gap-4 p-4",e),...o,children:[n,a.jsx("div",{ref:s})]})})});za.displayName="ChatList";const Oa=v.forwardRef(({className:e,variant:n="dots",text:t="Thinking",...o},r)=>n==="text"?a.jsxs("div",{ref:r,className:b("flex items-center gap-1.5 text-sm text-muted-foreground",e),...o,children:[a.jsx("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),a.jsxs("span",{className:"animate-pulse",children:[t,"…"]})]}):a.jsxs("div",{ref:r,className:b("flex items-center gap-1",e),...o,children:[a.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:0ms]"}),a.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:150ms]"}),a.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:300ms]"})]}));Oa.displayName="AILoading";function wt(e){const n=[],t=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\*[^*]+\*)|(\[[^\]]+\]\([^)]+\))/g;let o=0,r;for(;(r=t.exec(e))!==null;){r.index>o&&n.push(e.slice(o,r.index));const s=r[0];if(s.startsWith("`"))n.push(a.jsx("code",{className:"px-1 py-0.5 rounded bg-muted text-sm font-mono",children:s.slice(1,-1)},r.index));else if(s.startsWith("**"))n.push(a.jsx("strong",{children:s.slice(2,-2)},r.index));else if(s.startsWith("*"))n.push(a.jsx("em",{children:s.slice(1,-1)},r.index));else if(s.startsWith("[")){const i=s.indexOf("]"),l=s.slice(1,i),u=s.slice(i+2,-1);n.push(a.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:l},r.index))}o=r.index+s.length}return o<e.length&&n.push(e.slice(o)),n}function _u(e){const n=e.split(`
|
|
35
|
-
`),t=[];let o=0,r=0;for(;o<n.length;){const s=n[o];if(s.trimStart().startsWith("```")){const l=s.trimStart().slice(3).trim(),u=[];for(o++;o<n.length&&!n[o].trimStart().startsWith("```");)u.push(n[o]),o++;o++,t.push(a.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono my-3",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:a.jsx("code",{"data-language":l||void 0,children:u.join(`
|
|
36
|
-
`)
|
|
33
|
+
*/function Ar(e,t){return e?Nu(e)?w.createElement(e,t):e:null}function Nu(e){return Cu(e)||typeof e=="function"||ju(e)}function Cu(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function ju(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Su(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=w.useState(()=>({current:mu(t)})),[r,s]=w.useState(()=>n.current.initialState);return n.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{s(i),e.onStateChange==null||e.onStateChange(i)}})),n.current}function ku({columns:e,data:t,searchKey:n,searchPlaceholder:r="Search...",pageSize:s=10}){var g,v;const[a,i]=w.useState([]),[l,c]=w.useState([]),[d,h]=w.useState({}),[u,f]=w.useState({}),m=Su({data:t,columns:e,onSortingChange:i,onColumnFiltersChange:c,getCoreRowModel:gu(),getPaginationRowModel:bu(),getSortedRowModel:yu(),getFilteredRowModel:wu(),onColumnVisibilityChange:h,onRowSelectionChange:f,state:{sorting:a,columnFilters:l,columnVisibility:d,rowSelection:u},initialState:{pagination:{pageSize:s}}});return o.jsxs("div",{className:"space-y-4",children:[n&&o.jsx("div",{className:"flex items-center gap-2",children:o.jsx(Ke,{placeholder:r,value:((g=m.getColumn(n))==null?void 0:g.getFilterValue())??"",onChange:b=>{var p;return(p=m.getColumn(n))==null?void 0:p.setFilterValue(b.target.value)},className:"max-w-sm"})}),o.jsx("div",{className:"rounded-md border",children:o.jsxs(Un,{children:[o.jsx(Yn,{children:m.getHeaderGroups().map(b=>o.jsx(Ct,{children:b.headers.map(p=>o.jsx(Kn,{children:p.isPlaceholder?null:Ar(p.column.columnDef.header,p.getContext())},p.id))},b.id))}),o.jsx(Xn,{children:(v=m.getRowModel().rows)!=null&&v.length?m.getRowModel().rows.map(b=>o.jsx(Ct,{"data-state":b.getIsSelected()&&"selected",children:b.getVisibleCells().map(p=>o.jsx(Jt,{children:Ar(p.column.columnDef.cell,p.getContext())},p.id))},b.id)):o.jsx(Ct,{children:o.jsx(Jt,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})}),o.jsxs("div",{className:"flex items-center justify-between px-2",children:[o.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",m.getState().pagination.pageIndex+1," of"," ",m.getPageCount()]}),o.jsxs("div",{className:"flex items-center space-x-2",children:[o.jsxs(ge,{variant:"outline",size:"sm",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage(),children:[o.jsx(E.ChevronLeft,{className:"h-4 w-4"}),"Previous"]}),o.jsxs(ge,{variant:"outline",size:"sm",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage(),children:["Next",o.jsx(E.ChevronRight,{className:"h-4 w-4"})]})]})]})]})}function Ru({column:e,title:t,className:n}){return e.getCanSort()?o.jsxs(ge,{variant:"ghost",size:"sm",className:x("-ml-3 h-8",n),onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:[t,o.jsx(E.ArrowUpDown,{className:"ml-2 h-4 w-4"})]}):o.jsx("div",{className:x(n),children:t})}const Mu=new Set(["abstract","as","async","await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","instanceof","interface","let","new","null","of","package","private","protected","public","return","set","static","super","switch","this","throw","true","try","type","typeof","undefined","var","void","while","with","yield"]),_u=new Set(["display","flex","grid","none","block","inline","relative","absolute","fixed","sticky","hidden","visible","auto","inherit","initial","unset","important","solid","dashed","dotted","transparent","center","left","right","top","bottom","normal","bold","italic","nowrap","wrap"]);function Iu(e,t){const n=e.split(`
|
|
34
|
+
`),r=t==="css"||t==="scss"||t==="less",s=t==="html"||t==="xml"||t==="svg",a=t==="json",i=t==="bash"||t==="sh"||t==="shell"||t==="zsh";return n.map(l=>{const c=[];let d=0;const h=l.length*4;let u=0;for(;d<l.length&&u++<h;){if(!r&&!a&&l[d]==="/"&&l[d+1]==="/"){c.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(i&&l[d]==="#"){c.push({type:"comment",value:l.slice(d)}),d=l.length;continue}if(l[d]==="/"&&l[d+1]==="*"){const f=l.indexOf("*/",d+2);f!==-1?(c.push({type:"comment",value:l.slice(d,f+2)}),d=f+2):(c.push({type:"comment",value:l.slice(d)}),d=l.length);continue}if(l[d]==="`"){let f=d+1;for(;f<l.length&&l[f]!=="`";)l[f]==="\\"&&f++,f++;c.push({type:"string",value:l.slice(d,f+1)}),d=f+1;continue}if(l[d]==='"'||l[d]==="'"){const f=l[d];let m=d+1;for(;m<l.length&&l[m]!==f;)l[m]==="\\"&&m++,m++;c.push({type:"string",value:l.slice(d,m+1)}),d=m+1;continue}if(/[0-9]/.test(l[d])&&(d===0||/[\s,\(\[:=+\-*/<>!&|^~?{]/.test(l[d-1]))){let f=d;for(;f<l.length&&/[0-9a-fA-FxXoObB._eE+\-n]/.test(l[f]);)f++;c.push({type:"number",value:l.slice(d,f)}),d=f;continue}if(l[d]==="<"&&/[a-zA-Z\/!]/.test(l[d+1]||"")||l[d]==="/"&&l[d+1]===">"){if(l[d]==="/"&&l[d+1]===">"){c.push({type:"punctuation",value:"/>"}),d+=2;continue}const f=l[d+1]==="/";let m=f?d+2:d+1;for(;m<l.length&&/[a-zA-Z0-9.\-_]/.test(l[m]);)m++;c.push({type:"punctuation",value:l[d]+(f?"/":"")});const g=l.slice(f?d+2:d+1,m);g&&c.push({type:"tag",value:g}),d=m;continue}if(l[d]===">"){c.push({type:"punctuation",value:">"}),d++;continue}if(/[a-zA-Z_$@]/.test(l[d])){let f=d;for(;f<l.length&&/[a-zA-Z0-9_$@\-]/.test(l[f]);)f++;f===d&&f++;const m=l.slice(d,f);if(r&&_u.has(m))c.push({type:"keyword",value:m});else if(s||r){const g=l.slice(f).trimStart();g[0]==="="||g[0]===":"?c.push({type:"attr",value:m}):c.push({type:"plain",value:m})}else Mu.has(m)?c.push({type:"keyword",value:m}):!a&&l[f]==="("?c.push({type:"function",value:m}):!a&&/^[A-Z]/.test(m)?c.push({type:"tag",value:m}):c.push({type:"plain",value:m});d=f;continue}if(/[=+\-*/%<>!&|^~?:]/.test(l[d])){let f=d;for(;f<l.length&&/[=+\-*/%<>!&|^~?:]/.test(l[f]);)f++;c.push({type:"operator",value:l.slice(d,f)}),d=f;continue}if(/[{}()\[\],;.]/.test(l[d])){c.push({type:"punctuation",value:l[d]}),d++;continue}if(/\s/.test(l[d])){let f=d;for(;f<l.length&&/\s/.test(l[f]);)f++;c.push({type:"plain",value:l.slice(d,f)}),d=f;continue}c.push({type:"plain",value:l[d]}),d++}return c})}const Pu={comment:"var(--cb-comment, #6a9955)",string:"var(--cb-string, #ce9178)",keyword:"var(--cb-keyword, #569cd6)",number:"var(--cb-number, #b5cea8)",function:"var(--cb-function, #dcdcaa)",tag:"var(--cb-tag, #4ec9b0)",attr:"var(--cb-attr, #9cdcfe)",punctuation:"var(--cb-punctuation, #d4d4d4)",operator:"var(--cb-operator, #d4d4d4)",plain:"var(--cb-plain, #d4d4d4)"};function Du({code:e,language:t="tsx",showLineNumbers:n=!1,showCopy:r=!0,className:s}){const[a,i]=w.useState(!1),l=e.trim(),c=w.useMemo(()=>{try{return Iu(l,t)}catch{return l.split(`
|
|
35
|
+
`).map(h=>[{type:"plain",value:h}])}},[l,t]),d=async()=>{try{await navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return o.jsxs("div",{className:x("relative group",s),children:[r&&o.jsx("button",{type:"button",onClick:d,className:"absolute top-3 right-3 z-10 p-1.5 rounded-md bg-white/10 backdrop-blur text-white/60 hover:text-white opacity-0 group-hover:opacity-100 transition-opacity text-xs","aria-label":"Copy code",children:a?o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("polyline",{points:"20 6 9 17 4 12"})}):o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2"}),o.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]})}),o.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:c.map((h,u)=>o.jsxs("div",{children:[n&&o.jsx("span",{className:"inline-block w-8 select-none text-right mr-4 opacity-40",style:{color:"var(--cb-plain, #d4d4d4)"},children:u+1}),h.map((f,m)=>o.jsx("span",{style:{color:Pu[f.type]},children:f.value},m))]},u))})]})}const Sa=Fe("font-bold tracking-tight",{variants:{level:{1:"text-2xl lg:text-3xl",2:"text-xl lg:text-2xl",3:"text-lg lg:text-xl",4:"text-base lg:text-lg",5:"text-sm lg:text-base",6:"text-xs lg:text-sm"}},defaultVariants:{level:2}});function Tu({className:e,level:t=2,as:n,children:r,...s}){const a=n||`h${t}`;return o.jsx(a,{className:x(Sa({level:t}),e),...s,children:r})}const ka=Fe("",{variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},variant:{default:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",destructive:"text-destructive",success:"text-green-600 dark:text-green-400"},leading:{tight:"leading-tight",normal:"leading-normal",relaxed:"leading-relaxed"}},defaultVariants:{size:"base",weight:"normal",variant:"default",leading:"normal"}});function Fu({className:e,size:t,weight:n,variant:r,leading:s,as:a="p",children:i,...l}){return o.jsx(a,{className:x(ka({size:t,weight:n,variant:r,leading:s}),e),...l,children:i})}function Lu({className:e,...t}){return o.jsx("code",{className:x("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm",e),...t})}function Eu({className:e,...t}){return o.jsx("blockquote",{className:x("border-l-4 border-primary pl-4 italic text-muted-foreground",e),...t})}function Au({className:e,...t}){return o.jsx("p",{className:x("text-xl text-muted-foreground",e),...t})}function Vu({className:e,...t}){return o.jsx("p",{className:x("text-sm text-muted-foreground",e),...t})}const Ra=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("w-full h-full min-h-[300px]",e),...n,children:o.jsx(Ln.ResponsiveContainer,{width:"100%",height:"100%",children:t})}));Ra.displayName="ChartContainer";const $u=Ln.Tooltip,zu=Ln.Legend,Ma=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex flex-col space-y-4",e),...t}));Ma.displayName="Timeline";const _a=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative flex gap-4 pb-4 last:pb-0",e),...t}));_a.displayName="TimelineItem";const Ia=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("relative z-10 flex h-8 w-8 shrink-0 items-center justify-center rounded-full border bg-background text-primary shadow-sm",e),...t}));Ia.displayName="TimelineIcon";const Pa=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("absolute left-4 top-8 -bottom-4 w-px bg-border",e),...t}));Pa.displayName="TimelineConnector";const Da=w.forwardRef(({className:e,...t},n)=>o.jsx("div",{ref:n,className:x("flex-1 space-y-1 pt-1",e),...t}));Da.displayName="TimelineContent";const Ta=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("grid min-h-screen w-full lg:grid-cols-[280px_1fr]",e),...n,children:t}));Ta.displayName="AppShell";const Fa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("hidden border-r bg-muted/40 lg:block dark:bg-muted/10",e),...n,children:o.jsx("div",{className:"flex h-full max-h-screen flex-col gap-2",children:t})}));Fa.displayName="Sidebar";const La=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("header",{ref:r,className:x("flex h-14 items-center gap-4 border-b bg-background px-6 lg:h-[60px]",e),...n,children:t}));La.displayName="Header";const Ea=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("main",{ref:r,className:x("flex flex-1 flex-col gap-4 p-4 lg:gap-6 lg:p-6",e),...n,children:t}));Ea.displayName="Main";function Bu({title:e,value:t,description:n,trend:r,trendLabel:s,icon:a,className:i,...l}){return o.jsxs(Hn,{className:x("overflow-hidden",i),...l,children:[o.jsxs(Gn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[o.jsx(qn,{className:"text-sm font-medium text-muted-foreground",children:e}),a&&o.jsx("div",{className:"text-muted-foreground",children:a})]}),o.jsxs(Wn,{children:[o.jsx("div",{className:"text-2xl font-bold",children:t}),(n||r!==void 0)&&o.jsxs("div",{className:"text-xs flex items-center gap-1 mt-1 text-muted-foreground",children:[r!==void 0&&o.jsxs("span",{className:x("flex items-center font-medium",r>0?"text-green-500":r<0?"text-red-500":"text-muted-foreground"),children:[r>0?o.jsx(E.TrendingUp,{className:"mr-1 h-3 w-3"}):r<0?o.jsx(E.TrendingDown,{className:"mr-1 h-3 w-3"}):o.jsx(E.Minus,{className:"mr-1 h-3 w-3"}),r>0?"+":"",r,"%"]}),s&&o.jsx("span",{children:s}),n&&!r&&o.jsx("span",{children:n})]})]})]})}const Aa=w.forwardRef(({className:e,label:t,value:n,...r},s)=>{const[a,i]=w.useState(!1),l=()=>{navigator.clipboard.writeText(n),i(!0),setTimeout(()=>i(!1),2e3)};return o.jsxs("div",{className:"space-y-2",children:[t&&o.jsx(rn,{children:t}),o.jsxs("div",{className:"flex gap-2 relative",children:[o.jsx(Ke,{ref:s,value:n,readOnly:!0,className:x("pr-10 font-mono text-sm",e),...r}),o.jsx(ge,{size:"icon",variant:"outline",className:"shrink-0",onClick:l,children:a?o.jsx(E.Check,{className:"h-4 w-4 text-green-500"}):o.jsx(E.Copy,{className:"h-4 w-4"})})]})]})});Aa.displayName="CopyInput";const Va=w.forwardRef(({className:e,data:t,...n},r)=>o.jsx("pre",{ref:r,className:x("rounded-lg border bg-muted p-4 overflow-auto text-xs font-mono text-muted-foreground",e),...n,children:JSON.stringify(t,null,2)}));Va.displayName="JsonViewer";const Ou=Fe("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{status:{neutral:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"border-transparent bg-green-500/15 text-green-700 dark:text-green-400 hover:bg-green-500/25",warning:"border-transparent bg-yellow-500/15 text-yellow-700 dark:text-yellow-400 hover:bg-yellow-500/25",error:"border-transparent bg-red-500/15 text-red-700 dark:text-red-400 hover:bg-red-500/25",info:"border-transparent bg-blue-500/15 text-blue-700 dark:text-blue-400 hover:bg-blue-500/25"}},defaultVariants:{status:"neutral"}});function Hu({className:e,status:t,dot:n=!0,children:r,...s}){return o.jsxs("div",{className:x(Ou({status:t}),e),...s,children:[n&&o.jsx("span",{className:x("mr-1.5 h-2 w-2 rounded-full",{"bg-current":!0})}),r]})}function Gu({className:e}){const{setTheme:t}=on();return o.jsxs(ns,{children:[o.jsx(rs,{asChild:!0,children:o.jsxs(ge,{variant:"outline",size:"icon",className:e,children:[o.jsx(E.Sun,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),o.jsx(E.Moon,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),o.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),o.jsxs(ar,{align:"end",children:[o.jsxs(jt,{onClick:()=>t("light"),children:[o.jsx(E.Sun,{className:"mr-2 h-4 w-4"}),"Light"]}),o.jsxs(jt,{onClick:()=>t("dark"),children:[o.jsx(E.Moon,{className:"mr-2 h-4 w-4"}),"Dark"]}),o.jsxs(jt,{onClick:()=>t("system"),children:[o.jsx(E.Monitor,{className:"mr-2 h-4 w-4"}),"System"]})]})]})}const qu=[{value:"light",icon:E.Sun,label:"Light"},{value:"dark",icon:E.Moon,label:"Dark"},{value:"system",icon:E.Monitor,label:"System"}];function Wu({className:e}){const{theme:t,setTheme:n,themes:r}=on();return o.jsx("div",{className:x("inline-flex items-center rounded-lg border border-border bg-muted/50 p-0.5 gap-0.5",e),role:"radiogroup","aria-label":"Color theme",children:qu.filter(s=>r.includes(s.value)).map(({value:s,icon:a,label:i})=>o.jsxs("button",{role:"radio","aria-checked":t===s,"aria-label":i,onClick:()=>n(s),className:x("inline-flex items-center justify-center rounded-md px-2.5 py-1.5 text-sm font-medium transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t===s?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"),children:[o.jsx(a,{className:"h-4 w-4"}),o.jsx("span",{className:"sr-only",children:i})]},s))})}const $a=w.forwardRef(({className:e,variant:t="received",children:n,...r},s)=>o.jsx("div",{ref:s,className:x("group flex gap-2 max-w-[85%]",t==="sent"?"ml-auto flex-row-reverse":"mr-auto",e),"data-variant":t,...r,children:n}));$a.displayName="ChatBubble";const za=w.forwardRef(({className:e,src:t,fallback:n,...r},s)=>o.jsx("div",{ref:s,className:x("flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",e),...r,children:t?o.jsx("img",{src:t,alt:n??"avatar",className:"h-full w-full object-cover"}):o.jsx("span",{children:n??"?"})}));za.displayName="ChatBubbleAvatar";const Uu={sending:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 6v6l4 2"})]}),sent:o.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:o.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:o.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]})},Ba=w.forwardRef(({className:e,variant:t="received",isLoading:n,status:r,children:s,...a},i)=>o.jsx("div",{ref:i,className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",t==="sent"?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md",e),...a,children:n?o.jsxs("div",{className:"flex items-center gap-1 py-1",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):o.jsxs(o.Fragment,{children:[s,r&&o.jsx("div",{className:"flex justify-end mt-1",children:Uu[r]})]})}));Ba.displayName="ChatBubbleMessage";const Oa=w.forwardRef(({className:e,...t},n)=>o.jsx("span",{ref:n,className:x("text-[10px] text-muted-foreground mt-1 px-1",e),...t}));Oa.displayName="ChatBubbleTimestamp";const Ha=w.forwardRef(({visibility:e="hover",className:t,children:n,...r},s)=>o.jsx("div",{ref:s,className:x("flex items-center gap-0.5 mt-0.5",e==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",t),...r,children:n}));Ha.displayName="ChatBubbleActions";const Ga=w.forwardRef(({onSend:e,placeholder:t="Type a message...",disabled:n,isLoading:r,showAttach:s,onAttach:a,acceptFiles:i="*",onStop:l,value:c,onChange:d,headerSlot:h,footerSlot:u,maxLength:f,className:m},g)=>{const v=w.useRef(null),b=w.useRef(null),[p,y]=w.useState(""),N=c!==void 0,S=N?c:p,M=k=>{N?d==null||d(k):y(k)},R=()=>{const k=v.current;k&&(k.style.height="auto",k.style.height=Math.min(k.scrollHeight,160)+"px")},T=()=>{const k=S.trim();!k||n||r||(e==null||e(k),M(""),v.current&&(v.current.style.height="auto"))},j=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),T())},F=()=>{var k;(k=b.current)==null||k.click()},W=k=>{k.target.files&&k.target.files.length>0&&(a==null||a(k.target.files)),k.target.value=""},H=S.length,K=f?H>f:!1;return o.jsxs("div",{ref:g,className:x("rounded-xl border border-border bg-background",m),children:[h&&o.jsx("div",{className:"px-3 pt-2 pb-1 border-b border-border/40",children:h}),o.jsxs("div",{className:"flex items-end gap-2 p-2",children:[s&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",onClick:F,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"Attach file",disabled:n,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})})}),o.jsx("input",{ref:b,type:"file",multiple:!0,accept:i,onChange:W,className:"hidden","aria-hidden":"true"})]}),o.jsx("textarea",{ref:v,value:S,onChange:k=>{M(k.target.value),R()},onKeyDown:j,placeholder:t,disabled:n||r,rows:1,className:"flex-1 resize-none bg-transparent text-sm outline-none placeholder:text-muted-foreground min-h-[36px] py-2 px-2 max-h-40"}),r&&l?o.jsx("button",{type:"button",onClick:l,className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-destructive/10 text-destructive hover:bg-destructive/20 transition-colors","aria-label":"Stop generating",children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}):o.jsx("button",{type:"button",onClick:T,disabled:n||r||!S.trim()||K,className:x("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition-colors",S.trim()&&!n&&!r&&!K?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),"aria-label":"Send message",children:r?o.jsx("svg",{className:"animate-spin",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"m5 12 7-7 7 7"}),o.jsx("path",{d:"M12 19V5"})]})})]}),(u||f)&&o.jsxs("div",{className:"px-3 pb-2 pt-0.5 flex items-center gap-2",children:[o.jsx("div",{className:"flex-1",children:u}),f&&o.jsxs("span",{className:x("text-[10px] tabular-nums shrink-0",K?"text-destructive font-medium":"text-muted-foreground"),children:[H,"/",f]})]})]})});Ga.displayName="ChatInput";const qa=w.forwardRef(({className:e,children:t,...n},r)=>o.jsx("div",{ref:r,className:x("flex flex-col h-full",e),...n,children:t}));qa.displayName="ChatContainer";const Wa=w.forwardRef(({className:e,children:t,autoScroll:n=!0,...r},s)=>{const a=w.useRef(null),i=w.Children.count(t);return w.useEffect(()=>{n&&a.current&&a.current.scrollIntoView({behavior:"smooth"})},[i,n]),o.jsx(Zn,{className:"flex-1",orientation:"vertical",children:o.jsxs("div",{ref:s,className:x("flex flex-col gap-4 p-4",e),...r,children:[t,o.jsx("div",{ref:a})]})})});Wa.displayName="ChatList";const Ua=w.forwardRef(({className:e,variant:t="dots",text:n="Thinking",...r},s)=>t==="text"?o.jsxs("div",{ref:s,className:x("flex items-center gap-1.5 text-sm text-muted-foreground",e),...r,children:[o.jsx("svg",{className:"animate-spin h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),o.jsxs("span",{className:"animate-pulse",children:[n,"…"]})]}):o.jsxs("div",{ref:s,className:x("flex items-center gap-1",e),...r,children:[o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-2 w-2 rounded-full bg-muted-foreground/60 animate-bounce [animation-delay:300ms]"})]}));Ua.displayName="AILoading";function tt(e){const t=[],n=/(`[^`]+`)|(\~\~[^~]+\~\~)|(\*\*[^*]+\*\*)|(\*[^*]+\*)|(!\[[^\]]*\]\([^)]+\))|(\[[^\]]+\]\([^)]+\))/g;let r=0,s;for(;(s=n.exec(e))!==null;){s.index>r&&t.push(e.slice(r,s.index));const a=s[0];if(a.startsWith("`"))t.push(o.jsx("code",{className:"px-1 py-0.5 rounded bg-muted text-sm font-mono",children:a.slice(1,-1)},s.index));else if(a.startsWith("~~"))t.push(o.jsx("del",{className:"text-muted-foreground",children:a.slice(2,-2)},s.index));else if(a.startsWith("**"))t.push(o.jsx("strong",{children:a.slice(2,-2)},s.index));else if(a.startsWith("*"))t.push(o.jsx("em",{children:a.slice(1,-1)},s.index));else if(a.startsWith("![")){const i=a.indexOf("]"),l=a.slice(2,i),c=a.slice(i+2,-1);t.push(o.jsx("img",{src:c,alt:l,className:"max-w-full rounded-lg my-2 inline-block",loading:"lazy"},s.index))}else if(a.startsWith("[")){const i=a.indexOf("]"),l=a.slice(1,i),c=a.slice(i+2,-1);t.push(o.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline underline-offset-2 hover:text-primary/80",children:l},s.index))}r=s.index+a.length}return r<e.length&&t.push(e.slice(r)),t}function Yu(e){const t=e.split(`
|
|
36
|
+
`),n=[];let r=0,s=0;for(;r<t.length;){const a=t[r];if(a.trimStart().startsWith("```")){const l=a.trimStart().slice(3).trim(),c=[];for(r++;r<t.length&&!t[r].trimStart().startsWith("```");)c.push(t[r]),r++;r++,n.push(o.jsx("pre",{className:"overflow-x-auto rounded-lg p-4 text-[13px] leading-relaxed font-mono my-3",style:{background:"var(--cb-bg, #1e1e2e)",color:"var(--cb-plain, #d4d4d4)"},children:o.jsx("code",{"data-language":l||void 0,children:c.join(`
|
|
37
|
+
`)})},s++));continue}const i=a.match(/^(#{1,6})\s+(.*)/);if(i){const l=i[1].length,c=i[2],d=`h${l}`,h={1:"text-2xl font-bold mt-6 mb-3",2:"text-xl font-semibold mt-5 mb-2",3:"text-lg font-semibold mt-4 mb-2",4:"text-base font-semibold mt-3 mb-1",5:"text-sm font-semibold mt-2 mb-1",6:"text-sm font-medium mt-2 mb-1"};n.push(o.jsx(d,{className:h[l],children:tt(c)},s++)),r++;continue}if(/^[\s]*[-*]\s/.test(a)){const l=[];for(;r<t.length&&/^[\s]*[-*]\s/.test(t[r]);)l.push(o.jsx("li",{children:tt(t[r].replace(/^[\s]*[-*]\s/,""))},s++)),r++;n.push(o.jsx("ul",{className:"list-disc pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(/^\s*\d+\.\s/.test(a)){const l=[];for(;r<t.length&&/^\s*\d+\.\s/.test(t[r]);)l.push(o.jsx("li",{children:tt(t[r].replace(/^\s*\d+\.\s/,""))},s++)),r++;n.push(o.jsx("ol",{className:"list-decimal pl-5 space-y-1 my-2 text-sm",children:l},s++));continue}if(a.startsWith(">")){const l=[];for(;r<t.length&&t[r].startsWith(">");)l.push(t[r].replace(/^>\s?/,"")),r++;n.push(o.jsx("blockquote",{className:"border-l-4 border-primary/40 pl-4 italic text-muted-foreground my-3 text-sm",children:tt(l.join(" "))},s++));continue}if(a.includes("|")&&r+1<t.length&&/^\s*\|?[\s\-:|]+\|/.test(t[r+1])){const l=[];for(;r<t.length&&t[r].includes("|");)l.push(t[r]),r++;if(l.length>=2){const c=u=>u.split("|").map(f=>f.trim()).filter((f,m,g)=>m>0&&m<g.length),d=c(l[0]),h=l.slice(2).map(c);n.push(o.jsx("div",{className:"overflow-x-auto my-3",children:o.jsxs("table",{className:"w-full text-sm border-collapse",children:[o.jsx("thead",{children:o.jsx("tr",{className:"border-b border-border",children:d.map((u,f)=>o.jsx("th",{className:"px-3 py-2 text-left font-semibold text-foreground",children:tt(u)},f))})}),o.jsx("tbody",{children:h.map((u,f)=>o.jsx("tr",{className:"border-b border-border/50",children:u.map((m,g)=>o.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:tt(m)},g))},f))})]})},s++));continue}}if(/^[-*_]{3,}\s*$/.test(a)){n.push(o.jsx("hr",{className:"my-4 border-border"},s++)),r++;continue}if(a.trim()===""){r++;continue}n.push(o.jsx("p",{className:"text-sm leading-relaxed my-2",children:tt(a)},s++)),r++}return n}const Ya=w.forwardRef(({content:e,streaming:t,className:n,...r},s)=>{const a=t?e:e.trim(),i=w.useMemo(()=>{try{return Yu(a)}catch{return[w.createElement("p",{className:"text-sm"},a)]}},[a]);return o.jsx("div",{ref:s,className:x("markdown-renderer",n),...r,children:i})});Ya.displayName="MarkdownRenderer";const Xa=w.forwardRef(({suggestions:e,onSelect:t,columns:n=2,className:r,...s},a)=>{const i={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"};return o.jsx("div",{ref:a,className:x("grid gap-3",i[n],r),...s,children:e.map((l,c)=>o.jsxs("button",{type:"button",onClick:()=>t==null?void 0:t(l.prompt),className:x("flex flex-col items-start gap-1 rounded-xl border border-border p-4","bg-card text-left transition-colors hover:bg-muted/60 hover:border-primary/30","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),children:[o.jsx("span",{className:"text-sm font-medium text-foreground",children:l.title}),l.description&&o.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:l.description})]},c))})});Xa.displayName="PromptSuggestions";const Ka=w.forwardRef(({models:e,value:t,onChange:n,placeholder:r="Select model",compact:s,className:a,...i},l)=>{const[c,d]=w.useState(!1),[h,u]=w.useState(""),f=w.useRef(null),m=w.useRef(null),g=e.find(p=>p.id===t),v=w.useMemo(()=>{if(!h)return e;const p=h.toLowerCase();return e.filter(y=>{var N;return y.name.toLowerCase().includes(p)||((N=y.provider)==null?void 0:N.toLowerCase().includes(p))||y.id.toLowerCase().includes(p)})},[e,h]);w.useEffect(()=>{c&&(u(""),setTimeout(()=>{var p;return(p=m.current)==null?void 0:p.focus()},0))},[c]),w.useEffect(()=>{if(!c)return;const p=y=>{f.current&&!f.current.contains(y.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[c]);const b=p=>{p.key==="Escape"&&d(!1)};return o.jsxs("div",{ref:f,className:x("relative",a),...i,children:[o.jsxs("button",{ref:l,type:"button",onClick:()=>d(p=>!p),className:x("flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-1.5 text-sm transition-colors hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",!g&&"text-muted-foreground"),children:[g?o.jsxs(o.Fragment,{children:[g.icon&&o.jsx("span",{className:"text-base shrink-0",children:g.icon}),o.jsx("span",{className:"font-medium truncate",children:g.name}),!s&&g.provider&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",g.provider,")"]})]}):o.jsx("span",{children:r}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform",c&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),c&&o.jsxs("div",{className:"absolute z-50 mt-1 w-full min-w-[260px] rounded-xl border border-border bg-popover shadow-lg animate-in fade-in-0 zoom-in-95",onKeyDown:b,children:[o.jsx("div",{className:"p-2 border-b border-border",children:o.jsx("input",{ref:m,value:h,onChange:p=>u(p.target.value),placeholder:"Search models...",className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground px-2 py-1"})}),o.jsxs("div",{className:"max-h-[280px] overflow-auto p-1",children:[v.length===0&&o.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No models found"}),v.map(p=>o.jsxs("button",{type:"button",disabled:p.disabled,onClick:()=>{n==null||n(p.id),d(!1)},className:x("flex w-full items-start gap-3 rounded-lg px-3 py-2.5 text-left text-sm transition-colors","hover:bg-muted focus-visible:outline-none focus-visible:bg-muted",p.id===t&&"bg-primary/10",p.disabled&&"opacity-50 cursor-not-allowed"),children:[p.icon&&o.jsx("span",{className:"text-lg shrink-0 mt-0.5",children:p.icon}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-medium truncate",children:p.name}),p.id===t&&o.jsx("svg",{className:"h-4 w-4 text-primary shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})})]}),p.provider&&o.jsx("span",{className:"text-xs text-muted-foreground",children:p.provider}),p.description&&o.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:p.description}),p.badges&&p.badges.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-1.5",children:p.badges.map(y=>o.jsx("span",{className:"inline-flex items-center rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:y},y))})]})]},p.id))]})]})]})});Ka.displayName="ModelSelector";const Za=w.forwardRef(({modes:e,value:t,onChange:n,size:r="default",className:s,...a},i)=>o.jsx("div",{ref:i,className:x("inline-flex items-center gap-1 rounded-lg bg-muted/50 p-1",s),role:"radiogroup",...a,children:e.map(l=>{const c=l.id===t;return o.jsxs("button",{type:"button",role:"radio","aria-checked":c,onClick:()=>n==null?void 0:n(l.id),title:l.description,className:x("rounded-md transition-all text-sm font-medium whitespace-nowrap","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5",c?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.icon&&o.jsx("span",{className:"mr-1",children:l.icon}),l.label]},l.id)})}));Za.displayName="ChatModeSelector";const Ja=w.forwardRef(({question:e,options:t,onSelect:n,selected:r,allowFreeText:s,onFreeTextSubmit:a,columns:i=1,className:l,...c},d)=>{const[h,u]=w.useState(""),f=!!r,m=()=>{const g=h.trim();g&&(a==null||a(g),u(""))};return o.jsxs("div",{ref:d,className:x("rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3 max-w-[85%]",l),...c,children:[o.jsx("p",{className:"text-sm leading-relaxed mb-3",children:e}),o.jsx("div",{className:x("grid gap-2",i===2?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:t.map(g=>{const v=g.id===r;return o.jsxs("button",{type:"button",disabled:f,onClick:()=>n==null?void 0:n(g.id,g.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",v?"border-primary bg-primary/10 text-primary font-medium":f?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[v&&o.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),!v&&o.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",f?"border-border/50":"border-border")}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{className:"block truncate",children:g.label}),g.description&&o.jsx("span",{className:"block text-xs text-muted-foreground mt-0.5 line-clamp-1",children:g.description})]})]},g.id)})}),s&&!f&&o.jsxs("div",{className:"flex gap-2 mt-2",children:[o.jsx("input",{type:"text",value:h,onChange:g=>u(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m()},placeholder:"Or type your answer...",className:"flex-1 bg-background rounded-lg border border-border px-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:border-primary/40"}),o.jsx("button",{type:"button",onClick:m,disabled:!h.trim(),className:x("rounded-lg px-3 py-1.5 text-sm font-medium transition-colors",h.trim()?"bg-primary text-primary-foreground hover:bg-primary/90":"bg-muted text-muted-foreground cursor-not-allowed"),children:"Send"})]})]})});Ja.displayName="ChatFollowUp";const Xu={copy:{path:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"},retry:{path:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8 M3 3v5h5"},edit:{path:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"},like:{path:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"},dislike:{path:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"},share:{path:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8 M16 6l-4-4-4 4 M12 2v13"}},Vr={copy:"Copy",retry:"Retry",edit:"Edit",like:"Like",dislike:"Dislike",share:"Share"},Qa=w.forwardRef(({actions:e=["copy"],content:t,likeState:n,onCopy:r,onRetry:s,onEdit:a,onLike:i,onDislike:l,onShare:c,visibility:d="hover",className:h,...u},f)=>{const[m,g]=w.useState(!1),b={copy:async()=>{if(t)try{await navigator.clipboard.writeText(t),g(!0),setTimeout(()=>g(!1),2e3)}catch{}r==null||r()},retry:s,edit:a,like:i,dislike:l,share:c};return o.jsx("div",{ref:f,className:x("flex items-center gap-0.5",d==="hover"&&"opacity-0 group-hover:opacity-100 transition-opacity",h),...u,children:e.map(p=>{const y=p==="copy"&&m,M=p==="like"&&n==="liked"||p==="dislike"&&n==="disliked";return o.jsx("button",{type:"button",onClick:b[p],"aria-label":Vr[p],title:y?"Copied!":Vr[p],className:x("inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors","text-muted-foreground hover:text-foreground hover:bg-muted","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",M&&"text-primary",y&&"text-green-500"),children:y?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:M?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:Xu[p].path})})},p)})})});Qa.displayName="MessageActions";const ei=w.forwardRef(({text:e,speed:t=2,onComplete:n,cursor:r=!0,immediate:s=!1,className:a,...i},l)=>{const[c,d]=w.useState(s?e:""),[h,u]=w.useState(s),f=w.useRef(e),m=w.useRef(),g=w.useRef(s?e.length:0);return w.useEffect(()=>{if(e!==f.current){if(f.current=e,s){d(e),u(!0),g.current=e.length;return}e.startsWith(c)||(g.current=0,d("")),u(!1)}},[e,s,c]),w.useEffect(()=>{if(s||h)return;const v=()=>{const b=Math.min(g.current+t,e.length);g.current=b,d(e.slice(0,b)),b>=e.length?(u(!0),n==null||n()):m.current=requestAnimationFrame(v)};return m.current=requestAnimationFrame(v),()=>{m.current&&cancelAnimationFrame(m.current)}},[e,t,s,h,n]),o.jsxs("span",{ref:l,className:x("whitespace-pre-wrap",a),...i,children:[c,r&&!h&&o.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-foreground ml-px align-text-bottom animate-pulse"})]})});ei.displayName="StreamingText";const ti=w.forwardRef(({content:e,isThinking:t,duration:n,defaultOpen:r=!1,title:s="Reasoning",className:a,...i},l)=>{const[c,d]=w.useState(r||t===!0),[h,u]=w.useState(n??0),f=w.useRef(Date.now());w.useEffect(()=>{t&&d(!0)},[t]),w.useEffect(()=>{if(!t)return;f.current=Date.now();const v=setInterval(()=>{u(Math.floor((Date.now()-f.current)/1e3))},1e3);return()=>clearInterval(v)},[t]);const m=t?h:n??h,g=v=>v<60?`${v}s`:`${Math.floor(v/60)}m ${v%60}s`;return o.jsxs("div",{ref:l,className:x("rounded-xl border border-border/60 overflow-hidden my-2",t&&"border-primary/30",a),...i,children:[o.jsxs("button",{type:"button",onClick:()=>d(v=>!v),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",t&&"bg-primary/5"),children:[o.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",t&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),o.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}),o.jsx("path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"}),o.jsx("path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}),o.jsx("path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}),o.jsx("path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}),o.jsx("path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}),o.jsx("path",{d:"M6 18a4 4 0 0 1-1.967-.516"}),o.jsx("path",{d:"M19.967 17.484A4 4 0 0 1 18 18"})]}),o.jsx("span",{className:x("font-medium",t&&"text-primary animate-pulse"),children:t?"Thinking":s}),m>0&&o.jsx("span",{className:"text-xs text-muted-foreground",children:t?`${g(m)}...`:`Thought for ${g(m)}`}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",c&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),c&&o.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:o.jsx("div",{className:"border-l-2 border-primary/20 pl-3",children:o.jsxs("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap",children:[e,t&&o.jsx("span",{className:"inline-block w-[2px] h-[1em] bg-muted-foreground ml-px align-text-bottom animate-pulse"})]})})})]})});ti.displayName="ReasoningBlock";const ni=w.forwardRef(({name:e,args:t,result:n,status:r,error:s,defaultOpen:a=!1,className:i,...l},c)=>{const[d,h]=w.useState(a),u={running:o.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}),success:o.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),error:o.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})},f={running:`Calling ${e}...`,success:e,error:`${e} — failed`};return o.jsxs("div",{ref:c,className:x("rounded-xl border overflow-hidden my-1",r==="error"?"border-destructive/30":"border-border/60",i),...l,children:[o.jsxs("button",{type:"button",onClick:()=>h(m=>!m),className:x("flex items-center gap-2 w-full px-3 py-2 text-sm transition-colors","hover:bg-muted/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),u[r],o.jsx("span",{className:x("font-medium font-mono text-xs",r==="running"&&"text-primary",r==="error"&&"text-destructive"),children:f[r]}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto shrink-0 text-muted-foreground transition-transform duration-200",d&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),d&&o.jsxs("div",{className:"border-t border-border/40 text-xs",children:[t&&Object.keys(t).length>0&&o.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:"Arguments"}),o.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:JSON.stringify(t,null,2)})]}),n&&o.jsxs("div",{className:x("px-3 py-2",t&&"border-t border-border/30"),children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:"Result"}),o.jsx("pre",{className:"overflow-x-auto font-mono text-foreground/80 whitespace-pre-wrap",children:n})]}),s&&o.jsxs("div",{className:x("px-3 py-2 bg-destructive/5",t&&"border-t border-border/30"),children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:"Error"}),o.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})});ni.displayName="ChatToolCall";function Ku(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n.getTime()-864e5),s=new Date(n.getTime()-7*864e5),a=[{label:"Today",items:[]},{label:"Yesterday",items:[]},{label:"Previous 7 days",items:[]},{label:"Older",items:[]}],i=[...e].sort((l,c)=>c.updatedAt.getTime()-l.updatedAt.getTime());for(const l of i){const c=l.updatedAt;c>=n?a[0].items.push(l):c>=r?a[1].items.push(l):c>=s?a[2].items.push(l):a[3].items.push(l)}return a.filter(l=>l.items.length>0)}const ri=w.forwardRef(({conversations:e,activeId:t,onSelect:n,onNew:r,onDelete:s,onRename:a,showSearch:i=!0,className:l,...c},d)=>{const[h,u]=w.useState(""),[f,m]=w.useState(null),[g,v]=w.useState(""),b=w.useRef(null),p=w.useMemo(()=>{if(!h)return e;const M=h.toLowerCase();return e.filter(R=>{var T;return R.title.toLowerCase().includes(M)||((T=R.lastMessage)==null?void 0:T.toLowerCase().includes(M))})},[e,h]),y=w.useMemo(()=>Ku(p),[p]),N=M=>{m(M.id),v(M.title),setTimeout(()=>{var R;return(R=b.current)==null?void 0:R.focus()},0)},S=()=>{f&&g.trim()&&(a==null||a(f,g.trim())),m(null)};return o.jsxs("div",{ref:d,className:x("flex flex-col h-full",l),...c,children:[r&&o.jsx("div",{className:"p-3 border-b border-border shrink-0",children:o.jsxs("button",{type:"button",onClick:r,className:x("flex items-center justify-center gap-2 w-full rounded-lg border border-border px-3 py-2 text-sm font-medium","transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M5 12h14"}),o.jsx("path",{d:"M12 5v14"})]}),"New Chat"]})}),i&&o.jsx("div",{className:"px-3 pt-3 pb-2 shrink-0",children:o.jsxs("div",{className:"relative",children:[o.jsxs("svg",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"11",cy:"11",r:"8"}),o.jsx("path",{d:"m21 21-4.3-4.3"})]}),o.jsx("input",{value:h,onChange:M=>u(M.target.value),placeholder:"Search conversations...",className:"w-full bg-muted/50 rounded-lg pl-8 pr-3 py-1.5 text-sm outline-none placeholder:text-muted-foreground focus:bg-muted"})]})}),o.jsxs("div",{className:"flex-1 overflow-auto px-2 py-1",children:[y.length===0&&o.jsx("div",{className:"px-3 py-8 text-center text-sm text-muted-foreground",children:h?"No conversations found":"No conversations yet"}),y.map(M=>o.jsxs("div",{className:"mb-3",children:[o.jsx("div",{className:"px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:M.label}),M.items.map(R=>{const T=R.id===t,j=R.id===f;return o.jsxs("div",{className:x("group flex items-center gap-2 rounded-lg px-2 py-2 cursor-pointer transition-colors",T?"bg-primary/10":"hover:bg-muted"),onClick:()=>!j&&(n==null?void 0:n(R.id)),children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"})}),o.jsx("div",{className:"flex-1 min-w-0",children:j?o.jsx("input",{ref:b,value:g,onChange:F=>v(F.target.value),onBlur:S,onKeyDown:F=>{F.key==="Enter"&&S(),F.key==="Escape"&&m(null)},className:"w-full bg-background border border-border rounded px-1 py-0.5 text-sm outline-none",onClick:F=>F.stopPropagation()}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-sm truncate font-medium",children:R.title}),R.lastMessage&&o.jsx("div",{className:"text-xs text-muted-foreground truncate",children:R.lastMessage})]})}),!j&&o.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[a&&o.jsx("button",{type:"button",onClick:F=>{F.stopPropagation(),N(R)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Rename",children:o.jsx("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),s&&o.jsx("button",{type:"button",onClick:F=>{F.stopPropagation(),s(R.id)},className:"h-6 w-6 flex items-center justify-center rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10","aria-label":"Delete",children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 6h18"}),o.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),o.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]})]},R.id)})]},M.label))]})]})});ri.displayName="ConversationList";const Zu={online:"bg-green-500",offline:"bg-muted-foreground/40",typing:"bg-primary animate-pulse"},Ju={online:"Online",offline:"Offline",typing:"Typing..."},oi=w.forwardRef(({title:e,model:t,modelIcon:n,status:r,onClear:s,onSettings:a,onBack:i,children:l,className:c,...d},h)=>o.jsxs("div",{ref:h,className:x("flex items-center gap-3 px-4 h-14 border-b border-border shrink-0 bg-background",c),...d,children:[i&&o.jsx("button",{type:"button",onClick:i,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors -ml-1 shrink-0","aria-label":"Back",children:o.jsx("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m15 18-6-6 6-6"})})}),n&&o.jsx("span",{className:"text-xl shrink-0",children:n}),o.jsxs("div",{className:"flex-1 min-w-0",children:[e&&o.jsx("div",{className:"text-sm font-semibold truncate",children:e}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[t&&o.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t}),r&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:x("h-1.5 w-1.5 rounded-full shrink-0",Zu[r])}),o.jsx("span",{className:"text-[10px] text-muted-foreground",children:Ju[r]})]})]})]}),l,o.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s&&o.jsx("button",{type:"button",onClick:s,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 6h18"}),o.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),o.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})}),a&&o.jsx("button",{type:"button",onClick:a,className:"h-8 w-8 flex items-center justify-center rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted transition-colors","aria-label":"Settings",title:"Settings",children:o.jsxs("svg",{className:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]})]}));oi.displayName="ChatHeader";const wr=w.forwardRef(({citation:e,className:t,...n},r)=>{const[s,a]=w.useState(!1);return o.jsxs("span",{className:"relative inline-block",children:[o.jsx("button",{ref:r,type:"button",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),onClick:()=>window.open(e.url,"_blank","noopener"),className:x("inline-flex items-center justify-center h-4 min-w-[16px] px-1 rounded text-[10px] font-medium","bg-primary/15 text-primary hover:bg-primary/25 transition-colors cursor-pointer","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","align-super",t),"aria-label":`Source ${e.index}: ${e.title}`,...n,children:e.index}),s&&o.jsxs("div",{className:"absolute z-50 bottom-full left-1/2 -translate-x-1/2 mb-2 w-64 rounded-lg border border-border bg-popover shadow-lg p-3 text-left animate-in fade-in-0 zoom-in-95",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[e.favicon&&o.jsx("img",{src:e.favicon,alt:"",className:"h-4 w-4 mt-0.5 shrink-0 rounded"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:e.title}),o.jsx("div",{className:"text-[10px] text-muted-foreground truncate",children:e.url}),e.snippet&&o.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.snippet})]})]}),o.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-4 border-transparent border-t-border"})]})]})});wr.displayName="CitationBadge";const si=w.forwardRef(({citations:e,variant:t="footer",className:n,...r},s)=>t==="inline"?o.jsx("span",{ref:s,className:x("inline",n),...r,children:e.map(a=>o.jsx(wr,{citation:a},a.index))}):o.jsxs("div",{ref:s,className:x("border-t border-border/50 pt-3 mt-3 space-y-2",n),...r,children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold mb-2",children:"Sources"}),e.map(a=>o.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:x("flex items-start gap-2.5 rounded-lg border border-border/60 p-2.5 transition-colors","hover:bg-muted/50 hover:border-primary/30"),children:[o.jsx("span",{className:"flex items-center justify-center h-5 w-5 rounded bg-primary/15 text-primary text-[10px] font-semibold shrink-0 mt-0.5",children:a.index}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[a.favicon&&o.jsx("img",{src:a.favicon,alt:"",className:"h-3.5 w-3.5 rounded shrink-0"}),o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title})]}),o.jsx("span",{className:"text-[10px] text-muted-foreground truncate block",children:a.url}),a.snippet&&o.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:a.snippet})]})]},a.index))]}));si.displayName="SourceCitation";function $r(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function zr(e){return e.startsWith("image/")}function Br(e){return e.startsWith("image/")?"🖼️":e.startsWith("video/")?"🎬":e.startsWith("audio/")?"🎵":e.includes("pdf")?"📄":e.includes("zip")||e.includes("rar")||e.includes("tar")?"📦":e.includes("json")||e.includes("xml")||e.includes("csv")?"📊":e.includes("text")||e.includes("javascript")||e.includes("typescript")?"📝":"📎"}const ai=w.forwardRef(({files:e,onRemove:t,variant:n="compact",className:r,...s},a)=>e.length===0?null:n==="grid"?o.jsx("div",{ref:a,className:x("grid grid-cols-2 gap-2",r),...s,children:e.map((i,l)=>o.jsxs("div",{className:"group relative rounded-xl border border-border overflow-hidden bg-muted/30",children:[zr(i.type)&&(i.thumbnail||i.url)?o.jsx("div",{className:"aspect-square",children:o.jsx("img",{src:i.thumbnail||i.url,alt:i.name,className:"h-full w-full object-cover"})}):o.jsx("div",{className:"aspect-square flex items-center justify-center text-3xl bg-muted/50",children:Br(i.type)}),o.jsxs("div",{className:"px-2 py-1.5 border-t border-border/40",children:[o.jsx("div",{className:"text-xs font-medium truncate",children:i.name}),o.jsx("div",{className:"text-[10px] text-muted-foreground",children:$r(i.size)})]}),t&&o.jsx("button",{type:"button",onClick:()=>t(l),className:"absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-background/80 backdrop-blur flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors opacity-0 group-hover:opacity-100","aria-label":`Remove ${i.name}`,children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})})]},i.id??l))}):o.jsx("div",{ref:a,className:x("flex gap-2 overflow-x-auto pb-1",r),...s,children:e.map((i,l)=>o.jsxs("div",{className:"group relative flex items-center gap-2 rounded-lg border border-border bg-muted/30 px-2.5 py-1.5 shrink-0 max-w-[200px]",children:[zr(i.type)&&(i.thumbnail||i.url)?o.jsx("img",{src:i.thumbnail||i.url,alt:i.name,className:"h-8 w-8 rounded object-cover shrink-0"}):o.jsx("span",{className:"text-lg shrink-0",children:Br(i.type)}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs font-medium truncate",children:i.name}),o.jsx("div",{className:"text-[10px] text-muted-foreground",children:$r(i.size)})]}),t&&o.jsx("button",{type:"button",onClick:()=>t(l),className:"h-5 w-5 rounded-full flex items-center justify-center text-muted-foreground hover:text-destructive transition-colors shrink-0 opacity-0 group-hover:opacity-100","aria-label":`Remove ${i.name}`,children:o.jsxs("svg",{className:"h-3 w-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]})})]},i.id??l))}));ai.displayName="FilePreview";const Qu={sending:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 6v6l4 2"})]}),sent:o.jsx("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),delivered:o.jsxs("svg",{className:"h-3 w-3 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),read:o.jsxs("svg",{className:"h-3 w-3 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 7 17l-5-5"}),o.jsx("path",{d:"m22 10-9.5 9.5-2-2"})]}),error:o.jsxs("svg",{className:"h-3 w-3 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m15 9-6 6"}),o.jsx("path",{d:"m9 9 6 6"})]})},ii=w.forwardRef(({variant:e="received",avatar:t,avatarFallback:n,content:r,timestamp:s,isLoading:a,status:i,actions:l,textContent:c,likeState:d,onCopy:h,onRetry:u,onEdit:f,onLike:m,onDislike:g,onShare:v,followUp:b,onFollowUpSelect:p,onFollowUpFreeText:y,reasoning:N,toolCalls:S,citations:M,className:R,...T},j)=>{const F=e==="sent",[W,H]=w.useState(!1),K=async()=>{if(c)try{await navigator.clipboard.writeText(c),H(!0),setTimeout(()=>H(!1),2e3)}catch{}h==null||h()};return o.jsxs("div",{ref:j,className:x("group flex gap-2 max-w-[85%]",F?"ml-auto flex-row-reverse":"mr-auto",R),...T,children:[(t||n)&&o.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground overflow-hidden",children:t?o.jsx("img",{src:t,alt:n??"avatar",className:"h-full w-full object-cover"}):o.jsx("span",{children:n??"?"})}),o.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[N&&o.jsx("div",{className:x("rounded-xl border border-border/60 overflow-hidden",N.isThinking&&"border-primary/30"),children:o.jsx(ef,{...N})}),S==null?void 0:S.map((k,J)=>o.jsx(tf,{...k},J)),o.jsxs("div",{className:x("rounded-2xl px-4 py-2.5 text-sm leading-relaxed",F?"bg-primary text-primary-foreground rounded-br-md":"bg-muted text-foreground rounded-bl-md"),children:[a?o.jsxs("div",{className:"flex items-center gap-1 py-1",children:[o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:0ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:150ms]"}),o.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:300ms]"})]}):r,M&&M.length>0&&o.jsxs("div",{className:"border-t border-border/30 pt-2 mt-2 space-y-1.5",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-semibold",children:"Sources"}),M.map(k=>o.jsxs("a",{href:k.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[o.jsx("span",{className:"h-4 min-w-[16px] px-0.5 rounded bg-primary/15 text-primary text-[10px] font-semibold flex items-center justify-center",children:k.index}),o.jsx("span",{className:"truncate",children:k.title})]},k.index))]})]}),b&&o.jsxs("div",{className:"rounded-2xl bg-muted text-foreground rounded-bl-md px-4 py-3",children:[o.jsx("p",{className:"text-sm leading-relaxed mb-2.5",children:b.question}),o.jsx("div",{className:"grid gap-1.5",children:b.options.map(k=>{const J=k.id===b.selected,Z=!!b.selected;return o.jsxs("button",{type:"button",disabled:Z,onClick:()=>p==null?void 0:p(k.id,k.label),className:x("flex items-center gap-2 rounded-xl border px-3 py-2 text-left text-sm transition-all",J?"border-primary bg-primary/10 text-primary font-medium":Z?"border-border/50 text-muted-foreground opacity-50 cursor-default":"border-border bg-background hover:border-primary/40 hover:bg-primary/5 cursor-pointer"),children:[J?o.jsx("svg",{className:"h-4 w-4 shrink-0 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsx("span",{className:x("h-4 w-4 shrink-0 rounded-full border-2",Z?"border-border/50":"border-border")}),o.jsx("span",{className:"truncate",children:k.label})]},k.id)})})]}),(s||i)&&o.jsxs("div",{className:x("flex items-center gap-1 px-1",F&&"flex-row-reverse"),children:[s&&o.jsx("span",{className:"text-[10px] text-muted-foreground",children:s}),i&&Qu[i]]}),l&&l.length>0&&!a&&o.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",children:l.map(k=>{const J=k==="copy"&&W,Z={copy:K,retry:u,edit:f,like:m,dislike:g,share:v},$=k==="like"&&d==="liked"||k==="dislike"&&d==="disliked";return o.jsx("button",{type:"button",onClick:Z[k],title:J?"Copied!":k.charAt(0).toUpperCase()+k.slice(1),className:x("h-7 w-7 rounded-md flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",$&&"text-primary",J&&"text-green-500"),children:J?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):k==="copy"?o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),o.jsx("path",{d:"M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z"})]}):k==="retry"?o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),o.jsx("path",{d:"M3 3v5h5"})]}):k==="like"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:$?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M7 10v12 M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z"})}):k==="dislike"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:$?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 14V2 M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22h0a3.13 3.13 0 0 1-3-3.88Z"})}):k==="edit"?o.jsx("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})}):o.jsxs("svg",{className:"h-3.5 w-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),o.jsx("path",{d:"M16 6l-4-4-4 4"}),o.jsx("path",{d:"M12 2v13"})]})},k)})})]})]})});ii.displayName="ChatMessage";function ef({content:e,isThinking:t,duration:n}){const[r,s]=w.useState(t===!0),[a,i]=w.useState(n??0);w.useEffect(()=>{t&&s(!0)},[t]),w.useEffect(()=>{if(!t)return;const c=Date.now(),d=setInterval(()=>i(Math.floor((Date.now()-c)/1e3)),1e3);return()=>clearInterval(d)},[t]);const l=t?a:n??a;return o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>s(c=>!c),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[o.jsxs("svg",{className:x("h-4 w-4 shrink-0 text-muted-foreground",t&&"text-primary animate-pulse"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}),o.jsx("path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"})]}),o.jsx("span",{className:x("font-medium",t&&"text-primary animate-pulse"),children:t?"Thinking":"Reasoning"}),l>0&&o.jsx("span",{className:"text-xs text-muted-foreground",children:t?`${l}s...`:`${l}s`}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",r&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),r&&o.jsx("div",{className:"border-t border-border/40 px-4 py-3 bg-muted/20",children:o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed whitespace-pre-wrap border-l-2 border-primary/20 pl-3",children:e})})]})}function tf({name:e,args:t,result:n,status:r,error:s}){const[a,i]=w.useState(!1);return o.jsxs("div",{className:x("rounded-xl border overflow-hidden",r==="error"?"border-destructive/30":"border-border/60"),children:[o.jsxs("button",{type:"button",onClick:()=>i(l=>!l),className:"flex items-center gap-2 w-full px-3 py-2 text-sm hover:bg-muted/50",children:[o.jsx("svg",{className:"h-4 w-4 shrink-0 text-muted-foreground",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),r==="running"?o.jsx("svg",{className:"h-3.5 w-3.5 animate-spin text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:o.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})}):r==="success"?o.jsx("svg",{className:"h-3.5 w-3.5 text-green-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}):o.jsxs("svg",{className:"h-3.5 w-3.5 text-destructive",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M18 6 6 18"}),o.jsx("path",{d:"m6 6 12 12"})]}),o.jsx("span",{className:"font-medium font-mono text-xs",children:r==="running"?`Calling ${e}...`:e}),o.jsx("svg",{className:x("h-3.5 w-3.5 ml-auto text-muted-foreground transition-transform",a&&"rotate-180"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("path",{d:"m6 9 6 6 6-6"})})]}),a&&o.jsxs("div",{className:"border-t border-border/40 text-xs",children:[t&&Object.keys(t).length>0&&o.jsxs("div",{className:"px-3 py-2 bg-muted/20",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:"Arguments"}),o.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:JSON.stringify(t,null,2)})]}),n&&o.jsxs("div",{className:"px-3 py-2 border-t border-border/30",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground mb-1 font-semibold",children:"Result"}),o.jsx("pre",{className:"overflow-x-auto font-mono whitespace-pre-wrap",children:n})]}),s&&o.jsxs("div",{className:"px-3 py-2 bg-destructive/5 border-t border-border/30",children:[o.jsx("div",{className:"text-[10px] uppercase tracking-wider text-destructive mb-1 font-semibold",children:"Error"}),o.jsx("pre",{className:"overflow-x-auto font-mono text-destructive whitespace-pre-wrap",children:s})]})]})]})}exports.AILoading=Ua;exports.Accordion=Ol;exports.AccordionContent=qo;exports.AccordionItem=Ho;exports.AccordionTrigger=Go;exports.Alert=ws;exports.AlertDescription=ys;exports.AlertDialog=td;exports.AlertDialogAction=Ms;exports.AlertDialogCancel=_s;exports.AlertDialogContent=Cs;exports.AlertDialogDescription=Rs;exports.AlertDialogFooter=Ss;exports.AlertDialogHeader=js;exports.AlertDialogOverlay=lr;exports.AlertDialogPortal=Ns;exports.AlertDialogTitle=ks;exports.AlertDialogTrigger=nd;exports.AlertTitle=bs;exports.AppShell=Ta;exports.AspectRatio=Vl;exports.Avatar=uo;exports.AvatarFallback=mo;exports.AvatarImage=fo;exports.Badge=Vn;exports.Blockquote=Eu;exports.Box=Mo;exports.Breadcrumb=Ds;exports.BreadcrumbEllipsis=Vs;exports.BreadcrumbItem=Fs;exports.BreadcrumbLink=Ls;exports.BreadcrumbList=Ts;exports.BreadcrumbPage=Es;exports.BreadcrumbSeparator=As;exports.Button=ge;exports.Calendar=On;exports.Card=Hn;exports.CardContent=Wn;exports.CardDescription=Eo;exports.CardFooter=Ao;exports.CardHeader=Gn;exports.CardTitle=qn;exports.Carousel=ua;exports.CarouselContent=fa;exports.CarouselItem=ma;exports.CarouselNext=pa;exports.CarouselPrevious=ga;exports.ChartContainer=Ra;exports.ChartLegend=zu;exports.ChartTooltip=$u;exports.ChatBubble=$a;exports.ChatBubbleActions=Ha;exports.ChatBubbleAvatar=za;exports.ChatBubbleMessage=Ba;exports.ChatBubbleTimestamp=Oa;exports.ChatContainer=qa;exports.ChatFollowUp=Ja;exports.ChatHeader=oi;exports.ChatInput=Ga;exports.ChatList=Wa;exports.ChatMessage=ii;exports.ChatModeSelector=Za;exports.ChatToolCall=ni;exports.Checkbox=go;exports.CitationBadge=wr;exports.Code=Lu;exports.CodeBlock=Du;exports.Collapsible=$l;exports.CollapsibleContent=Fo;exports.CollapsibleTrigger=zl;exports.ColorPicker=El;exports.Combobox=Il;exports.Command=ir;exports.CommandDialog=Ql;exports.CommandEmpty=gs;exports.CommandGroup=ps;exports.CommandInput=fs;exports.CommandItem=xs;exports.CommandList=ms;exports.CommandSeparator=hs;exports.CommandShortcut=vs;exports.Container=To;exports.ContextMenu=Bd;exports.ContextMenuCheckboxItem=ta;exports.ContextMenuContent=Qs;exports.ContextMenuGroup=Hd;exports.ContextMenuItem=ea;exports.ContextMenuLabel=ra;exports.ContextMenuPortal=Gd;exports.ContextMenuRadioGroup=Wd;exports.ContextMenuRadioItem=na;exports.ContextMenuSeparator=oa;exports.ContextMenuShortcut=sa;exports.ContextMenuSub=qd;exports.ContextMenuSubContent=Js;exports.ContextMenuSubTrigger=Zs;exports.ContextMenuTrigger=Od;exports.ConversationList=ri;exports.CopyInput=Aa;exports.DataTable=ku;exports.DataTableColumnHeader=Ru;exports.DatePicker=kl;exports.Dialog=Wo;exports.DialogClose=Gl;exports.DialogContent=Qn;exports.DialogDescription=Zo;exports.DialogFooter=Xo;exports.DialogHeader=Yo;exports.DialogOverlay=Jn;exports.DialogPortal=Uo;exports.DialogTitle=Ko;exports.DialogTrigger=Hl;exports.Drawer=Jo;exports.DrawerClose=es;exports.DrawerContent=tr;exports.DrawerDescription=sr;exports.DrawerFooter=rr;exports.DrawerHeader=nr;exports.DrawerTitle=or;exports.DrawerTrigger=Qo;exports.DropdownMenu=ns;exports.DropdownMenuCheckboxItem=as;exports.DropdownMenuContent=ar;exports.DropdownMenuGroup=Wl;exports.DropdownMenuItem=jt;exports.DropdownMenuLabel=ls;exports.DropdownMenuPortal=Ul;exports.DropdownMenuRadioGroup=Xl;exports.DropdownMenuRadioItem=is;exports.DropdownMenuSeparator=ds;exports.DropdownMenuShortcut=cs;exports.DropdownMenuSub=Yl;exports.DropdownMenuSubContent=ss;exports.DropdownMenuSubTrigger=os;exports.DropdownMenuTrigger=rs;exports.EmptyState=Ad;exports.FilePreview=ai;exports.FileUpload=Tl;exports.Flex=_o;exports.Grid=Do;exports.HStack=Po;exports.Header=La;exports.Heading=Tu;exports.HoverCard=Ud;exports.HoverCardContent=aa;exports.HoverCardTrigger=Yd;exports.Input=Ke;exports.JsonViewer=Va;exports.Label=rn;exports.Lead=Au;exports.Main=Ea;exports.MarkdownRenderer=Ya;exports.MessageActions=Qa;exports.MetricCard=Bu;exports.ModeToggle=Gu;exports.ModeToggleGroup=Wu;exports.ModelSelector=Ka;exports.MultiSelect=Pl;exports.Muted=Vu;exports.NavigationMenu=qs;exports.NavigationMenuContent=Xs;exports.NavigationMenuIndicator=Ks;exports.NavigationMenuItem=$d;exports.NavigationMenuLink=zd;exports.NavigationMenuList=Ws;exports.NavigationMenuTrigger=Ys;exports.NavigationMenuViewport=dr;exports.NumberInput=Ml;exports.OTPInput=Dl;exports.Pagination=$s;exports.PaginationContent=zs;exports.PaginationEllipsis=Gs;exports.PaginationItem=Bs;exports.PaginationLink=sn;exports.PaginationNext=Hs;exports.PaginationPrevious=Os;exports.Popover=gt;exports.PopoverContent=at;exports.PopoverTrigger=pt;exports.Progress=Is;exports.PromptSuggestions=Xa;exports.RadioGroup=yo;exports.RadioGroupItem=No;exports.ReasoningBlock=ti;exports.ScrollArea=Zn;exports.ScrollBar=Qt;exports.Select=Cl;exports.SelectContent=xo;exports.SelectGroup=jl;exports.SelectItem=wo;exports.SelectLabel=vo;exports.SelectScrollDownButton=zn;exports.SelectScrollUpButton=$n;exports.SelectSeparator=bo;exports.SelectTrigger=ho;exports.SelectValue=Sl;exports.Separator=co;exports.Sheet=Jo;exports.SheetClose=es;exports.SheetContent=tr;exports.SheetDescription=sr;exports.SheetFooter=rr;exports.SheetHeader=nr;exports.SheetOverlay=er;exports.SheetPortal=ts;exports.SheetTitle=or;exports.SheetTrigger=Qo;exports.Sidebar=Fa;exports.Skeleton=rd;exports.Slider=Co;exports.SourceCitation=si;exports.StatusBadge=Hu;exports.Stepper=Vd;exports.StreamingText=ei;exports.Switch=po;exports.Table=Un;exports.TableBody=Xn;exports.TableCaption=$o;exports.TableCell=Jt;exports.TableFooter=Vo;exports.TableHead=Kn;exports.TableHeader=Yn;exports.TableRow=Ct;exports.Tabs=Bl;exports.TabsContent=Oo;exports.TabsList=zo;exports.TabsTrigger=Bo;exports.TagInput=_l;exports.Text=Fu;exports.Textarea=io;exports.ThemeProvider=Ld;exports.TimePicker=Rl;exports.Timeline=Ma;exports.TimelineConnector=Pa;exports.TimelineContent=Da;exports.TimelineIcon=Ia;exports.TimelineItem=_a;exports.Toaster=Ed;exports.Toggle=jo;exports.ToggleGroup=So;exports.ToggleGroupItem=Ro;exports.Tooltip=Zl;exports.TooltipContent=us;exports.TooltipProvider=Kl;exports.TooltipTrigger=Jl;exports.VStack=Io;exports.badgeVariants=lo;exports.buttonVariants=Tt;exports.cardVariants=Lo;exports.cn=x;exports.headingVariants=Sa;exports.inputVariants=ao;exports.navigationMenuTriggerStyle=Us;exports.textVariants=ka;exports.toast=bd;exports.toggleVariants=Bn;exports.useTheme=on;
|
|
37
38
|
//# sourceMappingURL=index.cjs.js.map
|