@moontra/moonui-pro 2.33.24 → 2.33.25
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/cdn/index.global.js
CHANGED
|
@@ -411,7 +411,7 @@ Alternatively, you can use your own component as a description by assigning it a
|
|
|
411
411
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Xnt=Bnt;var Ynt=Vnt,xhe=Unt,bhe=znt,whe=qnt,Che=Knt,She=jnt,Phe=Wnt;var ih=A(de(),1),Qnt=Xnt;var Kmr=Ynt,Znt=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(xhe,{className:F("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:r}));Znt.displayName=xhe.displayName;var Ihe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsxs)(Kmr,{children:[(0,ih.jsx)(Znt,{}),(0,ih.jsx)(bhe,{ref:r,className:F("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})]}));Ihe.displayName=bhe.displayName;var khe=({className:e,...t})=>(0,ih.jsx)("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});khe.displayName="AlertDialogHeader";var Rhe=({className:e,...t})=>(0,ih.jsx)("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Rhe.displayName="AlertDialogFooter";var Nhe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(She,{ref:r,className:F("text-lg font-semibold",e),...t}));Nhe.displayName=She.displayName;var The=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(Phe,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));The.displayName=Phe.displayName;var Mhe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(whe,{ref:r,className:F(jd(),e),...t}));Mhe.displayName=whe.displayName;var Ehe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(Che,{ref:r,className:F(jd({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ehe.displayName=Che.displayName;var $n=A(de(),1);function Jnt({selectedRows:e,actions:t,onClearSelection:r,className:n}){let[o,a]=Ahe.default.useState(!1),[i,s]=Ahe.default.useState(null),l=e.length,c=async f=>{if(f.confirmMessage){s(f);return}await u(f)},u=async f=>{a(!0);try{await f.action(e),r&&r()}catch(p){console.error("Bulk action failed:",p)}finally{a(!1),s(null)}},d=async()=>{i&&await u(i)};return l===0?null:(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsxs)("div",{className:F("flex items-center gap-2",n),children:[(0,$n.jsxs)(pt,{variant:"secondary",className:"gap-1",children:[(0,$n.jsx)("span",{className:"font-semibold",children:l}),(0,$n.jsx)("span",{children:" Selected"})]}),(0,$n.jsxs)(Er,{children:[(0,$n.jsx)(Ar,{asChild:!0,children:(0,$n.jsx)(oe,{variant:"outline",size:"sm",disabled:o,className:"gap-2",children:o?(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Mr,{className:"h-4 w-4 animate-spin"}),"Processing..."]}):(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(vi,{className:"h-4 w-4"}),"Bulk Actions"]})})}),(0,$n.jsxs)(kr,{align:"end",className:"w-48",children:[t.map((f,p)=>{let h=typeof f.disabled=="function"?f.disabled(e):f.disabled;return(0,$n.jsxs)(Ve,{disabled:h||o,onSelect:()=>c(f),className:F("cursor-pointer",f.variant==="destructive"&&"text-destructive focus:text-destructive"),children:[f.icon&&(0,$n.jsx)("span",{className:"mr-2 h-4 w-4",children:f.icon}),f.label]},p)}),r&&(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Zr,{}),(0,$n.jsx)(Ve,{onSelect:r,className:"cursor-pointer text-muted-foreground",children:"Clear selection"})]})]})]})]}),(0,$n.jsx)(Qnt,{open:!!i,onOpenChange:f=>!f&&s(null),children:(0,$n.jsxs)(Ihe,{children:[(0,$n.jsxs)(khe,{children:[(0,$n.jsxs)(Nhe,{className:"flex items-center gap-2",children:[i?.variant==="destructive"&&(0,$n.jsx)(ka,{className:"h-5 w-5 text-destructive"}),i?.confirmTitle||"Confirm Action"]}),(0,$n.jsx)(The,{children:i?.confirmMessage||`This action will affect ${l} selected item${l>1?"s":""}. This action cannot be undone.`})]}),(0,$n.jsxs)(Rhe,{children:[(0,$n.jsx)(Ehe,{disabled:o,children:"Cancel"}),(0,$n.jsx)(Mhe,{onClick:d,disabled:o,className:F(i?.variant==="destructive"&&"bg-destructive text-destructive-foreground hover:bg-destructive/90"),children:o?(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Mr,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):"Confirm"})]})]})})]})}function Xmr(e,t,r=!0){if(e.length===0)return"";let n=t||Object.keys(e[0]),o=[];if(r){let a=n.map(i=>{let s=String(i);return s.includes(",")||s.includes('"')||s.includes(`
|
|
412
412
|
`)?`"${s.replace(/"/g,'""')}"`:s});o.push(a.join(","))}return e.forEach(a=>{let i=n.map(s=>{let l=a[s];if(l==null)return"";if(l instanceof Date)return l.toISOString();if(typeof l=="object")return JSON.stringify(l);let c=String(l);return c.includes(",")||c.includes('"')||c.includes(`
|
|
413
413
|
`)?`"${c.replace(/"/g,'""')}"`:c});o.push(i.join(","))}),o.join(`
|
|
414
|
-
`)}function Ymr(e,t){if(!t||t.length===0)return JSON.stringify(e,null,2);let r=e.map(n=>{let o={};return t.forEach(a=>{a in n&&(o[a]=n[a])}),o});return JSON.stringify(r,null,2)}function Qmr(e,t,r){let n=new Blob([e],{type:r}),o=URL.createObjectURL(n),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}async function eot(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=Xmr(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=Ymr(e,o),s="application/json;charset=utf-8;",l="json";break;case"xlsx":throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");default:throw new Error(`Unsupported export format: ${r}`)}let c=`${n}-${new Date().toISOString().split("T")[0]}.${l}`;Qmr(i,c,s)}function tot(e,t){return e.filter(r=>{let n=r.id||r.accessorKey;return n&&t[n]!==!1}).map(r=>r.id||r.accessorKey).filter(Boolean)}var qI=A(ue(),1),rot=A(uv(),1);var zt=A(de(),1),Zmr={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",in:"In",notIn:"Not in",isNull:"Is empty",isNotNull:"Is not empty"};function Jmr(e){switch(e){case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"date":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"boolean":return["equals","notEquals","isNull","isNotNull"];case"select":return["equals","notEquals","in","notIn","isNull","isNotNull"];default:return["equals","notEquals","contains","notContains","startsWith","endsWith","isNull","isNotNull"]}}function not({table:e,open:t,onOpenChange:r,position:n="right",width:o="400px",filters:a,onFiltersChange:i,customFilters:s,matchAll:l,onMatchAllChange:c}){let[u,d]=(0,qI.useState)([]),[f,p]=(0,qI.useState)(!0),h=a||u,m=i||d,v=l!==void 0?l:f,g=c||p,y=(0,qI.useMemo)(()=>e.getAllColumns().filter(T=>T.id==="select"||T.id==="actions"||T.id==="expander"?!1:T.getCanFilter()),[e]),x=()=>{let T=y[0];if(!T)return;let L={column:T.id,operator:"contains",value:""};m([...h,L])},w=(T,L)=>{let M=[...h];M[T]={...M[T],...L},m(M)},b=T=>{m(h.filter((L,M)=>M!==T))},C=()=>{m([]),e.resetColumnFilters()},S=()=>{e.resetColumnFilters(),[...new Set(h.map(L=>L.column))].forEach(L=>{let M=e.getColumn(L);M&&M.setFilterValue({custom:!0,filters:h,matchAll:v})}),h.length===0&&e.resetColumnFilters(),r(!1)};if(typeof document>"u")return null;let P=(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20",style:{zIndex:9998},onClick:()=>r(!1)})}),(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:F("fixed top-0 bottom-0 bg-background border-l shadow-xl",n==="right"?"right-0":"left-0"),style:{width:o,zIndex:9999},children:(0,zt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(ns,{className:"h-5 w-5"}),(0,zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),h.length>0&&(0,zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",h.length," active)"]})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,zt.jsxs)("div",{className:"mb-6",children:[(0,zt.jsx)(Rt,{className:"text-sm font-medium mb-2 block",children:"Match conditions"}),(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(oe,{variant:v?"primary":"outline",size:"sm",onClick:()=>g(!0),className:"flex-1",children:"Match all"}),(0,zt.jsx)(oe,{variant:v?"outline":"primary",size:"sm",onClick:()=>g(!1),className:"flex-1",children:"Match any"})]})]}),(0,zt.jsx)(Ys,{className:"mb-6"}),s&&(0,zt.jsxs)(zt.Fragment,{children:[s,(0,zt.jsx)(Ys,{className:"my-6"})]}),(0,zt.jsx)("div",{className:"space-y-4",children:h.map((T,L)=>(0,zt.jsx)(ehr,{filter:T,columns:y,onUpdate:M=>w(L,M),onRemove:()=>b(L)},L))}),(0,zt.jsxs)(oe,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,zt.jsx)(Vi,{className:"h-4 w-4 mr-2"}),"Add filter"]})]}),(0,zt.jsx)("div",{className:"p-4 border-t space-y-2",children:(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsxs)(oe,{variant:"outline",onClick:C,disabled:h.length===0,className:"flex-1",children:[(0,zt.jsx)(Ss,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,zt.jsx)(oe,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]});return(0,rot.createPortal)(P,document.body)}function ehr({filter:e,columns:t,onUpdate:r,onRemove:n}){let a=t.find(p=>p.id===e.column)?.columnDef,i=a?.meta?.filterType||"string",s=a?.meta?.filterOptions,l=a?.meta?.filterValueAccessor,c=Jmr(i),u=e.operator!=="isNull"&&e.operator!=="isNotNull",d=e.operator==="in"||e.operator==="notIn",f=qI.default.useMemo(()=>i!=="select"&&!s?null:s||null,[i,s]);return(0,zt.jsxs)("div",{className:"space-y-2 p-3 border rounded-lg bg-muted/30",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsxs)(Qo,{value:e.column,onValueChange:p=>r({column:p}),children:[(0,zt.jsx)(Zo,{className:"flex-1",children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:t.map(p=>{let h=p.columnDef.header,m=typeof h=="function"?p.id:h||p.id;return(0,zt.jsx)(Bt,{value:p.id,children:m},p.id)})})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)(Qo,{value:e.operator,onValueChange:p=>r({operator:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:c.map(p=>(0,zt.jsx)(Bt,{value:p,children:Zmr[p]},p))})]}),u&&(0,zt.jsx)("div",{children:i==="boolean"?(0,zt.jsxs)(Qo,{value:String(e.value),onValueChange:p=>r({value:p==="true"}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsxs)(Jo,{style:{zIndex:1e4},children:[(0,zt.jsx)(Bt,{value:"true",children:"True"}),(0,zt.jsx)(Bt,{value:"false",children:"False"})]})]}):(i==="select"||f)&&!d?(0,zt.jsxs)(Qo,{value:e.value||"",onValueChange:p=>r({value:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{placeholder:"Select value..."})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:f?.map(p=>(0,zt.jsx)(Bt,{value:p,children:p},p))})]}):(i==="select"||f)&&d?(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Select multiple values:"}),(0,zt.jsx)("div",{className:"space-y-1 max-h-32 overflow-y-auto border rounded-md p-2",children:f?.map(p=>{let h=Array.isArray(e.value)?e.value:[],m=h.includes(p);return(0,zt.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded",children:[(0,zt.jsx)("input",{type:"checkbox",checked:m,onChange:v=>{let g=v.target.checked?[...h,p]:h.filter(y=>y!==p);r({value:g})},className:"rounded border-gray-300"}),(0,zt.jsx)("span",{className:"text-sm",children:p})]},p)})})]}):i==="number"?(0,zt.jsx)(Jt,{type:"number",value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."}):d?(0,zt.jsx)(Jt,{value:Array.isArray(e.value)?e.value.join(", "):e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter values separated by comma..."}):(0,zt.jsx)(Jt,{value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."})})]})}var Ay=A(ue(),1);var ya=A(de(),1);function oot({table:e,filter:t,data:r}){let[n,o]=(0,Ay.useState)(!1),[a,i]=(0,Ay.useState)(""),s=Ay.default.useMemo(()=>{let g=e.getColumn(t.column);return g||(g=e.getAllColumns().find(x=>x.id===t.column||x.columnDef.accessorKey===t.column)),g},[e,t.column]),l=(0,Ay.useMemo)(()=>{if(t.options&&t.options!=="auto")return t.options;let g=new Set;return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}x!=null&&x!==""&&g.add(String(x))}),Array.from(g).sort()},[r,t.column,t.options]),c=s?.getFilterValue(),u=(0,Ay.useMemo)(()=>c?Array.isArray(c)?new Set(c):new Set([String(c)]):new Set,[c]),d=(0,Ay.useMemo)(()=>{if(!t.showCounts)return{};let g={};return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}if(x!=null&&x!==""){let w=String(x);g[w]=(g[w]||0)+1}}),g},[r,t.column,t.showCounts]),f=g=>{if(s)if(t.multi){let y=new Set(u);y.has(g)?y.delete(g):y.add(g),y.size===0?s.setFilterValue(void 0):s.setFilterValue(Array.from(y))}else u.has(g)?s.setFilterValue(void 0):s.setFilterValue(g)},p=()=>{s?.setFilterValue(void 0),i("")},h=t.label||t.column,m=(0,Ay.useMemo)(()=>a?l.filter(g=>g.toLowerCase().includes(a.toLowerCase())):l,[l,a]),v=!s||l.length===0;return(0,ya.jsxs)(ls,{open:n,onOpenChange:o,children:[(0,ya.jsx)(cs,{asChild:!0,children:(0,ya.jsxs)(oe,{variant:"outline",size:"sm",disabled:v,className:F("h-8 border-dashed",u.size>0&&"border-solid"),children:[h,u.size>0&&(0,ya.jsxs)(ya.Fragment,{children:[(0,ya.jsx)("span",{className:"mx-2 h-4 w-px bg-border"}),(0,ya.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:u.size})]})]})}),(0,ya.jsx)(Wi,{className:"w-[250px] p-0",align:"start",children:(0,ya.jsxs)("div",{className:"p-2",children:[l.length>0&&(0,ya.jsx)("div",{className:"pb-2",children:(0,ya.jsxs)("div",{className:"relative",children:[(0,ya.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,ya.jsx)(Jt,{placeholder:`Search ${h.toLowerCase()}...`,value:a,onChange:g=>i(g.target.value),className:"h-8 w-full pl-8"})]})}),l.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No options available"}):m.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No results found"}):(0,ya.jsx)("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:m.map(g=>{let y=u.has(g);return(0,ya.jsxs)("button",{onClick:()=>f(g),className:F("flex w-full items-center justify-between rounded px-2 py-1.5 text-sm hover:bg-accent",y&&"bg-accent"),children:[(0,ya.jsxs)("div",{className:"flex items-center",children:[(0,ya.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,ya.jsx)(on,{className:"h-4 w-4"})}),(0,ya.jsx)("span",{children:g})]}),t.showCounts&&d[g]!==void 0&&(0,ya.jsx)("span",{className:"text-xs text-muted-foreground",children:d[g]})]},g)})}),u.size>0&&(0,ya.jsx)("div",{className:"border-t mt-2 pt-2",children:(0,ya.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-center",onClick:p,children:"Clear filter"})})]})})]})}var q4=A(ue(),1);var Bn=A(de(),1);function aot({table:e,column:t,title:r,options:n="auto",data:o}){let a=e.getColumn(t),[i,s]=(0,q4.useState)("");if(!a)return null;let l=a.columnDef,c=l?.meta?.filterValueAccessor,u=l?.meta?.filterOptions,d=b=>c?c(b):b[t],{availableOptions:f,optionCounts:p}=(0,q4.useMemo)(()=>{let b={},C=new Set;o.forEach(P=>{let T=d(P);if(T!=null&&T!==""){let L=String(T);C.add(L),b[L]=(b[L]||0)+1}});let S=[];return n!=="auto"?S=n:u?S=u.map(P=>({value:P,label:P})):S=Array.from(C).sort().slice(0,50).map(P=>({value:P,label:P})),{availableOptions:S,optionCounts:b}},[o,n,u]),h=a.getFilterValue(),m=new Set(h||[]),v=(0,q4.useMemo)(()=>i?f.filter(b=>(b.label||b.value).toLowerCase().includes(i.toLowerCase())):f,[f,i]),g=r||a.columnDef.header||t,y=b=>{let C=new Set(m);C.has(b)?C.delete(b):C.add(b),C.size===0?a.setFilterValue(void 0):a.setFilterValue(Array.from(C))},x=()=>{a.setFilterValue(void 0),s("")},w=()=>{let b=v.map(C=>C.value);a.setFilterValue(b)};return(0,Bn.jsxs)(ls,{children:[(0,Bn.jsx)(cs,{asChild:!0,children:(0,Bn.jsxs)(oe,{variant:"outline",size:"sm",className:F("h-8 border-dashed",m.size>0&&"border-solid"),children:[(0,Bn.jsx)(jb,{className:"mr-2 h-4 w-4"}),g,m.size>0&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{orientation:"vertical",className:"mx-2 h-4"}),(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:m.size}),(0,Bn.jsx)("div",{className:"hidden space-x-1 lg:flex",children:m.size>2?(0,Bn.jsxs)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[m.size," selected"]}):Array.from(m).slice(0,2).map(b=>{let C=f.find(S=>S.value===b);return(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:C?.label||b},b)})})]})]})}),(0,Bn.jsxs)(Wi,{className:"w-[300px] p-0",align:"start",children:[(0,Bn.jsx)("div",{className:"p-3",children:(0,Bn.jsxs)("div",{className:"relative",children:[(0,Bn.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Bn.jsx)(Jt,{placeholder:`Search ${g.toLowerCase()}...`,value:i,onChange:b=>s(b.target.value),className:"h-8 pl-8"})]})}),(0,Bn.jsx)(Ys,{}),(0,Bn.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:v.length===0?(0,Bn.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No results found"}):(0,Bn.jsx)("div",{className:"p-2",children:v.map(b=>{let C=m.has(b.value),S=p[b.value]||0;return(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start font-normal",onClick:()=>y(b.value),children:[(0,Bn.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,Bn.jsx)(on,{className:F("h-4 w-4")})}),b.icon&&(0,Bn.jsx)("span",{className:"mr-2",children:b.icon}),(0,Bn.jsx)("span",{className:"flex-1 text-left",children:b.label||b.value}),S>0&&(0,Bn.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:S})]},b.value)})})}),(m.size>0||v.length>0)&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{}),(0,Bn.jsxs)("div",{className:"flex items-center justify-between p-2",children:[m.size>0?(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:x,className:"h-8 px-2 lg:px-3",children:["Clear",(0,Bn.jsx)(lr,{className:"ml-2 h-4 w-4"})]}):(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:w,className:"h-8 px-2 lg:px-3",children:["Select all",(0,Bn.jsx)(on,{className:"ml-2 h-4 w-4"})]}),(0,Bn.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.size," of ",f.length," selected"]})]})]})]})]})}var ot=A(de(),1);function Lhe({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,pageSizeOptions:l=[5,10,20,50,100],className:c,onRowSelect:u,onExport:d,enableExpandable:f=!1,renderSubComponent:p,expandedRows:h,onRowExpandChange:m,bulkActions:v=[],quickFilters:g=[],facetedFilters:y=[],features:x={},theme:w={},texts:b={},enableSorting:C=!0,enableFiltering:S=!0,enablePagination:P=!0,enableColumnVisibility:T=!0,enableRowSelection:L,filterPlaceholder:M="Search all columns...",defaultPageSize:N,manualPagination:V=!1,pageCount:_,onPaginationChange:I,onSortingChange:k,onColumnFiltersChange:R,state:E}){let O=vs.default.useMemo(()=>e.map(De=>{let{enableHiding:gt,...Ge}=De;return{...Ge,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:B,isLoading:U}=st();if(!U&&!B)return(0,ot.jsx)(Rn,{componentName:"Data Table",className:F("w-full",c)});let[D,j]=vs.default.useState([]),[$,z]=vs.default.useState([]),[q,H]=vs.default.useState({}),[K,G]=vs.default.useState({}),[J,ae]=vs.default.useState(""),[Z,Pe]=vs.default.useState({pageIndex:0,pageSize:N||s||10}),[be,_e]=vs.default.useState(!1),[he,Ne]=vs.default.useState(new Set),[ve,Oe]=vs.default.useState(!1),Y=h||he,Q=m?De=>m(De):Ne,pe=N||s,Re=vs.default.useMemo(()=>t,[t]),fe=De=>()=>{let Ge=(E?.sorting??D).find(jr=>jr.id===De),Ut=[];Ge?Ge.desc?Ut=[]:Ut=[{id:De,desc:!0}]:Ut=[{id:De,desc:!1}];let qt=k!==void 0?k:j;typeof qt=="function"&&qt(Ut)},Ce=vs.default.useRef(null),re=vs.default.useCallback(De=>{let gt=typeof De=="function"?De(K):De;if(G(gt),u&&Ce.current){let Ge=Object.keys(gt).filter(qt=>gt[qt]),Ut=Ce.current.getRowModel().rows.filter(qt=>Ge.includes(qt.id)).map(qt=>qt.original);u(Ut)}},[K,u]),ye=vs.default.useMemo(()=>{let De=O.map(Ge=>!Ge.id&&Ge.accessorKey?{...Ge,id:Ge.accessorKey}:Ge),gt=De.some(Ge=>{if(Ge.id==="select")return!0;let Ut=Ge.header?.toString()||"",qt=Ge.cell?.toString()||"";return Ut.includes("Checkbox")||qt.includes("Checkbox")});return(a||L)&&!gt&&(De=[{id:"select",header:({table:Ut})=>{let qt=Ut.getIsAllPageRowsSelected(),jr=Ut.getIsSomePageRowsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt?!0:jr?"indeterminate":!1,onCheckedChange:gn=>{Ut.toggleAllPageRowsSelected(!!gn)},"aria-label":"Select all",className:"h-4 w-4"})})},cell:({row:Ut})=>{let qt=Ut.getIsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt,onCheckedChange:jr=>Ut.toggleSelected(!!jr),disabled:!Ut.getCanSelect(),"aria-label":"Select row",className:"h-4 w-4"},`select-${Ut.id}-${qt}`)})},enableSorting:!1,enableHiding:!1,size:40,maxSize:40},...De]),De},[O,a,L]),se=Ort({data:Re,columns:ye,onSortingChange:k!==void 0?k:j,onColumnFiltersChange:R!==void 0?R:z,onPaginationChange:I!==void 0?I:Pe,getCoreRowModel:Ert(),getPaginationRowModel:Lrt(),getSortedRowModel:Drt(),getFilteredRowModel:Art(),enableSortingRemoval:!0,enableMultiSort:!1,sortDescFirst:!1,onColumnVisibilityChange:H,onRowSelectionChange:re,onGlobalFilterChange:ae,globalFilterFn:"includesString",enableRowSelection:a||L||!1,filterFns:{custom:(De,gt,Ge)=>{if(Array.isArray(Ge)){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return Ge.includes(String(ja))}if(typeof Ge=="string"||typeof Ge=="number"||typeof Ge=="boolean"){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return String(ja)===String(Ge)}if(!Ge?.custom||!Ge?.filters)return!0;let Ut=Ge.filters,qt=Ge.matchAll!==void 0?Ge.matchAll:!0,jr=Ut.map(gn=>{let ja=se.getColumn(gn.column)?.columnDef?.meta?.filterValueAccessor,Vr=ja?ja(De.original):De.getValue(gn.column),Cn=gn.value;switch(gn.operator){case"equals":return Vr===Cn;case"notEquals":return Vr!==Cn;case"contains":return String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"notContains":return!String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"startsWith":return String(Vr).toLowerCase().startsWith(String(Cn).toLowerCase());case"endsWith":return String(Vr).toLowerCase().endsWith(String(Cn).toLowerCase());case"greaterThan":return Number(Vr)>Number(Cn);case"lessThan":return Number(Vr)<Number(Cn);case"greaterThanOrEqual":return Number(Vr)>=Number(Cn);case"lessThanOrEqual":return Number(Vr)<=Number(Cn);case"in":return Array.isArray(Cn)?Cn.includes(Vr):String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"notIn":return Array.isArray(Cn)?!Cn.includes(Vr):!String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"isNull":return Vr==null||Vr==="";case"isNotNull":return Vr!=null&&Vr!=="";default:return!0}});return qt?jr.every(gn=>gn):jr.some(gn=>gn)}},manualPagination:V,pageCount:_,state:{sorting:E?.sorting??D,columnFilters:E?.columnFilters??$,columnVisibility:E?.columnVisibility??q,rowSelection:E?.rowSelection??K,globalFilter:E?.globalFilter??J,pagination:E?.pagination??Z},initialState:{pagination:{pageSize:pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:(De,gt)=>{let Ge=De;return Ge.id!==void 0&&Ge.id!==null&&Ge.id!==""?String(Ge.id):Ge.orderId!==void 0&&Ge.orderId!==null?String(Ge.orderId):Ge.orderNumber!==void 0&&Ge.orderNumber!==null?String(Ge.orderNumber):Ge.email?`email-${Ge.email}`:Ge.name&&Ge.email?`${Ge.name}-${Ge.email}`:Ge.name?`name-${Ge.name}-${gt}`:String(gt)}});Ce.current=se;let ie=se.getState(),Fe=se.getRowModel(),At=vs.default.useRef(Fe.rows),to=vs.default.useMemo(()=>{let De=At.current!==Fe.rows;return De&&(At.current=Fe.rows),De},[Fe.rows]),Ke=At.current,Je={sorting:x.sorting!==!1,filtering:x.filtering!==!1||n,pagination:x.pagination!==!1||i,search:x.search!==!1||r,columnVisibility:x.columnVisibility!==!1,rowSelection:x.rowSelection!==!1||a,export:x.export!==!1||o},Se=async De=>{let gt=se.getFilteredSelectedRowModel().rows,Ge=gt.length>0?gt.map(jr=>jr.original):se.getFilteredRowModel().rows.map(jr=>jr.original);if(typeof o=="object"&&o.onExport){o.onExport(Ge,De);return}if(d){d(Ge);return}let Ut=typeof o=="object"&&o.filename?o.filename:"data-export",qt=tot(O,q);await eot(Ge,{format:De,filename:Ut,columns:qt,includeHeaders:!0})},ht=vs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Tt=()=>{se.resetRowSelection()};return(0,ot.jsxs)("div",{className:F("moonui-pro-datatable-container flex flex-col gap-4",c),children:[a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-4 py-2",children:[(0,ot.jsxs)("span",{className:"text-sm text-muted-foreground",children:[se.getFilteredSelectedRowModel().rows.length," Selected"]}),v.length>0&&(0,ot.jsx)(Jnt,{selectedRows:se.getFilteredSelectedRowModel().rows.map(De=>De.original),actions:v,onClearSelection:Tt})]}),(0,ot.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r&&(0,ot.jsxs)("div",{className:"relative",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,ot.jsx)(Jt,{placeholder:M,value:J,onChange:De=>ae(De.target.value),className:"pl-8 w-full sm:w-64"})]}),g.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.map((De,gt)=>(0,ot.jsx)(oot,{table:se,filter:De,data:t},`quick-${De.column}-${gt}`))}),y.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:y.map((De,gt)=>{let Ge=typeof De=="string"?De:De.column,Ut=typeof De=="string"?void 0:De.label;return(0,ot.jsx)(aot,{table:se,column:Ge,title:Ut,data:t},`faceted-${Ge}-${gt}`)})}),n&&(0,ot.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>Oe(!0),children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(ns,{className:"mr-2 h-4 w-4"})}),"Filters",$.length>0&&(0,ot.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:$.length})]})]}),(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o&&ht.length>0&&(0,ot.jsxs)(Er,{children:[(0,ot.jsx)(Ar,{asChild:!0,children:(0,ot.jsxs)(oe,{variant:"outline",size:"sm",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Pn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,ot.jsxs)(kr,{align:"end",children:[ht.includes("csv")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("csv"),children:[(0,ot.jsx)(gx,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ht.includes("json")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("json"),children:[(0,ot.jsx)(f1,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ht.includes("xlsx")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("xlsx"),children:[(0,ot.jsx)(fO,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,ot.jsx)(_rt,{table:se})]})]}),(0,ot.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,ot.jsx)("div",{style:{overflowX:"auto"},children:(0,ot.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,ot.jsx)("thead",{className:"moonui-data-table-header",children:se.getHeaderGroups().map(De=>(0,ot.jsx)("tr",{className:"moonui-data-table-row border-b",children:De.headers.filter(gt=>gt.column.getIsVisible()).map(gt=>(0,ot.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:gt.isPlaceholder?null:(0,ot.jsxs)("div",{className:F("flex items-center space-x-2",gt.column.getCanSort()&&"cursor-pointer select-none"),onClick:gt.column.getCanSort()?fe(gt.column.id):void 0,children:[Gme(gt.column.columnDef.header,gt.getContext()),gt.column.getCanSort()&&(0,ot.jsx)("div",{className:"ml-2",children:gt.column.getIsSorted()==="asc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(mx,{className:"h-4 w-4"})}):gt.column.getIsSorted()==="desc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(om,{className:"h-4 w-4"})}):(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(px,{className:"h-4 w-4"})})})]})},gt.id))},De.id))}),(0,ot.jsx)("tbody",{className:"moonui-data-table-body",children:be?(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:(0,ot.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Mr,{className:"h-4 w-4 animate-spin"})}),(0,ot.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ke?.length?(0,ot.jsx)(ot.Fragment,{children:Ke.map((De,gt)=>{let Ge=De.original.id||De.id,Ut=f&&Y.has(Ge);return(0,ot.jsx)(iot,{row:De,columns:O,isExpanded:Ut,enableExpandable:f,renderSubComponent:p,visibilityState:se.getState().columnVisibility},Ge)})}):(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,ot.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,ot.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("span",{children:[se.getFilteredSelectedRowModel().rows.length," ","of ",se.getFilteredRowModel().rows.length," ","row(s) selected."]})}),(0,ot.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,ot.jsx)("select",{value:se.getState().pagination.pageSize,onChange:async De=>{let gt=Number(De.target.value);I?I({pageIndex:se.getState().pagination.pageIndex,pageSize:gt}):(_e(!0),await new Promise(Ge=>setTimeout(Ge,300)),se.setPageSize(gt),_e(!1))},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:be,children:l.map(De=>(0,ot.jsx)("option",{value:De,children:De},De))})]}),(0,ot.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",se.getState().pagination.pageIndex+1," of"," ",se.getPageCount()]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{I?I({pageIndex:0,pageSize:se.getState().pagination.pageSize}):(_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(0),_e(!1))},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(sO,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(I){let De=se.getState().pagination.pageIndex;I({pageIndex:De-1,pageSize:se.getState().pagination.pageSize})}else _e(!0),await new Promise(De=>setTimeout(De,300)),se.previousPage(),_e(!1)},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(gi,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.nextPage(),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Jn,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(se.getPageCount()-1),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(lO,{className:"h-4 w-4"})})})]})]})]}),n&&(0,ot.jsx)(not,{table:se,open:ve,onOpenChange:Oe})]})}function thr(e,t){return{id:"expander",header:()=>null,size:50,cell:({row:r})=>{let n=r.original.id||r.id,o=e.has(n);return(0,ot.jsx)("button",{onClick:a=>{a.stopPropagation(),t(n)},className:"p-2 hover:bg-muted rounded-md transition-colors","aria-label":o?"Collapse row":"Expand row",children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,ot.jsx)(ca,{className:"h-4 w-4 text-muted-foreground"}):(0,ot.jsx)(Jn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function rhr(e=new Set){let[t,r]=vs.default.useState(e),n=vs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=vs.default.useCallback(i=>{r(new Set(i))},[]),a=vs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var iot=({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("tr",{className:F("border-b transition-colors hover:bg-muted/50",e.getIsSelected()&&"bg-muted",r&&"border-b-0"),children:e.getAllCells().filter(s=>a[s.column.id]!==!1).map(s=>(0,ot.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:Gme(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,ot.jsx)("tr",{className:"border-b",children:(0,ot.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,ot.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,ot.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})};iot.displayName="TableRow";var nhr=Lhe;var An=A(ue(),1);Ur();var u7=A(Ohe(),1);var Qe=A(de(),1),_he=An.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,An.useState)(r||""),s=(0,An.useRef)(void 0);(0,An.useEffect)(()=>{i(r)},[r]);let l=(0,An.useCallback)(c=>{let u=c.target.value;i(u),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(u),e.current&&e.current.focus()},150)},[n,e]);return(0,An.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,Qe.jsx)("div",{className:"p-4 border-b",children:(0,Qe.jsxs)("div",{className:"relative",children:[(0,Qe.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,Qe.jsx)("input",{ref:e,type:"text",placeholder:t,value:a,onChange:l,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",className:"w-full h-10 pl-9 pr-9 text-sm bg-background border border-input rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),o&&(0,Qe.jsxs)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:[(0,Qe.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});_he.displayName="SearchInput";function ohr({sections:e,footer:t,showSearch:r=!0,searchPlaceholder:n="Search...",searchQuery:o="",onSearchChange:a,showThemeToggle:i=!1,theme:s="system",onThemeChange:l,branding:c,collapsible:u=!0,defaultCollapsed:d=!1,floatingActionButton:f=!0,floatingActionButtonPosition:p={bottom:"1rem",left:"1rem"},floatingActionButtonClassName:h,glassmorphism:m=!1,animatedBackground:v=!1,keyboardShortcuts:g=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:w,customStyles:b,fullWidthItems:C=!0,enableNProgress:S=!0,className:P,activePath:T,onNavigate:L}){let[M,N]=(0,An.useState)(!1),[V,_]=(0,An.useState)(!1),[I,k]=(0,An.useState)(d),[R,E]=(0,An.useState)([]),[O,B]=(0,An.useState)(o),[U,D]=(0,An.useState)([]),j=(0,An.useRef)(null);(0,An.useEffect)(()=>{S&&u7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[S]);let $=Xa(0),z=Xa(0),q=Rv($,{stiffness:300,damping:30}),H=Rv(z,{stiffness:300,damping:30});(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q=localStorage.getItem(x);if(Q){let pe=JSON.parse(Q);k(pe.collapsed),E(pe.expandedSections),D(pe.pinnedItems||[])}}},[y,x]),(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q={collapsed:I,expandedSections:R,searchQuery:O,pinnedItems:U,recentItems:[]};localStorage.setItem(x,JSON.stringify(Q)),w?.(Q)}},[I,R,O,U,y,x,w]),(0,An.useEffect)(()=>{let Q=()=>{N(window.innerWidth<768)};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]),(0,An.useEffect)(()=>{let Q=e.filter(pe=>pe.defaultExpanded!==!1).map(pe=>pe.id);E(Q)},[e]),(0,An.useEffect)(()=>{if(!g)return;let Q=pe=>{(pe.metaKey||pe.ctrlKey)&&pe.key==="k"&&(pe.preventDefault(),j.current?.focus()),(pe.metaKey||pe.ctrlKey)&&pe.key==="b"&&(pe.preventDefault(),M?_(!V):k(!I))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[g,M,V,I]),(0,An.useEffect)(()=>{if(!v)return;let Q=pe=>{let Re=document.querySelector(".sidebar-container")?.getBoundingClientRect();Re&&($.set(pe.clientX-Re.left),z.set(pe.clientY-Re.top))};return document.addEventListener("mousemove",Q),()=>document.removeEventListener("mousemove",Q)},[v,$,z]);let K=(0,An.useCallback)(Q=>{E(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),G=(0,An.useCallback)(Q=>{D(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),J=(0,An.useCallback)(Q=>{Q.action?Q.action():Q.href&&(S&&(u7.default.start(),setTimeout(()=>u7.default.done(),500)),L?L(Q.href):window.location.href=Q.href,M&&_(!1))},[L,M,S]);(0,An.useEffect)(()=>{B(o)},[o]);let ae=(0,An.useCallback)(Q=>{B(Q),a?.(Q)},[a]),Z=(0,An.useCallback)((Q,pe)=>pe?Q.filter(Re=>{let fe=Re.title.toLowerCase().includes(pe.toLowerCase()),Ce=Re.items?.some(re=>re.title.toLowerCase().includes(pe.toLowerCase()));return fe||Ce}):Q,[]),Pe=(0,An.useMemo)(()=>O?e.map(Q=>({...Q,filteredItems:Z(Q.items,O).map(pe=>({...pe,filteredChildren:pe.items?Z(pe.items,O):void 0}))})).filter(Q=>Q.filteredItems.length>0):e.map(Q=>({...Q,filteredItems:Q.items.map(pe=>({...pe,filteredChildren:pe.items}))})),[e,O,Z]),be=(0,An.useCallback)(Q=>{let pe=Q.items&&Q.items.length>0;return!pe&&!Q.title?null:(0,Qe.jsxs)("div",{className:F("min-w-[240px] max-w-[320px] p-3",m&&"bg-background/95 backdrop-blur-sm"),children:[(0,Qe.jsx)("div",{className:"font-medium px-2 py-1.5 text-sm",children:Q.title}),pe&&(0,Qe.jsx)("div",{className:"mt-1 space-y-0.5",children:Q.items?.map(Re=>{let fe=Re.href===T,Ce=Re.items&&Re.items.length>0;return(0,Qe.jsx)("div",{className:"relative",children:Ce?(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,Qe.jsxs)("div",{className:"flex items-center gap-2",children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title})]}),(0,Qe.jsx)(Jn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-2 min-w-[200px] max-w-[280px] z-[110]",m&&"bg-background/95 backdrop-blur-sm"),children:(0,Qe.jsx)("div",{className:"space-y-0.5",children:Re.items?.map(re=>{let ye=re.href===T;return(0,Qe.jsxs)("button",{onClick:()=>J(re),disabled:re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",ye&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,Qe.jsx)(pt,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]},re.id)})})})]}):(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title}),Re.badge&&(0,Qe.jsx)(pt,{variant:Re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Re.badge})]})},Re.id)})})]})},[T,m,J]),_e=(0,An.useCallback)((Q,pe=0,Re)=>{let fe=Q.href===T,Ce=U.includes(Q.id),re=Q.items&&Q.items.length>0,ye=R.includes(Q.id),se=I&&!M&&pe===0,ie=Q.tooltip&&!I&&!se,Fe=Q.icon||(pe===0?(0,Qe.jsx)(zd,{className:"h-4 w-4"}):(0,Qe.jsx)(Vd,{className:"h-3 w-3"})),At=(0,Qe.jsxs)("button",{onClick:()=>{re&&!I?K(Q.id):re||J(Q)},className:F("group relative flex items-center gap-3 rounded-lg text-sm transition-all","w-full px-3 py-2.5","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Q.disabled&&"opacity-50 cursor-not-allowed",pe>0&&"ml-6 text-xs py-2",I&&pe===0&&"justify-center px-0 h-12",b?.hover),disabled:Q.disabled,children:[(0,Qe.jsx)("span",{className:F("flex-shrink-0 flex items-center justify-center",I&&pe===0&&"w-full",!I&&"w-5"),children:Fe}),(!I||pe>0)&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("span",{className:"flex-1 text-left truncate",children:Q.title}),Q.badge&&(0,Qe.jsx)(pt,{variant:Q.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Q.badge}),re&&pe===0&&(0,Qe.jsx)(ca,{className:F("h-4 w-4 flex-shrink-0 transition-transform",ye&&"rotate-180")}),Ce&&(0,Qe.jsx)(BO,{className:"h-3 w-3 flex-shrink-0"})]})]});return se?(0,Qe.jsx)("div",{children:(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:At}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,forceMount:!0,className:F("p-0 w-auto min-w-[240px] max-w-[320px] z-[100]",m&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-left-2"),children:(0,Qe.jsx)(ne.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15,ease:"easeOut"},children:be(Q)})})]})},Q.id):(0,Qe.jsxs)("div",{children:[ie?(0,Qe.jsx)(Il,{children:(0,Qe.jsxs)(qs,{children:[(0,Qe.jsx)(Gs,{asChild:!0,children:At}),(0,Qe.jsx)(Rs,{side:"right",children:(0,Qe.jsx)("p",{children:Q.tooltip})})]})}):At,re&&!I&&Re&&(0,Qe.jsx)(Ft,{initial:!1,children:ye&&(0,Qe.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:(0,Qe.jsx)("div",{className:"pt-1 space-y-1",children:Re.map(to=>_e(to,pe+1))})},`${Q.id}-children`)})]},Q.id)},[T,U,R,I,b,J,K,M,m,be,C]),he=An.default.memo(()=>(0,Qe.jsxs)("div",{className:F("flex items-center h-16 px-4 border-b",I&&!M&&"px-0 justify-center"),children:[c&&(0,Qe.jsxs)(Qe.Fragment,{children:[c.logo,(!I||M)&&c.title&&(0,Qe.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),M&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>_(!1),children:(0,Qe.jsx)(lr,{className:"h-4 w-4"})}),!M&&u&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:F("h-8 w-8 p-0 transition-all",!I&&"ml-auto",I&&"mx-auto"),onClick:()=>k(!I),children:(0,Qe.jsx)(ne.div,{animate:{rotate:I?0:180},transition:{duration:.2},children:(0,Qe.jsx)(Jn,{className:"h-4 w-4"})})})]})),Ne=An.default.memo(()=>(0,Qe.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",style:{scrollbarWidth:"thin"},children:(0,Qe.jsxs)("div",{className:"p-4 space-y-6",children:[U.length>0&&(!I||M)&&(0,Qe.jsxs)("div",{children:[(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,Qe.jsx)("div",{className:"space-y-1",children:e.flatMap(Q=>Q.items.filter(pe=>U.includes(pe.id))).map(Q=>_e(Q))}),(0,Qe.jsx)(Ys,{className:"mt-4"})]}),Pe.map((Q,pe)=>(0,Qe.jsxs)("div",{children:[Q.title&&(!I||M)&&(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:Q.title}),(0,Qe.jsx)("div",{className:"space-y-1",children:Q.filteredItems.map(Re=>_e(Re,0,Re.filteredChildren))}),Q.showDivider&&pe<Pe.length-1&&(0,Qe.jsx)(Ys,{className:"mt-4"})]},Q.id))]})}));Ne.displayName="SidebarMenuContent";let ve=An.default.memo(()=>t?(0,Qe.jsxs)("div",{className:"border-t p-4",children:[(0,Qe.jsx)("div",{className:"space-y-1",children:t.items.map(Q=>_e(Q))}),i&&(!I||M)&&(0,Qe.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,Qe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,Qe.jsxs)(Er,{children:[(0,Qe.jsx)(Ar,{asChild:!0,children:(0,Qe.jsxs)(oe,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,Qe.jsx)(gv,{className:"h-3 w-3"}),s==="dark"&&(0,Qe.jsx)(mv,{className:"h-3 w-3"}),s==="system"&&(0,Qe.jsx)(lm,{className:"h-3 w-3"})]})}),(0,Qe.jsxs)(kr,{align:"end",children:[(0,Qe.jsxs)(Ve,{onClick:()=>l?.("light"),children:[(0,Qe.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("dark"),children:[(0,Qe.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("system"),children:[(0,Qe.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null);ve.displayName="SidebarFooter";let Oe=An.default.memo(()=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Ne,{}),(0,Qe.jsx)(ve,{})]}));Oe.displayName="SidebarContent";let Y=F("moonui-pro flex h-full flex-col bg-background border-r transition-all duration-300 ease-in-out",m&&"bg-background/80 backdrop-blur-xl border-white/10",I&&!M&&"w-20",!I&&!M&&"w-64",b?.background,b?.border,P);return M?(0,Qe.jsxs)(Qe.Fragment,{children:[f&&(0,Qe.jsx)(oe,{onClick:()=>_(!0),className:F("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",h),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,Qe.jsx)(sm,{className:"h-5 w-5"})}),(0,Qe.jsx)($w,{open:V,onOpenChange:_,children:(0,Qe.jsx)(Wx,{side:"left",className:"w-80 p-0",children:(0,Qe.jsxs)("div",{className:F(Y,"sidebar-container flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-mobile"),(0,Qe.jsx)(Oe,{})]})})})]}):(0,Qe.jsxs)("aside",{className:F(Y,"sidebar-container hidden md:flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-desktop"),(0,Qe.jsx)(Oe,{})]})}function lot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Qe.jsx)(Rn,{componentName:"Advanced Sidebar",compact:!0,className:F("w-full max-w-xs",e.className)}):(0,Qe.jsx)(ohr,{...e})}var ys=A(ue(),1);Ur();var d7=A(Ohe(),1);var ke=A(de(),1);function ahr({sections:e=[],branding:t,showSearch:r=!0,enableCommandAI:n=!1,commandAIShortcut:o="\u2318K",commandAIPlaceholder:a="Search commands...",onCommandAIOpen:i,onCommandAIClose:s,onCommandAISelect:l,searchPlaceholder:c="Search...",onSearch:u,showThemeToggle:d=!1,theme:f="system",onThemeChange:p,userMenu:h,notifications:m,cta:v,sticky:g=!0,glassmorphism:y=!1,animatedBackground:x=!1,keyboardShortcuts:w=!0,hideNavItems:b=!1,mobileBreakpoint:C=768,customStyles:S,variant:P="default",size:T="md",blur:L=!0,shadow:M=!1,rounded:N=!1,logoPosition:V="left",mobileMenuPosition:_="left",hideOnScroll:I=!1,showScrollProgress:k=!1,maxWidth:R="2xl",fullWidth:E=!1,enableNProgress:O=!0,className:B,activePath:U,onNavigate:D}){let[j,$]=(0,ys.useState)(!1),[z,q]=(0,ys.useState)(!1),[H,K]=(0,ys.useState)(!1),[G,J]=(0,ys.useState)(!1),[ae,Z]=(0,ys.useState)(""),[Pe,be]=(0,ys.useState)(!1),[_e,he]=(0,ys.useState)(!1),[Ne,ve]=(0,ys.useState)(0),Oe=(0,ys.useRef)(0),Y=(0,ys.useRef)(null);(0,ys.useEffect)(()=>{O&&d7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[O]),(0,ys.useEffect)(()=>{let se=()=>{$(window.innerWidth<C)};return se(),window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[C]),(0,ys.useEffect)(()=>{if(!g&&!I&&!k)return;let se=()=>{let ie=window.scrollY;if(be(ie>10),I&&(ie>Oe.current&&ie>100?he(!0):he(!1),Oe.current=ie),k){let Fe=window.scrollY,At=document.documentElement.scrollHeight-document.documentElement.clientHeight,to=Fe/At*100;ve(to)}};return window.addEventListener("scroll",se,{passive:!0}),()=>window.removeEventListener("scroll",se)},[g,I,k]),(0,ys.useEffect)(()=>{if(!w&&!n)return;let se=ie=>{(ie.metaKey||ie.ctrlKey)&&ie.key==="k"&&(ie.preventDefault(),J(!0),n&&i?.())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[w,n,i]);let Q=(0,ys.useCallback)(se=>{se.action?se.action():se.href&&(O&&(d7.default.start(),setTimeout(()=>d7.default.done(),500)),D?D(se.href):window.location.href=se.href,j&&q(!1))},[D,j,O]),pe=(0,ys.useCallback)(se=>{Z(se),u?.(se)},[u]),Re=se=>(0,ke.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:se.map(ie=>(0,ke.jsxs)(B_,{className:F("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{className:"flex-shrink-0",children:ie.icon}),(0,ke.jsx)("div",{className:"text-sm font-medium leading-none",children:ie.title}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]}),ie.description&&(0,ke.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:ie.description})]},ie.id))}),fe=se=>(0,ke.jsx)(ke.Fragment,{children:se.map(ie=>ie.items&&ie.items.length>0?(0,ke.jsxs)(Qd,{children:[(0,ke.jsx)(Zu,{disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(Ju,{children:fe(ie.items)})]},ie.id):(0,ke.jsxs)(Ve,{disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]},ie.id))}),Ce=()=>(0,ke.jsxs)($w,{open:z,onOpenChange:q,children:[(0,ke.jsx)(a$,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,ke.jsx)(sm,{className:"h-5 w-5"})})}),(0,ke.jsx)(Wx,{side:_,className:"w-80 p-0",children:(0,ke.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>q(!1),className:"h-8 w-8",children:(0,ke.jsx)(lr,{className:"h-4 w-4"})})]}),(0,ke.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:!b&&e.map(se=>(0,ke.jsxs)("div",{className:"space-y-1",children:[se.items.map(ie=>(0,ke.jsx)("div",{children:ie.items&&ie.items.length>0?(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-between",disabled:ie.disabled,children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),(0,ke.jsx)(ca,{className:"h-4 w-4"})]})}),(0,ke.jsx)(kr,{align:"start",className:"w-56",children:ie.items&&fe(ie.items)})]}):(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-start",disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]})},ie.id)),(0,ke.jsx)(Ys,{className:"my-2"})]},se.id))})]})})]}),re=()=>{switch(T){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ye=F("moonui-pro w-full transition-all duration-300",P==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",P==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",P==="minimal"&&"bg-background",P==="transparent"&&"bg-transparent",g&&"sticky top-0 z-50",Pe&&g&&P!=="transparent"&&"shadow-sm",Pe&&P==="transparent"&&"bg-background/95 backdrop-blur border-b",_e&&"-translate-y-full",y&&"bg-background/80 backdrop-blur-xl border-white/10",L&&"backdrop-blur-md",M&&"shadow-lg",N&&"rounded-lg",S?.background,S?.border,B);return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("nav",{ref:Y,className:ye,children:[(0,ke.jsxs)("div",{className:F("flex items-center",re(),E?"w-full px-4 sm:px-6 lg:px-8":R==="sm"&&"container max-w-screen-sm"||R==="md"&&"container max-w-screen-md"||R==="lg"&&"container max-w-screen-lg"||R==="xl"&&"container max-w-screen-xl"||R==="2xl"&&"container max-w-screen-2xl"||R==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,ke.jsxs)("div",{className:F("flex items-center gap-2",V==="center"&&!j?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[V==="left"&&_==="left"&&(0,ke.jsx)(Ce,{}),(0,ke.jsxs)("a",{href:t.href||"/",onClick:se=>{t.href&&D&&(se.preventDefault(),D(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!j&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!j&&!b&&(0,ke.jsx)(A_,{className:"hidden md:flex",children:(0,ke.jsx)(L_,{children:e.map(se=>(0,ke.jsx)(ys.default.Fragment,{children:se.items.map(ie=>{let Fe=ie.items&&ie.items.length>0,At=ie.href===U;return Fe?(0,ke.jsxs)(D_,{children:[(0,ke.jsx)(__,{className:F(At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(F_,{children:ie.items&&Re(ie.items)})]},ie.id):(0,ke.jsx)(D_,{children:(0,ke.jsxs)(B_,{className:F(O_(),At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-2",children:ie.badge})]})},ie.id)})},se.id))})}),(0,ke.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,ke.jsx)(ke.Fragment,{children:j?(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>J(!0),children:(0,ke.jsx)(go,{className:"h-5 w-5"})}):(0,ke.jsxs)("div",{className:"relative",children:[(0,ke.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,ke.jsx)(Jt,{type:"search",placeholder:c,className:"w-64 pl-9 pr-4 h-9 cursor-pointer",value:ae,onChange:se=>pe(se.target.value),onClick:()=>{n&&(J(!0),i?.())},readOnly:n}),(w||n)&&(0,ke.jsx)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:n?o:(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})})]})}),d&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",children:[f==="light"&&(0,ke.jsx)(gv,{className:"h-5 w-5"}),f==="dark"&&(0,ke.jsx)(mv,{className:"h-5 w-5"}),f==="system"&&(0,ke.jsx)(lm,{className:"h-5 w-5"})]})}),(0,ke.jsxs)(kr,{align:"end",children:[(0,ke.jsxs)(Ve,{onClick:()=>p?.("light"),children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("dark"),children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("system"),children:[(0,ke.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),m&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",className:"relative",children:[(0,ke.jsx)(Uh,{className:"h-5 w-5"}),m.count&&m.count>0&&(0,ke.jsx)("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1",children:m.count>9?"9+":m.count})]})}),(0,ke.jsxs)(kr,{align:"end",className:"w-[380px] p-0",sideOffset:8,children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ke.jsx)("h4",{className:"text-base font-semibold",children:"Notifications"}),m.count&&m.count>0&&(0,ke.jsxs)(pt,{variant:"secondary",className:"h-5 px-2 rounded-full bg-primary/10 text-primary border-0",children:[m.count," ","new"]})]}),m.items&&m.items.length>0&&(0,ke.jsx)(oe,{variant:"ghost",size:"sm",className:"text-xs h-7 px-2 text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("Mark all as read")},children:"Mark all read"})]}),(0,ke.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:m.items&&m.items.length>0?(0,ke.jsx)("div",{className:"py-1",children:m.items.map((se,ie)=>(0,ke.jsxs)("div",{children:[(0,ke.jsx)("button",{className:F("w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors","focus:outline-none focus:bg-muted/50",!se.read&&"bg-primary/5 hover:bg-primary/10"),onClick:()=>m.onNotificationClick?.(se.id),children:(0,ke.jsxs)("div",{className:"flex gap-3",children:[(0,ke.jsx)("div",{className:"mt-1.5",children:(0,ke.jsx)("div",{className:F("h-2 w-2 rounded-full",se.read?"bg-transparent":"bg-primary")})}),(0,ke.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ke.jsx)("p",{className:F("text-sm leading-tight",se.read?"font-normal":"font-medium"),children:se.title}),se.description&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:se.description}),se.time&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:se.time})]})]})}),ie<(m.items?.length||0)-1&&(0,ke.jsx)("div",{className:"mx-4 border-b"})]},se.id))}):(0,ke.jsxs)("div",{className:"py-12 text-center",children:[(0,ke.jsx)(Uh,{className:"h-10 w-10 mx-auto text-muted-foreground/30 mb-3"}),(0,ke.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"No new notifications"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"You're all caught up!"})]})}),m.items&&m.items.length>0&&(0,ke.jsx)("div",{className:"border-t p-2",children:(0,ke.jsx)(oe,{variant:"ghost",className:"w-full h-8 text-xs text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("View all notifications")},children:"View all notifications"})})]})]}),v&&(0,ke.jsx)(oe,{variant:v.variant||"primary",size:"sm",onClick:()=>{v.action?v.action():v.href&&D&&D(v.href)},className:j?"":"ml-2",children:v.text}),h&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"relative",children:(0,ke.jsxs)(Ga,{className:"h-8 w-8",children:[(0,ke.jsx)(as,{src:h.user?.avatar,alt:h.user?.name}),(0,ke.jsx)(xi,{children:h.user?.name?.charAt(0)||(0,ke.jsx)(dm,{className:"h-4 w-4"})})]})})}),(0,ke.jsxs)(kr,{align:"end",className:"w-56",children:[h.user&&(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("div",{className:"p-2",children:[(0,ke.jsx)("p",{className:"text-sm font-medium",children:h.user.name}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground",children:h.user.email})]}),(0,ke.jsx)(Zr,{})]}),h.items&&fe(h.items)]})]})]})]}),x&&(0,ke.jsx)(ne.div,{className:"absolute inset-0 -z-10 opacity-30",animate:{background:["radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"]},transition:{duration:10,repeat:1/0,ease:"linear"}}),k&&(0,ke.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,ke.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${Ne}%`}})})]}),(0,ke.jsxs)(a_,{open:G,onOpenChange:se=>{J(se),se||s?.()},children:[(0,ke.jsx)(_v,{placeholder:n?a:c,value:ae,onValueChange:pe}),(0,ke.jsxs)(aT,{children:[(0,ke.jsx)(Fv,{children:n?(0,ke.jsxs)("div",{className:"flex flex-col items-center py-6",children:[(0,ke.jsx)(_t,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"No results found"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Try searching for pages, actions, or commands"})]}):"No results found."}),n&&!ae&&(0,ke.jsxs)(Sm,{heading:"Quick Actions",children:[(0,ke.jsxs)(Yd,{onSelect:()=>{let se={id:"home",title:"Go Home",href:"/"};l?.(se),Q(se),J(!1)},children:[(0,ke.jsx)(Wb,{className:"mr-2 h-4 w-4"}),"Go Home",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318H"})]}),(0,ke.jsxs)(Yd,{onSelect:()=>{K(!0),J(!1),l?.({id:"search",title:"Search",action:()=>K(!0)})},children:[(0,ke.jsx)(go,{className:"mr-2 h-4 w-4"}),"Search",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318S"})]}),d&&(0,ke.jsxs)(Yd,{onSelect:()=>{p?.(f==="dark"?"light":"dark"),J(!1)},children:[f==="dark"?(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Switch to Light Mode"]}):(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Switch to Dark Mode"]}),(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318T"})]})]}),e&&e.length>0&&e.map(se=>{if(!se||!se.items||se.items.length===0)return null;let ie=ae?se.items.filter(Fe=>Fe.title.toLowerCase().includes(ae.toLowerCase())||Fe.description?.toLowerCase().includes(ae.toLowerCase())):se.items;return ie.length===0?null:(0,ke.jsx)(Sm,{heading:se.title||se.id,children:ie.map(Fe=>(0,ke.jsxs)(Yd,{disabled:Fe.disabled,onSelect:()=>{n&&l?.(Fe),Q(Fe),J(!1)},children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[Fe.icon&&(0,ke.jsx)("span",{children:Fe.icon}),Fe.title]}),Fe.badge&&(0,ke.jsx)(pt,{variant:Fe.badgeVariant||"secondary",className:"ml-auto",children:Fe.badge}),Fe.description&&n&&(0,ke.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Fe.description})]},Fe.id))},se.id)}),n&&h?.items&&(0,ke.jsx)(Sm,{heading:"Account",children:h.items.map(se=>(0,ke.jsx)(Yd,{disabled:se.disabled,onSelect:()=>{let ie={...se,action:se.onClick||se.action};ie.action?ie.action():ie.href&&(window.location.href=ie.href),l?.(ie),J(!1)},children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[se.icon&&(0,ke.jsx)("span",{children:se.icon}),se.title]})},se.id))})]})]})]})}function cot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,ke.jsx)(Rn,{componentName:"Advanced Navbar",className:F("w-full",e.className)}):(0,ke.jsx)(ahr,{...e})}var Fhe=A(ue(),1);Ur();var Ti=A(ue(),1),fot=A(de(),1),uot=(0,Ti.createContext)(null),zC=()=>{let e=(0,Ti.useContext)(uot);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},dot=({children:e,steps:t,initialStep:r=0,onStepChange:n,onComplete:o,validateOnStepChange:a=!0,allowBackNavigation:i=!0,allowStepSkip:s=!1,autoSave:l=!1,autoSaveDelay:c=2e3,onAutoSave:u,persistData:d=!1,storageKey:f="form-wizard-data"})=>{let[p,h]=(0,Ti.useState)(r),[m,v]=(0,Ti.useState)({}),[g,y]=(0,Ti.useState)(new Set),[x,w]=(0,Ti.useState)(!1),[b,C]=(0,Ti.useState)(null);(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R=localStorage.getItem(f);if(R)try{let E=JSON.parse(R);v(E.stepData||{}),h(E.currentStep||0),y(new Set(E.completedSteps||[]))}catch(E){console.error("Failed to load persisted wizard data:",E)}}},[d,f]),(0,Ti.useEffect)(()=>{if(!l||!u)return;let R=setTimeout(()=>{let E=m[t[p].id];E&&u(t[p].id,E)},c);return()=>clearTimeout(R)},[m,p,l,c,u,t]),(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R={stepData:m,currentStep:p,completedSteps:Array.from(g)};localStorage.setItem(f,JSON.stringify(R))}},[m,p,g,d,f]);let S=(0,Ti.useCallback)(async()=>{let R=t[p];if(R.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(R.requiredFields)){let B=[];if(R.requiredFields.forEach(U=>{let D=O.querySelector(`[name="${U}"], [id="${U}"]`);if(D){let j=D;D.tagName==="INPUT"&&D.type==="checkbox"?D.checked||B.push(U):(!j.value||j.value.trim()==="")&&B.push(U)}}),B.length>0)return C(`Please fill in the following required fields: ${B.join(", ")}`),!1}else{let B=O.querySelectorAll("input[required], select[required], textarea[required]"),U=[];if(B.forEach(j=>{let $=j;if(!$.value||$.value.trim()===""){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Field":$.name||$.id||"Field";U.push(q)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let $=j;if(!$.checked){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Checkbox":$.name||$.id||"Checkbox";U.push(q)}}),U.length>0)return C(`Please fill in the following required fields: ${U.join(", ")}`),!1}}if(!R.validation)return!0;w(!0),C(null);try{let O=await R.validation();if(typeof O=="boolean")return O||C("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let B=O;return B.isValid||(B.error?C(B.error):B.errors&&Array.isArray(B.errors)?C(B.errors.join(", ")):C("Please complete all required fields before proceeding")),B.isValid}return C("Invalid validation response"),!1}catch(O){return C(O instanceof Error?O.message:"Validation failed"),!1}finally{w(!1)}},[p,t]),P=(0,Ti.useCallback)((R,E)=>{v(O=>({...O,[R]:{...O[R],...E}})),C(null)},[]),T=(0,Ti.useCallback)(async R=>{if(R<0||R>=t.length||R===p)return;let E=t[R];if((typeof E.isDisabled=="function"?E.isDisabled(p,t):E.isDisabled)||a&&R>p&&!await S())return;let B=t[p];B.onExit&&await B.onExit(),R>p&&y(D=>new Set([...D,p])),E.onEnter&&await E.onEnter();let U=p;h(R),n?.(R,U)},[p,t,a,S,n]),L=(0,Ti.useCallback)(()=>{T(p+1)},[p,T]),M=(0,Ti.useCallback)(()=>{i&&T(p-1)},[p,T,i]),N=(0,Ti.useCallback)(async()=>{if(await S()&&(y(E=>new Set([...E,p])),o)){w(!0);try{await o(m),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(E){C(E instanceof Error?E.message:"Failed to complete wizard")}finally{w(!1)}}},[p,m,S,o,d,f]),V=(0,Ti.useCallback)(()=>{h(0),v({}),y(new Set),C(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),_=(0,Ti.useCallback)(R=>g.has(R),[g]),I=(0,Ti.useCallback)(R=>{if(R===0||s)return!0;for(let E=0;E<R;E++)if(!g.has(E)&&!t[E].isOptional)return!1;return!0},[g,s,t]),k={steps:t,currentStep:p,stepData:m,isLoading:x,error:b,goToNext:L,goToPrevious:M,goToStep:T,updateStepData:R=>P(t[p].id,R),validateCurrentStep:S,completeWizard:N,resetWizard:V,isStepCompleted:_,isStepAccessible:I,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,fot.jsx)(uot.Provider,{value:k,children:e})};var Pr=A(de(),1),f7=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,Pr.jsx)(Wo,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,Pr.jsx)(ho,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=zC();if(t==="linear")return(0,Pr.jsx)("div",{className:F("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,Pr.jsx)("div",{className:"relative w-full",children:(0,Pr.jsx)("div",{className:F("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&w&&(0,Pr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),a==="top"&&w&&(0,Pr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),o&&(0,Pr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]}),(0,Pr.jsxs)("div",{className:"relative flex items-center w-full",children:[m<c.length-1&&(0,Pr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,Pr.jsx)("div",{className:"h-full bg-border"}),m<u&&(0,Pr.jsx)(ne.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:m*.1},style:{transformOrigin:"left"}})]}),(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},transition:{duration:.2},className:F("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",v&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w&&a==="inside"?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})})]}),(0,Pr.jsx)("div",{className:"mt-3",children:(0,Pr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",m+1," of ",c.length]})})]},h.id)})})}):(0,Pr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,Pr.jsx)(ne.div,{className:"absolute left-6 top-8 w-[2px] bg-primary",initial:{height:0},animate:{height:`${u/(c.length-1)*(100-16)}%`},transition:{duration:.5}})]}),c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},className:F("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",v&&"border-primary bg-primary text-primary-foreground shadow-lg",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})}),(0,Pr.jsx)("div",{className:"ml-16",children:o&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]})})]},h.id)})]})});if(t==="dots")return(0,Pr.jsx)("div",{className:F("flex items-center justify-center space-x-2",e),children:c.map((h,m)=>{let v=m===u,g=d(m);return(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.2:1},className:F("rounded-full transition-all duration-300",v?"w-3 h-3 bg-primary":"w-2 h-2",g&&!v&&"bg-primary/60",!v&&!g&&"bg-muted")},m)})});if(t==="circular"){let h=(u+1)/c.length*100,m=2*Math.PI*45,v=m-h/100*m;return(0,Pr.jsxs)("div",{className:F("relative w-36 h-36 mx-auto",e),children:[(0,Pr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,Pr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,Pr.jsx)(ne.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:m,initial:{strokeDashoffset:m},animate:{strokeDashoffset:v},className:"text-primary",transition:{duration:.5}})]}),(0,Pr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Pr.jsxs)("div",{className:"text-center",children:[(0,Pr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,Pr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var p7=A(ue(),1);var HC=A(de(),1),ihr={slide:{initial:e=>({x:e>0?1e3:-1e3,opacity:0}),animate:{x:0,opacity:1},exit:e=>({x:e<0?1e3:-1e3,opacity:0})},fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},scale:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8}},none:{initial:{},animate:{},exit:{}}},m7=({className:e,animationType:t="slide",animationDuration:r=.3})=>{let{steps:n,currentStep:o,goToNext:a,goToPrevious:i,goToStep:s,updateStepData:l,stepData:c,error:u}=zC(),[d,f]=p7.default.useState(0),p=p7.default.useRef(o);p7.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let h=n[o],m=o===0,v=o===n.length-1,g={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:m,isLastStep:v,stepData:c[h.id]||{},updateStepData:x=>l(h.id,x)},y=typeof h.content=="function"?h.content(g):h.content;return(0,HC.jsx)(Ft,{mode:"wait",custom:d,children:(0,HC.jsx)(ne.div,{custom:d,variants:ihr[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:F("w-full",e),"data-wizard-step-content":!0,children:(0,HC.jsxs)("div",{className:"space-y-4",children:[u&&(0,HC.jsxs)(Zb,{variant:"error",children:[(0,HC.jsx)(On,{className:"h-4 w-4"}),(0,HC.jsx)(Jb,{children:u})]}),y]})},o)})};var Ol=A(de(),1),h7=({className:e,showStepIndicator:t=!0,previousText:r="Previous",nextText:n="Next",completeText:o="Complete",loadingText:a="Processing...",onPreviousClick:i,onNextClick:s,onCompleteClick:l})=>{let{steps:c,currentStep:u,isLoading:d,canGoNext:f,canGoPrevious:p,goToNext:h,goToPrevious:m,completeWizard:v}=zC(),g=u===c.length-1,y=c[u],x=()=>{i?.(),m()},w=()=>{g?(l?.(),v()):(s?.(),h())};return(0,Ol.jsxs)("div",{className:F("flex items-center justify-between",e),children:[(0,Ol.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ol.jsxs)(oe,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:F("transition-all duration-200",!p&&"invisible"),children:[(0,Ol.jsx)(gi,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Ol.jsxs)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"px-3 py-1 text-sm text-muted-foreground",children:["Step ",u+1," of ",c.length,y.isOptional&&(0,Ol.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Ol.jsx)(oe,{type:"button",onClick:w,disabled:d||!f&&!g,className:"min-w-[120px]",children:d?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(Mr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):g?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(on,{className:"w-4 h-4 mr-2"}),o]}):(0,Ol.jsxs)(Ol.Fragment,{children:[n,(0,Ol.jsx)(Jn,{className:"w-4 h-4 ml-1"})]})})]})};var Mi=A(de(),1),pot=Fhe.default.forwardRef(({steps:e,currentStep:t=0,onStepChange:r,onComplete:n,orientation:o="horizontal",progressType:a="linear",allowStepSkip:i=!1,allowBackNavigation:s=!0,validateOnStepChange:l=!0,animationType:c="slide",animationDuration:u=.3,showStepNumbers:d=!0,showStepTitles:f=!0,showProgressBar:p=!0,stepIconPosition:h="top",completedStepIcon:m,activeStepIcon:v,errorStepIcon:g,className:y,progressClassName:x,navigationClassName:w,contentClassName:b,stepClassName:C,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:T,persistData:L=!1,storageKey:M="form-wizard-data"},N)=>(0,Mi.jsx)(dot,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:T,persistData:L,storageKey:M,children:(0,Mi.jsxs)("div",{ref:N,className:F("w-full",y),children:[p&&(0,Mi.jsx)(Mi.Fragment,{children:(0,Mi.jsx)(f7,{className:F("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:h,completedStepIcon:m,activeStepIcon:v,errorStepIcon:g})}),(0,Mi.jsx)($e,{className:F("border-0 shadow-none",b),children:(0,Mi.jsx)(We,{className:"p-0",children:(0,Mi.jsx)(m7,{className:C,animationType:c,animationDuration:u})})}),(0,Mi.jsx)(h7,{className:F("mt-8",w)})]})}));pot.displayName="FormWizardInternal";var G4=Fhe.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Mi.jsx)($e,{className:F("w-full",e.className),children:(0,Mi.jsx)(We,{className:"py-12 text-center",children:(0,Mi.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Mi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mi.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Mi.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Mi.jsx)("a",{href:"/pricing",children:(0,Mi.jsxs)(oe,{size:"sm",children:[(0,Mi.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mi.jsx)(pot,{...e,ref:t})});G4.displayName="MoonUIFormWizardPro";var shr=G4;var bf=A(ue(),1);Ur();var Pt=A(de(),1);function mot(e){let t=[...e];for(let r=t.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t}var lhr=({title:e,description:t,questions:r,onComplete:n,showTimer:o=!0,totalTimeLimit:a,showProgress:i=!0,showQuestionNumbers:s=!0,allowReview:l=!0,allowSkip:c=!0,shuffleQuestions:u=!1,shuffleOptions:d=!1,passingScore:f=70,instantFeedback:p=!1,showHints:h=!1,className:m})=>{let[v]=(0,bf.useState)(()=>u?mot(r):r),[g,y]=(0,bf.useState)({}),[x,w]=(0,bf.useState)([]),[b,C]=(0,bf.useState)(a||0),[S,P]=(0,bf.useState)({}),[T,L]=(0,bf.useState)(!1),[M,N]=(0,bf.useState)(0);(0,bf.useEffect)(()=>{if(!o||!a||T)return;let R=setInterval(()=>{C(E=>E<=1?(_(),0):E-1)},1e3);return()=>clearInterval(R)},[o,a,T]),(0,bf.useEffect)(()=>{if(!o||T)return;let R=setInterval(()=>{N(E=>E+1)},1e3);return()=>clearInterval(R)},[o,T]);let V=(0,bf.useCallback)(()=>{let R=0,E=0;return{results:v.map(B=>{let U=g[B.id],D=B.points||1;E+=D;let j=!1;if(U!=null&&U!==""){if(B.type==="single-choice"||B.type==="true-false")j=U===B.correctAnswer;else if(B.type==="multiple-choice"){let z=Array.isArray(U)?U:[],q=Array.isArray(B.correctAnswer)?B.correctAnswer:[];j=z.length===q.length&&z.every(H=>q.includes(H))}}let $=j?D:0;return R+=$,{questionId:B.id,answer:U,isCorrect:j,points:$,timeSpent:S[B.id]||0}}),score:R,totalScore:E}},[v,g,S]),_=async()=>{let{results:R,score:E,totalScore:O}=V();w(R),L(!0),n&&await n(R,E,O)},I=R=>{let E=Math.floor(R/60),O=R%60;return`${E}:${O.toString().padStart(2,"0")}`},k=v.map((R,E)=>({id:R.id,title:`Question ${E+1}`,description:R.tags?.join(", "),content:({updateStepData:O,goToNext:B})=>{let U=g[R.id],D=d&&R.options?mot(R.options):R.options;(0,bf.useEffect)(()=>{S[R.id]||P($=>({...$,[R.id]:M}))},[]);let j=$=>{y(z=>({...z,[R.id]:$})),p&&R.type};return(0,Pt.jsxs)($e,{className:"border-0 shadow-none",children:[(0,Pt.jsxs)(br,{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,Pt.jsxs)(pt,{variant:"secondary",children:["Question ",E+1," of ",v.length]}),R.points&&R.points>1&&(0,Pt.jsxs)(pt,{variant:"outline",children:[R.points," points"]})]}),(0,Pt.jsx)(zr,{className:"text-xl",children:R.question}),R.description&&(0,Pt.jsx)(Is,{children:R.description})]}),(0,Pt.jsxs)(We,{className:"space-y-4",children:[R.image&&(0,Pt.jsx)("img",{src:R.image,alt:"Question illustration",className:"w-full rounded-lg"}),R.type==="single-choice"&&D&&(0,Pt.jsx)(sP,{value:U||"",onValueChange:j,children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)($x,{value:String($.value),id:`${R.id}-${$.value}`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="multiple-choice"&&D&&(0,Pt.jsx)("div",{className:"space-y-2",children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)(Nc,{id:`${R.id}-${$.value}`,checked:(U||[]).includes($.value),onCheckedChange:q=>{let H=U||[];j(q?[...H,$.value]:H.filter(K=>K!==$.value))}}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="true-false"&&(0,Pt.jsxs)(sP,{value:U?.toString()||"",onValueChange:$=>j($==="true"),children:[(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"true",id:`${R.id}-true`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"false",id:`${R.id}-false`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),R.type==="text"&&(0,Pt.jsx)(nd,{value:U||"",onChange:$=>j($.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),R.type==="rating"&&(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(qw,{value:[U||5],onValueChange:([$])=>j($),max:10,min:1,step:1,className:"w-full"}),(0,Pt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[U||5,"/10"]})]}),h&&R.hint&&(0,Pt.jsx)(Zb,{children:(0,Pt.jsxs)(Jb,{children:[(0,Pt.jsx)("strong",{children:"Hint:"})," ",R.hint]})})]})]})},validation:()=>!(R.required&&!g[R.id]),isOptional:!R.required}));if(T){let{score:R,totalScore:E}=V(),O=Math.round(R/E*100),B=O>=f;return(0,Pt.jsx)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:F("w-full max-w-2xl mx-auto",m),children:(0,Pt.jsxs)($e,{children:[(0,Pt.jsxs)(br,{className:"text-center",children:[(0,Pt.jsx)("div",{className:"mx-auto mb-4",children:(0,Pt.jsx)(e2,{className:F("w-16 h-16",B?"text-yellow-500":"text-muted-foreground")})}),(0,Pt.jsx)(zr,{className:"text-3xl",children:"Quiz Complete!"}),(0,Pt.jsx)(Is,{children:"Here's how you performed"})]}),(0,Pt.jsxs)(We,{className:"space-y-6",children:[(0,Pt.jsxs)("div",{className:"text-center",children:[(0,Pt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,Pt.jsx)(_o,{value:O,className:"h-3 mb-4"}),(0,Pt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Pt.jsxs)("span",{children:["Score: ",R,"/",E]}),(0,Pt.jsx)("span",{children:B?(0,Pt.jsx)(pt,{variant:"success",children:"Passed"}):(0,Pt.jsx)(pt,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,Pt.jsxs)("div",{className:"space-y-2",children:[(0,Pt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((U,D)=>{let j=v.find($=>$.id===U.questionId);return(0,Pt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,Pt.jsxs)("span",{className:"text-sm",children:[s&&`Q${D+1}: `,j?.question.substring(0,50),"..."]}),(0,Pt.jsxs)(pt,{variant:U.isCorrect?"success":"destructive",children:[U.points,"/",j?.points||1]})]},U.questionId)})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(oe,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,Pt.jsx)(wx,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Pn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Cx,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,Pt.jsxs)("div",{className:F("w-full",m),children:[o&&a&&(0,Pt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(Sn,{className:"w-4 h-4"}),(0,Pt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",I(b)]})]}),(0,Pt.jsx)(_o,{value:b/a*100,className:"w-32 h-2"})]}),(0,Pt.jsx)(G4,{steps:k,onComplete:_,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},chr=e=>{let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Pt.jsx)($e,{className:F("w-full",e.className),children:(0,Pt.jsx)(We,{className:"py-12 text-center",children:(0,Pt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Pt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Pt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Pt.jsx)("a",{href:"/pricing",children:(0,Pt.jsxs)(oe,{size:"sm",children:[(0,Pt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Pt.jsx)(lhr,{...e})},uhr=chr;var wf=A(ue(),1);var Qr=A(de(),1),dhr={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function fhr(e,t){let r=e.replace(/\s+/g,"").replace(/[^0-9]/gi,""),n=t==="amex"?r.match(/\d{1,4}/g):r.match(/\d{1,4}/g);return n?n.join(" "):r}function phr(e){let t=e.replace(/\s+/g,"").replace(/[^0-9]/gi,"");return t.length>=2?t.slice(0,2)+(t.length>2?"/"+t.slice(2,4):""):t}function mhr(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(dhr))if(n.test(t))return r;return null}function hhr(e){let t=e.replace(/\s+/g,"");if(!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let o=t.length-1;o>=0;o--){let a=parseInt(t.charAt(o),10);n&&(a*=2,a>9&&(a-=9)),r+=a,n=!n}return r%10===0}function ghr(e){let t=e.split("/");if(t.length!==2)return!1;let r=parseInt(t[0],10),n=parseInt("20"+t[1],10);if(r<1||r>12)return!1;let o=new Date;return new Date(n,r-1)>o}var hot=wf.default.forwardRef(({value:e={number:"",expiry:"",cvc:"",name:""},onChange:t,showCardPreview:r=!0,showCardType:n=!0,showSecurityBadge:o=!0,autoFormat:a=!0,validateOnChange:i=!1,labels:s={},placeholders:l={},errors:c={},className:u,inputClassName:d,labelClassName:f,errorClassName:p,disabled:h,required:m,...v},g)=>{let[y,x]=(0,wf.useState)(null),[w,b]=(0,wf.useState)(null),[C,S]=(0,wf.useState)({}),P=(0,wf.useRef)(null),T=(0,wf.useRef)(null),L=(0,wf.useRef)(null),M=(0,wf.useRef)(null);(0,wf.useEffect)(()=>{let _=mhr(e.number);x(_)},[e.number]),(0,wf.useEffect)(()=>{if(!i)return;let _={};e.number&&!hhr(e.number)&&(_.number="Invalid card number"),e.expiry&&!ghr(e.expiry)&&(_.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(_.cvc="Invalid CVC"),S(_)},[e,i]);let N=(_,I)=>{let k=I;if(a){if(_==="number"){k=fhr(I,y||void 0);let R=y==="amex"?18:19;if(k.length>R)return}else if(_==="expiry"){if(k=phr(I),k.length>5)return}else if(_==="cvc"){k=I.replace(/\D/g,"");let R=y==="amex"?4:3;if(k.length>R)return}}t?.({...e,[_]:k}),a&&(_==="number"&&k.length===(y==="amex"?18:19)?T.current?.focus():_==="expiry"&&k.length===5?L.current?.focus():_==="cvc"&&k.length===(y==="amex"?4:3)&&M.current?.focus())},V={...C,...c};return(0,Qr.jsxs)("div",{ref:g,className:F("space-y-4",u),...v,children:[r&&(0,Qr.jsxs)(ne.div,{className:"relative w-full max-w-md mx-auto h-48 rounded-xl bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700 p-6 text-white shadow-xl overflow-hidden",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,Qr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,Qr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,Qr.jsx)(hx,{className:"w-8 h-8 text-white/80"})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsx)("div",{className:"text-xl font-mono tracking-wider",children:e.number||"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022"}),(0,Qr.jsxs)("div",{className:"flex justify-between",children:[(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,Qr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,Qr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:_=>N("number",_.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:F("pr-20",V.number&&"border-destructive",d),disabled:h}),n&&y&&(0,Qr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),V.number&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.number})]}),(0,Qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsx)(Jt,{ref:T,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:_=>N("expiry",_.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:F(V.expiry&&"border-destructive",d),disabled:h}),V.expiry&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.expiry})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:L,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:_=>N("cvc",_.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:F(V.cvc&&"border-destructive",d),disabled:h}),o&&(0,Qr.jsx)($t,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),V.cvc&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.cvc})]})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsx)(Rt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,Qr.jsx)(Jt,{ref:M,id:"card-name",type:"text",value:e.name,onChange:_=>N("name",_.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:F(V.name&&"border-destructive",d),disabled:h}),V.name&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.name})]})]}),o&&(0,Qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Qr.jsx)($t,{className:"w-4 h-4"}),(0,Qr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});hot.displayName="MoonUICreditCardInputPro";var Hc=A(ue(),1);Ur();var tt=A(de(),1),got=xt("relative w-full rounded-lg border bg-card text-card-foreground shadow-sm",{variants:{variant:{default:"border-border",exam:"border-primary/20 bg-primary/5",personality:"border-secondary/20 bg-secondary/5"},size:{sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"default",size:"md"}}),vot=Hc.default.forwardRef(({className:e,variant:t,size:r,questions:n,settings:o={},onComplete:a,onProgress:i,title:s,description:l,...c},u)=>{let[d,f]=(0,Hc.useState)([]),[p,h]=(0,Hc.useState)(0),[m,v]=(0,Hc.useState)({}),[g,y]=(0,Hc.useState)(!1),[x,w]=(0,Hc.useState)(null),[b,C]=(0,Hc.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Hc.useState)(Date.now()),[T,L]=(0,Hc.useState)(!1),[M,N]=(0,Hc.useState)(0);(0,Hc.useEffect)(()=>{let $=[...n];o.shuffleQuestions&&($=_($)),o.shuffleOptions&&($=$.map(z=>z.options?{...z,options:_([...z.options])}:z)),f($)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Hc.useEffect)(()=>{if(b===null||b<=0||g)return;let $=setInterval(()=>{C(z=>z===null||z<=1?(E(),0):z-1)},1e3);return()=>clearInterval($)},[b,g]),(0,Hc.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let V=d[p],_=$=>{let z=[...$];for(let q=z.length-1;q>0;q--){let H=Math.floor(Math.random()*(q+1));[z[q],z[H]]=[z[H],z[q]]}return z},I=$=>{let z=Date.now()-S;v(q=>({...q,[V.id]:{questionId:V.id,answer:$,timeSpent:z}}))},k=()=>{p<d.length-1?(h($=>$+1),P(Date.now()),L(!1)):E()},R=()=>{p>0&&(h($=>$-1),L(!1))},E=()=>{let $=O();w($),y(!0),N(z=>z+1),a&&a($)},O=()=>{let $=0,z=0,q=[];d.forEach(G=>{let J=m[G.id],ae=G.points||1;$+=ae;let Z=!1;if(J?.answer&&G.correctAnswer!==void 0)switch(G.type){case"single-choice":case"true-false":case"text":Z=J.answer===G.correctAnswer;break;case"multiple-choice":Array.isArray(J.answer)&&Array.isArray(G.correctAnswer)&&(Z=J.answer.length===G.correctAnswer.length&&J.answer.every(Pe=>G.correctAnswer.includes(Pe)));break;case"matching":if(typeof J.answer=="object"&&typeof G.correctAnswer=="object"){let Pe=G.correctAnswer,be=J.answer;Z=Object.keys(Pe).every(_e=>Pe[_e]===be[_e])}break;case"rating":Z=!0;break}Z&&(z+=ae),q.push({questionId:G.id,userAnswer:J?.answer||null,correctAnswer:G.correctAnswer,isCorrect:Z,points:Z?ae:0})});let H=$>0?z/$*100:0,K=Object.values(m).reduce((G,J)=>G+(J.timeSpent||0),0);return{score:z,totalScore:$,percentage:H,passed:o.passingScore?H>=o.passingScore:void 0,answers:q,timeSpent:K,completedAt:new Date}},B=()=>{h(0),v({}),y(!1),w(null),C(o.timeLimit?o.timeLimit*60:null),P(Date.now()),L(!1),o.shuffleQuestions&&f(_([...n]))},U=()=>{if(!x)return;let $={title:s,completedAt:x.completedAt,score:x.score,totalScore:x.totalScore,percentage:x.percentage,passed:x.passed,timeSpent:x.timeSpent,answers:x.answers.map(K=>({question:d.find(J=>J.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},z=new Blob([JSON.stringify($,null,2)],{type:"application/json"}),q=URL.createObjectURL(z),H=document.createElement("a");H.href=q,H.download=`quiz-results-${Date.now()}.json`,H.click(),URL.revokeObjectURL(q)},D=$=>{let z=Math.floor($/60),q=$%60;return`${z}:${q.toString().padStart(2,"0")}`},j=()=>{if(!V)return null;let $=m[V.id]?.answer;switch(V.type){case"single-choice":case"true-false":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>I(K),className:F("w-full text-left p-4 rounded-lg border transition-colors",$===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},G))});case"multiple-choice":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>{let J=Array.isArray($)&&$.includes(K);return(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>{let ae=$||[],Z=J?ae.filter(Pe=>Pe!==K):[...ae,K];I(Z)},className:F("w-full text-left p-4 rounded-lg border transition-colors",J?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,tt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,tt.jsx)("div",{className:F("w-5 h-5 rounded border-2 transition-colors",J?"bg-primary border-primary":"border-border"),children:J&&(0,tt.jsx)(Cl,{className:"w-full h-full text-primary-foreground"})}),K]})},G)})});case"text":return(0,tt.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,tt.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:$||"",onChange:K=>I(K.target.value)})});case"rating":let z=V.maxRating||5,q=typeof $=="number"?$:0;return(0,tt.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,tt.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:z},(K,G)=>G+1).map(K=>(0,tt.jsx)("button",{onClick:()=>I(K),className:"transition-transform hover:scale-110",children:(0,tt.jsx)(Hs,{className:F("w-10 h-10 transition-colors",K<=q?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),V.ratingLabels&&(0,tt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,tt.jsx)("span",{children:V.ratingLabels[0]}),(0,tt.jsx)("span",{children:V.ratingLabels[1]})]})]});case"matching":let H=$||{};return(0,tt.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),V.leftOptions?.map((K,G)=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),V.leftOptions?.map(K=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,tt.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:H[K]||"",onChange:G=>I({...H,[K]:G.target.value}),children:[(0,tt.jsx)("option",{value:"",children:"Select..."}),V.rightOptions?.map(G=>(0,tt.jsx)("option",{value:G,children:G},G))]})},K))]})]});default:return null}};return g&&x?(0,tt.jsx)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:(0,tt.jsxs)(ne.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,tt.jsxs)("div",{className:"text-center",children:[(0,tt.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,tt.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,tt.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,tt.jsx)("div",{className:F("mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full",x.passed?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:x.passed?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Cl,{className:"w-5 h-5"}),"Passed"]}):(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ho,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,tt.jsxs)("div",{className:"space-y-4",children:[(0,tt.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map(($,z)=>{let q=d.find(H=>H.id===$.questionId);return q?(0,tt.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,tt.jsxs)("div",{className:"flex items-start gap-3",children:[$.isCorrect?(0,tt.jsx)(Cl,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,tt.jsxs)("div",{className:"flex-1",children:[(0,tt.jsxs)("p",{className:"font-medium mb-2",children:[z+1,". ",q.question]}),(0,tt.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify($.userAnswer)]}),!$.isCorrect&&q.correctAnswer!==void 0&&(0,tt.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(q.correctAnswer)]}),q.explanation&&(0,tt.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:q.explanation})]})]})},$.questionId):null})]}),(0,tt.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||M<o.maxAttempts)&&(0,tt.jsxs)("button",{onClick:B,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,tt.jsx)(wx,{className:"w-4 h-4"}),"Try Again"]}),(0,tt.jsxs)("button",{onClick:U,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,tt.jsx)(Pn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,tt.jsxs)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,tt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,tt.jsxs)("div",{children:[s&&(0,tt.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,tt.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,tt.jsxs)("div",{className:F("flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium",b<60?"bg-red-100 text-red-700":"bg-muted"),children:[(0,tt.jsx)(Sn,{className:"w-4 h-4"}),D(b)]})]}),(0,tt.jsxs)("div",{className:"mb-6",children:[(0,tt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,tt.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,tt.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,tt.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,tt.jsx)(ne.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,tt.jsx)(Ft,{mode:"wait",children:V&&(0,tt.jsxs)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,tt.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[V.question,V.required&&(0,tt.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&V.hint&&(0,tt.jsxs)("div",{className:"mt-4",children:[(0,tt.jsxs)("button",{onClick:()=>L(!T),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,tt.jsx)(zh,{className:"w-4 h-4"}),T?"Hide":"Show"," Hint"]}),T&&(0,tt.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:V.hint})]}),o.showInstantFeedback&&m[V.id]&&V.correctAnswer!==void 0&&(0,tt.jsx)(ne.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let $=m[V.id].answer,z=!1;switch(V.type){case"single-choice":case"true-false":z=$===V.correctAnswer;break}return(0,tt.jsxs)("div",{className:F("p-3 rounded-lg flex items-start gap-2",z?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[z?(0,tt.jsx)(Cl,{className:"w-5 h-5 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 mt-0.5"}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("p",{className:"font-medium",children:z?"Correct!":"Incorrect"}),V.explanation&&(0,tt.jsx)("p",{className:"text-sm mt-1",children:V.explanation})]})]})})()})]},V.id)}),(0,tt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,tt.jsxs)("button",{onClick:R,disabled:p===0,className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",p===0?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:[(0,tt.jsx)(gi,{className:"w-4 h-4"}),"Previous"]}),(0,tt.jsxs)("button",{onClick:p===d.length-1?E:k,disabled:V?.required&&!m[V.id],className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",V?.required&&!m[V.id]?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"),children:[p===d.length-1?"Complete":"Next",(0,tt.jsx)(Jn,{className:"w-4 h-4"})]})]})]})});vot.displayName="MoonUIQuizFormProInternal";var Bhe=Hc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tt.jsx)($e,{className:F("w-full",e.className),children:(0,tt.jsx)(We,{className:"py-12 text-center",children:(0,tt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,tt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,tt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,tt.jsx)("a",{href:"/pricing",children:(0,tt.jsxs)(oe,{size:"sm",children:[(0,tt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tt.jsx)(vot,{...e,ref:t})});Bhe.displayName="MoonUIQuizFormPro";var Uf=A(ue(),1);var te=A(bt(),1),qn=A(bt(),1);var Nf=A(bt(),1);var sh=A(bt(),1),$he=A(Qn(),1);function Dot(e,t){let r=sh.createContext(t),n=a=>{let{children:i,...s}=a,l=sh.useMemo(()=>s,Object.values(s));return(0,$he.jsx)(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){let i=sh.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Co(e,t=[]){let r=[];function n(a,i){let s=sh.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,v=sh.useMemo(()=>h,Object.values(h));return(0,$he.jsx)(m.Provider,{value:v,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,h=sh.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>sh.createContext(i));return function(s){let l=s?.[e]||a;return sh.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Bhr(o,...t)]}function Bhr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return sh.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var jC=A(bt(),1);var _ot=A(bt(),1);function Oot(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GI(...e){return t=>{let r=!1,n=e.map(o=>{let a=Oot(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():Oot(e[o],null)}}}}function gr(...e){return _ot.useCallback(GI(...e),e)}var _l=A(bt(),1);var sA=A(Qn(),1);function Pu(e){let t=Vhr(e),r=_l.forwardRef((n,o)=>{let{children:a,...i}=n,s=_l.Children.toArray(a),l=s.find(Uhr);if(l){let c=l.props.children,u=s.map(d=>d===l?_l.Children.count(c)>1?_l.Children.only(null):_l.isValidElement(c)?c.props.children:null:d);return(0,sA.jsx)(t,{...i,ref:o,children:_l.isValidElement(c)?_l.cloneElement(c,void 0,u):null})}return(0,sA.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Vhr(e){let t=_l.forwardRef((r,n)=>{let{children:o,...a}=r;if(_l.isValidElement(o)){let i=Hhr(o),s=zhr(a,o.props);return o.type!==_l.Fragment&&(s.ref=n?GI(n,i):i),_l.cloneElement(o,s)}return _l.Children.count(o)>1?_l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fot=Symbol("radix.slottable");function Bot(e){let t=({children:r})=>(0,sA.jsx)(sA.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Fot,t}function Uhr(e){return _l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fot}function zhr(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Hhr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b7=A(Qn(),1),jhr=A(bt(),1);var Whr=A(Qn(),1);function Ly(e){let t=e+"CollectionProvider",[r,n]=Co(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=jC.default.useRef(null),x=jC.default.useRef(new Map).current;return(0,b7.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=Pu(s),c=jC.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=gr(v,x.collectionRef);return(0,b7.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Pu(u),p=jC.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=jC.default.useRef(null),b=gr(v,w),C=a(u,g);return jC.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,b7.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return jC.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var Vot=new WeakMap,fl,Ag,_Gn=(Ag=class extends Map{constructor(r){super(r);rR(this,fl,void 0);tx(this,fl,[...super.keys()]),Vot.set(this,!0)}set(r,n){return Vot.get(this)&&(this.has(r)?Or(this,fl)[Or(this,fl).indexOf(r)]=r:Or(this,fl).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,fl).length,s=Uot(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,fl)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new Ag(this);return a.insert(r,n,o),a}before(r){let n=Or(this,fl).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,fl).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,fl,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,fl).splice(Or(this,fl).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,fl).indexOf(r)}keyAt(r){return Whe(Or(this,fl),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new Ag(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new Ag(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new Ag(n)}toReversed(){let r=new Ag;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new Ag(n)}slice(r,n){let o=new Ag,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},fl=new WeakMap,Ag);function Whe(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=$hr(e,t);return r===-1?void 0:e[r]}function $hr(e,t){let r=e.length,n=Uot(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function Uot(e){return e!==e||e===0?0:Math.trunc(e)}var VGn=!!(typeof window<"u"&&window.document&&window.document.createElement);function it(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lh=A(bt(),1);var zot=A(bt(),1),Mo=globalThis?.document?zot.useLayoutEffect:()=>{};var w7=A(bt(),1);var qhr=lh[" useInsertionEffect ".trim().toString()]||Mo;function Ba({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Ghr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lh.useRef(e!==void 0);lh.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=lh.useCallback(u=>{if(s){let d=Khr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Ghr({defaultProp:e,onChange:t}){let[r,n]=lh.useState(e),o=lh.useRef(r),a=lh.useRef(t);return qhr(()=>{a.current=t},[t]),lh.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Khr(e){return typeof e=="function"}var jGn=Symbol("RADIX:SYNC_STATE");var ilt=A(bt(),1),slt=A(ck(),1);var llt=A(Qn(),1),Qvr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=Qvr.reduce((e,t)=>{let r=Pu(`Primitive.${t}`),n=ilt.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,llt.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&slt.flushSync(()=>e.dispatchEvent(t))}var qc=A(bt(),1);var Rf=A(bt(),1);var clt=A(bt(),1);function Zvr(e,t){return clt.useReducer((r,n)=>t[r][n]??r,e)}var Ai=e=>{let{present:t,children:r}=e,n=Jvr(t),o=typeof r=="function"?r({present:n.isPresent}):Rf.Children.only(r),a=gr(n.ref,eyr(o));return typeof r=="function"||n.isPresent?Rf.cloneElement(o,{ref:a}):null};Ai.displayName="Presence";function Jvr(e){let[t,r]=Rf.useState(),n=Rf.useRef(null),o=Rf.useRef(e),a=Rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Zvr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Rf.useEffect(()=>{let c=zX(n.current);a.current=s==="mounted"?c:"none"},[s]),Mo(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=zX(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Mo(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=zX(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=zX(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function zX(e){return e?.animationName||"none"}function eyr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aye=A(bt(),1);var tyr=aye[" useId ".trim().toString()]||(()=>{}),ryr=0;function za(e){let[t,r]=aye.useState(tyr());return Mo(()=>{e||r(n=>n??String(ryr++))},[e]),e||(t?`radix-${t}`:"")}var uk=A(Qn(),1),HX="Collapsible",[nyr,iye]=Co(HX),[oyr,sye]=nyr(HX),ult=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Ba({prop:n,defaultProp:o??!1,onChange:i,caller:HX});return(0,uk.jsx)(oyr,{scope:r,disabled:a,contentId:za(),open:l,onOpenToggle:qc.useCallback(()=>c(u=>!u),[c]),children:(0,uk.jsx)(wt.div,{"data-state":cye(l),"data-disabled":a?"":void 0,...s,ref:t})})});ult.displayName=HX;var dlt="CollapsibleTrigger",flt=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=sye(dlt,r);return(0,uk.jsx)(wt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":cye(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:it(e.onClick,o.onOpenToggle)})});flt.displayName=dlt;var lye="CollapsibleContent",plt=qc.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sye(lye,e.__scopeCollapsible);return(0,uk.jsx)(Ai,{present:r||o.open,children:({present:a})=>(0,uk.jsx)(ayr,{...n,ref:t,present:a})})});plt.displayName=lye;var ayr=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=sye(lye,r),[s,l]=qc.useState(n),c=qc.useRef(null),u=gr(t,c),d=qc.useRef(0),f=d.current,p=qc.useRef(0),h=p.current,m=i.open||s,v=qc.useRef(m),g=qc.useRef(void 0);return qc.useEffect(()=>{let y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Mo(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(n)}},[i.open,n]),(0,uk.jsx)(wt.div,{"data-state":cye(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:h?`${h}px`:void 0,...e.style},children:m&&o})});function cye(e){return e?"open":"closed"}var mlt=ult,hlt=flt,glt=plt;var jX=A(bt(),1),syr=A(Qn(),1),lyr=jX.createContext(void 0);function Uy(e){let t=jX.useContext(lyr);return e||t||"ltr"}var Vl=A(Qn(),1),zg="Accordion",cyr=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[dye,uyr,dyr]=Ly(zg),[WX,b9n]=Co(zg,[dyr,iye]),fye=iye(),fyr=Nf.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Vl.jsx)(dye.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Vl.jsx)(gyr,{...a,ref:t}):(0,Vl.jsx)(hyr,{...o,ref:t})})});fyr.displayName=zg;var[vlt,pyr]=WX(zg),[ylt,myr]=WX(zg,{collapsible:!1}),hyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Ba({prop:r,defaultProp:n??"",onChange:o,caller:zg});return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:Nf.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Nf.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:a,children:(0,Vl.jsx)(xlt,{...i,ref:t})})})}),gyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Ba({prop:r,defaultProp:n??[],onChange:o,caller:zg}),l=Nf.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=Nf.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Vl.jsx)(xlt,{...a,ref:t})})})}),[vyr,qX]=WX(zg),xlt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=Nf.default.useRef(null),l=gr(s,t),c=uyr(r),d=Uy(o)==="ltr",f=it(e.onKeyDown,p=>{if(!cyr.includes(p.key))return;let h=p.target,m=c().filter(P=>!P.ref.current?.disabled),v=m.findIndex(P=>P.ref.current===h),g=m.length;if(v===-1)return;p.preventDefault();let y=v,x=0,w=g-1,b=()=>{y=v+1,y>w&&(y=x)},C=()=>{y=v-1,y<x&&(y=w)};switch(p.key){case"Home":y=x;break;case"End":y=w;break;case"ArrowRight":a==="horizontal"&&(d?b():C());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?C():b());break;case"ArrowUp":a==="vertical"&&C();break}let S=y%g;m[S].ref.current?.focus()});return(0,Vl.jsx)(vyr,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Vl.jsx)(dye.Slot,{scope:r,children:(0,Vl.jsx)(wt.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),$X="AccordionItem",[yyr,pye]=WX($X),blt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=qX($X,r),i=pyr($X,r),s=fye(r),l=za(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Vl.jsx)(yyr,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Vl.jsx)(mlt,{"data-orientation":a.orientation,"data-state":klt(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});blt.displayName=$X;var wlt="AccordionHeader",Clt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(wlt,r);return(0,Vl.jsx)(wt.h3,{"data-orientation":o.orientation,"data-state":klt(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Clt.displayName=wlt;var uye="AccordionTrigger",Slt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(uye,r),i=myr(uye,r),s=fye(r);return(0,Vl.jsx)(dye.ItemSlot,{scope:r,children:(0,Vl.jsx)(hlt,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});Slt.displayName=uye;var Plt="AccordionContent",Ilt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(Plt,r),i=fye(r);return(0,Vl.jsx)(glt,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{["--radix-accordion-content-height"]:"var(--radix-collapsible-content-height)",["--radix-accordion-content-width"]:"var(--radix-collapsible-content-width)",...e.style}})});Ilt.displayName=Plt;function klt(e){return e?"open":"closed"}var Rlt=blt,Nlt=Clt,mye=Slt,hye=Ilt;var KX=A(bt());var Tlt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),byr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),gye=e=>{let t=byr(e);return t.charAt(0).toUpperCase()+t.slice(1)},GX=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mlt=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var U3=A(bt());var Elt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Alt=(0,U3.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,U3.createElement)("svg",{ref:l,...Elt,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:GX("lucide",o),...!a&&!Mlt(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,U3.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var Ct=(e,t)=>{let r=(0,KX.forwardRef)(({className:n,...o},a)=>(0,KX.createElement)(Alt,{ref:a,iconNode:t,className:GX(`lucide-${Tlt(gye(e))}`,`lucide-${e}`,n),...o}));return r.displayName=gye(e),r};var wyr=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],z3=Ct("align-center",wyr);var Cyr=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],H3=Ct("align-justify",Cyr);var Syr=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],j3=Ct("align-left",Syr);var Pyr=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],$3=Ct("align-right",Pyr);var Iyr=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],W3=Ct("bold",Iyr);var kyr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q0=Ct("check",kyr);var Ryr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dS=Ct("chevron-down",Ryr);var Nyr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],BA=Ct("chevron-left",Nyr);var Tyr=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fS=Ct("chevron-right",Tyr);var Myr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],q3=Ct("chevron-up",Myr);var Eyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zy=Ct("circle-alert",Eyr);var Ayr=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pS=Ct("circle-check-big",Ayr);var Lyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VA=Ct("circle",Lyr);var Dyr=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],G3=Ct("code",Dyr);var Oyr=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],K3=Ct("credit-card",Oyr);var _yr=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],G0=Ct("ellipsis",_yr);var Fyr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],X3=Ct("eye",Fyr);var Byr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Y3=Ct("file-text",Byr);var Vyr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Q3=Ct("file",Vyr);var Uyr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],UA=Ct("image",Uyr);var zyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zA=Ct("info",zyr);var Hyr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Z3=Ct("italic",Hyr);var jyr=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],J3=Ct("link",jyr);var $yr=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],eV=Ct("list-ordered",$yr);var Wyr=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],tV=Ct("list",Wyr);var qyr=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jp=Ct("loader-circle",qyr);var Gyr=[["path",{d:"M5 12h14",key:"1ays0h"}]],rV=Ct("minus",Gyr);var Kyr=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],nV=Ct("music",Kyr);var Xyr=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],oV=Ct("palette",Xyr);var Yyr=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],aV=Ct("phone",Yyr);var Qyr=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],iV=Ct("quote",Qyr);var Zyr=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],sV=Ct("redo",Zyr);var Jyr=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lV=Ct("search",Jyr);var exr=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Tf=Ct("square-pen",exr);var txr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],cV=Ct("strikethrough",txr);var rxr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mS=Ct("triangle-alert",rxr);var nxr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],uV=Ct("underline",nxr);var oxr=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],dV=Ct("undo",oxr);var axr=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],fV=Ct("upload",axr);var ixr=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pV=Ct("video",ixr);var sxr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K0=Ct("x",sxr);function Llt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Llt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function XX(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Llt(e))&&(n&&(n+=" "),n+=t);return n}var xye="-",lxr=e=>{let t=uxr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(xye);return s[0]===""&&s.length!==1&&s.shift(),_lt(s,t)||cxr(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},_lt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?_lt(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(xye);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Dlt=/^\[(.+)\]$/,cxr=e=>{if(Dlt.test(e)){let t=Dlt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},uxr=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fxr(Object.entries(e.classGroups),r).forEach(([a,i])=>{yye(i,n,a,t)}),n},yye=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Olt(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dxr(o)){yye(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{yye(i,Olt(t,a),r,n)})})},Olt=(e,t)=>{let r=e;return t.split(xye).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dxr=e=>e.isThemeGetter,fxr=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pxr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Flt="!",mxr=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let v=0;v<s.length;v++){let g=s[v];if(c===0){if(g===o&&(n||s.slice(v,v+a)===t)){l.push(s.slice(u,v)),u=v+a;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Flt),h=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},hxr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gxr=e=>({cache:pxr(e.cacheSize),parseClassName:mxr(e),...lxr(e)}),vxr=/\s+/,yxr=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vxr),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),h=!!p,m=n(h?f.substring(0,p):f);if(!m){if(!h){s=c+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=c+(s.length>0?" "+s:s);continue}h=!1}let v=hxr(u).join(":"),g=d?v+Flt:v,y=g+m;if(a.includes(y))continue;a.push(y);let x=o(m,h);for(let w=0;w<x.length;++w){let b=x[w];a.push(g+b)}s=c+(s.length>0?" "+s:s)}return s};function xxr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Blt(t))&&(n&&(n+=" "),n+=r);return n}var Blt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Blt(e[n]))&&(r&&(r+=" "),r+=t);return r};function bxr(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gxr(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=yxr(l,r);return o(l,u),u}return function(){return a(xxr.apply(null,arguments))}}var ui=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vlt=/^\[(?:([a-z-]+):)?(.+)\]$/i,wxr=/^\d+\/\d+$/,Cxr=new Set(["px","full","screen"]),Sxr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pxr=/\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$/,Ixr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kxr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rxr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X0=e=>HA(e)||Cxr.has(e)||wxr.test(e),hS=e=>jA(e,"length",Oxr),HA=e=>!!e&&!Number.isNaN(Number(e)),vye=e=>jA(e,"number",HA),mV=e=>!!e&&Number.isInteger(Number(e)),Nxr=e=>e.endsWith("%")&&HA(e.slice(0,-1)),mn=e=>Vlt.test(e),gS=e=>Sxr.test(e),Txr=new Set(["length","size","percentage"]),Mxr=e=>jA(e,Txr,Ult),Exr=e=>jA(e,"position",Ult),Axr=new Set(["image","url"]),Lxr=e=>jA(e,Axr,Fxr),Dxr=e=>jA(e,"",_xr),hV=()=>!0,jA=(e,t,r)=>{let n=Vlt.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Oxr=e=>Pxr.test(e)&&!Ixr.test(e),Ult=()=>!1,_xr=e=>kxr.test(e),Fxr=e=>Rxr.test(e);var Bxr=()=>{let e=ui("colors"),t=ui("spacing"),r=ui("blur"),n=ui("brightness"),o=ui("borderColor"),a=ui("borderRadius"),i=ui("borderSpacing"),s=ui("borderWidth"),l=ui("contrast"),c=ui("grayscale"),u=ui("hueRotate"),d=ui("invert"),f=ui("gap"),p=ui("gradientColorStops"),h=ui("gradientColorStopPositions"),m=ui("inset"),v=ui("margin"),g=ui("opacity"),y=ui("padding"),x=ui("saturate"),w=ui("scale"),b=ui("sepia"),C=ui("skew"),S=ui("space"),P=ui("translate"),T=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",mn,t],N=()=>[mn,t],V=()=>["",X0,hS],_=()=>["auto",HA,mn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",mn],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[HA,mn];return{cacheSize:500,separator:":",theme:{colors:[hV],spacing:[X0,hS],blur:["none","",gS,mn],brightness:U(),borderColor:[e],borderRadius:["none","","full",gS,mn],borderSpacing:N(),borderWidth:V(),contrast:U(),grayscale:O(),hueRotate:U(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Nxr,hS],inset:M(),margin:M(),opacity:U(),padding:N(),saturate:U(),scale:U(),sepia:O(),skew:U(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",mn]}],container:["container"],columns:[{columns:[gS]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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"],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:[...I(),mn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mV,mn]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",mn]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",mV,mn]}],"grid-cols":[{"grid-cols":[hV]}],"col-start-end":[{col:["auto",{span:["full",mV,mn]},mn]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[hV]}],"row-start-end":[{row:["auto",{span:[mV,mn]},mn]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",mn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",mn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",mn,t]}],"min-w":[{"min-w":[mn,t,"min","max","fit"]}],"max-w":[{"max-w":[mn,t,"none","full","min","max","fit","prose",{screen:[gS]},gS]}],h:[{h:[mn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[mn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gS,hS]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vye]}],"font-family":[{font:[hV]}],"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:["tighter","tight","normal","wide","wider","widest",mn]}],"line-clamp":[{"line-clamp":["none",HA,vye]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X0,mn]}],"list-image":[{"list-image":["none",mn]}],"list-style-type":[{list:["none","disc","decimal",mn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X0,hS]}],"underline-offset":[{"underline-offset":["auto",X0,mn]}],"text-decoration-color":[{decoration:[e]}],"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",mn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Exr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mxr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Lxr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[X0,mn]}],"outline-w":[{outline:[X0,hS]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[X0,hS]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gS,Dxr]}],"shadow-color":[{shadow:[hV]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",gS,mn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",mn]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",mn]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",mn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[mV,mn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",mn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",mn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],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",mn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X0,hS,vye]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}};var zlt=bxr(Bxr);var W=A(Qn(),1);var Hlt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jlt=XX,Kn=(e,t)=>r=>{var n;if(t?.variants==null)return jlt(e,r?.class,r?.className);let{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{let u=r?.[c],d=a?.[c];if(u===null)return null;let f=Hlt(u)||Hlt(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...a,...s}[m]):{...a,...s}[m]===v})?[...c,d,f]:c},[]);return jlt(e,i,l,r?.class,r?.className)};var gh=A(bt(),1);var $A=A(bt(),1);function di(e){let t=$A.useRef(e);return $A.useEffect(()=>{t.current=e}),$A.useMemo(()=>(...r)=>t.current?.(...r),[])}var Klt=A(Glt(),1);function Xlt(){return(0,Klt.useSyncExternalStore)(Kxr,()=>!0,()=>!1)}function Kxr(){return()=>{}}var gV=A(Qn(),1),wye="Avatar",[Xxr,oXn]=Co(wye),[Yxr,Qlt]=Xxr(wye),Zlt=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=gh.useState("idle");return(0,gV.jsx)(Yxr,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,gV.jsx)(wt.span,{...n,ref:t})})});Zlt.displayName=wye;var Jlt="AvatarImage",ect=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=Qlt(Jlt,r),s=Qxr(n,a),l=di(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mo(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,gV.jsx)(wt.img,{...a,ref:t,src:n}):null});ect.displayName=Jlt;var tct="AvatarFallback",rct=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=Qlt(tct,r),[i,s]=gh.useState(n===void 0);return gh.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,gV.jsx)(wt.span,{...o,ref:t}):null});rct.displayName=tct;function Ylt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Qxr(e,{referrerPolicy:t,crossOrigin:r}){let n=Xlt(),o=gh.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=gh.useState(()=>Ylt(a,e));return Mo(()=>{s(Ylt(a,e))},[a,e]),Mo(()=>{let l=d=>()=>{s(d)};if(!a)return;let c=l("loaded"),u=l("error");return a.addEventListener("load",c),a.addEventListener("error",u),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",u)}},[a,r,t]),i}var Cye=Zlt,Sye=ect,Pye=rct;var e5=A(Qn(),1),Wy=A(bt(),1);var nct=A(bt(),1),qA=(0,nct.createContext)({});var oct=A(bt(),1);function Hy(e){let t=(0,oct.useRef)(null);return t.current===null&&(t.current=e()),t.current}var YX=A(bt(),1);var GA=typeof window<"u";var KA=GA?YX.useLayoutEffect:YX.useEffect;var oxe=A(Qn(),1),iut=A(bt(),1),ZV=A(bt(),1);var act=A(bt(),1),vS=(0,act.createContext)(null);var out=A(Qn(),1);function dk(e,t){e.indexOf(t)===-1&&e.push(t)}function Hg(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hc=(e,t,r)=>r>t?t:r<e?e:r;var Y0=()=>{},Gc=()=>{};var Mu={};var vV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yV(e){return typeof e=="object"&&e!==null}var xV=e=>/^0[^.\s]+$/u.test(e);function fk(e){let t;return()=>(t===void 0&&(t=e()),t)}var es=e=>e;var Jxr=(e,t)=>r=>t(e(r)),jg=(...e)=>e.reduce(Jxr);var vh=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Q0=class{constructor(){this.subscriptions=[]}add(t){return dk(this.subscriptions,t),()=>Hg(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Os=e=>e*1e3,Kc=e=>e/1e3;function bV(e,t){return t?e*(1e3/t):0}var ict=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var sct=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,e0r=1e-7,t0r=12;function r0r(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=sct(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>e0r&&++s<t0r);return i}function yS(e,t,r,n){if(e===t&&r===n)return es;let o=a=>r0r(a,0,1,e,r);return a=>a===0||a===1?a:sct(o(a),t,n)}var QX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ZX=e=>t=>1-e(1-t);var JX=yS(.33,1.53,.69,.99),XA=ZX(JX),wV=QX(XA);var CV=e=>(e*=2)<1?.5*XA(e):.5*(2-Math.pow(2,-10*(e-1)));var SV=e=>1-Math.sin(Math.acos(e)),PV=ZX(SV),IV=QX(SV);var Iye=yS(.42,0,1,1),kye=yS(0,0,.58,1),kV=yS(.42,0,.58,1);var RV=e=>Array.isArray(e)&&typeof e[0]!="number";function NV(e,t){return RV(e)?e[ict(0,e.length,t)]:e}var TV=e=>Array.isArray(e)&&typeof e[0]=="number";var lct={linear:es,easeIn:Iye,easeInOut:kV,easeOut:kye,circIn:SV,circInOut:IV,circOut:PV,backIn:XA,backInOut:wV,backOut:JX,anticipate:CV},n0r=e=>typeof e=="string",eY=e=>{if(TV(e)){Gc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return yS(t,r,n,o)}else if(n0r(e))return Gc(lct[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lct[e];return e};var MV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Mf={value:null,addProjectionMetrics:null};function cct(e,t){let r=new Set,n=new Set,o=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(s)}let u={schedule:(d,f=!1,p=!1)=>{let m=p&&o?r:n;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(s=d,o){a=!0;return}o=!0,[r,n]=[n,r],r.forEach(c),t&&Mf.value&&Mf.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var o0r=40;function tY(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=MV.reduce((x,w)=>(x[w]=cct(a,t?w:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let x=Mu.useManualTiming?o.timestamp:performance.now();r=!1,Mu.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,o0r),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},v=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:MV.reduce((x,w)=>{let b=i[w];return x[w]=(C,S=!1,P=!1)=>(r||v(),b.schedule(C,S,P)),x},{}),cancel:x=>{for(let w=0;w<MV.length;w++)i[MV[w]].cancel(x)},state:o,steps:i}}var{schedule:hn,cancel:Eu,state:bs,steps:EV}=tY(typeof requestAnimationFrame<"u"?requestAnimationFrame:es,!0);var rY;function a0r(){rY=void 0}var ws={now:()=>(rY===void 0&&ws.set(bs.isProcessing||Mu.useManualTiming?bs.timestamp:performance.now()),rY),set:e=>{rY=e,queueMicrotask(a0r)}};var $g={layout:0,mainThread:0,waapi:0};var uct=e=>t=>typeof t=="string"&&t.startsWith(e),pk=uct("--"),i0r=uct("var(--"),mk=e=>i0r(e)?s0r.test(e.split("/*")[0].trim()):!1,s0r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var jy={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Z0={...jy,transform:e=>hc(0,1,e)},AV={...jy,default:1};var xS=e=>Math.round(e*1e5)/1e5;var YA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dct(e){return e==null}var fct=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var QA=(e,t)=>r=>!!(typeof r=="string"&&fct.test(r)&&r.startsWith(e)||t&&!dct(r)&&Object.prototype.hasOwnProperty.call(r,t)),nY=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(YA);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var l0r=e=>hc(0,255,e),Rye={...jy,transform:e=>Math.round(l0r(e))},$y={test:QA("rgb","red"),parse:nY("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Rye.transform(e)+", "+Rye.transform(t)+", "+Rye.transform(r)+", "+xS(Z0.transform(n))+")"};function c0r(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var LV={test:QA("#"),parse:c0r,transform:$y.transform};var DV=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wg=DV("deg"),Au=DV("%"),hr=DV("px"),Nye=DV("vh"),Tye=DV("vw"),oY=(()=>({...Au,parse:e=>Au.parse(e)/100,transform:e=>Au.transform(e*100)}))();var bS={test:QA("hsl","hue"),parse:nY("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Au.transform(xS(t))+", "+Au.transform(xS(r))+", "+xS(Z0.transform(n))+")"};var Li={test:e=>$y.test(e)||LV.test(e)||bS.test(e),parse:e=>$y.test(e)?$y.parse(e):bS.test(e)?bS.parse(e):LV.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$y.transform(e):bS.transform(e),getAnimatableNone:e=>{let t=Li.parse(e);return t.alpha=0,Li.transform(t)}};var pct=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function u0r(e){return isNaN(e)&&typeof e=="string"&&(e.match(YA)?.length||0)+(e.match(pct)?.length||0)>0}var hct="number",gct="color",d0r="var",f0r="var(",mct="${}",p0r=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wS(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(p0r,l=>(Li.test(l)?(n.color.push(a),o.push(gct),r.push(Li.parse(l))):l.startsWith(f0r)?(n.var.push(a),o.push(d0r),r.push(l)):(n.number.push(a),o.push(hct),r.push(parseFloat(l))),++a,mct)).split(mct);return{values:r,split:s,indexes:n,types:o}}function vct(e){return wS(e).values}function yct(e){let{split:t,types:r}=wS(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===hct?a+=xS(o[i]):s===gct?a+=Li.transform(o[i]):a+=o[i]}return a}}var m0r=e=>typeof e=="number"?0:Li.test(e)?Li.getAnimatableNone(e):e;function h0r(e){let t=vct(e);return yct(e)(t.map(m0r))}var Lu={test:u0r,parse:vct,createTransformer:yct,getAnimatableNone:h0r};function Mye(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xct({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=Mye(l,s,e+1/3),a=Mye(l,s,e),i=Mye(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function ZA(e,t){return r=>r>0?t:e}var Vn=(e,t,r)=>e+(t-e)*r;var Eye=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},g0r=[LV,$y,bS],v0r=e=>g0r.find(t=>t.test(e));function bct(e){let t=v0r(e);if(Y0(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===bS&&(r=xct(r)),r}var Aye=(e,t)=>{let r=bct(e),n=bct(t);if(!r||!n)return ZA(e,t);let o={...r};return a=>(o.red=Eye(r.red,n.red,a),o.green=Eye(r.green,n.green,a),o.blue=Eye(r.blue,n.blue,a),o.alpha=Vn(r.alpha,n.alpha,a),$y.transform(o))};var aY=new Set(["none","hidden"]);function wct(e,t){return aY.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function y0r(e,t){return r=>Vn(e,t,r)}function iY(e){return typeof e=="number"?y0r:typeof e=="string"?mk(e)?ZA:Li.test(e)?Aye:w0r:Array.isArray(e)?Cct:typeof e=="object"?Li.test(e)?Aye:x0r:ZA}function Cct(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>iY(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function x0r(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=iY(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function b0r(e,t){let r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let a=t.types[o],i=e.indexes[a][n[a]],s=e.values[i]??0;r[o]=s,n[a]++}return r}var w0r=(e,t)=>{let r=Lu.createTransformer(t),n=wS(e),o=wS(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?aY.has(e)&&!o.values.length||aY.has(t)&&!n.values.length?wct(e,t):jg(Cct(b0r(n,o),o.values),r):(Y0(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ZA(e,t))};function sY(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Vn(e,t,r):iY(e)(e,t)}var Sct=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>hn.update(t,r),stop:()=>Eu(t),now:()=>bs.isProcessing?bs.timestamp:ws.now()}};var lY=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function JA(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function OV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(JA(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Kc(o)}}var C0r=5;function cY(e,t,r){let n=Math.max(t-C0r,0);return bV(r-e(n),t-n)}var fi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Dye=.001;function Pct({duration:e=fi.duration,bounce:t=fi.bounce,velocity:r=fi.velocity,mass:n=fi.mass}){let o,a;Y0(e<=Os(fi.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hc(fi.minDamping,fi.maxDamping,i),e=hc(fi.minDuration,fi.maxDuration,Kc(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=uY(c,i),h=Math.exp(-d);return Dye-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=uY(Math.pow(c,2),i);return(-o(c)+Dye>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Dye+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=P0r(o,a,s);if(e=Os(e),isNaN(l))return{stiffness:fi.stiffness,damping:fi.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var S0r=12;function P0r(e,t,r){let n=r;for(let o=1;o<S0r;o++)n=n-e(n)/t(n);return n}function uY(e,t){return e*Math.sqrt(1-t*t)}var I0r=["duration","bounce"],k0r=["stiffness","damping","mass"];function Ict(e,t){return t.some(r=>e[r]!==void 0)}function R0r(e){let t={velocity:fi.velocity,stiffness:fi.stiffness,damping:fi.damping,mass:fi.mass,isResolvedFromDuration:!1,...e};if(!Ict(e,k0r)&&Ict(e,I0r))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fi.mass,stiffness:o,damping:a}}else{let r=Pct(e);t={...t,...r,mass:fi.mass},t.isResolvedFromDuration=!0}return t}function J0(e=fi.visualDuration,t=fi.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=R0r({...r,velocity:-Kc(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=i-a,g=Kc(Math.sqrt(l/u)),y=Math.abs(v)<5;n||(n=y?fi.restSpeed.granular:fi.restSpeed.default),o||(o=y?fi.restDelta.granular:fi.restDelta.default);let x;if(m<1){let b=uY(g,m);x=C=>{let S=Math.exp(-m*g*C);return i-S*((h+m*g*v)/b*Math.sin(b*C)+v*Math.cos(b*C))}}else if(m===1)x=b=>i-Math.exp(-g*b)*(v+(h+g*v)*b);else{let b=g*Math.sqrt(m*m-1);x=C=>{let S=Math.exp(-m*g*C),P=Math.min(b*C,300);return i-S*((h+m*g*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=b===0?h:0;m<1&&(S=b===0?Os(h):cY(x,b,C));let P=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=P&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(JA(w),2e4),C=lY(S=>w.next(b*S).value,b,30);return b+"ms "+C},toTransition:()=>{}};return w}J0.applyToOptions=e=>{let t=OV(e,100,J0);return e.ease=t.ease,e.duration=Os(t.duration),e.type="keyframes",e};function _V({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);let y=P=>-m*Math.exp(-P/n),x=P=>g+y(P),w=P=>{let T=y(P),L=x(P);f.done=Math.abs(T)<=c,f.value=f.done?g:L},b,C,S=P=>{p(f.value)&&(b=P,C=J0({keyframes:[f.value,h(f.value)],velocity:cY(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let T=!1;return!C&&b===void 0&&(T=!0,w(P),S(P)),b!==void 0&&P>=b?C.next(P-b):(!T&&w(P),f)}}}function N0r(e,t,r){let n=[],o=r||Mu.mix||sY,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||es:t;s=jg(l,s)}n.push(s)}return n}function dY(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Gc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=N0r(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=vh(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hc(e[0],e[a-1],u)):c}function FV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=vh(0,t,n);e.push(Vn(r,1,o))}}function BV(e){let t=[0];return FV(t,e.length-1),t}function kct(e,t){return e.map(r=>r*t)}function T0r(e,t){return e.map(()=>t||kV).splice(0,e.length-1)}function hk({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=RV(n)?n.map(eY):eY(n),a={done:!1,value:t[0]},i=kct(r&&r.length===t.length?r:BV(t),e),s=dY(i,t,{ease:Array.isArray(o)?o:T0r(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var M0r=e=>e!==null;function eL(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(M0r),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var E0r={decay:_V,inertia:_V,tween:hk,keyframes:hk,spring:J0};function fY(e){typeof e.type=="string"&&(e.type=E0r[e.type])}var CS=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var A0r=e=>e/100,eb=class extends CS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==ws.now()&&this.tick(ws.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$g.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;fY(t);let{type:r=hk,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||hk;l!==hk&&typeof s[0]!="number"&&(this.mixKeyframes=jg(A0r,sY(s[0],s[1])),s=[0,100]);let c=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=JA(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:o,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,w=n;if(d){let P=Math.min(this.currentTime,o)/s,T=Math.floor(P),L=P%1;!L&&P>=1&&(L=1),L===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(w=i)),x=hc(0,1,L)*s}let b=y?{done:!1,value:u[0]}:w.next(x);a&&(b.value=a(b.value));let{done:C}=b;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&h!==_V&&(b.value=eL(u,this.options,v,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Kc(this.calculatedDuration)}get time(){return Kc(this.currentTime)}set time(t){t=Os(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ws.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Kc(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=Sct,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ws.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$g.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Rct(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gk=e=>e*180/Math.PI,Oye=e=>{let t=gk(Math.atan2(e[1],e[0]));return _ye(t)},L0r={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oye,rotateZ:Oye,skewX:e=>gk(Math.atan(e[1])),skewY:e=>gk(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_ye=e=>(e=e%360,e<0&&(e+=360),e),Nct=Oye,Tct=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Mct=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),D0r={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tct,scaleY:Mct,scale:e=>(Tct(e)+Mct(e))/2,rotateX:e=>_ye(gk(Math.atan2(e[6],e[5]))),rotateY:e=>_ye(gk(Math.atan2(-e[2],e[0]))),rotateZ:Nct,rotate:Nct,skewX:e=>gk(Math.atan(e[4])),skewY:e=>gk(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function VV(e){return e.includes("scale")?1:0}function UV(e,t){if(!e||e==="none")return VV(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=D0r,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=L0r,o=s}if(!o)return VV(t);let a=n[t],i=o[1].split(",").map(O0r);return typeof a=="function"?a(i):i[a]}var Fye=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return UV(r,t)};function O0r(e){return parseFloat(e.trim())}var qg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$p=(()=>new Set(qg))();var Bye=e=>e===jy||e===hr,_0r=new Set(["x","y","z"]),F0r=qg.filter(e=>!_0r.has(e));function Ect(e){let t=[];return F0r.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var SS={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UV(t,"x"),y:(e,{transform:t})=>UV(t,"y")};SS.translateX=SS.x;SS.translateY=SS.y;var vk=new Set,Vye=!1,Uye=!1,zye=!1;function Act(){if(Uye){let e=Array.from(vk).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=Ect(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{n.getValue(a)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Uye=!1,Vye=!1,vk.forEach(e=>e.complete(zye)),vk.clear()}function Lct(){vk.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uye=!0)})}function Hye(){zye=!0,Lct(),Act(),zye=!1}var tb=class{constructor(t,r,n,o,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(vk.add(this),Vye||(Vye=!0,hn.read(Lct),hn.resolveKeyframes(Act))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){let a=o?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){let s=n.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),o&&a===void 0&&o.set(t[0])}Rct(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vk.delete(this)}cancel(){this.state==="scheduled"&&(vk.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Dct=e=>e.startsWith("--");function Oct(e,t,r){Dct(t)?e.style.setProperty(t,r):e.style[t]=r}var _ct=fk(()=>window.ScrollTimeline!==void 0);var Fct={};function Bct(e,t){let r=fk(e);return()=>Fct[t]??r()}var pY=Bct(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var yk=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var jye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yk([0,.65,.55,1]),circOut:yk([.55,0,1,.45]),backIn:yk([.31,.01,.66,-.59]),backOut:yk([.33,1.53,.69,.99])};function $ye(e,t){if(e)return typeof e=="function"?pY()?lY(e,t):"ease-out":TV(e)?yk(e):Array.isArray(e)?e.map(r=>$ye(r,t)||jye.easeOut):jye[e]}function Vct(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){let u={[t]:r};l&&(u.offset=l);let d=$ye(s,o);Array.isArray(d)&&(u.easing=d),Mf.value&&$g.waapi++;let f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};c&&(f.pseudoElement=c);let p=e.animate(u,f);return Mf.value&&p.finished.finally(()=>{$g.waapi--}),p}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function Uct({type:e,...t}){return xk(e)&&pY()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var mY=class extends CS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:n,keyframes:o,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Gc(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=Uct(t);this.animation=Vct(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=eL(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):Oct(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Kc(Number(t))}get time(){return Kc(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Os(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_ct()?(this.animation.timeline=t,es):r(this)}};var zct={anticipate:CV,backInOut:wV,circInOut:IV};function B0r(e){return e in zct}function Hct(e){typeof e.ease=="string"&&B0r(e.ease)&&(e.ease=zct[e.ease])}var jct=10,hY=class extends mY{constructor(t){Hct(t),fY(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:o,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new eb({...i,autoplay:!1}),l=Os(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-jct).value,s.sample(l).value,jct),s.stop()}};var Wye=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lu.test(e)||e==="0")&&!e.startsWith("url("));function V0r(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function $ct(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Wye(o,t),s=Wye(a,t);return Y0(i===s,`You are trying to animate ${t} from "${o}" to "${a}". "${i?a:o}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:V0r(e)||(r==="spring"||xk(r))&&n}function tL(e){e.duration=0,e.type}var U0r=new Set(["opacity","clipPath","filter","transform"]),z0r=fk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wct(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=t.owner.getProps();return z0r()&&r&&U0r.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var H0r=40,zV=class extends CS{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ws.now();let f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||tb;this.keyframeResolver=new p(s,(h,m,v)=>this.onKeyframesResolved(h,m,f,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=ws.now(),$ct(t,a,i,s)||((Mu.instantAnimations||!l)&&u?.(eL(t,n,r)),t[0]=t[t.length-1],tL(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>H0r?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&Wct(f)?new hY({...f,element:f.motionValue.owner.current}):new eb(f);p.finished.then(()=>this.notifyFinished()).catch(es),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hye()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var gY=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t){let r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,o)=>{n&&n(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var HV=class extends gY{then(t,r){return this.finished.finally(t).then(()=>{})}};var j0r=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $0r(e){let t=j0r.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var W0r=4;function qye(e,t,r=1){Gc(r<=W0r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=$0r(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return vV(i)?parseFloat(i):i}return mk(o)?qye(o,t,r+1):o}function bk(e,t){return e?.[t]??e?.default??e}var jV=new Set(["width","height","top","left","right","bottom",...qg]);var qct={test:e=>e==="auto",parse:e=>e};var vY=e=>t=>t.test(e);var Gye=[jy,hr,Au,Wg,Tye,Nye,qct],Kye=e=>Gye.find(vY(e));function Gct(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var q0r=new Set(["brightness","contrast","saturate","opacity"]);function G0r(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(YA)||[];if(!n)return e;let o=r.replace(n,""),a=q0r.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var K0r=/\b([a-z-]*)\(.*?\)/gu,$V={...Lu,getAnimatableNone:e=>{let t=e.match(K0r);return t?t.map(G0r).join(" "):e}};var Xye={...jy,transform:Math.round};var Kct={rotate:Wg,rotateX:Wg,rotateY:Wg,rotateZ:Wg,scale:AV,scaleX:AV,scaleY:AV,scaleZ:AV,skew:Wg,skewX:Wg,skewY:Wg,distance:hr,translateX:hr,translateY:hr,translateZ:hr,x:hr,y:hr,z:hr,perspective:hr,transformPerspective:hr,opacity:Z0,originX:oY,originY:oY,originZ:hr};var wk={borderWidth:hr,borderTopWidth:hr,borderRightWidth:hr,borderBottomWidth:hr,borderLeftWidth:hr,borderRadius:hr,radius:hr,borderTopLeftRadius:hr,borderTopRightRadius:hr,borderBottomRightRadius:hr,borderBottomLeftRadius:hr,width:hr,maxWidth:hr,height:hr,maxHeight:hr,top:hr,right:hr,bottom:hr,left:hr,padding:hr,paddingTop:hr,paddingRight:hr,paddingBottom:hr,paddingLeft:hr,margin:hr,marginTop:hr,marginRight:hr,marginBottom:hr,marginLeft:hr,backgroundPositionX:hr,backgroundPositionY:hr,...Kct,zIndex:Xye,fillOpacity:Z0,strokeOpacity:Z0,numOctaves:Xye};var Xct={...wk,color:Li,backgroundColor:Li,outlineColor:Li,fill:Li,stroke:Li,borderColor:Li,borderTopColor:Li,borderRightColor:Li,borderBottomColor:Li,borderLeftColor:Li,filter:$V,WebkitFilter:$V},WV=e=>Xct[e];function qV(e,t){let r=WV(e);return r!==$V&&(r=Lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var X0r=new Set(["auto","none","0"]);function Yct(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!X0r.has(a)&&wS(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=qV(r,o)}var GV=class extends tb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),mk(c))){let u=qye(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!jV.has(n)||t.length!==2)return;let[o,a]=t,i=Kye(o),s=Kye(a);if(i!==s)if(Bye(i)&&Bye(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else SS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Gct(t[o]))&&n.push(o);n.length&&Yct(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=SS[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);let a=n.length-1,i=n[a];n[a]=SS[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function KV(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}var XV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function YV(e){return yV(e)&&"offsetHeight"in e}var Qct=30,Y0r=e=>!isNaN(parseFloat(e)),Ck={current:void 0},yY=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=ws.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=ws.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Y0r(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Q0);let n=this.events[t].add(r);return t==="change"?()=>{n(),hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ck.current&&Ck.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ws.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qct)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Qct);return bV(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ef(e,t){return new yY(e,t)}var{schedule:Sk,cancel:Q0r}=tY(queueMicrotask,!1);var yh={x:!1,y:!1};function xY(){return yh.x||yh.y}function Yye(e){return e==="x"||e==="y"?yh[e]?null:(yh[e]=!0,()=>{yh[e]=!1}):yh.x||yh.y?null:(yh.x=yh.y=!0,()=>{yh.x=yh.y=!1})}function bY(e,t){let r=KV(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Zct(e){return!(e.pointerType==="touch"||xY())}function Qye(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{if(!Zct(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{Zct(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Zye=(e,t)=>t?e===t?!0:Zye(e,t.parentElement):!1;var Pk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Z0r=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jct(e){return Z0r.has(e.tagName)||e.tabIndex!==-1}var rL=new WeakSet;function eut(e){return t=>{t.key==="Enter"&&e(t)}}function Jye(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tut=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=eut(()=>{if(rL.has(r))return;Jye(r,"down");let o=eut(()=>{Jye(r,"up")}),a=()=>Jye(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function rut(e){return Pk(e)&&!xY()}function exe(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{let l=s.currentTarget;if(!rut(s))return;rL.add(l);let c=t(l,s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),rL.has(l)&&rL.delete(l),rut(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Zye(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),YV(s)&&(s.addEventListener("focus",c=>tut(c,o)),!Jct(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Ik(e){return yV(e)&&"ownerSVGElement"in e}function QV(e){return Ik(e)&&e.tagName==="svg"}function txe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=dY(o,a,i);return t?s(n):s}var Eo=e=>!!(e&&e.getVelocity);var J0r=[...Gye,Li,Lu],rxe=e=>J0r.find(vY(e));var wY=A(bt(),1),rb=A(bt(),1);var nut=A(bt(),1),PS=(0,nut.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var nxe=class extends wY.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=YV(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function aut({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,rb.useId)(),a=(0,rb.useRef)(null),i=(0,rb.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,rb.useContext)(PS);return(0,rb.useInsertionEffect)(()=>{let{width:l,height:c,top:u,left:d,right:f}=i.current;if(t||!a.current||!l||!c)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=o;let h=document.createElement("style");s&&(h.nonce=s);let m=n??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
414
|
+
`)}function Ymr(e,t){if(!t||t.length===0)return JSON.stringify(e,null,2);let r=e.map(n=>{let o={};return t.forEach(a=>{a in n&&(o[a]=n[a])}),o});return JSON.stringify(r,null,2)}function Qmr(e,t,r){let n=new Blob([e],{type:r}),o=URL.createObjectURL(n),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}async function eot(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=Xmr(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=Ymr(e,o),s="application/json;charset=utf-8;",l="json";break;case"xlsx":throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");default:throw new Error(`Unsupported export format: ${r}`)}let c=`${n}-${new Date().toISOString().split("T")[0]}.${l}`;Qmr(i,c,s)}function tot(e,t){return e.filter(r=>{let n=r.id||r.accessorKey;return n&&t[n]!==!1}).map(r=>r.id||r.accessorKey).filter(Boolean)}var qI=A(ue(),1),rot=A(uv(),1);var zt=A(de(),1),Zmr={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",in:"In",notIn:"Not in",isNull:"Is empty",isNotNull:"Is not empty"};function Jmr(e){switch(e){case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"date":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"boolean":return["equals","notEquals","isNull","isNotNull"];case"select":return["equals","notEquals","in","notIn","isNull","isNotNull"];default:return["equals","notEquals","contains","notContains","startsWith","endsWith","isNull","isNotNull"]}}function not({table:e,open:t,onOpenChange:r,position:n="right",width:o="400px",filters:a,onFiltersChange:i,customFilters:s,matchAll:l,onMatchAllChange:c}){let[u,d]=(0,qI.useState)([]),[f,p]=(0,qI.useState)(!0),h=a||u,m=i||d,v=l!==void 0?l:f,g=c||p,y=(0,qI.useMemo)(()=>e.getAllColumns().filter(T=>T.id==="select"||T.id==="actions"||T.id==="expander"?!1:T.getCanFilter()),[e]),x=()=>{let T=y[0];if(!T)return;let L={column:T.id,operator:"contains",value:""};m([...h,L])},w=(T,L)=>{let M=[...h];M[T]={...M[T],...L},m(M)},b=T=>{m(h.filter((L,M)=>M!==T))},C=()=>{m([]),e.resetColumnFilters()},S=()=>{e.resetColumnFilters(),[...new Set(h.map(L=>L.column))].forEach(L=>{let M=e.getColumn(L);M&&M.setFilterValue({custom:!0,filters:h,matchAll:v})}),h.length===0&&e.resetColumnFilters(),r(!1)};if(typeof document>"u")return null;let P=(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20",style:{zIndex:9998},onClick:()=>r(!1)})}),(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:F("fixed top-0 bottom-0 bg-background border-l shadow-xl",n==="right"?"right-0":"left-0"),style:{width:o,zIndex:9999},children:(0,zt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(ns,{className:"h-5 w-5"}),(0,zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),h.length>0&&(0,zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",h.length," active)"]})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,zt.jsxs)("div",{className:"mb-6",children:[(0,zt.jsx)(Rt,{className:"text-sm font-medium mb-2 block",children:"Match conditions"}),(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(oe,{variant:v?"primary":"outline",size:"sm",onClick:()=>g(!0),className:"flex-1",children:"Match all"}),(0,zt.jsx)(oe,{variant:v?"outline":"primary",size:"sm",onClick:()=>g(!1),className:"flex-1",children:"Match any"})]})]}),(0,zt.jsx)(Ys,{className:"mb-6"}),s&&(0,zt.jsxs)(zt.Fragment,{children:[s,(0,zt.jsx)(Ys,{className:"my-6"})]}),(0,zt.jsx)("div",{className:"space-y-4",children:h.map((T,L)=>(0,zt.jsx)(ehr,{filter:T,columns:y,onUpdate:M=>w(L,M),onRemove:()=>b(L)},L))}),(0,zt.jsxs)(oe,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,zt.jsx)(Vi,{className:"h-4 w-4 mr-2"}),"Add filter"]})]}),(0,zt.jsx)("div",{className:"p-4 border-t space-y-2",children:(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsxs)(oe,{variant:"outline",onClick:C,disabled:h.length===0,className:"flex-1",children:[(0,zt.jsx)(Ss,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,zt.jsx)(oe,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]});return(0,rot.createPortal)(P,document.body)}function ehr({filter:e,columns:t,onUpdate:r,onRemove:n}){let a=t.find(p=>p.id===e.column)?.columnDef,i=a?.meta?.filterType||"string",s=a?.meta?.filterOptions,l=a?.meta?.filterValueAccessor,c=Jmr(i),u=e.operator!=="isNull"&&e.operator!=="isNotNull",d=e.operator==="in"||e.operator==="notIn",f=qI.default.useMemo(()=>i!=="select"&&!s?null:s||null,[i,s]);return(0,zt.jsxs)("div",{className:"space-y-2 p-3 border rounded-lg bg-muted/30",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsxs)(Qo,{value:e.column,onValueChange:p=>r({column:p}),children:[(0,zt.jsx)(Zo,{className:"flex-1",children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:t.map(p=>{let h=p.columnDef.header,m=typeof h=="function"?p.id:h||p.id;return(0,zt.jsx)(Bt,{value:p.id,children:m},p.id)})})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)(Qo,{value:e.operator,onValueChange:p=>r({operator:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:c.map(p=>(0,zt.jsx)(Bt,{value:p,children:Zmr[p]},p))})]}),u&&(0,zt.jsx)("div",{children:i==="boolean"?(0,zt.jsxs)(Qo,{value:String(e.value),onValueChange:p=>r({value:p==="true"}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsxs)(Jo,{style:{zIndex:1e4},children:[(0,zt.jsx)(Bt,{value:"true",children:"True"}),(0,zt.jsx)(Bt,{value:"false",children:"False"})]})]}):(i==="select"||f)&&!d?(0,zt.jsxs)(Qo,{value:e.value||"",onValueChange:p=>r({value:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{placeholder:"Select value..."})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:f?.map(p=>(0,zt.jsx)(Bt,{value:p,children:p},p))})]}):(i==="select"||f)&&d?(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Select multiple values:"}),(0,zt.jsx)("div",{className:"space-y-1 max-h-32 overflow-y-auto border rounded-md p-2",children:f?.map(p=>{let h=Array.isArray(e.value)?e.value:[],m=h.includes(p);return(0,zt.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded",children:[(0,zt.jsx)("input",{type:"checkbox",checked:m,onChange:v=>{let g=v.target.checked?[...h,p]:h.filter(y=>y!==p);r({value:g})},className:"rounded border-gray-300"}),(0,zt.jsx)("span",{className:"text-sm",children:p})]},p)})})]}):i==="number"?(0,zt.jsx)(Jt,{type:"number",value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."}):d?(0,zt.jsx)(Jt,{value:Array.isArray(e.value)?e.value.join(", "):e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter values separated by comma..."}):(0,zt.jsx)(Jt,{value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."})})]})}var Ay=A(ue(),1);var ya=A(de(),1);function oot({table:e,filter:t,data:r}){let[n,o]=(0,Ay.useState)(!1),[a,i]=(0,Ay.useState)(""),s=Ay.default.useMemo(()=>{let g=e.getColumn(t.column);return g||(g=e.getAllColumns().find(x=>x.id===t.column||x.columnDef.accessorKey===t.column)),g},[e,t.column]),l=(0,Ay.useMemo)(()=>{if(t.options&&t.options!=="auto")return t.options;let g=new Set;return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}x!=null&&x!==""&&g.add(String(x))}),Array.from(g).sort()},[r,t.column,t.options]),c=s?.getFilterValue(),u=(0,Ay.useMemo)(()=>c?Array.isArray(c)?new Set(c):new Set([String(c)]):new Set,[c]),d=(0,Ay.useMemo)(()=>{if(!t.showCounts)return{};let g={};return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}if(x!=null&&x!==""){let w=String(x);g[w]=(g[w]||0)+1}}),g},[r,t.column,t.showCounts]),f=g=>{if(s)if(t.multi){let y=new Set(u);y.has(g)?y.delete(g):y.add(g),y.size===0?s.setFilterValue(void 0):s.setFilterValue(Array.from(y))}else u.has(g)?s.setFilterValue(void 0):s.setFilterValue(g)},p=()=>{s?.setFilterValue(void 0),i("")},h=t.label||t.column,m=(0,Ay.useMemo)(()=>a?l.filter(g=>g.toLowerCase().includes(a.toLowerCase())):l,[l,a]),v=!s||l.length===0;return(0,ya.jsxs)(ls,{open:n,onOpenChange:o,children:[(0,ya.jsx)(cs,{asChild:!0,children:(0,ya.jsxs)(oe,{variant:"outline",size:"sm",disabled:v,className:F("h-8 border-dashed",u.size>0&&"border-solid"),children:[h,u.size>0&&(0,ya.jsxs)(ya.Fragment,{children:[(0,ya.jsx)("span",{className:"mx-2 h-4 w-px bg-border"}),(0,ya.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:u.size})]})]})}),(0,ya.jsx)(Wi,{className:"w-[250px] p-0",align:"start",children:(0,ya.jsxs)("div",{className:"p-2",children:[l.length>0&&(0,ya.jsx)("div",{className:"pb-2",children:(0,ya.jsxs)("div",{className:"relative",children:[(0,ya.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,ya.jsx)(Jt,{placeholder:`Search ${h.toLowerCase()}...`,value:a,onChange:g=>i(g.target.value),className:"h-8 w-full pl-8"})]})}),l.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No options available"}):m.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No results found"}):(0,ya.jsx)("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:m.map(g=>{let y=u.has(g);return(0,ya.jsxs)("button",{onClick:()=>f(g),className:F("flex w-full items-center justify-between rounded px-2 py-1.5 text-sm hover:bg-accent",y&&"bg-accent"),children:[(0,ya.jsxs)("div",{className:"flex items-center",children:[(0,ya.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,ya.jsx)(on,{className:"h-4 w-4"})}),(0,ya.jsx)("span",{children:g})]}),t.showCounts&&d[g]!==void 0&&(0,ya.jsx)("span",{className:"text-xs text-muted-foreground",children:d[g]})]},g)})}),u.size>0&&(0,ya.jsx)("div",{className:"border-t mt-2 pt-2",children:(0,ya.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-center",onClick:p,children:"Clear filter"})})]})})]})}var q4=A(ue(),1);var Bn=A(de(),1);function aot({table:e,column:t,title:r,options:n="auto",data:o}){let a=e.getColumn(t),[i,s]=(0,q4.useState)("");if(!a)return null;let l=a.columnDef,c=l?.meta?.filterValueAccessor,u=l?.meta?.filterOptions,d=b=>c?c(b):b[t],{availableOptions:f,optionCounts:p}=(0,q4.useMemo)(()=>{let b={},C=new Set;o.forEach(P=>{let T=d(P);if(T!=null&&T!==""){let L=String(T);C.add(L),b[L]=(b[L]||0)+1}});let S=[];return n!=="auto"?S=n:u?S=u.map(P=>({value:P,label:P})):S=Array.from(C).sort().slice(0,50).map(P=>({value:P,label:P})),{availableOptions:S,optionCounts:b}},[o,n,u]),h=a.getFilterValue(),m=new Set(h||[]),v=(0,q4.useMemo)(()=>i?f.filter(b=>(b.label||b.value).toLowerCase().includes(i.toLowerCase())):f,[f,i]),g=r||a.columnDef.header||t,y=b=>{let C=new Set(m);C.has(b)?C.delete(b):C.add(b),C.size===0?a.setFilterValue(void 0):a.setFilterValue(Array.from(C))},x=()=>{a.setFilterValue(void 0),s("")},w=()=>{let b=v.map(C=>C.value);a.setFilterValue(b)};return(0,Bn.jsxs)(ls,{children:[(0,Bn.jsx)(cs,{asChild:!0,children:(0,Bn.jsxs)(oe,{variant:"outline",size:"sm",className:F("h-8 border-dashed",m.size>0&&"border-solid"),children:[(0,Bn.jsx)(jb,{className:"mr-2 h-4 w-4"}),g,m.size>0&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{orientation:"vertical",className:"mx-2 h-4"}),(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:m.size}),(0,Bn.jsx)("div",{className:"hidden space-x-1 lg:flex",children:m.size>2?(0,Bn.jsxs)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[m.size," selected"]}):Array.from(m).slice(0,2).map(b=>{let C=f.find(S=>S.value===b);return(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:C?.label||b},b)})})]})]})}),(0,Bn.jsxs)(Wi,{className:"w-[300px] p-0",align:"start",children:[(0,Bn.jsx)("div",{className:"p-3",children:(0,Bn.jsxs)("div",{className:"relative",children:[(0,Bn.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Bn.jsx)(Jt,{placeholder:`Search ${g.toLowerCase()}...`,value:i,onChange:b=>s(b.target.value),className:"h-8 pl-8"})]})}),(0,Bn.jsx)(Ys,{}),(0,Bn.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:v.length===0?(0,Bn.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No results found"}):(0,Bn.jsx)("div",{className:"p-2",children:v.map(b=>{let C=m.has(b.value),S=p[b.value]||0;return(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start font-normal",onClick:()=>y(b.value),children:[(0,Bn.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,Bn.jsx)(on,{className:F("h-4 w-4")})}),b.icon&&(0,Bn.jsx)("span",{className:"mr-2",children:b.icon}),(0,Bn.jsx)("span",{className:"flex-1 text-left",children:b.label||b.value}),S>0&&(0,Bn.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:S})]},b.value)})})}),(m.size>0||v.length>0)&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{}),(0,Bn.jsxs)("div",{className:"flex items-center justify-between p-2",children:[m.size>0?(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:x,className:"h-8 px-2 lg:px-3",children:["Clear",(0,Bn.jsx)(lr,{className:"ml-2 h-4 w-4"})]}):(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:w,className:"h-8 px-2 lg:px-3",children:["Select all",(0,Bn.jsx)(on,{className:"ml-2 h-4 w-4"})]}),(0,Bn.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.size," of ",f.length," selected"]})]})]})]})]})}var ot=A(de(),1);function Lhe({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,pageSizeOptions:l=[5,10,20,50,100],className:c,onRowSelect:u,onExport:d,enableExpandable:f=!1,renderSubComponent:p,expandedRows:h,onRowExpandChange:m,bulkActions:v=[],quickFilters:g=[],facetedFilters:y=[],features:x={},theme:w={},texts:b={},enableSorting:C=!0,enableFiltering:S=!0,enablePagination:P=!0,enableColumnVisibility:T=!0,enableRowSelection:L,filterPlaceholder:M="Search all columns...",defaultPageSize:N,manualPagination:V=!1,pageCount:_,onPaginationChange:I,onSortingChange:k,onColumnFiltersChange:R,state:E}){let O=vs.default.useMemo(()=>e.map(De=>{let{enableHiding:gt,...Ge}=De;return{...Ge,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:B,isLoading:U}=st();if(!U&&!B)return(0,ot.jsx)(Rn,{componentName:"Data Table",className:F("w-full",c)});let[D,j]=vs.default.useState([]),[$,z]=vs.default.useState([]),[q,H]=vs.default.useState({}),[K,G]=vs.default.useState({}),[J,ae]=vs.default.useState(""),[Z,Pe]=vs.default.useState({pageIndex:0,pageSize:N||s||10}),[be,_e]=vs.default.useState(!1),[he,Ne]=vs.default.useState(new Set),[ve,Oe]=vs.default.useState(!1),Y=h||he,Q=m?De=>m(De):Ne,pe=N||s,Re=vs.default.useMemo(()=>t,[t]),fe=De=>()=>{let Ge=(E?.sorting??D).find(jr=>jr.id===De),Ut=[];Ge?Ge.desc?Ut=[]:Ut=[{id:De,desc:!0}]:Ut=[{id:De,desc:!1}];let qt=k!==void 0?k:j;typeof qt=="function"&&qt(Ut)},Ce=vs.default.useRef(null),re=vs.default.useCallback(De=>{let gt=typeof De=="function"?De(K):De;if(G(gt),u&&Ce.current){let Ge=Object.keys(gt).filter(qt=>gt[qt]),Ut=Ce.current.getRowModel().rows.filter(qt=>Ge.includes(qt.id)).map(qt=>qt.original);u(Ut)}},[K,u]),ye=vs.default.useMemo(()=>{let De=O.map(Ge=>!Ge.id&&Ge.accessorKey?{...Ge,id:Ge.accessorKey}:Ge),gt=De.some(Ge=>{if(Ge.id==="select")return!0;let Ut=Ge.header?.toString()||"",qt=Ge.cell?.toString()||"";return Ut.includes("Checkbox")||qt.includes("Checkbox")});return(a||L)&&!gt&&(De=[{id:"select",header:({table:Ut})=>{let qt=Ut.getIsAllPageRowsSelected(),jr=Ut.getIsSomePageRowsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt?!0:jr?"indeterminate":!1,onCheckedChange:gn=>{Ut.toggleAllPageRowsSelected(!!gn)},"aria-label":"Select all",className:"h-4 w-4"})})},cell:({row:Ut})=>{let qt=Ut.getIsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt,onCheckedChange:jr=>Ut.toggleSelected(!!jr),disabled:!Ut.getCanSelect(),"aria-label":"Select row",className:"h-4 w-4"},`select-${Ut.id}-${qt}`)})},enableSorting:!1,enableHiding:!1,size:40,maxSize:40},...De]),De},[O,a,L]),se=Ort({data:Re,columns:ye,onSortingChange:k!==void 0?k:j,onColumnFiltersChange:R!==void 0?R:z,onPaginationChange:I!==void 0?I:Pe,getCoreRowModel:Ert(),getPaginationRowModel:Lrt(),getSortedRowModel:Drt(),getFilteredRowModel:Art(),enableSortingRemoval:!0,enableMultiSort:!1,sortDescFirst:!1,onColumnVisibilityChange:H,onRowSelectionChange:re,onGlobalFilterChange:ae,globalFilterFn:"includesString",enableRowSelection:a||L||!1,filterFns:{custom:(De,gt,Ge)=>{if(Array.isArray(Ge)){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return Ge.includes(String(ja))}if(typeof Ge=="string"||typeof Ge=="number"||typeof Ge=="boolean"){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return String(ja)===String(Ge)}if(!Ge?.custom||!Ge?.filters)return!0;let Ut=Ge.filters,qt=Ge.matchAll!==void 0?Ge.matchAll:!0,jr=Ut.map(gn=>{let ja=se.getColumn(gn.column)?.columnDef?.meta?.filterValueAccessor,Vr=ja?ja(De.original):De.getValue(gn.column),Cn=gn.value;switch(gn.operator){case"equals":return Vr===Cn;case"notEquals":return Vr!==Cn;case"contains":return String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"notContains":return!String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"startsWith":return String(Vr).toLowerCase().startsWith(String(Cn).toLowerCase());case"endsWith":return String(Vr).toLowerCase().endsWith(String(Cn).toLowerCase());case"greaterThan":return Number(Vr)>Number(Cn);case"lessThan":return Number(Vr)<Number(Cn);case"greaterThanOrEqual":return Number(Vr)>=Number(Cn);case"lessThanOrEqual":return Number(Vr)<=Number(Cn);case"in":return Array.isArray(Cn)?Cn.includes(Vr):String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"notIn":return Array.isArray(Cn)?!Cn.includes(Vr):!String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"isNull":return Vr==null||Vr==="";case"isNotNull":return Vr!=null&&Vr!=="";default:return!0}});return qt?jr.every(gn=>gn):jr.some(gn=>gn)}},manualPagination:V,pageCount:_,state:{sorting:E?.sorting??D,columnFilters:E?.columnFilters??$,columnVisibility:E?.columnVisibility??q,rowSelection:E?.rowSelection??K,globalFilter:E?.globalFilter??J,pagination:E?.pagination??Z},initialState:{pagination:{pageSize:pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:(De,gt)=>{let Ge=De;return Ge.id!==void 0&&Ge.id!==null&&Ge.id!==""?String(Ge.id):Ge.orderId!==void 0&&Ge.orderId!==null?String(Ge.orderId):Ge.orderNumber!==void 0&&Ge.orderNumber!==null?String(Ge.orderNumber):Ge.email?`email-${Ge.email}`:Ge.name&&Ge.email?`${Ge.name}-${Ge.email}`:Ge.name?`name-${Ge.name}-${gt}`:String(gt)}});Ce.current=se;let ie=se.getState(),Fe=se.getRowModel(),At=vs.default.useRef(Fe.rows),to=vs.default.useMemo(()=>{let De=At.current!==Fe.rows;return De&&(At.current=Fe.rows),De},[Fe.rows]),Ke=At.current,Je={sorting:x.sorting!==!1,filtering:x.filtering!==!1||n,pagination:x.pagination!==!1||i,search:x.search!==!1||r,columnVisibility:x.columnVisibility!==!1,rowSelection:x.rowSelection!==!1||a,export:x.export!==!1||o},Se=async De=>{let gt=se.getFilteredSelectedRowModel().rows,Ge=gt.length>0?gt.map(jr=>jr.original):se.getFilteredRowModel().rows.map(jr=>jr.original);if(typeof o=="object"&&o.onExport){o.onExport(Ge,De);return}if(d){d(Ge);return}let Ut=typeof o=="object"&&o.filename?o.filename:"data-export",qt=tot(O,q);await eot(Ge,{format:De,filename:Ut,columns:qt,includeHeaders:!0})},ht=vs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Tt=()=>{se.resetRowSelection()};return(0,ot.jsxs)("div",{className:F("moonui-pro-datatable-container flex flex-col gap-4",c),children:[a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-4 py-2",children:[(0,ot.jsxs)("span",{className:"text-sm text-muted-foreground",children:[se.getFilteredSelectedRowModel().rows.length," Selected"]}),v.length>0&&(0,ot.jsx)(Jnt,{selectedRows:se.getFilteredSelectedRowModel().rows.map(De=>De.original),actions:v,onClearSelection:Tt})]}),(0,ot.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r&&(0,ot.jsxs)("div",{className:"relative",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,ot.jsx)(Jt,{placeholder:M,value:J,onChange:De=>ae(De.target.value),className:"pl-8 w-full sm:w-64"})]}),g.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.map((De,gt)=>(0,ot.jsx)(oot,{table:se,filter:De,data:t},`quick-${De.column}-${gt}`))}),y.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:y.map((De,gt)=>{let Ge=typeof De=="string"?De:De.column,Ut=typeof De=="string"?void 0:De.label;return(0,ot.jsx)(aot,{table:se,column:Ge,title:Ut,data:t},`faceted-${Ge}-${gt}`)})}),n&&(0,ot.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>Oe(!0),children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(ns,{className:"mr-2 h-4 w-4"})}),"Filters",$.length>0&&(0,ot.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:$.length})]})]}),(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o&&ht.length>0&&(0,ot.jsxs)(Er,{children:[(0,ot.jsx)(Ar,{asChild:!0,children:(0,ot.jsxs)(oe,{variant:"outline",size:"sm",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Pn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,ot.jsxs)(kr,{align:"end",children:[ht.includes("csv")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("csv"),children:[(0,ot.jsx)(gx,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ht.includes("json")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("json"),children:[(0,ot.jsx)(f1,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ht.includes("xlsx")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("xlsx"),children:[(0,ot.jsx)(fO,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,ot.jsx)(_rt,{table:se})]})]}),(0,ot.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,ot.jsx)("div",{style:{overflowX:"auto"},children:(0,ot.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,ot.jsx)("thead",{className:"moonui-data-table-header",children:se.getHeaderGroups().map(De=>(0,ot.jsx)("tr",{className:"moonui-data-table-row border-b",children:De.headers.filter(gt=>gt.column.getIsVisible()).map(gt=>(0,ot.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:gt.isPlaceholder?null:(0,ot.jsxs)("div",{className:F("flex items-center space-x-2",gt.column.getCanSort()&&"cursor-pointer select-none"),onClick:gt.column.getCanSort()?fe(gt.column.id):void 0,children:[Gme(gt.column.columnDef.header,gt.getContext()),gt.column.getCanSort()&&(0,ot.jsx)("div",{className:"ml-2",children:gt.column.getIsSorted()==="asc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(mx,{className:"h-4 w-4"})}):gt.column.getIsSorted()==="desc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(om,{className:"h-4 w-4"})}):(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(px,{className:"h-4 w-4"})})})]})},gt.id))},De.id))}),(0,ot.jsx)("tbody",{className:"moonui-data-table-body",children:be?(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:(0,ot.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Mr,{className:"h-4 w-4 animate-spin"})}),(0,ot.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ke?.length?(0,ot.jsx)(ot.Fragment,{children:Ke.map((De,gt)=>{let Ge=De.original.id||De.id,Ut=f&&Y.has(Ge);return(0,ot.jsx)(iot,{row:De,columns:O,isExpanded:Ut,enableExpandable:f,renderSubComponent:p,visibilityState:se.getState().columnVisibility},Ge)})}):(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,ot.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,ot.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("span",{children:[se.getFilteredSelectedRowModel().rows.length," ","of ",se.getFilteredRowModel().rows.length," ","row(s) selected."]})}),(0,ot.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,ot.jsx)("select",{value:se.getState().pagination.pageSize,onChange:async De=>{let gt=Number(De.target.value);I?I({pageIndex:se.getState().pagination.pageIndex,pageSize:gt}):(_e(!0),await new Promise(Ge=>setTimeout(Ge,300)),se.setPageSize(gt),_e(!1))},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:be,children:l.map(De=>(0,ot.jsx)("option",{value:De,children:De},De))})]}),(0,ot.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",se.getState().pagination.pageIndex+1," of"," ",se.getPageCount()]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{I?I({pageIndex:0,pageSize:se.getState().pagination.pageSize}):(_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(0),_e(!1))},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(sO,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(I){let De=se.getState().pagination.pageIndex;I({pageIndex:De-1,pageSize:se.getState().pagination.pageSize})}else _e(!0),await new Promise(De=>setTimeout(De,300)),se.previousPage(),_e(!1)},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(gi,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.nextPage(),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Jn,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(se.getPageCount()-1),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(lO,{className:"h-4 w-4"})})})]})]})]}),n&&(0,ot.jsx)(not,{table:se,open:ve,onOpenChange:Oe})]})}function thr(e,t){return{id:"expander",header:()=>null,size:50,cell:({row:r})=>{let n=r.original.id||r.id,o=e.has(n);return(0,ot.jsx)("button",{onClick:a=>{a.stopPropagation(),t(n)},className:"p-2 hover:bg-muted rounded-md transition-colors","aria-label":o?"Collapse row":"Expand row",children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,ot.jsx)(ca,{className:"h-4 w-4 text-muted-foreground"}):(0,ot.jsx)(Jn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function rhr(e=new Set){let[t,r]=vs.default.useState(e),n=vs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=vs.default.useCallback(i=>{r(new Set(i))},[]),a=vs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var iot=({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("tr",{className:F("border-b transition-colors hover:bg-muted/50",e.getIsSelected()&&"bg-muted",r&&"border-b-0"),children:e.getAllCells().filter(s=>a[s.column.id]!==!1).map(s=>(0,ot.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:Gme(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,ot.jsx)("tr",{className:"border-b",children:(0,ot.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,ot.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,ot.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})};iot.displayName="TableRow";var nhr=Lhe;var An=A(ue(),1);Ur();var u7=A(Ohe(),1);var Qe=A(de(),1),_he=An.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,An.useState)(r||""),s=(0,An.useRef)(void 0);(0,An.useEffect)(()=>{i(r)},[r]);let l=(0,An.useCallback)(c=>{let u=c.target.value;i(u),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(u),e.current&&e.current.focus()},150)},[n,e]);return(0,An.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,Qe.jsx)("div",{className:"p-4 border-b",children:(0,Qe.jsxs)("div",{className:"relative",children:[(0,Qe.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,Qe.jsx)("input",{ref:e,type:"text",placeholder:t,value:a,onChange:l,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",className:"w-full h-10 pl-9 pr-9 text-sm bg-background border border-input rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),o&&(0,Qe.jsxs)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:[(0,Qe.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});_he.displayName="SearchInput";function ohr({sections:e,footer:t,showSearch:r=!0,searchPlaceholder:n="Search...",searchQuery:o="",onSearchChange:a,showThemeToggle:i=!1,theme:s="system",onThemeChange:l,branding:c,collapsible:u=!0,defaultCollapsed:d=!1,floatingActionButton:f=!0,floatingActionButtonPosition:p={bottom:"1rem",left:"1rem"},floatingActionButtonClassName:h,glassmorphism:m=!1,animatedBackground:v=!1,keyboardShortcuts:g=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:w,customStyles:b,fullWidthItems:C=!0,enableNProgress:S=!0,className:P,activePath:T,onNavigate:L}){let[M,N]=(0,An.useState)(!1),[V,_]=(0,An.useState)(!1),[I,k]=(0,An.useState)(d),[R,E]=(0,An.useState)([]),[O,B]=(0,An.useState)(o),[U,D]=(0,An.useState)([]),j=(0,An.useRef)(null);(0,An.useEffect)(()=>{S&&u7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[S]);let $=Xa(0),z=Xa(0),q=Rv($,{stiffness:300,damping:30}),H=Rv(z,{stiffness:300,damping:30});(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q=localStorage.getItem(x);if(Q){let pe=JSON.parse(Q);k(pe.collapsed),E(pe.expandedSections),D(pe.pinnedItems||[])}}},[y,x]),(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q={collapsed:I,expandedSections:R,searchQuery:O,pinnedItems:U,recentItems:[]};localStorage.setItem(x,JSON.stringify(Q)),w?.(Q)}},[I,R,O,U,y,x,w]),(0,An.useEffect)(()=>{let Q=()=>{N(window.innerWidth<768)};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]),(0,An.useEffect)(()=>{let Q=e.filter(pe=>pe.defaultExpanded!==!1).map(pe=>pe.id);E(Q)},[e]),(0,An.useEffect)(()=>{if(!g)return;let Q=pe=>{(pe.metaKey||pe.ctrlKey)&&pe.key==="k"&&(pe.preventDefault(),j.current?.focus()),(pe.metaKey||pe.ctrlKey)&&pe.key==="b"&&(pe.preventDefault(),M?_(!V):k(!I))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[g,M,V,I]),(0,An.useEffect)(()=>{if(!v)return;let Q=pe=>{let Re=document.querySelector(".sidebar-container")?.getBoundingClientRect();Re&&($.set(pe.clientX-Re.left),z.set(pe.clientY-Re.top))};return document.addEventListener("mousemove",Q),()=>document.removeEventListener("mousemove",Q)},[v,$,z]);let K=(0,An.useCallback)(Q=>{E(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),G=(0,An.useCallback)(Q=>{D(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),J=(0,An.useCallback)(Q=>{Q.action?Q.action():Q.href&&(S&&(u7.default.start(),setTimeout(()=>u7.default.done(),500)),L?L(Q.href):window.location.href=Q.href,M&&_(!1))},[L,M,S]);(0,An.useEffect)(()=>{B(o)},[o]);let ae=(0,An.useCallback)(Q=>{B(Q),a?.(Q)},[a]),Z=(0,An.useCallback)((Q,pe)=>pe?Q.filter(Re=>{let fe=Re.title.toLowerCase().includes(pe.toLowerCase()),Ce=Re.items?.some(re=>re.title.toLowerCase().includes(pe.toLowerCase()));return fe||Ce}):Q,[]),Pe=(0,An.useMemo)(()=>O?e.map(Q=>({...Q,filteredItems:Z(Q.items,O).map(pe=>({...pe,filteredChildren:pe.items?Z(pe.items,O):void 0}))})).filter(Q=>Q.filteredItems.length>0):e.map(Q=>({...Q,filteredItems:Q.items.map(pe=>({...pe,filteredChildren:pe.items}))})),[e,O,Z]),be=(0,An.useCallback)(Q=>{let pe=Q.items&&Q.items.length>0;return!pe&&!Q.title?null:(0,Qe.jsxs)("div",{className:F("min-w-[240px] max-w-[320px] p-3",m&&"bg-background/95 backdrop-blur-sm"),children:[(0,Qe.jsx)("div",{className:"font-medium px-2 py-1.5 text-sm",children:Q.title}),pe&&(0,Qe.jsx)("div",{className:"mt-1 space-y-0.5",children:Q.items?.map(Re=>{let fe=Re.href===T,Ce=Re.items&&Re.items.length>0;return(0,Qe.jsx)("div",{className:"relative",children:Ce?(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,Qe.jsxs)("div",{className:"flex items-center gap-2",children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title})]}),(0,Qe.jsx)(Jn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-2 min-w-[200px] max-w-[280px] z-[99999]",m&&"bg-background/95 backdrop-blur-sm"),children:(0,Qe.jsx)("div",{className:"space-y-0.5",children:Re.items?.map(re=>{let ye=re.href===T;return(0,Qe.jsxs)("button",{onClick:()=>J(re),disabled:re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",ye&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,Qe.jsx)(pt,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]},re.id)})})})]}):(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title}),Re.badge&&(0,Qe.jsx)(pt,{variant:Re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Re.badge})]})},Re.id)})})]})},[T,m,J]),_e=(0,An.useCallback)((Q,pe=0,Re)=>{let fe=Q.href===T,Ce=U.includes(Q.id),re=Q.items&&Q.items.length>0,ye=R.includes(Q.id),se=I&&!M&&pe===0,ie=Q.tooltip&&!I&&!se,Fe=Q.icon||(pe===0?(0,Qe.jsx)(zd,{className:"h-4 w-4"}):(0,Qe.jsx)(Vd,{className:"h-3 w-3"})),At=(0,Qe.jsxs)("button",{onClick:()=>{re&&!I?K(Q.id):re||J(Q)},className:F("group relative flex items-center gap-3 rounded-lg text-sm transition-all","w-full px-3 py-2.5","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Q.disabled&&"opacity-50 cursor-not-allowed",pe>0&&"ml-6 text-xs py-2",I&&pe===0&&"justify-center px-0 h-12",b?.hover),disabled:Q.disabled,children:[(0,Qe.jsx)("span",{className:F("flex-shrink-0 flex items-center justify-center",I&&pe===0&&"w-full",!I&&"w-5"),children:Fe}),(!I||pe>0)&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("span",{className:"flex-1 text-left truncate",children:Q.title}),Q.badge&&(0,Qe.jsx)(pt,{variant:Q.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Q.badge}),re&&pe===0&&(0,Qe.jsx)(ca,{className:F("h-4 w-4 flex-shrink-0 transition-transform",ye&&"rotate-180")}),Ce&&(0,Qe.jsx)(BO,{className:"h-3 w-3 flex-shrink-0"})]})]});return se?(0,Qe.jsx)("div",{children:(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:At}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-0 w-auto min-w-[240px] max-w-[320px] z-[9999]",m&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-left-2"),children:(0,Qe.jsx)(ne.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15,ease:"easeOut"},children:be(Q)})})]})},Q.id):(0,Qe.jsxs)("div",{children:[ie?(0,Qe.jsx)(Il,{children:(0,Qe.jsxs)(qs,{children:[(0,Qe.jsx)(Gs,{asChild:!0,children:At}),(0,Qe.jsx)(Rs,{side:"right",children:(0,Qe.jsx)("p",{children:Q.tooltip})})]})}):At,re&&!I&&Re&&(0,Qe.jsx)(Ft,{initial:!1,children:ye&&(0,Qe.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:(0,Qe.jsx)("div",{className:"pt-1 space-y-1",children:Re.map(to=>_e(to,pe+1))})},`${Q.id}-children`)})]},Q.id)},[T,U,R,I,b,J,K,M,m,be,C]),he=An.default.memo(()=>(0,Qe.jsxs)("div",{className:F("flex items-center h-16 px-4 border-b",I&&!M&&"px-0 justify-center"),children:[c&&(0,Qe.jsxs)(Qe.Fragment,{children:[c.logo,(!I||M)&&c.title&&(0,Qe.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),M&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>_(!1),children:(0,Qe.jsx)(lr,{className:"h-4 w-4"})}),!M&&u&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:F("h-8 w-8 p-0 transition-all",!I&&"ml-auto",I&&"mx-auto"),onClick:()=>k(!I),children:(0,Qe.jsx)(ne.div,{animate:{rotate:I?0:180},transition:{duration:.2},children:(0,Qe.jsx)(Jn,{className:"h-4 w-4"})})})]})),Ne=An.default.memo(()=>(0,Qe.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",style:{scrollbarWidth:"thin"},children:(0,Qe.jsxs)("div",{className:"p-4 space-y-6",children:[U.length>0&&(!I||M)&&(0,Qe.jsxs)("div",{children:[(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,Qe.jsx)("div",{className:"space-y-1",children:e.flatMap(Q=>Q.items.filter(pe=>U.includes(pe.id))).map(Q=>_e(Q))}),(0,Qe.jsx)(Ys,{className:"mt-4"})]}),Pe.map((Q,pe)=>(0,Qe.jsxs)("div",{children:[Q.title&&(!I||M)&&(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:Q.title}),(0,Qe.jsx)("div",{className:"space-y-1",children:Q.filteredItems.map(Re=>_e(Re,0,Re.filteredChildren))}),Q.showDivider&&pe<Pe.length-1&&(0,Qe.jsx)(Ys,{className:"mt-4"})]},Q.id))]})}));Ne.displayName="SidebarMenuContent";let ve=An.default.memo(()=>t?(0,Qe.jsxs)("div",{className:"border-t p-4",children:[(0,Qe.jsx)("div",{className:"space-y-1",children:t.items.map(Q=>_e(Q))}),i&&(!I||M)&&(0,Qe.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,Qe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,Qe.jsxs)(Er,{children:[(0,Qe.jsx)(Ar,{asChild:!0,children:(0,Qe.jsxs)(oe,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,Qe.jsx)(gv,{className:"h-3 w-3"}),s==="dark"&&(0,Qe.jsx)(mv,{className:"h-3 w-3"}),s==="system"&&(0,Qe.jsx)(lm,{className:"h-3 w-3"})]})}),(0,Qe.jsxs)(kr,{align:"end",children:[(0,Qe.jsxs)(Ve,{onClick:()=>l?.("light"),children:[(0,Qe.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("dark"),children:[(0,Qe.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("system"),children:[(0,Qe.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null);ve.displayName="SidebarFooter";let Oe=An.default.memo(()=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Ne,{}),(0,Qe.jsx)(ve,{})]}));Oe.displayName="SidebarContent";let Y=F("moonui-pro flex h-full flex-col bg-background border-r transition-all duration-300 ease-in-out",m&&"bg-background/80 backdrop-blur-xl border-white/10",I&&!M&&"w-20",!I&&!M&&"w-64",b?.background,b?.border,P);return M?(0,Qe.jsxs)(Qe.Fragment,{children:[f&&(0,Qe.jsx)(oe,{onClick:()=>_(!0),className:F("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",h),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,Qe.jsx)(sm,{className:"h-5 w-5"})}),(0,Qe.jsx)($w,{open:V,onOpenChange:_,children:(0,Qe.jsx)(Wx,{side:"left",className:"w-80 p-0",children:(0,Qe.jsxs)("div",{className:F(Y,"sidebar-container flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-mobile"),(0,Qe.jsx)(Oe,{})]})})})]}):(0,Qe.jsxs)("aside",{className:F(Y,"sidebar-container hidden md:flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-desktop"),(0,Qe.jsx)(Oe,{})]})}function lot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Qe.jsx)(Rn,{componentName:"Advanced Sidebar",compact:!0,className:F("w-full max-w-xs",e.className)}):(0,Qe.jsx)(ohr,{...e})}var ys=A(ue(),1);Ur();var d7=A(Ohe(),1);var ke=A(de(),1);function ahr({sections:e=[],branding:t,showSearch:r=!0,enableCommandAI:n=!1,commandAIShortcut:o="\u2318K",commandAIPlaceholder:a="Search commands...",onCommandAIOpen:i,onCommandAIClose:s,onCommandAISelect:l,searchPlaceholder:c="Search...",onSearch:u,showThemeToggle:d=!1,theme:f="system",onThemeChange:p,userMenu:h,notifications:m,cta:v,sticky:g=!0,glassmorphism:y=!1,animatedBackground:x=!1,keyboardShortcuts:w=!0,hideNavItems:b=!1,mobileBreakpoint:C=768,customStyles:S,variant:P="default",size:T="md",blur:L=!0,shadow:M=!1,rounded:N=!1,logoPosition:V="left",mobileMenuPosition:_="left",hideOnScroll:I=!1,showScrollProgress:k=!1,maxWidth:R="2xl",fullWidth:E=!1,enableNProgress:O=!0,className:B,activePath:U,onNavigate:D}){let[j,$]=(0,ys.useState)(!1),[z,q]=(0,ys.useState)(!1),[H,K]=(0,ys.useState)(!1),[G,J]=(0,ys.useState)(!1),[ae,Z]=(0,ys.useState)(""),[Pe,be]=(0,ys.useState)(!1),[_e,he]=(0,ys.useState)(!1),[Ne,ve]=(0,ys.useState)(0),Oe=(0,ys.useRef)(0),Y=(0,ys.useRef)(null);(0,ys.useEffect)(()=>{O&&d7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[O]),(0,ys.useEffect)(()=>{let se=()=>{$(window.innerWidth<C)};return se(),window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[C]),(0,ys.useEffect)(()=>{if(!g&&!I&&!k)return;let se=()=>{let ie=window.scrollY;if(be(ie>10),I&&(ie>Oe.current&&ie>100?he(!0):he(!1),Oe.current=ie),k){let Fe=window.scrollY,At=document.documentElement.scrollHeight-document.documentElement.clientHeight,to=Fe/At*100;ve(to)}};return window.addEventListener("scroll",se,{passive:!0}),()=>window.removeEventListener("scroll",se)},[g,I,k]),(0,ys.useEffect)(()=>{if(!w&&!n)return;let se=ie=>{(ie.metaKey||ie.ctrlKey)&&ie.key==="k"&&(ie.preventDefault(),J(!0),n&&i?.())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[w,n,i]);let Q=(0,ys.useCallback)(se=>{se.action?se.action():se.href&&(O&&(d7.default.start(),setTimeout(()=>d7.default.done(),500)),D?D(se.href):window.location.href=se.href,j&&q(!1))},[D,j,O]),pe=(0,ys.useCallback)(se=>{Z(se),u?.(se)},[u]),Re=se=>(0,ke.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:se.map(ie=>(0,ke.jsxs)(B_,{className:F("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{className:"flex-shrink-0",children:ie.icon}),(0,ke.jsx)("div",{className:"text-sm font-medium leading-none",children:ie.title}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]}),ie.description&&(0,ke.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:ie.description})]},ie.id))}),fe=se=>(0,ke.jsx)(ke.Fragment,{children:se.map(ie=>ie.items&&ie.items.length>0?(0,ke.jsxs)(Qd,{children:[(0,ke.jsx)(Zu,{disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(Ju,{children:fe(ie.items)})]},ie.id):(0,ke.jsxs)(Ve,{disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]},ie.id))}),Ce=()=>(0,ke.jsxs)($w,{open:z,onOpenChange:q,children:[(0,ke.jsx)(a$,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,ke.jsx)(sm,{className:"h-5 w-5"})})}),(0,ke.jsx)(Wx,{side:_,className:"w-80 p-0",children:(0,ke.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>q(!1),className:"h-8 w-8",children:(0,ke.jsx)(lr,{className:"h-4 w-4"})})]}),(0,ke.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:!b&&e.map(se=>(0,ke.jsxs)("div",{className:"space-y-1",children:[se.items.map(ie=>(0,ke.jsx)("div",{children:ie.items&&ie.items.length>0?(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-between",disabled:ie.disabled,children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),(0,ke.jsx)(ca,{className:"h-4 w-4"})]})}),(0,ke.jsx)(kr,{align:"start",className:"w-56",children:ie.items&&fe(ie.items)})]}):(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-start",disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]})},ie.id)),(0,ke.jsx)(Ys,{className:"my-2"})]},se.id))})]})})]}),re=()=>{switch(T){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ye=F("moonui-pro w-full transition-all duration-300",P==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",P==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",P==="minimal"&&"bg-background",P==="transparent"&&"bg-transparent",g&&"sticky top-0 z-50",Pe&&g&&P!=="transparent"&&"shadow-sm",Pe&&P==="transparent"&&"bg-background/95 backdrop-blur border-b",_e&&"-translate-y-full",y&&"bg-background/80 backdrop-blur-xl border-white/10",L&&"backdrop-blur-md",M&&"shadow-lg",N&&"rounded-lg",S?.background,S?.border,B);return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("nav",{ref:Y,className:ye,children:[(0,ke.jsxs)("div",{className:F("flex items-center",re(),E?"w-full px-4 sm:px-6 lg:px-8":R==="sm"&&"container max-w-screen-sm"||R==="md"&&"container max-w-screen-md"||R==="lg"&&"container max-w-screen-lg"||R==="xl"&&"container max-w-screen-xl"||R==="2xl"&&"container max-w-screen-2xl"||R==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,ke.jsxs)("div",{className:F("flex items-center gap-2",V==="center"&&!j?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[V==="left"&&_==="left"&&(0,ke.jsx)(Ce,{}),(0,ke.jsxs)("a",{href:t.href||"/",onClick:se=>{t.href&&D&&(se.preventDefault(),D(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!j&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!j&&!b&&(0,ke.jsx)(A_,{className:"hidden md:flex",children:(0,ke.jsx)(L_,{children:e.map(se=>(0,ke.jsx)(ys.default.Fragment,{children:se.items.map(ie=>{let Fe=ie.items&&ie.items.length>0,At=ie.href===U;return Fe?(0,ke.jsxs)(D_,{children:[(0,ke.jsx)(__,{className:F(At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(F_,{children:ie.items&&Re(ie.items)})]},ie.id):(0,ke.jsx)(D_,{children:(0,ke.jsxs)(B_,{className:F(O_(),At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-2",children:ie.badge})]})},ie.id)})},se.id))})}),(0,ke.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,ke.jsx)(ke.Fragment,{children:j?(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>J(!0),children:(0,ke.jsx)(go,{className:"h-5 w-5"})}):(0,ke.jsxs)("div",{className:"relative",children:[(0,ke.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,ke.jsx)(Jt,{type:"search",placeholder:c,className:"w-64 pl-9 pr-4 h-9 cursor-pointer",value:ae,onChange:se=>pe(se.target.value),onClick:()=>{n&&(J(!0),i?.())},readOnly:n}),(w||n)&&(0,ke.jsx)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:n?o:(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})})]})}),d&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",children:[f==="light"&&(0,ke.jsx)(gv,{className:"h-5 w-5"}),f==="dark"&&(0,ke.jsx)(mv,{className:"h-5 w-5"}),f==="system"&&(0,ke.jsx)(lm,{className:"h-5 w-5"})]})}),(0,ke.jsxs)(kr,{align:"end",children:[(0,ke.jsxs)(Ve,{onClick:()=>p?.("light"),children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("dark"),children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("system"),children:[(0,ke.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),m&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",className:"relative",children:[(0,ke.jsx)(Uh,{className:"h-5 w-5"}),m.count&&m.count>0&&(0,ke.jsx)("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1",children:m.count>9?"9+":m.count})]})}),(0,ke.jsxs)(kr,{align:"end",className:"w-[380px] p-0",sideOffset:8,children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ke.jsx)("h4",{className:"text-base font-semibold",children:"Notifications"}),m.count&&m.count>0&&(0,ke.jsxs)(pt,{variant:"secondary",className:"h-5 px-2 rounded-full bg-primary/10 text-primary border-0",children:[m.count," ","new"]})]}),m.items&&m.items.length>0&&(0,ke.jsx)(oe,{variant:"ghost",size:"sm",className:"text-xs h-7 px-2 text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("Mark all as read")},children:"Mark all read"})]}),(0,ke.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:m.items&&m.items.length>0?(0,ke.jsx)("div",{className:"py-1",children:m.items.map((se,ie)=>(0,ke.jsxs)("div",{children:[(0,ke.jsx)("button",{className:F("w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors","focus:outline-none focus:bg-muted/50",!se.read&&"bg-primary/5 hover:bg-primary/10"),onClick:()=>m.onNotificationClick?.(se.id),children:(0,ke.jsxs)("div",{className:"flex gap-3",children:[(0,ke.jsx)("div",{className:"mt-1.5",children:(0,ke.jsx)("div",{className:F("h-2 w-2 rounded-full",se.read?"bg-transparent":"bg-primary")})}),(0,ke.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ke.jsx)("p",{className:F("text-sm leading-tight",se.read?"font-normal":"font-medium"),children:se.title}),se.description&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:se.description}),se.time&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:se.time})]})]})}),ie<(m.items?.length||0)-1&&(0,ke.jsx)("div",{className:"mx-4 border-b"})]},se.id))}):(0,ke.jsxs)("div",{className:"py-12 text-center",children:[(0,ke.jsx)(Uh,{className:"h-10 w-10 mx-auto text-muted-foreground/30 mb-3"}),(0,ke.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"No new notifications"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"You're all caught up!"})]})}),m.items&&m.items.length>0&&(0,ke.jsx)("div",{className:"border-t p-2",children:(0,ke.jsx)(oe,{variant:"ghost",className:"w-full h-8 text-xs text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("View all notifications")},children:"View all notifications"})})]})]}),v&&(0,ke.jsx)(oe,{variant:v.variant||"primary",size:"sm",onClick:()=>{v.action?v.action():v.href&&D&&D(v.href)},className:j?"":"ml-2",children:v.text}),h&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"relative",children:(0,ke.jsxs)(Ga,{className:"h-8 w-8",children:[(0,ke.jsx)(as,{src:h.user?.avatar,alt:h.user?.name}),(0,ke.jsx)(xi,{children:h.user?.name?.charAt(0)||(0,ke.jsx)(dm,{className:"h-4 w-4"})})]})})}),(0,ke.jsxs)(kr,{align:"end",className:"w-56",children:[h.user&&(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("div",{className:"p-2",children:[(0,ke.jsx)("p",{className:"text-sm font-medium",children:h.user.name}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground",children:h.user.email})]}),(0,ke.jsx)(Zr,{})]}),h.items&&fe(h.items)]})]})]})]}),x&&(0,ke.jsx)(ne.div,{className:"absolute inset-0 -z-10 opacity-30",animate:{background:["radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"]},transition:{duration:10,repeat:1/0,ease:"linear"}}),k&&(0,ke.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,ke.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${Ne}%`}})})]}),(0,ke.jsxs)(a_,{open:G,onOpenChange:se=>{J(se),se||s?.()},children:[(0,ke.jsx)(_v,{placeholder:n?a:c,value:ae,onValueChange:pe}),(0,ke.jsxs)(aT,{children:[(0,ke.jsx)(Fv,{children:n?(0,ke.jsxs)("div",{className:"flex flex-col items-center py-6",children:[(0,ke.jsx)(_t,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"No results found"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Try searching for pages, actions, or commands"})]}):"No results found."}),n&&!ae&&(0,ke.jsxs)(Sm,{heading:"Quick Actions",children:[(0,ke.jsxs)(Yd,{onSelect:()=>{let se={id:"home",title:"Go Home",href:"/"};l?.(se),Q(se),J(!1)},children:[(0,ke.jsx)(Wb,{className:"mr-2 h-4 w-4"}),"Go Home",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318H"})]}),(0,ke.jsxs)(Yd,{onSelect:()=>{K(!0),J(!1),l?.({id:"search",title:"Search",action:()=>K(!0)})},children:[(0,ke.jsx)(go,{className:"mr-2 h-4 w-4"}),"Search",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318S"})]}),d&&(0,ke.jsxs)(Yd,{onSelect:()=>{p?.(f==="dark"?"light":"dark"),J(!1)},children:[f==="dark"?(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Switch to Light Mode"]}):(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Switch to Dark Mode"]}),(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318T"})]})]}),e&&e.length>0&&e.map(se=>{if(!se||!se.items||se.items.length===0)return null;let ie=ae?se.items.filter(Fe=>Fe.title.toLowerCase().includes(ae.toLowerCase())||Fe.description?.toLowerCase().includes(ae.toLowerCase())):se.items;return ie.length===0?null:(0,ke.jsx)(Sm,{heading:se.title||se.id,children:ie.map(Fe=>(0,ke.jsxs)(Yd,{disabled:Fe.disabled,onSelect:()=>{n&&l?.(Fe),Q(Fe),J(!1)},children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[Fe.icon&&(0,ke.jsx)("span",{children:Fe.icon}),Fe.title]}),Fe.badge&&(0,ke.jsx)(pt,{variant:Fe.badgeVariant||"secondary",className:"ml-auto",children:Fe.badge}),Fe.description&&n&&(0,ke.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Fe.description})]},Fe.id))},se.id)}),n&&h?.items&&(0,ke.jsx)(Sm,{heading:"Account",children:h.items.map(se=>(0,ke.jsx)(Yd,{disabled:se.disabled,onSelect:()=>{let ie={...se,action:se.onClick||se.action};ie.action?ie.action():ie.href&&(window.location.href=ie.href),l?.(ie),J(!1)},children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[se.icon&&(0,ke.jsx)("span",{children:se.icon}),se.title]})},se.id))})]})]})]})}function cot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,ke.jsx)(Rn,{componentName:"Advanced Navbar",className:F("w-full",e.className)}):(0,ke.jsx)(ahr,{...e})}var Fhe=A(ue(),1);Ur();var Ti=A(ue(),1),fot=A(de(),1),uot=(0,Ti.createContext)(null),zC=()=>{let e=(0,Ti.useContext)(uot);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},dot=({children:e,steps:t,initialStep:r=0,onStepChange:n,onComplete:o,validateOnStepChange:a=!0,allowBackNavigation:i=!0,allowStepSkip:s=!1,autoSave:l=!1,autoSaveDelay:c=2e3,onAutoSave:u,persistData:d=!1,storageKey:f="form-wizard-data"})=>{let[p,h]=(0,Ti.useState)(r),[m,v]=(0,Ti.useState)({}),[g,y]=(0,Ti.useState)(new Set),[x,w]=(0,Ti.useState)(!1),[b,C]=(0,Ti.useState)(null);(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R=localStorage.getItem(f);if(R)try{let E=JSON.parse(R);v(E.stepData||{}),h(E.currentStep||0),y(new Set(E.completedSteps||[]))}catch(E){console.error("Failed to load persisted wizard data:",E)}}},[d,f]),(0,Ti.useEffect)(()=>{if(!l||!u)return;let R=setTimeout(()=>{let E=m[t[p].id];E&&u(t[p].id,E)},c);return()=>clearTimeout(R)},[m,p,l,c,u,t]),(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R={stepData:m,currentStep:p,completedSteps:Array.from(g)};localStorage.setItem(f,JSON.stringify(R))}},[m,p,g,d,f]);let S=(0,Ti.useCallback)(async()=>{let R=t[p];if(R.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(R.requiredFields)){let B=[];if(R.requiredFields.forEach(U=>{let D=O.querySelector(`[name="${U}"], [id="${U}"]`);if(D){let j=D;D.tagName==="INPUT"&&D.type==="checkbox"?D.checked||B.push(U):(!j.value||j.value.trim()==="")&&B.push(U)}}),B.length>0)return C(`Please fill in the following required fields: ${B.join(", ")}`),!1}else{let B=O.querySelectorAll("input[required], select[required], textarea[required]"),U=[];if(B.forEach(j=>{let $=j;if(!$.value||$.value.trim()===""){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Field":$.name||$.id||"Field";U.push(q)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let $=j;if(!$.checked){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Checkbox":$.name||$.id||"Checkbox";U.push(q)}}),U.length>0)return C(`Please fill in the following required fields: ${U.join(", ")}`),!1}}if(!R.validation)return!0;w(!0),C(null);try{let O=await R.validation();if(typeof O=="boolean")return O||C("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let B=O;return B.isValid||(B.error?C(B.error):B.errors&&Array.isArray(B.errors)?C(B.errors.join(", ")):C("Please complete all required fields before proceeding")),B.isValid}return C("Invalid validation response"),!1}catch(O){return C(O instanceof Error?O.message:"Validation failed"),!1}finally{w(!1)}},[p,t]),P=(0,Ti.useCallback)((R,E)=>{v(O=>({...O,[R]:{...O[R],...E}})),C(null)},[]),T=(0,Ti.useCallback)(async R=>{if(R<0||R>=t.length||R===p)return;let E=t[R];if((typeof E.isDisabled=="function"?E.isDisabled(p,t):E.isDisabled)||a&&R>p&&!await S())return;let B=t[p];B.onExit&&await B.onExit(),R>p&&y(D=>new Set([...D,p])),E.onEnter&&await E.onEnter();let U=p;h(R),n?.(R,U)},[p,t,a,S,n]),L=(0,Ti.useCallback)(()=>{T(p+1)},[p,T]),M=(0,Ti.useCallback)(()=>{i&&T(p-1)},[p,T,i]),N=(0,Ti.useCallback)(async()=>{if(await S()&&(y(E=>new Set([...E,p])),o)){w(!0);try{await o(m),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(E){C(E instanceof Error?E.message:"Failed to complete wizard")}finally{w(!1)}}},[p,m,S,o,d,f]),V=(0,Ti.useCallback)(()=>{h(0),v({}),y(new Set),C(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),_=(0,Ti.useCallback)(R=>g.has(R),[g]),I=(0,Ti.useCallback)(R=>{if(R===0||s)return!0;for(let E=0;E<R;E++)if(!g.has(E)&&!t[E].isOptional)return!1;return!0},[g,s,t]),k={steps:t,currentStep:p,stepData:m,isLoading:x,error:b,goToNext:L,goToPrevious:M,goToStep:T,updateStepData:R=>P(t[p].id,R),validateCurrentStep:S,completeWizard:N,resetWizard:V,isStepCompleted:_,isStepAccessible:I,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,fot.jsx)(uot.Provider,{value:k,children:e})};var Pr=A(de(),1),f7=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,Pr.jsx)(Wo,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,Pr.jsx)(ho,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=zC();if(t==="linear")return(0,Pr.jsx)("div",{className:F("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,Pr.jsx)("div",{className:"relative w-full",children:(0,Pr.jsx)("div",{className:F("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&w&&(0,Pr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),a==="top"&&w&&(0,Pr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),o&&(0,Pr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]}),(0,Pr.jsxs)("div",{className:"relative flex items-center w-full",children:[m<c.length-1&&(0,Pr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,Pr.jsx)("div",{className:"h-full bg-border"}),m<u&&(0,Pr.jsx)(ne.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:m*.1},style:{transformOrigin:"left"}})]}),(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},transition:{duration:.2},className:F("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",v&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w&&a==="inside"?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})})]}),(0,Pr.jsx)("div",{className:"mt-3",children:(0,Pr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",m+1," of ",c.length]})})]},h.id)})})}):(0,Pr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,Pr.jsx)(ne.div,{className:"absolute left-6 top-8 w-[2px] bg-primary",initial:{height:0},animate:{height:`${u/(c.length-1)*(100-16)}%`},transition:{duration:.5}})]}),c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},className:F("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",v&&"border-primary bg-primary text-primary-foreground shadow-lg",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})}),(0,Pr.jsx)("div",{className:"ml-16",children:o&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]})})]},h.id)})]})});if(t==="dots")return(0,Pr.jsx)("div",{className:F("flex items-center justify-center space-x-2",e),children:c.map((h,m)=>{let v=m===u,g=d(m);return(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.2:1},className:F("rounded-full transition-all duration-300",v?"w-3 h-3 bg-primary":"w-2 h-2",g&&!v&&"bg-primary/60",!v&&!g&&"bg-muted")},m)})});if(t==="circular"){let h=(u+1)/c.length*100,m=2*Math.PI*45,v=m-h/100*m;return(0,Pr.jsxs)("div",{className:F("relative w-36 h-36 mx-auto",e),children:[(0,Pr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,Pr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,Pr.jsx)(ne.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:m,initial:{strokeDashoffset:m},animate:{strokeDashoffset:v},className:"text-primary",transition:{duration:.5}})]}),(0,Pr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Pr.jsxs)("div",{className:"text-center",children:[(0,Pr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,Pr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var p7=A(ue(),1);var HC=A(de(),1),ihr={slide:{initial:e=>({x:e>0?1e3:-1e3,opacity:0}),animate:{x:0,opacity:1},exit:e=>({x:e<0?1e3:-1e3,opacity:0})},fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},scale:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8}},none:{initial:{},animate:{},exit:{}}},m7=({className:e,animationType:t="slide",animationDuration:r=.3})=>{let{steps:n,currentStep:o,goToNext:a,goToPrevious:i,goToStep:s,updateStepData:l,stepData:c,error:u}=zC(),[d,f]=p7.default.useState(0),p=p7.default.useRef(o);p7.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let h=n[o],m=o===0,v=o===n.length-1,g={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:m,isLastStep:v,stepData:c[h.id]||{},updateStepData:x=>l(h.id,x)},y=typeof h.content=="function"?h.content(g):h.content;return(0,HC.jsx)(Ft,{mode:"wait",custom:d,children:(0,HC.jsx)(ne.div,{custom:d,variants:ihr[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:F("w-full",e),"data-wizard-step-content":!0,children:(0,HC.jsxs)("div",{className:"space-y-4",children:[u&&(0,HC.jsxs)(Zb,{variant:"error",children:[(0,HC.jsx)(On,{className:"h-4 w-4"}),(0,HC.jsx)(Jb,{children:u})]}),y]})},o)})};var Ol=A(de(),1),h7=({className:e,showStepIndicator:t=!0,previousText:r="Previous",nextText:n="Next",completeText:o="Complete",loadingText:a="Processing...",onPreviousClick:i,onNextClick:s,onCompleteClick:l})=>{let{steps:c,currentStep:u,isLoading:d,canGoNext:f,canGoPrevious:p,goToNext:h,goToPrevious:m,completeWizard:v}=zC(),g=u===c.length-1,y=c[u],x=()=>{i?.(),m()},w=()=>{g?(l?.(),v()):(s?.(),h())};return(0,Ol.jsxs)("div",{className:F("flex items-center justify-between",e),children:[(0,Ol.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ol.jsxs)(oe,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:F("transition-all duration-200",!p&&"invisible"),children:[(0,Ol.jsx)(gi,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Ol.jsxs)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"px-3 py-1 text-sm text-muted-foreground",children:["Step ",u+1," of ",c.length,y.isOptional&&(0,Ol.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Ol.jsx)(oe,{type:"button",onClick:w,disabled:d||!f&&!g,className:"min-w-[120px]",children:d?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(Mr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):g?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(on,{className:"w-4 h-4 mr-2"}),o]}):(0,Ol.jsxs)(Ol.Fragment,{children:[n,(0,Ol.jsx)(Jn,{className:"w-4 h-4 ml-1"})]})})]})};var Mi=A(de(),1),pot=Fhe.default.forwardRef(({steps:e,currentStep:t=0,onStepChange:r,onComplete:n,orientation:o="horizontal",progressType:a="linear",allowStepSkip:i=!1,allowBackNavigation:s=!0,validateOnStepChange:l=!0,animationType:c="slide",animationDuration:u=.3,showStepNumbers:d=!0,showStepTitles:f=!0,showProgressBar:p=!0,stepIconPosition:h="top",completedStepIcon:m,activeStepIcon:v,errorStepIcon:g,className:y,progressClassName:x,navigationClassName:w,contentClassName:b,stepClassName:C,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:T,persistData:L=!1,storageKey:M="form-wizard-data"},N)=>(0,Mi.jsx)(dot,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:T,persistData:L,storageKey:M,children:(0,Mi.jsxs)("div",{ref:N,className:F("w-full",y),children:[p&&(0,Mi.jsx)(Mi.Fragment,{children:(0,Mi.jsx)(f7,{className:F("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:h,completedStepIcon:m,activeStepIcon:v,errorStepIcon:g})}),(0,Mi.jsx)($e,{className:F("border-0 shadow-none",b),children:(0,Mi.jsx)(We,{className:"p-0",children:(0,Mi.jsx)(m7,{className:C,animationType:c,animationDuration:u})})}),(0,Mi.jsx)(h7,{className:F("mt-8",w)})]})}));pot.displayName="FormWizardInternal";var G4=Fhe.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Mi.jsx)($e,{className:F("w-full",e.className),children:(0,Mi.jsx)(We,{className:"py-12 text-center",children:(0,Mi.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Mi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mi.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Mi.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Mi.jsx)("a",{href:"/pricing",children:(0,Mi.jsxs)(oe,{size:"sm",children:[(0,Mi.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mi.jsx)(pot,{...e,ref:t})});G4.displayName="MoonUIFormWizardPro";var shr=G4;var bf=A(ue(),1);Ur();var Pt=A(de(),1);function mot(e){let t=[...e];for(let r=t.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t}var lhr=({title:e,description:t,questions:r,onComplete:n,showTimer:o=!0,totalTimeLimit:a,showProgress:i=!0,showQuestionNumbers:s=!0,allowReview:l=!0,allowSkip:c=!0,shuffleQuestions:u=!1,shuffleOptions:d=!1,passingScore:f=70,instantFeedback:p=!1,showHints:h=!1,className:m})=>{let[v]=(0,bf.useState)(()=>u?mot(r):r),[g,y]=(0,bf.useState)({}),[x,w]=(0,bf.useState)([]),[b,C]=(0,bf.useState)(a||0),[S,P]=(0,bf.useState)({}),[T,L]=(0,bf.useState)(!1),[M,N]=(0,bf.useState)(0);(0,bf.useEffect)(()=>{if(!o||!a||T)return;let R=setInterval(()=>{C(E=>E<=1?(_(),0):E-1)},1e3);return()=>clearInterval(R)},[o,a,T]),(0,bf.useEffect)(()=>{if(!o||T)return;let R=setInterval(()=>{N(E=>E+1)},1e3);return()=>clearInterval(R)},[o,T]);let V=(0,bf.useCallback)(()=>{let R=0,E=0;return{results:v.map(B=>{let U=g[B.id],D=B.points||1;E+=D;let j=!1;if(U!=null&&U!==""){if(B.type==="single-choice"||B.type==="true-false")j=U===B.correctAnswer;else if(B.type==="multiple-choice"){let z=Array.isArray(U)?U:[],q=Array.isArray(B.correctAnswer)?B.correctAnswer:[];j=z.length===q.length&&z.every(H=>q.includes(H))}}let $=j?D:0;return R+=$,{questionId:B.id,answer:U,isCorrect:j,points:$,timeSpent:S[B.id]||0}}),score:R,totalScore:E}},[v,g,S]),_=async()=>{let{results:R,score:E,totalScore:O}=V();w(R),L(!0),n&&await n(R,E,O)},I=R=>{let E=Math.floor(R/60),O=R%60;return`${E}:${O.toString().padStart(2,"0")}`},k=v.map((R,E)=>({id:R.id,title:`Question ${E+1}`,description:R.tags?.join(", "),content:({updateStepData:O,goToNext:B})=>{let U=g[R.id],D=d&&R.options?mot(R.options):R.options;(0,bf.useEffect)(()=>{S[R.id]||P($=>({...$,[R.id]:M}))},[]);let j=$=>{y(z=>({...z,[R.id]:$})),p&&R.type};return(0,Pt.jsxs)($e,{className:"border-0 shadow-none",children:[(0,Pt.jsxs)(br,{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,Pt.jsxs)(pt,{variant:"secondary",children:["Question ",E+1," of ",v.length]}),R.points&&R.points>1&&(0,Pt.jsxs)(pt,{variant:"outline",children:[R.points," points"]})]}),(0,Pt.jsx)(zr,{className:"text-xl",children:R.question}),R.description&&(0,Pt.jsx)(Is,{children:R.description})]}),(0,Pt.jsxs)(We,{className:"space-y-4",children:[R.image&&(0,Pt.jsx)("img",{src:R.image,alt:"Question illustration",className:"w-full rounded-lg"}),R.type==="single-choice"&&D&&(0,Pt.jsx)(sP,{value:U||"",onValueChange:j,children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)($x,{value:String($.value),id:`${R.id}-${$.value}`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="multiple-choice"&&D&&(0,Pt.jsx)("div",{className:"space-y-2",children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)(Nc,{id:`${R.id}-${$.value}`,checked:(U||[]).includes($.value),onCheckedChange:q=>{let H=U||[];j(q?[...H,$.value]:H.filter(K=>K!==$.value))}}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="true-false"&&(0,Pt.jsxs)(sP,{value:U?.toString()||"",onValueChange:$=>j($==="true"),children:[(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"true",id:`${R.id}-true`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"false",id:`${R.id}-false`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),R.type==="text"&&(0,Pt.jsx)(nd,{value:U||"",onChange:$=>j($.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),R.type==="rating"&&(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(qw,{value:[U||5],onValueChange:([$])=>j($),max:10,min:1,step:1,className:"w-full"}),(0,Pt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[U||5,"/10"]})]}),h&&R.hint&&(0,Pt.jsx)(Zb,{children:(0,Pt.jsxs)(Jb,{children:[(0,Pt.jsx)("strong",{children:"Hint:"})," ",R.hint]})})]})]})},validation:()=>!(R.required&&!g[R.id]),isOptional:!R.required}));if(T){let{score:R,totalScore:E}=V(),O=Math.round(R/E*100),B=O>=f;return(0,Pt.jsx)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:F("w-full max-w-2xl mx-auto",m),children:(0,Pt.jsxs)($e,{children:[(0,Pt.jsxs)(br,{className:"text-center",children:[(0,Pt.jsx)("div",{className:"mx-auto mb-4",children:(0,Pt.jsx)(e2,{className:F("w-16 h-16",B?"text-yellow-500":"text-muted-foreground")})}),(0,Pt.jsx)(zr,{className:"text-3xl",children:"Quiz Complete!"}),(0,Pt.jsx)(Is,{children:"Here's how you performed"})]}),(0,Pt.jsxs)(We,{className:"space-y-6",children:[(0,Pt.jsxs)("div",{className:"text-center",children:[(0,Pt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,Pt.jsx)(_o,{value:O,className:"h-3 mb-4"}),(0,Pt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Pt.jsxs)("span",{children:["Score: ",R,"/",E]}),(0,Pt.jsx)("span",{children:B?(0,Pt.jsx)(pt,{variant:"success",children:"Passed"}):(0,Pt.jsx)(pt,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,Pt.jsxs)("div",{className:"space-y-2",children:[(0,Pt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((U,D)=>{let j=v.find($=>$.id===U.questionId);return(0,Pt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,Pt.jsxs)("span",{className:"text-sm",children:[s&&`Q${D+1}: `,j?.question.substring(0,50),"..."]}),(0,Pt.jsxs)(pt,{variant:U.isCorrect?"success":"destructive",children:[U.points,"/",j?.points||1]})]},U.questionId)})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(oe,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,Pt.jsx)(wx,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Pn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Cx,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,Pt.jsxs)("div",{className:F("w-full",m),children:[o&&a&&(0,Pt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(Sn,{className:"w-4 h-4"}),(0,Pt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",I(b)]})]}),(0,Pt.jsx)(_o,{value:b/a*100,className:"w-32 h-2"})]}),(0,Pt.jsx)(G4,{steps:k,onComplete:_,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},chr=e=>{let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Pt.jsx)($e,{className:F("w-full",e.className),children:(0,Pt.jsx)(We,{className:"py-12 text-center",children:(0,Pt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Pt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Pt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Pt.jsx)("a",{href:"/pricing",children:(0,Pt.jsxs)(oe,{size:"sm",children:[(0,Pt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Pt.jsx)(lhr,{...e})},uhr=chr;var wf=A(ue(),1);var Qr=A(de(),1),dhr={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function fhr(e,t){let r=e.replace(/\s+/g,"").replace(/[^0-9]/gi,""),n=t==="amex"?r.match(/\d{1,4}/g):r.match(/\d{1,4}/g);return n?n.join(" "):r}function phr(e){let t=e.replace(/\s+/g,"").replace(/[^0-9]/gi,"");return t.length>=2?t.slice(0,2)+(t.length>2?"/"+t.slice(2,4):""):t}function mhr(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(dhr))if(n.test(t))return r;return null}function hhr(e){let t=e.replace(/\s+/g,"");if(!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let o=t.length-1;o>=0;o--){let a=parseInt(t.charAt(o),10);n&&(a*=2,a>9&&(a-=9)),r+=a,n=!n}return r%10===0}function ghr(e){let t=e.split("/");if(t.length!==2)return!1;let r=parseInt(t[0],10),n=parseInt("20"+t[1],10);if(r<1||r>12)return!1;let o=new Date;return new Date(n,r-1)>o}var hot=wf.default.forwardRef(({value:e={number:"",expiry:"",cvc:"",name:""},onChange:t,showCardPreview:r=!0,showCardType:n=!0,showSecurityBadge:o=!0,autoFormat:a=!0,validateOnChange:i=!1,labels:s={},placeholders:l={},errors:c={},className:u,inputClassName:d,labelClassName:f,errorClassName:p,disabled:h,required:m,...v},g)=>{let[y,x]=(0,wf.useState)(null),[w,b]=(0,wf.useState)(null),[C,S]=(0,wf.useState)({}),P=(0,wf.useRef)(null),T=(0,wf.useRef)(null),L=(0,wf.useRef)(null),M=(0,wf.useRef)(null);(0,wf.useEffect)(()=>{let _=mhr(e.number);x(_)},[e.number]),(0,wf.useEffect)(()=>{if(!i)return;let _={};e.number&&!hhr(e.number)&&(_.number="Invalid card number"),e.expiry&&!ghr(e.expiry)&&(_.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(_.cvc="Invalid CVC"),S(_)},[e,i]);let N=(_,I)=>{let k=I;if(a){if(_==="number"){k=fhr(I,y||void 0);let R=y==="amex"?18:19;if(k.length>R)return}else if(_==="expiry"){if(k=phr(I),k.length>5)return}else if(_==="cvc"){k=I.replace(/\D/g,"");let R=y==="amex"?4:3;if(k.length>R)return}}t?.({...e,[_]:k}),a&&(_==="number"&&k.length===(y==="amex"?18:19)?T.current?.focus():_==="expiry"&&k.length===5?L.current?.focus():_==="cvc"&&k.length===(y==="amex"?4:3)&&M.current?.focus())},V={...C,...c};return(0,Qr.jsxs)("div",{ref:g,className:F("space-y-4",u),...v,children:[r&&(0,Qr.jsxs)(ne.div,{className:"relative w-full max-w-md mx-auto h-48 rounded-xl bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700 p-6 text-white shadow-xl overflow-hidden",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,Qr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,Qr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,Qr.jsx)(hx,{className:"w-8 h-8 text-white/80"})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsx)("div",{className:"text-xl font-mono tracking-wider",children:e.number||"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022"}),(0,Qr.jsxs)("div",{className:"flex justify-between",children:[(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,Qr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,Qr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:_=>N("number",_.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:F("pr-20",V.number&&"border-destructive",d),disabled:h}),n&&y&&(0,Qr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),V.number&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.number})]}),(0,Qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsx)(Jt,{ref:T,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:_=>N("expiry",_.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:F(V.expiry&&"border-destructive",d),disabled:h}),V.expiry&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.expiry})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:L,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:_=>N("cvc",_.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:F(V.cvc&&"border-destructive",d),disabled:h}),o&&(0,Qr.jsx)($t,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),V.cvc&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.cvc})]})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsx)(Rt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,Qr.jsx)(Jt,{ref:M,id:"card-name",type:"text",value:e.name,onChange:_=>N("name",_.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:F(V.name&&"border-destructive",d),disabled:h}),V.name&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.name})]})]}),o&&(0,Qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Qr.jsx)($t,{className:"w-4 h-4"}),(0,Qr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});hot.displayName="MoonUICreditCardInputPro";var Hc=A(ue(),1);Ur();var tt=A(de(),1),got=xt("relative w-full rounded-lg border bg-card text-card-foreground shadow-sm",{variants:{variant:{default:"border-border",exam:"border-primary/20 bg-primary/5",personality:"border-secondary/20 bg-secondary/5"},size:{sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"default",size:"md"}}),vot=Hc.default.forwardRef(({className:e,variant:t,size:r,questions:n,settings:o={},onComplete:a,onProgress:i,title:s,description:l,...c},u)=>{let[d,f]=(0,Hc.useState)([]),[p,h]=(0,Hc.useState)(0),[m,v]=(0,Hc.useState)({}),[g,y]=(0,Hc.useState)(!1),[x,w]=(0,Hc.useState)(null),[b,C]=(0,Hc.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Hc.useState)(Date.now()),[T,L]=(0,Hc.useState)(!1),[M,N]=(0,Hc.useState)(0);(0,Hc.useEffect)(()=>{let $=[...n];o.shuffleQuestions&&($=_($)),o.shuffleOptions&&($=$.map(z=>z.options?{...z,options:_([...z.options])}:z)),f($)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Hc.useEffect)(()=>{if(b===null||b<=0||g)return;let $=setInterval(()=>{C(z=>z===null||z<=1?(E(),0):z-1)},1e3);return()=>clearInterval($)},[b,g]),(0,Hc.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let V=d[p],_=$=>{let z=[...$];for(let q=z.length-1;q>0;q--){let H=Math.floor(Math.random()*(q+1));[z[q],z[H]]=[z[H],z[q]]}return z},I=$=>{let z=Date.now()-S;v(q=>({...q,[V.id]:{questionId:V.id,answer:$,timeSpent:z}}))},k=()=>{p<d.length-1?(h($=>$+1),P(Date.now()),L(!1)):E()},R=()=>{p>0&&(h($=>$-1),L(!1))},E=()=>{let $=O();w($),y(!0),N(z=>z+1),a&&a($)},O=()=>{let $=0,z=0,q=[];d.forEach(G=>{let J=m[G.id],ae=G.points||1;$+=ae;let Z=!1;if(J?.answer&&G.correctAnswer!==void 0)switch(G.type){case"single-choice":case"true-false":case"text":Z=J.answer===G.correctAnswer;break;case"multiple-choice":Array.isArray(J.answer)&&Array.isArray(G.correctAnswer)&&(Z=J.answer.length===G.correctAnswer.length&&J.answer.every(Pe=>G.correctAnswer.includes(Pe)));break;case"matching":if(typeof J.answer=="object"&&typeof G.correctAnswer=="object"){let Pe=G.correctAnswer,be=J.answer;Z=Object.keys(Pe).every(_e=>Pe[_e]===be[_e])}break;case"rating":Z=!0;break}Z&&(z+=ae),q.push({questionId:G.id,userAnswer:J?.answer||null,correctAnswer:G.correctAnswer,isCorrect:Z,points:Z?ae:0})});let H=$>0?z/$*100:0,K=Object.values(m).reduce((G,J)=>G+(J.timeSpent||0),0);return{score:z,totalScore:$,percentage:H,passed:o.passingScore?H>=o.passingScore:void 0,answers:q,timeSpent:K,completedAt:new Date}},B=()=>{h(0),v({}),y(!1),w(null),C(o.timeLimit?o.timeLimit*60:null),P(Date.now()),L(!1),o.shuffleQuestions&&f(_([...n]))},U=()=>{if(!x)return;let $={title:s,completedAt:x.completedAt,score:x.score,totalScore:x.totalScore,percentage:x.percentage,passed:x.passed,timeSpent:x.timeSpent,answers:x.answers.map(K=>({question:d.find(J=>J.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},z=new Blob([JSON.stringify($,null,2)],{type:"application/json"}),q=URL.createObjectURL(z),H=document.createElement("a");H.href=q,H.download=`quiz-results-${Date.now()}.json`,H.click(),URL.revokeObjectURL(q)},D=$=>{let z=Math.floor($/60),q=$%60;return`${z}:${q.toString().padStart(2,"0")}`},j=()=>{if(!V)return null;let $=m[V.id]?.answer;switch(V.type){case"single-choice":case"true-false":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>I(K),className:F("w-full text-left p-4 rounded-lg border transition-colors",$===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},G))});case"multiple-choice":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>{let J=Array.isArray($)&&$.includes(K);return(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>{let ae=$||[],Z=J?ae.filter(Pe=>Pe!==K):[...ae,K];I(Z)},className:F("w-full text-left p-4 rounded-lg border transition-colors",J?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,tt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,tt.jsx)("div",{className:F("w-5 h-5 rounded border-2 transition-colors",J?"bg-primary border-primary":"border-border"),children:J&&(0,tt.jsx)(Cl,{className:"w-full h-full text-primary-foreground"})}),K]})},G)})});case"text":return(0,tt.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,tt.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:$||"",onChange:K=>I(K.target.value)})});case"rating":let z=V.maxRating||5,q=typeof $=="number"?$:0;return(0,tt.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,tt.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:z},(K,G)=>G+1).map(K=>(0,tt.jsx)("button",{onClick:()=>I(K),className:"transition-transform hover:scale-110",children:(0,tt.jsx)(Hs,{className:F("w-10 h-10 transition-colors",K<=q?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),V.ratingLabels&&(0,tt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,tt.jsx)("span",{children:V.ratingLabels[0]}),(0,tt.jsx)("span",{children:V.ratingLabels[1]})]})]});case"matching":let H=$||{};return(0,tt.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),V.leftOptions?.map((K,G)=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),V.leftOptions?.map(K=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,tt.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:H[K]||"",onChange:G=>I({...H,[K]:G.target.value}),children:[(0,tt.jsx)("option",{value:"",children:"Select..."}),V.rightOptions?.map(G=>(0,tt.jsx)("option",{value:G,children:G},G))]})},K))]})]});default:return null}};return g&&x?(0,tt.jsx)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:(0,tt.jsxs)(ne.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,tt.jsxs)("div",{className:"text-center",children:[(0,tt.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,tt.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,tt.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,tt.jsx)("div",{className:F("mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full",x.passed?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:x.passed?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Cl,{className:"w-5 h-5"}),"Passed"]}):(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ho,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,tt.jsxs)("div",{className:"space-y-4",children:[(0,tt.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map(($,z)=>{let q=d.find(H=>H.id===$.questionId);return q?(0,tt.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,tt.jsxs)("div",{className:"flex items-start gap-3",children:[$.isCorrect?(0,tt.jsx)(Cl,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,tt.jsxs)("div",{className:"flex-1",children:[(0,tt.jsxs)("p",{className:"font-medium mb-2",children:[z+1,". ",q.question]}),(0,tt.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify($.userAnswer)]}),!$.isCorrect&&q.correctAnswer!==void 0&&(0,tt.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(q.correctAnswer)]}),q.explanation&&(0,tt.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:q.explanation})]})]})},$.questionId):null})]}),(0,tt.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||M<o.maxAttempts)&&(0,tt.jsxs)("button",{onClick:B,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,tt.jsx)(wx,{className:"w-4 h-4"}),"Try Again"]}),(0,tt.jsxs)("button",{onClick:U,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,tt.jsx)(Pn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,tt.jsxs)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,tt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,tt.jsxs)("div",{children:[s&&(0,tt.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,tt.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,tt.jsxs)("div",{className:F("flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium",b<60?"bg-red-100 text-red-700":"bg-muted"),children:[(0,tt.jsx)(Sn,{className:"w-4 h-4"}),D(b)]})]}),(0,tt.jsxs)("div",{className:"mb-6",children:[(0,tt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,tt.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,tt.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,tt.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,tt.jsx)(ne.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,tt.jsx)(Ft,{mode:"wait",children:V&&(0,tt.jsxs)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,tt.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[V.question,V.required&&(0,tt.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&V.hint&&(0,tt.jsxs)("div",{className:"mt-4",children:[(0,tt.jsxs)("button",{onClick:()=>L(!T),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,tt.jsx)(zh,{className:"w-4 h-4"}),T?"Hide":"Show"," Hint"]}),T&&(0,tt.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:V.hint})]}),o.showInstantFeedback&&m[V.id]&&V.correctAnswer!==void 0&&(0,tt.jsx)(ne.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let $=m[V.id].answer,z=!1;switch(V.type){case"single-choice":case"true-false":z=$===V.correctAnswer;break}return(0,tt.jsxs)("div",{className:F("p-3 rounded-lg flex items-start gap-2",z?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[z?(0,tt.jsx)(Cl,{className:"w-5 h-5 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 mt-0.5"}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("p",{className:"font-medium",children:z?"Correct!":"Incorrect"}),V.explanation&&(0,tt.jsx)("p",{className:"text-sm mt-1",children:V.explanation})]})]})})()})]},V.id)}),(0,tt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,tt.jsxs)("button",{onClick:R,disabled:p===0,className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",p===0?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:[(0,tt.jsx)(gi,{className:"w-4 h-4"}),"Previous"]}),(0,tt.jsxs)("button",{onClick:p===d.length-1?E:k,disabled:V?.required&&!m[V.id],className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",V?.required&&!m[V.id]?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"),children:[p===d.length-1?"Complete":"Next",(0,tt.jsx)(Jn,{className:"w-4 h-4"})]})]})]})});vot.displayName="MoonUIQuizFormProInternal";var Bhe=Hc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tt.jsx)($e,{className:F("w-full",e.className),children:(0,tt.jsx)(We,{className:"py-12 text-center",children:(0,tt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,tt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,tt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,tt.jsx)("a",{href:"/pricing",children:(0,tt.jsxs)(oe,{size:"sm",children:[(0,tt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tt.jsx)(vot,{...e,ref:t})});Bhe.displayName="MoonUIQuizFormPro";var Uf=A(ue(),1);var te=A(bt(),1),qn=A(bt(),1);var Nf=A(bt(),1);var sh=A(bt(),1),$he=A(Qn(),1);function Dot(e,t){let r=sh.createContext(t),n=a=>{let{children:i,...s}=a,l=sh.useMemo(()=>s,Object.values(s));return(0,$he.jsx)(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){let i=sh.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Co(e,t=[]){let r=[];function n(a,i){let s=sh.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,v=sh.useMemo(()=>h,Object.values(h));return(0,$he.jsx)(m.Provider,{value:v,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,h=sh.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>sh.createContext(i));return function(s){let l=s?.[e]||a;return sh.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Bhr(o,...t)]}function Bhr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return sh.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var jC=A(bt(),1);var _ot=A(bt(),1);function Oot(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GI(...e){return t=>{let r=!1,n=e.map(o=>{let a=Oot(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():Oot(e[o],null)}}}}function gr(...e){return _ot.useCallback(GI(...e),e)}var _l=A(bt(),1);var sA=A(Qn(),1);function Pu(e){let t=Vhr(e),r=_l.forwardRef((n,o)=>{let{children:a,...i}=n,s=_l.Children.toArray(a),l=s.find(Uhr);if(l){let c=l.props.children,u=s.map(d=>d===l?_l.Children.count(c)>1?_l.Children.only(null):_l.isValidElement(c)?c.props.children:null:d);return(0,sA.jsx)(t,{...i,ref:o,children:_l.isValidElement(c)?_l.cloneElement(c,void 0,u):null})}return(0,sA.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Vhr(e){let t=_l.forwardRef((r,n)=>{let{children:o,...a}=r;if(_l.isValidElement(o)){let i=Hhr(o),s=zhr(a,o.props);return o.type!==_l.Fragment&&(s.ref=n?GI(n,i):i),_l.cloneElement(o,s)}return _l.Children.count(o)>1?_l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fot=Symbol("radix.slottable");function Bot(e){let t=({children:r})=>(0,sA.jsx)(sA.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Fot,t}function Uhr(e){return _l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fot}function zhr(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Hhr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b7=A(Qn(),1),jhr=A(bt(),1);var Whr=A(Qn(),1);function Ly(e){let t=e+"CollectionProvider",[r,n]=Co(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=jC.default.useRef(null),x=jC.default.useRef(new Map).current;return(0,b7.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=Pu(s),c=jC.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=gr(v,x.collectionRef);return(0,b7.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Pu(u),p=jC.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=jC.default.useRef(null),b=gr(v,w),C=a(u,g);return jC.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,b7.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return jC.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var Vot=new WeakMap,fl,Ag,_Gn=(Ag=class extends Map{constructor(r){super(r);rR(this,fl,void 0);tx(this,fl,[...super.keys()]),Vot.set(this,!0)}set(r,n){return Vot.get(this)&&(this.has(r)?Or(this,fl)[Or(this,fl).indexOf(r)]=r:Or(this,fl).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,fl).length,s=Uot(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,fl)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new Ag(this);return a.insert(r,n,o),a}before(r){let n=Or(this,fl).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,fl).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,fl,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,fl).splice(Or(this,fl).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,fl).indexOf(r)}keyAt(r){return Whe(Or(this,fl),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new Ag(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new Ag(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new Ag(n)}toReversed(){let r=new Ag;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new Ag(n)}slice(r,n){let o=new Ag,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},fl=new WeakMap,Ag);function Whe(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=$hr(e,t);return r===-1?void 0:e[r]}function $hr(e,t){let r=e.length,n=Uot(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function Uot(e){return e!==e||e===0?0:Math.trunc(e)}var VGn=!!(typeof window<"u"&&window.document&&window.document.createElement);function it(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lh=A(bt(),1);var zot=A(bt(),1),Mo=globalThis?.document?zot.useLayoutEffect:()=>{};var w7=A(bt(),1);var qhr=lh[" useInsertionEffect ".trim().toString()]||Mo;function Ba({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Ghr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lh.useRef(e!==void 0);lh.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=lh.useCallback(u=>{if(s){let d=Khr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Ghr({defaultProp:e,onChange:t}){let[r,n]=lh.useState(e),o=lh.useRef(r),a=lh.useRef(t);return qhr(()=>{a.current=t},[t]),lh.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Khr(e){return typeof e=="function"}var jGn=Symbol("RADIX:SYNC_STATE");var ilt=A(bt(),1),slt=A(ck(),1);var llt=A(Qn(),1),Qvr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=Qvr.reduce((e,t)=>{let r=Pu(`Primitive.${t}`),n=ilt.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,llt.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&slt.flushSync(()=>e.dispatchEvent(t))}var qc=A(bt(),1);var Rf=A(bt(),1);var clt=A(bt(),1);function Zvr(e,t){return clt.useReducer((r,n)=>t[r][n]??r,e)}var Ai=e=>{let{present:t,children:r}=e,n=Jvr(t),o=typeof r=="function"?r({present:n.isPresent}):Rf.Children.only(r),a=gr(n.ref,eyr(o));return typeof r=="function"||n.isPresent?Rf.cloneElement(o,{ref:a}):null};Ai.displayName="Presence";function Jvr(e){let[t,r]=Rf.useState(),n=Rf.useRef(null),o=Rf.useRef(e),a=Rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Zvr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Rf.useEffect(()=>{let c=zX(n.current);a.current=s==="mounted"?c:"none"},[s]),Mo(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=zX(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Mo(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=zX(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=zX(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function zX(e){return e?.animationName||"none"}function eyr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aye=A(bt(),1);var tyr=aye[" useId ".trim().toString()]||(()=>{}),ryr=0;function za(e){let[t,r]=aye.useState(tyr());return Mo(()=>{e||r(n=>n??String(ryr++))},[e]),e||(t?`radix-${t}`:"")}var uk=A(Qn(),1),HX="Collapsible",[nyr,iye]=Co(HX),[oyr,sye]=nyr(HX),ult=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Ba({prop:n,defaultProp:o??!1,onChange:i,caller:HX});return(0,uk.jsx)(oyr,{scope:r,disabled:a,contentId:za(),open:l,onOpenToggle:qc.useCallback(()=>c(u=>!u),[c]),children:(0,uk.jsx)(wt.div,{"data-state":cye(l),"data-disabled":a?"":void 0,...s,ref:t})})});ult.displayName=HX;var dlt="CollapsibleTrigger",flt=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=sye(dlt,r);return(0,uk.jsx)(wt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":cye(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:it(e.onClick,o.onOpenToggle)})});flt.displayName=dlt;var lye="CollapsibleContent",plt=qc.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sye(lye,e.__scopeCollapsible);return(0,uk.jsx)(Ai,{present:r||o.open,children:({present:a})=>(0,uk.jsx)(ayr,{...n,ref:t,present:a})})});plt.displayName=lye;var ayr=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=sye(lye,r),[s,l]=qc.useState(n),c=qc.useRef(null),u=gr(t,c),d=qc.useRef(0),f=d.current,p=qc.useRef(0),h=p.current,m=i.open||s,v=qc.useRef(m),g=qc.useRef(void 0);return qc.useEffect(()=>{let y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Mo(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(n)}},[i.open,n]),(0,uk.jsx)(wt.div,{"data-state":cye(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:h?`${h}px`:void 0,...e.style},children:m&&o})});function cye(e){return e?"open":"closed"}var mlt=ult,hlt=flt,glt=plt;var jX=A(bt(),1),syr=A(Qn(),1),lyr=jX.createContext(void 0);function Uy(e){let t=jX.useContext(lyr);return e||t||"ltr"}var Vl=A(Qn(),1),zg="Accordion",cyr=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[dye,uyr,dyr]=Ly(zg),[WX,b9n]=Co(zg,[dyr,iye]),fye=iye(),fyr=Nf.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Vl.jsx)(dye.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Vl.jsx)(gyr,{...a,ref:t}):(0,Vl.jsx)(hyr,{...o,ref:t})})});fyr.displayName=zg;var[vlt,pyr]=WX(zg),[ylt,myr]=WX(zg,{collapsible:!1}),hyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Ba({prop:r,defaultProp:n??"",onChange:o,caller:zg});return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:Nf.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Nf.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:a,children:(0,Vl.jsx)(xlt,{...i,ref:t})})})}),gyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Ba({prop:r,defaultProp:n??[],onChange:o,caller:zg}),l=Nf.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=Nf.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Vl.jsx)(xlt,{...a,ref:t})})})}),[vyr,qX]=WX(zg),xlt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=Nf.default.useRef(null),l=gr(s,t),c=uyr(r),d=Uy(o)==="ltr",f=it(e.onKeyDown,p=>{if(!cyr.includes(p.key))return;let h=p.target,m=c().filter(P=>!P.ref.current?.disabled),v=m.findIndex(P=>P.ref.current===h),g=m.length;if(v===-1)return;p.preventDefault();let y=v,x=0,w=g-1,b=()=>{y=v+1,y>w&&(y=x)},C=()=>{y=v-1,y<x&&(y=w)};switch(p.key){case"Home":y=x;break;case"End":y=w;break;case"ArrowRight":a==="horizontal"&&(d?b():C());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?C():b());break;case"ArrowUp":a==="vertical"&&C();break}let S=y%g;m[S].ref.current?.focus()});return(0,Vl.jsx)(vyr,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Vl.jsx)(dye.Slot,{scope:r,children:(0,Vl.jsx)(wt.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),$X="AccordionItem",[yyr,pye]=WX($X),blt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=qX($X,r),i=pyr($X,r),s=fye(r),l=za(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Vl.jsx)(yyr,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Vl.jsx)(mlt,{"data-orientation":a.orientation,"data-state":klt(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});blt.displayName=$X;var wlt="AccordionHeader",Clt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(wlt,r);return(0,Vl.jsx)(wt.h3,{"data-orientation":o.orientation,"data-state":klt(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Clt.displayName=wlt;var uye="AccordionTrigger",Slt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(uye,r),i=myr(uye,r),s=fye(r);return(0,Vl.jsx)(dye.ItemSlot,{scope:r,children:(0,Vl.jsx)(hlt,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});Slt.displayName=uye;var Plt="AccordionContent",Ilt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(Plt,r),i=fye(r);return(0,Vl.jsx)(glt,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{["--radix-accordion-content-height"]:"var(--radix-collapsible-content-height)",["--radix-accordion-content-width"]:"var(--radix-collapsible-content-width)",...e.style}})});Ilt.displayName=Plt;function klt(e){return e?"open":"closed"}var Rlt=blt,Nlt=Clt,mye=Slt,hye=Ilt;var KX=A(bt());var Tlt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),byr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),gye=e=>{let t=byr(e);return t.charAt(0).toUpperCase()+t.slice(1)},GX=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mlt=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var U3=A(bt());var Elt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Alt=(0,U3.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,U3.createElement)("svg",{ref:l,...Elt,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:GX("lucide",o),...!a&&!Mlt(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,U3.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var Ct=(e,t)=>{let r=(0,KX.forwardRef)(({className:n,...o},a)=>(0,KX.createElement)(Alt,{ref:a,iconNode:t,className:GX(`lucide-${Tlt(gye(e))}`,`lucide-${e}`,n),...o}));return r.displayName=gye(e),r};var wyr=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],z3=Ct("align-center",wyr);var Cyr=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],H3=Ct("align-justify",Cyr);var Syr=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],j3=Ct("align-left",Syr);var Pyr=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],$3=Ct("align-right",Pyr);var Iyr=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],W3=Ct("bold",Iyr);var kyr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q0=Ct("check",kyr);var Ryr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dS=Ct("chevron-down",Ryr);var Nyr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],BA=Ct("chevron-left",Nyr);var Tyr=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fS=Ct("chevron-right",Tyr);var Myr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],q3=Ct("chevron-up",Myr);var Eyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zy=Ct("circle-alert",Eyr);var Ayr=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pS=Ct("circle-check-big",Ayr);var Lyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VA=Ct("circle",Lyr);var Dyr=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],G3=Ct("code",Dyr);var Oyr=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],K3=Ct("credit-card",Oyr);var _yr=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],G0=Ct("ellipsis",_yr);var Fyr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],X3=Ct("eye",Fyr);var Byr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Y3=Ct("file-text",Byr);var Vyr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Q3=Ct("file",Vyr);var Uyr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],UA=Ct("image",Uyr);var zyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zA=Ct("info",zyr);var Hyr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Z3=Ct("italic",Hyr);var jyr=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],J3=Ct("link",jyr);var $yr=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],eV=Ct("list-ordered",$yr);var Wyr=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],tV=Ct("list",Wyr);var qyr=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jp=Ct("loader-circle",qyr);var Gyr=[["path",{d:"M5 12h14",key:"1ays0h"}]],rV=Ct("minus",Gyr);var Kyr=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],nV=Ct("music",Kyr);var Xyr=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],oV=Ct("palette",Xyr);var Yyr=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],aV=Ct("phone",Yyr);var Qyr=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],iV=Ct("quote",Qyr);var Zyr=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],sV=Ct("redo",Zyr);var Jyr=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lV=Ct("search",Jyr);var exr=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Tf=Ct("square-pen",exr);var txr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],cV=Ct("strikethrough",txr);var rxr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mS=Ct("triangle-alert",rxr);var nxr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],uV=Ct("underline",nxr);var oxr=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],dV=Ct("undo",oxr);var axr=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],fV=Ct("upload",axr);var ixr=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pV=Ct("video",ixr);var sxr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K0=Ct("x",sxr);function Llt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Llt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function XX(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Llt(e))&&(n&&(n+=" "),n+=t);return n}var xye="-",lxr=e=>{let t=uxr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(xye);return s[0]===""&&s.length!==1&&s.shift(),_lt(s,t)||cxr(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},_lt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?_lt(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(xye);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Dlt=/^\[(.+)\]$/,cxr=e=>{if(Dlt.test(e)){let t=Dlt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},uxr=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fxr(Object.entries(e.classGroups),r).forEach(([a,i])=>{yye(i,n,a,t)}),n},yye=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Olt(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dxr(o)){yye(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{yye(i,Olt(t,a),r,n)})})},Olt=(e,t)=>{let r=e;return t.split(xye).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dxr=e=>e.isThemeGetter,fxr=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pxr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Flt="!",mxr=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let v=0;v<s.length;v++){let g=s[v];if(c===0){if(g===o&&(n||s.slice(v,v+a)===t)){l.push(s.slice(u,v)),u=v+a;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Flt),h=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},hxr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gxr=e=>({cache:pxr(e.cacheSize),parseClassName:mxr(e),...lxr(e)}),vxr=/\s+/,yxr=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vxr),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),h=!!p,m=n(h?f.substring(0,p):f);if(!m){if(!h){s=c+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=c+(s.length>0?" "+s:s);continue}h=!1}let v=hxr(u).join(":"),g=d?v+Flt:v,y=g+m;if(a.includes(y))continue;a.push(y);let x=o(m,h);for(let w=0;w<x.length;++w){let b=x[w];a.push(g+b)}s=c+(s.length>0?" "+s:s)}return s};function xxr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Blt(t))&&(n&&(n+=" "),n+=r);return n}var Blt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Blt(e[n]))&&(r&&(r+=" "),r+=t);return r};function bxr(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gxr(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=yxr(l,r);return o(l,u),u}return function(){return a(xxr.apply(null,arguments))}}var ui=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vlt=/^\[(?:([a-z-]+):)?(.+)\]$/i,wxr=/^\d+\/\d+$/,Cxr=new Set(["px","full","screen"]),Sxr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pxr=/\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$/,Ixr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kxr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rxr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X0=e=>HA(e)||Cxr.has(e)||wxr.test(e),hS=e=>jA(e,"length",Oxr),HA=e=>!!e&&!Number.isNaN(Number(e)),vye=e=>jA(e,"number",HA),mV=e=>!!e&&Number.isInteger(Number(e)),Nxr=e=>e.endsWith("%")&&HA(e.slice(0,-1)),mn=e=>Vlt.test(e),gS=e=>Sxr.test(e),Txr=new Set(["length","size","percentage"]),Mxr=e=>jA(e,Txr,Ult),Exr=e=>jA(e,"position",Ult),Axr=new Set(["image","url"]),Lxr=e=>jA(e,Axr,Fxr),Dxr=e=>jA(e,"",_xr),hV=()=>!0,jA=(e,t,r)=>{let n=Vlt.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Oxr=e=>Pxr.test(e)&&!Ixr.test(e),Ult=()=>!1,_xr=e=>kxr.test(e),Fxr=e=>Rxr.test(e);var Bxr=()=>{let e=ui("colors"),t=ui("spacing"),r=ui("blur"),n=ui("brightness"),o=ui("borderColor"),a=ui("borderRadius"),i=ui("borderSpacing"),s=ui("borderWidth"),l=ui("contrast"),c=ui("grayscale"),u=ui("hueRotate"),d=ui("invert"),f=ui("gap"),p=ui("gradientColorStops"),h=ui("gradientColorStopPositions"),m=ui("inset"),v=ui("margin"),g=ui("opacity"),y=ui("padding"),x=ui("saturate"),w=ui("scale"),b=ui("sepia"),C=ui("skew"),S=ui("space"),P=ui("translate"),T=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",mn,t],N=()=>[mn,t],V=()=>["",X0,hS],_=()=>["auto",HA,mn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",mn],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[HA,mn];return{cacheSize:500,separator:":",theme:{colors:[hV],spacing:[X0,hS],blur:["none","",gS,mn],brightness:U(),borderColor:[e],borderRadius:["none","","full",gS,mn],borderSpacing:N(),borderWidth:V(),contrast:U(),grayscale:O(),hueRotate:U(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Nxr,hS],inset:M(),margin:M(),opacity:U(),padding:N(),saturate:U(),scale:U(),sepia:O(),skew:U(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",mn]}],container:["container"],columns:[{columns:[gS]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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"],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:[...I(),mn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mV,mn]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",mn]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",mV,mn]}],"grid-cols":[{"grid-cols":[hV]}],"col-start-end":[{col:["auto",{span:["full",mV,mn]},mn]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[hV]}],"row-start-end":[{row:["auto",{span:[mV,mn]},mn]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",mn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",mn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",mn,t]}],"min-w":[{"min-w":[mn,t,"min","max","fit"]}],"max-w":[{"max-w":[mn,t,"none","full","min","max","fit","prose",{screen:[gS]},gS]}],h:[{h:[mn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[mn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gS,hS]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vye]}],"font-family":[{font:[hV]}],"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:["tighter","tight","normal","wide","wider","widest",mn]}],"line-clamp":[{"line-clamp":["none",HA,vye]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X0,mn]}],"list-image":[{"list-image":["none",mn]}],"list-style-type":[{list:["none","disc","decimal",mn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X0,hS]}],"underline-offset":[{"underline-offset":["auto",X0,mn]}],"text-decoration-color":[{decoration:[e]}],"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",mn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Exr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mxr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Lxr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[X0,mn]}],"outline-w":[{outline:[X0,hS]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[X0,hS]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gS,Dxr]}],"shadow-color":[{shadow:[hV]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",gS,mn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",mn]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",mn]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",mn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[mV,mn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",mn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",mn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],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",mn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X0,hS,vye]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}};var zlt=bxr(Bxr);var W=A(Qn(),1);var Hlt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jlt=XX,Kn=(e,t)=>r=>{var n;if(t?.variants==null)return jlt(e,r?.class,r?.className);let{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{let u=r?.[c],d=a?.[c];if(u===null)return null;let f=Hlt(u)||Hlt(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...a,...s}[m]):{...a,...s}[m]===v})?[...c,d,f]:c},[]);return jlt(e,i,l,r?.class,r?.className)};var gh=A(bt(),1);var $A=A(bt(),1);function di(e){let t=$A.useRef(e);return $A.useEffect(()=>{t.current=e}),$A.useMemo(()=>(...r)=>t.current?.(...r),[])}var Klt=A(Glt(),1);function Xlt(){return(0,Klt.useSyncExternalStore)(Kxr,()=>!0,()=>!1)}function Kxr(){return()=>{}}var gV=A(Qn(),1),wye="Avatar",[Xxr,oXn]=Co(wye),[Yxr,Qlt]=Xxr(wye),Zlt=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=gh.useState("idle");return(0,gV.jsx)(Yxr,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,gV.jsx)(wt.span,{...n,ref:t})})});Zlt.displayName=wye;var Jlt="AvatarImage",ect=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=Qlt(Jlt,r),s=Qxr(n,a),l=di(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mo(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,gV.jsx)(wt.img,{...a,ref:t,src:n}):null});ect.displayName=Jlt;var tct="AvatarFallback",rct=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=Qlt(tct,r),[i,s]=gh.useState(n===void 0);return gh.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,gV.jsx)(wt.span,{...o,ref:t}):null});rct.displayName=tct;function Ylt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Qxr(e,{referrerPolicy:t,crossOrigin:r}){let n=Xlt(),o=gh.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=gh.useState(()=>Ylt(a,e));return Mo(()=>{s(Ylt(a,e))},[a,e]),Mo(()=>{let l=d=>()=>{s(d)};if(!a)return;let c=l("loaded"),u=l("error");return a.addEventListener("load",c),a.addEventListener("error",u),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",u)}},[a,r,t]),i}var Cye=Zlt,Sye=ect,Pye=rct;var e5=A(Qn(),1),Wy=A(bt(),1);var nct=A(bt(),1),qA=(0,nct.createContext)({});var oct=A(bt(),1);function Hy(e){let t=(0,oct.useRef)(null);return t.current===null&&(t.current=e()),t.current}var YX=A(bt(),1);var GA=typeof window<"u";var KA=GA?YX.useLayoutEffect:YX.useEffect;var oxe=A(Qn(),1),iut=A(bt(),1),ZV=A(bt(),1);var act=A(bt(),1),vS=(0,act.createContext)(null);var out=A(Qn(),1);function dk(e,t){e.indexOf(t)===-1&&e.push(t)}function Hg(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hc=(e,t,r)=>r>t?t:r<e?e:r;var Y0=()=>{},Gc=()=>{};var Mu={};var vV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yV(e){return typeof e=="object"&&e!==null}var xV=e=>/^0[^.\s]+$/u.test(e);function fk(e){let t;return()=>(t===void 0&&(t=e()),t)}var es=e=>e;var Jxr=(e,t)=>r=>t(e(r)),jg=(...e)=>e.reduce(Jxr);var vh=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Q0=class{constructor(){this.subscriptions=[]}add(t){return dk(this.subscriptions,t),()=>Hg(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Os=e=>e*1e3,Kc=e=>e/1e3;function bV(e,t){return t?e*(1e3/t):0}var ict=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var sct=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,e0r=1e-7,t0r=12;function r0r(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=sct(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>e0r&&++s<t0r);return i}function yS(e,t,r,n){if(e===t&&r===n)return es;let o=a=>r0r(a,0,1,e,r);return a=>a===0||a===1?a:sct(o(a),t,n)}var QX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ZX=e=>t=>1-e(1-t);var JX=yS(.33,1.53,.69,.99),XA=ZX(JX),wV=QX(XA);var CV=e=>(e*=2)<1?.5*XA(e):.5*(2-Math.pow(2,-10*(e-1)));var SV=e=>1-Math.sin(Math.acos(e)),PV=ZX(SV),IV=QX(SV);var Iye=yS(.42,0,1,1),kye=yS(0,0,.58,1),kV=yS(.42,0,.58,1);var RV=e=>Array.isArray(e)&&typeof e[0]!="number";function NV(e,t){return RV(e)?e[ict(0,e.length,t)]:e}var TV=e=>Array.isArray(e)&&typeof e[0]=="number";var lct={linear:es,easeIn:Iye,easeInOut:kV,easeOut:kye,circIn:SV,circInOut:IV,circOut:PV,backIn:XA,backInOut:wV,backOut:JX,anticipate:CV},n0r=e=>typeof e=="string",eY=e=>{if(TV(e)){Gc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return yS(t,r,n,o)}else if(n0r(e))return Gc(lct[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lct[e];return e};var MV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Mf={value:null,addProjectionMetrics:null};function cct(e,t){let r=new Set,n=new Set,o=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(s)}let u={schedule:(d,f=!1,p=!1)=>{let m=p&&o?r:n;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(s=d,o){a=!0;return}o=!0,[r,n]=[n,r],r.forEach(c),t&&Mf.value&&Mf.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var o0r=40;function tY(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=MV.reduce((x,w)=>(x[w]=cct(a,t?w:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let x=Mu.useManualTiming?o.timestamp:performance.now();r=!1,Mu.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,o0r),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},v=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:MV.reduce((x,w)=>{let b=i[w];return x[w]=(C,S=!1,P=!1)=>(r||v(),b.schedule(C,S,P)),x},{}),cancel:x=>{for(let w=0;w<MV.length;w++)i[MV[w]].cancel(x)},state:o,steps:i}}var{schedule:hn,cancel:Eu,state:bs,steps:EV}=tY(typeof requestAnimationFrame<"u"?requestAnimationFrame:es,!0);var rY;function a0r(){rY=void 0}var ws={now:()=>(rY===void 0&&ws.set(bs.isProcessing||Mu.useManualTiming?bs.timestamp:performance.now()),rY),set:e=>{rY=e,queueMicrotask(a0r)}};var $g={layout:0,mainThread:0,waapi:0};var uct=e=>t=>typeof t=="string"&&t.startsWith(e),pk=uct("--"),i0r=uct("var(--"),mk=e=>i0r(e)?s0r.test(e.split("/*")[0].trim()):!1,s0r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var jy={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Z0={...jy,transform:e=>hc(0,1,e)},AV={...jy,default:1};var xS=e=>Math.round(e*1e5)/1e5;var YA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dct(e){return e==null}var fct=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var QA=(e,t)=>r=>!!(typeof r=="string"&&fct.test(r)&&r.startsWith(e)||t&&!dct(r)&&Object.prototype.hasOwnProperty.call(r,t)),nY=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(YA);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var l0r=e=>hc(0,255,e),Rye={...jy,transform:e=>Math.round(l0r(e))},$y={test:QA("rgb","red"),parse:nY("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Rye.transform(e)+", "+Rye.transform(t)+", "+Rye.transform(r)+", "+xS(Z0.transform(n))+")"};function c0r(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var LV={test:QA("#"),parse:c0r,transform:$y.transform};var DV=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wg=DV("deg"),Au=DV("%"),hr=DV("px"),Nye=DV("vh"),Tye=DV("vw"),oY=(()=>({...Au,parse:e=>Au.parse(e)/100,transform:e=>Au.transform(e*100)}))();var bS={test:QA("hsl","hue"),parse:nY("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Au.transform(xS(t))+", "+Au.transform(xS(r))+", "+xS(Z0.transform(n))+")"};var Li={test:e=>$y.test(e)||LV.test(e)||bS.test(e),parse:e=>$y.test(e)?$y.parse(e):bS.test(e)?bS.parse(e):LV.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$y.transform(e):bS.transform(e),getAnimatableNone:e=>{let t=Li.parse(e);return t.alpha=0,Li.transform(t)}};var pct=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function u0r(e){return isNaN(e)&&typeof e=="string"&&(e.match(YA)?.length||0)+(e.match(pct)?.length||0)>0}var hct="number",gct="color",d0r="var",f0r="var(",mct="${}",p0r=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wS(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(p0r,l=>(Li.test(l)?(n.color.push(a),o.push(gct),r.push(Li.parse(l))):l.startsWith(f0r)?(n.var.push(a),o.push(d0r),r.push(l)):(n.number.push(a),o.push(hct),r.push(parseFloat(l))),++a,mct)).split(mct);return{values:r,split:s,indexes:n,types:o}}function vct(e){return wS(e).values}function yct(e){let{split:t,types:r}=wS(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===hct?a+=xS(o[i]):s===gct?a+=Li.transform(o[i]):a+=o[i]}return a}}var m0r=e=>typeof e=="number"?0:Li.test(e)?Li.getAnimatableNone(e):e;function h0r(e){let t=vct(e);return yct(e)(t.map(m0r))}var Lu={test:u0r,parse:vct,createTransformer:yct,getAnimatableNone:h0r};function Mye(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xct({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=Mye(l,s,e+1/3),a=Mye(l,s,e),i=Mye(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function ZA(e,t){return r=>r>0?t:e}var Vn=(e,t,r)=>e+(t-e)*r;var Eye=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},g0r=[LV,$y,bS],v0r=e=>g0r.find(t=>t.test(e));function bct(e){let t=v0r(e);if(Y0(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===bS&&(r=xct(r)),r}var Aye=(e,t)=>{let r=bct(e),n=bct(t);if(!r||!n)return ZA(e,t);let o={...r};return a=>(o.red=Eye(r.red,n.red,a),o.green=Eye(r.green,n.green,a),o.blue=Eye(r.blue,n.blue,a),o.alpha=Vn(r.alpha,n.alpha,a),$y.transform(o))};var aY=new Set(["none","hidden"]);function wct(e,t){return aY.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function y0r(e,t){return r=>Vn(e,t,r)}function iY(e){return typeof e=="number"?y0r:typeof e=="string"?mk(e)?ZA:Li.test(e)?Aye:w0r:Array.isArray(e)?Cct:typeof e=="object"?Li.test(e)?Aye:x0r:ZA}function Cct(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>iY(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function x0r(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=iY(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function b0r(e,t){let r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let a=t.types[o],i=e.indexes[a][n[a]],s=e.values[i]??0;r[o]=s,n[a]++}return r}var w0r=(e,t)=>{let r=Lu.createTransformer(t),n=wS(e),o=wS(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?aY.has(e)&&!o.values.length||aY.has(t)&&!n.values.length?wct(e,t):jg(Cct(b0r(n,o),o.values),r):(Y0(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ZA(e,t))};function sY(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Vn(e,t,r):iY(e)(e,t)}var Sct=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>hn.update(t,r),stop:()=>Eu(t),now:()=>bs.isProcessing?bs.timestamp:ws.now()}};var lY=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function JA(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function OV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(JA(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Kc(o)}}var C0r=5;function cY(e,t,r){let n=Math.max(t-C0r,0);return bV(r-e(n),t-n)}var fi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Dye=.001;function Pct({duration:e=fi.duration,bounce:t=fi.bounce,velocity:r=fi.velocity,mass:n=fi.mass}){let o,a;Y0(e<=Os(fi.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hc(fi.minDamping,fi.maxDamping,i),e=hc(fi.minDuration,fi.maxDuration,Kc(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=uY(c,i),h=Math.exp(-d);return Dye-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=uY(Math.pow(c,2),i);return(-o(c)+Dye>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Dye+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=P0r(o,a,s);if(e=Os(e),isNaN(l))return{stiffness:fi.stiffness,damping:fi.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var S0r=12;function P0r(e,t,r){let n=r;for(let o=1;o<S0r;o++)n=n-e(n)/t(n);return n}function uY(e,t){return e*Math.sqrt(1-t*t)}var I0r=["duration","bounce"],k0r=["stiffness","damping","mass"];function Ict(e,t){return t.some(r=>e[r]!==void 0)}function R0r(e){let t={velocity:fi.velocity,stiffness:fi.stiffness,damping:fi.damping,mass:fi.mass,isResolvedFromDuration:!1,...e};if(!Ict(e,k0r)&&Ict(e,I0r))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fi.mass,stiffness:o,damping:a}}else{let r=Pct(e);t={...t,...r,mass:fi.mass},t.isResolvedFromDuration=!0}return t}function J0(e=fi.visualDuration,t=fi.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=R0r({...r,velocity:-Kc(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=i-a,g=Kc(Math.sqrt(l/u)),y=Math.abs(v)<5;n||(n=y?fi.restSpeed.granular:fi.restSpeed.default),o||(o=y?fi.restDelta.granular:fi.restDelta.default);let x;if(m<1){let b=uY(g,m);x=C=>{let S=Math.exp(-m*g*C);return i-S*((h+m*g*v)/b*Math.sin(b*C)+v*Math.cos(b*C))}}else if(m===1)x=b=>i-Math.exp(-g*b)*(v+(h+g*v)*b);else{let b=g*Math.sqrt(m*m-1);x=C=>{let S=Math.exp(-m*g*C),P=Math.min(b*C,300);return i-S*((h+m*g*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=b===0?h:0;m<1&&(S=b===0?Os(h):cY(x,b,C));let P=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=P&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(JA(w),2e4),C=lY(S=>w.next(b*S).value,b,30);return b+"ms "+C},toTransition:()=>{}};return w}J0.applyToOptions=e=>{let t=OV(e,100,J0);return e.ease=t.ease,e.duration=Os(t.duration),e.type="keyframes",e};function _V({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);let y=P=>-m*Math.exp(-P/n),x=P=>g+y(P),w=P=>{let T=y(P),L=x(P);f.done=Math.abs(T)<=c,f.value=f.done?g:L},b,C,S=P=>{p(f.value)&&(b=P,C=J0({keyframes:[f.value,h(f.value)],velocity:cY(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let T=!1;return!C&&b===void 0&&(T=!0,w(P),S(P)),b!==void 0&&P>=b?C.next(P-b):(!T&&w(P),f)}}}function N0r(e,t,r){let n=[],o=r||Mu.mix||sY,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||es:t;s=jg(l,s)}n.push(s)}return n}function dY(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Gc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=N0r(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=vh(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hc(e[0],e[a-1],u)):c}function FV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=vh(0,t,n);e.push(Vn(r,1,o))}}function BV(e){let t=[0];return FV(t,e.length-1),t}function kct(e,t){return e.map(r=>r*t)}function T0r(e,t){return e.map(()=>t||kV).splice(0,e.length-1)}function hk({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=RV(n)?n.map(eY):eY(n),a={done:!1,value:t[0]},i=kct(r&&r.length===t.length?r:BV(t),e),s=dY(i,t,{ease:Array.isArray(o)?o:T0r(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var M0r=e=>e!==null;function eL(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(M0r),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var E0r={decay:_V,inertia:_V,tween:hk,keyframes:hk,spring:J0};function fY(e){typeof e.type=="string"&&(e.type=E0r[e.type])}var CS=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var A0r=e=>e/100,eb=class extends CS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==ws.now()&&this.tick(ws.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$g.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;fY(t);let{type:r=hk,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||hk;l!==hk&&typeof s[0]!="number"&&(this.mixKeyframes=jg(A0r,sY(s[0],s[1])),s=[0,100]);let c=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=JA(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:o,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,w=n;if(d){let P=Math.min(this.currentTime,o)/s,T=Math.floor(P),L=P%1;!L&&P>=1&&(L=1),L===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(w=i)),x=hc(0,1,L)*s}let b=y?{done:!1,value:u[0]}:w.next(x);a&&(b.value=a(b.value));let{done:C}=b;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&h!==_V&&(b.value=eL(u,this.options,v,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Kc(this.calculatedDuration)}get time(){return Kc(this.currentTime)}set time(t){t=Os(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ws.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Kc(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=Sct,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ws.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$g.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Rct(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gk=e=>e*180/Math.PI,Oye=e=>{let t=gk(Math.atan2(e[1],e[0]));return _ye(t)},L0r={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oye,rotateZ:Oye,skewX:e=>gk(Math.atan(e[1])),skewY:e=>gk(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_ye=e=>(e=e%360,e<0&&(e+=360),e),Nct=Oye,Tct=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Mct=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),D0r={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tct,scaleY:Mct,scale:e=>(Tct(e)+Mct(e))/2,rotateX:e=>_ye(gk(Math.atan2(e[6],e[5]))),rotateY:e=>_ye(gk(Math.atan2(-e[2],e[0]))),rotateZ:Nct,rotate:Nct,skewX:e=>gk(Math.atan(e[4])),skewY:e=>gk(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function VV(e){return e.includes("scale")?1:0}function UV(e,t){if(!e||e==="none")return VV(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=D0r,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=L0r,o=s}if(!o)return VV(t);let a=n[t],i=o[1].split(",").map(O0r);return typeof a=="function"?a(i):i[a]}var Fye=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return UV(r,t)};function O0r(e){return parseFloat(e.trim())}var qg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$p=(()=>new Set(qg))();var Bye=e=>e===jy||e===hr,_0r=new Set(["x","y","z"]),F0r=qg.filter(e=>!_0r.has(e));function Ect(e){let t=[];return F0r.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var SS={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UV(t,"x"),y:(e,{transform:t})=>UV(t,"y")};SS.translateX=SS.x;SS.translateY=SS.y;var vk=new Set,Vye=!1,Uye=!1,zye=!1;function Act(){if(Uye){let e=Array.from(vk).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=Ect(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{n.getValue(a)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Uye=!1,Vye=!1,vk.forEach(e=>e.complete(zye)),vk.clear()}function Lct(){vk.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uye=!0)})}function Hye(){zye=!0,Lct(),Act(),zye=!1}var tb=class{constructor(t,r,n,o,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(vk.add(this),Vye||(Vye=!0,hn.read(Lct),hn.resolveKeyframes(Act))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){let a=o?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){let s=n.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),o&&a===void 0&&o.set(t[0])}Rct(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vk.delete(this)}cancel(){this.state==="scheduled"&&(vk.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Dct=e=>e.startsWith("--");function Oct(e,t,r){Dct(t)?e.style.setProperty(t,r):e.style[t]=r}var _ct=fk(()=>window.ScrollTimeline!==void 0);var Fct={};function Bct(e,t){let r=fk(e);return()=>Fct[t]??r()}var pY=Bct(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var yk=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var jye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yk([0,.65,.55,1]),circOut:yk([.55,0,1,.45]),backIn:yk([.31,.01,.66,-.59]),backOut:yk([.33,1.53,.69,.99])};function $ye(e,t){if(e)return typeof e=="function"?pY()?lY(e,t):"ease-out":TV(e)?yk(e):Array.isArray(e)?e.map(r=>$ye(r,t)||jye.easeOut):jye[e]}function Vct(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){let u={[t]:r};l&&(u.offset=l);let d=$ye(s,o);Array.isArray(d)&&(u.easing=d),Mf.value&&$g.waapi++;let f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};c&&(f.pseudoElement=c);let p=e.animate(u,f);return Mf.value&&p.finished.finally(()=>{$g.waapi--}),p}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function Uct({type:e,...t}){return xk(e)&&pY()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var mY=class extends CS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:n,keyframes:o,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Gc(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=Uct(t);this.animation=Vct(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=eL(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):Oct(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Kc(Number(t))}get time(){return Kc(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Os(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_ct()?(this.animation.timeline=t,es):r(this)}};var zct={anticipate:CV,backInOut:wV,circInOut:IV};function B0r(e){return e in zct}function Hct(e){typeof e.ease=="string"&&B0r(e.ease)&&(e.ease=zct[e.ease])}var jct=10,hY=class extends mY{constructor(t){Hct(t),fY(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:o,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new eb({...i,autoplay:!1}),l=Os(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-jct).value,s.sample(l).value,jct),s.stop()}};var Wye=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lu.test(e)||e==="0")&&!e.startsWith("url("));function V0r(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function $ct(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Wye(o,t),s=Wye(a,t);return Y0(i===s,`You are trying to animate ${t} from "${o}" to "${a}". "${i?a:o}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:V0r(e)||(r==="spring"||xk(r))&&n}function tL(e){e.duration=0,e.type}var U0r=new Set(["opacity","clipPath","filter","transform"]),z0r=fk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wct(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=t.owner.getProps();return z0r()&&r&&U0r.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var H0r=40,zV=class extends CS{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ws.now();let f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||tb;this.keyframeResolver=new p(s,(h,m,v)=>this.onKeyframesResolved(h,m,f,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=ws.now(),$ct(t,a,i,s)||((Mu.instantAnimations||!l)&&u?.(eL(t,n,r)),t[0]=t[t.length-1],tL(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>H0r?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&Wct(f)?new hY({...f,element:f.motionValue.owner.current}):new eb(f);p.finished.then(()=>this.notifyFinished()).catch(es),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hye()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var gY=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t){let r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,o)=>{n&&n(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var HV=class extends gY{then(t,r){return this.finished.finally(t).then(()=>{})}};var j0r=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $0r(e){let t=j0r.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var W0r=4;function qye(e,t,r=1){Gc(r<=W0r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=$0r(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return vV(i)?parseFloat(i):i}return mk(o)?qye(o,t,r+1):o}function bk(e,t){return e?.[t]??e?.default??e}var jV=new Set(["width","height","top","left","right","bottom",...qg]);var qct={test:e=>e==="auto",parse:e=>e};var vY=e=>t=>t.test(e);var Gye=[jy,hr,Au,Wg,Tye,Nye,qct],Kye=e=>Gye.find(vY(e));function Gct(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var q0r=new Set(["brightness","contrast","saturate","opacity"]);function G0r(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(YA)||[];if(!n)return e;let o=r.replace(n,""),a=q0r.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var K0r=/\b([a-z-]*)\(.*?\)/gu,$V={...Lu,getAnimatableNone:e=>{let t=e.match(K0r);return t?t.map(G0r).join(" "):e}};var Xye={...jy,transform:Math.round};var Kct={rotate:Wg,rotateX:Wg,rotateY:Wg,rotateZ:Wg,scale:AV,scaleX:AV,scaleY:AV,scaleZ:AV,skew:Wg,skewX:Wg,skewY:Wg,distance:hr,translateX:hr,translateY:hr,translateZ:hr,x:hr,y:hr,z:hr,perspective:hr,transformPerspective:hr,opacity:Z0,originX:oY,originY:oY,originZ:hr};var wk={borderWidth:hr,borderTopWidth:hr,borderRightWidth:hr,borderBottomWidth:hr,borderLeftWidth:hr,borderRadius:hr,radius:hr,borderTopLeftRadius:hr,borderTopRightRadius:hr,borderBottomRightRadius:hr,borderBottomLeftRadius:hr,width:hr,maxWidth:hr,height:hr,maxHeight:hr,top:hr,right:hr,bottom:hr,left:hr,padding:hr,paddingTop:hr,paddingRight:hr,paddingBottom:hr,paddingLeft:hr,margin:hr,marginTop:hr,marginRight:hr,marginBottom:hr,marginLeft:hr,backgroundPositionX:hr,backgroundPositionY:hr,...Kct,zIndex:Xye,fillOpacity:Z0,strokeOpacity:Z0,numOctaves:Xye};var Xct={...wk,color:Li,backgroundColor:Li,outlineColor:Li,fill:Li,stroke:Li,borderColor:Li,borderTopColor:Li,borderRightColor:Li,borderBottomColor:Li,borderLeftColor:Li,filter:$V,WebkitFilter:$V},WV=e=>Xct[e];function qV(e,t){let r=WV(e);return r!==$V&&(r=Lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var X0r=new Set(["auto","none","0"]);function Yct(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!X0r.has(a)&&wS(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=qV(r,o)}var GV=class extends tb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),mk(c))){let u=qye(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!jV.has(n)||t.length!==2)return;let[o,a]=t,i=Kye(o),s=Kye(a);if(i!==s)if(Bye(i)&&Bye(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else SS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Gct(t[o]))&&n.push(o);n.length&&Yct(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=SS[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);let a=n.length-1,i=n[a];n[a]=SS[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function KV(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}var XV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function YV(e){return yV(e)&&"offsetHeight"in e}var Qct=30,Y0r=e=>!isNaN(parseFloat(e)),Ck={current:void 0},yY=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=ws.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=ws.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Y0r(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Q0);let n=this.events[t].add(r);return t==="change"?()=>{n(),hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ck.current&&Ck.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ws.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qct)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Qct);return bV(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ef(e,t){return new yY(e,t)}var{schedule:Sk,cancel:Q0r}=tY(queueMicrotask,!1);var yh={x:!1,y:!1};function xY(){return yh.x||yh.y}function Yye(e){return e==="x"||e==="y"?yh[e]?null:(yh[e]=!0,()=>{yh[e]=!1}):yh.x||yh.y?null:(yh.x=yh.y=!0,()=>{yh.x=yh.y=!1})}function bY(e,t){let r=KV(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Zct(e){return!(e.pointerType==="touch"||xY())}function Qye(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{if(!Zct(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{Zct(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Zye=(e,t)=>t?e===t?!0:Zye(e,t.parentElement):!1;var Pk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Z0r=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jct(e){return Z0r.has(e.tagName)||e.tabIndex!==-1}var rL=new WeakSet;function eut(e){return t=>{t.key==="Enter"&&e(t)}}function Jye(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tut=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=eut(()=>{if(rL.has(r))return;Jye(r,"down");let o=eut(()=>{Jye(r,"up")}),a=()=>Jye(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function rut(e){return Pk(e)&&!xY()}function exe(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{let l=s.currentTarget;if(!rut(s))return;rL.add(l);let c=t(l,s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),rL.has(l)&&rL.delete(l),rut(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Zye(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),YV(s)&&(s.addEventListener("focus",c=>tut(c,o)),!Jct(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Ik(e){return yV(e)&&"ownerSVGElement"in e}function QV(e){return Ik(e)&&e.tagName==="svg"}function txe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=dY(o,a,i);return t?s(n):s}var Eo=e=>!!(e&&e.getVelocity);var J0r=[...Gye,Li,Lu],rxe=e=>J0r.find(vY(e));var wY=A(bt(),1),rb=A(bt(),1);var nut=A(bt(),1),PS=(0,nut.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var nxe=class extends wY.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=YV(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function aut({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,rb.useId)(),a=(0,rb.useRef)(null),i=(0,rb.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,rb.useContext)(PS);return(0,rb.useInsertionEffect)(()=>{let{width:l,height:c,top:u,left:d,right:f}=i.current;if(t||!a.current||!l||!c)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=o;let h=document.createElement("style");s&&(h.nonce=s);let m=n??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
415
415
|
[data-motion-pop-id="${o}"] {
|
|
416
416
|
position: absolute !important;
|
|
417
417
|
width: ${l}px !important;
|