@moontra/moonui-pro 2.25.2 → 2.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -393,7 +393,7 @@ Alternatively, you can use your own component as a description by assigning it a
393
393
  For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return pf.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},k9e=g9e;var N9e=v9e,Hse=y9e,jse=x9e,qse=P9e,$se=R9e,Wse=w9e,Gse=S9e;var Mp=L(fe(),1),M9e=k9e;var nZt=N9e,T9e=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsx)(Hse,{className:V("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}));T9e.displayName=Hse.displayName;var Kse=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsxs)(nZt,{children:[(0,Mp.jsx)(T9e,{}),(0,Mp.jsx)(jse,{ref:r,className:V("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})]}));Kse.displayName=jse.displayName;var Xse=({className:e,...t})=>(0,Mp.jsx)("div",{className:V("flex flex-col space-y-2 text-center sm:text-left",e),...t});Xse.displayName="AlertDialogHeader";var Yse=({className:e,...t})=>(0,Mp.jsx)("div",{className:V("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yse.displayName="AlertDialogFooter";var Zse=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsx)(Wse,{ref:r,className:V("text-lg font-semibold",e),...t}));Zse.displayName=Wse.displayName;var Qse=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsx)(Gse,{ref:r,className:V("text-sm text-muted-foreground",e),...t}));Qse.displayName=Gse.displayName;var Jse=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsx)(qse,{ref:r,className:V(ku(),e),...t}));Jse.displayName=qse.displayName;var ele=jS.forwardRef(({className:e,...t},r)=>(0,Mp.jsx)($se,{ref:r,className:V(ku({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));ele.displayName=$se.displayName;var Pn=L(fe(),1);function A9e({selectedRows:e,actions:t,onClearSelection:r,className:n}){let[o,a]=tle.default.useState(!1),[i,s]=tle.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,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsxs)("div",{className:V("flex items-center gap-2",n),children:[(0,Pn.jsxs)(Ot,{variant:"secondary",className:"gap-1",children:[(0,Pn.jsx)("span",{className:"font-semibold",children:l}),(0,Pn.jsx)("span",{children:"selected"})]}),(0,Pn.jsxs)(Cr,{children:[(0,Pn.jsx)(Sr,{asChild:!0,children:(0,Pn.jsx)(ne,{variant:"outline",size:"sm",disabled:o,className:"gap-2",children:o?(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(wr,{className:"h-4 w-4 animate-spin"}),"Processing..."]}):(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(Fa,{className:"h-4 w-4"}),"Bulk Actions"]})})}),(0,Pn.jsxs)(vr,{align:"end",className:"w-48",children:[t.map((f,p)=>{let m=typeof f.disabled=="function"?f.disabled(e):f.disabled;return(0,Pn.jsxs)(_e,{disabled:m||o,onSelect:()=>c(f),className:V("cursor-pointer",f.variant==="destructive"&&"text-destructive focus:text-destructive"),children:[f.icon&&(0,Pn.jsx)("span",{className:"mr-2 h-4 w-4",children:f.icon}),f.label]},p)}),r&&(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(Vr,{}),(0,Pn.jsx)(_e,{onSelect:r,className:"cursor-pointer text-muted-foreground",children:"Clear selection"})]})]})]})]}),(0,Pn.jsx)(M9e,{open:!!i,onOpenChange:f=>!f&&s(null),children:(0,Pn.jsxs)(Kse,{children:[(0,Pn.jsxs)(Xse,{children:[(0,Pn.jsxs)(Zse,{className:"flex items-center gap-2",children:[i?.variant==="destructive"&&(0,Pn.jsx)(wi,{className:"h-5 w-5 text-destructive"}),i?.confirmTitle||"Confirm Action"]}),(0,Pn.jsx)(Qse,{children:i?.confirmMessage||`This action will affect ${l} selected item${l>1?"s":""}. This action cannot be undone.`})]}),(0,Pn.jsxs)(Yse,{children:[(0,Pn.jsx)(ele,{disabled:o,children:"Cancel"}),(0,Pn.jsx)(Jse,{onClick:d,disabled:o,className:V(i?.variant==="destructive"&&"bg-destructive text-destructive-foreground hover:bg-destructive/90"),children:o?(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsx)(wr,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):"Confirm"})]})]})})]})}function oZt(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(`
394
394
  `)?`"${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(`
395
395
  `)?`"${c.replace(/"/g,'""')}"`:c});o.push(i.join(","))}),o.join(`
396
- `)}function aZt(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 iZt(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 L9e(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=oZt(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=aZt(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}`;iZt(i,c,s)}function E9e(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 M_=L(ue(),1);var Zt=L(fe(),1),sZt={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 lZt(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 D9e({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,M_.useState)([]),[f,p]=(0,M_.useState)(!0),m=a||u,h=i||d,g=l!==void 0?l:f,v=c||p,y=(0,M_.useMemo)(()=>e.getAllColumns().filter(P=>P.id==="select"||P.id==="actions"||P.id==="expander"?!1:P.getCanFilter()),[e]),x=()=>{let P=y[0];if(!P)return;let N={column:P.id,operator:"contains",value:""};h([...m,N])},C=(P,N)=>{let D=[...m];D[P]={...D[P],...N},h(D)},b=P=>{h(m.filter((N,D)=>D!==P))},w=()=>{h([]),e.resetColumnFilters()},S=()=>{let P=(D,E,A)=>{let z=m.find(I=>I.column===E);if(!z)return!0;let B=D.getValue(E),R=z.value;switch(z.operator){case"equals":return B===R;case"notEquals":return B!==R;case"contains":return String(B).toLowerCase().includes(String(R).toLowerCase());case"notContains":return!String(B).toLowerCase().includes(String(R).toLowerCase());case"startsWith":return String(B).toLowerCase().startsWith(String(R).toLowerCase());case"endsWith":return String(B).toLowerCase().endsWith(String(R).toLowerCase());case"greaterThan":return Number(B)>Number(R);case"lessThan":return Number(B)<Number(R);case"greaterThanOrEqual":return Number(B)>=Number(R);case"lessThanOrEqual":return Number(B)<=Number(R);case"isNull":return B==null||B==="";case"isNotNull":return B!=null&&B!=="";default:return!0}};e.resetColumnFilters(),[...new Set(m.map(D=>D.column))].forEach(D=>{let E=e.getColumn(D);E&&E.setFilterValue({custom:!0,filters:m,matchAll:g})}),m.length===0&&e.resetColumnFilters(),r(!1)};return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(Et,{children:t&&(0,Zt.jsx)(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20 z-40",onClick:()=>r(!1)})}),(0,Zt.jsx)(Et,{children:t&&(0,Zt.jsx)(ie.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:V("fixed top-0 bottom-0 z-50 bg-background border-l shadow-xl",n==="right"?"right-0":"left-0"),style:{width:o},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)(bi,{className:"h-5 w-5"}),(0,Zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),m.length>0&&(0,Zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",m.length," active)"]})]}),(0,Zt.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,Zt.jsx)(nr,{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)(bt,{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)(ne,{variant:g?"primary":"outline",size:"sm",onClick:()=>v(!0),className:"flex-1",children:"Match all"}),(0,Zt.jsx)(ne,{variant:g?"outline":"primary",size:"sm",onClick:()=>v(!1),className:"flex-1",children:"Match any"})]})]}),(0,Zt.jsx)(nc,{className:"mb-6"}),s&&(0,Zt.jsxs)(Zt.Fragment,{children:[s,(0,Zt.jsx)(nc,{className:"my-6"})]}),(0,Zt.jsx)("div",{className:"space-y-4",children:m.map((P,N)=>(0,Zt.jsx)(cZt,{filter:P,columns:y,onUpdate:D=>C(N,D),onRemove:()=>b(N)},N))}),(0,Zt.jsxs)(ne,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,Zt.jsx)(ni,{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)(ne,{variant:"outline",onClick:w,disabled:m.length===0,className:"flex-1",children:[(0,Zt.jsx)(Oi,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,Zt.jsx)(ne,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]})}function cZt({filter:e,columns:t,onUpdate:r,onRemove:n}){let i=t.find(c=>c.id===e.column)?.columnDef?.meta?.filterType||"string",s=lZt(i),l=e.operator!=="isNull"&&e.operator!=="isNotNull";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:c=>r({column:c}),children:[(0,Zt.jsx)($o,{className:"flex-1",children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsx)(Wo,{children:t.map(c=>{let u=c.columnDef.header,d=typeof u=="function"?c.id:u||c.id;return(0,Zt.jsx)(Tt,{value:c.id,children:d},c.id)})})]}),(0,Zt.jsx)(ne,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,Zt.jsx)(nr,{className:"h-4 w-4"})})]}),(0,Zt.jsxs)(qo,{value:e.operator,onValueChange:c=>r({operator:c}),children:[(0,Zt.jsx)($o,{children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsx)(Wo,{children:s.map(c=>(0,Zt.jsx)(Tt,{value:c,children:sZt[c]},c))})]}),l&&(0,Zt.jsx)("div",{children:i==="boolean"?(0,Zt.jsxs)(qo,{value:String(e.value),onValueChange:c=>r({value:c==="true"}),children:[(0,Zt.jsx)($o,{children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsxs)(Wo,{children:[(0,Zt.jsx)(Tt,{value:"true",children:"True"}),(0,Zt.jsx)(Tt,{value:"false",children:"False"})]})]}):i==="number"?(0,Zt.jsx)(Qt,{type:"number",value:e.value||"",onChange:c=>r({value:c.target.value}),placeholder:"Enter value..."}):(0,Zt.jsx)(Qt,{value:e.value||"",onChange:c=>r({value:c.target.value}),placeholder:"Enter value..."})})]})}var rt=L(fe(),1);function O9e({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,className:l,onRowSelect:c,onExport:u,enableExpandable:d=!1,renderSubComponent:f,expandedRows:p,onRowExpandChange:m,bulkActions:h=[],features:g={},theme:v={},texts:y={},enableSorting:x=!0,enableFiltering:C=!0,enablePagination:b=!0,enableColumnVisibility:w=!0,enableRowSelection:S,filterPlaceholder:P="Search all columns...",defaultPageSize:N,manualPagination:D=!1,pageCount:E,onPaginationChange:A,onSortingChange:z,onColumnFiltersChange:B,state:R}){let I=Cs.default.useMemo(()=>e.map(ce=>{let{enableHiding:Fe,...xt}=ce;return{...xt,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:k,isLoading:T}=Ut();if(!T&&!k)return(0,rt.jsx)(Be,{className:V("w-full",l),children:(0,rt.jsx)(Ve,{className:"py-12 text-center",children:(0,rt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,rt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,rt.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,rt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Data Table is available exclusively to MoonUI Pro subscribers."}),(0,rt.jsx)("div",{className:"flex gap-3 justify-center",children:(0,rt.jsx)("a",{href:"/pricing",children:(0,rt.jsxs)(ne,{size:"sm",children:[(0,rt.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[O,F]=Cs.default.useState([]),[_,M]=Cs.default.useState([]),[j,H]=Cs.default.useState({}),[q,G]=Cs.default.useState({}),[U,K]=Cs.default.useState(""),[Y,Z]=Cs.default.useState(!1),[ae,oe]=Cs.default.useState(new Set),[Ae,Se]=Cs.default.useState(!1),Ue=p||ae,me=m?ce=>m(ce):oe,Pe=N||s,ve=Cs.default.useMemo(()=>t,[t]),pe=w8e({data:ve,columns:I,onSortingChange:z!==void 0?z:F,onColumnFiltersChange:B!==void 0?B:M,getCoreRowModel:v8e(),getPaginationRowModel:x8e(),getSortedRowModel:b8e(),getFilteredRowModel:y8e(),onColumnVisibilityChange:H,onRowSelectionChange:G,onGlobalFilterChange:K,globalFilterFn:"includesString",filterFns:{custom:(ce,Fe,xt)=>{if(!xt?.custom||!xt?.filters)return!0;let An=xt.filters,Ge=xt.matchAll!==void 0?xt.matchAll:!0,We=An.map(xe=>{let nt=ce.getValue(xe.column),mt=xe.value;switch(xe.operator){case"equals":return nt===mt;case"notEquals":return nt!==mt;case"contains":return String(nt).toLowerCase().includes(String(mt).toLowerCase());case"notContains":return!String(nt).toLowerCase().includes(String(mt).toLowerCase());case"startsWith":return String(nt).toLowerCase().startsWith(String(mt).toLowerCase());case"endsWith":return String(nt).toLowerCase().endsWith(String(mt).toLowerCase());case"greaterThan":return Number(nt)>Number(mt);case"lessThan":return Number(nt)<Number(mt);case"greaterThanOrEqual":return Number(nt)>=Number(mt);case"lessThanOrEqual":return Number(nt)<=Number(mt);case"isNull":return nt==null||nt==="";case"isNotNull":return nt!=null&&nt!=="";default:return!0}});return Ge?We.every(xe=>xe):We.some(xe=>xe)}},manualPagination:D,pageCount:E,state:{sorting:R?.sorting??O,columnFilters:R?.columnFilters??_,columnVisibility:R?.columnVisibility??j,rowSelection:R?.rowSelection??q,globalFilter:R?.globalFilter??U,...R||{}},initialState:{pagination:{pageSize:Pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:ce=>ce.id||ce.orderId||Math.random().toString()});Cs.default.useEffect(()=>{if(c&&a){let ce=pe.getFilteredSelectedRowModel().rows.map(Fe=>Fe.original);c(ce)}},[q,c,a,pe]);let $=pe.getState(),J=pe.getRowModel(),re=Cs.default.useRef(J.rows),Le=Cs.default.useMemo(()=>{let ce=re.current!==J.rows;return ce&&(re.current=J.rows),ce},[J.rows]),Ie=re.current,we={sorting:g.sorting!==!1,filtering:g.filtering!==!1||n,pagination:g.pagination!==!1||i,search:g.search!==!1||r,columnVisibility:g.columnVisibility!==!1,rowSelection:g.rowSelection!==!1||a,export:g.export!==!1||o},te=async ce=>{let Fe=pe.getFilteredSelectedRowModel().rows,xt=Fe.length>0?Fe.map(We=>We.original):pe.getFilteredRowModel().rows.map(We=>We.original);if(typeof o=="object"&&o.onExport){o.onExport(xt,ce);return}if(u){u(xt);return}let An=typeof o=="object"&&o.filename?o.filename:"data-export",Ge=E9e(I,j);await L9e(xt,{format:ce,filename:An,columns:Ge,includeHeaders:!0})},ye=Cs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Ne=()=>{pe.resetRowSelection()};return(0,rt.jsxs)("div",{className:V("moonui-pro-datatable-container flex flex-col gap-4",l),children:[(0,rt.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex items-center justify-between",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,rt.jsxs)("div",{className:"relative",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Vo,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,rt.jsx)(Qt,{placeholder:P,value:U,onChange:ce=>K(ce.target.value),className:"pl-8 w-64"})]}),n&&(0,rt.jsxs)(ne,{variant:"outline",size:"sm",onClick:()=>Se(!0),children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(bi,{className:"mr-2 h-4 w-4"})}),"Filters",_.length>0&&(0,rt.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:_.length})]}),a&&h.length>0&&(0,rt.jsx)(A9e,{selectedRows:pe.getFilteredSelectedRowModel().rows.map(ce=>ce.original),actions:h,onClearSelection:Ne})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[o&&ye.length>0&&(0,rt.jsxs)(Cr,{children:[(0,rt.jsx)(Sr,{asChild:!0,children:(0,rt.jsxs)(ne,{variant:"outline",size:"sm",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(sn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,rt.jsxs)(vr,{align:"end",children:[ye.includes("csv")&&(0,rt.jsxs)(_e,{onClick:()=>te("csv"),children:[(0,rt.jsx)(tv,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ye.includes("json")&&(0,rt.jsxs)(_e,{onClick:()=>te("json"),children:[(0,rt.jsx)(pw,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ye.includes("xlsx")&&(0,rt.jsxs)(_e,{onClick:()=>te("xlsx"),children:[(0,rt.jsx)(WT,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,rt.jsx)(C8e,{table:pe})]})]}),(0,rt.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,rt.jsx)("div",{style:{overflowX:"auto"},children:(0,rt.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,rt.jsx)("thead",{className:"moonui-data-table-header",children:pe.getHeaderGroups().map(ce=>(0,rt.jsx)("tr",{className:"moonui-data-table-row border-b",children:ce.headers.filter(Fe=>Fe.column.getIsVisible()).map(Fe=>(0,rt.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:Fe.isPlaceholder?null:(0,rt.jsxs)("div",{className:V("flex items-center space-x-2",Fe.column.getCanSort()&&"cursor-pointer select-none"),onClick:Fe.column.getToggleSortingHandler(),children:[yse(Fe.column.columnDef.header,Fe.getContext()),Fe.column.getCanSort()&&(0,rt.jsx)("div",{className:"ml-2",children:Fe.column.getIsSorted()==="asc"?(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(ev,{className:"h-4 w-4"})}):Fe.column.getIsSorted()==="desc"?(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Qg,{className:"h-4 w-4"})}):(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Jg,{className:"h-4 w-4"})})})]})},Fe.id))},ce.id))}),(0,rt.jsx)("tbody",{className:"moonui-data-table-body",children:Y?(0,rt.jsx)(ie.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,rt.jsx)("td",{colSpan:pe.getAllLeafColumns().filter(ce=>ce.getIsVisible()).length,className:"h-24 text-center",children:(0,rt.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(wr,{className:"h-4 w-4 animate-spin"})}),(0,rt.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ie?.length?(0,rt.jsx)(rt.Fragment,{children:Ie.map((ce,Fe)=>{let xt=ce.original.id||ce.id,An=d&&Ue.has(xt);return(0,rt.jsx)(_9e,{row:ce,columns:I,isExpanded:An,enableExpandable:d,renderSubComponent:f,visibilityState:pe.getState().columnVisibility},xt)})}):(0,rt.jsx)(ie.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,rt.jsx)("td",{colSpan:pe.getAllLeafColumns().filter(ce=>ce.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,rt.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,rt.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&pe.getFilteredSelectedRowModel().rows.length>0&&(0,rt.jsxs)("span",{children:[pe.getFilteredSelectedRowModel().rows.length," of"," ",pe.getFilteredRowModel().rows.length," row(s) selected."]})}),(0,rt.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,rt.jsx)("select",{value:pe.getState().pagination.pageSize,onChange:async ce=>{Z(!0),await new Promise(Fe=>setTimeout(Fe,300)),pe.setPageSize(Number(ce.target.value)),Z(!1)},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:Y,children:[10,20,30,40,50].map(ce=>(0,rt.jsx)("option",{value:ce,children:ce},ce))})]}),(0,rt.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",pe.getState().pagination.pageIndex+1," of"," ",pe.getPageCount()]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ne,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{A?A({pageIndex:0,pageSize:pe.getState().pagination.pageSize}):(Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.setPageIndex(0),Z(!1))},disabled:!pe.getCanPreviousPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(UT,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(A){let ce=pe.getState().pagination.pageIndex;A({pageIndex:ce-1,pageSize:pe.getState().pagination.pageSize})}else Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.previousPage(),Z(!1)},disabled:!pe.getCanPreviousPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(ea,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.nextPage(),Z(!1)},disabled:!pe.getCanNextPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Dn,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.setPageIndex(pe.getPageCount()-1),Z(!1)},disabled:!pe.getCanNextPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(HT,{className:"h-4 w-4"})})})]})]})]}),n&&(0,rt.jsx)(D9e,{table:pe,open:Ae,onOpenChange:Se})]})}function uZt(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,rt.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,rt.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,rt.jsx)(Bo,{className:"h-4 w-4 text-muted-foreground"}):(0,rt.jsx)(Dn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function dZt(e=new Set){let[t,r]=Cs.default.useState(e),n=Cs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=Cs.default.useCallback(i=>{r(new Set(i))},[]),a=Cs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var _9e=Cs.default.memo(({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)("tr",{className:V("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,rt.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:yse(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,rt.jsx)("tr",{className:"border-b",children:(0,rt.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,rt.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,rt.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})},(e,t)=>{let r=e.row.original.id||e.row.id,n=t.row.original.id||t.row.id,o=Object.keys(e.visibilityState).sort().join(","),a=Object.keys(t.visibilityState).sort().join(","),i=Object.values(e.visibilityState).join(","),s=Object.values(t.visibilityState).join(",");return r===n&&e.isExpanded===t.isExpanded&&e.row.getIsSelected()===t.row.getIsSelected()&&o===a&&i===s});_9e.displayName="TableRow";var fZt=O9e;var vn=L(ue(),1);var $e=L(fe(),1),rle=vn.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,vn.useState)(r||""),s=(0,vn.useRef)(void 0);(0,vn.useEffect)(()=>{i(r)},[r]);let l=(0,vn.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,vn.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,$e.jsx)("div",{className:"p-4 border-b",children:(0,$e.jsxs)("div",{className:"relative",children:[(0,$e.jsx)(Vo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,$e.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,$e.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,$e.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});rle.displayName="SearchInput";function pZt({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:m,glassmorphism:h=!1,animatedBackground:g=!1,keyboardShortcuts:v=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:C,customStyles:b,fullWidthItems:w=!0,className:S,activePath:P,onNavigate:N}){let[D,E]=(0,vn.useState)(!1),[A,z]=(0,vn.useState)(!1),[B,R]=(0,vn.useState)(d),[I,k]=(0,vn.useState)([]),[T,O]=(0,vn.useState)(o),[F,_]=(0,vn.useState)([]),M=(0,vn.useRef)(null),j=xa(0),H=xa(0),q=xh(j,{stiffness:300,damping:30}),G=xh(H,{stiffness:300,damping:30});(0,vn.useEffect)(()=>{if(y&&typeof window<"u"){let $=localStorage.getItem(x);if($){let J=JSON.parse($);R(J.collapsed),k(J.expandedSections),_(J.pinnedItems||[])}}},[y,x]),(0,vn.useEffect)(()=>{if(y&&typeof window<"u"){let $={collapsed:B,expandedSections:I,searchQuery:T,pinnedItems:F,recentItems:[]};localStorage.setItem(x,JSON.stringify($)),C?.($)}},[B,I,T,F,y,x,C]),(0,vn.useEffect)(()=>{let $=()=>{E(window.innerWidth<768)};return $(),window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),(0,vn.useEffect)(()=>{let $=e.filter(J=>J.defaultExpanded!==!1).map(J=>J.id);k($)},[e]),(0,vn.useEffect)(()=>{if(!v)return;let $=J=>{(J.metaKey||J.ctrlKey)&&J.key==="k"&&(J.preventDefault(),M.current?.focus()),(J.metaKey||J.ctrlKey)&&J.key==="b"&&(J.preventDefault(),D?z(!A):R(!B))};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[v,D,A,B]),(0,vn.useEffect)(()=>{if(!g)return;let $=J=>{let re=document.querySelector(".sidebar-container")?.getBoundingClientRect();re&&(j.set(J.clientX-re.left),H.set(J.clientY-re.top))};return document.addEventListener("mousemove",$),()=>document.removeEventListener("mousemove",$)},[g,j,H]);let U=(0,vn.useCallback)($=>{k(J=>J.includes($)?J.filter(re=>re!==$):[...J,$])},[]),K=(0,vn.useCallback)($=>{_(J=>J.includes($)?J.filter(re=>re!==$):[...J,$])},[]),Y=(0,vn.useCallback)($=>{$.action?$.action():$.href&&N&&(N($.href),D&&z(!1))},[N,D]);(0,vn.useEffect)(()=>{O(o)},[o]);let Z=(0,vn.useCallback)($=>{O($),a?.($)},[a]),ae=(0,vn.useCallback)(($,J)=>J?$.filter(re=>{let Le=re.title.toLowerCase().includes(J.toLowerCase()),Ie=re.items?.some(we=>we.title.toLowerCase().includes(J.toLowerCase()));return Le||Ie}):$,[]),oe=(0,vn.useMemo)(()=>T?e.map($=>({...$,filteredItems:ae($.items,T).map(J=>({...J,filteredChildren:J.items?ae(J.items,T):void 0}))})).filter($=>$.filteredItems.length>0):e.map($=>({...$,filteredItems:$.items.map(J=>({...J,filteredChildren:J.items}))})),[e,T,ae]),Ae=(0,vn.useCallback)($=>{let J=$.items&&$.items.length>0;return!J&&!$.title?null:(0,$e.jsxs)("div",{className:V("min-w-[200px] p-2",h&&"bg-background/95 backdrop-blur-sm"),children:[(0,$e.jsx)("div",{className:"font-medium px-2 py-1 text-sm",children:$.title}),J&&(0,$e.jsx)("div",{className:"mt-1 space-y-0.5",children:$.items?.map(re=>{let Le=re.href===P,Ie=re.items&&re.items.length>0;return(0,$e.jsx)("div",{className:"relative",children:Ie?(0,$e.jsxs)(iE,{openDelay:200,closeDelay:100,children:[(0,$e.jsx)(sE,{asChild:!0,children:(0,$e.jsxs)("button",{onClick:()=>Y(re),disabled:re.disabled,className:V("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",Le&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[re.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,$e.jsx)("span",{className:"truncate",children:re.title})]}),(0,$e.jsx)(Dn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,$e.jsx)(UI,{side:"right",align:"start",sideOffset:10,className:V("p-2",h&&"bg-background/95 backdrop-blur-sm"),children:(0,$e.jsx)("div",{className:"space-y-0.5",children:re.items?.map(we=>{let te=we.href===P;return(0,$e.jsxs)("button",{onClick:()=>Y(we),disabled:we.disabled,className:V("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",te&&"bg-primary/10 text-primary font-medium",we.disabled&&"opacity-50 cursor-not-allowed"),children:[we.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:we.icon}),(0,$e.jsx)("span",{className:"truncate",children:we.title}),we.badge&&(0,$e.jsx)(Ot,{variant:we.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:we.badge})]},we.id)})})})]}):(0,$e.jsxs)("button",{onClick:()=>Y(re),disabled:re.disabled,className:V("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",Le&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,$e.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,$e.jsx)(Ot,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]})},re.id)})})]})},[P,h,Y]),Se=(0,vn.useCallback)(($,J=0,re)=>{let Le=$.href===P,Ie=F.includes($.id),we=$.items&&$.items.length>0,te=I.includes($.id),ye=B&&!D&&J===0&&(we||$.title),Ne=$.tooltip&&!B&&!ye,ce=(0,$e.jsxs)("button",{onClick:()=>{we?U($.id):Y($)},className:V("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all",w?"w-[calc(100%-1.5rem)] mx-3":"w-full","hover:bg-accent hover:text-accent-foreground",Le&&"bg-primary/10 text-primary font-medium",$.disabled&&"opacity-50 cursor-not-allowed",J>0&&"ml-6 text-xs",B&&J===0&&"justify-center px-2",b?.hover),disabled:$.disabled,children:[$.icon&&(0,$e.jsx)("span",{className:V("flex-shrink-0",B&&J===0&&"mx-auto"),children:$.icon}),(!B||J>0)&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)("span",{className:"flex-1 text-left truncate",children:$.title}),$.badge&&(0,$e.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:$.badge}),we&&J===0&&(0,$e.jsx)(Bo,{className:V("h-4 w-4 flex-shrink-0 transition-transform",te&&"rotate-180")}),Ie&&(0,$e.jsx)(bA,{className:"h-3 w-3 flex-shrink-0"})]})]});return ye?(0,$e.jsx)("div",{children:(0,$e.jsxs)(iE,{openDelay:200,closeDelay:100,children:[(0,$e.jsx)(sE,{asChild:!0,children:ce}),(0,$e.jsx)(UI,{side:"right",align:"start",sideOffset:10,className:V("p-0 w-auto",h&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"),children:(0,$e.jsx)(ie.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.15},children:Ae($)})})]})},$.id):(0,$e.jsxs)("div",{children:[Ne?(0,$e.jsx)($f,{children:(0,$e.jsxs)(_d,{children:[(0,$e.jsx)(Fd,{asChild:!0,children:ce}),(0,$e.jsx)(Ou,{side:"right",children:(0,$e.jsx)("p",{children:$.tooltip})})]})}):ce,we&&!B&&re&&(0,$e.jsx)(Et,{children:te&&(0,$e.jsx)(ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,$e.jsx)("div",{className:"pt-1 space-y-1",children:re.map(Fe=>Se(Fe,J+1))})})})]},$.id)},[P,F,I,B,b,Y,U,D,h,Ae,w]),Ue=vn.default.memo(()=>(0,$e.jsxs)("div",{className:V("flex items-center gap-3 p-4 border-b",B&&!D&&"justify-center px-2"),children:[c&&(0,$e.jsxs)($e.Fragment,{children:[c.logo,(!B||D)&&c.title&&(0,$e.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),D&&(0,$e.jsx)(ne,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>z(!1),children:(0,$e.jsx)(nr,{className:"h-4 w-4"})}),!D&&u&&(0,$e.jsx)(ne,{variant:"ghost",size:"sm",className:V("h-8 w-8 p-0",!B&&"ml-auto"),onClick:()=>R(!B),children:B?(0,$e.jsx)(Dn,{className:"h-4 w-4"}):(0,$e.jsx)(ea,{className:"h-4 w-4"})})]})),me=vn.default.memo(()=>(0,$e.jsx)(rc,{className:"flex-1 overflow-y-auto",children:(0,$e.jsxs)("div",{className:"p-4 space-y-6",children:[F.length>0&&(!B||D)&&(0,$e.jsxs)("div",{children:[(0,$e.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,$e.jsx)("div",{className:"space-y-1",children:e.flatMap($=>$.items.filter(J=>F.includes(J.id))).map($=>Se($))}),(0,$e.jsx)(nc,{className:"mt-4"})]}),oe.map(($,J)=>(0,$e.jsxs)("div",{children:[$.title&&(!B||D)&&(0,$e.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:$.title}),(0,$e.jsx)("div",{className:"space-y-1",children:$.filteredItems.map(re=>Se(re,0,re.filteredChildren))}),$.showDivider&&J<oe.length-1&&(0,$e.jsx)(nc,{className:"mt-4"})]},$.id))]})})),Pe=vn.default.memo(()=>t?(0,$e.jsxs)("div",{className:"border-t p-4",children:[(0,$e.jsx)("div",{className:"space-y-1",children:t.items.map($=>Se($))}),i&&(!B||D)&&(0,$e.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,$e.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,$e.jsxs)(Cr,{children:[(0,$e.jsx)(Sr,{asChild:!0,children:(0,$e.jsxs)(ne,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,$e.jsx)(sv,{className:"h-3 w-3"}),s==="dark"&&(0,$e.jsx)(ov,{className:"h-3 w-3"}),s==="system"&&(0,$e.jsx)(Lf,{className:"h-3 w-3"})]})}),(0,$e.jsxs)(vr,{align:"end",children:[(0,$e.jsxs)(_e,{onClick:()=>l?.("light"),children:[(0,$e.jsx)(sv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,$e.jsxs)(_e,{onClick:()=>l?.("dark"),children:[(0,$e.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,$e.jsxs)(_e,{onClick:()=>l?.("system"),children:[(0,$e.jsx)(Lf,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null),ve=vn.default.memo(()=>(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(me,{}),(0,$e.jsx)(Pe,{})]})),pe=V("moonui-pro flex h-full flex-col bg-background border-r",h&&"bg-background/80 backdrop-blur-xl border-white/10",B&&!D&&"w-16",!B&&!D&&"w-64",b?.background,b?.border,S);return D?(0,$e.jsxs)($e.Fragment,{children:[f&&(0,$e.jsx)(ne,{onClick:()=>z(!0),className:V("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",m),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,$e.jsx)(Af,{className:"h-5 w-5"})}),(0,$e.jsx)(gb,{open:A,onOpenChange:z,children:(0,$e.jsx)(Ov,{side:"left",className:"w-80 p-0",children:(0,$e.jsxs)("div",{className:V(pe,"sidebar-container flex flex-col"),children:[g&&(0,$e.jsx)(ie.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${G}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,$e.jsx)(Ue,{}),r&&(!B||D)&&(0,$e.jsx)(rle,{searchInputRef:M,searchPlaceholder:n,initialValue:T,onSearchChange:Z,keyboardShortcuts:v},"sidebar-search-mobile"),(0,$e.jsx)(ve,{})]})})})]}):(0,$e.jsxs)("aside",{className:V(pe,"sidebar-container hidden md:flex flex-col"),children:[g&&(0,$e.jsx)(ie.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${G}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,$e.jsx)(Ue,{}),r&&(!B||D)&&(0,$e.jsx)(rle,{searchInputRef:M,searchPlaceholder:n,initialValue:T,onSearchChange:Z,keyboardShortcuts:v},"sidebar-search-desktop"),(0,$e.jsx)(ve,{})]})}function F9e(e){let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,$e.jsx)(Be,{className:V("w-full max-w-xs",e.className),children:(0,$e.jsx)(Ve,{className:"py-12 text-center",children:(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,$e.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,$e.jsxs)("div",{children:[(0,$e.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,$e.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Advanced Sidebar is available exclusively to MoonUI Pro subscribers."}),(0,$e.jsx)("a",{href:"/pricing",children:(0,$e.jsxs)(ne,{size:"sm",children:[(0,$e.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,$e.jsx)(pZt,{...e})}var mZt=F9e;var qi=L(ue(),1);var De=L(fe(),1);function hZt({sections:e,branding:t,showSearch:r=!0,searchPlaceholder:n="Search...",onSearch:o,showThemeToggle:a=!1,theme:i="system",onThemeChange:s,userMenu:l,notifications:c,cta:u,sticky:d=!0,glassmorphism:f=!1,animatedBackground:p=!1,keyboardShortcuts:m=!0,mobileBreakpoint:h=768,customStyles:g,variant:v="default",size:y="md",blur:x=!0,shadow:C=!1,rounded:b=!1,logoPosition:w="left",mobileMenuPosition:S="left",hideOnScroll:P=!1,showScrollProgress:N=!1,maxWidth:D="2xl",className:E,activePath:A,onNavigate:z}){let[B,R]=(0,qi.useState)(!1),[I,k]=(0,qi.useState)(!1),[T,O]=(0,qi.useState)(!1),[F,_]=(0,qi.useState)(!1),[M,j]=(0,qi.useState)(""),[H,q]=(0,qi.useState)(!1),[G,U]=(0,qi.useState)(!1),[K,Y]=(0,qi.useState)(0),Z=(0,qi.useRef)(0),ae=(0,qi.useRef)(null);(0,qi.useEffect)(()=>{let pe=()=>{R(window.innerWidth<h)};return pe(),window.addEventListener("resize",pe),()=>window.removeEventListener("resize",pe)},[h]),(0,qi.useEffect)(()=>{if(!d&&!P&&!N)return;let pe=()=>{let $=window.scrollY;if(q($>10),P&&($>Z.current&&$>100?U(!0):U(!1),Z.current=$),N){let J=window.scrollY,re=document.documentElement.scrollHeight-document.documentElement.clientHeight,Le=J/re*100;Y(Le)}};return window.addEventListener("scroll",pe,{passive:!0}),()=>window.removeEventListener("scroll",pe)},[d,P,N]),(0,qi.useEffect)(()=>{if(!m)return;let pe=$=>{($.metaKey||$.ctrlKey)&&$.key==="k"&&($.preventDefault(),_(!0))};return document.addEventListener("keydown",pe),()=>document.removeEventListener("keydown",pe)},[m]);let oe=(0,qi.useCallback)(pe=>{pe.action?pe.action():pe.href&&z&&(z(pe.href),B&&k(!1))},[z,B]),Ae=(0,qi.useCallback)(pe=>{j(pe),o?.(pe)},[o]),Se=pe=>(0,De.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:pe.map($=>(0,De.jsxs)(hE,{className:V("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",$.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!$.disabled&&oe($),children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{className:"flex-shrink-0",children:$.icon}),(0,De.jsx)("div",{className:"text-sm font-medium leading-none",children:$.title}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]}),$.description&&(0,De.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:$.description})]},$.id))}),Ue=pe=>(0,De.jsx)(De.Fragment,{children:pe.map($=>$.items&&$.items.length>0?(0,De.jsxs)(_u,{children:[(0,De.jsx)(Uc,{disabled:$.disabled,children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})}),(0,De.jsx)(Hc,{children:Ue($.items)})]},$.id):(0,De.jsxs)(_e,{disabled:$.disabled,onClick:()=>oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]},$.id))}),me=()=>(0,De.jsxs)(gb,{open:I,onOpenChange:k,children:[(0,De.jsx)(Bz,{asChild:!0,children:(0,De.jsx)(ne,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,De.jsx)(Af,{className:"h-5 w-5"})})}),(0,De.jsx)(Ov,{side:S,className:"w-80 p-0",children:(0,De.jsxs)("div",{className:"flex h-full flex-col",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,De.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,De.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>k(!1),className:"h-8 w-8",children:(0,De.jsx)(nr,{className:"h-4 w-4"})})]}),(0,De.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:e.map(pe=>(0,De.jsxs)("div",{className:"space-y-1",children:[pe.items.map($=>(0,De.jsx)("div",{children:$.items&&$.items.length>0?(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",className:"w-full justify-between",disabled:$.disabled,children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),(0,De.jsx)(Bo,{className:"h-4 w-4"})]})}),(0,De.jsx)(vr,{align:"start",className:"w-56",children:$.items&&Ue($.items)})]}):(0,De.jsxs)(ne,{variant:"ghost",className:"w-full justify-start",disabled:$.disabled,onClick:()=>oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]})},$.id)),(0,De.jsx)(nc,{className:"my-2"})]},pe.id))})]})})]}),Pe=()=>{switch(y){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ve=V("moonui-pro w-full transition-all duration-300",v==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",v==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",v==="minimal"&&"bg-background",v==="transparent"&&"bg-transparent",d&&"sticky top-0 z-50",H&&d&&v!=="transparent"&&"shadow-sm",H&&v==="transparent"&&"bg-background/95 backdrop-blur border-b",G&&"-translate-y-full",f&&"bg-background/80 backdrop-blur-xl border-white/10",x&&"backdrop-blur-md",C&&"shadow-lg",b&&"rounded-lg",g?.background,g?.border,E);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("nav",{ref:ae,className:ve,children:[(0,De.jsxs)("div",{className:V("flex items-center",Pe(),D==="sm"&&"container max-w-screen-sm",D==="md"&&"container max-w-screen-md",D==="lg"&&"container max-w-screen-lg",D==="xl"&&"container max-w-screen-xl",D==="2xl"&&"container max-w-screen-2xl",D==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,De.jsxs)("div",{className:V("flex items-center gap-2",w==="center"&&!B?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[w==="left"&&S==="left"&&(0,De.jsx)(me,{}),(0,De.jsxs)("a",{href:t.href||"/",onClick:pe=>{t.href&&z&&(pe.preventDefault(),z(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!B&&(0,De.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!B&&(0,De.jsx)(cE,{className:"hidden md:flex",children:(0,De.jsx)(uE,{children:e.map(pe=>(0,De.jsx)(qi.default.Fragment,{children:pe.items.map($=>{let J=$.items&&$.items.length>0,re=$.href===A;return J?(0,De.jsxs)(dE,{children:[(0,De.jsx)(pE,{className:V(re&&"bg-accent text-accent-foreground",$.disabled&&"opacity-50 cursor-not-allowed"),disabled:$.disabled,children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})}),(0,De.jsx)(mE,{children:$.items&&Se($.items)})]},$.id):(0,De.jsx)(dE,{children:(0,De.jsxs)(hE,{className:V(fE(),re&&"bg-accent text-accent-foreground",$.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!$.disabled&&oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-2",children:$.badge})]})},$.id)})},pe.id))})}),(0,De.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,De.jsx)(De.Fragment,{children:B?(0,De.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>_(!0),children:(0,De.jsx)(Vo,{className:"h-5 w-5"})}):(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(Vo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,De.jsx)(Qt,{type:"search",placeholder:n,className:"w-64 pl-9 pr-4 h-9",value:M,onChange:pe=>Ae(pe.target.value)}),m&&(0,De.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,De.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})}),a&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",size:"icon",children:[i==="light"&&(0,De.jsx)(sv,{className:"h-5 w-5"}),i==="dark"&&(0,De.jsx)(ov,{className:"h-5 w-5"}),i==="system"&&(0,De.jsx)(Lf,{className:"h-5 w-5"})]})}),(0,De.jsxs)(vr,{align:"end",children:[(0,De.jsxs)(_e,{onClick:()=>s?.("light"),children:[(0,De.jsx)(sv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,De.jsxs)(_e,{onClick:()=>s?.("dark"),children:[(0,De.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,De.jsxs)(_e,{onClick:()=>s?.("system"),children:[(0,De.jsx)(Lf,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),c&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",size:"icon",className:"relative",children:[(0,De.jsx)(ih,{className:"h-5 w-5"}),c.count&&c.count>0&&(0,De.jsx)("span",{className:"absolute -top-1 -right-1 h-4 w-4 rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground flex items-center justify-center",children:c.count})]})}),(0,De.jsxs)(vr,{align:"end",className:"w-80",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,De.jsx)("h4",{className:"text-sm font-semibold",children:"Notifications"}),c.count&&c.count>0&&(0,De.jsxs)(Ot,{variant:"secondary",children:[c.count," new"]})]}),(0,De.jsx)(Vr,{}),(0,De.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:c.items&&c.items.length>0?c.items.map(pe=>(0,De.jsxs)(_e,{className:"flex flex-col items-start p-4 cursor-pointer",onClick:()=>c.onNotificationClick?.(pe.id),children:[(0,De.jsxs)("div",{className:"flex w-full items-start justify-between",children:[(0,De.jsx)("p",{className:V("text-sm font-medium",!pe.read&&"text-primary"),children:pe.title}),!pe.read&&(0,De.jsx)("span",{className:"h-2 w-2 rounded-full bg-primary"})]}),pe.description&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:pe.description}),pe.time&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:pe.time})]},pe.id)):(0,De.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No notifications"})})]})]}),u&&(0,De.jsx)(ne,{variant:u.variant||"primary",size:"sm",onClick:()=>{u.action?u.action():u.href&&z&&z(u.href)},className:B?"":"ml-2",children:u.text}),l&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsx)(ne,{variant:"ghost",size:"icon",className:"relative",children:(0,De.jsxs)(va,{className:"h-8 w-8",children:[(0,De.jsx)(Ci,{src:l.user?.avatar,alt:l.user?.name}),(0,De.jsx)(Va,{children:l.user?.name?.charAt(0)||(0,De.jsx)(Df,{className:"h-4 w-4"})})]})})}),(0,De.jsxs)(vr,{align:"end",className:"w-56",children:[l.user&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("div",{className:"p-2",children:[(0,De.jsx)("p",{className:"text-sm font-medium",children:l.user.name}),(0,De.jsx)("p",{className:"text-xs text-muted-foreground",children:l.user.email})]}),(0,De.jsx)(Vr,{})]}),l.items&&Ue(l.items)]})]})]})]}),p&&(0,De.jsx)(ie.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"}}),N&&(0,De.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,De.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${K}%`}})})]}),(0,De.jsxs)(FL,{open:F,onOpenChange:_,children:[(0,De.jsx)(Nh,{placeholder:n,value:M,onValueChange:Ae}),(0,De.jsxs)(RI,{children:[(0,De.jsx)(Mh,{children:"No results found."}),e.map(pe=>(0,De.jsx)(Th,{children:pe.items.map($=>(0,De.jsx)(Ah,{disabled:$.disabled,onSelect:()=>{oe($),_(!1)},children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})},$.id))},pe.id))]})]})]})}function B9e(e){let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,De.jsx)(Be,{className:V("w-full",e.className),children:(0,De.jsx)(Ve,{className:"py-8 text-center",children:(0,De.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,De.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,De.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,De.jsxs)("div",{children:[(0,De.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Advanced Navbar is available exclusively to MoonUI Pro subscribers."}),(0,De.jsx)("a",{href:"/pricing",children:(0,De.jsxs)(ne,{size:"sm",children:[(0,De.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,De.jsx)(hZt,{...e})}var gZt=B9e;var nle=L(ue(),1);var Ka=L(ue(),1),U9e=L(fe(),1),V9e=(0,Ka.createContext)(null),g0=()=>{let e=(0,Ka.useContext)(V9e);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},z9e=({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,m]=(0,Ka.useState)(r),[h,g]=(0,Ka.useState)({}),[v,y]=(0,Ka.useState)(new Set),[x,C]=(0,Ka.useState)(!1),[b,w]=(0,Ka.useState)(null);(0,Ka.useEffect)(()=>{if(d&&typeof window<"u"){let k=localStorage.getItem(f);if(k)try{let T=JSON.parse(k);g(T.stepData||{}),m(T.currentStep||0),y(new Set(T.completedSteps||[]))}catch(T){console.error("Failed to load persisted wizard data:",T)}}},[d,f]),(0,Ka.useEffect)(()=>{if(!l||!u)return;let k=setTimeout(()=>{let T=h[t[p].id];T&&u(t[p].id,T)},c);return()=>clearTimeout(k)},[h,p,l,c,u,t]),(0,Ka.useEffect)(()=>{if(d&&typeof window<"u"){let k={stepData:h,currentStep:p,completedSteps:Array.from(v)};localStorage.setItem(f,JSON.stringify(k))}},[h,p,v,d,f]);let S=(0,Ka.useCallback)(async()=>{let k=t[p];if(k.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(k.requiredFields)){let F=[];if(k.requiredFields.forEach(_=>{let M=O.querySelector(`[name="${_}"], [id="${_}"]`);if(M){let j=M;M.tagName==="INPUT"&&M.type==="checkbox"?M.checked||F.push(_):(!j.value||j.value.trim()==="")&&F.push(_)}}),F.length>0)return w(`Please fill in the following required fields: ${F.join(", ")}`),!1}else{let F=O.querySelectorAll("input[required], select[required], textarea[required]"),_=[];if(F.forEach(j=>{let H=j;if(!H.value||H.value.trim()===""){let q=document.querySelector(`label[for="${H.id}"]`),G=q?q.textContent?.replace(" *","")||"Field":H.name||H.id||"Field";_.push(G)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let H=j;if(!H.checked){let q=document.querySelector(`label[for="${H.id}"]`),G=q?q.textContent?.replace(" *","")||"Checkbox":H.name||H.id||"Checkbox";_.push(G)}}),_.length>0)return w(`Please fill in the following required fields: ${_.join(", ")}`),!1}}if(!k.validation)return!0;C(!0),w(null);try{let O=await k.validation();if(typeof O=="boolean")return O||w("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let F=O;return F.isValid||(F.error?w(F.error):F.errors&&Array.isArray(F.errors)?w(F.errors.join(", ")):w("Please complete all required fields before proceeding")),F.isValid}return w("Invalid validation response"),!1}catch(O){return w(O instanceof Error?O.message:"Validation failed"),!1}finally{C(!1)}},[p,t]),P=(0,Ka.useCallback)((k,T)=>{g(O=>({...O,[k]:{...O[k],...T}})),w(null)},[]),N=(0,Ka.useCallback)(async k=>{if(k<0||k>=t.length||k===p)return;let T=t[k];if((typeof T.isDisabled=="function"?T.isDisabled(p,t):T.isDisabled)||a&&k>p&&!await S())return;let F=t[p];F.onExit&&await F.onExit(),k>p&&y(M=>new Set([...M,p])),T.onEnter&&await T.onEnter();let _=p;m(k),n?.(k,_)},[p,t,a,S,n]),D=(0,Ka.useCallback)(()=>{N(p+1)},[p,N]),E=(0,Ka.useCallback)(()=>{i&&N(p-1)},[p,N,i]),A=(0,Ka.useCallback)(async()=>{if(await S()&&(y(T=>new Set([...T,p])),o)){C(!0);try{await o(h),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(T){w(T instanceof Error?T.message:"Failed to complete wizard")}finally{C(!1)}}},[p,h,S,o,d,f]),z=(0,Ka.useCallback)(()=>{m(0),g({}),y(new Set),w(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),B=(0,Ka.useCallback)(k=>v.has(k),[v]),R=(0,Ka.useCallback)(k=>{if(k===0||s)return!0;for(let T=0;T<k;T++)if(!v.has(T)&&!t[T].isOptional)return!1;return!0},[v,s,t]),I={steps:t,currentStep:p,stepData:h,isLoading:x,error:b,goToNext:D,goToPrevious:E,goToStep:N,updateStepData:k=>P(t[p].id,k),validateCurrentStep:S,completeWizard:A,resetWizard:z,isStepCompleted:B,isStepAccessible:R,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,U9e.jsx)(V9e.Provider,{value:I,children:e})};var mr=L(fe(),1),U6=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,mr.jsx)(xi,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,mr.jsx)(ta,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=g0();if(t==="linear")return(0,mr.jsx)("div",{className:V("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,mr.jsx)("div",{className:"relative w-full",children:(0,mr.jsx)("div",{className:V("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((m,h)=>{let g=h===u,v=d(h),y=f(h),x=g&&p,C=typeof m.icon=="function"?m.icon({isActive:g,isCompleted:v}):m.icon;return(0,mr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&C&&(0,mr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,mr.jsx)("span",{className:V("w-8 h-8 flex items-center justify-center transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:C})}),a==="top"&&C&&(0,mr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,mr.jsx)("span",{className:V("w-8 h-8 flex items-center justify-center transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:C})}),o&&(0,mr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,mr.jsx)("p",{className:V("text-sm font-semibold transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:m.title}),m.description&&(0,mr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:m.description})]}),(0,mr.jsxs)("div",{className:"relative flex items-center w-full",children:[h<c.length-1&&(0,mr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,mr.jsx)("div",{className:"h-full bg-border"}),h<u&&(0,mr.jsx)(ie.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:h*.1},style:{transformOrigin:"left"}})]}),(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.05:1},transition:{duration:.2},className:V("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",g&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",v&&!g&&"border-primary bg-primary text-primary-foreground",!g&&!v&&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:v&&!g?i:g&&s?s:C&&a==="inside"?(0,mr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:C}):n?(0,mr.jsx)("span",{className:"text-sm font-semibold",children:h+1}):(0,mr.jsx)(Nf,{className:"w-4 h-4"})})]}),(0,mr.jsx)("div",{className:"mt-3",children:(0,mr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",h+1," of ",c.length]})})]},m.id)})})}):(0,mr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,mr.jsx)(ie.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((m,h)=>{let g=h===u,v=d(h),y=f(h),x=g&&p,C=typeof m.icon=="function"?m.icon({isActive:g,isCompleted:v}):m.icon;return(0,mr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.05:1},className:V("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",g&&"border-primary bg-primary text-primary-foreground shadow-lg",v&&!g&&"border-primary bg-primary text-primary-foreground",!g&&!v&&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:v&&!g?i:g&&s?s:C?(0,mr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:C}):n?(0,mr.jsx)("span",{className:"text-sm font-semibold",children:h+1}):(0,mr.jsx)(Nf,{className:"w-4 h-4"})}),(0,mr.jsx)("div",{className:"ml-16",children:o&&(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)("p",{className:V("text-sm font-semibold transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:m.title}),m.description&&(0,mr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:m.description})]})})]},m.id)})]})});if(t==="dots")return(0,mr.jsx)("div",{className:V("flex items-center justify-center space-x-2",e),children:c.map((m,h)=>{let g=h===u,v=d(h);return(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.2:1},className:V("rounded-full transition-all duration-300",g?"w-3 h-3 bg-primary":"w-2 h-2",v&&!g&&"bg-primary/60",!g&&!v&&"bg-muted")},h)})});if(t==="circular"){let m=(u+1)/c.length*100,h=2*Math.PI*45,g=h-m/100*h;return(0,mr.jsxs)("div",{className:V("relative w-36 h-36 mx-auto",e),children:[(0,mr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,mr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,mr.jsx)(ie.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:h,initial:{strokeDashoffset:h},animate:{strokeDashoffset:g},className:"text-primary",transition:{duration:.5}})]}),(0,mr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,mr.jsxs)("div",{className:"text-center",children:[(0,mr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,mr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var H6=L(ue(),1);var v0=L(fe(),1),vZt={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:{}}},j6=({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}=g0(),[d,f]=H6.default.useState(0),p=H6.default.useRef(o);H6.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let m=n[o],h=o===0,g=o===n.length-1,v={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:h,isLastStep:g,stepData:c[m.id]||{},updateStepData:x=>l(m.id,x)},y=typeof m.content=="function"?m.content(v):m.content;return(0,v0.jsx)(Et,{mode:"wait",custom:d,children:(0,v0.jsx)(ie.div,{custom:d,variants:vZt[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:V("w-full",e),"data-wizard-step-content":!0,children:(0,v0.jsxs)("div",{className:"space-y-4",children:[u&&(0,v0.jsxs)(Rx,{variant:"error",children:[(0,v0.jsx)(Xn,{className:"h-4 w-4"}),(0,v0.jsx)(kx,{children:u})]}),y]})},o)})};var Us=L(fe(),1),q6=({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:m,goToPrevious:h,completeWizard:g}=g0(),v=u===c.length-1,y=c[u],x=()=>{i?.(),h()},C=()=>{v?(l?.(),g()):(s?.(),m())};return(0,Us.jsxs)("div",{className:V("flex items-center justify-between",e),children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsxs)(ne,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:V("transition-all duration-200",!p&&"invisible"),children:[(0,Us.jsx)(ea,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Us.jsxs)(ie.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,Us.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Us.jsx)(ne,{type:"button",onClick:C,disabled:d||!f&&!v,className:"min-w-[120px]",children:d?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(wr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):v?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(bn,{className:"w-4 h-4 mr-2"}),o]}):(0,Us.jsxs)(Us.Fragment,{children:[n,(0,Us.jsx)(Dn,{className:"w-4 h-4 ml-1"})]})})]})};var Xa=L(fe(),1),H9e=nle.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:m="top",completedStepIcon:h,activeStepIcon:g,errorStepIcon:v,className:y,progressClassName:x,navigationClassName:C,contentClassName:b,stepClassName:w,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:N,persistData:D=!1,storageKey:E="form-wizard-data"},A)=>(0,Xa.jsx)(z9e,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:N,persistData:D,storageKey:E,children:(0,Xa.jsxs)("div",{ref:A,className:V("w-full",y),children:[p&&(0,Xa.jsx)(Xa.Fragment,{children:(0,Xa.jsx)(U6,{className:V("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:m,completedStepIcon:h,activeStepIcon:g,errorStepIcon:v})}),(0,Xa.jsx)(Be,{className:V("border-0 shadow-none",b),children:(0,Xa.jsx)(Ve,{className:"p-0",children:(0,Xa.jsx)(j6,{className:w,animationType:c,animationDuration:u})})}),(0,Xa.jsx)(q6,{className:V("mt-8",C)})]})}));H9e.displayName="FormWizardInternal";var T_=nle.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ut();return!n&&!r?(0,Xa.jsx)(Be,{className:V("w-full",e.className),children:(0,Xa.jsx)(Ve,{className:"py-12 text-center",children:(0,Xa.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Xa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Xa.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Xa.jsxs)("div",{children:[(0,Xa.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Xa.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Xa.jsx)("a",{href:"/pricing",children:(0,Xa.jsxs)(ne,{size:"sm",children:[(0,Xa.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Xa.jsx)(H9e,{...e,ref:t})});T_.displayName="MoonUIFormWizardPro";var yZt=T_;var rd=L(ue(),1);var yt=L(fe(),1);function j9e(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 xZt=({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:m=!1,className:h})=>{let[g]=(0,rd.useState)(()=>u?j9e(r):r),[v,y]=(0,rd.useState)({}),[x,C]=(0,rd.useState)([]),[b,w]=(0,rd.useState)(a||0),[S,P]=(0,rd.useState)({}),[N,D]=(0,rd.useState)(!1),[E,A]=(0,rd.useState)(0);(0,rd.useEffect)(()=>{if(!o||!a||N)return;let k=setInterval(()=>{w(T=>T<=1?(B(),0):T-1)},1e3);return()=>clearInterval(k)},[o,a,N]),(0,rd.useEffect)(()=>{if(!o||N)return;let k=setInterval(()=>{A(T=>T+1)},1e3);return()=>clearInterval(k)},[o,N]);let z=(0,rd.useCallback)(()=>{let k=0,T=0;return{results:g.map(F=>{let _=v[F.id],M=F.points||1;T+=M;let j=!1;if(_!=null&&_!==""){if(F.type==="single-choice"||F.type==="true-false")j=_===F.correctAnswer;else if(F.type==="multiple-choice"){let q=Array.isArray(_)?_:[],G=Array.isArray(F.correctAnswer)?F.correctAnswer:[];j=q.length===G.length&&q.every(U=>G.includes(U))}}let H=j?M:0;return k+=H,{questionId:F.id,answer:_,isCorrect:j,points:H,timeSpent:S[F.id]||0}}),score:k,totalScore:T}},[g,v,S]),B=async()=>{let{results:k,score:T,totalScore:O}=z();C(k),D(!0),n&&await n(k,T,O)},R=k=>{let T=Math.floor(k/60),O=k%60;return`${T}:${O.toString().padStart(2,"0")}`},I=g.map((k,T)=>({id:k.id,title:`Question ${T+1}`,description:k.tags?.join(", "),content:({updateStepData:O,goToNext:F})=>{let _=v[k.id],M=d&&k.options?j9e(k.options):k.options;(0,rd.useEffect)(()=>{S[k.id]||P(H=>({...H,[k.id]:E}))},[]);let j=H=>{y(q=>({...q,[k.id]:H})),p&&k.type};return(0,yt.jsxs)(Be,{className:"border-0 shadow-none",children:[(0,yt.jsxs)(gr,{children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,yt.jsxs)(Ot,{variant:"secondary",children:["Question ",T+1," of ",g.length]}),k.points&&k.points>1&&(0,yt.jsxs)(Ot,{variant:"outline",children:[k.points," points"]})]}),(0,yt.jsx)(Or,{className:"text-xl",children:k.question}),k.description&&(0,yt.jsx)(Fi,{children:k.description})]}),(0,yt.jsxs)(Ve,{className:"space-y-4",children:[k.image&&(0,yt.jsx)("img",{src:k.image,alt:"Question illustration",className:"w-full rounded-lg"}),k.type==="single-choice"&&M&&(0,yt.jsx)(sC,{value:_||"",onValueChange:j,children:M.map((H,q)=>(0,yt.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:q*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,yt.jsx)(Dv,{value:String(H.value),id:`${k.id}-${H.value}`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-${H.value}`,className:"flex-1 cursor-pointer",children:H.label||H.value})]},String(H.value)))}),k.type==="multiple-choice"&&M&&(0,yt.jsx)("div",{className:"space-y-2",children:M.map((H,q)=>(0,yt.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:q*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,yt.jsx)(Lu,{id:`${k.id}-${H.value}`,checked:(_||[]).includes(H.value),onCheckedChange:G=>{let U=_||[];j(G?[...U,H.value]:U.filter(K=>K!==H.value))}}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-${H.value}`,className:"flex-1 cursor-pointer",children:H.label||H.value})]},String(H.value)))}),k.type==="true-false"&&(0,yt.jsxs)(sC,{value:_?.toString()||"",onValueChange:H=>j(H==="true"),children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,yt.jsx)(Dv,{value:"true",id:`${k.id}-true`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,yt.jsx)(Dv,{value:"false",id:`${k.id}-false`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),k.type==="text"&&(0,yt.jsx)(Gc,{value:_||"",onChange:H=>j(H.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),k.type==="rating"&&(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsx)(yb,{value:[_||5],onValueChange:([H])=>j(H),max:10,min:1,step:1,className:"w-full"}),(0,yt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[_||5,"/10"]})]}),m&&k.hint&&(0,yt.jsx)(Rx,{children:(0,yt.jsxs)(kx,{children:[(0,yt.jsx)("strong",{children:"Hint:"})," ",k.hint]})})]})]})},validation:()=>!(k.required&&!v[k.id]),isOptional:!k.required}));if(N){let{score:k,totalScore:T}=z(),O=Math.round(k/T*100),F=O>=f;return(0,yt.jsx)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:V("w-full max-w-2xl mx-auto",h),children:(0,yt.jsxs)(Be,{children:[(0,yt.jsxs)(gr,{className:"text-center",children:[(0,yt.jsx)("div",{className:"mx-auto mb-4",children:(0,yt.jsx)(DA,{className:V("w-16 h-16",F?"text-yellow-500":"text-muted-foreground")})}),(0,yt.jsx)(Or,{className:"text-3xl",children:"Quiz Complete!"}),(0,yt.jsx)(Fi,{children:"Here's how you performed"})]}),(0,yt.jsxs)(Ve,{className:"space-y-6",children:[(0,yt.jsxs)("div",{className:"text-center",children:[(0,yt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,yt.jsx)(is,{value:O,className:"h-3 mb-4"}),(0,yt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,yt.jsxs)("span",{children:["Score: ",k,"/",T]}),(0,yt.jsx)("span",{children:F?(0,yt.jsx)(Ot,{variant:"success",children:"Passed"}):(0,yt.jsx)(Ot,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((_,M)=>{let j=g.find(H=>H.id===_.questionId);return(0,yt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,yt.jsxs)("span",{className:"text-sm",children:[s&&`Q${M+1}: `,j?.question.substring(0,50),"..."]}),(0,yt.jsxs)(Ot,{variant:_.isCorrect?"success":"destructive",children:[_.points,"/",j?.points||1]})]},_.questionId)})]}),(0,yt.jsxs)("div",{className:"flex gap-2",children:[(0,yt.jsxs)(ne,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,yt.jsx)(av,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,yt.jsxs)(ne,{variant:"outline",children:[(0,yt.jsx)(sn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,yt.jsxs)(ne,{variant:"outline",children:[(0,yt.jsx)(iv,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,yt.jsxs)("div",{className:V("w-full",h),children:[o&&a&&(0,yt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)(wn,{className:"w-4 h-4"}),(0,yt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",R(b)]})]}),(0,yt.jsx)(is,{value:b/a*100,className:"w-32 h-2"})]}),(0,yt.jsx)(T_,{steps:I,onComplete:B,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},bZt=e=>{let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,yt.jsx)(Be,{className:V("w-full",e.className),children:(0,yt.jsx)(Ve,{className:"py-12 text-center",children:(0,yt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,yt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,yt.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,yt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,yt.jsx)("a",{href:"/pricing",children:(0,yt.jsxs)(ne,{size:"sm",children:[(0,yt.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,yt.jsx)(xZt,{...e})},wZt=bZt;var nd=L(ue(),1);var zr=L(fe(),1),CZt={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function SZt(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 PZt(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 IZt(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(CZt))if(n.test(t))return r;return null}function RZt(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 kZt(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 q9e=nd.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:m,required:h,...g},v)=>{let[y,x]=(0,nd.useState)(null),[C,b]=(0,nd.useState)(null),[w,S]=(0,nd.useState)({}),P=(0,nd.useRef)(null),N=(0,nd.useRef)(null),D=(0,nd.useRef)(null),E=(0,nd.useRef)(null);(0,nd.useEffect)(()=>{let B=IZt(e.number);x(B)},[e.number]),(0,nd.useEffect)(()=>{if(!i)return;let B={};e.number&&!RZt(e.number)&&(B.number="Invalid card number"),e.expiry&&!kZt(e.expiry)&&(B.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(B.cvc="Invalid CVC"),S(B)},[e,i]);let A=(B,R)=>{let I=R;if(a){if(B==="number"){I=SZt(R,y||void 0);let k=y==="amex"?18:19;if(I.length>k)return}else if(B==="expiry"){if(I=PZt(R),I.length>5)return}else if(B==="cvc"){I=R.replace(/\D/g,"");let k=y==="amex"?4:3;if(I.length>k)return}}t?.({...e,[B]:I}),a&&(B==="number"&&I.length===(y==="amex"?18:19)?N.current?.focus():B==="expiry"&&I.length===5?D.current?.focus():B==="cvc"&&I.length===(y==="amex"?4:3)&&E.current?.focus())},z={...w,...c};return(0,zr.jsxs)("div",{ref:v,className:V("space-y-4",u),...g,children:[r&&(0,zr.jsxs)(ie.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,zr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,zr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,zr.jsx)(qT,{className:"w-8 h-8 text-white/80"})]}),(0,zr.jsxs)("div",{className:"space-y-4",children:[(0,zr.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,zr.jsxs)("div",{className:"flex justify-between",children:[(0,zr.jsxs)("div",{children:[(0,zr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,zr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,zr.jsxs)("div",{children:[(0,zr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,zr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,zr.jsxs)("div",{className:"space-y-4",children:[(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsxs)("div",{className:"relative",children:[(0,zr.jsx)(Qt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:B=>A("number",B.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:V("pr-20",z.number&&"border-destructive",d),disabled:m}),n&&y&&(0,zr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),z.number&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.number})]}),(0,zr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsx)(Qt,{ref:N,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:B=>A("expiry",B.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:V(z.expiry&&"border-destructive",d),disabled:m}),z.expiry&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.expiry})]}),(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsxs)("div",{className:"relative",children:[(0,zr.jsx)(Qt,{ref:D,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:B=>A("cvc",B.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:V(z.cvc&&"border-destructive",d),disabled:m}),o&&(0,zr.jsx)(Ct,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),z.cvc&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.cvc})]})]}),(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsx)(bt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,zr.jsx)(Qt,{ref:E,id:"card-name",type:"text",value:e.name,onChange:B=>A("name",B.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:V(z.name&&"border-destructive",d),disabled:m}),z.name&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.name})]})]}),o&&(0,zr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,zr.jsx)(Ct,{className:"w-4 h-4"}),(0,zr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});q9e.displayName="MoonUICreditCardInputPro";var Vl=L(ue(),1);var Je=L(fe(),1),$9e=pt("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"}}),W9e=Vl.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,Vl.useState)([]),[p,m]=(0,Vl.useState)(0),[h,g]=(0,Vl.useState)({}),[v,y]=(0,Vl.useState)(!1),[x,C]=(0,Vl.useState)(null),[b,w]=(0,Vl.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Vl.useState)(Date.now()),[N,D]=(0,Vl.useState)(!1),[E,A]=(0,Vl.useState)(0);(0,Vl.useEffect)(()=>{let H=[...n];o.shuffleQuestions&&(H=B(H)),o.shuffleOptions&&(H=H.map(q=>q.options?{...q,options:B([...q.options])}:q)),f(H)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Vl.useEffect)(()=>{if(b===null||b<=0||v)return;let H=setInterval(()=>{w(q=>q===null||q<=1?(T(),0):q-1)},1e3);return()=>clearInterval(H)},[b,v]),(0,Vl.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let z=d[p],B=H=>{let q=[...H];for(let G=q.length-1;G>0;G--){let U=Math.floor(Math.random()*(G+1));[q[G],q[U]]=[q[U],q[G]]}return q},R=H=>{let q=Date.now()-S;g(G=>({...G,[z.id]:{questionId:z.id,answer:H,timeSpent:q}}))},I=()=>{p<d.length-1?(m(H=>H+1),P(Date.now()),D(!1)):T()},k=()=>{p>0&&(m(H=>H-1),D(!1))},T=()=>{let H=O();C(H),y(!0),A(q=>q+1),a&&a(H)},O=()=>{let H=0,q=0,G=[];d.forEach(Y=>{let Z=h[Y.id],ae=Y.points||1;H+=ae;let oe=!1;if(Z?.answer&&Y.correctAnswer!==void 0)switch(Y.type){case"single-choice":case"true-false":case"text":oe=Z.answer===Y.correctAnswer;break;case"multiple-choice":Array.isArray(Z.answer)&&Array.isArray(Y.correctAnswer)&&(oe=Z.answer.length===Y.correctAnswer.length&&Z.answer.every(Ae=>Y.correctAnswer.includes(Ae)));break;case"matching":if(typeof Z.answer=="object"&&typeof Y.correctAnswer=="object"){let Ae=Y.correctAnswer,Se=Z.answer;oe=Object.keys(Ae).every(Ue=>Ae[Ue]===Se[Ue])}break;case"rating":oe=!0;break}oe&&(q+=ae),G.push({questionId:Y.id,userAnswer:Z?.answer||null,correctAnswer:Y.correctAnswer,isCorrect:oe,points:oe?ae:0})});let U=H>0?q/H*100:0,K=Object.values(h).reduce((Y,Z)=>Y+(Z.timeSpent||0),0);return{score:q,totalScore:H,percentage:U,passed:o.passingScore?U>=o.passingScore:void 0,answers:G,timeSpent:K,completedAt:new Date}},F=()=>{m(0),g({}),y(!1),C(null),w(o.timeLimit?o.timeLimit*60:null),P(Date.now()),D(!1),o.shuffleQuestions&&f(B([...n]))},_=()=>{if(!x)return;let H={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(Z=>Z.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},q=new Blob([JSON.stringify(H,null,2)],{type:"application/json"}),G=URL.createObjectURL(q),U=document.createElement("a");U.href=G,U.download=`quiz-results-${Date.now()}.json`,U.click(),URL.revokeObjectURL(G)},M=H=>{let q=Math.floor(H/60),G=H%60;return`${q}:${G.toString().padStart(2,"0")}`},j=()=>{if(!z)return null;let H=h[z.id]?.answer;switch(z.type){case"single-choice":case"true-false":return(0,Je.jsx)("div",{className:"space-y-3",children:z.options?.map((K,Y)=>(0,Je.jsx)(ie.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},onClick:()=>R(K),className:V("w-full text-left p-4 rounded-lg border transition-colors",H===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},Y))});case"multiple-choice":return(0,Je.jsx)("div",{className:"space-y-3",children:z.options?.map((K,Y)=>{let Z=Array.isArray(H)&&H.includes(K);return(0,Je.jsx)(ie.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},onClick:()=>{let ae=H||[],oe=Z?ae.filter(Ae=>Ae!==K):[...ae,K];R(oe)},className:V("w-full text-left p-4 rounded-lg border transition-colors",Z?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,Je.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Je.jsx)("div",{className:V("w-5 h-5 rounded border-2 transition-colors",Z?"bg-primary border-primary":"border-border"),children:Z&&(0,Je.jsx)(Ms,{className:"w-full h-full text-primary-foreground"})}),K]})},Y)})});case"text":return(0,Je.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,Je.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:H||"",onChange:K=>R(K.target.value)})});case"rating":let q=z.maxRating||5,G=typeof H=="number"?H:0;return(0,Je.jsxs)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,Je.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:q},(K,Y)=>Y+1).map(K=>(0,Je.jsx)("button",{onClick:()=>R(K),className:"transition-transform hover:scale-110",children:(0,Je.jsx)(Qi,{className:V("w-10 h-10 transition-colors",K<=G?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),z.ratingLabels&&(0,Je.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Je.jsx)("span",{children:z.ratingLabels[0]}),(0,Je.jsx)("span",{children:z.ratingLabels[1]})]})]});case"matching":let U=H||{};return(0,Je.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,Je.jsxs)("div",{className:"space-y-3",children:[(0,Je.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),z.leftOptions?.map((K,Y)=>(0,Je.jsx)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,Je.jsxs)("div",{className:"space-y-3",children:[(0,Je.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),z.leftOptions?.map(K=>(0,Je.jsx)(ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,Je.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:U[K]||"",onChange:Y=>R({...U,[K]:Y.target.value}),children:[(0,Je.jsx)("option",{value:"",children:"Select..."}),z.rightOptions?.map(Y=>(0,Je.jsx)("option",{value:Y,children:Y},Y))]})},K))]})]});default:return null}};return v&&x?(0,Je.jsx)("div",{ref:u,className:V($9e({variant:t,size:r}),e),...c,children:(0,Je.jsxs)(ie.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,Je.jsxs)("div",{className:"text-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,Je.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,Je.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,Je.jsx)("div",{className:V("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,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Ms,{className:"w-5 h-5"}),"Passed"]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(ta,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map((H,q)=>{let G=d.find(U=>U.id===H.questionId);return G?(0,Je.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,Je.jsxs)("div",{className:"flex items-start gap-3",children:[H.isCorrect?(0,Je.jsx)(Ms,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,Je.jsx)(ta,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,Je.jsxs)("div",{className:"flex-1",children:[(0,Je.jsxs)("p",{className:"font-medium mb-2",children:[q+1,". ",G.question]}),(0,Je.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify(H.userAnswer)]}),!H.isCorrect&&G.correctAnswer!==void 0&&(0,Je.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(G.correctAnswer)]}),G.explanation&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:G.explanation})]})]})},H.questionId):null})]}),(0,Je.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||E<o.maxAttempts)&&(0,Je.jsxs)("button",{onClick:F,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,Je.jsx)(av,{className:"w-4 h-4"}),"Try Again"]}),(0,Je.jsxs)("button",{onClick:_,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,Je.jsx)(sn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,Je.jsxs)("div",{ref:u,className:V($9e({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,Je.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Je.jsxs)("div",{children:[s&&(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,Je.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,Je.jsxs)("div",{className:V("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,Je.jsx)(wn,{className:"w-4 h-4"}),M(b)]})]}),(0,Je.jsxs)("div",{className:"mb-6",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,Je.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,Je.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,Je.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,Je.jsx)(ie.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,Je.jsx)(Et,{mode:"wait",children:z&&(0,Je.jsxs)(ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,Je.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[z.question,z.required&&(0,Je.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&z.hint&&(0,Je.jsxs)("div",{className:"mt-4",children:[(0,Je.jsxs)("button",{onClick:()=>D(!N),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,Je.jsx)(Gp,{className:"w-4 h-4"}),N?"Hide":"Show"," Hint"]}),N&&(0,Je.jsx)(ie.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:z.hint})]}),o.showInstantFeedback&&h[z.id]&&z.correctAnswer!==void 0&&(0,Je.jsx)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let H=h[z.id].answer,q=!1;switch(z.type){case"single-choice":case"true-false":q=H===z.correctAnswer;break}return(0,Je.jsxs)("div",{className:V("p-3 rounded-lg flex items-start gap-2",q?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[q?(0,Je.jsx)(Ms,{className:"w-5 h-5 mt-0.5"}):(0,Je.jsx)(ta,{className:"w-5 h-5 mt-0.5"}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-medium",children:q?"Correct!":"Incorrect"}),z.explanation&&(0,Je.jsx)("p",{className:"text-sm mt-1",children:z.explanation})]})]})})()})]},z.id)}),(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("button",{onClick:k,disabled:p===0,className:V("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,Je.jsx)(ea,{className:"w-4 h-4"}),"Previous"]}),(0,Je.jsxs)("button",{onClick:p===d.length-1?T:I,disabled:z?.required&&!h[z.id],className:V("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",z?.required&&!h[z.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,Je.jsx)(Dn,{className:"w-4 h-4"})]})]})]})});W9e.displayName="MoonUIQuizFormProInternal";var ole=Vl.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ut();return!n&&!r?(0,Je.jsx)(Be,{className:V("w-full",e.className),children:(0,Je.jsx)(Ve,{className:"py-12 text-center",children:(0,Je.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Je.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Je.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Je.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Je.jsx)("a",{href:"/pricing",children:(0,Je.jsxs)(ne,{size:"sm",children:[(0,Je.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Je.jsx)(W9e,{...e,ref:t})});ole.displayName="MoonUIQuizFormPro";var pd=L(ue(),1);var Q=L(at(),1),Rn=L(at(),1);var od=L(at(),1);var zl=L(at(),1);var qS=L(Nr(),1),$6="Collapsible",[NZt,ale]=nn($6),[MZt,ile]=NZt($6),G9e=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Un({prop:n,defaultProp:o??!1,onChange:i,caller:$6});return(0,qS.jsx)(MZt,{scope:r,disabled:a,contentId:So(),open:l,onOpenToggle:zl.useCallback(()=>c(u=>!u),[c]),children:(0,qS.jsx)(Qe.div,{"data-state":lle(l),"data-disabled":a?"":void 0,...s,ref:t})})});G9e.displayName=$6;var K9e="CollapsibleTrigger",X9e=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=ile(K9e,r);return(0,qS.jsx)(Qe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lle(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ze(e.onClick,o.onOpenToggle)})});X9e.displayName=K9e;var sle="CollapsibleContent",Y9e=zl.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=ile(sle,e.__scopeCollapsible);return(0,qS.jsx)(Yn,{present:r||o.open,children:({present:a})=>(0,qS.jsx)(TZt,{...n,ref:t,present:a})})});Y9e.displayName=sle;var TZt=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ile(sle,r),[s,l]=zl.useState(n),c=zl.useRef(null),u=zt(t,c),d=zl.useRef(0),f=d.current,p=zl.useRef(0),m=p.current,h=i.open||s,g=zl.useRef(h),v=zl.useRef(void 0);return zl.useEffect(()=>{let y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),Mn(()=>{let y=c.current;if(y){v.current=v.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,g.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),l(n)}},[i.open,n]),(0,qS.jsx)(Qe.div,{"data-state":lle(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&o})});function lle(e){return e?"open":"closed"}var Z9e=G9e,Q9e=X9e,J9e=Y9e;var Hs=L(Nr(),1),Hm="Accordion",LZt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ule,EZt,DZt]=jd(Hm),[G6,$Mn]=nn(Hm,[DZt,ale]),dle=ale(),OZt=od.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Hs.jsx)(ule.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Hs.jsx)(VZt,{...a,ref:t}):(0,Hs.jsx)(BZt,{...o,ref:t})})});OZt.displayName=Hm;var[eKe,_Zt]=G6(Hm),[tKe,FZt]=G6(Hm,{collapsible:!1}),BZt=od.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Un({prop:r,defaultProp:n??"",onChange:o,caller:Hm});return(0,Hs.jsx)(eKe,{scope:e.__scopeAccordion,value:od.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:od.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Hs.jsx)(tKe,{scope:e.__scopeAccordion,collapsible:a,children:(0,Hs.jsx)(rKe,{...i,ref:t})})})}),VZt=od.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Un({prop:r,defaultProp:n??[],onChange:o,caller:Hm}),l=od.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=od.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Hs.jsx)(eKe,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Hs.jsx)(tKe,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Hs.jsx)(rKe,{...a,ref:t})})})}),[zZt,K6]=G6(Hm),rKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=od.default.useRef(null),l=zt(s,t),c=EZt(r),d=ep(o)==="ltr",f=ze(e.onKeyDown,p=>{if(!LZt.includes(p.key))return;let m=p.target,h=c().filter(P=>!P.ref.current?.disabled),g=h.findIndex(P=>P.ref.current===m),v=h.length;if(g===-1)return;p.preventDefault();let y=g,x=0,C=v-1,b=()=>{y=g+1,y>C&&(y=x)},w=()=>{y=g-1,y<x&&(y=C)};switch(p.key){case"Home":y=x;break;case"End":y=C;break;case"ArrowRight":a==="horizontal"&&(d?b():w());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?w():b());break;case"ArrowUp":a==="vertical"&&w();break}let S=y%v;h[S].ref.current?.focus()});return(0,Hs.jsx)(zZt,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Hs.jsx)(ule.Slot,{scope:r,children:(0,Hs.jsx)(Qe.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),W6="AccordionItem",[UZt,fle]=G6(W6),nKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=K6(W6,r),i=_Zt(W6,r),s=dle(r),l=So(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Hs.jsx)(UZt,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Hs.jsx)(Z9e,{"data-orientation":a.orientation,"data-state":cKe(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});nKe.displayName=W6;var oKe="AccordionHeader",aKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(oKe,r);return(0,Hs.jsx)(Qe.h3,{"data-orientation":o.orientation,"data-state":cKe(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});aKe.displayName=oKe;var cle="AccordionTrigger",iKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(cle,r),i=FZt(cle,r),s=dle(r);return(0,Hs.jsx)(ule.ItemSlot,{scope:r,children:(0,Hs.jsx)(Q9e,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});iKe.displayName=cle;var sKe="AccordionContent",lKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(sKe,r),i=dle(r);return(0,Hs.jsx)(J9e,{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}})});lKe.displayName=sKe;function cKe(e){return e?"open":"closed"}var uKe=nKe,dKe=aKe,ple=iKe,mle=lKe;var Y6=L(at());var fKe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jZt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),hle=e=>{let t=jZt(e);return t.charAt(0).toUpperCase()+t.slice(1)},X6=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),pKe=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var A_=L(at());var mKe={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 hKe=(0,A_.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,A_.createElement)("svg",{ref:l,...mKe,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:X6("lucide",o),...!a&&!pKe(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,A_.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var ht=(e,t)=>{let r=(0,Y6.forwardRef)(({className:n,...o},a)=>(0,Y6.createElement)(hKe,{ref:a,iconNode:t,className:X6(`lucide-${fKe(hle(e))}`,`lucide-${e}`,n),...o}));return r.displayName=hle(e),r};var qZt=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],L_=ht("align-center",qZt);var $Zt=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],E_=ht("align-justify",$Zt);var WZt=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],D_=ht("align-left",WZt);var GZt=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],O_=ht("align-right",GZt);var KZt=[["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"}]],__=ht("bold",KZt);var XZt=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ky=ht("check",XZt);var YZt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],y0=ht("chevron-down",YZt);var ZZt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],TN=ht("chevron-left",ZZt);var QZt=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],x0=ht("chevron-right",QZt);var JZt=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],F_=ht("chevron-up",JZt);var eQt=[["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"}]],Mg=ht("circle-alert",eQt);var tQt=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],b0=ht("circle-check-big",tQt);var rQt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],AN=ht("circle",rQt);var nQt=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],B_=ht("code",nQt);var oQt=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],V_=ht("credit-card",oQt);var aQt=[["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"}]],Ny=ht("ellipsis",aQt);var iQt=[["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"}]],z_=ht("eye",iQt);var sQt=[["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"}]],U_=ht("file-text",sQt);var lQt=[["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"}]],H_=ht("file",lQt);var cQt=[["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"}]],LN=ht("image",cQt);var uQt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],EN=ht("info",uQt);var dQt=[["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"}]],j_=ht("italic",dQt);var fQt=[["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"}]],q_=ht("link",fQt);var pQt=[["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"}]],$_=ht("list-ordered",pQt);var mQt=[["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"}]],W_=ht("list",mQt);var hQt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],mf=ht("loader-circle",hQt);var gQt=[["path",{d:"M5 12h14",key:"1ays0h"}]],G_=ht("minus",gQt);var vQt=[["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"}]],K_=ht("music",vQt);var yQt=[["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"}]],X_=ht("palette",yQt);var xQt=[["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"}]],Y_=ht("phone",xQt);var bQt=[["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"}]],Z_=ht("quote",bQt);var wQt=[["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"}]],Q_=ht("redo",wQt);var CQt=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J_=ht("search",CQt);var SQt=[["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"}]],ad=ht("square-pen",SQt);var PQt=[["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"}]],e2=ht("strikethrough",PQt);var IQt=[["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"}]],w0=ht("triangle-alert",IQt);var RQt=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],t2=ht("underline",RQt);var kQt=[["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"}]],r2=ht("undo",kQt);var NQt=[["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"}]],n2=ht("upload",NQt);var MQt=[["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"}]],o2=ht("video",MQt);var TQt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],My=ht("x",TQt);function gKe(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=gKe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Z6(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=gKe(e))&&(n&&(n+=" "),n+=t);return n}var yle="-",AQt=e=>{let t=EQt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(yle);return s[0]===""&&s.length!==1&&s.shift(),xKe(s,t)||LQt(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},xKe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?xKe(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(yle);return t.validators.find(({validator:i})=>i(a))?.classGroupId},vKe=/^\[(.+)\]$/,LQt=e=>{if(vKe.test(e)){let t=vKe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},EQt=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return OQt(Object.entries(e.classGroups),r).forEach(([a,i])=>{vle(i,n,a,t)}),n},vle=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:yKe(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(DQt(o)){vle(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{vle(i,yKe(t,a),r,n)})})},yKe=(e,t)=>{let r=e;return t.split(yle).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},DQt=e=>e.isThemeGetter,OQt=(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,_Qt=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)}}},bKe="!",FQt=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 g=0;g<s.length;g++){let v=s[g];if(c===0){if(v===o&&(n||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(bKe),m=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return r?s=>r({className:s,parseClassName:i}):i},BQt=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},VQt=e=>({cache:_Qt(e.cacheSize),parseClassName:FQt(e),...AQt(e)}),zQt=/\s+/,UQt=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(zQt),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),m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m){s=c+(s.length>0?" "+s:s);continue}if(h=n(f),!h){s=c+(s.length>0?" "+s:s);continue}m=!1}let g=BQt(u).join(":"),v=d?g+bKe:g,y=v+h;if(a.includes(y))continue;a.push(y);let x=o(h,m);for(let C=0;C<x.length;++C){let b=x[C];a.push(v+b)}s=c+(s.length>0?" "+s:s)}return s};function HQt(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=wKe(t))&&(n&&(n+=" "),n+=r);return n}var wKe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wKe(e[n]))&&(r&&(r+=" "),r+=t);return r};function jQt(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=VQt(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=UQt(l,r);return o(l,u),u}return function(){return a(HQt.apply(null,arguments))}}var La=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},CKe=/^\[(?:([a-z-]+):)?(.+)\]$/i,qQt=/^\d+\/\d+$/,$Qt=new Set(["px","full","screen"]),WQt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GQt=/\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$/,KQt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,XQt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YQt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ty=e=>DN(e)||$Qt.has(e)||qQt.test(e),C0=e=>ON(e,"length",oJt),DN=e=>!!e&&!Number.isNaN(Number(e)),gle=e=>ON(e,"number",DN),a2=e=>!!e&&Number.isInteger(Number(e)),ZQt=e=>e.endsWith("%")&&DN(e.slice(0,-1)),en=e=>CKe.test(e),S0=e=>WQt.test(e),QQt=new Set(["length","size","percentage"]),JQt=e=>ON(e,QQt,SKe),eJt=e=>ON(e,"position",SKe),tJt=new Set(["image","url"]),rJt=e=>ON(e,tJt,iJt),nJt=e=>ON(e,"",aJt),i2=()=>!0,ON=(e,t,r)=>{let n=CKe.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},oJt=e=>GQt.test(e)&&!KQt.test(e),SKe=()=>!1,aJt=e=>XQt.test(e),iJt=e=>YQt.test(e);var sJt=()=>{let e=La("colors"),t=La("spacing"),r=La("blur"),n=La("brightness"),o=La("borderColor"),a=La("borderRadius"),i=La("borderSpacing"),s=La("borderWidth"),l=La("contrast"),c=La("grayscale"),u=La("hueRotate"),d=La("invert"),f=La("gap"),p=La("gradientColorStops"),m=La("gradientColorStopPositions"),h=La("inset"),g=La("margin"),v=La("opacity"),y=La("padding"),x=La("saturate"),C=La("scale"),b=La("sepia"),w=La("skew"),S=La("space"),P=La("translate"),N=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",en,t],A=()=>[en,t],z=()=>["",Ty,C0],B=()=>["auto",DN,en],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",en],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>[DN,en];return{cacheSize:500,separator:":",theme:{colors:[i2],spacing:[Ty,C0],blur:["none","",S0,en],brightness:_(),borderColor:[e],borderRadius:["none","","full",S0,en],borderSpacing:A(),borderWidth:z(),contrast:_(),grayscale:O(),hueRotate:_(),invert:O(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ZQt,C0],inset:E(),margin:E(),opacity:_(),padding:A(),saturate:_(),scale:_(),sepia:O(),skew:_(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",en]}],container:["container"],columns:[{columns:[S0]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...R(),en]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",a2,en]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",en]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",a2,en]}],"grid-cols":[{"grid-cols":[i2]}],"col-start-end":[{col:["auto",{span:["full",a2,en]},en]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[i2]}],"row-start-end":[{row:["auto",{span:[a2,en]},en]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",en]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",en]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"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:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"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",en,t]}],"min-w":[{"min-w":[en,t,"min","max","fit"]}],"max-w":[{"max-w":[en,t,"none","full","min","max","fit","prose",{screen:[S0]},S0]}],h:[{h:[en,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[en,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[en,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[en,t,"auto","min","max","fit"]}],"font-size":[{text:["base",S0,C0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gle]}],"font-family":[{font:[i2]}],"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",en]}],"line-clamp":[{"line-clamp":["none",DN,gle]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ty,en]}],"list-image":[{"list-image":["none",en]}],"list-style-type":[{list:["none","disc","decimal",en]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ty,C0]}],"underline-offset":[{"underline-offset":["auto",Ty,en]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",en]}],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",en]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),eJt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JQt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rJt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[v]}],"border-style":[{border:[...I(),"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":[v]}],"divide-style":[{divide:I()}],"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:["",...I()]}],"outline-offset":[{"outline-offset":[Ty,en]}],"outline-w":[{outline:[Ty,C0]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Ty,C0]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",S0,nJt]}],"shadow-color":[{shadow:[i2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...k(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",S0,en]}],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":[v]}],"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",en]}],duration:[{duration:_()}],ease:[{ease:["linear","in","out","in-out",en]}],delay:[{delay:_()}],animate:[{animate:["none","spin","ping","pulse","bounce",en]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[a2,en]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",en]}],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",en]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",en]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ty,C0,gle]}],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 PKe=jQt(sJt);var W=L(Nr(),1);var IKe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,RKe=Z6,In=(e,t)=>r=>{var n;if(t?.variants==null)return RKe(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=IKe(u)||IKe(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(m=>{let[h,g]=m;return Array.isArray(g)?g.includes({...a,...s}[h]):{...a,...s}[h]===g})?[...c,d,f]:c},[]);return RKe(e,i,l,r?.class,r?.className)};var Tp=L(at(),1);var kKe=L(vE(),1);function NKe(){return(0,kKe.useSyncExternalStore)(lJt,()=>!0,()=>!1)}function lJt(){return()=>{}}var s2=L(Nr(),1),xle="Avatar",[cJt,RLn]=nn(xle),[uJt,TKe]=cJt(xle),AKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=Tp.useState("idle");return(0,s2.jsx)(uJt,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,s2.jsx)(Qe.span,{...n,ref:t})})});AKe.displayName=xle;var LKe="AvatarImage",EKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=TKe(LKe,r),s=dJt(n,a),l=Hn(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mn(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,s2.jsx)(Qe.img,{...a,ref:t,src:n}):null});EKe.displayName=LKe;var DKe="AvatarFallback",OKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=TKe(DKe,r),[i,s]=Tp.useState(n===void 0);return Tp.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,s2.jsx)(Qe.span,{...o,ref:t}):null});OKe.displayName=DKe;function MKe(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function dJt(e,{referrerPolicy:t,crossOrigin:r}){let n=NKe(),o=Tp.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=Tp.useState(()=>MKe(a,e));return Mn(()=>{s(MKe(a,e))},[a,e]),Mn(()=>{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 ble=AKe,wle=EKe,Cle=OKe;var $2=L(Nr(),1),Eg=L(at(),1);var _Ke=L(at(),1),_N=(0,_Ke.createContext)({});var FKe=L(at(),1);function Tg(e){let t=(0,FKe.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Q6=L(at(),1);var FN=typeof window<"u";var BN=FN?Q6.useLayoutEffect:Q6.useEffect;var rce=L(Nr(),1),V7e=L(at(),1),j2=L(at(),1);var BKe=L(at(),1),P0=(0,BKe.createContext)(null);var F7e=L(Nr(),1);function $S(e,t){e.indexOf(t)===-1&&e.push(t)}function jm(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hl=(e,t,r)=>r>t?t:r<e?e:r;var Ay=()=>{},Ul=()=>{};var bc={};var l2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function c2(e){return typeof e=="object"&&e!==null}var u2=e=>/^0[^.\s]+$/u.test(e);function WS(e){let t;return()=>(t===void 0&&(t=e()),t)}var hi=e=>e;var pJt=(e,t)=>r=>t(e(r)),qm=(...e)=>e.reduce(pJt);var Ap=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Ly=class{constructor(){this.subscriptions=[]}add(t){return $S(this.subscriptions,t),()=>jm(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 $i=e=>e*1e3,Hl=e=>e/1e3;function d2(e,t){return t?e*(1e3/t):0}var VKe=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var zKe=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,mJt=1e-7,hJt=12;function gJt(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=zKe(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>mJt&&++s<hJt);return i}function I0(e,t,r,n){if(e===t&&r===n)return hi;let o=a=>gJt(a,0,1,e,r);return a=>a===0||a===1?a:zKe(o(a),t,n)}var J6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var eW=e=>t=>1-e(1-t);var tW=I0(.33,1.53,.69,.99),VN=eW(tW),f2=J6(VN);var p2=e=>(e*=2)<1?.5*VN(e):.5*(2-Math.pow(2,-10*(e-1)));var m2=e=>1-Math.sin(Math.acos(e)),h2=eW(m2),g2=J6(m2);var Sle=I0(.42,0,1,1),Ple=I0(0,0,.58,1),v2=I0(.42,0,.58,1);var y2=e=>Array.isArray(e)&&typeof e[0]!="number";function x2(e,t){return y2(e)?e[VKe(0,e.length,t)]:e}var b2=e=>Array.isArray(e)&&typeof e[0]=="number";var UKe={linear:hi,easeIn:Sle,easeInOut:v2,easeOut:Ple,circIn:m2,circInOut:g2,circOut:h2,backIn:VN,backInOut:f2,backOut:tW,anticipate:p2},vJt=e=>typeof e=="string",rW=e=>{if(b2(e)){Ul(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return I0(t,r,n,o)}else if(vJt(e))return Ul(UKe[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),UKe[e];return e};var w2=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var id={value:null,addProjectionMetrics:null};function HKe(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 h=p&&o?r:n;return f&&i.add(d),h.has(d)||h.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&&id.value&&id.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var yJt=40;function nW(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=w2.reduce((x,C)=>(x[C]=HKe(a,t?C:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=i,h=()=>{let x=bc.useManualTiming?o.timestamp:performance.now();r=!1,bc.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,yJt),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),m.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(h))},g=()=>{r=!0,n=!0,o.isProcessing||e(h)};return{schedule:w2.reduce((x,C)=>{let b=i[C];return x[C]=(w,S=!1,P=!1)=>(r||g(),b.schedule(w,S,P)),x},{}),cancel:x=>{for(let C=0;C<w2.length;C++)i[w2[C]].cancel(x)},state:o,steps:i}}var{schedule:tn,cancel:wc,state:Li,steps:C2}=nW(typeof requestAnimationFrame<"u"?requestAnimationFrame:hi,!0);var oW;function xJt(){oW=void 0}var Ei={now:()=>(oW===void 0&&Ei.set(Li.isProcessing||bc.useManualTiming?Li.timestamp:performance.now()),oW),set:e=>{oW=e,queueMicrotask(xJt)}};var $m={layout:0,mainThread:0,waapi:0};var jKe=e=>t=>typeof t=="string"&&t.startsWith(e),GS=jKe("--"),bJt=jKe("var(--"),KS=e=>bJt(e)?wJt.test(e.split("/*")[0].trim()):!1,wJt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Ag={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ey={...Ag,transform:e=>hl(0,1,e)},S2={...Ag,default:1};var R0=e=>Math.round(e*1e5)/1e5;var zN=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qKe(e){return e==null}var $Ke=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var UN=(e,t)=>r=>!!(typeof r=="string"&&$Ke.test(r)&&r.startsWith(e)||t&&!qKe(r)&&Object.prototype.hasOwnProperty.call(r,t)),aW=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(zN);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var CJt=e=>hl(0,255,e),Ile={...Ag,transform:e=>Math.round(CJt(e))},Lg={test:UN("rgb","red"),parse:aW("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Ile.transform(e)+", "+Ile.transform(t)+", "+Ile.transform(r)+", "+R0(Ey.transform(n))+")"};function SJt(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 P2={test:UN("#"),parse:SJt,transform:Lg.transform};var I2=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wm=I2("deg"),Cc=I2("%"),ir=I2("px"),Rle=I2("vh"),kle=I2("vw"),iW=(()=>({...Cc,parse:e=>Cc.parse(e)/100,transform:e=>Cc.transform(e*100)}))();var k0={test:UN("hsl","hue"),parse:aW("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Cc.transform(R0(t))+", "+Cc.transform(R0(r))+", "+R0(Ey.transform(n))+")"};var Ya={test:e=>Lg.test(e)||P2.test(e)||k0.test(e),parse:e=>Lg.test(e)?Lg.parse(e):k0.test(e)?k0.parse(e):P2.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lg.transform(e):k0.transform(e),getAnimatableNone:e=>{let t=Ya.parse(e);return t.alpha=0,Ya.transform(t)}};var WKe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function PJt(e){return isNaN(e)&&typeof e=="string"&&(e.match(zN)?.length||0)+(e.match(WKe)?.length||0)>0}var KKe="number",XKe="color",IJt="var",RJt="var(",GKe="${}",kJt=/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 N0(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(kJt,l=>(Ya.test(l)?(n.color.push(a),o.push(XKe),r.push(Ya.parse(l))):l.startsWith(RJt)?(n.var.push(a),o.push(IJt),r.push(l)):(n.number.push(a),o.push(KKe),r.push(parseFloat(l))),++a,GKe)).split(GKe);return{values:r,split:s,indexes:n,types:o}}function YKe(e){return N0(e).values}function ZKe(e){let{split:t,types:r}=N0(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===KKe?a+=R0(o[i]):s===XKe?a+=Ya.transform(o[i]):a+=o[i]}return a}}var NJt=e=>typeof e=="number"?0:Ya.test(e)?Ya.getAnimatableNone(e):e;function MJt(e){let t=YKe(e);return ZKe(e)(t.map(NJt))}var Sc={test:PJt,parse:YKe,createTransformer:ZKe,getAnimatableNone:MJt};function Nle(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 QKe({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=Nle(l,s,e+1/3),a=Nle(l,s,e),i=Nle(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function HN(e,t){return r=>r>0?t:e}var yn=(e,t,r)=>e+(t-e)*r;var Mle=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},TJt=[P2,Lg,k0],AJt=e=>TJt.find(t=>t.test(e));function JKe(e){let t=AJt(e);if(Ay(!!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===k0&&(r=QKe(r)),r}var Tle=(e,t)=>{let r=JKe(e),n=JKe(t);if(!r||!n)return HN(e,t);let o={...r};return a=>(o.red=Mle(r.red,n.red,a),o.green=Mle(r.green,n.green,a),o.blue=Mle(r.blue,n.blue,a),o.alpha=yn(r.alpha,n.alpha,a),Lg.transform(o))};var sW=new Set(["none","hidden"]);function e7e(e,t){return sW.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function LJt(e,t){return r=>yn(e,t,r)}function lW(e){return typeof e=="number"?LJt:typeof e=="string"?KS(e)?HN:Ya.test(e)?Tle:OJt:Array.isArray(e)?t7e:typeof e=="object"?Ya.test(e)?Tle:EJt:HN}function t7e(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>lW(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function EJt(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=lW(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function DJt(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 OJt=(e,t)=>{let r=Sc.createTransformer(t),n=N0(e),o=N0(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?sW.has(e)&&!o.values.length||sW.has(t)&&!n.values.length?e7e(e,t):qm(t7e(DJt(n,o),o.values),r):(Ay(!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"),HN(e,t))};function cW(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?yn(e,t,r):lW(e)(e,t)}var r7e=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>tn.update(t,r),stop:()=>wc(t),now:()=>Li.isProcessing?Li.timestamp:Ei.now()}};var uW=(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 jN(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 R2(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(jN(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Hl(o)}}var _Jt=5;function dW(e,t,r){let n=Math.max(t-_Jt,0);return d2(r-e(n),t-n)}var Ea={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 Lle=.001;function n7e({duration:e=Ea.duration,bounce:t=Ea.bounce,velocity:r=Ea.velocity,mass:n=Ea.mass}){let o,a;Ay(e<=$i(Ea.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hl(Ea.minDamping,Ea.maxDamping,i),e=hl(Ea.minDuration,Ea.maxDuration,Hl(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=fW(c,i),m=Math.exp(-d);return Lle-f/p*m},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),h=fW(Math.pow(c,2),i);return(-o(c)+Lle>0?-1:1)*((f-p)*m)/h}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Lle+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=BJt(o,a,s);if(e=$i(e),isNaN(l))return{stiffness:Ea.stiffness,damping:Ea.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var FJt=12;function BJt(e,t,r){let n=r;for(let o=1;o<FJt;o++)n=n-e(n)/t(n);return n}function fW(e,t){return e*Math.sqrt(1-t*t)}var VJt=["duration","bounce"],zJt=["stiffness","damping","mass"];function o7e(e,t){return t.some(r=>e[r]!==void 0)}function UJt(e){let t={velocity:Ea.velocity,stiffness:Ea.stiffness,damping:Ea.damping,mass:Ea.mass,isResolvedFromDuration:!1,...e};if(!o7e(e,zJt)&&o7e(e,VJt))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ea.mass,stiffness:o,damping:a}}else{let r=n7e(e);t={...t,...r,mass:Ea.mass},t.isResolvedFromDuration=!0}return t}function Dy(e=Ea.visualDuration,t=Ea.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}=UJt({...r,velocity:-Hl(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=i-a,v=Hl(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?Ea.restSpeed.granular:Ea.restSpeed.default),o||(o=y?Ea.restDelta.granular:Ea.restDelta.default);let x;if(h<1){let b=fW(v,h);x=w=>{let S=Math.exp(-h*v*w);return i-S*((m+h*v*g)/b*Math.sin(b*w)+g*Math.cos(b*w))}}else if(h===1)x=b=>i-Math.exp(-v*b)*(g+(m+v*g)*b);else{let b=v*Math.sqrt(h*h-1);x=w=>{let S=Math.exp(-h*v*w),P=Math.min(b*w,300);return i-S*((m+h*v*g)*Math.sinh(P)+b*g*Math.cosh(P))/b}}let C={calculatedDuration:p&&d||null,next:b=>{let w=x(b);if(p)s.done=b>=d;else{let S=b===0?m:0;h<1&&(S=b===0?$i(m):dW(x,b,w));let P=Math.abs(S)<=n,N=Math.abs(i-w)<=o;s.done=P&&N}return s.value=s.done?i:w,s},toString:()=>{let b=Math.min(jN(C),2e4),w=uW(S=>C.next(b*S).value,b,30);return b+"ms "+w},toTransition:()=>{}};return C}Dy.applyToOptions=e=>{let t=R2(e,100,Dy);return e.ease=t.ease,e.duration=$i(t.duration),e.type="keyframes",e};function k2({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,m=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,h=r*t,g=d+h,v=i===void 0?g:i(g);v!==g&&(h=v-d);let y=P=>-h*Math.exp(-P/n),x=P=>v+y(P),C=P=>{let N=y(P),D=x(P);f.done=Math.abs(N)<=c,f.value=f.done?v:D},b,w,S=P=>{p(f.value)&&(b=P,w=Dy({keyframes:[f.value,m(f.value)],velocity:dW(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let N=!1;return!w&&b===void 0&&(N=!0,C(P),S(P)),b!==void 0&&P>=b?w.next(P-b):(!N&&C(P),f)}}}function HJt(e,t,r){let n=[],o=r||bc.mix||cW,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]||hi:t;s=qm(l,s)}n.push(s)}return n}function pW(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Ul(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=HJt(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=Ap(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hl(e[0],e[a-1],u)):c}function N2(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Ap(0,t,n);e.push(yn(r,1,o))}}function M2(e){let t=[0];return N2(t,e.length-1),t}function a7e(e,t){return e.map(r=>r*t)}function jJt(e,t){return e.map(()=>t||v2).splice(0,e.length-1)}function XS({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=y2(n)?n.map(rW):rW(n),a={done:!1,value:t[0]},i=a7e(r&&r.length===t.length?r:M2(t),e),s=pW(i,t,{ease:Array.isArray(o)?o:jJt(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var qJt=e=>e!==null;function qN(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(qJt),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var $Jt={decay:k2,inertia:k2,tween:XS,keyframes:XS,spring:Dy};function mW(e){typeof e.type=="string"&&(e.type=$Jt[e.type])}var M0=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 WJt=e=>e/100,Oy=class extends M0{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!==Ei.now()&&this.tick(Ei.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$m.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;mW(t);let{type:r=XS,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||XS;l!==XS&&typeof s[0]!="number"&&(this.mixKeyframes=qm(WJt,cW(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=jN(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:m,onUpdate:h,finalKeyframe:g}=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 v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,C=n;if(d){let P=Math.min(this.currentTime,o)/s,N=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(D=1-D,p&&(D-=p/s)):f==="mirror"&&(C=i)),x=hl(0,1,D)*s}let b=y?{done:!1,value:u[0]}:C.next(x);a&&(b.value=a(b.value));let{done:w}=b;!y&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return S&&m!==k2&&(b.value=qN(u,this.options,g,this.speed)),h&&h(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Hl(this.calculatedDuration)}get time(){return Hl(this.currentTime)}set time(t){t=$i(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(Ei.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Hl(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=r7e,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(Ei.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,$m.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 i7e(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var YS=e=>e*180/Math.PI,Ele=e=>{let t=YS(Math.atan2(e[1],e[0]));return Dle(t)},GJt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ele,rotateZ:Ele,skewX:e=>YS(Math.atan(e[1])),skewY:e=>YS(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Dle=e=>(e=e%360,e<0&&(e+=360),e),s7e=Ele,l7e=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),c7e=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KJt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:l7e,scaleY:c7e,scale:e=>(l7e(e)+c7e(e))/2,rotateX:e=>Dle(YS(Math.atan2(e[6],e[5]))),rotateY:e=>Dle(YS(Math.atan2(-e[2],e[0]))),rotateZ:s7e,rotate:s7e,skewX:e=>YS(Math.atan(e[4])),skewY:e=>YS(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function T2(e){return e.includes("scale")?1:0}function A2(e,t){if(!e||e==="none")return T2(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=KJt,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=GJt,o=s}if(!o)return T2(t);let a=n[t],i=o[1].split(",").map(XJt);return typeof a=="function"?a(i):i[a]}var Ole=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return A2(r,t)};function XJt(e){return parseFloat(e.trim())}var Gm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hf=(()=>new Set(Gm))();var _le=e=>e===Ag||e===ir,YJt=new Set(["x","y","z"]),ZJt=Gm.filter(e=>!YJt.has(e));function u7e(e){let t=[];return ZJt.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var T0={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})=>A2(t,"x"),y:(e,{transform:t})=>A2(t,"y")};T0.translateX=T0.x;T0.translateY=T0.y;var ZS=new Set,Fle=!1,Ble=!1,Vle=!1;function d7e(){if(Ble){let e=Array.from(ZS).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=u7e(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)})}Ble=!1,Fle=!1,ZS.forEach(e=>e.complete(Vle)),ZS.clear()}function f7e(){ZS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ble=!0)})}function zle(){Vle=!0,f7e(),d7e(),Vle=!1}var _y=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?(ZS.add(this),Fle||(Fle=!0,tn.read(f7e),tn.resolveKeyframes(d7e))):(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])}i7e(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ZS.delete(this)}cancel(){this.state==="scheduled"&&(ZS.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var p7e=e=>e.startsWith("--");function m7e(e,t,r){p7e(t)?e.style.setProperty(t,r):e.style[t]=r}var h7e=WS(()=>window.ScrollTimeline!==void 0);var g7e={};function v7e(e,t){let r=WS(e);return()=>g7e[t]??r()}var hW=v7e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var QS=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var Ule={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:QS([0,.65,.55,1]),circOut:QS([.55,0,1,.45]),backIn:QS([.31,.01,.66,-.59]),backOut:QS([.33,1.53,.69,.99])};function Hle(e,t){if(e)return typeof e=="function"?hW()?uW(e,t):"ease-out":b2(e)?QS(e):Array.isArray(e)?e.map(r=>Hle(r,t)||Ule.easeOut):Ule[e]}function y7e(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=Hle(s,o);Array.isArray(d)&&(u.easing=d),id.value&&$m.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 id.value&&p.finished.finally(()=>{$m.waapi--}),p}function JS(e){return typeof e=="function"&&"applyToOptions"in e}function x7e({type:e,...t}){return JS(e)&&hW()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var gW=class extends M0{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,Ul(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=x7e(t);this.animation=y7e(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=qN(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):m7e(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 Hl(Number(t))}get time(){return Hl(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$i(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&&h7e()?(this.animation.timeline=t,hi):r(this)}};var b7e={anticipate:p2,backInOut:f2,circInOut:g2};function QJt(e){return e in b7e}function w7e(e){typeof e.ease=="string"&&QJt(e.ease)&&(e.ease=b7e[e.ease])}var C7e=10,vW=class extends gW{constructor(t){w7e(t),mW(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 Oy({...i,autoplay:!1}),l=$i(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-C7e).value,s.sample(l).value,C7e),s.stop()}};var jle=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Sc.test(e)||e==="0")&&!e.startsWith("url("));function JJt(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 S7e(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=jle(o,t),s=jle(a,t);return Ay(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:JJt(e)||(r==="spring"||JS(r))&&n}function $N(e){e.duration=0,e.type}var eer=new Set(["opacity","clipPath","filter","transform"]),ter=WS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function P7e(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 ter()&&r&&eer.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var rer=40,L2=class extends M0{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=Ei.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||_y;this.keyframeResolver=new p(s,(m,h,g)=>this.onKeyframesResolved(m,h,f,!g),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=Ei.now(),S7e(t,a,i,s)||((bc.instantAnimations||!l)&&u?.(qN(t,n,r)),t[0]=t[t.length-1],$N(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>rer?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&P7e(f)?new vW({...f,element:f.motionValue.owner.current}):new Oy(f);p.finished.then(()=>this.notifyFinished()).catch(hi),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(),zle()),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 yW=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 E2=class extends yW{then(t,r){return this.finished.finally(t).then(()=>{})}};var ner=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oer(e){let t=ner.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var aer=4;function qle(e,t,r=1){Ul(r<=aer,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=oer(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return l2(i)?parseFloat(i):i}return KS(o)?qle(o,t,r+1):o}function e1(e,t){return e?.[t]??e?.default??e}var D2=new Set(["width","height","top","left","right","bottom",...Gm]);var I7e={test:e=>e==="auto",parse:e=>e};var xW=e=>t=>t.test(e);var $le=[Ag,ir,Cc,Wm,kle,Rle,I7e],Wle=e=>$le.find(xW(e));function R7e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||u2(e):!0}var ier=new Set(["brightness","contrast","saturate","opacity"]);function ser(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(zN)||[];if(!n)return e;let o=r.replace(n,""),a=ier.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var ler=/\b([a-z-]*)\(.*?\)/gu,O2={...Sc,getAnimatableNone:e=>{let t=e.match(ler);return t?t.map(ser).join(" "):e}};var Gle={...Ag,transform:Math.round};var k7e={rotate:Wm,rotateX:Wm,rotateY:Wm,rotateZ:Wm,scale:S2,scaleX:S2,scaleY:S2,scaleZ:S2,skew:Wm,skewX:Wm,skewY:Wm,distance:ir,translateX:ir,translateY:ir,translateZ:ir,x:ir,y:ir,z:ir,perspective:ir,transformPerspective:ir,opacity:Ey,originX:iW,originY:iW,originZ:ir};var t1={borderWidth:ir,borderTopWidth:ir,borderRightWidth:ir,borderBottomWidth:ir,borderLeftWidth:ir,borderRadius:ir,radius:ir,borderTopLeftRadius:ir,borderTopRightRadius:ir,borderBottomRightRadius:ir,borderBottomLeftRadius:ir,width:ir,maxWidth:ir,height:ir,maxHeight:ir,top:ir,right:ir,bottom:ir,left:ir,padding:ir,paddingTop:ir,paddingRight:ir,paddingBottom:ir,paddingLeft:ir,margin:ir,marginTop:ir,marginRight:ir,marginBottom:ir,marginLeft:ir,backgroundPositionX:ir,backgroundPositionY:ir,...k7e,zIndex:Gle,fillOpacity:Ey,strokeOpacity:Ey,numOctaves:Gle};var N7e={...t1,color:Ya,backgroundColor:Ya,outlineColor:Ya,fill:Ya,stroke:Ya,borderColor:Ya,borderTopColor:Ya,borderRightColor:Ya,borderBottomColor:Ya,borderLeftColor:Ya,filter:O2,WebkitFilter:O2},_2=e=>N7e[e];function F2(e,t){let r=_2(e);return r!==O2&&(r=Sc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var cer=new Set(["auto","none","0"]);function M7e(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!cer.has(a)&&N0(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=F2(r,o)}var B2=class extends _y{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(),KS(c))){let u=qle(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!D2.has(n)||t.length!==2)return;let[o,a]=t,i=Wle(o),s=Wle(a);if(i!==s)if(_le(i)&&_le(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else T0[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||R7e(t[o]))&&n.push(o);n.length&&M7e(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=T0[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]=T0[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 V2(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 z2=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function U2(e){return c2(e)&&"offsetHeight"in e}var T7e=30,uer=e=>!isNaN(parseFloat(e)),r1={current:void 0},bW=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=Ei.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=Ei.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uer(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 Ly);let n=this.events[t].add(r);return t==="change"?()=>{n(),tn.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 r1.current&&r1.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ei.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>T7e)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,T7e);return d2(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 sd(e,t){return new bW(e,t)}var{schedule:n1,cancel:der}=nW(queueMicrotask,!1);var Lp={x:!1,y:!1};function wW(){return Lp.x||Lp.y}function Kle(e){return e==="x"||e==="y"?Lp[e]?null:(Lp[e]=!0,()=>{Lp[e]=!1}):Lp.x||Lp.y?null:(Lp.x=Lp.y=!0,()=>{Lp.x=Lp.y=!1})}function CW(e,t){let r=V2(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function A7e(e){return!(e.pointerType==="touch"||wW())}function Xle(e,t,r={}){let[n,o,a]=CW(e,r),i=s=>{if(!A7e(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{A7e(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Yle=(e,t)=>t?e===t?!0:Yle(e,t.parentElement):!1;var o1=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var fer=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function L7e(e){return fer.has(e.tagName)||e.tabIndex!==-1}var WN=new WeakSet;function E7e(e){return t=>{t.key==="Enter"&&e(t)}}function Zle(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var D7e=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=E7e(()=>{if(WN.has(r))return;Zle(r,"down");let o=E7e(()=>{Zle(r,"up")}),a=()=>Zle(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 O7e(e){return o1(e)&&!wW()}function Qle(e,t,r={}){let[n,o,a]=CW(e,r),i=s=>{let l=s.currentTarget;if(!O7e(s))return;WN.add(l);let c=t(l,s),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),WN.has(l)&&WN.delete(l),O7e(p)&&typeof c=="function"&&c(p,{success:m})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Yle(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),U2(s)&&(s.addEventListener("focus",c=>D7e(c,o)),!L7e(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function a1(e){return c2(e)&&"ownerSVGElement"in e}function H2(e){return a1(e)&&e.tagName==="svg"}function Jle(...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=pW(o,a,i);return t?s(n):s}var co=e=>!!(e&&e.getVelocity);var per=[...$le,Ya,Sc],ece=e=>per.find(xW(e));var SW=L(at(),1),Fy=L(at(),1);var _7e=L(at(),1),A0=(0,_7e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var tce=class extends SW.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=U2(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 B7e({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,Fy.useId)(),a=(0,Fy.useRef)(null),i=(0,Fy.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Fy.useContext)(A0);return(0,Fy.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 m=document.createElement("style");s&&(m.nonce=s);let h=n??document.head;return h.appendChild(m),m.sheet&&m.sheet.insertRule(`
396
+ `)}function aZt(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 iZt(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 L9e(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=oZt(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=aZt(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}`;iZt(i,c,s)}function E9e(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 M_=L(ue(),1);var Zt=L(fe(),1),sZt={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 lZt(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 D9e({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,M_.useState)([]),[f,p]=(0,M_.useState)(!0),m=a||u,h=i||d,g=l!==void 0?l:f,v=c||p,y=(0,M_.useMemo)(()=>e.getAllColumns().filter(P=>P.id==="select"||P.id==="actions"||P.id==="expander"?!1:P.getCanFilter()),[e]),x=()=>{let P=y[0];if(!P)return;let N={column:P.id,operator:"contains",value:""};h([...m,N])},C=(P,N)=>{let D=[...m];D[P]={...D[P],...N},h(D)},b=P=>{h(m.filter((N,D)=>D!==P))},w=()=>{h([]),e.resetColumnFilters()},S=()=>{let P=(D,E,A)=>{let z=m.find(I=>I.column===E);if(!z)return!0;let B=D.getValue(E),R=z.value;switch(z.operator){case"equals":return B===R;case"notEquals":return B!==R;case"contains":return String(B).toLowerCase().includes(String(R).toLowerCase());case"notContains":return!String(B).toLowerCase().includes(String(R).toLowerCase());case"startsWith":return String(B).toLowerCase().startsWith(String(R).toLowerCase());case"endsWith":return String(B).toLowerCase().endsWith(String(R).toLowerCase());case"greaterThan":return Number(B)>Number(R);case"lessThan":return Number(B)<Number(R);case"greaterThanOrEqual":return Number(B)>=Number(R);case"lessThanOrEqual":return Number(B)<=Number(R);case"isNull":return B==null||B==="";case"isNotNull":return B!=null&&B!=="";default:return!0}};e.resetColumnFilters(),[...new Set(m.map(D=>D.column))].forEach(D=>{let E=e.getColumn(D);E&&E.setFilterValue({custom:!0,filters:m,matchAll:g})}),m.length===0&&e.resetColumnFilters(),r(!1)};return(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)(Et,{children:t&&(0,Zt.jsx)(ie.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)(Et,{children:t&&(0,Zt.jsx)(ie.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:V("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)(bi,{className:"h-5 w-5"}),(0,Zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),m.length>0&&(0,Zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",m.length," active)"]})]}),(0,Zt.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,Zt.jsx)(nr,{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)(bt,{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)(ne,{variant:g?"primary":"outline",size:"sm",onClick:()=>v(!0),className:"flex-1",children:"Match all"}),(0,Zt.jsx)(ne,{variant:g?"outline":"primary",size:"sm",onClick:()=>v(!1),className:"flex-1",children:"Match any"})]})]}),(0,Zt.jsx)(nc,{className:"mb-6"}),s&&(0,Zt.jsxs)(Zt.Fragment,{children:[s,(0,Zt.jsx)(nc,{className:"my-6"})]}),(0,Zt.jsx)("div",{className:"space-y-4",children:m.map((P,N)=>(0,Zt.jsx)(cZt,{filter:P,columns:y,onUpdate:D=>C(N,D),onRemove:()=>b(N)},N))}),(0,Zt.jsxs)(ne,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,Zt.jsx)(ni,{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)(ne,{variant:"outline",onClick:w,disabled:m.length===0,className:"flex-1",children:[(0,Zt.jsx)(Oi,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,Zt.jsx)(ne,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]})}function cZt({filter:e,columns:t,onUpdate:r,onRemove:n}){let i=t.find(c=>c.id===e.column)?.columnDef?.meta?.filterType||"string",s=lZt(i),l=e.operator!=="isNull"&&e.operator!=="isNotNull";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:c=>r({column:c}),children:[(0,Zt.jsx)($o,{className:"flex-1",children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsx)(Wo,{children:t.map(c=>{let u=c.columnDef.header,d=typeof u=="function"?c.id:u||c.id;return(0,Zt.jsx)(Tt,{value:c.id,children:d},c.id)})})]}),(0,Zt.jsx)(ne,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,Zt.jsx)(nr,{className:"h-4 w-4"})})]}),(0,Zt.jsxs)(qo,{value:e.operator,onValueChange:c=>r({operator:c}),children:[(0,Zt.jsx)($o,{children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsx)(Wo,{children:s.map(c=>(0,Zt.jsx)(Tt,{value:c,children:sZt[c]},c))})]}),l&&(0,Zt.jsx)("div",{children:i==="boolean"?(0,Zt.jsxs)(qo,{value:String(e.value),onValueChange:c=>r({value:c==="true"}),children:[(0,Zt.jsx)($o,{children:(0,Zt.jsx)(aa,{})}),(0,Zt.jsxs)(Wo,{children:[(0,Zt.jsx)(Tt,{value:"true",children:"True"}),(0,Zt.jsx)(Tt,{value:"false",children:"False"})]})]}):i==="number"?(0,Zt.jsx)(Qt,{type:"number",value:e.value||"",onChange:c=>r({value:c.target.value}),placeholder:"Enter value..."}):(0,Zt.jsx)(Qt,{value:e.value||"",onChange:c=>r({value:c.target.value}),placeholder:"Enter value..."})})]})}var rt=L(fe(),1);function O9e({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,className:l,onRowSelect:c,onExport:u,enableExpandable:d=!1,renderSubComponent:f,expandedRows:p,onRowExpandChange:m,bulkActions:h=[],features:g={},theme:v={},texts:y={},enableSorting:x=!0,enableFiltering:C=!0,enablePagination:b=!0,enableColumnVisibility:w=!0,enableRowSelection:S,filterPlaceholder:P="Search all columns...",defaultPageSize:N,manualPagination:D=!1,pageCount:E,onPaginationChange:A,onSortingChange:z,onColumnFiltersChange:B,state:R}){let I=Cs.default.useMemo(()=>e.map(ce=>{let{enableHiding:Fe,...xt}=ce;return{...xt,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:k,isLoading:T}=Ut();if(!T&&!k)return(0,rt.jsx)(Be,{className:V("w-full",l),children:(0,rt.jsx)(Ve,{className:"py-12 text-center",children:(0,rt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,rt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,rt.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,rt.jsxs)("div",{children:[(0,rt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,rt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Data Table is available exclusively to MoonUI Pro subscribers."}),(0,rt.jsx)("div",{className:"flex gap-3 justify-center",children:(0,rt.jsx)("a",{href:"/pricing",children:(0,rt.jsxs)(ne,{size:"sm",children:[(0,rt.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[O,F]=Cs.default.useState([]),[_,M]=Cs.default.useState([]),[j,H]=Cs.default.useState({}),[q,G]=Cs.default.useState({}),[U,K]=Cs.default.useState(""),[Y,Z]=Cs.default.useState(!1),[ae,oe]=Cs.default.useState(new Set),[Ae,Se]=Cs.default.useState(!1),Ue=p||ae,me=m?ce=>m(ce):oe,Pe=N||s,ve=Cs.default.useMemo(()=>t,[t]),pe=w8e({data:ve,columns:I,onSortingChange:z!==void 0?z:F,onColumnFiltersChange:B!==void 0?B:M,getCoreRowModel:v8e(),getPaginationRowModel:x8e(),getSortedRowModel:b8e(),getFilteredRowModel:y8e(),onColumnVisibilityChange:H,onRowSelectionChange:G,onGlobalFilterChange:K,globalFilterFn:"includesString",filterFns:{custom:(ce,Fe,xt)=>{if(!xt?.custom||!xt?.filters)return!0;let An=xt.filters,Ge=xt.matchAll!==void 0?xt.matchAll:!0,We=An.map(xe=>{let nt=ce.getValue(xe.column),mt=xe.value;switch(xe.operator){case"equals":return nt===mt;case"notEquals":return nt!==mt;case"contains":return String(nt).toLowerCase().includes(String(mt).toLowerCase());case"notContains":return!String(nt).toLowerCase().includes(String(mt).toLowerCase());case"startsWith":return String(nt).toLowerCase().startsWith(String(mt).toLowerCase());case"endsWith":return String(nt).toLowerCase().endsWith(String(mt).toLowerCase());case"greaterThan":return Number(nt)>Number(mt);case"lessThan":return Number(nt)<Number(mt);case"greaterThanOrEqual":return Number(nt)>=Number(mt);case"lessThanOrEqual":return Number(nt)<=Number(mt);case"isNull":return nt==null||nt==="";case"isNotNull":return nt!=null&&nt!=="";default:return!0}});return Ge?We.every(xe=>xe):We.some(xe=>xe)}},manualPagination:D,pageCount:E,state:{sorting:R?.sorting??O,columnFilters:R?.columnFilters??_,columnVisibility:R?.columnVisibility??j,rowSelection:R?.rowSelection??q,globalFilter:R?.globalFilter??U,...R||{}},initialState:{pagination:{pageSize:Pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:ce=>ce.id||ce.orderId||Math.random().toString()});Cs.default.useEffect(()=>{if(c&&a){let ce=pe.getFilteredSelectedRowModel().rows.map(Fe=>Fe.original);c(ce)}},[q,c,a,pe]);let $=pe.getState(),J=pe.getRowModel(),re=Cs.default.useRef(J.rows),Le=Cs.default.useMemo(()=>{let ce=re.current!==J.rows;return ce&&(re.current=J.rows),ce},[J.rows]),Ie=re.current,we={sorting:g.sorting!==!1,filtering:g.filtering!==!1||n,pagination:g.pagination!==!1||i,search:g.search!==!1||r,columnVisibility:g.columnVisibility!==!1,rowSelection:g.rowSelection!==!1||a,export:g.export!==!1||o},te=async ce=>{let Fe=pe.getFilteredSelectedRowModel().rows,xt=Fe.length>0?Fe.map(We=>We.original):pe.getFilteredRowModel().rows.map(We=>We.original);if(typeof o=="object"&&o.onExport){o.onExport(xt,ce);return}if(u){u(xt);return}let An=typeof o=="object"&&o.filename?o.filename:"data-export",Ge=E9e(I,j);await L9e(xt,{format:ce,filename:An,columns:Ge,includeHeaders:!0})},ye=Cs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Ne=()=>{pe.resetRowSelection()};return(0,rt.jsxs)("div",{className:V("moonui-pro-datatable-container flex flex-col gap-4",l),children:[(0,rt.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex items-center justify-between",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,rt.jsxs)("div",{className:"relative",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Vo,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,rt.jsx)(Qt,{placeholder:P,value:U,onChange:ce=>K(ce.target.value),className:"pl-8 w-64"})]}),n&&(0,rt.jsxs)(ne,{variant:"outline",size:"sm",onClick:()=>Se(!0),children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(bi,{className:"mr-2 h-4 w-4"})}),"Filters",_.length>0&&(0,rt.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:_.length})]}),a&&h.length>0&&(0,rt.jsx)(A9e,{selectedRows:pe.getFilteredSelectedRowModel().rows.map(ce=>ce.original),actions:h,onClearSelection:Ne})]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[o&&ye.length>0&&(0,rt.jsxs)(Cr,{children:[(0,rt.jsx)(Sr,{asChild:!0,children:(0,rt.jsxs)(ne,{variant:"outline",size:"sm",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(sn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,rt.jsxs)(vr,{align:"end",children:[ye.includes("csv")&&(0,rt.jsxs)(_e,{onClick:()=>te("csv"),children:[(0,rt.jsx)(tv,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ye.includes("json")&&(0,rt.jsxs)(_e,{onClick:()=>te("json"),children:[(0,rt.jsx)(pw,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ye.includes("xlsx")&&(0,rt.jsxs)(_e,{onClick:()=>te("xlsx"),children:[(0,rt.jsx)(WT,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,rt.jsx)(C8e,{table:pe})]})]}),(0,rt.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,rt.jsx)("div",{style:{overflowX:"auto"},children:(0,rt.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,rt.jsx)("thead",{className:"moonui-data-table-header",children:pe.getHeaderGroups().map(ce=>(0,rt.jsx)("tr",{className:"moonui-data-table-row border-b",children:ce.headers.filter(Fe=>Fe.column.getIsVisible()).map(Fe=>(0,rt.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:Fe.isPlaceholder?null:(0,rt.jsxs)("div",{className:V("flex items-center space-x-2",Fe.column.getCanSort()&&"cursor-pointer select-none"),onClick:Fe.column.getToggleSortingHandler(),children:[yse(Fe.column.columnDef.header,Fe.getContext()),Fe.column.getCanSort()&&(0,rt.jsx)("div",{className:"ml-2",children:Fe.column.getIsSorted()==="asc"?(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(ev,{className:"h-4 w-4"})}):Fe.column.getIsSorted()==="desc"?(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Qg,{className:"h-4 w-4"})}):(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Jg,{className:"h-4 w-4"})})})]})},Fe.id))},ce.id))}),(0,rt.jsx)("tbody",{className:"moonui-data-table-body",children:Y?(0,rt.jsx)(ie.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,rt.jsx)("td",{colSpan:pe.getAllLeafColumns().filter(ce=>ce.getIsVisible()).length,className:"h-24 text-center",children:(0,rt.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(wr,{className:"h-4 w-4 animate-spin"})}),(0,rt.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ie?.length?(0,rt.jsx)(rt.Fragment,{children:Ie.map((ce,Fe)=>{let xt=ce.original.id||ce.id,An=d&&Ue.has(xt);return(0,rt.jsx)(_9e,{row:ce,columns:I,isExpanded:An,enableExpandable:d,renderSubComponent:f,visibilityState:pe.getState().columnVisibility},xt)})}):(0,rt.jsx)(ie.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,rt.jsx)("td",{colSpan:pe.getAllLeafColumns().filter(ce=>ce.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,rt.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,rt.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&pe.getFilteredSelectedRowModel().rows.length>0&&(0,rt.jsxs)("span",{children:[pe.getFilteredSelectedRowModel().rows.length," of"," ",pe.getFilteredRowModel().rows.length," row(s) selected."]})}),(0,rt.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,rt.jsx)("select",{value:pe.getState().pagination.pageSize,onChange:async ce=>{Z(!0),await new Promise(Fe=>setTimeout(Fe,300)),pe.setPageSize(Number(ce.target.value)),Z(!1)},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:Y,children:[10,20,30,40,50].map(ce=>(0,rt.jsx)("option",{value:ce,children:ce},ce))})]}),(0,rt.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",pe.getState().pagination.pageIndex+1," of"," ",pe.getPageCount()]}),(0,rt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,rt.jsx)(ne,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{A?A({pageIndex:0,pageSize:pe.getState().pagination.pageSize}):(Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.setPageIndex(0),Z(!1))},disabled:!pe.getCanPreviousPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(UT,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(A){let ce=pe.getState().pagination.pageIndex;A({pageIndex:ce-1,pageSize:pe.getState().pagination.pageSize})}else Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.previousPage(),Z(!1)},disabled:!pe.getCanPreviousPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(ea,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.nextPage(),Z(!1)},disabled:!pe.getCanNextPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(Dn,{className:"h-4 w-4"})})}),(0,rt.jsx)(ne,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{Z(!0),await new Promise(ce=>setTimeout(ce,300)),pe.setPageIndex(pe.getPageCount()-1),Z(!1)},disabled:!pe.getCanNextPage()||Y,children:(0,rt.jsx)("span",{suppressHydrationWarning:!0,children:(0,rt.jsx)(HT,{className:"h-4 w-4"})})})]})]})]}),n&&(0,rt.jsx)(D9e,{table:pe,open:Ae,onOpenChange:Se})]})}function uZt(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,rt.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,rt.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,rt.jsx)(Bo,{className:"h-4 w-4 text-muted-foreground"}):(0,rt.jsx)(Dn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function dZt(e=new Set){let[t,r]=Cs.default.useState(e),n=Cs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=Cs.default.useCallback(i=>{r(new Set(i))},[]),a=Cs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var _9e=Cs.default.memo(({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)("tr",{className:V("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,rt.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:yse(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,rt.jsx)("tr",{className:"border-b",children:(0,rt.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,rt.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,rt.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})},(e,t)=>{let r=e.row.original.id||e.row.id,n=t.row.original.id||t.row.id,o=Object.keys(e.visibilityState).sort().join(","),a=Object.keys(t.visibilityState).sort().join(","),i=Object.values(e.visibilityState).join(","),s=Object.values(t.visibilityState).join(",");return r===n&&e.isExpanded===t.isExpanded&&e.row.getIsSelected()===t.row.getIsSelected()&&o===a&&i===s});_9e.displayName="TableRow";var fZt=O9e;var vn=L(ue(),1);var $e=L(fe(),1),rle=vn.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,vn.useState)(r||""),s=(0,vn.useRef)(void 0);(0,vn.useEffect)(()=>{i(r)},[r]);let l=(0,vn.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,vn.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,$e.jsx)("div",{className:"p-4 border-b",children:(0,$e.jsxs)("div",{className:"relative",children:[(0,$e.jsx)(Vo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,$e.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,$e.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,$e.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});rle.displayName="SearchInput";function pZt({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:m,glassmorphism:h=!1,animatedBackground:g=!1,keyboardShortcuts:v=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:C,customStyles:b,fullWidthItems:w=!0,className:S,activePath:P,onNavigate:N}){let[D,E]=(0,vn.useState)(!1),[A,z]=(0,vn.useState)(!1),[B,R]=(0,vn.useState)(d),[I,k]=(0,vn.useState)([]),[T,O]=(0,vn.useState)(o),[F,_]=(0,vn.useState)([]),M=(0,vn.useRef)(null),j=xa(0),H=xa(0),q=xh(j,{stiffness:300,damping:30}),G=xh(H,{stiffness:300,damping:30});(0,vn.useEffect)(()=>{if(y&&typeof window<"u"){let $=localStorage.getItem(x);if($){let J=JSON.parse($);R(J.collapsed),k(J.expandedSections),_(J.pinnedItems||[])}}},[y,x]),(0,vn.useEffect)(()=>{if(y&&typeof window<"u"){let $={collapsed:B,expandedSections:I,searchQuery:T,pinnedItems:F,recentItems:[]};localStorage.setItem(x,JSON.stringify($)),C?.($)}},[B,I,T,F,y,x,C]),(0,vn.useEffect)(()=>{let $=()=>{E(window.innerWidth<768)};return $(),window.addEventListener("resize",$),()=>window.removeEventListener("resize",$)},[]),(0,vn.useEffect)(()=>{let $=e.filter(J=>J.defaultExpanded!==!1).map(J=>J.id);k($)},[e]),(0,vn.useEffect)(()=>{if(!v)return;let $=J=>{(J.metaKey||J.ctrlKey)&&J.key==="k"&&(J.preventDefault(),M.current?.focus()),(J.metaKey||J.ctrlKey)&&J.key==="b"&&(J.preventDefault(),D?z(!A):R(!B))};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[v,D,A,B]),(0,vn.useEffect)(()=>{if(!g)return;let $=J=>{let re=document.querySelector(".sidebar-container")?.getBoundingClientRect();re&&(j.set(J.clientX-re.left),H.set(J.clientY-re.top))};return document.addEventListener("mousemove",$),()=>document.removeEventListener("mousemove",$)},[g,j,H]);let U=(0,vn.useCallback)($=>{k(J=>J.includes($)?J.filter(re=>re!==$):[...J,$])},[]),K=(0,vn.useCallback)($=>{_(J=>J.includes($)?J.filter(re=>re!==$):[...J,$])},[]),Y=(0,vn.useCallback)($=>{$.action?$.action():$.href&&N&&(N($.href),D&&z(!1))},[N,D]);(0,vn.useEffect)(()=>{O(o)},[o]);let Z=(0,vn.useCallback)($=>{O($),a?.($)},[a]),ae=(0,vn.useCallback)(($,J)=>J?$.filter(re=>{let Le=re.title.toLowerCase().includes(J.toLowerCase()),Ie=re.items?.some(we=>we.title.toLowerCase().includes(J.toLowerCase()));return Le||Ie}):$,[]),oe=(0,vn.useMemo)(()=>T?e.map($=>({...$,filteredItems:ae($.items,T).map(J=>({...J,filteredChildren:J.items?ae(J.items,T):void 0}))})).filter($=>$.filteredItems.length>0):e.map($=>({...$,filteredItems:$.items.map(J=>({...J,filteredChildren:J.items}))})),[e,T,ae]),Ae=(0,vn.useCallback)($=>{let J=$.items&&$.items.length>0;return!J&&!$.title?null:(0,$e.jsxs)("div",{className:V("min-w-[200px] p-2",h&&"bg-background/95 backdrop-blur-sm"),children:[(0,$e.jsx)("div",{className:"font-medium px-2 py-1 text-sm",children:$.title}),J&&(0,$e.jsx)("div",{className:"mt-1 space-y-0.5",children:$.items?.map(re=>{let Le=re.href===P,Ie=re.items&&re.items.length>0;return(0,$e.jsx)("div",{className:"relative",children:Ie?(0,$e.jsxs)(iE,{openDelay:200,closeDelay:100,children:[(0,$e.jsx)(sE,{asChild:!0,children:(0,$e.jsxs)("button",{onClick:()=>Y(re),disabled:re.disabled,className:V("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",Le&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[re.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,$e.jsx)("span",{className:"truncate",children:re.title})]}),(0,$e.jsx)(Dn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,$e.jsx)(UI,{side:"right",align:"start",sideOffset:10,className:V("p-2",h&&"bg-background/95 backdrop-blur-sm"),children:(0,$e.jsx)("div",{className:"space-y-0.5",children:re.items?.map(we=>{let te=we.href===P;return(0,$e.jsxs)("button",{onClick:()=>Y(we),disabled:we.disabled,className:V("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",te&&"bg-primary/10 text-primary font-medium",we.disabled&&"opacity-50 cursor-not-allowed"),children:[we.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:we.icon}),(0,$e.jsx)("span",{className:"truncate",children:we.title}),we.badge&&(0,$e.jsx)(Ot,{variant:we.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:we.badge})]},we.id)})})})]}):(0,$e.jsxs)("button",{onClick:()=>Y(re),disabled:re.disabled,className:V("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",Le&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,$e.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,$e.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,$e.jsx)(Ot,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]})},re.id)})})]})},[P,h,Y]),Se=(0,vn.useCallback)(($,J=0,re)=>{let Le=$.href===P,Ie=F.includes($.id),we=$.items&&$.items.length>0,te=I.includes($.id),ye=B&&!D&&J===0&&(we||$.title),Ne=$.tooltip&&!B&&!ye,ce=(0,$e.jsxs)("button",{onClick:()=>{we?U($.id):Y($)},className:V("flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all",w?"w-[calc(100%-1.5rem)] mx-3":"w-full","hover:bg-accent hover:text-accent-foreground",Le&&"bg-primary/10 text-primary font-medium",$.disabled&&"opacity-50 cursor-not-allowed",J>0&&"ml-6 text-xs",B&&J===0&&"justify-center px-2",b?.hover),disabled:$.disabled,children:[$.icon&&(0,$e.jsx)("span",{className:V("flex-shrink-0",B&&J===0&&"mx-auto"),children:$.icon}),(!B||J>0)&&(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)("span",{className:"flex-1 text-left truncate",children:$.title}),$.badge&&(0,$e.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:$.badge}),we&&J===0&&(0,$e.jsx)(Bo,{className:V("h-4 w-4 flex-shrink-0 transition-transform",te&&"rotate-180")}),Ie&&(0,$e.jsx)(bA,{className:"h-3 w-3 flex-shrink-0"})]})]});return ye?(0,$e.jsx)("div",{children:(0,$e.jsxs)(iE,{openDelay:200,closeDelay:100,children:[(0,$e.jsx)(sE,{asChild:!0,children:ce}),(0,$e.jsx)(UI,{side:"right",align:"start",sideOffset:10,className:V("p-0 w-auto",h&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95"),children:(0,$e.jsx)(ie.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.15},children:Ae($)})})]})},$.id):(0,$e.jsxs)("div",{children:[Ne?(0,$e.jsx)($f,{children:(0,$e.jsxs)(_d,{children:[(0,$e.jsx)(Fd,{asChild:!0,children:ce}),(0,$e.jsx)(Ou,{side:"right",children:(0,$e.jsx)("p",{children:$.tooltip})})]})}):ce,we&&!B&&re&&(0,$e.jsx)(Et,{children:te&&(0,$e.jsx)(ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,$e.jsx)("div",{className:"pt-1 space-y-1",children:re.map(Fe=>Se(Fe,J+1))})})})]},$.id)},[P,F,I,B,b,Y,U,D,h,Ae,w]),Ue=vn.default.memo(()=>(0,$e.jsxs)("div",{className:V("flex items-center gap-3 p-4 border-b",B&&!D&&"justify-center px-2"),children:[c&&(0,$e.jsxs)($e.Fragment,{children:[c.logo,(!B||D)&&c.title&&(0,$e.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),D&&(0,$e.jsx)(ne,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>z(!1),children:(0,$e.jsx)(nr,{className:"h-4 w-4"})}),!D&&u&&(0,$e.jsx)(ne,{variant:"ghost",size:"sm",className:V("h-8 w-8 p-0",!B&&"ml-auto"),onClick:()=>R(!B),children:B?(0,$e.jsx)(Dn,{className:"h-4 w-4"}):(0,$e.jsx)(ea,{className:"h-4 w-4"})})]})),me=vn.default.memo(()=>(0,$e.jsx)(rc,{className:"flex-1 overflow-y-auto",children:(0,$e.jsxs)("div",{className:"p-4 space-y-6",children:[F.length>0&&(!B||D)&&(0,$e.jsxs)("div",{children:[(0,$e.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,$e.jsx)("div",{className:"space-y-1",children:e.flatMap($=>$.items.filter(J=>F.includes(J.id))).map($=>Se($))}),(0,$e.jsx)(nc,{className:"mt-4"})]}),oe.map(($,J)=>(0,$e.jsxs)("div",{children:[$.title&&(!B||D)&&(0,$e.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:$.title}),(0,$e.jsx)("div",{className:"space-y-1",children:$.filteredItems.map(re=>Se(re,0,re.filteredChildren))}),$.showDivider&&J<oe.length-1&&(0,$e.jsx)(nc,{className:"mt-4"})]},$.id))]})})),Pe=vn.default.memo(()=>t?(0,$e.jsxs)("div",{className:"border-t p-4",children:[(0,$e.jsx)("div",{className:"space-y-1",children:t.items.map($=>Se($))}),i&&(!B||D)&&(0,$e.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,$e.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,$e.jsxs)(Cr,{children:[(0,$e.jsx)(Sr,{asChild:!0,children:(0,$e.jsxs)(ne,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,$e.jsx)(sv,{className:"h-3 w-3"}),s==="dark"&&(0,$e.jsx)(ov,{className:"h-3 w-3"}),s==="system"&&(0,$e.jsx)(Lf,{className:"h-3 w-3"})]})}),(0,$e.jsxs)(vr,{align:"end",children:[(0,$e.jsxs)(_e,{onClick:()=>l?.("light"),children:[(0,$e.jsx)(sv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,$e.jsxs)(_e,{onClick:()=>l?.("dark"),children:[(0,$e.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,$e.jsxs)(_e,{onClick:()=>l?.("system"),children:[(0,$e.jsx)(Lf,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null),ve=vn.default.memo(()=>(0,$e.jsxs)($e.Fragment,{children:[(0,$e.jsx)(me,{}),(0,$e.jsx)(Pe,{})]})),pe=V("moonui-pro flex h-full flex-col bg-background border-r",h&&"bg-background/80 backdrop-blur-xl border-white/10",B&&!D&&"w-16",!B&&!D&&"w-64",b?.background,b?.border,S);return D?(0,$e.jsxs)($e.Fragment,{children:[f&&(0,$e.jsx)(ne,{onClick:()=>z(!0),className:V("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",m),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,$e.jsx)(Af,{className:"h-5 w-5"})}),(0,$e.jsx)(gb,{open:A,onOpenChange:z,children:(0,$e.jsx)(Ov,{side:"left",className:"w-80 p-0",children:(0,$e.jsxs)("div",{className:V(pe,"sidebar-container flex flex-col"),children:[g&&(0,$e.jsx)(ie.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${G}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,$e.jsx)(Ue,{}),r&&(!B||D)&&(0,$e.jsx)(rle,{searchInputRef:M,searchPlaceholder:n,initialValue:T,onSearchChange:Z,keyboardShortcuts:v},"sidebar-search-mobile"),(0,$e.jsx)(ve,{})]})})})]}):(0,$e.jsxs)("aside",{className:V(pe,"sidebar-container hidden md:flex flex-col"),children:[g&&(0,$e.jsx)(ie.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${G}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,$e.jsx)(Ue,{}),r&&(!B||D)&&(0,$e.jsx)(rle,{searchInputRef:M,searchPlaceholder:n,initialValue:T,onSearchChange:Z,keyboardShortcuts:v},"sidebar-search-desktop"),(0,$e.jsx)(ve,{})]})}function F9e(e){let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,$e.jsx)(Be,{className:V("w-full max-w-xs",e.className),children:(0,$e.jsx)(Ve,{className:"py-12 text-center",children:(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,$e.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,$e.jsxs)("div",{children:[(0,$e.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,$e.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Advanced Sidebar is available exclusively to MoonUI Pro subscribers."}),(0,$e.jsx)("a",{href:"/pricing",children:(0,$e.jsxs)(ne,{size:"sm",children:[(0,$e.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,$e.jsx)(pZt,{...e})}var mZt=F9e;var qi=L(ue(),1);var De=L(fe(),1);function hZt({sections:e,branding:t,showSearch:r=!0,searchPlaceholder:n="Search...",onSearch:o,showThemeToggle:a=!1,theme:i="system",onThemeChange:s,userMenu:l,notifications:c,cta:u,sticky:d=!0,glassmorphism:f=!1,animatedBackground:p=!1,keyboardShortcuts:m=!0,mobileBreakpoint:h=768,customStyles:g,variant:v="default",size:y="md",blur:x=!0,shadow:C=!1,rounded:b=!1,logoPosition:w="left",mobileMenuPosition:S="left",hideOnScroll:P=!1,showScrollProgress:N=!1,maxWidth:D="2xl",className:E,activePath:A,onNavigate:z}){let[B,R]=(0,qi.useState)(!1),[I,k]=(0,qi.useState)(!1),[T,O]=(0,qi.useState)(!1),[F,_]=(0,qi.useState)(!1),[M,j]=(0,qi.useState)(""),[H,q]=(0,qi.useState)(!1),[G,U]=(0,qi.useState)(!1),[K,Y]=(0,qi.useState)(0),Z=(0,qi.useRef)(0),ae=(0,qi.useRef)(null);(0,qi.useEffect)(()=>{let pe=()=>{R(window.innerWidth<h)};return pe(),window.addEventListener("resize",pe),()=>window.removeEventListener("resize",pe)},[h]),(0,qi.useEffect)(()=>{if(!d&&!P&&!N)return;let pe=()=>{let $=window.scrollY;if(q($>10),P&&($>Z.current&&$>100?U(!0):U(!1),Z.current=$),N){let J=window.scrollY,re=document.documentElement.scrollHeight-document.documentElement.clientHeight,Le=J/re*100;Y(Le)}};return window.addEventListener("scroll",pe,{passive:!0}),()=>window.removeEventListener("scroll",pe)},[d,P,N]),(0,qi.useEffect)(()=>{if(!m)return;let pe=$=>{($.metaKey||$.ctrlKey)&&$.key==="k"&&($.preventDefault(),_(!0))};return document.addEventListener("keydown",pe),()=>document.removeEventListener("keydown",pe)},[m]);let oe=(0,qi.useCallback)(pe=>{pe.action?pe.action():pe.href&&z&&(z(pe.href),B&&k(!1))},[z,B]),Ae=(0,qi.useCallback)(pe=>{j(pe),o?.(pe)},[o]),Se=pe=>(0,De.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:pe.map($=>(0,De.jsxs)(hE,{className:V("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",$.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!$.disabled&&oe($),children:[(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{className:"flex-shrink-0",children:$.icon}),(0,De.jsx)("div",{className:"text-sm font-medium leading-none",children:$.title}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]}),$.description&&(0,De.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:$.description})]},$.id))}),Ue=pe=>(0,De.jsx)(De.Fragment,{children:pe.map($=>$.items&&$.items.length>0?(0,De.jsxs)(_u,{children:[(0,De.jsx)(Uc,{disabled:$.disabled,children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})}),(0,De.jsx)(Hc,{children:Ue($.items)})]},$.id):(0,De.jsxs)(_e,{disabled:$.disabled,onClick:()=>oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]},$.id))}),me=()=>(0,De.jsxs)(gb,{open:I,onOpenChange:k,children:[(0,De.jsx)(Bz,{asChild:!0,children:(0,De.jsx)(ne,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,De.jsx)(Af,{className:"h-5 w-5"})})}),(0,De.jsx)(Ov,{side:S,className:"w-80 p-0",children:(0,De.jsxs)("div",{className:"flex h-full flex-col",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,De.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,De.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,De.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>k(!1),className:"h-8 w-8",children:(0,De.jsx)(nr,{className:"h-4 w-4"})})]}),(0,De.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:e.map(pe=>(0,De.jsxs)("div",{className:"space-y-1",children:[pe.items.map($=>(0,De.jsx)("div",{children:$.items&&$.items.length>0?(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",className:"w-full justify-between",disabled:$.disabled,children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),(0,De.jsx)(Bo,{className:"h-4 w-4"})]})}),(0,De.jsx)(vr,{align:"start",className:"w-56",children:$.items&&Ue($.items)})]}):(0,De.jsxs)(ne,{variant:"ghost",className:"w-full justify-start",disabled:$.disabled,onClick:()=>oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-auto",children:$.badge})]})},$.id)),(0,De.jsx)(nc,{className:"my-2"})]},pe.id))})]})})]}),Pe=()=>{switch(y){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ve=V("moonui-pro w-full transition-all duration-300",v==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",v==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",v==="minimal"&&"bg-background",v==="transparent"&&"bg-transparent",d&&"sticky top-0 z-50",H&&d&&v!=="transparent"&&"shadow-sm",H&&v==="transparent"&&"bg-background/95 backdrop-blur border-b",G&&"-translate-y-full",f&&"bg-background/80 backdrop-blur-xl border-white/10",x&&"backdrop-blur-md",C&&"shadow-lg",b&&"rounded-lg",g?.background,g?.border,E);return(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("nav",{ref:ae,className:ve,children:[(0,De.jsxs)("div",{className:V("flex items-center",Pe(),D==="sm"&&"container max-w-screen-sm",D==="md"&&"container max-w-screen-md",D==="lg"&&"container max-w-screen-lg",D==="xl"&&"container max-w-screen-xl",D==="2xl"&&"container max-w-screen-2xl",D==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,De.jsxs)("div",{className:V("flex items-center gap-2",w==="center"&&!B?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[w==="left"&&S==="left"&&(0,De.jsx)(me,{}),(0,De.jsxs)("a",{href:t.href||"/",onClick:pe=>{t.href&&z&&(pe.preventDefault(),z(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!B&&(0,De.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!B&&(0,De.jsx)(cE,{className:"hidden md:flex",children:(0,De.jsx)(uE,{children:e.map(pe=>(0,De.jsx)(qi.default.Fragment,{children:pe.items.map($=>{let J=$.items&&$.items.length>0,re=$.href===A;return J?(0,De.jsxs)(dE,{children:[(0,De.jsx)(pE,{className:V(re&&"bg-accent text-accent-foreground",$.disabled&&"opacity-50 cursor-not-allowed"),disabled:$.disabled,children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})}),(0,De.jsx)(mE,{children:$.items&&Se($.items)})]},$.id):(0,De.jsx)(dE,{children:(0,De.jsxs)(hE,{className:V(fE(),re&&"bg-accent text-accent-foreground",$.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!$.disabled&&oe($),children:[(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]}),$.badge&&(0,De.jsx)(Ot,{variant:$.badgeVariant||"secondary",className:"ml-2",children:$.badge})]})},$.id)})},pe.id))})}),(0,De.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,De.jsx)(De.Fragment,{children:B?(0,De.jsx)(ne,{variant:"ghost",size:"icon",onClick:()=>_(!0),children:(0,De.jsx)(Vo,{className:"h-5 w-5"})}):(0,De.jsxs)("div",{className:"relative",children:[(0,De.jsx)(Vo,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,De.jsx)(Qt,{type:"search",placeholder:n,className:"w-64 pl-9 pr-4 h-9",value:M,onChange:pe=>Ae(pe.target.value)}),m&&(0,De.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,De.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})}),a&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",size:"icon",children:[i==="light"&&(0,De.jsx)(sv,{className:"h-5 w-5"}),i==="dark"&&(0,De.jsx)(ov,{className:"h-5 w-5"}),i==="system"&&(0,De.jsx)(Lf,{className:"h-5 w-5"})]})}),(0,De.jsxs)(vr,{align:"end",children:[(0,De.jsxs)(_e,{onClick:()=>s?.("light"),children:[(0,De.jsx)(sv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,De.jsxs)(_e,{onClick:()=>s?.("dark"),children:[(0,De.jsx)(ov,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,De.jsxs)(_e,{onClick:()=>s?.("system"),children:[(0,De.jsx)(Lf,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),c&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsxs)(ne,{variant:"ghost",size:"icon",className:"relative",children:[(0,De.jsx)(ih,{className:"h-5 w-5"}),c.count&&c.count>0&&(0,De.jsx)("span",{className:"absolute -top-1 -right-1 h-4 w-4 rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground flex items-center justify-center",children:c.count})]})}),(0,De.jsxs)(vr,{align:"end",className:"w-80",children:[(0,De.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,De.jsx)("h4",{className:"text-sm font-semibold",children:"Notifications"}),c.count&&c.count>0&&(0,De.jsxs)(Ot,{variant:"secondary",children:[c.count," new"]})]}),(0,De.jsx)(Vr,{}),(0,De.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:c.items&&c.items.length>0?c.items.map(pe=>(0,De.jsxs)(_e,{className:"flex flex-col items-start p-4 cursor-pointer",onClick:()=>c.onNotificationClick?.(pe.id),children:[(0,De.jsxs)("div",{className:"flex w-full items-start justify-between",children:[(0,De.jsx)("p",{className:V("text-sm font-medium",!pe.read&&"text-primary"),children:pe.title}),!pe.read&&(0,De.jsx)("span",{className:"h-2 w-2 rounded-full bg-primary"})]}),pe.description&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:pe.description}),pe.time&&(0,De.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:pe.time})]},pe.id)):(0,De.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No notifications"})})]})]}),u&&(0,De.jsx)(ne,{variant:u.variant||"primary",size:"sm",onClick:()=>{u.action?u.action():u.href&&z&&z(u.href)},className:B?"":"ml-2",children:u.text}),l&&(0,De.jsxs)(Cr,{children:[(0,De.jsx)(Sr,{asChild:!0,children:(0,De.jsx)(ne,{variant:"ghost",size:"icon",className:"relative",children:(0,De.jsxs)(va,{className:"h-8 w-8",children:[(0,De.jsx)(Ci,{src:l.user?.avatar,alt:l.user?.name}),(0,De.jsx)(Va,{children:l.user?.name?.charAt(0)||(0,De.jsx)(Df,{className:"h-4 w-4"})})]})})}),(0,De.jsxs)(vr,{align:"end",className:"w-56",children:[l.user&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsxs)("div",{className:"p-2",children:[(0,De.jsx)("p",{className:"text-sm font-medium",children:l.user.name}),(0,De.jsx)("p",{className:"text-xs text-muted-foreground",children:l.user.email})]}),(0,De.jsx)(Vr,{})]}),l.items&&Ue(l.items)]})]})]})]}),p&&(0,De.jsx)(ie.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"}}),N&&(0,De.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,De.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${K}%`}})})]}),(0,De.jsxs)(FL,{open:F,onOpenChange:_,children:[(0,De.jsx)(Nh,{placeholder:n,value:M,onValueChange:Ae}),(0,De.jsxs)(RI,{children:[(0,De.jsx)(Mh,{children:"No results found."}),e.map(pe=>(0,De.jsx)(Th,{children:pe.items.map($=>(0,De.jsx)(Ah,{disabled:$.disabled,onSelect:()=>{oe($),_(!1)},children:(0,De.jsxs)("span",{className:"flex items-center gap-2",children:[$.icon&&(0,De.jsx)("span",{children:$.icon}),$.title]})},$.id))},pe.id))]})]})]})}function B9e(e){let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,De.jsx)(Be,{className:V("w-full",e.className),children:(0,De.jsx)(Ve,{className:"py-8 text-center",children:(0,De.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,De.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,De.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,De.jsxs)("div",{children:[(0,De.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,De.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Advanced Navbar is available exclusively to MoonUI Pro subscribers."}),(0,De.jsx)("a",{href:"/pricing",children:(0,De.jsxs)(ne,{size:"sm",children:[(0,De.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,De.jsx)(hZt,{...e})}var gZt=B9e;var nle=L(ue(),1);var Ka=L(ue(),1),U9e=L(fe(),1),V9e=(0,Ka.createContext)(null),g0=()=>{let e=(0,Ka.useContext)(V9e);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},z9e=({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,m]=(0,Ka.useState)(r),[h,g]=(0,Ka.useState)({}),[v,y]=(0,Ka.useState)(new Set),[x,C]=(0,Ka.useState)(!1),[b,w]=(0,Ka.useState)(null);(0,Ka.useEffect)(()=>{if(d&&typeof window<"u"){let k=localStorage.getItem(f);if(k)try{let T=JSON.parse(k);g(T.stepData||{}),m(T.currentStep||0),y(new Set(T.completedSteps||[]))}catch(T){console.error("Failed to load persisted wizard data:",T)}}},[d,f]),(0,Ka.useEffect)(()=>{if(!l||!u)return;let k=setTimeout(()=>{let T=h[t[p].id];T&&u(t[p].id,T)},c);return()=>clearTimeout(k)},[h,p,l,c,u,t]),(0,Ka.useEffect)(()=>{if(d&&typeof window<"u"){let k={stepData:h,currentStep:p,completedSteps:Array.from(v)};localStorage.setItem(f,JSON.stringify(k))}},[h,p,v,d,f]);let S=(0,Ka.useCallback)(async()=>{let k=t[p];if(k.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(k.requiredFields)){let F=[];if(k.requiredFields.forEach(_=>{let M=O.querySelector(`[name="${_}"], [id="${_}"]`);if(M){let j=M;M.tagName==="INPUT"&&M.type==="checkbox"?M.checked||F.push(_):(!j.value||j.value.trim()==="")&&F.push(_)}}),F.length>0)return w(`Please fill in the following required fields: ${F.join(", ")}`),!1}else{let F=O.querySelectorAll("input[required], select[required], textarea[required]"),_=[];if(F.forEach(j=>{let H=j;if(!H.value||H.value.trim()===""){let q=document.querySelector(`label[for="${H.id}"]`),G=q?q.textContent?.replace(" *","")||"Field":H.name||H.id||"Field";_.push(G)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let H=j;if(!H.checked){let q=document.querySelector(`label[for="${H.id}"]`),G=q?q.textContent?.replace(" *","")||"Checkbox":H.name||H.id||"Checkbox";_.push(G)}}),_.length>0)return w(`Please fill in the following required fields: ${_.join(", ")}`),!1}}if(!k.validation)return!0;C(!0),w(null);try{let O=await k.validation();if(typeof O=="boolean")return O||w("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let F=O;return F.isValid||(F.error?w(F.error):F.errors&&Array.isArray(F.errors)?w(F.errors.join(", ")):w("Please complete all required fields before proceeding")),F.isValid}return w("Invalid validation response"),!1}catch(O){return w(O instanceof Error?O.message:"Validation failed"),!1}finally{C(!1)}},[p,t]),P=(0,Ka.useCallback)((k,T)=>{g(O=>({...O,[k]:{...O[k],...T}})),w(null)},[]),N=(0,Ka.useCallback)(async k=>{if(k<0||k>=t.length||k===p)return;let T=t[k];if((typeof T.isDisabled=="function"?T.isDisabled(p,t):T.isDisabled)||a&&k>p&&!await S())return;let F=t[p];F.onExit&&await F.onExit(),k>p&&y(M=>new Set([...M,p])),T.onEnter&&await T.onEnter();let _=p;m(k),n?.(k,_)},[p,t,a,S,n]),D=(0,Ka.useCallback)(()=>{N(p+1)},[p,N]),E=(0,Ka.useCallback)(()=>{i&&N(p-1)},[p,N,i]),A=(0,Ka.useCallback)(async()=>{if(await S()&&(y(T=>new Set([...T,p])),o)){C(!0);try{await o(h),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(T){w(T instanceof Error?T.message:"Failed to complete wizard")}finally{C(!1)}}},[p,h,S,o,d,f]),z=(0,Ka.useCallback)(()=>{m(0),g({}),y(new Set),w(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),B=(0,Ka.useCallback)(k=>v.has(k),[v]),R=(0,Ka.useCallback)(k=>{if(k===0||s)return!0;for(let T=0;T<k;T++)if(!v.has(T)&&!t[T].isOptional)return!1;return!0},[v,s,t]),I={steps:t,currentStep:p,stepData:h,isLoading:x,error:b,goToNext:D,goToPrevious:E,goToStep:N,updateStepData:k=>P(t[p].id,k),validateCurrentStep:S,completeWizard:A,resetWizard:z,isStepCompleted:B,isStepAccessible:R,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,U9e.jsx)(V9e.Provider,{value:I,children:e})};var mr=L(fe(),1),U6=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,mr.jsx)(xi,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,mr.jsx)(ta,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=g0();if(t==="linear")return(0,mr.jsx)("div",{className:V("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,mr.jsx)("div",{className:"relative w-full",children:(0,mr.jsx)("div",{className:V("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((m,h)=>{let g=h===u,v=d(h),y=f(h),x=g&&p,C=typeof m.icon=="function"?m.icon({isActive:g,isCompleted:v}):m.icon;return(0,mr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&C&&(0,mr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,mr.jsx)("span",{className:V("w-8 h-8 flex items-center justify-center transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:C})}),a==="top"&&C&&(0,mr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,mr.jsx)("span",{className:V("w-8 h-8 flex items-center justify-center transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:C})}),o&&(0,mr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,mr.jsx)("p",{className:V("text-sm font-semibold transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:m.title}),m.description&&(0,mr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:m.description})]}),(0,mr.jsxs)("div",{className:"relative flex items-center w-full",children:[h<c.length-1&&(0,mr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,mr.jsx)("div",{className:"h-full bg-border"}),h<u&&(0,mr.jsx)(ie.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:h*.1},style:{transformOrigin:"left"}})]}),(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.05:1},transition:{duration:.2},className:V("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",g&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",v&&!g&&"border-primary bg-primary text-primary-foreground",!g&&!v&&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:v&&!g?i:g&&s?s:C&&a==="inside"?(0,mr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:C}):n?(0,mr.jsx)("span",{className:"text-sm font-semibold",children:h+1}):(0,mr.jsx)(Nf,{className:"w-4 h-4"})})]}),(0,mr.jsx)("div",{className:"mt-3",children:(0,mr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",h+1," of ",c.length]})})]},m.id)})})}):(0,mr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,mr.jsx)(ie.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((m,h)=>{let g=h===u,v=d(h),y=f(h),x=g&&p,C=typeof m.icon=="function"?m.icon({isActive:g,isCompleted:v}):m.icon;return(0,mr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.05:1},className:V("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",g&&"border-primary bg-primary text-primary-foreground shadow-lg",v&&!g&&"border-primary bg-primary text-primary-foreground",!g&&!v&&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:v&&!g?i:g&&s?s:C?(0,mr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:C}):n?(0,mr.jsx)("span",{className:"text-sm font-semibold",children:h+1}):(0,mr.jsx)(Nf,{className:"w-4 h-4"})}),(0,mr.jsx)("div",{className:"ml-16",children:o&&(0,mr.jsxs)(mr.Fragment,{children:[(0,mr.jsx)("p",{className:V("text-sm font-semibold transition-colors",g&&"text-primary",v&&!g&&"text-primary",!g&&!v&&"text-muted-foreground"),children:m.title}),m.description&&(0,mr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:m.description})]})})]},m.id)})]})});if(t==="dots")return(0,mr.jsx)("div",{className:V("flex items-center justify-center space-x-2",e),children:c.map((m,h)=>{let g=h===u,v=d(h);return(0,mr.jsx)(ie.div,{initial:{scale:.8},animate:{scale:g?1.2:1},className:V("rounded-full transition-all duration-300",g?"w-3 h-3 bg-primary":"w-2 h-2",v&&!g&&"bg-primary/60",!g&&!v&&"bg-muted")},h)})});if(t==="circular"){let m=(u+1)/c.length*100,h=2*Math.PI*45,g=h-m/100*h;return(0,mr.jsxs)("div",{className:V("relative w-36 h-36 mx-auto",e),children:[(0,mr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,mr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,mr.jsx)(ie.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:h,initial:{strokeDashoffset:h},animate:{strokeDashoffset:g},className:"text-primary",transition:{duration:.5}})]}),(0,mr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,mr.jsxs)("div",{className:"text-center",children:[(0,mr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,mr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var H6=L(ue(),1);var v0=L(fe(),1),vZt={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:{}}},j6=({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}=g0(),[d,f]=H6.default.useState(0),p=H6.default.useRef(o);H6.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let m=n[o],h=o===0,g=o===n.length-1,v={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:h,isLastStep:g,stepData:c[m.id]||{},updateStepData:x=>l(m.id,x)},y=typeof m.content=="function"?m.content(v):m.content;return(0,v0.jsx)(Et,{mode:"wait",custom:d,children:(0,v0.jsx)(ie.div,{custom:d,variants:vZt[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:V("w-full",e),"data-wizard-step-content":!0,children:(0,v0.jsxs)("div",{className:"space-y-4",children:[u&&(0,v0.jsxs)(Rx,{variant:"error",children:[(0,v0.jsx)(Xn,{className:"h-4 w-4"}),(0,v0.jsx)(kx,{children:u})]}),y]})},o)})};var Us=L(fe(),1),q6=({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:m,goToPrevious:h,completeWizard:g}=g0(),v=u===c.length-1,y=c[u],x=()=>{i?.(),h()},C=()=>{v?(l?.(),g()):(s?.(),m())};return(0,Us.jsxs)("div",{className:V("flex items-center justify-between",e),children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsxs)(ne,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:V("transition-all duration-200",!p&&"invisible"),children:[(0,Us.jsx)(ea,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Us.jsxs)(ie.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,Us.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Us.jsx)(ne,{type:"button",onClick:C,disabled:d||!f&&!v,className:"min-w-[120px]",children:d?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(wr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):v?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(bn,{className:"w-4 h-4 mr-2"}),o]}):(0,Us.jsxs)(Us.Fragment,{children:[n,(0,Us.jsx)(Dn,{className:"w-4 h-4 ml-1"})]})})]})};var Xa=L(fe(),1),H9e=nle.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:m="top",completedStepIcon:h,activeStepIcon:g,errorStepIcon:v,className:y,progressClassName:x,navigationClassName:C,contentClassName:b,stepClassName:w,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:N,persistData:D=!1,storageKey:E="form-wizard-data"},A)=>(0,Xa.jsx)(z9e,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:N,persistData:D,storageKey:E,children:(0,Xa.jsxs)("div",{ref:A,className:V("w-full",y),children:[p&&(0,Xa.jsx)(Xa.Fragment,{children:(0,Xa.jsx)(U6,{className:V("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:m,completedStepIcon:h,activeStepIcon:g,errorStepIcon:v})}),(0,Xa.jsx)(Be,{className:V("border-0 shadow-none",b),children:(0,Xa.jsx)(Ve,{className:"p-0",children:(0,Xa.jsx)(j6,{className:w,animationType:c,animationDuration:u})})}),(0,Xa.jsx)(q6,{className:V("mt-8",C)})]})}));H9e.displayName="FormWizardInternal";var T_=nle.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ut();return!n&&!r?(0,Xa.jsx)(Be,{className:V("w-full",e.className),children:(0,Xa.jsx)(Ve,{className:"py-12 text-center",children:(0,Xa.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Xa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Xa.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Xa.jsxs)("div",{children:[(0,Xa.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Xa.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Xa.jsx)("a",{href:"/pricing",children:(0,Xa.jsxs)(ne,{size:"sm",children:[(0,Xa.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Xa.jsx)(H9e,{...e,ref:t})});T_.displayName="MoonUIFormWizardPro";var yZt=T_;var rd=L(ue(),1);var yt=L(fe(),1);function j9e(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 xZt=({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:m=!1,className:h})=>{let[g]=(0,rd.useState)(()=>u?j9e(r):r),[v,y]=(0,rd.useState)({}),[x,C]=(0,rd.useState)([]),[b,w]=(0,rd.useState)(a||0),[S,P]=(0,rd.useState)({}),[N,D]=(0,rd.useState)(!1),[E,A]=(0,rd.useState)(0);(0,rd.useEffect)(()=>{if(!o||!a||N)return;let k=setInterval(()=>{w(T=>T<=1?(B(),0):T-1)},1e3);return()=>clearInterval(k)},[o,a,N]),(0,rd.useEffect)(()=>{if(!o||N)return;let k=setInterval(()=>{A(T=>T+1)},1e3);return()=>clearInterval(k)},[o,N]);let z=(0,rd.useCallback)(()=>{let k=0,T=0;return{results:g.map(F=>{let _=v[F.id],M=F.points||1;T+=M;let j=!1;if(_!=null&&_!==""){if(F.type==="single-choice"||F.type==="true-false")j=_===F.correctAnswer;else if(F.type==="multiple-choice"){let q=Array.isArray(_)?_:[],G=Array.isArray(F.correctAnswer)?F.correctAnswer:[];j=q.length===G.length&&q.every(U=>G.includes(U))}}let H=j?M:0;return k+=H,{questionId:F.id,answer:_,isCorrect:j,points:H,timeSpent:S[F.id]||0}}),score:k,totalScore:T}},[g,v,S]),B=async()=>{let{results:k,score:T,totalScore:O}=z();C(k),D(!0),n&&await n(k,T,O)},R=k=>{let T=Math.floor(k/60),O=k%60;return`${T}:${O.toString().padStart(2,"0")}`},I=g.map((k,T)=>({id:k.id,title:`Question ${T+1}`,description:k.tags?.join(", "),content:({updateStepData:O,goToNext:F})=>{let _=v[k.id],M=d&&k.options?j9e(k.options):k.options;(0,rd.useEffect)(()=>{S[k.id]||P(H=>({...H,[k.id]:E}))},[]);let j=H=>{y(q=>({...q,[k.id]:H})),p&&k.type};return(0,yt.jsxs)(Be,{className:"border-0 shadow-none",children:[(0,yt.jsxs)(gr,{children:[(0,yt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,yt.jsxs)(Ot,{variant:"secondary",children:["Question ",T+1," of ",g.length]}),k.points&&k.points>1&&(0,yt.jsxs)(Ot,{variant:"outline",children:[k.points," points"]})]}),(0,yt.jsx)(Or,{className:"text-xl",children:k.question}),k.description&&(0,yt.jsx)(Fi,{children:k.description})]}),(0,yt.jsxs)(Ve,{className:"space-y-4",children:[k.image&&(0,yt.jsx)("img",{src:k.image,alt:"Question illustration",className:"w-full rounded-lg"}),k.type==="single-choice"&&M&&(0,yt.jsx)(sC,{value:_||"",onValueChange:j,children:M.map((H,q)=>(0,yt.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:q*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,yt.jsx)(Dv,{value:String(H.value),id:`${k.id}-${H.value}`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-${H.value}`,className:"flex-1 cursor-pointer",children:H.label||H.value})]},String(H.value)))}),k.type==="multiple-choice"&&M&&(0,yt.jsx)("div",{className:"space-y-2",children:M.map((H,q)=>(0,yt.jsxs)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:q*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,yt.jsx)(Lu,{id:`${k.id}-${H.value}`,checked:(_||[]).includes(H.value),onCheckedChange:G=>{let U=_||[];j(G?[...U,H.value]:U.filter(K=>K!==H.value))}}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-${H.value}`,className:"flex-1 cursor-pointer",children:H.label||H.value})]},String(H.value)))}),k.type==="true-false"&&(0,yt.jsxs)(sC,{value:_?.toString()||"",onValueChange:H=>j(H==="true"),children:[(0,yt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,yt.jsx)(Dv,{value:"true",id:`${k.id}-true`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,yt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,yt.jsx)(Dv,{value:"false",id:`${k.id}-false`}),(0,yt.jsx)(bt,{htmlFor:`${k.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),k.type==="text"&&(0,yt.jsx)(Gc,{value:_||"",onChange:H=>j(H.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),k.type==="rating"&&(0,yt.jsxs)("div",{className:"space-y-4",children:[(0,yt.jsx)(yb,{value:[_||5],onValueChange:([H])=>j(H),max:10,min:1,step:1,className:"w-full"}),(0,yt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[_||5,"/10"]})]}),m&&k.hint&&(0,yt.jsx)(Rx,{children:(0,yt.jsxs)(kx,{children:[(0,yt.jsx)("strong",{children:"Hint:"})," ",k.hint]})})]})]})},validation:()=>!(k.required&&!v[k.id]),isOptional:!k.required}));if(N){let{score:k,totalScore:T}=z(),O=Math.round(k/T*100),F=O>=f;return(0,yt.jsx)(ie.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:V("w-full max-w-2xl mx-auto",h),children:(0,yt.jsxs)(Be,{children:[(0,yt.jsxs)(gr,{className:"text-center",children:[(0,yt.jsx)("div",{className:"mx-auto mb-4",children:(0,yt.jsx)(DA,{className:V("w-16 h-16",F?"text-yellow-500":"text-muted-foreground")})}),(0,yt.jsx)(Or,{className:"text-3xl",children:"Quiz Complete!"}),(0,yt.jsx)(Fi,{children:"Here's how you performed"})]}),(0,yt.jsxs)(Ve,{className:"space-y-6",children:[(0,yt.jsxs)("div",{className:"text-center",children:[(0,yt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,yt.jsx)(is,{value:O,className:"h-3 mb-4"}),(0,yt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,yt.jsxs)("span",{children:["Score: ",k,"/",T]}),(0,yt.jsx)("span",{children:F?(0,yt.jsx)(Ot,{variant:"success",children:"Passed"}):(0,yt.jsx)(Ot,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,yt.jsxs)("div",{className:"space-y-2",children:[(0,yt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((_,M)=>{let j=g.find(H=>H.id===_.questionId);return(0,yt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,yt.jsxs)("span",{className:"text-sm",children:[s&&`Q${M+1}: `,j?.question.substring(0,50),"..."]}),(0,yt.jsxs)(Ot,{variant:_.isCorrect?"success":"destructive",children:[_.points,"/",j?.points||1]})]},_.questionId)})]}),(0,yt.jsxs)("div",{className:"flex gap-2",children:[(0,yt.jsxs)(ne,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,yt.jsx)(av,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,yt.jsxs)(ne,{variant:"outline",children:[(0,yt.jsx)(sn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,yt.jsxs)(ne,{variant:"outline",children:[(0,yt.jsx)(iv,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,yt.jsxs)("div",{className:V("w-full",h),children:[o&&a&&(0,yt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,yt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,yt.jsx)(wn,{className:"w-4 h-4"}),(0,yt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",R(b)]})]}),(0,yt.jsx)(is,{value:b/a*100,className:"w-32 h-2"})]}),(0,yt.jsx)(T_,{steps:I,onComplete:B,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},bZt=e=>{let{hasProAccess:t,isLoading:r}=Ut();return!r&&!t?(0,yt.jsx)(Be,{className:V("w-full",e.className),children:(0,yt.jsx)(Ve,{className:"py-12 text-center",children:(0,yt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,yt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,yt.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,yt.jsxs)("div",{children:[(0,yt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,yt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,yt.jsx)("a",{href:"/pricing",children:(0,yt.jsxs)(ne,{size:"sm",children:[(0,yt.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,yt.jsx)(xZt,{...e})},wZt=bZt;var nd=L(ue(),1);var zr=L(fe(),1),CZt={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function SZt(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 PZt(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 IZt(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(CZt))if(n.test(t))return r;return null}function RZt(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 kZt(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 q9e=nd.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:m,required:h,...g},v)=>{let[y,x]=(0,nd.useState)(null),[C,b]=(0,nd.useState)(null),[w,S]=(0,nd.useState)({}),P=(0,nd.useRef)(null),N=(0,nd.useRef)(null),D=(0,nd.useRef)(null),E=(0,nd.useRef)(null);(0,nd.useEffect)(()=>{let B=IZt(e.number);x(B)},[e.number]),(0,nd.useEffect)(()=>{if(!i)return;let B={};e.number&&!RZt(e.number)&&(B.number="Invalid card number"),e.expiry&&!kZt(e.expiry)&&(B.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(B.cvc="Invalid CVC"),S(B)},[e,i]);let A=(B,R)=>{let I=R;if(a){if(B==="number"){I=SZt(R,y||void 0);let k=y==="amex"?18:19;if(I.length>k)return}else if(B==="expiry"){if(I=PZt(R),I.length>5)return}else if(B==="cvc"){I=R.replace(/\D/g,"");let k=y==="amex"?4:3;if(I.length>k)return}}t?.({...e,[B]:I}),a&&(B==="number"&&I.length===(y==="amex"?18:19)?N.current?.focus():B==="expiry"&&I.length===5?D.current?.focus():B==="cvc"&&I.length===(y==="amex"?4:3)&&E.current?.focus())},z={...w,...c};return(0,zr.jsxs)("div",{ref:v,className:V("space-y-4",u),...g,children:[r&&(0,zr.jsxs)(ie.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,zr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,zr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,zr.jsx)(qT,{className:"w-8 h-8 text-white/80"})]}),(0,zr.jsxs)("div",{className:"space-y-4",children:[(0,zr.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,zr.jsxs)("div",{className:"flex justify-between",children:[(0,zr.jsxs)("div",{children:[(0,zr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,zr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,zr.jsxs)("div",{children:[(0,zr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,zr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,zr.jsxs)("div",{className:"space-y-4",children:[(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsxs)("div",{className:"relative",children:[(0,zr.jsx)(Qt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:B=>A("number",B.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:V("pr-20",z.number&&"border-destructive",d),disabled:m}),n&&y&&(0,zr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),z.number&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.number})]}),(0,zr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsx)(Qt,{ref:N,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:B=>A("expiry",B.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:V(z.expiry&&"border-destructive",d),disabled:m}),z.expiry&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.expiry})]}),(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsxs)(bt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",h&&(0,zr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,zr.jsxs)("div",{className:"relative",children:[(0,zr.jsx)(Qt,{ref:D,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:B=>A("cvc",B.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:V(z.cvc&&"border-destructive",d),disabled:m}),o&&(0,zr.jsx)(Ct,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),z.cvc&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.cvc})]})]}),(0,zr.jsxs)("div",{className:"space-y-1",children:[(0,zr.jsx)(bt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,zr.jsx)(Qt,{ref:E,id:"card-name",type:"text",value:e.name,onChange:B=>A("name",B.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:V(z.name&&"border-destructive",d),disabled:m}),z.name&&(0,zr.jsx)("p",{className:V("text-sm text-destructive",p),children:z.name})]})]}),o&&(0,zr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,zr.jsx)(Ct,{className:"w-4 h-4"}),(0,zr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});q9e.displayName="MoonUICreditCardInputPro";var Vl=L(ue(),1);var Je=L(fe(),1),$9e=pt("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"}}),W9e=Vl.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,Vl.useState)([]),[p,m]=(0,Vl.useState)(0),[h,g]=(0,Vl.useState)({}),[v,y]=(0,Vl.useState)(!1),[x,C]=(0,Vl.useState)(null),[b,w]=(0,Vl.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Vl.useState)(Date.now()),[N,D]=(0,Vl.useState)(!1),[E,A]=(0,Vl.useState)(0);(0,Vl.useEffect)(()=>{let H=[...n];o.shuffleQuestions&&(H=B(H)),o.shuffleOptions&&(H=H.map(q=>q.options?{...q,options:B([...q.options])}:q)),f(H)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Vl.useEffect)(()=>{if(b===null||b<=0||v)return;let H=setInterval(()=>{w(q=>q===null||q<=1?(T(),0):q-1)},1e3);return()=>clearInterval(H)},[b,v]),(0,Vl.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let z=d[p],B=H=>{let q=[...H];for(let G=q.length-1;G>0;G--){let U=Math.floor(Math.random()*(G+1));[q[G],q[U]]=[q[U],q[G]]}return q},R=H=>{let q=Date.now()-S;g(G=>({...G,[z.id]:{questionId:z.id,answer:H,timeSpent:q}}))},I=()=>{p<d.length-1?(m(H=>H+1),P(Date.now()),D(!1)):T()},k=()=>{p>0&&(m(H=>H-1),D(!1))},T=()=>{let H=O();C(H),y(!0),A(q=>q+1),a&&a(H)},O=()=>{let H=0,q=0,G=[];d.forEach(Y=>{let Z=h[Y.id],ae=Y.points||1;H+=ae;let oe=!1;if(Z?.answer&&Y.correctAnswer!==void 0)switch(Y.type){case"single-choice":case"true-false":case"text":oe=Z.answer===Y.correctAnswer;break;case"multiple-choice":Array.isArray(Z.answer)&&Array.isArray(Y.correctAnswer)&&(oe=Z.answer.length===Y.correctAnswer.length&&Z.answer.every(Ae=>Y.correctAnswer.includes(Ae)));break;case"matching":if(typeof Z.answer=="object"&&typeof Y.correctAnswer=="object"){let Ae=Y.correctAnswer,Se=Z.answer;oe=Object.keys(Ae).every(Ue=>Ae[Ue]===Se[Ue])}break;case"rating":oe=!0;break}oe&&(q+=ae),G.push({questionId:Y.id,userAnswer:Z?.answer||null,correctAnswer:Y.correctAnswer,isCorrect:oe,points:oe?ae:0})});let U=H>0?q/H*100:0,K=Object.values(h).reduce((Y,Z)=>Y+(Z.timeSpent||0),0);return{score:q,totalScore:H,percentage:U,passed:o.passingScore?U>=o.passingScore:void 0,answers:G,timeSpent:K,completedAt:new Date}},F=()=>{m(0),g({}),y(!1),C(null),w(o.timeLimit?o.timeLimit*60:null),P(Date.now()),D(!1),o.shuffleQuestions&&f(B([...n]))},_=()=>{if(!x)return;let H={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(Z=>Z.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},q=new Blob([JSON.stringify(H,null,2)],{type:"application/json"}),G=URL.createObjectURL(q),U=document.createElement("a");U.href=G,U.download=`quiz-results-${Date.now()}.json`,U.click(),URL.revokeObjectURL(G)},M=H=>{let q=Math.floor(H/60),G=H%60;return`${q}:${G.toString().padStart(2,"0")}`},j=()=>{if(!z)return null;let H=h[z.id]?.answer;switch(z.type){case"single-choice":case"true-false":return(0,Je.jsx)("div",{className:"space-y-3",children:z.options?.map((K,Y)=>(0,Je.jsx)(ie.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},onClick:()=>R(K),className:V("w-full text-left p-4 rounded-lg border transition-colors",H===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},Y))});case"multiple-choice":return(0,Je.jsx)("div",{className:"space-y-3",children:z.options?.map((K,Y)=>{let Z=Array.isArray(H)&&H.includes(K);return(0,Je.jsx)(ie.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},onClick:()=>{let ae=H||[],oe=Z?ae.filter(Ae=>Ae!==K):[...ae,K];R(oe)},className:V("w-full text-left p-4 rounded-lg border transition-colors",Z?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,Je.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Je.jsx)("div",{className:V("w-5 h-5 rounded border-2 transition-colors",Z?"bg-primary border-primary":"border-border"),children:Z&&(0,Je.jsx)(Ms,{className:"w-full h-full text-primary-foreground"})}),K]})},Y)})});case"text":return(0,Je.jsx)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,Je.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:H||"",onChange:K=>R(K.target.value)})});case"rating":let q=z.maxRating||5,G=typeof H=="number"?H:0;return(0,Je.jsxs)(ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,Je.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:q},(K,Y)=>Y+1).map(K=>(0,Je.jsx)("button",{onClick:()=>R(K),className:"transition-transform hover:scale-110",children:(0,Je.jsx)(Qi,{className:V("w-10 h-10 transition-colors",K<=G?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),z.ratingLabels&&(0,Je.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Je.jsx)("span",{children:z.ratingLabels[0]}),(0,Je.jsx)("span",{children:z.ratingLabels[1]})]})]});case"matching":let U=H||{};return(0,Je.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,Je.jsxs)("div",{className:"space-y-3",children:[(0,Je.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),z.leftOptions?.map((K,Y)=>(0,Je.jsx)(ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:Y*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,Je.jsxs)("div",{className:"space-y-3",children:[(0,Je.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),z.leftOptions?.map(K=>(0,Je.jsx)(ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,Je.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:U[K]||"",onChange:Y=>R({...U,[K]:Y.target.value}),children:[(0,Je.jsx)("option",{value:"",children:"Select..."}),z.rightOptions?.map(Y=>(0,Je.jsx)("option",{value:Y,children:Y},Y))]})},K))]})]});default:return null}};return v&&x?(0,Je.jsx)("div",{ref:u,className:V($9e({variant:t,size:r}),e),...c,children:(0,Je.jsxs)(ie.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,Je.jsxs)("div",{className:"text-center",children:[(0,Je.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,Je.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,Je.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,Je.jsx)("div",{className:V("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,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(Ms,{className:"w-5 h-5"}),"Passed"]}):(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsx)(ta,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,Je.jsxs)("div",{className:"space-y-4",children:[(0,Je.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map((H,q)=>{let G=d.find(U=>U.id===H.questionId);return G?(0,Je.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,Je.jsxs)("div",{className:"flex items-start gap-3",children:[H.isCorrect?(0,Je.jsx)(Ms,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,Je.jsx)(ta,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,Je.jsxs)("div",{className:"flex-1",children:[(0,Je.jsxs)("p",{className:"font-medium mb-2",children:[q+1,". ",G.question]}),(0,Je.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify(H.userAnswer)]}),!H.isCorrect&&G.correctAnswer!==void 0&&(0,Je.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(G.correctAnswer)]}),G.explanation&&(0,Je.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:G.explanation})]})]})},H.questionId):null})]}),(0,Je.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||E<o.maxAttempts)&&(0,Je.jsxs)("button",{onClick:F,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,Je.jsx)(av,{className:"w-4 h-4"}),"Try Again"]}),(0,Je.jsxs)("button",{onClick:_,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,Je.jsx)(sn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,Je.jsxs)("div",{ref:u,className:V($9e({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,Je.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Je.jsxs)("div",{children:[s&&(0,Je.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,Je.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,Je.jsxs)("div",{className:V("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,Je.jsx)(wn,{className:"w-4 h-4"}),M(b)]})]}),(0,Je.jsxs)("div",{className:"mb-6",children:[(0,Je.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,Je.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,Je.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,Je.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,Je.jsx)(ie.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,Je.jsx)(Et,{mode:"wait",children:z&&(0,Je.jsxs)(ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,Je.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[z.question,z.required&&(0,Je.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&z.hint&&(0,Je.jsxs)("div",{className:"mt-4",children:[(0,Je.jsxs)("button",{onClick:()=>D(!N),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,Je.jsx)(Gp,{className:"w-4 h-4"}),N?"Hide":"Show"," Hint"]}),N&&(0,Je.jsx)(ie.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:z.hint})]}),o.showInstantFeedback&&h[z.id]&&z.correctAnswer!==void 0&&(0,Je.jsx)(ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let H=h[z.id].answer,q=!1;switch(z.type){case"single-choice":case"true-false":q=H===z.correctAnswer;break}return(0,Je.jsxs)("div",{className:V("p-3 rounded-lg flex items-start gap-2",q?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[q?(0,Je.jsx)(Ms,{className:"w-5 h-5 mt-0.5"}):(0,Je.jsx)(ta,{className:"w-5 h-5 mt-0.5"}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("p",{className:"font-medium",children:q?"Correct!":"Incorrect"}),z.explanation&&(0,Je.jsx)("p",{className:"text-sm mt-1",children:z.explanation})]})]})})()})]},z.id)}),(0,Je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Je.jsxs)("button",{onClick:k,disabled:p===0,className:V("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,Je.jsx)(ea,{className:"w-4 h-4"}),"Previous"]}),(0,Je.jsxs)("button",{onClick:p===d.length-1?T:I,disabled:z?.required&&!h[z.id],className:V("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",z?.required&&!h[z.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,Je.jsx)(Dn,{className:"w-4 h-4"})]})]})]})});W9e.displayName="MoonUIQuizFormProInternal";var ole=Vl.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ut();return!n&&!r?(0,Je.jsx)(Be,{className:V("w-full",e.className),children:(0,Je.jsx)(Ve,{className:"py-12 text-center",children:(0,Je.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Je.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Je.jsx)(Ct,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Je.jsxs)("div",{children:[(0,Je.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Je.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Je.jsx)("a",{href:"/pricing",children:(0,Je.jsxs)(ne,{size:"sm",children:[(0,Je.jsx)(vt,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Je.jsx)(W9e,{...e,ref:t})});ole.displayName="MoonUIQuizFormPro";var pd=L(ue(),1);var Q=L(at(),1),Rn=L(at(),1);var od=L(at(),1);var zl=L(at(),1);var qS=L(Nr(),1),$6="Collapsible",[NZt,ale]=nn($6),[MZt,ile]=NZt($6),G9e=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Un({prop:n,defaultProp:o??!1,onChange:i,caller:$6});return(0,qS.jsx)(MZt,{scope:r,disabled:a,contentId:So(),open:l,onOpenToggle:zl.useCallback(()=>c(u=>!u),[c]),children:(0,qS.jsx)(Qe.div,{"data-state":lle(l),"data-disabled":a?"":void 0,...s,ref:t})})});G9e.displayName=$6;var K9e="CollapsibleTrigger",X9e=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=ile(K9e,r);return(0,qS.jsx)(Qe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":lle(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:ze(e.onClick,o.onOpenToggle)})});X9e.displayName=K9e;var sle="CollapsibleContent",Y9e=zl.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=ile(sle,e.__scopeCollapsible);return(0,qS.jsx)(Yn,{present:r||o.open,children:({present:a})=>(0,qS.jsx)(TZt,{...n,ref:t,present:a})})});Y9e.displayName=sle;var TZt=zl.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ile(sle,r),[s,l]=zl.useState(n),c=zl.useRef(null),u=zt(t,c),d=zl.useRef(0),f=d.current,p=zl.useRef(0),m=p.current,h=i.open||s,g=zl.useRef(h),v=zl.useRef(void 0);return zl.useEffect(()=>{let y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),Mn(()=>{let y=c.current;if(y){v.current=v.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,g.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),l(n)}},[i.open,n]),(0,qS.jsx)(Qe.div,{"data-state":lle(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&o})});function lle(e){return e?"open":"closed"}var Z9e=G9e,Q9e=X9e,J9e=Y9e;var Hs=L(Nr(),1),Hm="Accordion",LZt=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ule,EZt,DZt]=jd(Hm),[G6,$Mn]=nn(Hm,[DZt,ale]),dle=ale(),OZt=od.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Hs.jsx)(ule.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Hs.jsx)(VZt,{...a,ref:t}):(0,Hs.jsx)(BZt,{...o,ref:t})})});OZt.displayName=Hm;var[eKe,_Zt]=G6(Hm),[tKe,FZt]=G6(Hm,{collapsible:!1}),BZt=od.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Un({prop:r,defaultProp:n??"",onChange:o,caller:Hm});return(0,Hs.jsx)(eKe,{scope:e.__scopeAccordion,value:od.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:od.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Hs.jsx)(tKe,{scope:e.__scopeAccordion,collapsible:a,children:(0,Hs.jsx)(rKe,{...i,ref:t})})})}),VZt=od.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Un({prop:r,defaultProp:n??[],onChange:o,caller:Hm}),l=od.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=od.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Hs.jsx)(eKe,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Hs.jsx)(tKe,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Hs.jsx)(rKe,{...a,ref:t})})})}),[zZt,K6]=G6(Hm),rKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=od.default.useRef(null),l=zt(s,t),c=EZt(r),d=ep(o)==="ltr",f=ze(e.onKeyDown,p=>{if(!LZt.includes(p.key))return;let m=p.target,h=c().filter(P=>!P.ref.current?.disabled),g=h.findIndex(P=>P.ref.current===m),v=h.length;if(g===-1)return;p.preventDefault();let y=g,x=0,C=v-1,b=()=>{y=g+1,y>C&&(y=x)},w=()=>{y=g-1,y<x&&(y=C)};switch(p.key){case"Home":y=x;break;case"End":y=C;break;case"ArrowRight":a==="horizontal"&&(d?b():w());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?w():b());break;case"ArrowUp":a==="vertical"&&w();break}let S=y%v;h[S].ref.current?.focus()});return(0,Hs.jsx)(zZt,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Hs.jsx)(ule.Slot,{scope:r,children:(0,Hs.jsx)(Qe.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),W6="AccordionItem",[UZt,fle]=G6(W6),nKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=K6(W6,r),i=_Zt(W6,r),s=dle(r),l=So(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Hs.jsx)(UZt,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Hs.jsx)(Z9e,{"data-orientation":a.orientation,"data-state":cKe(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});nKe.displayName=W6;var oKe="AccordionHeader",aKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(oKe,r);return(0,Hs.jsx)(Qe.h3,{"data-orientation":o.orientation,"data-state":cKe(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});aKe.displayName=oKe;var cle="AccordionTrigger",iKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(cle,r),i=FZt(cle,r),s=dle(r);return(0,Hs.jsx)(ule.ItemSlot,{scope:r,children:(0,Hs.jsx)(Q9e,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});iKe.displayName=cle;var sKe="AccordionContent",lKe=od.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=K6(Hm,r),a=fle(sKe,r),i=dle(r);return(0,Hs.jsx)(J9e,{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}})});lKe.displayName=sKe;function cKe(e){return e?"open":"closed"}var uKe=nKe,dKe=aKe,ple=iKe,mle=lKe;var Y6=L(at());var fKe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jZt=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),hle=e=>{let t=jZt(e);return t.charAt(0).toUpperCase()+t.slice(1)},X6=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),pKe=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var A_=L(at());var mKe={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 hKe=(0,A_.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,A_.createElement)("svg",{ref:l,...mKe,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:X6("lucide",o),...!a&&!pKe(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,A_.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var ht=(e,t)=>{let r=(0,Y6.forwardRef)(({className:n,...o},a)=>(0,Y6.createElement)(hKe,{ref:a,iconNode:t,className:X6(`lucide-${fKe(hle(e))}`,`lucide-${e}`,n),...o}));return r.displayName=hle(e),r};var qZt=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],L_=ht("align-center",qZt);var $Zt=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],E_=ht("align-justify",$Zt);var WZt=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],D_=ht("align-left",WZt);var GZt=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],O_=ht("align-right",GZt);var KZt=[["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"}]],__=ht("bold",KZt);var XZt=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ky=ht("check",XZt);var YZt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],y0=ht("chevron-down",YZt);var ZZt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],TN=ht("chevron-left",ZZt);var QZt=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],x0=ht("chevron-right",QZt);var JZt=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],F_=ht("chevron-up",JZt);var eQt=[["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"}]],Mg=ht("circle-alert",eQt);var tQt=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],b0=ht("circle-check-big",tQt);var rQt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],AN=ht("circle",rQt);var nQt=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],B_=ht("code",nQt);var oQt=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],V_=ht("credit-card",oQt);var aQt=[["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"}]],Ny=ht("ellipsis",aQt);var iQt=[["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"}]],z_=ht("eye",iQt);var sQt=[["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"}]],U_=ht("file-text",sQt);var lQt=[["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"}]],H_=ht("file",lQt);var cQt=[["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"}]],LN=ht("image",cQt);var uQt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],EN=ht("info",uQt);var dQt=[["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"}]],j_=ht("italic",dQt);var fQt=[["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"}]],q_=ht("link",fQt);var pQt=[["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"}]],$_=ht("list-ordered",pQt);var mQt=[["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"}]],W_=ht("list",mQt);var hQt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],mf=ht("loader-circle",hQt);var gQt=[["path",{d:"M5 12h14",key:"1ays0h"}]],G_=ht("minus",gQt);var vQt=[["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"}]],K_=ht("music",vQt);var yQt=[["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"}]],X_=ht("palette",yQt);var xQt=[["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"}]],Y_=ht("phone",xQt);var bQt=[["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"}]],Z_=ht("quote",bQt);var wQt=[["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"}]],Q_=ht("redo",wQt);var CQt=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J_=ht("search",CQt);var SQt=[["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"}]],ad=ht("square-pen",SQt);var PQt=[["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"}]],e2=ht("strikethrough",PQt);var IQt=[["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"}]],w0=ht("triangle-alert",IQt);var RQt=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],t2=ht("underline",RQt);var kQt=[["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"}]],r2=ht("undo",kQt);var NQt=[["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"}]],n2=ht("upload",NQt);var MQt=[["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"}]],o2=ht("video",MQt);var TQt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],My=ht("x",TQt);function gKe(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=gKe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Z6(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=gKe(e))&&(n&&(n+=" "),n+=t);return n}var yle="-",AQt=e=>{let t=EQt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(yle);return s[0]===""&&s.length!==1&&s.shift(),xKe(s,t)||LQt(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},xKe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?xKe(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(yle);return t.validators.find(({validator:i})=>i(a))?.classGroupId},vKe=/^\[(.+)\]$/,LQt=e=>{if(vKe.test(e)){let t=vKe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},EQt=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return OQt(Object.entries(e.classGroups),r).forEach(([a,i])=>{vle(i,n,a,t)}),n},vle=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:yKe(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(DQt(o)){vle(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{vle(i,yKe(t,a),r,n)})})},yKe=(e,t)=>{let r=e;return t.split(yle).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},DQt=e=>e.isThemeGetter,OQt=(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,_Qt=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)}}},bKe="!",FQt=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 g=0;g<s.length;g++){let v=s[g];if(c===0){if(v===o&&(n||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(bKe),m=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return r?s=>r({className:s,parseClassName:i}):i},BQt=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},VQt=e=>({cache:_Qt(e.cacheSize),parseClassName:FQt(e),...AQt(e)}),zQt=/\s+/,UQt=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(zQt),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),m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m){s=c+(s.length>0?" "+s:s);continue}if(h=n(f),!h){s=c+(s.length>0?" "+s:s);continue}m=!1}let g=BQt(u).join(":"),v=d?g+bKe:g,y=v+h;if(a.includes(y))continue;a.push(y);let x=o(h,m);for(let C=0;C<x.length;++C){let b=x[C];a.push(v+b)}s=c+(s.length>0?" "+s:s)}return s};function HQt(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=wKe(t))&&(n&&(n+=" "),n+=r);return n}var wKe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wKe(e[n]))&&(r&&(r+=" "),r+=t);return r};function jQt(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=VQt(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=UQt(l,r);return o(l,u),u}return function(){return a(HQt.apply(null,arguments))}}var La=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},CKe=/^\[(?:([a-z-]+):)?(.+)\]$/i,qQt=/^\d+\/\d+$/,$Qt=new Set(["px","full","screen"]),WQt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GQt=/\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$/,KQt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,XQt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YQt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ty=e=>DN(e)||$Qt.has(e)||qQt.test(e),C0=e=>ON(e,"length",oJt),DN=e=>!!e&&!Number.isNaN(Number(e)),gle=e=>ON(e,"number",DN),a2=e=>!!e&&Number.isInteger(Number(e)),ZQt=e=>e.endsWith("%")&&DN(e.slice(0,-1)),en=e=>CKe.test(e),S0=e=>WQt.test(e),QQt=new Set(["length","size","percentage"]),JQt=e=>ON(e,QQt,SKe),eJt=e=>ON(e,"position",SKe),tJt=new Set(["image","url"]),rJt=e=>ON(e,tJt,iJt),nJt=e=>ON(e,"",aJt),i2=()=>!0,ON=(e,t,r)=>{let n=CKe.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},oJt=e=>GQt.test(e)&&!KQt.test(e),SKe=()=>!1,aJt=e=>XQt.test(e),iJt=e=>YQt.test(e);var sJt=()=>{let e=La("colors"),t=La("spacing"),r=La("blur"),n=La("brightness"),o=La("borderColor"),a=La("borderRadius"),i=La("borderSpacing"),s=La("borderWidth"),l=La("contrast"),c=La("grayscale"),u=La("hueRotate"),d=La("invert"),f=La("gap"),p=La("gradientColorStops"),m=La("gradientColorStopPositions"),h=La("inset"),g=La("margin"),v=La("opacity"),y=La("padding"),x=La("saturate"),C=La("scale"),b=La("sepia"),w=La("skew"),S=La("space"),P=La("translate"),N=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",en,t],A=()=>[en,t],z=()=>["",Ty,C0],B=()=>["auto",DN,en],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],k=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",en],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>[DN,en];return{cacheSize:500,separator:":",theme:{colors:[i2],spacing:[Ty,C0],blur:["none","",S0,en],brightness:_(),borderColor:[e],borderRadius:["none","","full",S0,en],borderSpacing:A(),borderWidth:z(),contrast:_(),grayscale:O(),hueRotate:_(),invert:O(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[ZQt,C0],inset:E(),margin:E(),opacity:_(),padding:A(),saturate:_(),scale:_(),sepia:O(),skew:_(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",en]}],container:["container"],columns:[{columns:[S0]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:[...R(),en]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",a2,en]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",en]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",a2,en]}],"grid-cols":[{"grid-cols":[i2]}],"col-start-end":[{col:["auto",{span:["full",a2,en]},en]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[i2]}],"row-start-end":[{row:["auto",{span:[a2,en]},en]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",en]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",en]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"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:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"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",en,t]}],"min-w":[{"min-w":[en,t,"min","max","fit"]}],"max-w":[{"max-w":[en,t,"none","full","min","max","fit","prose",{screen:[S0]},S0]}],h:[{h:[en,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[en,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[en,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[en,t,"auto","min","max","fit"]}],"font-size":[{text:["base",S0,C0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gle]}],"font-family":[{font:[i2]}],"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",en]}],"line-clamp":[{"line-clamp":["none",DN,gle]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ty,en]}],"list-image":[{"list-image":["none",en]}],"list-style-type":[{list:["none","disc","decimal",en]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ty,C0]}],"underline-offset":[{"underline-offset":["auto",Ty,en]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",en]}],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",en]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),eJt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JQt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rJt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"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":[v]}],"border-style":[{border:[...I(),"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":[v]}],"divide-style":[{divide:I()}],"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:["",...I()]}],"outline-offset":[{"outline-offset":[Ty,en]}],"outline-w":[{outline:[Ty,C0]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Ty,C0]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",S0,nJt]}],"shadow-color":[{shadow:[i2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...k(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":k()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",S0,en]}],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":[v]}],"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",en]}],duration:[{duration:_()}],ease:[{ease:["linear","in","out","in-out",en]}],delay:[{delay:_()}],animate:[{animate:["none","spin","ping","pulse","bounce",en]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[a2,en]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[w]}],"skew-y":[{"skew-y":[w]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",en]}],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",en]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",en]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ty,C0,gle]}],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 PKe=jQt(sJt);var W=L(Nr(),1);var IKe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,RKe=Z6,In=(e,t)=>r=>{var n;if(t?.variants==null)return RKe(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=IKe(u)||IKe(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(m=>{let[h,g]=m;return Array.isArray(g)?g.includes({...a,...s}[h]):{...a,...s}[h]===g})?[...c,d,f]:c},[]);return RKe(e,i,l,r?.class,r?.className)};var Tp=L(at(),1);var kKe=L(vE(),1);function NKe(){return(0,kKe.useSyncExternalStore)(lJt,()=>!0,()=>!1)}function lJt(){return()=>{}}var s2=L(Nr(),1),xle="Avatar",[cJt,RLn]=nn(xle),[uJt,TKe]=cJt(xle),AKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=Tp.useState("idle");return(0,s2.jsx)(uJt,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,s2.jsx)(Qe.span,{...n,ref:t})})});AKe.displayName=xle;var LKe="AvatarImage",EKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=TKe(LKe,r),s=dJt(n,a),l=Hn(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mn(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,s2.jsx)(Qe.img,{...a,ref:t,src:n}):null});EKe.displayName=LKe;var DKe="AvatarFallback",OKe=Tp.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=TKe(DKe,r),[i,s]=Tp.useState(n===void 0);return Tp.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,s2.jsx)(Qe.span,{...o,ref:t}):null});OKe.displayName=DKe;function MKe(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function dJt(e,{referrerPolicy:t,crossOrigin:r}){let n=NKe(),o=Tp.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=Tp.useState(()=>MKe(a,e));return Mn(()=>{s(MKe(a,e))},[a,e]),Mn(()=>{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 ble=AKe,wle=EKe,Cle=OKe;var $2=L(Nr(),1),Eg=L(at(),1);var _Ke=L(at(),1),_N=(0,_Ke.createContext)({});var FKe=L(at(),1);function Tg(e){let t=(0,FKe.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Q6=L(at(),1);var FN=typeof window<"u";var BN=FN?Q6.useLayoutEffect:Q6.useEffect;var rce=L(Nr(),1),V7e=L(at(),1),j2=L(at(),1);var BKe=L(at(),1),P0=(0,BKe.createContext)(null);var F7e=L(Nr(),1);function $S(e,t){e.indexOf(t)===-1&&e.push(t)}function jm(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hl=(e,t,r)=>r>t?t:r<e?e:r;var Ay=()=>{},Ul=()=>{};var bc={};var l2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function c2(e){return typeof e=="object"&&e!==null}var u2=e=>/^0[^.\s]+$/u.test(e);function WS(e){let t;return()=>(t===void 0&&(t=e()),t)}var hi=e=>e;var pJt=(e,t)=>r=>t(e(r)),qm=(...e)=>e.reduce(pJt);var Ap=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Ly=class{constructor(){this.subscriptions=[]}add(t){return $S(this.subscriptions,t),()=>jm(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 $i=e=>e*1e3,Hl=e=>e/1e3;function d2(e,t){return t?e*(1e3/t):0}var VKe=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var zKe=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,mJt=1e-7,hJt=12;function gJt(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=zKe(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>mJt&&++s<hJt);return i}function I0(e,t,r,n){if(e===t&&r===n)return hi;let o=a=>gJt(a,0,1,e,r);return a=>a===0||a===1?a:zKe(o(a),t,n)}var J6=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var eW=e=>t=>1-e(1-t);var tW=I0(.33,1.53,.69,.99),VN=eW(tW),f2=J6(VN);var p2=e=>(e*=2)<1?.5*VN(e):.5*(2-Math.pow(2,-10*(e-1)));var m2=e=>1-Math.sin(Math.acos(e)),h2=eW(m2),g2=J6(m2);var Sle=I0(.42,0,1,1),Ple=I0(0,0,.58,1),v2=I0(.42,0,.58,1);var y2=e=>Array.isArray(e)&&typeof e[0]!="number";function x2(e,t){return y2(e)?e[VKe(0,e.length,t)]:e}var b2=e=>Array.isArray(e)&&typeof e[0]=="number";var UKe={linear:hi,easeIn:Sle,easeInOut:v2,easeOut:Ple,circIn:m2,circInOut:g2,circOut:h2,backIn:VN,backInOut:f2,backOut:tW,anticipate:p2},vJt=e=>typeof e=="string",rW=e=>{if(b2(e)){Ul(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return I0(t,r,n,o)}else if(vJt(e))return Ul(UKe[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),UKe[e];return e};var w2=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var id={value:null,addProjectionMetrics:null};function HKe(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 h=p&&o?r:n;return f&&i.add(d),h.has(d)||h.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&&id.value&&id.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var yJt=40;function nW(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=w2.reduce((x,C)=>(x[C]=HKe(a,t?C:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=i,h=()=>{let x=bc.useManualTiming?o.timestamp:performance.now();r=!1,bc.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,yJt),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),m.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(h))},g=()=>{r=!0,n=!0,o.isProcessing||e(h)};return{schedule:w2.reduce((x,C)=>{let b=i[C];return x[C]=(w,S=!1,P=!1)=>(r||g(),b.schedule(w,S,P)),x},{}),cancel:x=>{for(let C=0;C<w2.length;C++)i[w2[C]].cancel(x)},state:o,steps:i}}var{schedule:tn,cancel:wc,state:Li,steps:C2}=nW(typeof requestAnimationFrame<"u"?requestAnimationFrame:hi,!0);var oW;function xJt(){oW=void 0}var Ei={now:()=>(oW===void 0&&Ei.set(Li.isProcessing||bc.useManualTiming?Li.timestamp:performance.now()),oW),set:e=>{oW=e,queueMicrotask(xJt)}};var $m={layout:0,mainThread:0,waapi:0};var jKe=e=>t=>typeof t=="string"&&t.startsWith(e),GS=jKe("--"),bJt=jKe("var(--"),KS=e=>bJt(e)?wJt.test(e.split("/*")[0].trim()):!1,wJt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var Ag={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ey={...Ag,transform:e=>hl(0,1,e)},S2={...Ag,default:1};var R0=e=>Math.round(e*1e5)/1e5;var zN=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qKe(e){return e==null}var $Ke=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var UN=(e,t)=>r=>!!(typeof r=="string"&&$Ke.test(r)&&r.startsWith(e)||t&&!qKe(r)&&Object.prototype.hasOwnProperty.call(r,t)),aW=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(zN);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var CJt=e=>hl(0,255,e),Ile={...Ag,transform:e=>Math.round(CJt(e))},Lg={test:UN("rgb","red"),parse:aW("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Ile.transform(e)+", "+Ile.transform(t)+", "+Ile.transform(r)+", "+R0(Ey.transform(n))+")"};function SJt(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 P2={test:UN("#"),parse:SJt,transform:Lg.transform};var I2=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wm=I2("deg"),Cc=I2("%"),ir=I2("px"),Rle=I2("vh"),kle=I2("vw"),iW=(()=>({...Cc,parse:e=>Cc.parse(e)/100,transform:e=>Cc.transform(e*100)}))();var k0={test:UN("hsl","hue"),parse:aW("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Cc.transform(R0(t))+", "+Cc.transform(R0(r))+", "+R0(Ey.transform(n))+")"};var Ya={test:e=>Lg.test(e)||P2.test(e)||k0.test(e),parse:e=>Lg.test(e)?Lg.parse(e):k0.test(e)?k0.parse(e):P2.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Lg.transform(e):k0.transform(e),getAnimatableNone:e=>{let t=Ya.parse(e);return t.alpha=0,Ya.transform(t)}};var WKe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function PJt(e){return isNaN(e)&&typeof e=="string"&&(e.match(zN)?.length||0)+(e.match(WKe)?.length||0)>0}var KKe="number",XKe="color",IJt="var",RJt="var(",GKe="${}",kJt=/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 N0(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(kJt,l=>(Ya.test(l)?(n.color.push(a),o.push(XKe),r.push(Ya.parse(l))):l.startsWith(RJt)?(n.var.push(a),o.push(IJt),r.push(l)):(n.number.push(a),o.push(KKe),r.push(parseFloat(l))),++a,GKe)).split(GKe);return{values:r,split:s,indexes:n,types:o}}function YKe(e){return N0(e).values}function ZKe(e){let{split:t,types:r}=N0(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===KKe?a+=R0(o[i]):s===XKe?a+=Ya.transform(o[i]):a+=o[i]}return a}}var NJt=e=>typeof e=="number"?0:Ya.test(e)?Ya.getAnimatableNone(e):e;function MJt(e){let t=YKe(e);return ZKe(e)(t.map(NJt))}var Sc={test:PJt,parse:YKe,createTransformer:ZKe,getAnimatableNone:MJt};function Nle(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 QKe({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=Nle(l,s,e+1/3),a=Nle(l,s,e),i=Nle(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function HN(e,t){return r=>r>0?t:e}var yn=(e,t,r)=>e+(t-e)*r;var Mle=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},TJt=[P2,Lg,k0],AJt=e=>TJt.find(t=>t.test(e));function JKe(e){let t=AJt(e);if(Ay(!!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===k0&&(r=QKe(r)),r}var Tle=(e,t)=>{let r=JKe(e),n=JKe(t);if(!r||!n)return HN(e,t);let o={...r};return a=>(o.red=Mle(r.red,n.red,a),o.green=Mle(r.green,n.green,a),o.blue=Mle(r.blue,n.blue,a),o.alpha=yn(r.alpha,n.alpha,a),Lg.transform(o))};var sW=new Set(["none","hidden"]);function e7e(e,t){return sW.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function LJt(e,t){return r=>yn(e,t,r)}function lW(e){return typeof e=="number"?LJt:typeof e=="string"?KS(e)?HN:Ya.test(e)?Tle:OJt:Array.isArray(e)?t7e:typeof e=="object"?Ya.test(e)?Tle:EJt:HN}function t7e(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>lW(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function EJt(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=lW(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function DJt(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 OJt=(e,t)=>{let r=Sc.createTransformer(t),n=N0(e),o=N0(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?sW.has(e)&&!o.values.length||sW.has(t)&&!n.values.length?e7e(e,t):qm(t7e(DJt(n,o),o.values),r):(Ay(!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"),HN(e,t))};function cW(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?yn(e,t,r):lW(e)(e,t)}var r7e=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>tn.update(t,r),stop:()=>wc(t),now:()=>Li.isProcessing?Li.timestamp:Ei.now()}};var uW=(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 jN(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 R2(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(jN(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Hl(o)}}var _Jt=5;function dW(e,t,r){let n=Math.max(t-_Jt,0);return d2(r-e(n),t-n)}var Ea={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 Lle=.001;function n7e({duration:e=Ea.duration,bounce:t=Ea.bounce,velocity:r=Ea.velocity,mass:n=Ea.mass}){let o,a;Ay(e<=$i(Ea.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hl(Ea.minDamping,Ea.maxDamping,i),e=hl(Ea.minDuration,Ea.maxDuration,Hl(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=fW(c,i),m=Math.exp(-d);return Lle-f/p*m},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),h=fW(Math.pow(c,2),i);return(-o(c)+Lle>0?-1:1)*((f-p)*m)/h}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Lle+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=BJt(o,a,s);if(e=$i(e),isNaN(l))return{stiffness:Ea.stiffness,damping:Ea.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var FJt=12;function BJt(e,t,r){let n=r;for(let o=1;o<FJt;o++)n=n-e(n)/t(n);return n}function fW(e,t){return e*Math.sqrt(1-t*t)}var VJt=["duration","bounce"],zJt=["stiffness","damping","mass"];function o7e(e,t){return t.some(r=>e[r]!==void 0)}function UJt(e){let t={velocity:Ea.velocity,stiffness:Ea.stiffness,damping:Ea.damping,mass:Ea.mass,isResolvedFromDuration:!1,...e};if(!o7e(e,zJt)&&o7e(e,VJt))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hl(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ea.mass,stiffness:o,damping:a}}else{let r=n7e(e);t={...t,...r,mass:Ea.mass},t.isResolvedFromDuration=!0}return t}function Dy(e=Ea.visualDuration,t=Ea.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}=UJt({...r,velocity:-Hl(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=i-a,v=Hl(Math.sqrt(l/u)),y=Math.abs(g)<5;n||(n=y?Ea.restSpeed.granular:Ea.restSpeed.default),o||(o=y?Ea.restDelta.granular:Ea.restDelta.default);let x;if(h<1){let b=fW(v,h);x=w=>{let S=Math.exp(-h*v*w);return i-S*((m+h*v*g)/b*Math.sin(b*w)+g*Math.cos(b*w))}}else if(h===1)x=b=>i-Math.exp(-v*b)*(g+(m+v*g)*b);else{let b=v*Math.sqrt(h*h-1);x=w=>{let S=Math.exp(-h*v*w),P=Math.min(b*w,300);return i-S*((m+h*v*g)*Math.sinh(P)+b*g*Math.cosh(P))/b}}let C={calculatedDuration:p&&d||null,next:b=>{let w=x(b);if(p)s.done=b>=d;else{let S=b===0?m:0;h<1&&(S=b===0?$i(m):dW(x,b,w));let P=Math.abs(S)<=n,N=Math.abs(i-w)<=o;s.done=P&&N}return s.value=s.done?i:w,s},toString:()=>{let b=Math.min(jN(C),2e4),w=uW(S=>C.next(b*S).value,b,30);return b+"ms "+w},toTransition:()=>{}};return C}Dy.applyToOptions=e=>{let t=R2(e,100,Dy);return e.ease=t.ease,e.duration=$i(t.duration),e.type="keyframes",e};function k2({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,m=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,h=r*t,g=d+h,v=i===void 0?g:i(g);v!==g&&(h=v-d);let y=P=>-h*Math.exp(-P/n),x=P=>v+y(P),C=P=>{let N=y(P),D=x(P);f.done=Math.abs(N)<=c,f.value=f.done?v:D},b,w,S=P=>{p(f.value)&&(b=P,w=Dy({keyframes:[f.value,m(f.value)],velocity:dW(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let N=!1;return!w&&b===void 0&&(N=!0,C(P),S(P)),b!==void 0&&P>=b?w.next(P-b):(!N&&C(P),f)}}}function HJt(e,t,r){let n=[],o=r||bc.mix||cW,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]||hi:t;s=qm(l,s)}n.push(s)}return n}function pW(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Ul(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=HJt(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=Ap(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hl(e[0],e[a-1],u)):c}function N2(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Ap(0,t,n);e.push(yn(r,1,o))}}function M2(e){let t=[0];return N2(t,e.length-1),t}function a7e(e,t){return e.map(r=>r*t)}function jJt(e,t){return e.map(()=>t||v2).splice(0,e.length-1)}function XS({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=y2(n)?n.map(rW):rW(n),a={done:!1,value:t[0]},i=a7e(r&&r.length===t.length?r:M2(t),e),s=pW(i,t,{ease:Array.isArray(o)?o:jJt(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var qJt=e=>e!==null;function qN(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(qJt),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var $Jt={decay:k2,inertia:k2,tween:XS,keyframes:XS,spring:Dy};function mW(e){typeof e.type=="string"&&(e.type=$Jt[e.type])}var M0=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 WJt=e=>e/100,Oy=class extends M0{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!==Ei.now()&&this.tick(Ei.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$m.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;mW(t);let{type:r=XS,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||XS;l!==XS&&typeof s[0]!="number"&&(this.mixKeyframes=qm(WJt,cW(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=jN(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:m,onUpdate:h,finalKeyframe:g}=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 v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,C=n;if(d){let P=Math.min(this.currentTime,o)/s,N=Math.floor(P),D=P%1;!D&&P>=1&&(D=1),D===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(D=1-D,p&&(D-=p/s)):f==="mirror"&&(C=i)),x=hl(0,1,D)*s}let b=y?{done:!1,value:u[0]}:C.next(x);a&&(b.value=a(b.value));let{done:w}=b;!y&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return S&&m!==k2&&(b.value=qN(u,this.options,g,this.speed)),h&&h(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Hl(this.calculatedDuration)}get time(){return Hl(this.currentTime)}set time(t){t=$i(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(Ei.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Hl(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=r7e,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(Ei.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,$m.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 i7e(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var YS=e=>e*180/Math.PI,Ele=e=>{let t=YS(Math.atan2(e[1],e[0]));return Dle(t)},GJt={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ele,rotateZ:Ele,skewX:e=>YS(Math.atan(e[1])),skewY:e=>YS(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Dle=e=>(e=e%360,e<0&&(e+=360),e),s7e=Ele,l7e=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),c7e=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),KJt={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:l7e,scaleY:c7e,scale:e=>(l7e(e)+c7e(e))/2,rotateX:e=>Dle(YS(Math.atan2(e[6],e[5]))),rotateY:e=>Dle(YS(Math.atan2(-e[2],e[0]))),rotateZ:s7e,rotate:s7e,skewX:e=>YS(Math.atan(e[4])),skewY:e=>YS(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function T2(e){return e.includes("scale")?1:0}function A2(e,t){if(!e||e==="none")return T2(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=KJt,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=GJt,o=s}if(!o)return T2(t);let a=n[t],i=o[1].split(",").map(XJt);return typeof a=="function"?a(i):i[a]}var Ole=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return A2(r,t)};function XJt(e){return parseFloat(e.trim())}var Gm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hf=(()=>new Set(Gm))();var _le=e=>e===Ag||e===ir,YJt=new Set(["x","y","z"]),ZJt=Gm.filter(e=>!YJt.has(e));function u7e(e){let t=[];return ZJt.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var T0={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})=>A2(t,"x"),y:(e,{transform:t})=>A2(t,"y")};T0.translateX=T0.x;T0.translateY=T0.y;var ZS=new Set,Fle=!1,Ble=!1,Vle=!1;function d7e(){if(Ble){let e=Array.from(ZS).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=u7e(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)})}Ble=!1,Fle=!1,ZS.forEach(e=>e.complete(Vle)),ZS.clear()}function f7e(){ZS.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ble=!0)})}function zle(){Vle=!0,f7e(),d7e(),Vle=!1}var _y=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?(ZS.add(this),Fle||(Fle=!0,tn.read(f7e),tn.resolveKeyframes(d7e))):(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])}i7e(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ZS.delete(this)}cancel(){this.state==="scheduled"&&(ZS.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var p7e=e=>e.startsWith("--");function m7e(e,t,r){p7e(t)?e.style.setProperty(t,r):e.style[t]=r}var h7e=WS(()=>window.ScrollTimeline!==void 0);var g7e={};function v7e(e,t){let r=WS(e);return()=>g7e[t]??r()}var hW=v7e(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var QS=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var Ule={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:QS([0,.65,.55,1]),circOut:QS([.55,0,1,.45]),backIn:QS([.31,.01,.66,-.59]),backOut:QS([.33,1.53,.69,.99])};function Hle(e,t){if(e)return typeof e=="function"?hW()?uW(e,t):"ease-out":b2(e)?QS(e):Array.isArray(e)?e.map(r=>Hle(r,t)||Ule.easeOut):Ule[e]}function y7e(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=Hle(s,o);Array.isArray(d)&&(u.easing=d),id.value&&$m.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 id.value&&p.finished.finally(()=>{$m.waapi--}),p}function JS(e){return typeof e=="function"&&"applyToOptions"in e}function x7e({type:e,...t}){return JS(e)&&hW()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var gW=class extends M0{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,Ul(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=x7e(t);this.animation=y7e(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=qN(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):m7e(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 Hl(Number(t))}get time(){return Hl(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=$i(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&&h7e()?(this.animation.timeline=t,hi):r(this)}};var b7e={anticipate:p2,backInOut:f2,circInOut:g2};function QJt(e){return e in b7e}function w7e(e){typeof e.ease=="string"&&QJt(e.ease)&&(e.ease=b7e[e.ease])}var C7e=10,vW=class extends gW{constructor(t){w7e(t),mW(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 Oy({...i,autoplay:!1}),l=$i(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-C7e).value,s.sample(l).value,C7e),s.stop()}};var jle=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Sc.test(e)||e==="0")&&!e.startsWith("url("));function JJt(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 S7e(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=jle(o,t),s=jle(a,t);return Ay(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:JJt(e)||(r==="spring"||JS(r))&&n}function $N(e){e.duration=0,e.type}var eer=new Set(["opacity","clipPath","filter","transform"]),ter=WS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function P7e(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 ter()&&r&&eer.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var rer=40,L2=class extends M0{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=Ei.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||_y;this.keyframeResolver=new p(s,(m,h,g)=>this.onKeyframesResolved(m,h,f,!g),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=Ei.now(),S7e(t,a,i,s)||((bc.instantAnimations||!l)&&u?.(qN(t,n,r)),t[0]=t[t.length-1],$N(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>rer?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&P7e(f)?new vW({...f,element:f.motionValue.owner.current}):new Oy(f);p.finished.then(()=>this.notifyFinished()).catch(hi),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(),zle()),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 yW=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 E2=class extends yW{then(t,r){return this.finished.finally(t).then(()=>{})}};var ner=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oer(e){let t=ner.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var aer=4;function qle(e,t,r=1){Ul(r<=aer,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=oer(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return l2(i)?parseFloat(i):i}return KS(o)?qle(o,t,r+1):o}function e1(e,t){return e?.[t]??e?.default??e}var D2=new Set(["width","height","top","left","right","bottom",...Gm]);var I7e={test:e=>e==="auto",parse:e=>e};var xW=e=>t=>t.test(e);var $le=[Ag,ir,Cc,Wm,kle,Rle,I7e],Wle=e=>$le.find(xW(e));function R7e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||u2(e):!0}var ier=new Set(["brightness","contrast","saturate","opacity"]);function ser(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(zN)||[];if(!n)return e;let o=r.replace(n,""),a=ier.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var ler=/\b([a-z-]*)\(.*?\)/gu,O2={...Sc,getAnimatableNone:e=>{let t=e.match(ler);return t?t.map(ser).join(" "):e}};var Gle={...Ag,transform:Math.round};var k7e={rotate:Wm,rotateX:Wm,rotateY:Wm,rotateZ:Wm,scale:S2,scaleX:S2,scaleY:S2,scaleZ:S2,skew:Wm,skewX:Wm,skewY:Wm,distance:ir,translateX:ir,translateY:ir,translateZ:ir,x:ir,y:ir,z:ir,perspective:ir,transformPerspective:ir,opacity:Ey,originX:iW,originY:iW,originZ:ir};var t1={borderWidth:ir,borderTopWidth:ir,borderRightWidth:ir,borderBottomWidth:ir,borderLeftWidth:ir,borderRadius:ir,radius:ir,borderTopLeftRadius:ir,borderTopRightRadius:ir,borderBottomRightRadius:ir,borderBottomLeftRadius:ir,width:ir,maxWidth:ir,height:ir,maxHeight:ir,top:ir,right:ir,bottom:ir,left:ir,padding:ir,paddingTop:ir,paddingRight:ir,paddingBottom:ir,paddingLeft:ir,margin:ir,marginTop:ir,marginRight:ir,marginBottom:ir,marginLeft:ir,backgroundPositionX:ir,backgroundPositionY:ir,...k7e,zIndex:Gle,fillOpacity:Ey,strokeOpacity:Ey,numOctaves:Gle};var N7e={...t1,color:Ya,backgroundColor:Ya,outlineColor:Ya,fill:Ya,stroke:Ya,borderColor:Ya,borderTopColor:Ya,borderRightColor:Ya,borderBottomColor:Ya,borderLeftColor:Ya,filter:O2,WebkitFilter:O2},_2=e=>N7e[e];function F2(e,t){let r=_2(e);return r!==O2&&(r=Sc),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var cer=new Set(["auto","none","0"]);function M7e(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!cer.has(a)&&N0(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=F2(r,o)}var B2=class extends _y{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(),KS(c))){let u=qle(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!D2.has(n)||t.length!==2)return;let[o,a]=t,i=Wle(o),s=Wle(a);if(i!==s)if(_le(i)&&_le(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else T0[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||R7e(t[o]))&&n.push(o);n.length&&M7e(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=T0[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]=T0[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 V2(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 z2=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function U2(e){return c2(e)&&"offsetHeight"in e}var T7e=30,uer=e=>!isNaN(parseFloat(e)),r1={current:void 0},bW=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=Ei.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=Ei.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=uer(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 Ly);let n=this.events[t].add(r);return t==="change"?()=>{n(),tn.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 r1.current&&r1.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Ei.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>T7e)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,T7e);return d2(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 sd(e,t){return new bW(e,t)}var{schedule:n1,cancel:der}=nW(queueMicrotask,!1);var Lp={x:!1,y:!1};function wW(){return Lp.x||Lp.y}function Kle(e){return e==="x"||e==="y"?Lp[e]?null:(Lp[e]=!0,()=>{Lp[e]=!1}):Lp.x||Lp.y?null:(Lp.x=Lp.y=!0,()=>{Lp.x=Lp.y=!1})}function CW(e,t){let r=V2(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function A7e(e){return!(e.pointerType==="touch"||wW())}function Xle(e,t,r={}){let[n,o,a]=CW(e,r),i=s=>{if(!A7e(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{A7e(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Yle=(e,t)=>t?e===t?!0:Yle(e,t.parentElement):!1;var o1=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var fer=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function L7e(e){return fer.has(e.tagName)||e.tabIndex!==-1}var WN=new WeakSet;function E7e(e){return t=>{t.key==="Enter"&&e(t)}}function Zle(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var D7e=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=E7e(()=>{if(WN.has(r))return;Zle(r,"down");let o=E7e(()=>{Zle(r,"up")}),a=()=>Zle(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 O7e(e){return o1(e)&&!wW()}function Qle(e,t,r={}){let[n,o,a]=CW(e,r),i=s=>{let l=s.currentTarget;if(!O7e(s))return;WN.add(l);let c=t(l,s),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),WN.has(l)&&WN.delete(l),O7e(p)&&typeof c=="function"&&c(p,{success:m})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Yle(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),U2(s)&&(s.addEventListener("focus",c=>D7e(c,o)),!L7e(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function a1(e){return c2(e)&&"ownerSVGElement"in e}function H2(e){return a1(e)&&e.tagName==="svg"}function Jle(...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=pW(o,a,i);return t?s(n):s}var co=e=>!!(e&&e.getVelocity);var per=[...$le,Ya,Sc],ece=e=>per.find(xW(e));var SW=L(at(),1),Fy=L(at(),1);var _7e=L(at(),1),A0=(0,_7e.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var tce=class extends SW.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=U2(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 B7e({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,Fy.useId)(),a=(0,Fy.useRef)(null),i=(0,Fy.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Fy.useContext)(A0);return(0,Fy.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 m=document.createElement("style");s&&(m.nonce=s);let h=n??document.head;return h.appendChild(m),m.sheet&&m.sheet.insertRule(`
397
397
  [data-motion-pop-id="${o}"] {
398
398
  position: absolute !important;
399
399
  width: ${l}px !important;