@reeverdev/ui 0.5.15 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -73,11 +73,11 @@ import*as J from'react';import {createContext,useState,useRef,useCallback,useEff
73
73
  `;)_--;return _>=0&&O[_]===n?{start:_,end:$,query:O.slice(_+1,$)}:null},I=O=>{let $=O.target.value,_=O.target.selectionStart||0;l===void 0&&g($),o?.($),T(_);let B=E($,_);if(B){if(x(B.query),b(true),R(0),S.current){let U=S.current,K=parseInt(getComputedStyle(U).lineHeight)||20,F=$.slice(0,B.start).split(`
74
74
  `).length;P({top:F*K+8,left:0});}}else b(false),x("");},L=O=>{let $=E(k,y);if(!$)return;let _=k.slice(0,$.start),B=k.slice(y),U=`${n}${O.value} `,K=_+U+B;l===void 0&&g(K),o?.(K),a?.(O),b(false),x(""),setTimeout(()=>{if(S.current){let D=$.start+U.length;S.current.focus(),S.current.setSelectionRange(D,D);}},0);},V=O=>{if(v)switch(O.key){case "ArrowDown":O.preventDefault(),R($=>$<N.length-1?$+1:$);break;case "ArrowUp":O.preventDefault(),R($=>$>0?$-1:$);break;case "Enter":O.preventDefault(),N[C]&&L(N[C]);break;case "Escape":O.preventDefault(),b(false);break}},A=()=>{setTimeout(()=>{b(false);},150);},z=O=>jsxs("div",{className:"flex items-center gap-2",children:[O.avatar&&jsx("img",{src:O.avatar,alt:"",className:"h-6 w-6 rounded-full object-cover"}),jsxs("div",{className:"flex flex-col",children:[jsx("span",{className:"font-medium",children:O.label}),O.description&&jsx("span",{className:"text-xs text-muted-foreground",children:O.description})]})]});return jsxs("div",{ref:w,className:u(Qx({size:t}),e),children:[jsx("textarea",{ref:S,className:u(DP({size:t}),"resize-none"),value:k,onChange:I,onKeyDown:V,onBlur:A,...m}),v&&jsx("div",{className:"absolute z-50 mt-1 max-h-60 w-full overflow-auto rounded-md border bg-popover p-1 shadow-md",style:{top:M.top,left:M.left},children:i?jsx("div",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"Loading..."}):N.length===0?jsx("div",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:c}):N.map((O,$)=>jsx("div",{className:u("cursor-pointer rounded-sm px-2 py-1.5 text-sm","hover:bg-accent hover:text-accent-foreground",$===C&&"bg-accent text-accent-foreground"),onClick:()=>L(O),onMouseEnter:()=>R($),children:s?s(O):z(O)},O.id))})]})});ey.displayName="Mentions";var ty=cva("flex gap-4",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:"",md:"",lg:""}},defaultVariants:{orientation:"horizontal",size:"md"}}),IP=cva("flex flex-col rounded-lg border bg-background overflow-hidden",{variants:{size:{sm:"min-w-[180px]",md:"min-w-[220px]",lg:"min-w-[280px]"}},defaultVariants:{size:"md"}}),HP=cva("flex items-center justify-between border-b bg-muted/50 px-3 font-medium",{variants:{size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"}},defaultVariants:{size:"md"}}),VP=cva("flex-1 overflow-auto",{variants:{size:{sm:"max-h-[200px] min-h-[150px]",md:"max-h-[300px] min-h-[200px]",lg:"max-h-[400px] min-h-[250px]"}},defaultVariants:{size:"md"}}),AP=cva("flex cursor-pointer items-center gap-2 px-3 transition-colors hover:bg-accent",{variants:{size:{sm:"min-h-[28px] text-xs",md:"min-h-[36px] text-sm",lg:"min-h-[44px] text-base"}},defaultVariants:{size:"md"}}),ry=J.forwardRef(({className:e,orientation:t,size:r,sourceItems:n=[],targetItems:o=[],onChange:a,sourceTitle:s="Source",targetTitle:i="Target",searchable:c=false,searchPlaceholder:l="Search...",showSelectAll:d=true,renderItem:m,showCount:p=true,isDisabled:f=false,...g},v)=>{let[b,h]=J.useState(new Set),[x,y]=J.useState(new Set),[T,C]=J.useState(""),[R,M]=J.useState(""),P=J.useMemo(()=>{if(!T)return n;let K=T.toLowerCase();return n.filter(D=>D.label.toLowerCase().includes(K))},[n,T]),S=J.useMemo(()=>{if(!R)return o;let K=R.toLowerCase();return o.filter(D=>D.label.toLowerCase().includes(K))},[o,R]),w=K=>{if(K){let D=P.filter(H=>!H.disabled).map(H=>H.id);h(new Set(D));}else h(new Set);},k=K=>{if(K){let D=S.filter(H=>!H.disabled).map(H=>H.id);y(new Set(D));}else y(new Set);},N=K=>{K.disabled||f||h(D=>{let H=new Set(D);return H.has(K.id)?H.delete(K.id):H.add(K.id),H});},E=K=>{K.disabled||f||y(D=>{let H=new Set(D);return H.has(K.id)?H.delete(K.id):H.add(K.id),H});},I=()=>{if(b.size===0||f)return;let K=n.filter(F=>b.has(F.id)),D=n.filter(F=>!b.has(F.id)),H=[...o,...K];h(new Set),a?.(D,H);},L=()=>{if(x.size===0||f)return;let K=o.filter(F=>x.has(F.id)),D=o.filter(F=>!x.has(F.id)),H=[...n,...K];y(new Set),a?.(H,D);},V=()=>{if(f)return;let K=n.filter(F=>!F.disabled),D=n.filter(F=>F.disabled),H=[...o,...K];h(new Set),a?.(D,H);},A=()=>{if(f)return;let K=o.filter(F=>!F.disabled),D=o.filter(F=>F.disabled),H=[...n,...K];y(new Set),a?.(H,D);},z=P.filter(K=>!K.disabled).length,O=S.filter(K=>!K.disabled).length,$=z>0&&b.size===z,_=O>0&&x.size===O,B=K=>jsx("span",{className:u(K.disabled&&"text-muted-foreground"),children:K.label}),U=(K,D,H,F,W,X,Z,me,ve,j)=>jsxs("div",{className:u(IP({size:r})),"data-testid":j,children:[jsx("div",{className:u(HP({size:r})),children:jsxs("div",{className:"flex items-center gap-2",children:[d&&jsx("input",{type:"checkbox",checked:Z,onChange:G=>X(G.target.checked),disabled:f||H.filter(G=>!G.disabled).length===0,className:"h-4 w-4 rounded border-input","aria-label":`Select all ${K}`}),jsxs("span",{children:[K,p&&jsxs("span",{className:"ml-1 text-muted-foreground",children:["(",F.size,"/",D.length,")"]})]})]})}),c&&jsx("div",{className:"border-b p-2",children:jsx("input",{type:"text",value:me,onChange:G=>ve(G.target.value),placeholder:l,disabled:f,className:u("w-full rounded-md border border-input bg-background px-2 py-1 text-sm","placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":`Search ${K}`})}),jsx("div",{className:u(VP({size:r})),role:"listbox","aria-label":K,children:H.length===0?jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"No items"}):H.map(G=>jsxs("div",{role:"option","aria-selected":F.has(G.id),"aria-disabled":G.disabled,className:u(AP({size:r}),F.has(G.id)&&"bg-accent",G.disabled&&"cursor-not-allowed opacity-50",f&&"cursor-not-allowed"),onClick:()=>W(G),children:[jsx("span",{"aria-hidden":"true",className:u("flex h-4 w-4 shrink-0 items-center justify-center rounded border border-input",F.has(G.id)&&"bg-primary border-primary"),children:F.has(G.id)&&jsx("svg",{className:"h-3 w-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),m?m(G):B(G)]},G.id))})]});return jsxs("div",{ref:v,className:u(ty({orientation:t,size:r}),f&&"opacity-50",e),...g,children:[U(s,n,P,b,N,w,$,T,C,"transfer-list-source"),jsxs("div",{className:u("flex items-center justify-center gap-2",t==="vertical"?"flex-row":"flex-col"),children:[jsx("button",{type:"button",onClick:V,disabled:f||n.filter(K=>!K.disabled).length===0,className:u("flex h-8 w-8 items-center justify-center rounded-md border bg-background transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),"aria-label":"Move all to target",children:t==="vertical"?"\u2193\u2193":">>"}),jsx("button",{type:"button",onClick:I,disabled:f||b.size===0,className:u("flex h-8 w-8 items-center justify-center rounded-md border bg-background transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),"aria-label":"Move selected to target",children:t==="vertical"?"\u2193":">"}),jsx("button",{type:"button",onClick:L,disabled:f||x.size===0,className:u("flex h-8 w-8 items-center justify-center rounded-md border bg-background transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),"aria-label":"Move selected to source",children:t==="vertical"?"\u2191":"<"}),jsx("button",{type:"button",onClick:A,disabled:f||o.filter(K=>!K.disabled).length===0,className:u("flex h-8 w-8 items-center justify-center rounded-md border bg-background transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),"aria-label":"Move all to source",children:t==="vertical"?"\u2191\u2191":"<<"})]}),U(i,o,S,x,E,k,_,R,M,"transfer-list-target")]})});ry.displayName="TransferList";var ny=cva("inline-flex rounded-md shadow-sm",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),zP=cva("inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded-l-md border-r-0",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{sm:"h-8 px-3 text-xs",md:"h-10 px-4 text-sm",lg:"h-12 px-6 text-base"}},defaultVariants:{variant:"solid",size:"md"}}),OP=cva("inline-flex items-center justify-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 rounded-r-md border-l",{variants:{variant:{solid:"bg-primary text-primary-foreground hover:bg-primary/90 border-primary-foreground/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-secondary-foreground/20",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 border-destructive-foreground/20"},size:{sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12"}},defaultVariants:{variant:"solid",size:"md"}}),FP=cva("absolute z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",{variants:{position:{"bottom-start":"left-0 top-full mt-1","bottom-end":"right-0 top-full mt-1","top-start":"left-0 bottom-full mb-1","top-end":"right-0 bottom-full mb-1"}},defaultVariants:{position:"bottom-start"}}),BP=cva("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",{variants:{destructive:{true:"text-destructive hover:bg-destructive/10 hover:text-destructive focus:bg-destructive/10 focus:text-destructive",false:""}},defaultVariants:{destructive:false}}),$P=()=>jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"m6 9 6 6 6-6"})}),oy=J.forwardRef(({className:e,variant:t,size:r,children:n,onClick:o,items:a=[],menuPosition:s="bottom-start",startContent:i,endContent:c,dropdownContent:l,isLoading:d=false,disabled:m,...p},f)=>{let[g,v]=J.useState(false),[b,h]=J.useState(-1),x=J.useRef(null),y=J.useRef(null),T=J.useRef(null);J.useImperativeHandle(f,()=>y.current);let C=a.filter(S=>!S.disabled);J.useEffect(()=>{let S=w=>{x.current&&!x.current.contains(w.target)&&(v(false),h(-1));};return g&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[g]);let R=()=>{m||d||(v(S=>!S),h(-1));},M=S=>{S.disabled||(S.onClick?.(),v(false),h(-1));},P=S=>{if(!g){(S.key==="ArrowDown"||S.key==="Enter"||S.key===" ")&&(S.preventDefault(),v(true),h(0));return}switch(S.key){case "ArrowDown":S.preventDefault(),h(w=>{let k=w+1;return k>=C.length?0:k});break;case "ArrowUp":S.preventDefault(),h(w=>{let k=w-1;return k<0?C.length-1:k});break;case "Enter":case " ":S.preventDefault(),b>=0&&C[b]&&M(C[b]);break;case "Escape":S.preventDefault(),v(false),h(-1),T.current?.focus();break;case "Tab":v(false),h(-1);break}};return jsxs("div",{ref:x,className:u(ny({size:r}),"relative",e),children:[jsxs("button",{ref:y,type:"button",className:u(zP({variant:t,size:r})),onClick:o,disabled:m||d,...p,children:[d&&jsxs("svg",{className:"mr-2 h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),i&&jsx("span",{className:"mr-2",children:i}),n,c&&jsx("span",{className:"ml-2",children:c})]}),jsx("button",{ref:T,type:"button",className:u(OP({variant:t,size:r})),onClick:R,onKeyDown:P,disabled:m||d,"aria-haspopup":"listbox","aria-expanded":g,"aria-label":"Open menu",children:l||jsx($P,{})}),g&&a.length>0&&jsx("div",{className:u(FP({position:s})),role:"listbox","aria-label":"Menu options",onKeyDown:P,children:a.map(S=>{let w=C.indexOf(S);return jsxs("div",{role:"option","aria-selected":w===b,"aria-disabled":S.disabled,"data-disabled":S.disabled||void 0,className:u(BP({destructive:S.destructive}),w===b&&"bg-accent text-accent-foreground",S.destructive&&w===b&&"bg-destructive/10 text-destructive"),onClick:()=>M(S),onMouseEnter:()=>{S.disabled||h(w);},children:[S.icon&&jsx("span",{className:"mr-2",children:S.icon}),S.label]},S.id)})})]})});oy.displayName="SplitButton";var Rd=cva("",{variants:{gap:{none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8"}},defaultVariants:{gap:"md"}}),ay=J.forwardRef(({className:e,gap:t,columns:r=3,minColumnWidth:n,variant:o="css",children:a,style:s,...i},c)=>{let l=J.useRef(null),[d,m]=J.useState(typeof r=="number"?r:3);if(J.useImperativeHandle(c,()=>l.current),J.useEffect(()=>{if(typeof r=="number"){m(r);return}let g=()=>{let v=window.innerWidth;v>=1280&&r.xl?m(r.xl):v>=1024&&r.lg?m(r.lg):v>=768&&r.md?m(r.md):r.sm?m(r.sm):m(3);};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[r]),J.useEffect(()=>{if(!n||!l.current)return;let g=()=>{if(!l.current)return;let b=l.current.offsetWidth,h=Math.max(1,Math.floor(b/n));m(h);},v=new ResizeObserver(g);return v.observe(l.current),()=>v.disconnect()},[n]),o==="css"){let g=t==="none"?"0px":t==="sm"?"0.5rem":t==="md"?"1rem":t==="lg"?"1.5rem":"2rem";return jsx("div",{ref:l,className:u(e),style:{columnCount:d,columnGap:g,...s},...i,children:J.Children.map(a,(v,b)=>jsx("div",{style:{breakInside:"avoid",marginBottom:g},children:v},b))})}let p=J.Children.toArray(a),f=Array.from({length:d},()=>[]);return p.forEach((g,v)=>{let b=v%d;f[b].push(g);}),jsx("div",{ref:l,className:u("flex",Rd({gap:t}),e),style:s,...i,children:f.map((g,v)=>jsx("div",{className:u("flex flex-1 flex-col",Rd({gap:t})),children:g.map((b,h)=>jsx("div",{children:b},h))},v))})});ay.displayName="Masonry";var sy=J.forwardRef(({className:e,colSpan:t,style:r,children:n,...o},a)=>jsx("div",{ref:a,className:u("overflow-hidden",e),style:{columnSpan:t===2?"all":void 0,...r},...o,children:n}));sy.displayName="MasonryItem";var wd=cva("w-full overflow-auto rounded-lg border",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),xa=cva("border-b px-4 py-2",{variants:{size:{sm:"px-2 py-1",md:"px-4 py-2",lg:"px-6 py-3"}},defaultVariants:{size:"md"}}),GP=({direction:e})=>jsxs("span",{className:"ml-1 inline-flex flex-col",children:[jsx("svg",{className:u("h-2 w-2",e==="asc"?"text-foreground":"text-muted-foreground/50"),viewBox:"0 0 8 5",fill:"currentColor",children:jsx("path",{d:"M4 0L8 5H0L4 0Z"})}),jsx("svg",{className:u("h-2 w-2",e==="desc"?"text-foreground":"text-muted-foreground/50"),viewBox:"0 0 8 5",fill:"currentColor",children:jsx("path",{d:"M4 5L0 0H8L4 5Z"})})]});function UP({className:e,size:t,data:r,columns:n,getRowKey:o,sortColumn:a,sortDirection:s,onSort:i,selectable:c=false,selectedKeys:l=new Set,onSelectionChange:d,striped:m=false,hoverable:p=true,isLoading:f=false,emptyContent:g,loadingContent:v,stickyHeader:b=false,onRowClick:h,...x},y){let T=w=>{if(!w.sortable||!i)return;let k="asc";a===w.key&&(s==="asc"?k="desc":s==="desc"&&(k=null)),i(w.key,k);},C=(w,k)=>typeof k.accessor=="function"?k.accessor(w):w[k.accessor],R=w=>{if(d)if(w){let k=r.map((N,E)=>o?o(N,E):E);d(new Set(k));}else d(new Set);},M=w=>{if(!d)return;let k=new Set(l);k.has(w)?k.delete(w):k.add(w),d(k);},P=r.length>0&&l.size===r.length,S=l.size>0&&l.size<r.length;return jsx("div",{ref:y,className:u(wd({size:t}),e),...x,children:jsxs("table",{className:"w-full border-collapse",children:[jsx("thead",{className:u(b&&"sticky top-0 z-10"),children:jsxs("tr",{className:"bg-muted/50",children:[c&&jsx("th",{className:u(xa({size:t}),"w-10 text-center"),children:jsx("input",{type:"checkbox",checked:P,ref:w=>{w&&(w.indeterminate=S);},onChange:w=>R(w.target.checked),className:"h-4 w-4 rounded border-input","aria-label":"Select all"})}),n.map(w=>jsx("th",{className:u(xa({size:t}),"font-medium text-muted-foreground",w.sortable&&"cursor-pointer select-none hover:text-foreground",w.headerAlign==="center"&&"text-center",w.headerAlign==="right"&&"text-right"),style:{width:w.width},onClick:()=>T(w),"aria-sort":a===w.key&&s?s==="asc"?"ascending":"descending":void 0,children:jsxs("span",{className:"inline-flex items-center",children:[w.header,w.sortable&&jsx(GP,{direction:a===w.key?s??null:null})]})},w.key))]})}),jsx("tbody",{children:f?jsx("tr",{children:jsx("td",{colSpan:n.length+(c?1:0),className:u(xa({size:t}),"text-center"),children:v||jsxs("div",{className:"flex items-center justify-center gap-2 py-8",children:[jsxs("svg",{className:"h-5 w-5 animate-spin text-muted-foreground",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),jsx("span",{className:"text-muted-foreground",children:"Loading..."})]})})}):r.length===0?jsx("tr",{children:jsx("td",{colSpan:n.length+(c?1:0),className:u(xa({size:t}),"text-center"),children:g||jsx("div",{className:"py-8 text-muted-foreground",children:"No data"})})}):r.map((w,k)=>{let N=o?o(w,k):k,E=l.has(N);return jsxs("tr",{className:u(m&&k%2===1&&"bg-muted/30",p&&"hover:bg-muted/50",E&&"bg-primary/10",h&&"cursor-pointer"),onClick:()=>h?.(w,k),children:[c&&jsx("td",{className:u(xa({size:t}),"text-center"),onClick:I=>I.stopPropagation(),children:jsx("input",{type:"checkbox",checked:E,onChange:()=>M(N),className:"h-4 w-4 rounded border-input","aria-label":`Select row ${k+1}`})}),n.map(I=>{let L=C(w,I),V=I.cell?I.cell(L,w,k):L;return jsx("td",{className:u(xa({size:t}),I.align==="center"&&"text-center",I.align==="right"&&"text-right"),children:V},I.key)})]},N)})})]})})}var cy=J.forwardRef(UP);cy.displayName="DataGrid";var dy=cy;var dl=cva("overflow-hidden rounded-lg border bg-background",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),Cd=({mode:e,currentMode:t,onClick:r,children:n})=>jsx("button",{type:"button",className:u("rounded px-2 py-1 text-xs font-medium transition-colors",t===e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"),onClick:()=>r(e),children:n}),uy=(e,t)=>{let r=[],n=new Date(e);n.setHours(0,0,0,0);let o=new Date(t);for(o.setHours(0,0,0,0);n<=o;)r.push(new Date(n)),n.setDate(n.getDate()+1);return r},WP=(e,t)=>{let r=[],n=new Date(e);n.setHours(0,0,0,0),n.setDate(n.getDate()-n.getDay()+1);let o=new Date(t);for(o.setHours(0,0,0,0);n<=o;)r.push(new Date(n)),n.setDate(n.getDate()+7);return r},jP=(e,t)=>{let r=[],n=new Date(e.getFullYear(),e.getMonth(),1),o=new Date(t.getFullYear(),t.getMonth(),1);for(;n<=o;)r.push(new Date(n)),n.setMonth(n.getMonth()+1);return r},YP=(e,t)=>e.toLocaleDateString(t,{day:"numeric"}),qP=(e,t)=>{let r=new Date(e);return r.setDate(r.getDate()+6),`${e.toLocaleDateString(t,{day:"numeric",month:"short"})} - ${r.toLocaleDateString(t,{day:"numeric",month:"short"})}`},XP=(e,t)=>e.toLocaleDateString(t,{month:"short",year:"numeric"}),my=e=>{let t=e.getDay();return t===0||t===6},ZP=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),py=["hsl(var(--primary))","hsl(var(--chart-1, 220 70% 50%))","hsl(var(--chart-2, 160 60% 45%))","hsl(var(--chart-3, 30 80% 55%))","hsl(var(--chart-4, 280 65% 60%))"];function JP({className:e,size:t,tasks:r,viewMode:n="day",onViewModeChange:o,onTaskClick:a,onTaskDoubleClick:s,showTodayMarker:i=true,showWeekends:c=true,rowHeight:l=40,columnWidth:d=40,headerHeight:m=50,sidebarWidth:p=200,renderTask:f,renderSidebarRow:g,isLoading:v=false,loadingContent:b,emptyContent:h,locale:x="en-US",...y},T){let C=J.useRef(null),R=J.useRef(null),M=J.useRef(null);J.useImperativeHandle(T,()=>C.current);let P=J.useMemo(()=>{if(r.length===0){let B=new Date,U=new Date(B);U.setDate(U.getDate()-7);let K=new Date(B);return K.setDate(K.getDate()+30),{start:U,end:K}}let z=r[0].start,O=r[0].end;r.forEach(B=>{B.start<z&&(z=B.start),B.end>O&&(O=B.end);});let $=new Date(z);$.setDate($.getDate()-7);let _=new Date(O);return _.setDate(_.getDate()+7),{start:$,end:_}},[r]),S=J.useMemo(()=>{switch(n){case "day":return uy(P.start,P.end);case "week":return WP(P.start,P.end);case "month":return jP(P.start,P.end);default:return uy(P.start,P.end)}},[n,P]),w=J.useMemo(()=>{switch(n){case "day":return d;case "week":return d*2;case "month":return d*4;default:return d}},[n,d]),k=J.useCallback(z=>{let O=P.start.getTime(),$=z.start.getTime(),_=z.end.getTime(),B;switch(n){case "day":B=1440*60*1e3;break;case "week":B=10080*60*1e3;break;case "month":B=720*60*60*1e3;break;default:B=1440*60*1e3;}let U=($-O)/B*w,K=Math.max((_-$)/B*w,z.isMilestone?16:20);return {left:U,width:K}},[P.start,n,w]),N=J.useCallback(()=>{let z=new Date;z.setHours(0,0,0,0);let O=P.start.getTime(),$=z.getTime(),_;switch(n){case "day":_=1440*60*1e3;break;case "week":_=10080*60*1e3;break;case "month":_=720*60*60*1e3;break;default:_=1440*60*1e3;}return ($-O)/_*w},[P.start,n,w]),E=J.useCallback(z=>{let O=z.target;M.current&&(M.current.scrollTop=O.scrollTop);},[]),I=J.useCallback(z=>{let O=z.target;R.current&&(R.current.scrollTop=O.scrollTop);},[]),L=S.length*w,V=r.length*l,A=new Date;return A.setHours(0,0,0,0),v?jsx("div",{ref:C,className:u(dl({size:t}),"flex items-center justify-center",e),style:{minHeight:300},...y,children:b||jsxs("div",{className:"flex items-center gap-2 py-8",children:[jsxs("svg",{className:"h-5 w-5 animate-spin text-muted-foreground",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),jsx("span",{className:"text-muted-foreground",children:"Loading..."})]})}):r.length===0?jsx("div",{ref:C,className:u(dl({size:t}),"flex items-center justify-center",e),style:{minHeight:300},...y,children:h||jsx("div",{className:"py-8 text-muted-foreground",children:"No tasks"})}):jsxs("div",{ref:C,className:u(dl({size:t}),e),...y,children:[jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[jsxs("div",{className:"text-sm font-medium text-foreground",children:[r.length," task",r.length!==1?"s":""]}),jsxs("div",{className:"flex items-center gap-1",children:[jsx(Cd,{mode:"day",currentMode:n,onClick:o||(()=>{}),children:"Day"}),jsx(Cd,{mode:"week",currentMode:n,onClick:o||(()=>{}),children:"Week"}),jsx(Cd,{mode:"month",currentMode:n,onClick:o||(()=>{}),children:"Month"})]})]}),jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex flex-col border-r",style:{width:p},children:[jsx("div",{className:"flex items-center border-b bg-muted/50 px-4 font-medium text-muted-foreground",style:{height:m},children:"Task Name"}),jsx("div",{ref:M,className:"overflow-hidden",onScroll:I,style:{maxHeight:`calc(100% - ${m}px)`},children:r.map(z=>jsx("div",{className:u("flex items-center border-b px-4 hover:bg-muted/50",a&&"cursor-pointer"),style:{height:l},onClick:()=>a?.(z),onDoubleClick:()=>s?.(z),children:g?g(z):jsx("span",{className:"truncate",children:z.name})},z.id))})]}),jsx("div",{className:"flex-1 overflow-hidden",children:jsxs("div",{ref:R,className:"overflow-auto",onScroll:E,children:[jsx("div",{className:"sticky top-0 z-10 flex border-b bg-muted/50",style:{height:m,width:L},children:S.map((z,O)=>{let $=n==="day"&&ZP(z,A),_=n==="day"&&my(z);return jsxs("div",{className:u("flex shrink-0 items-center justify-center border-r font-medium",$&&"bg-primary/10 text-primary",_&&c&&"bg-muted/80"),style:{width:w},children:[n==="day"&&YP(z,x),n==="week"&&qP(z,x),n==="month"&&XP(z,x)]},O)})}),jsxs("div",{className:"relative",style:{width:L,height:V},children:[S.map((z,O)=>{let $=n==="day"&&my(z);return jsx("div",{className:u("absolute top-0 border-r",$&&c&&"bg-muted/30"),style:{left:O*w,width:w,height:V}},O)}),r.map((z,O)=>jsx("div",{className:"absolute left-0 right-0 border-b",style:{top:(O+1)*l}},O)),i&&jsx("div",{className:"absolute top-0 z-20 w-0.5 bg-red-500",style:{left:N(),height:V}}),r.map((z,O)=>{let{left:$,width:_}=k(z),B=z.color||py[O%py.length];return z.isMilestone?jsx("div",{className:u("absolute flex items-center justify-center",a&&"cursor-pointer"),style:{left:$+_/2-8,top:O*l+l/2-8,width:16,height:16},onClick:()=>a?.(z),onDoubleClick:()=>s?.(z),children:jsx("svg",{className:"h-4 w-4",viewBox:"0 0 16 16",fill:B,children:jsx("path",{d:"M8 0L16 8L8 16L0 8L8 0Z"})})},z.id):jsx("div",{className:u("absolute flex items-center",a&&"cursor-pointer"),style:{left:$,top:O*l+8,width:_,height:l-16},onClick:()=>a?.(z),onDoubleClick:()=>s?.(z),children:f?f(z,_):jsxs("div",{className:"relative h-full w-full overflow-hidden rounded",style:{backgroundColor:`color-mix(in srgb, ${B} 30%, transparent)`},children:[z.progress!==void 0&&z.progress>0&&jsx("div",{className:"absolute left-0 top-0 h-full rounded-l",style:{width:`${z.progress}%`,backgroundColor:B}}),jsx("span",{className:"absolute inset-0 flex items-center px-2 text-xs font-medium",style:{color:B},children:jsx("span",{className:"truncate",children:z.name})})]})},z.id)})]})]})})]})]})}var fy=J.forwardRef(JP);fy.displayName="GanttChart";var vy=cva("org-chart",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"},direction:{vertical:"flex-col",horizontal:"flex-row"}},defaultVariants:{size:"md",direction:"vertical"}}),hy=cva("rounded-lg border bg-background p-3 shadow-sm transition-all",{variants:{size:{sm:"min-w-[120px] p-2",md:"min-w-[150px] p-3",lg:"min-w-[180px] p-4"},isSelected:{true:"ring-2 ring-primary",false:""},isCollapsed:{true:"opacity-80",false:""}},defaultVariants:{size:"md",isSelected:false,isCollapsed:false}}),xy=({node:e,size:t,direction:r,selectedId:n,collapsedIds:o,onNodeClick:a,onNodeDoubleClick:s,onCollapseChange:i,renderNode:c,lineColor:l,lineWidth:d,levelSpacing:m,siblingSpacing:p,collapsible:f,isRoot:g=false})=>{let v=n===e.id,b=o.has(e.id),h=e.children&&e.children.length>0,x=r==="vertical",y=R=>{R.stopPropagation(),a?.(e);},T=R=>{R.stopPropagation(),s?.(e);},C=R=>{R.stopPropagation(),i?.(e.id,!b);};return jsxs("div",{className:u("flex",x?"flex-col items-center":"flex-row items-center"),children:[!g&&jsx("div",{className:u(x?"w-px":"h-px",x?`h-[${m/2}px]`:`w-[${m/2}px]`),style:{backgroundColor:l,width:x?d:m/2,height:x?m/2:d}}),jsxs("div",{className:"relative",children:[c?jsx("div",{onClick:y,onDoubleClick:T,className:"cursor-pointer",role:"treeitem","aria-selected":v,"aria-expanded":h?!b:void 0,children:c(e,v)}):jsx("div",{className:u(hy({size:t,isSelected:v,isCollapsed:b}),a&&"cursor-pointer hover:shadow-md"),onClick:y,onDoubleClick:T,role:"treeitem","aria-selected":v,"aria-expanded":h?!b:void 0,children:jsxs("div",{className:"flex items-center gap-2",children:[e.avatar&&jsx("img",{src:e.avatar,alt:"",className:"h-8 w-8 rounded-full object-cover"}),jsxs("div",{className:"flex-1 min-w-0",children:[jsx("div",{className:"font-medium truncate",children:e.label}),e.subtitle&&jsx("div",{className:"text-muted-foreground truncate text-xs",children:e.subtitle})]})]})}),f&&h&&jsx("button",{type:"button",className:u("absolute flex h-5 w-5 items-center justify-center rounded-full border bg-background text-xs shadow-sm hover:bg-muted",x?"-bottom-2.5 left-1/2 -translate-x-1/2":"-right-2.5 top-1/2 -translate-y-1/2"),onClick:C,"aria-label":b?"Expand":"Collapse",children:b?"+":"\u2212"})]}),h&&!b&&jsxs(Fragment,{children:[jsx("div",{style:{backgroundColor:l,width:x?d:m/2,height:x?m/2:d}}),jsxs("div",{className:u("relative flex",x?"flex-row items-start":"flex-col items-start"),style:{gap:p},children:[e.children.length>1&&jsx("div",{className:"absolute",style:{backgroundColor:l,...x?{top:0,left:p/2,right:p/2,height:d}:{left:0,top:p/2,bottom:p/2,width:d}}}),e.children.map(R=>jsx(xy,{node:R,size:t,direction:r,selectedId:n,collapsedIds:o,onNodeClick:a,onNodeDoubleClick:s,onCollapseChange:i,renderNode:c,lineColor:l,lineWidth:d,levelSpacing:m,siblingSpacing:p,collapsible:f},R.id))]})]})]})};function QP({className:e,size:t,direction:r="vertical",data:n,selectedId:o,collapsedIds:a=new Set,onNodeClick:s,onNodeDoubleClick:i,onCollapseChange:c,renderNode:l,lineColor:d="hsl(var(--border))",lineWidth:m=2,levelSpacing:p=40,siblingSpacing:f=20,collapsible:g=true,isLoading:v=false,loadingContent:b,emptyContent:h,...x},y){return v?jsx("div",{ref:y,className:u("flex items-center justify-center rounded-lg border bg-background p-8",e),...x,children:b||jsxs("div",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-5 w-5 animate-spin text-muted-foreground",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),jsx("span",{className:"text-muted-foreground",children:"Loading..."})]})}):n?jsx("div",{ref:y,className:u(vy({size:t,direction:r}),"overflow-auto p-4",e),role:"tree","aria-label":"Organization chart",...x,children:jsx("div",{className:u("inline-flex",r==="vertical"?"flex-col items-center":"flex-row items-center"),children:jsx(xy,{node:n,size:t,direction:r,selectedId:o,collapsedIds:a,onNodeClick:s,onNodeDoubleClick:i,onCollapseChange:c,renderNode:l,lineColor:d,lineWidth:m,levelSpacing:p,siblingSpacing:f,collapsible:g,isRoot:true})})}):jsx("div",{ref:y,className:u("flex items-center justify-center rounded-lg border bg-background p-8",e),...x,children:h||jsx("div",{className:"text-muted-foreground",children:"No data"})})}var yy=J.forwardRef(QP);yy.displayName="OrgChart";var ml=cva("overflow-auto rounded-lg border font-mono",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),rE=(e,t)=>{let r=[],n=[];for(let l=0;l<=e.length;l++){n[l]=[];for(let d=0;d<=t.length;d++)l===0||d===0?n[l][d]=0:e[l-1]===t[d-1]?n[l][d]=n[l-1][d-1]+1:n[l][d]=Math.max(n[l-1][d],n[l][d-1]);}let o=[],a=e.length,s=t.length;for(;a>0||s>0;)a>0&&s>0&&e[a-1]===t[s-1]?(o.unshift({type:"unchanged",oldIdx:a-1,newIdx:s-1}),a--,s--):s>0&&(a===0||n[a][s-1]>=n[a-1][s])?(o.unshift({type:"added",newIdx:s-1}),s--):a>0&&(o.unshift({type:"removed",oldIdx:a-1}),a--);let i=1,c=1;for(let l of o)l.type==="unchanged"?r.push({type:"unchanged",content:e[l.oldIdx],oldLineNumber:i++,newLineNumber:c++}):l.type==="removed"?r.push({type:"removed",content:e[l.oldIdx],oldLineNumber:i++}):l.type==="added"&&r.push({type:"added",content:t[l.newIdx],newLineNumber:c++});return r},ul=({num:e,type:t})=>jsx("span",{className:u("inline-block w-12 select-none pr-2 text-right text-muted-foreground",t==="added"&&"bg-green-100 dark:bg-green-900/30",t==="removed"&&"bg-red-100 dark:bg-red-900/30"),children:e??" "}),Td=({content:e,type:t,prefix:r})=>jsxs("span",{className:u("flex-1 whitespace-pre",t==="added"&&"bg-green-50 text-green-800 dark:bg-green-900/20 dark:text-green-200",t==="removed"&&"bg-red-50 text-red-800 dark:bg-red-900/20 dark:text-red-200",t==="header"&&"bg-blue-50 text-blue-800 dark:bg-blue-900/20 dark:text-blue-200"),children:[r&&jsx("span",{className:u("inline-block w-5 text-center font-bold",t==="added"&&"text-green-600 dark:text-green-400",t==="removed"&&"text-red-600 dark:text-red-400"),children:r}),e||" "]});function nE({className:e,size:t,oldText:r,newText:n,viewMode:o="unified",showLineNumbers:a=true,fileName:s,oldFileName:i,renderLine:c,contextLines:l=3,isLoading:d=false,loadingContent:m,...p},f){let g=J.useMemo(()=>{let b=r.split(`
75
75
  `),h=n.split(`
76
- `);return rE(b,h)},[r,n]),v=J.useMemo(()=>{let b=g.filter(x=>x.type==="added").length,h=g.filter(x=>x.type==="removed").length;return {added:b,removed:h}},[g]);return d?jsx("div",{ref:f,className:u(ml({size:t}),"flex items-center justify-center p-8",e),...p,children:m||jsxs("div",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-5 w-5 animate-spin text-muted-foreground",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),jsx("span",{className:"text-muted-foreground",children:"Computing diff..."})]})}):g.length===0?jsx("div",{ref:f,className:u(ml({size:t}),"flex items-center justify-center p-8",e),...p,children:jsx("div",{className:"text-muted-foreground",children:"No differences"})}):jsxs("div",{ref:f,className:u(ml({size:t}),e),...p,children:[(s||i)&&jsxs("div",{className:"flex items-center justify-between border-b bg-muted/50 px-4 py-2",children:[jsx("div",{className:"flex items-center gap-2",children:i&&i!==s?jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground line-through",children:i}),jsx("span",{className:"text-muted-foreground",children:"\u2192"}),jsx("span",{className:"font-medium",children:s})]}):jsx("span",{className:"font-medium",children:s})}),jsxs("div",{className:"flex items-center gap-3 text-xs",children:[v.added>0&&jsxs("span",{className:"text-green-600 dark:text-green-400",children:["+",v.added]}),v.removed>0&&jsxs("span",{className:"text-red-600 dark:text-red-400",children:["\u2212",v.removed]})]})]}),o==="unified"?jsx("div",{className:"divide-y",children:g.map((b,h)=>c?jsx("div",{className:"flex",children:c(b)},h):jsxs("div",{className:u("flex",b.type==="added"&&"bg-green-50/50 dark:bg-green-900/10",b.type==="removed"&&"bg-red-50/50 dark:bg-red-900/10"),children:[a&&jsxs(Fragment,{children:[jsx(ul,{num:b.oldLineNumber,type:b.type}),jsx(ul,{num:b.newLineNumber,type:b.type})]}),jsx(Td,{content:b.content,type:b.type,prefix:b.type==="added"?"+":b.type==="removed"?"\u2212":" "})]},h))}):jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex-1 border-r",children:[jsx("div",{className:"border-b bg-muted/50 px-4 py-1 text-center text-xs text-muted-foreground",children:i||s||"Original"}),jsx("div",{className:"divide-y",children:g.filter(b=>b.type!=="added").map((b,h)=>jsxs("div",{className:u("flex",b.type==="removed"&&"bg-red-50/50 dark:bg-red-900/10"),children:[a&&jsx(ul,{num:b.oldLineNumber,type:b.type}),jsx(Td,{content:b.content,type:b.type==="removed"?"removed":"unchanged",prefix:b.type==="removed"?"\u2212":" "})]},h))})]}),jsxs("div",{className:"flex-1",children:[jsx("div",{className:"border-b bg-muted/50 px-4 py-1 text-center text-xs text-muted-foreground",children:s||"Modified"}),jsx("div",{className:"divide-y",children:g.filter(b=>b.type!=="removed").map((b,h)=>jsxs("div",{className:u("flex",b.type==="added"&&"bg-green-50/50 dark:bg-green-900/10"),children:[a&&jsx(ul,{num:b.newLineNumber,type:b.type}),jsx(Td,{content:b.content,type:b.type==="added"?"added":"unchanged",prefix:b.type==="added"?"+":" "})]},h))})]})]})]})}var wy=J.forwardRef(nE);wy.displayName="Diff";var Cy=cva("overflow-hidden rounded-lg border bg-zinc-900 font-mono text-zinc-100",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),aE={input:"text-zinc-100",output:"text-zinc-300",error:"text-red-400",success:"text-green-400",warning:"text-yellow-400",info:"text-blue-400"},sE=()=>jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),jsx("div",{className:"h-3 w-3 rounded-full bg-yellow-500"}),jsx("div",{className:"h-3 w-3 rounded-full bg-green-500"})]});function iE({className:e,size:t,lines:r=[],title:n="Terminal",showHeader:o=true,showTimestamps:a=false,prompt:s="$",inputValue:i,onInputChange:c,onSubmit:l,showInput:d=true,inputPlaceholder:m="Type a command...",autoScroll:p=true,renderLine:f,isLoading:g=false,loadingText:v="Processing...",height:b=400,readOnly:h=false,theme:x="dark",...y},T){let C=J.useRef(null),R=J.useRef(null),[M,P]=J.useState(""),S=i??M,w=c??P;J.useEffect(()=>{p&&C.current&&(C.current.scrollTop=C.current.scrollHeight);},[r,p]);let k=V=>{V.preventDefault(),S.trim()&&l&&(l(S.trim()),w(""));},N=V=>{V.key==="Enter"&&!V.shiftKey&&k(V);},E=()=>{!h&&R.current&&R.current.focus();},I=V=>V.toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"}),L=x==="light";return jsxs("div",{ref:T,className:u(Cy({size:t}),L&&"bg-zinc-50 text-zinc-900 border-zinc-200",e),style:{height:b},onClick:E,...y,children:[o&&jsxs("div",{className:u("flex items-center justify-between border-b px-4 py-2",L?"border-zinc-200 bg-zinc-100":"border-zinc-700 bg-zinc-800"),children:[jsx(sE,{}),jsx("span",{className:u("text-xs font-medium",L?"text-zinc-600":"text-zinc-400"),children:n}),jsx("div",{className:"w-14"})," "]}),jsxs("div",{ref:C,className:u("flex-1 overflow-auto p-4",L?"bg-zinc-50":"bg-zinc-900"),style:{height:o?"calc(100% - 40px)":"100%"},role:"log","aria-label":"Terminal output","aria-live":"polite",children:[r.map((V,A)=>{if(f)return jsx("div",{className:"leading-relaxed",children:f(V,A)},V.id??A);let z=aE[V.type||"output"];return jsxs("div",{className:u("leading-relaxed whitespace-pre-wrap",z),children:[a&&V.timestamp&&jsxs("span",{className:u("mr-2",L?"text-zinc-400":"text-zinc-500"),children:["[",I(V.timestamp),"]"]}),V.type==="input"&&jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:V.prefix||s}),V.content]},V.id??A)}),g&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:s}),jsx("span",{className:u("animate-pulse",L?"text-zinc-600":"text-zinc-400"),children:v}),jsx("span",{className:"animate-bounce",children:"\u258C"})]}),d&&!h&&!g&&jsxs("form",{onSubmit:k,className:"flex items-center",children:[jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:s}),jsx("input",{ref:R,type:"text",value:S,onChange:V=>w(V.target.value),onKeyDown:N,placeholder:m,className:u("flex-1 bg-transparent outline-none",L?"text-zinc-900 placeholder:text-zinc-400":"text-zinc-100 placeholder:text-zinc-500"),"aria-label":"Terminal input",autoComplete:"off",spellCheck:false}),jsx("span",{className:u("animate-pulse ml-0.5",L?"text-zinc-600":"text-zinc-400"),children:"\u258C"})]})]})]})}var Ty=J.forwardRef(iE);Ty.displayName="Terminal";var My=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h1",{ref:n,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...r,children:t}));My.displayName="H1";var Ny=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h2",{ref:n,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...r,children:t}));Ny.displayName="H2";var ky=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h3",{ref:n,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...r,children:t}));ky.displayName="H3";var Sy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h4",{ref:n,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...r,children:t}));Sy.displayName="H4";var Py=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...r,children:t}));Py.displayName="Paragraph";var Ey=J.forwardRef(({className:e,children:t,...r},n)=>jsx("blockquote",{ref:n,className:u("mt-6 border-l-2 pl-6 italic",e),...r,children:t}));Ey.displayName="Blockquote";var Ly=J.forwardRef(({className:e,children:t,...r},n)=>jsx("code",{ref:n,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...r,children:t}));Ly.displayName="InlineCode";var Dy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-xl text-muted-foreground",e),...r,children:t}));Dy.displayName="Lead";var Iy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("text-lg font-semibold",e),...r,children:t}));Iy.displayName="Large";var Hy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("small",{ref:n,className:u("text-sm font-medium leading-none",e),...r,children:t}));Hy.displayName="Small";var Vy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...r,children:t}));Vy.displayName="Muted";var Ay=J.forwardRef(({className:e,children:t,...r},n)=>jsx("ul",{ref:n,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...r,children:t}));Ay.displayName="UL";function lE(){let[e,t]=J.useState(false);return J.useEffect(()=>{t(true);},[]),e}var cE=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Md={default:["bg-muted","bg-emerald-200 dark:bg-emerald-900","bg-emerald-300 dark:bg-emerald-700","bg-emerald-500 dark:bg-emerald-500","bg-emerald-700 dark:bg-emerald-300"],success:["bg-muted","bg-green-200 dark:bg-green-900","bg-green-300 dark:bg-green-700","bg-green-500 dark:bg-green-500","bg-green-700 dark:bg-green-300"],warning:["bg-muted","bg-amber-200 dark:bg-amber-900","bg-amber-300 dark:bg-amber-700","bg-amber-500 dark:bg-amber-500","bg-amber-700 dark:bg-amber-300"],danger:["bg-muted","bg-red-200 dark:bg-red-900","bg-red-300 dark:bg-red-700","bg-red-500 dark:bg-red-500","bg-red-700 dark:bg-red-300"],primary:["bg-muted","bg-primary/20","bg-primary/40","bg-primary/60","bg-primary/80"],secondary:["bg-muted","bg-secondary/40","bg-secondary/60","bg-secondary/80","bg-secondary"]},Nd={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};function zy(e){return e.toISOString().split("T")[0]}function uE(e){return e instanceof Date?e:new Date(e)}function mE(e,t){let r=[],n=new Date(e);for(n.setDate(n.getDate()-n.getDay());n<=t;){let o=[];for(let a=0;a<7;a++)o.push(new Date(n)),n.setDate(n.getDate()+1);r.push(o);}return r}function pE(e){let t=[],r=-1;return e.forEach((n,o)=>{let a=n.find(s=>s.getDate()<=7);a&&a.getMonth()!==r&&(r=a.getMonth(),t.push({month:dE[r],position:o}));}),t}var Oy=J.forwardRef(({className:e,values:t,startDate:r,endDate:n,color:o="default",levels:a=5,showMonthLabels:s=true,showWeekdayLabels:i=true,showTooltip:c=true,tooltipFormatter:l,colorScale:d,gap:m=3,cellSize:p=12,radius:f="sm",onCellClick:g,emptyColor:v,showLegend:b=true,legendLabels:h={less:"Less",more:"More"},...x},y)=>{let T=lE(),{startDate:C,endDate:R}=J.useMemo(()=>{let L=n?new Date(n):new Date;return {startDate:r?new Date(r):new Date(L.getFullYear()-1,L.getMonth(),L.getDate()),endDate:L}},[r,n]),M=J.useMemo(()=>{let L=new Map;return t.forEach(V=>{let A=uE(V.date),z=zy(A);L.set(z,(L.get(z)||0)+V.count);}),L},[t]),P=J.useMemo(()=>M.size===0?0:Math.max(...Array.from(M.values())),[M]),S=J.useMemo(()=>mE(C,R),[C,R]),w=J.useMemo(()=>pE(S),[S]),k=L=>{if(L===0)return v||d?.[0]||Md[o][0];let V=d||Md[o],A=Math.min(Math.ceil(L/P*(a-1)),a-1);return V[A]||V[V.length-1]},N=(L,V)=>{if(l)return l(L,V);let A=L.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"});return jsxs("span",{children:[jsx("span",{className:"font-medium",children:V})," contributions on ",A]})},E=(L,V,A)=>{let z=zy(L),O=M.get(z)||0;if(!(L>=C&&L<=R))return jsx("div",{style:{width:p,height:p}},`${V}-${A}`);let _=jsx("div",{className:u("transition-all duration-200",Nd[f],k(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:p,height:p},onClick:()=>g?.(L,O),role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:B=>{g&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),g(L,O));}});return c?jsxs($r,{delayDuration:0,children:[jsx(Kr,{children:jsx("button",{type:"button",className:u("transition-all duration-200 border-0 bg-transparent p-0",Nd[f],k(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:p,height:p},onClick:()=>g?.(L,O),onKeyDown:B=>{g&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),g(L,O));}})}),jsx(Gr,{children:N(L,O)})]},`${V}-${A}`):jsx(J.Fragment,{children:_},`${V}-${A}`)},I=d||Md[o];return T?jsxs("div",{ref:y,className:u("inline-flex flex-col",e),...x,children:[jsxs("div",{className:"flex",children:[i&&jsx("div",{className:"flex flex-col justify-between pr-2",style:{gap:m,marginTop:s?20:0},children:cE.map((L,V)=>jsx("div",{className:u("text-xs text-muted-foreground",V%2===1&&"invisible"),style:{height:p,lineHeight:`${p}px`},children:L},L))}),jsxs("div",{className:"flex flex-col",children:[s&&jsx("div",{className:"relative mb-1",style:{height:16,width:S.length*(p+m)-m},children:w.map(({month:L,position:V},A)=>jsx("div",{className:"absolute text-xs text-muted-foreground whitespace-nowrap",style:{left:V*(p+m)},children:L},`${L}-${A}`))}),jsx("div",{className:"flex",style:{gap:m},children:S.map((L,V)=>jsx("div",{className:"flex flex-col",style:{gap:m},children:L.map((A,z)=>E(A,V,z))},V))})]})]}),b&&jsxs("div",{className:"flex items-center justify-end mt-4 gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground",children:h.less}),jsx("div",{className:"flex",style:{gap:m/2},children:I.slice(0,a).map((L,V)=>jsx("div",{className:u(Nd[f],L),style:{width:p,height:p}},V))}),jsx("span",{className:"text-xs text-muted-foreground",children:h.more})]})]}):jsx("div",{ref:y,className:u("inline-flex flex-col",e),...x})});Oy.displayName="HeatmapCalendar";var fE=J.forwardRef(({className:e,beforeImage:t,afterImage:r,beforeAlt:n="Before",afterAlt:o="After",defaultPosition:a=50,position:s,onPositionChange:i,orientation:c="horizontal",showLabels:l=true,beforeLabel:d="Before",afterLabel:m="After",handleVariant:p="default",handleColor:f="default",aspectRatio:g,disableKeyboard:v=false,handleWidth:b=4,...h},x)=>{let[y,T]=J.useState(a),C=s!==void 0,R=C?s:y,M=J.useRef(null),[P,S]=J.useState(false),[w,k]=J.useState({width:0,height:0});J.useEffect(()=>{let B=()=>{M.current&&k({width:M.current.offsetWidth,height:M.current.offsetHeight});};B();let U=new ResizeObserver(B);return M.current&&U.observe(M.current),()=>U.disconnect()},[]);let N=B=>{let U=Math.max(0,Math.min(100,B));C||T(U),i?.(U);},E=(B,U)=>{if(!M.current)return R;let K=M.current.getBoundingClientRect();return c==="horizontal"?(B-K.left)/K.width*100:(U-K.top)/K.height*100},I=B=>{B.preventDefault(),S(true),B.target.setPointerCapture(B.pointerId);let U=E(B.clientX,B.clientY);N(U);},L=B=>{if(!P)return;let U=E(B.clientX,B.clientY);N(U);},V=()=>{S(false);},A=B=>{if(v)return;let U=B.shiftKey?10:1,K=R;switch(B.key){case "ArrowLeft":case "ArrowUp":B.preventDefault(),K=R-U;break;case "ArrowRight":case "ArrowDown":B.preventDefault(),K=R+U;break;case "Home":B.preventDefault(),K=0;break;case "End":B.preventDefault(),K=100;break;default:return}N(K);},z={default:"bg-border",primary:"bg-primary",white:"bg-white",black:"bg-black"},O={default:"bg-background border-border text-foreground",primary:"bg-primary border-primary text-primary-foreground",white:"bg-white border-white text-black",black:"bg-black border-black text-white"},$=()=>{let B=c==="horizontal",U=u("absolute z-10 flex items-center justify-center",B?"top-0 bottom-0 cursor-ew-resize":"left-0 right-0 cursor-ns-resize",z[f]),K=B?{left:`${R}%`,width:b,transform:"translateX(-50%)"}:{top:`${R}%`,height:b,transform:"translateY(-50%)"};return p==="minimal"?jsx("div",{className:U,style:K}):p==="arrows"?jsx("div",{className:U,style:K,children:jsxs("div",{className:u("absolute flex items-center justify-center gap-0.5 rounded-full p-1.5 shadow-md border-2",O[f],B?"flex-row":"flex-col"),children:[jsx("svg",{className:u("w-3 h-3",B?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M15 18l-6-6 6-6"})}),jsx("svg",{className:u("w-3 h-3",B?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M9 18l6-6-6-6"})})]})}):jsx("div",{className:U,style:K,children:jsx("div",{className:u("absolute rounded-full p-2 shadow-md border-2",O[f]),children:jsxs("svg",{className:u("w-4 h-4",B?"":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M8 3L4 7l4 4"}),jsx("path",{d:"M16 3l4 4-4 4"}),jsx("path",{d:"M4 7h16"}),jsx("path",{d:"M8 17l-4 4 4 4"}),jsx("path",{d:"M16 17l4 4-4 4"}),jsx("path",{d:"M4 21h16"})]})})})},_=c==="horizontal";return jsx("div",{ref:x,className:u("relative select-none overflow-hidden rounded-lg",P&&"cursor-grabbing",e),style:g?{aspectRatio:g}:void 0,...h,children:jsxs("div",{ref:M,className:"relative w-full h-full",role:"slider",tabIndex:0,"aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-orientation":c,"aria-label":"Image comparison slider",onPointerDown:I,onPointerMove:L,onPointerUp:V,onPointerCancel:V,onKeyDown:A,children:[jsx("img",{src:r,alt:o,className:"absolute inset-0 w-full h-full object-cover",draggable:false}),jsx("div",{className:"absolute inset-0 overflow-hidden",style:_?{width:`${R}%`}:{height:`${R}%`},children:jsx("img",{src:t,alt:n,className:"absolute object-cover",style:{top:0,left:0,width:w.width>0?`${w.width}px`:"100%",height:w.height>0?`${w.height}px`:"100%"},draggable:false})}),$(),l&&jsxs(Fragment,{children:[jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none","top-3 left-3"),children:d}),jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none",_?"top-3 right-3":"bottom-3 left-3"),children:m})]})]})})});fE.displayName="ImageComparison";function By(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?`${t}:${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`:`${r}:${n.toString().padStart(2,"0")}`}var NE={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},$y=J.forwardRef(({className:e,src:t,poster:r,autoPlay:n=false,muted:o=false,loop:a=false,controls:s=true,preload:i="metadata",aspectRatio:c="16/9",defaultVolume:l=1,playbackSpeeds:d=[.5,.75,1,1.25,1.5,2],showPiP:m=true,showFullscreen:p=true,showVolume:f=true,showPlaybackSpeed:g=true,showSkipButtons:v=false,skipInterval:b=10,onPlay:h,onPause:x,onEnded:y,onVideoTimeUpdate:T,onVideoVolumeChange:C,controlsHideTimeout:R=3e3,keyboardShortcuts:M=true,doubleClickFullscreen:P=true,radius:S="lg",...w},k)=>{let N=J.useRef(null),E=J.useRef(null),I=J.useRef(null),[L,V]=J.useState(false),[A,z]=J.useState(0),[O,$]=J.useState(0),[_,B]=J.useState(l),[U,K]=J.useState(o),[D,H]=J.useState(false),[F,W]=J.useState(true),[X,Z]=J.useState(true),[me,ve]=J.useState(1),[j,G]=J.useState(0),Y=J.useMemo(()=>typeof t=="string"?[{src:t,type:void 0,label:void 0}]:t,[t]),[q,Q]=J.useState(0),ce=J.useCallback(()=>{I.current&&clearTimeout(I.current),Z(true),L&&R>0&&(I.current=setTimeout(()=>{Z(false);},R));},[L,R]);J.useEffect(()=>(ce(),()=>{I.current&&clearTimeout(I.current);}),[L,ce]);let Ne=()=>{E.current&&($(E.current.duration),W(false));},nt=()=>{if(E.current){z(E.current.currentTime),T?.(E.current.currentTime,E.current.duration);let ne=E.current.buffered.length>0?E.current.buffered.end(E.current.buffered.length-1):0;G(ne/E.current.duration*100);}},he=()=>{V(true),h?.();},Xe=()=>{V(false),x?.();},te=()=>{V(false),y?.();},_e=()=>{W(true);},hr=()=>{W(false);},re=()=>{E.current&&(L?E.current.pause():E.current.play());},oe=ne=>{if(E.current){let Ce=ne[0]/100*O;E.current.currentTime=Ce,z(Ce);}},Se=ne=>{let Ce=ne[0]/100;B(Ce),K(Ce===0),E.current&&(E.current.volume=Ce,E.current.muted=Ce===0),C?.(Ce,Ce===0);},sr=()=>{if(E.current){let ne=!U;E.current.muted=ne,K(ne),ne?E.current.volume=0:E.current.volume=_||1,C?.(ne?0:_,ne);}},kt=async()=>{if(N.current)try{D?await document.exitFullscreen():await N.current.requestFullscreen();}catch{}},Ho=async()=>{if(E.current)try{document.pictureInPictureElement?await document.exitPictureInPicture():await E.current.requestPictureInPicture();}catch{}},Ee=ne=>{E.current&&(E.current.currentTime=Math.max(0,Math.min(O,E.current.currentTime+ne)));},ot=ne=>{E.current&&(E.current.playbackRate=ne,ve(ne));};J.useEffect(()=>{let ne=()=>{H(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ne),()=>{document.removeEventListener("fullscreenchange",ne);}},[]),J.useEffect(()=>{if(!M)return;let ne=Ce=>{if(!(!N.current?.contains(document.activeElement)&&document.activeElement!==N.current))switch(Ce.key.toLowerCase()){case " ":case "k":Ce.preventDefault(),re();break;case "f":Ce.preventDefault(),kt();break;case "m":Ce.preventDefault(),sr();break;case "arrowleft":Ce.preventDefault(),Ee(-b);break;case "arrowright":Ce.preventDefault(),Ee(b);break;case "arrowup":Ce.preventDefault(),Se([Math.min(100,_*100+10)]);break;case "arrowdown":Ce.preventDefault(),Se([Math.max(0,_*100-10)]);break}};return window.addEventListener("keydown",ne),()=>{window.removeEventListener("keydown",ne);}},[M,L,_,b]);let ir=()=>{P&&kt();},je=O>0?A/O*100:0;return jsxs("div",{ref:ne=>{N.current=ne,typeof k=="function"?k(ne):k&&(k.current=ne);},className:u("relative bg-black overflow-hidden group",NE[S],e),style:{aspectRatio:c},onMouseMove:ce,onMouseLeave:()=>L&&Z(false),tabIndex:0,...w,children:[jsx("video",{ref:E,className:"w-full h-full object-contain",poster:r,autoPlay:n,muted:o,loop:a,preload:i,playsInline:true,onClick:re,onDoubleClick:ir,onLoadedMetadata:Ne,onTimeUpdate:nt,onPlay:he,onPause:Xe,onEnded:te,onWaiting:_e,onCanPlay:hr,children:Y.map((ne,Ce)=>jsx("source",{src:ne.src,type:ne.type},Ce))}),F&&jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:jsx(Loader2,{className:"w-12 h-12 text-white animate-spin"})}),!L&&!F&&jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity cursor-pointer",onClick:re,children:jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center",children:jsx(Play,{className:"w-8 h-8 text-black ml-1",fill:"currentColor"})})}),s&&jsxs("div",{className:u("absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-16 transition-opacity duration-300",X?"opacity-100":"opacity-0 pointer-events-none"),children:[jsxs("div",{className:"relative mb-3 group/progress",children:[jsx("div",{className:"absolute top-1/2 left-0 h-1 bg-white/30 rounded-full -translate-y-1/2",style:{width:`${j}%`}}),jsx(yr,{value:[je],onValueChange:oe,min:0,max:100,step:.1,className:"h-1 group-hover/progress:h-2 transition-all cursor-pointer [&_[role=slider]]:w-3 [&_[role=slider]]:h-3 [&_[role=slider]]:opacity-0 group-hover/progress:[&_[role=slider]]:opacity-100 [&_[role=slider]]:transition-opacity"})]}),jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:re,children:L?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5",fill:"currentColor"})}),v&&jsxs(Fragment,{children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>Ee(-b),children:jsx(SkipBack,{className:"w-5 h-5"})}),jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>Ee(b),children:jsx(SkipForward,{className:"w-5 h-5"})})]}),f&&jsxs("div",{className:"flex items-center gap-1 group/volume",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:sr,children:U||_===0?jsx(VolumeX,{className:"w-5 h-5"}):jsx(Volume2,{className:"w-5 h-5"})}),jsx("div",{className:"w-0 overflow-hidden group-hover/volume:w-20 transition-all",children:jsx(yr,{value:[U?0:_*100],onValueChange:Se,min:0,max:100,step:1,className:"w-20"})})]}),jsxs("div",{className:"text-white text-sm ml-2",children:[By(A)," / ",By(O)]})]}),jsxs("div",{className:"flex items-center gap-1",children:[g&&jsxs(At,{children:[jsx(zt,{children:jsxs("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer flex items-center gap-1",children:[jsx(Settings,{className:"w-5 h-5"}),jsxs("span",{className:"text-xs",children:[me,"x"]})]})}),jsx(Ot,{align:"end",className:"min-w-[100px]",children:d.map(ne=>jsxs(xt,{onSelect:()=>ot(ne),className:u(me===ne&&"bg-primary/10 text-primary"),children:[ne,"x"]},ne))})]}),Y.length>1&&jsxs(At,{children:[jsx(zt,{children:jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer text-xs",children:Y[q]?.quality||Y[q]?.label||"Quality"})}),jsx(Ot,{align:"end",className:"min-w-[100px]",children:Y.map((ne,Ce)=>jsx(xt,{onSelect:()=>{let to=E.current?.currentTime||0;Q(Ce),setTimeout(()=>{E.current&&(E.current.currentTime=to,L&&E.current.play());},100);},className:u(q===Ce&&"bg-primary/10 text-primary"),children:ne.quality||ne.label||`Source ${Ce+1}`},Ce))})]}),m&&typeof document<"u"&&document.pictureInPictureEnabled&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Ho,children:jsx(PictureInPicture,{className:"w-5 h-5"})}),p&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:kt,children:D?jsx(Minimize,{className:"w-5 h-5"}):jsx(Maximize,{className:"w-5 h-5"})})]})]})]})]})});$y.displayName="VideoPlayer";function ps(e){if(!e||!isFinite(e))return "0:00";let t=Math.floor(e/60),r=Math.floor(e%60);return `${t}:${r.toString().padStart(2,"0")}`}var Ky={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},AE={default:{progress:"bg-foreground",waveformActive:"bg-foreground",waveformInactive:"bg-muted-foreground/30"},primary:{progress:"bg-primary",waveformActive:"bg-primary",waveformInactive:"bg-primary/20"},success:{progress:"bg-green-500",waveformActive:"bg-green-500",waveformInactive:"bg-green-500/20"},warning:{progress:"bg-amber-500",waveformActive:"bg-amber-500",waveformInactive:"bg-amber-500/20"},danger:{progress:"bg-red-500",waveformActive:"bg-red-500",waveformInactive:"bg-red-500/20"}},Gy=J.forwardRef(({className:e,src:t,autoPlay:r=false,defaultVolume:n=1,loop:o=false,muted:a=false,showWaveform:s=true,waveformData:i,waveformBars:c=50,showTrackInfo:l=true,showVolume:d=true,showSkipButtons:m=false,skipInterval:p=10,showLoop:f=true,showShuffle:g=false,showDownload:v=false,variant:b="default",color:h="default",customColor:x,onPlay:y,onPause:T,onEnded:C,onAudioTimeUpdate:R,radius:M="lg",...P},S)=>{let w=J.useRef(null),k=J.useRef(null),[N,E]=J.useState(false),[I,L]=J.useState(0),[V,A]=J.useState(0),[z,O]=J.useState(n),[$,_]=J.useState(a),[B,U]=J.useState(true),[K,D]=J.useState(o),[H,F]=J.useState(false),W=J.useMemo(()=>typeof t=="string"?{src:t}:t,[t]),X=J.useMemo(()=>{if(i)return i;let oe=[];for(let Se=0;Se<c;Se++)oe.push(.2+Math.random()*.8);return oe},[i,c]),Z=()=>{w.current&&(A(w.current.duration),U(false));},me=()=>{w.current&&(L(w.current.currentTime),R?.(w.current.currentTime,w.current.duration));},ve=()=>{E(true),y?.();},j=()=>{E(false),T?.();},G=()=>{E(false),C?.();},Y=()=>{U(false);},q=()=>{w.current&&(N?w.current.pause():w.current.play());},Q=oe=>{if(w.current&&V){let Se=oe/100*V;w.current.currentTime=Se,L(Se);}},ce=oe=>{if(!k.current||!V)return;let Se=k.current.getBoundingClientRect(),sr=(oe.clientX-Se.left)/Se.width*100;Q(sr);},Ne=oe=>{let Se=oe[0]/100;O(Se),_(Se===0),w.current&&(w.current.volume=Se,w.current.muted=Se===0);},nt=()=>{if(w.current){let oe=!$;w.current.muted=oe,_(oe);}},he=()=>{if(w.current){let oe=!K;w.current.loop=oe,D(oe);}},Xe=oe=>{w.current&&(w.current.currentTime=Math.max(0,Math.min(V,w.current.currentTime+oe)));},te=()=>{let oe=document.createElement("a");oe.href=W.src,oe.download=W.title||"audio",document.body.appendChild(oe),oe.click(),document.body.removeChild(oe);},_e=V>0?I/V*100:0,hr=AE[h],re=$||z===0?VolumeX:z<.5?Volume1:Volume2;return b==="compact"?jsxs("div",{ref:S,className:u("flex items-center gap-3 p-2 bg-muted/50",Ky[M],e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded-full transition-colors cursor-pointer",onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-4 h-4 animate-spin"}):N?jsx(Pause,{className:"w-4 h-4",fill:"currentColor"}):jsx(Play,{className:"w-4 h-4",fill:"currentColor"})}),jsx("div",{className:"flex-1",children:jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1,className:"h-1"})}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(I)})]}):b==="minimal"?jsxs("div",{ref:S,className:u("flex items-center gap-4",e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),jsx("button",{type:"button",className:u("p-3 rounded-full transition-colors cursor-pointer",!x&&hr.progress,"text-white hover:opacity-90"),style:x?{backgroundColor:x}:void 0,onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-5 h-5 animate-spin"}):N?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5 ms-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[l&&W.title&&jsx("span",{className:"text-sm font-medium truncate",children:W.title}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(I)}),jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1,className:"flex-1"}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(V)})]})]})]}):jsxs("div",{ref:S,className:u("p-4 bg-card border border-border",Ky[M],e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),l&&(W.title||W.artist||W.artwork)&&jsxs("div",{className:"flex items-center gap-4 mb-4",children:[W.artwork&&jsx("img",{src:W.artwork,alt:W.title||"Album artwork",className:"w-16 h-16 rounded-md object-cover"}),jsxs("div",{className:"flex-1 min-w-0",children:[W.title&&jsx("h3",{className:"font-medium truncate",children:W.title}),W.artist&&jsx("p",{className:"text-sm text-muted-foreground truncate",children:W.artist}),W.album&&jsx("p",{className:"text-xs text-muted-foreground truncate",children:W.album})]})]}),s?jsx("div",{ref:k,className:"relative h-16 mb-4 flex items-end gap-[2px] cursor-pointer",onClick:ce,children:X.map((oe,Se)=>{let kt=(Se+1)/X.length*100<=_e;return jsx("div",{className:u("flex-1 rounded-sm transition-colors",!x&&(kt?hr.waveformActive:hr.waveformInactive)),style:{height:`${oe*100}%`,minHeight:4,...x&&{backgroundColor:kt?x:`${x}33`}}},Se)})}):jsx("div",{className:"mb-4",children:jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1})}),jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-4",children:[jsx("span",{children:ps(I)}),jsx("span",{children:ps(V)})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-1",children:[g&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",H&&"text-primary"),onClick:()=>F(!H),children:jsx(Shuffle,{className:"w-4 h-4"})}),m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>Xe(-p),children:jsx(SkipBack,{className:"w-5 h-5"})})]}),jsx("button",{type:"button",className:u("p-4 rounded-full transition-colors cursor-pointer",!x&&hr.progress,"text-white hover:opacity-90"),style:x?{backgroundColor:x}:void 0,onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-6 h-6 animate-spin"}):N?jsx(Pause,{className:"w-6 h-6",fill:"currentColor"}):jsx(Play,{className:"w-6 h-6 ms-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>Xe(p),children:jsx(SkipForward,{className:"w-5 h-5"})}),f&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",K&&"text-primary"),onClick:he,children:jsx(Repeat,{className:"w-4 h-4"})})]})]}),jsxs("div",{className:"flex items-center justify-between mt-4",children:[d?jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded transition-colors cursor-pointer",onClick:nt,children:jsx(re,{className:"w-4 h-4"})}),jsx(yr,{value:[$?0:z*100],onValueChange:Ne,min:0,max:100,step:1,className:"w-24"})]}):jsx("div",{}),v&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:te,children:jsx(Download,{className:"w-4 h-4"})})]})]})});Gy.displayName="AudioPlayer";var qE={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Uy=J.forwardRef(({className:e,src:t,defaultPage:r=1,defaultZoom:n=100,showToolbar:o=true,showNavigation:a=true,showZoomControls:s=true,showDownload:i=true,showPrint:c=true,showFullscreen:l=true,showRotate:d=true,showSearch:m=false,zoomStep:p=25,minZoom:f=25,maxZoom:g=400,toolbarPosition:v="top",height:b="600px",onPageChange:h,onZoomChange:x,onPDFLoad:y,onPDFError:T,errorMessage:C="Failed to load PDF. Please try again.",loadingMessage:R="Loading PDF...",fileName:M="document.pdf",totalPages:P=1,radius:S="lg",...w},k)=>{let N=J.useRef(null),E=J.useRef(null),[I,L]=J.useState(r),[V]=J.useState(P),[A,z]=J.useState(n),[O,$]=J.useState(0),[_,B]=J.useState(false),[U,K]=J.useState(true),[D,H]=J.useState(false),[F,W]=J.useState(String(r)),X=te=>{let _e=Math.max(1,Math.min(V,te));L(_e),W(String(_e)),h?.(_e);},Z=te=>{W(te.target.value);},me=()=>{let te=parseInt(F,10);isNaN(te)?W(String(I)):X(te);},ve=te=>{te.key==="Enter"&&me();},j=()=>{let te=Math.min(g,A+p);z(te),x?.(te);},G=()=>{let te=Math.max(f,A-p);z(te),x?.(te);},Y=()=>{$(te=>(te+90)%360);},q=async()=>{if(N.current)try{_?await document.exitFullscreen():await N.current.requestFullscreen();}catch{}};J.useEffect(()=>{let te=()=>{B(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",te),()=>{document.removeEventListener("fullscreenchange",te);}},[]);let Q=()=>{let te=document.createElement("a");te.href=t,te.download=M,document.body.appendChild(te),te.click(),document.body.removeChild(te);},ce=()=>{E.current?.contentWindow&&E.current.contentWindow.print();},Ne=()=>{K(false),H(false),y?.();},nt=()=>{K(false),H(true),T?.(new Error("Failed to load PDF"));},he=J.useMemo(()=>{if(typeof window>"u")return t;try{let te=new URL(t,window.location.href);return te.hash=`page=${I}&zoom=${A}`,te.toString()}catch{return t}},[t,I,A]),Xe=jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 bg-muted/50 border-b border-border",children:[a&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>X(I-1),disabled:I<=1,title:"Previous page",children:jsx(ChevronLeft,{className:"w-4 h-4"})}),jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(Sn,{value:F,onChange:Z,onBlur:me,onKeyDown:ve,className:"w-12 h-7 text-center text-sm px-1"}),jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",V]})]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>X(I+1),disabled:I>=V,title:"Next page",children:jsx(ChevronRight,{className:"w-4 h-4"})})]}),s&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:G,disabled:A<=f,title:"Zoom out",children:jsx(ZoomOut,{className:"w-4 h-4"})}),jsxs("span",{className:"text-sm text-muted-foreground min-w-[50px] text-center",children:[A,"%"]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:j,disabled:A>=g,title:"Zoom in",children:jsx(ZoomIn,{className:"w-4 h-4"})})]}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",title:"Search",children:jsx(Search,{className:"w-4 h-4"})}),d&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Y,title:"Rotate",children:jsx(RotateCw,{className:"w-4 h-4"})}),c&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:ce,title:"Print",children:jsx(Printer,{className:"w-4 h-4"})}),i&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Q,title:"Download",children:jsx(Download,{className:"w-4 h-4"})}),l&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:q,title:_?"Exit fullscreen":"Fullscreen",children:_?jsx(Minimize,{className:"w-4 h-4"}):jsx(Maximize,{className:"w-4 h-4"})})]})]});return jsxs("div",{ref:te=>{N.current=te,typeof k=="function"?k(te):k&&(k.current=te);},className:u("flex flex-col bg-card border border-border overflow-hidden",qE[S],e),style:{height:_?"100vh":b},...w,children:[o&&v==="top"&&Xe,jsxs("div",{className:"flex-1 relative overflow-hidden bg-muted/30",children:[U&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background/80 z-10",children:[jsx(Loader2,{className:"w-8 h-8 animate-spin text-muted-foreground mb-2"}),jsx("span",{className:"text-sm text-muted-foreground",children:R})]}),D&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background z-10",children:[jsx(FileWarning,{className:"w-12 h-12 text-muted-foreground mb-3"}),jsx("span",{className:"text-sm text-muted-foreground",children:C}),jsx("button",{type:"button",className:"mt-3 px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors cursor-pointer",onClick:()=>{K(true),H(false);},children:"Try again"})]}),jsx("iframe",{ref:E,src:he,className:"w-full h-full border-0",style:{transform:`rotate(${O}deg) scale(${A/100})`,transformOrigin:"center center"},onLoad:Ne,onError:nt,title:"PDF Viewer"})]}),o&&v==="bottom"&&Xe]})});Uy.displayName="PDFViewer";function Wy({steps:e,isOpen:t=false,onClose:r,onComplete:n,onStepChange:o,currentStep:a,defaultStep:s=0,showOverlay:i=true,showIndicators:c=true,showCloseButton:l=true,closeOnOverlayClick:d=true,closeOnEscape:m=true,className:p,highlightPadding:f=8,highlightRadius:g=8,labels:v={}}){let[b,h]=J.useState(s),[x,y]=J.useState(null),[T,C]=J.useState({top:0,left:0}),[R,M]=J.useState(false),P=J.useRef(null),S=a!==void 0,w=S?a:b,k=e[w],{next:N="Next",prev:E="Previous",skip:I="Skip",finish:L="Finish"}=v;J.useEffect(()=>{M(true);},[]),J.useEffect(()=>{if(!t||!k)return;let B=()=>typeof k.target=="string"?document.querySelector(k.target):k.target.current,U=()=>{let K=B();K&&(y(K.getBoundingClientRect()),k.onActive?.());};return U(),window.addEventListener("scroll",U,true),window.addEventListener("resize",U),()=>{window.removeEventListener("scroll",U,true),window.removeEventListener("resize",U);}},[t,k,w]),J.useEffect(()=>{if(!x||!P.current)return;let B=P.current.getBoundingClientRect(),U=k?.placement||"bottom",K=12,D=0,H=0;switch(U){case "top":D=x.top-B.height-K-f,H=x.left+x.width/2-B.width/2;break;case "bottom":D=x.bottom+K+f,H=x.left+x.width/2-B.width/2;break;case "left":D=x.top+x.height/2-B.height/2,H=x.left-B.width-K-f;break;case "right":D=x.top+x.height/2-B.height/2,H=x.right+K+f;break}let F=window.innerWidth,W=window.innerHeight;H<K&&(H=K),H+B.width>F-K&&(H=F-B.width-K),D<K&&(D=K),D+B.height>W-K&&(D=W-B.height-K),C({top:D,left:H});},[x,k?.placement,f]),J.useEffect(()=>{if(!t||!m)return;let B=U=>{U.key==="Escape"&&r?.();};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[t,m,r]);let V=()=>{if(w<e.length-1){let B=w+1;S||h(B),o?.(B);}else n?.(),r?.();},A=()=>{if(w>0){let B=w-1;S||h(B),o?.(B);}},z=()=>{r?.();},O=()=>{d&&r?.();};if(!R||!t||!k)return null;let $=w===0,_=w===e.length-1;return zs.createPortal(jsxs(Fragment,{children:[i&&x&&jsx("div",{className:"fixed inset-0 z-[9998] transition-opacity duration-200",onClick:O,style:{background:`radial-gradient(
76
+ `);return rE(b,h)},[r,n]),v=J.useMemo(()=>{let b=g.filter(x=>x.type==="added").length,h=g.filter(x=>x.type==="removed").length;return {added:b,removed:h}},[g]);return d?jsx("div",{ref:f,className:u(ml({size:t}),"flex items-center justify-center p-8",e),...p,children:m||jsxs("div",{className:"flex items-center gap-2",children:[jsxs("svg",{className:"h-5 w-5 animate-spin text-muted-foreground",fill:"none",viewBox:"0 0 24 24",children:[jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),jsx("span",{className:"text-muted-foreground",children:"Computing diff..."})]})}):g.length===0?jsx("div",{ref:f,className:u(ml({size:t}),"flex items-center justify-center p-8",e),...p,children:jsx("div",{className:"text-muted-foreground",children:"No differences"})}):jsxs("div",{ref:f,className:u(ml({size:t}),e),...p,children:[(s||i)&&jsxs("div",{className:"flex items-center justify-between border-b bg-muted/50 px-4 py-2",children:[jsx("div",{className:"flex items-center gap-2",children:i&&i!==s?jsxs(Fragment,{children:[jsx("span",{className:"text-muted-foreground line-through",children:i}),jsx("span",{className:"text-muted-foreground",children:"\u2192"}),jsx("span",{className:"font-medium",children:s})]}):jsx("span",{className:"font-medium",children:s})}),jsxs("div",{className:"flex items-center gap-3 text-xs",children:[v.added>0&&jsxs("span",{className:"text-green-600 dark:text-green-400",children:["+",v.added]}),v.removed>0&&jsxs("span",{className:"text-red-600 dark:text-red-400",children:["\u2212",v.removed]})]})]}),o==="unified"?jsx("div",{className:"divide-y",children:g.map((b,h)=>c?jsx("div",{className:"flex",children:c(b)},h):jsxs("div",{className:u("flex",b.type==="added"&&"bg-green-50/50 dark:bg-green-900/10",b.type==="removed"&&"bg-red-50/50 dark:bg-red-900/10"),children:[a&&jsxs(Fragment,{children:[jsx(ul,{num:b.oldLineNumber,type:b.type}),jsx(ul,{num:b.newLineNumber,type:b.type})]}),jsx(Td,{content:b.content,type:b.type,prefix:b.type==="added"?"+":b.type==="removed"?"\u2212":" "})]},h))}):jsxs("div",{className:"flex",children:[jsxs("div",{className:"flex-1 border-r",children:[jsx("div",{className:"border-b bg-muted/50 px-4 py-1 text-center text-xs text-muted-foreground",children:i||s||"Original"}),jsx("div",{className:"divide-y",children:g.filter(b=>b.type!=="added").map((b,h)=>jsxs("div",{className:u("flex",b.type==="removed"&&"bg-red-50/50 dark:bg-red-900/10"),children:[a&&jsx(ul,{num:b.oldLineNumber,type:b.type}),jsx(Td,{content:b.content,type:b.type==="removed"?"removed":"unchanged",prefix:b.type==="removed"?"\u2212":" "})]},h))})]}),jsxs("div",{className:"flex-1",children:[jsx("div",{className:"border-b bg-muted/50 px-4 py-1 text-center text-xs text-muted-foreground",children:s||"Modified"}),jsx("div",{className:"divide-y",children:g.filter(b=>b.type!=="removed").map((b,h)=>jsxs("div",{className:u("flex",b.type==="added"&&"bg-green-50/50 dark:bg-green-900/10"),children:[a&&jsx(ul,{num:b.newLineNumber,type:b.type}),jsx(Td,{content:b.content,type:b.type==="added"?"added":"unchanged",prefix:b.type==="added"?"+":" "})]},h))})]})]})]})}var wy=J.forwardRef(nE);wy.displayName="Diff";var Cy=cva("overflow-hidden rounded-lg border bg-zinc-900 font-mono text-zinc-100",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),aE={input:"text-zinc-100",output:"text-zinc-300",error:"text-red-400",success:"text-green-400",warning:"text-yellow-400",info:"text-blue-400"},sE={input:"text-zinc-900",output:"text-zinc-700",error:"text-red-600",success:"text-green-600",warning:"text-yellow-600",info:"text-blue-600"},iE=()=>jsxs("div",{className:"flex items-center gap-2",children:[jsx("div",{className:"h-3 w-3 rounded-full bg-red-500"}),jsx("div",{className:"h-3 w-3 rounded-full bg-yellow-500"}),jsx("div",{className:"h-3 w-3 rounded-full bg-green-500"})]});function lE({className:e,size:t,lines:r=[],title:n="Terminal",showHeader:o=true,showTimestamps:a=false,prompt:s="$",inputValue:i,onInputChange:c,onSubmit:l,showInput:d=true,inputPlaceholder:m="Type a command...",autoScroll:p=true,renderLine:f,isLoading:g=false,loadingText:v="Processing...",height:b=400,readOnly:h=false,theme:x="dark",...y},T){let C=J.useRef(null),R=J.useRef(null),[M,P]=J.useState(""),S=i??M,w=c??P;J.useEffect(()=>{p&&C.current&&(C.current.scrollTop=C.current.scrollHeight);},[r,p]);let k=V=>{V.preventDefault(),S.trim()&&l&&(l(S.trim()),w(""));},N=V=>{V.key==="Enter"&&!V.shiftKey&&k(V);},E=()=>{!h&&R.current&&R.current.focus();},I=V=>V.toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"}),L=x==="light";return jsxs("div",{ref:T,className:u(Cy({size:t}),L&&"bg-zinc-50 text-zinc-900 border-zinc-200",e),style:{height:b},onClick:E,...y,children:[o&&jsxs("div",{className:u("flex items-center justify-between border-b px-4 py-2",L?"border-zinc-200 bg-zinc-100":"border-zinc-700 bg-zinc-800"),children:[jsx(iE,{}),jsx("span",{className:u("text-xs font-medium",L?"text-zinc-600":"text-zinc-400"),children:n}),jsx("div",{className:"w-14"})," "]}),jsxs("div",{ref:C,className:u("flex-1 overflow-auto p-4",L?"bg-zinc-50":"bg-zinc-900"),style:{height:o?"calc(100% - 40px)":"100%"},role:"log","aria-label":"Terminal output","aria-live":"polite",children:[r.map((V,A)=>{if(f)return jsx("div",{className:"leading-relaxed",children:f(V,A)},V.id??A);let O=(L?sE:aE)[V.type||"output"];return jsxs("div",{className:u("leading-relaxed whitespace-pre-wrap",O),children:[a&&V.timestamp&&jsxs("span",{className:u("mr-2",L?"text-zinc-400":"text-zinc-500"),children:["[",I(V.timestamp),"]"]}),V.type==="input"&&jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:V.prefix||s}),V.content]},V.id??A)}),g&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:s}),jsx("span",{className:u("animate-pulse",L?"text-zinc-600":"text-zinc-400"),children:v}),jsx("span",{className:"animate-bounce",children:"\u258C"})]}),d&&!h&&!g&&jsxs("form",{onSubmit:k,className:"flex items-center",children:[jsx("span",{className:u("mr-2",L?"text-green-600":"text-green-400"),children:s}),jsx("input",{ref:R,type:"text",value:S,onChange:V=>w(V.target.value),onKeyDown:N,placeholder:m,className:u("flex-1 bg-transparent outline-none",L?"text-zinc-900 placeholder:text-zinc-400":"text-zinc-100 placeholder:text-zinc-500"),"aria-label":"Terminal input",autoComplete:"off",spellCheck:false}),jsx("span",{className:u("animate-pulse ml-0.5",L?"text-zinc-600":"text-zinc-400"),children:"\u258C"})]})]})]})}var Ty=J.forwardRef(lE);Ty.displayName="Terminal";var My=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h1",{ref:n,className:u("scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",e),...r,children:t}));My.displayName="H1";var Ny=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h2",{ref:n,className:u("scroll-m-20 text-3xl font-semibold tracking-tight",e),...r,children:t}));Ny.displayName="H2";var ky=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h3",{ref:n,className:u("scroll-m-20 text-2xl font-semibold tracking-tight",e),...r,children:t}));ky.displayName="H3";var Sy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("h4",{ref:n,className:u("scroll-m-20 text-xl font-semibold tracking-tight",e),...r,children:t}));Sy.displayName="H4";var Py=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("leading-7 [&:not(:first-child)]:mt-6",e),...r,children:t}));Py.displayName="Paragraph";var Ey=J.forwardRef(({className:e,children:t,...r},n)=>jsx("blockquote",{ref:n,className:u("mt-6 border-l-2 pl-6 italic",e),...r,children:t}));Ey.displayName="Blockquote";var Ly=J.forwardRef(({className:e,children:t,...r},n)=>jsx("code",{ref:n,className:u("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold",e),...r,children:t}));Ly.displayName="InlineCode";var Dy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-xl text-muted-foreground",e),...r,children:t}));Dy.displayName="Lead";var Iy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("div",{ref:n,className:u("text-lg font-semibold",e),...r,children:t}));Iy.displayName="Large";var Hy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("small",{ref:n,className:u("text-sm font-medium leading-none",e),...r,children:t}));Hy.displayName="Small";var Vy=J.forwardRef(({className:e,children:t,...r},n)=>jsx("p",{ref:n,className:u("text-sm text-muted-foreground",e),...r,children:t}));Vy.displayName="Muted";var Ay=J.forwardRef(({className:e,children:t,...r},n)=>jsx("ul",{ref:n,className:u("my-6 ml-6 list-disc [&>li]:mt-2",e),...r,children:t}));Ay.displayName="UL";function cE(){let[e,t]=J.useState(false);return J.useEffect(()=>{t(true);},[]),e}var dE=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],uE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Md={default:["bg-muted","bg-emerald-200 dark:bg-emerald-900","bg-emerald-300 dark:bg-emerald-700","bg-emerald-500 dark:bg-emerald-500","bg-emerald-700 dark:bg-emerald-300"],success:["bg-muted","bg-green-200 dark:bg-green-900","bg-green-300 dark:bg-green-700","bg-green-500 dark:bg-green-500","bg-green-700 dark:bg-green-300"],warning:["bg-muted","bg-amber-200 dark:bg-amber-900","bg-amber-300 dark:bg-amber-700","bg-amber-500 dark:bg-amber-500","bg-amber-700 dark:bg-amber-300"],danger:["bg-muted","bg-red-200 dark:bg-red-900","bg-red-300 dark:bg-red-700","bg-red-500 dark:bg-red-500","bg-red-700 dark:bg-red-300"],primary:["bg-muted","bg-primary/20","bg-primary/40","bg-primary/60","bg-primary/80"],secondary:["bg-muted","bg-secondary/40","bg-secondary/60","bg-secondary/80","bg-secondary"]},Nd={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};function zy(e){return e.toISOString().split("T")[0]}function mE(e){return e instanceof Date?e:new Date(e)}function pE(e,t){let r=[],n=new Date(e);for(n.setDate(n.getDate()-n.getDay());n<=t;){let o=[];for(let a=0;a<7;a++)o.push(new Date(n)),n.setDate(n.getDate()+1);r.push(o);}return r}function fE(e){let t=[],r=-1;return e.forEach((n,o)=>{let a=n.find(s=>s.getDate()<=7);a&&a.getMonth()!==r&&(r=a.getMonth(),t.push({month:uE[r],position:o}));}),t}var Oy=J.forwardRef(({className:e,values:t,startDate:r,endDate:n,color:o="default",levels:a=5,showMonthLabels:s=true,showWeekdayLabels:i=true,showTooltip:c=true,tooltipFormatter:l,colorScale:d,gap:m=3,cellSize:p=12,radius:f="sm",onCellClick:g,emptyColor:v,showLegend:b=true,legendLabels:h={less:"Less",more:"More"},...x},y)=>{let T=cE(),{startDate:C,endDate:R}=J.useMemo(()=>{let L=n?new Date(n):new Date;return {startDate:r?new Date(r):new Date(L.getFullYear()-1,L.getMonth(),L.getDate()),endDate:L}},[r,n]),M=J.useMemo(()=>{let L=new Map;return t.forEach(V=>{let A=mE(V.date),z=zy(A);L.set(z,(L.get(z)||0)+V.count);}),L},[t]),P=J.useMemo(()=>M.size===0?0:Math.max(...Array.from(M.values())),[M]),S=J.useMemo(()=>pE(C,R),[C,R]),w=J.useMemo(()=>fE(S),[S]),k=L=>{if(L===0)return v||d?.[0]||Md[o][0];let V=d||Md[o],A=Math.min(Math.ceil(L/P*(a-1)),a-1);return V[A]||V[V.length-1]},N=(L,V)=>{if(l)return l(L,V);let A=L.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"});return jsxs("span",{children:[jsx("span",{className:"font-medium",children:V})," contributions on ",A]})},E=(L,V,A)=>{let z=zy(L),O=M.get(z)||0;if(!(L>=C&&L<=R))return jsx("div",{style:{width:p,height:p}},`${V}-${A}`);let _=jsx("div",{className:u("transition-all duration-200",Nd[f],k(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:p,height:p},onClick:()=>g?.(L,O),role:g?"button":void 0,tabIndex:g?0:void 0,onKeyDown:B=>{g&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),g(L,O));}});return c?jsxs($r,{delayDuration:0,children:[jsx(Kr,{children:jsx("button",{type:"button",className:u("transition-all duration-200 border-0 bg-transparent p-0",Nd[f],k(O),g&&"cursor-pointer hover:ring-2 hover:ring-foreground/50 hover:ring-offset-1"),style:{width:p,height:p},onClick:()=>g?.(L,O),onKeyDown:B=>{g&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),g(L,O));}})}),jsx(Gr,{children:N(L,O)})]},`${V}-${A}`):jsx(J.Fragment,{children:_},`${V}-${A}`)},I=d||Md[o];return T?jsxs("div",{ref:y,className:u("inline-flex flex-col",e),...x,children:[jsxs("div",{className:"flex",children:[i&&jsx("div",{className:"flex flex-col justify-between pr-2",style:{gap:m,marginTop:s?20:0},children:dE.map((L,V)=>jsx("div",{className:u("text-xs text-muted-foreground",V%2===1&&"invisible"),style:{height:p,lineHeight:`${p}px`},children:L},L))}),jsxs("div",{className:"flex flex-col",children:[s&&jsx("div",{className:"relative mb-1",style:{height:16,width:S.length*(p+m)-m},children:w.map(({month:L,position:V},A)=>jsx("div",{className:"absolute text-xs text-muted-foreground whitespace-nowrap",style:{left:V*(p+m)},children:L},`${L}-${A}`))}),jsx("div",{className:"flex",style:{gap:m},children:S.map((L,V)=>jsx("div",{className:"flex flex-col",style:{gap:m},children:L.map((A,z)=>E(A,V,z))},V))})]})]}),b&&jsxs("div",{className:"flex items-center justify-end mt-4 gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground",children:h.less}),jsx("div",{className:"flex",style:{gap:m/2},children:I.slice(0,a).map((L,V)=>jsx("div",{className:u(Nd[f],L),style:{width:p,height:p}},V))}),jsx("span",{className:"text-xs text-muted-foreground",children:h.more})]})]}):jsx("div",{ref:y,className:u("inline-flex flex-col",e),...x})});Oy.displayName="HeatmapCalendar";var gE=J.forwardRef(({className:e,beforeImage:t,afterImage:r,beforeAlt:n="Before",afterAlt:o="After",defaultPosition:a=50,position:s,onPositionChange:i,orientation:c="horizontal",showLabels:l=true,beforeLabel:d="Before",afterLabel:m="After",handleVariant:p="default",handleColor:f="default",aspectRatio:g,disableKeyboard:v=false,handleWidth:b=4,...h},x)=>{let[y,T]=J.useState(a),C=s!==void 0,R=C?s:y,M=J.useRef(null),[P,S]=J.useState(false),[w,k]=J.useState({width:0,height:0});J.useEffect(()=>{let B=()=>{M.current&&k({width:M.current.offsetWidth,height:M.current.offsetHeight});};B();let U=new ResizeObserver(B);return M.current&&U.observe(M.current),()=>U.disconnect()},[]);let N=B=>{let U=Math.max(0,Math.min(100,B));C||T(U),i?.(U);},E=(B,U)=>{if(!M.current)return R;let K=M.current.getBoundingClientRect();return c==="horizontal"?(B-K.left)/K.width*100:(U-K.top)/K.height*100},I=B=>{B.preventDefault(),S(true),B.target.setPointerCapture(B.pointerId);let U=E(B.clientX,B.clientY);N(U);},L=B=>{if(!P)return;let U=E(B.clientX,B.clientY);N(U);},V=()=>{S(false);},A=B=>{if(v)return;let U=B.shiftKey?10:1,K=R;switch(B.key){case "ArrowLeft":case "ArrowUp":B.preventDefault(),K=R-U;break;case "ArrowRight":case "ArrowDown":B.preventDefault(),K=R+U;break;case "Home":B.preventDefault(),K=0;break;case "End":B.preventDefault(),K=100;break;default:return}N(K);},z={default:"bg-border",primary:"bg-primary",white:"bg-white",black:"bg-black"},O={default:"bg-background border-border text-foreground",primary:"bg-primary border-primary text-primary-foreground",white:"bg-white border-white text-black",black:"bg-black border-black text-white"},$=()=>{let B=c==="horizontal",U=u("absolute z-10 flex items-center justify-center",B?"top-0 bottom-0 cursor-ew-resize":"left-0 right-0 cursor-ns-resize",z[f]),K=B?{left:`${R}%`,width:b,transform:"translateX(-50%)"}:{top:`${R}%`,height:b,transform:"translateY(-50%)"};return p==="minimal"?jsx("div",{className:U,style:K}):p==="arrows"?jsx("div",{className:U,style:K,children:jsxs("div",{className:u("absolute flex items-center justify-center gap-0.5 rounded-full p-1.5 shadow-md border-2",O[f],B?"flex-row":"flex-col"),children:[jsx("svg",{className:u("w-3 h-3",B?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M15 18l-6-6 6-6"})}),jsx("svg",{className:u("w-3 h-3",B?"-rotate-0":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:jsx("path",{d:"M9 18l6-6-6-6"})})]})}):jsx("div",{className:U,style:K,children:jsx("div",{className:u("absolute rounded-full p-2 shadow-md border-2",O[f]),children:jsxs("svg",{className:u("w-4 h-4",B?"":"rotate-90"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M8 3L4 7l4 4"}),jsx("path",{d:"M16 3l4 4-4 4"}),jsx("path",{d:"M4 7h16"}),jsx("path",{d:"M8 17l-4 4 4 4"}),jsx("path",{d:"M16 17l4 4-4 4"}),jsx("path",{d:"M4 21h16"})]})})})},_=c==="horizontal";return jsx("div",{ref:x,className:u("relative select-none overflow-hidden rounded-lg",P&&"cursor-grabbing",e),style:g?{aspectRatio:g}:void 0,...h,children:jsxs("div",{ref:M,className:"relative w-full h-full",role:"slider",tabIndex:0,"aria-valuenow":R,"aria-valuemin":0,"aria-valuemax":100,"aria-orientation":c,"aria-label":"Image comparison slider",onPointerDown:I,onPointerMove:L,onPointerUp:V,onPointerCancel:V,onKeyDown:A,children:[jsx("img",{src:r,alt:o,className:"absolute inset-0 w-full h-full object-cover",draggable:false}),jsx("div",{className:"absolute inset-0 overflow-hidden",style:_?{width:`${R}%`}:{height:`${R}%`},children:jsx("img",{src:t,alt:n,className:"absolute object-cover",style:{top:0,left:0,width:w.width>0?`${w.width}px`:"100%",height:w.height>0?`${w.height}px`:"100%"},draggable:false})}),$(),l&&jsxs(Fragment,{children:[jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none","top-3 left-3"),children:d}),jsx("div",{className:u("absolute px-2 py-1 text-xs font-medium rounded bg-black/70 text-white pointer-events-none",_?"top-3 right-3":"bottom-3 left-3"),children:m})]})]})})});gE.displayName="ImageComparison";function By(e){let t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?`${t}:${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`:`${r}:${n.toString().padStart(2,"0")}`}var kE={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},$y=J.forwardRef(({className:e,src:t,poster:r,autoPlay:n=false,muted:o=false,loop:a=false,controls:s=true,preload:i="metadata",aspectRatio:c="16/9",defaultVolume:l=1,playbackSpeeds:d=[.5,.75,1,1.25,1.5,2],showPiP:m=true,showFullscreen:p=true,showVolume:f=true,showPlaybackSpeed:g=true,showSkipButtons:v=false,skipInterval:b=10,onPlay:h,onPause:x,onEnded:y,onVideoTimeUpdate:T,onVideoVolumeChange:C,controlsHideTimeout:R=3e3,keyboardShortcuts:M=true,doubleClickFullscreen:P=true,radius:S="lg",...w},k)=>{let N=J.useRef(null),E=J.useRef(null),I=J.useRef(null),[L,V]=J.useState(false),[A,z]=J.useState(0),[O,$]=J.useState(0),[_,B]=J.useState(l),[U,K]=J.useState(o),[D,H]=J.useState(false),[F,W]=J.useState(true),[X,Z]=J.useState(true),[me,ve]=J.useState(1),[j,G]=J.useState(0),Y=J.useMemo(()=>typeof t=="string"?[{src:t,type:void 0,label:void 0}]:t,[t]),[q,Q]=J.useState(0),ce=J.useCallback(()=>{I.current&&clearTimeout(I.current),Z(true),L&&R>0&&(I.current=setTimeout(()=>{Z(false);},R));},[L,R]);J.useEffect(()=>(ce(),()=>{I.current&&clearTimeout(I.current);}),[L,ce]);let Ne=()=>{E.current&&($(E.current.duration),W(false));},nt=()=>{if(E.current){z(E.current.currentTime),T?.(E.current.currentTime,E.current.duration);let ne=E.current.buffered.length>0?E.current.buffered.end(E.current.buffered.length-1):0;G(ne/E.current.duration*100);}},he=()=>{V(true),h?.();},Xe=()=>{V(false),x?.();},te=()=>{V(false),y?.();},_e=()=>{W(true);},hr=()=>{W(false);},re=()=>{E.current&&(L?E.current.pause():E.current.play());},oe=ne=>{if(E.current){let Ce=ne[0]/100*O;E.current.currentTime=Ce,z(Ce);}},Se=ne=>{let Ce=ne[0]/100;B(Ce),K(Ce===0),E.current&&(E.current.volume=Ce,E.current.muted=Ce===0),C?.(Ce,Ce===0);},sr=()=>{if(E.current){let ne=!U;E.current.muted=ne,K(ne),ne?E.current.volume=0:E.current.volume=_||1,C?.(ne?0:_,ne);}},kt=async()=>{if(N.current)try{D?await document.exitFullscreen():await N.current.requestFullscreen();}catch{}},Ho=async()=>{if(E.current)try{document.pictureInPictureElement?await document.exitPictureInPicture():await E.current.requestPictureInPicture();}catch{}},Ee=ne=>{E.current&&(E.current.currentTime=Math.max(0,Math.min(O,E.current.currentTime+ne)));},ot=ne=>{E.current&&(E.current.playbackRate=ne,ve(ne));};J.useEffect(()=>{let ne=()=>{H(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",ne),()=>{document.removeEventListener("fullscreenchange",ne);}},[]),J.useEffect(()=>{if(!M)return;let ne=Ce=>{if(!(!N.current?.contains(document.activeElement)&&document.activeElement!==N.current))switch(Ce.key.toLowerCase()){case " ":case "k":Ce.preventDefault(),re();break;case "f":Ce.preventDefault(),kt();break;case "m":Ce.preventDefault(),sr();break;case "arrowleft":Ce.preventDefault(),Ee(-b);break;case "arrowright":Ce.preventDefault(),Ee(b);break;case "arrowup":Ce.preventDefault(),Se([Math.min(100,_*100+10)]);break;case "arrowdown":Ce.preventDefault(),Se([Math.max(0,_*100-10)]);break}};return window.addEventListener("keydown",ne),()=>{window.removeEventListener("keydown",ne);}},[M,L,_,b]);let ir=()=>{P&&kt();},je=O>0?A/O*100:0;return jsxs("div",{ref:ne=>{N.current=ne,typeof k=="function"?k(ne):k&&(k.current=ne);},className:u("relative bg-black overflow-hidden group",kE[S],e),style:{aspectRatio:c},onMouseMove:ce,onMouseLeave:()=>L&&Z(false),tabIndex:0,...w,children:[jsx("video",{ref:E,className:"w-full h-full object-contain",poster:r,autoPlay:n,muted:o,loop:a,preload:i,playsInline:true,onClick:re,onDoubleClick:ir,onLoadedMetadata:Ne,onTimeUpdate:nt,onPlay:he,onPause:Xe,onEnded:te,onWaiting:_e,onCanPlay:hr,children:Y.map((ne,Ce)=>jsx("source",{src:ne.src,type:ne.type},Ce))}),F&&jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/20",children:jsx(Loader2,{className:"w-12 h-12 text-white animate-spin"})}),!L&&!F&&jsx("button",{type:"button",className:"absolute inset-0 flex items-center justify-center bg-black/30 transition-opacity cursor-pointer",onClick:re,children:jsx("div",{className:"w-16 h-16 rounded-full bg-white/90 flex items-center justify-center",children:jsx(Play,{className:"w-8 h-8 text-black ml-1",fill:"currentColor"})})}),s&&jsxs("div",{className:u("absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent p-4 pt-16 transition-opacity duration-300",X?"opacity-100":"opacity-0 pointer-events-none"),children:[jsxs("div",{className:"relative mb-3 group/progress",children:[jsx("div",{className:"absolute top-1/2 left-0 h-1 bg-white/30 rounded-full -translate-y-1/2",style:{width:`${j}%`}}),jsx(yr,{value:[je],onValueChange:oe,min:0,max:100,step:.1,className:"h-1 group-hover/progress:h-2 transition-all cursor-pointer [&_[role=slider]]:w-3 [&_[role=slider]]:h-3 [&_[role=slider]]:opacity-0 group-hover/progress:[&_[role=slider]]:opacity-100 [&_[role=slider]]:transition-opacity"})]}),jsxs("div",{className:"flex items-center justify-between gap-4",children:[jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:re,children:L?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5",fill:"currentColor"})}),v&&jsxs(Fragment,{children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>Ee(-b),children:jsx(SkipBack,{className:"w-5 h-5"})}),jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:()=>Ee(b),children:jsx(SkipForward,{className:"w-5 h-5"})})]}),f&&jsxs("div",{className:"flex items-center gap-1 group/volume",children:[jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:sr,children:U||_===0?jsx(VolumeX,{className:"w-5 h-5"}):jsx(Volume2,{className:"w-5 h-5"})}),jsx("div",{className:"w-0 overflow-hidden group-hover/volume:w-20 transition-all",children:jsx(yr,{value:[U?0:_*100],onValueChange:Se,min:0,max:100,step:1,className:"w-20"})})]}),jsxs("div",{className:"text-white text-sm ml-2",children:[By(A)," / ",By(O)]})]}),jsxs("div",{className:"flex items-center gap-1",children:[g&&jsxs(At,{children:[jsx(zt,{children:jsxs("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer flex items-center gap-1",children:[jsx(Settings,{className:"w-5 h-5"}),jsxs("span",{className:"text-xs",children:[me,"x"]})]})}),jsx(Ot,{align:"end",className:"min-w-[100px]",children:d.map(ne=>jsxs(xt,{onSelect:()=>ot(ne),className:u(me===ne&&"bg-primary/10 text-primary"),children:[ne,"x"]},ne))})]}),Y.length>1&&jsxs(At,{children:[jsx(zt,{children:jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer text-xs",children:Y[q]?.quality||Y[q]?.label||"Quality"})}),jsx(Ot,{align:"end",className:"min-w-[100px]",children:Y.map((ne,Ce)=>jsx(xt,{onSelect:()=>{let to=E.current?.currentTime||0;Q(Ce),setTimeout(()=>{E.current&&(E.current.currentTime=to,L&&E.current.play());},100);},className:u(q===Ce&&"bg-primary/10 text-primary"),children:ne.quality||ne.label||`Source ${Ce+1}`},Ce))})]}),m&&typeof document<"u"&&document.pictureInPictureEnabled&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:Ho,children:jsx(PictureInPicture,{className:"w-5 h-5"})}),p&&jsx("button",{type:"button",className:"p-2 text-white hover:bg-white/20 rounded-md transition-colors cursor-pointer",onClick:kt,children:D?jsx(Minimize,{className:"w-5 h-5"}):jsx(Maximize,{className:"w-5 h-5"})})]})]})]})]})});$y.displayName="VideoPlayer";function ps(e){if(!e||!isFinite(e))return "0:00";let t=Math.floor(e/60),r=Math.floor(e%60);return `${t}:${r.toString().padStart(2,"0")}`}var Ky={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},zE={default:{progress:"bg-foreground",waveformActive:"bg-foreground",waveformInactive:"bg-muted-foreground/30"},primary:{progress:"bg-primary",waveformActive:"bg-primary",waveformInactive:"bg-primary/20"},success:{progress:"bg-green-500",waveformActive:"bg-green-500",waveformInactive:"bg-green-500/20"},warning:{progress:"bg-amber-500",waveformActive:"bg-amber-500",waveformInactive:"bg-amber-500/20"},danger:{progress:"bg-red-500",waveformActive:"bg-red-500",waveformInactive:"bg-red-500/20"}},Gy=J.forwardRef(({className:e,src:t,autoPlay:r=false,defaultVolume:n=1,loop:o=false,muted:a=false,showWaveform:s=true,waveformData:i,waveformBars:c=50,showTrackInfo:l=true,showVolume:d=true,showSkipButtons:m=false,skipInterval:p=10,showLoop:f=true,showShuffle:g=false,showDownload:v=false,variant:b="default",color:h="default",customColor:x,onPlay:y,onPause:T,onEnded:C,onAudioTimeUpdate:R,radius:M="lg",...P},S)=>{let w=J.useRef(null),k=J.useRef(null),[N,E]=J.useState(false),[I,L]=J.useState(0),[V,A]=J.useState(0),[z,O]=J.useState(n),[$,_]=J.useState(a),[B,U]=J.useState(true),[K,D]=J.useState(o),[H,F]=J.useState(false),W=J.useMemo(()=>typeof t=="string"?{src:t}:t,[t]),X=J.useMemo(()=>{if(i)return i;let oe=[];for(let Se=0;Se<c;Se++)oe.push(.2+Math.random()*.8);return oe},[i,c]),Z=()=>{w.current&&(A(w.current.duration),U(false));},me=()=>{w.current&&(L(w.current.currentTime),R?.(w.current.currentTime,w.current.duration));},ve=()=>{E(true),y?.();},j=()=>{E(false),T?.();},G=()=>{E(false),C?.();},Y=()=>{U(false);},q=()=>{w.current&&(N?w.current.pause():w.current.play());},Q=oe=>{if(w.current&&V){let Se=oe/100*V;w.current.currentTime=Se,L(Se);}},ce=oe=>{if(!k.current||!V)return;let Se=k.current.getBoundingClientRect(),sr=(oe.clientX-Se.left)/Se.width*100;Q(sr);},Ne=oe=>{let Se=oe[0]/100;O(Se),_(Se===0),w.current&&(w.current.volume=Se,w.current.muted=Se===0);},nt=()=>{if(w.current){let oe=!$;w.current.muted=oe,_(oe);}},he=()=>{if(w.current){let oe=!K;w.current.loop=oe,D(oe);}},Xe=oe=>{w.current&&(w.current.currentTime=Math.max(0,Math.min(V,w.current.currentTime+oe)));},te=()=>{let oe=document.createElement("a");oe.href=W.src,oe.download=W.title||"audio",document.body.appendChild(oe),oe.click(),document.body.removeChild(oe);},_e=V>0?I/V*100:0,hr=zE[h],re=$||z===0?VolumeX:z<.5?Volume1:Volume2;return b==="compact"?jsxs("div",{ref:S,className:u("flex items-center gap-3 p-2 bg-muted/50",Ky[M],e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded-full transition-colors cursor-pointer",onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-4 h-4 animate-spin"}):N?jsx(Pause,{className:"w-4 h-4",fill:"currentColor"}):jsx(Play,{className:"w-4 h-4",fill:"currentColor"})}),jsx("div",{className:"flex-1",children:jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1,className:"h-1"})}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(I)})]}):b==="minimal"?jsxs("div",{ref:S,className:u("flex items-center gap-4",e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),jsx("button",{type:"button",className:u("p-3 rounded-full transition-colors cursor-pointer",!x&&hr.progress,"text-white hover:opacity-90"),style:x?{backgroundColor:x}:void 0,onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-5 h-5 animate-spin"}):N?jsx(Pause,{className:"w-5 h-5",fill:"currentColor"}):jsx(Play,{className:"w-5 h-5 ms-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex-1 flex flex-col gap-1",children:[l&&W.title&&jsx("span",{className:"text-sm font-medium truncate",children:W.title}),jsxs("div",{className:"flex items-center gap-2",children:[jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(I)}),jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1,className:"flex-1"}),jsx("span",{className:"text-xs text-muted-foreground min-w-[35px]",children:ps(V)})]})]})]}):jsxs("div",{ref:S,className:u("p-4 bg-card border border-border",Ky[M],e),...P,children:[jsx("audio",{ref:w,src:W.src,autoPlay:r,loop:K,muted:a,onLoadedMetadata:Z,onTimeUpdate:me,onPlay:ve,onPause:j,onEnded:G,onCanPlay:Y}),l&&(W.title||W.artist||W.artwork)&&jsxs("div",{className:"flex items-center gap-4 mb-4",children:[W.artwork&&jsx("img",{src:W.artwork,alt:W.title||"Album artwork",className:"w-16 h-16 rounded-md object-cover"}),jsxs("div",{className:"flex-1 min-w-0",children:[W.title&&jsx("h3",{className:"font-medium truncate",children:W.title}),W.artist&&jsx("p",{className:"text-sm text-muted-foreground truncate",children:W.artist}),W.album&&jsx("p",{className:"text-xs text-muted-foreground truncate",children:W.album})]})]}),s?jsx("div",{ref:k,className:"relative h-16 mb-4 flex items-end gap-[2px] cursor-pointer",onClick:ce,children:X.map((oe,Se)=>{let kt=(Se+1)/X.length*100<=_e;return jsx("div",{className:u("flex-1 rounded-sm transition-colors",!x&&(kt?hr.waveformActive:hr.waveformInactive)),style:{height:`${oe*100}%`,minHeight:4,...x&&{backgroundColor:kt?x:`${x}33`}}},Se)})}):jsx("div",{className:"mb-4",children:jsx(yr,{value:[_e],onValueChange:oe=>Q(oe[0]),min:0,max:100,step:.1})}),jsxs("div",{className:"flex justify-between text-xs text-muted-foreground mb-4",children:[jsx("span",{children:ps(I)}),jsx("span",{children:ps(V)})]}),jsxs("div",{className:"flex items-center justify-between",children:[jsxs("div",{className:"flex items-center gap-1",children:[g&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",H&&"text-primary"),onClick:()=>F(!H),children:jsx(Shuffle,{className:"w-4 h-4"})}),m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>Xe(-p),children:jsx(SkipBack,{className:"w-5 h-5"})})]}),jsx("button",{type:"button",className:u("p-4 rounded-full transition-colors cursor-pointer",!x&&hr.progress,"text-white hover:opacity-90"),style:x?{backgroundColor:x}:void 0,onClick:q,disabled:B,children:B?jsx(Loader2,{className:"w-6 h-6 animate-spin"}):N?jsx(Pause,{className:"w-6 h-6",fill:"currentColor"}):jsx(Play,{className:"w-6 h-6 ms-0.5",fill:"currentColor"})}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:()=>Xe(p),children:jsx(SkipForward,{className:"w-5 h-5"})}),f&&jsx("button",{type:"button",className:u("p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",K&&"text-primary"),onClick:he,children:jsx(Repeat,{className:"w-4 h-4"})})]})]}),jsxs("div",{className:"flex items-center justify-between mt-4",children:[d?jsxs("div",{className:"flex items-center gap-2 flex-1",children:[jsx("button",{type:"button",className:"p-1 hover:bg-muted rounded transition-colors cursor-pointer",onClick:nt,children:jsx(re,{className:"w-4 h-4"})}),jsx(yr,{value:[$?0:z*100],onValueChange:Ne,min:0,max:100,step:1,className:"w-24"})]}):jsx("div",{}),v&&jsx("button",{type:"button",className:"p-2 hover:bg-muted rounded-md transition-colors cursor-pointer",onClick:te,children:jsx(Download,{className:"w-4 h-4"})})]})]})});Gy.displayName="AudioPlayer";var XE={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},Uy=J.forwardRef(({className:e,src:t,defaultPage:r=1,defaultZoom:n=100,showToolbar:o=true,showNavigation:a=true,showZoomControls:s=true,showDownload:i=true,showPrint:c=true,showFullscreen:l=true,showRotate:d=true,showSearch:m=false,zoomStep:p=25,minZoom:f=25,maxZoom:g=400,toolbarPosition:v="top",height:b="600px",onPageChange:h,onZoomChange:x,onPDFLoad:y,onPDFError:T,errorMessage:C="Failed to load PDF. Please try again.",loadingMessage:R="Loading PDF...",fileName:M="document.pdf",totalPages:P=1,radius:S="lg",...w},k)=>{let N=J.useRef(null),E=J.useRef(null),[I,L]=J.useState(r),[V]=J.useState(P),[A,z]=J.useState(n),[O,$]=J.useState(0),[_,B]=J.useState(false),[U,K]=J.useState(true),[D,H]=J.useState(false),[F,W]=J.useState(String(r)),X=te=>{let _e=Math.max(1,Math.min(V,te));L(_e),W(String(_e)),h?.(_e);},Z=te=>{W(te.target.value);},me=()=>{let te=parseInt(F,10);isNaN(te)?W(String(I)):X(te);},ve=te=>{te.key==="Enter"&&me();},j=()=>{let te=Math.min(g,A+p);z(te),x?.(te);},G=()=>{let te=Math.max(f,A-p);z(te),x?.(te);},Y=()=>{$(te=>(te+90)%360);},q=async()=>{if(N.current)try{_?await document.exitFullscreen():await N.current.requestFullscreen();}catch{}};J.useEffect(()=>{let te=()=>{B(!!document.fullscreenElement);};return document.addEventListener("fullscreenchange",te),()=>{document.removeEventListener("fullscreenchange",te);}},[]);let Q=()=>{let te=document.createElement("a");te.href=t,te.download=M,document.body.appendChild(te),te.click(),document.body.removeChild(te);},ce=()=>{E.current?.contentWindow&&E.current.contentWindow.print();},Ne=()=>{K(false),H(false),y?.();},nt=()=>{K(false),H(true),T?.(new Error("Failed to load PDF"));},he=J.useMemo(()=>{if(typeof window>"u")return t;try{let te=new URL(t,window.location.href);return te.hash=`page=${I}&zoom=${A}`,te.toString()}catch{return t}},[t,I,A]),Xe=jsxs("div",{className:"flex items-center justify-between gap-4 px-4 py-2 bg-muted/50 border-b border-border",children:[a&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>X(I-1),disabled:I<=1,title:"Previous page",children:jsx(ChevronLeft,{className:"w-4 h-4"})}),jsxs("div",{className:"flex items-center gap-1.5",children:[jsx(Sn,{value:F,onChange:Z,onBlur:me,onKeyDown:ve,className:"w-12 h-7 text-center text-sm px-1"}),jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",V]})]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>X(I+1),disabled:I>=V,title:"Next page",children:jsx(ChevronRight,{className:"w-4 h-4"})})]}),s&&jsxs("div",{className:"flex items-center gap-2",children:[jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:G,disabled:A<=f,title:"Zoom out",children:jsx(ZoomOut,{className:"w-4 h-4"})}),jsxs("span",{className:"text-sm text-muted-foreground min-w-[50px] text-center",children:[A,"%"]}),jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:j,disabled:A>=g,title:"Zoom in",children:jsx(ZoomIn,{className:"w-4 h-4"})})]}),jsxs("div",{className:"flex items-center gap-1",children:[m&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",title:"Search",children:jsx(Search,{className:"w-4 h-4"})}),d&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Y,title:"Rotate",children:jsx(RotateCw,{className:"w-4 h-4"})}),c&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:ce,title:"Print",children:jsx(Printer,{className:"w-4 h-4"})}),i&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:Q,title:"Download",children:jsx(Download,{className:"w-4 h-4"})}),l&&jsx("button",{type:"button",className:"p-1.5 hover:bg-muted rounded transition-colors cursor-pointer",onClick:q,title:_?"Exit fullscreen":"Fullscreen",children:_?jsx(Minimize,{className:"w-4 h-4"}):jsx(Maximize,{className:"w-4 h-4"})})]})]});return jsxs("div",{ref:te=>{N.current=te,typeof k=="function"?k(te):k&&(k.current=te);},className:u("flex flex-col bg-card border border-border overflow-hidden",XE[S],e),style:{height:_?"100vh":b},...w,children:[o&&v==="top"&&Xe,jsxs("div",{className:"flex-1 relative overflow-hidden bg-muted/30",children:[U&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background/80 z-10",children:[jsx(Loader2,{className:"w-8 h-8 animate-spin text-muted-foreground mb-2"}),jsx("span",{className:"text-sm text-muted-foreground",children:R})]}),D&&jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-background z-10",children:[jsx(FileWarning,{className:"w-12 h-12 text-muted-foreground mb-3"}),jsx("span",{className:"text-sm text-muted-foreground",children:C}),jsx("button",{type:"button",className:"mt-3 px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors cursor-pointer",onClick:()=>{K(true),H(false);},children:"Try again"})]}),jsx("iframe",{ref:E,src:he,className:"w-full h-full border-0",style:{transform:`rotate(${O}deg) scale(${A/100})`,transformOrigin:"center center"},onLoad:Ne,onError:nt,title:"PDF Viewer"})]}),o&&v==="bottom"&&Xe]})});Uy.displayName="PDFViewer";function Wy({steps:e,isOpen:t=false,onClose:r,onComplete:n,onStepChange:o,currentStep:a,defaultStep:s=0,showOverlay:i=true,showIndicators:c=true,showCloseButton:l=true,closeOnOverlayClick:d=true,closeOnEscape:m=true,className:p,highlightPadding:f=8,highlightRadius:g=8,labels:v={}}){let[b,h]=J.useState(s),[x,y]=J.useState(null),[T,C]=J.useState({top:0,left:0}),[R,M]=J.useState(false),P=J.useRef(null),S=a!==void 0,w=S?a:b,k=e[w],{next:N="Next",prev:E="Previous",skip:I="Skip",finish:L="Finish"}=v;J.useEffect(()=>{M(true);},[]),J.useEffect(()=>{if(!t||!k)return;let B=()=>typeof k.target=="string"?document.querySelector(k.target):k.target.current,U=()=>{let K=B();K&&(y(K.getBoundingClientRect()),k.onActive?.());};return U(),window.addEventListener("scroll",U,true),window.addEventListener("resize",U),()=>{window.removeEventListener("scroll",U,true),window.removeEventListener("resize",U);}},[t,k,w]),J.useEffect(()=>{if(!x||!P.current)return;let B=P.current.getBoundingClientRect(),U=k?.placement||"bottom",K=12,D=0,H=0;switch(U){case "top":D=x.top-B.height-K-f,H=x.left+x.width/2-B.width/2;break;case "bottom":D=x.bottom+K+f,H=x.left+x.width/2-B.width/2;break;case "left":D=x.top+x.height/2-B.height/2,H=x.left-B.width-K-f;break;case "right":D=x.top+x.height/2-B.height/2,H=x.right+K+f;break}let F=window.innerWidth,W=window.innerHeight;H<K&&(H=K),H+B.width>F-K&&(H=F-B.width-K),D<K&&(D=K),D+B.height>W-K&&(D=W-B.height-K),C({top:D,left:H});},[x,k?.placement,f]),J.useEffect(()=>{if(!t||!m)return;let B=U=>{U.key==="Escape"&&r?.();};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[t,m,r]);let V=()=>{if(w<e.length-1){let B=w+1;S||h(B),o?.(B);}else n?.(),r?.();},A=()=>{if(w>0){let B=w-1;S||h(B),o?.(B);}},z=()=>{r?.();},O=()=>{d&&r?.();};if(!R||!t||!k)return null;let $=w===0,_=w===e.length-1;return zs.createPortal(jsxs(Fragment,{children:[i&&x&&jsx("div",{className:"fixed inset-0 z-[9998] transition-opacity duration-200",onClick:O,style:{background:`radial-gradient(
77
77
  ellipse ${x.width+f*2}px ${x.height+f*2}px
78
78
  at ${x.left+x.width/2}px ${x.top+x.height/2}px,
79
79
  transparent 0%,
80
80
  transparent 100%
81
- )`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"}}),x&&jsx("div",{className:"fixed z-[9999] pointer-events-none border-2 border-primary transition-all duration-200",style:{top:x.top-f,left:x.left-f,width:x.width+f*2,height:x.height+f*2,borderRadius:g}}),jsxs("div",{ref:P,className:u("fixed z-[10000] w-80 bg-popover text-popover-foreground rounded-lg shadow-lg border p-4","animate-in fade-in-0 zoom-in-95 duration-200",p),style:{top:T.top,left:T.left},children:[l&&jsx("button",{onClick:z,className:"absolute top-3 right-3 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Close tour",children:jsx(X,{className:"h-4 w-4"})}),k.content?k.content:jsxs("div",{className:"pr-6",children:[k.title&&jsx("h3",{className:"font-semibold text-base mb-2",children:k.title}),k.description&&jsx("p",{className:"text-sm text-muted-foreground",children:k.description})]}),jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-border",children:[c&&e.length>1&&jsx("div",{className:"flex items-center gap-1",children:e.map((B,U)=>jsx("div",{className:u("w-1.5 h-1.5 rounded-full transition-colors",U===w?"bg-primary":"bg-muted-foreground/30")},U))}),jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[!$&&jsx(ie,{variant:"ghost",size:"sm",onClick:A,startContent:jsx(ChevronLeft,{className:"h-4 w-4"}),children:E}),$&&e.length>1&&jsx(ie,{variant:"ghost",size:"sm",onClick:z,children:I}),jsx(ie,{variant:"solid",size:"sm",onClick:V,endContent:_?void 0:jsx(ChevronRight,{className:"h-4 w-4"}),children:_?L:N})]})]})]})]}),document.body)}Wy.displayName="Tour";var jy=cva("relative border border-input rounded-md bg-background transition-colors",{variants:{size:{sm:"h-32",md:"h-48",lg:"h-64"}},defaultVariants:{size:"md"}}),Yy=J.forwardRef(({className:e,size:t,strokeColor:r="currentColor",strokeWidth:n=2,backgroundColor:o="transparent",isDisabled:a=false,isRequired:s=false,isReadOnly:i=false,onChange:c,onBegin:l,onEnd:d,placeholder:m="Sign here",showClearButton:p=true,showUndoButton:f=true,clearLabel:g="Clear",undoLabel:v="Undo",...b},h)=>{let x=J.useRef(null),y=J.useRef(null),[T,C]=J.useState(false),[R,M]=J.useState([]),[P,S]=J.useState([]),[w,k]=J.useState(true),N=J.useCallback(()=>r==="currentColor"&&x.current?window.getComputedStyle(x.current).color:r,[r]),E=J.useCallback(()=>{let D=x.current;if(!D)return;let H=D.getContext("2d");if(H&&(H.fillStyle=o,H.fillRect(0,0,D.width,D.height),R.forEach(F=>{if(!(F.points.length<2)){H.beginPath(),H.strokeStyle=F.color,H.lineWidth=F.width,H.lineCap="round",H.lineJoin="round",H.moveTo(F.points[0].x,F.points[0].y);for(let W=1;W<F.points.length;W++){let X=F.points[W-1],Z=F.points[W],me=(X.x+Z.x)/2,ve=(X.y+Z.y)/2;H.quadraticCurveTo(X.x,X.y,me,ve);}H.stroke();}}),P.length>1)){H.beginPath(),H.strokeStyle=N(),H.lineWidth=n,H.lineCap="round",H.lineJoin="round",H.moveTo(P[0].x,P[0].y);for(let F=1;F<P.length;F++){let W=P[F-1],X=P[F],Z=(W.x+X.x)/2,me=(W.y+X.y)/2;H.quadraticCurveTo(W.x,W.y,Z,me);}H.stroke();}},[R,P,o,N,n]),I=J.useCallback(()=>{let D=x.current,H=y.current;if(!D||!H)return;let F=H.getBoundingClientRect(),W=window.devicePixelRatio||1;D.width=F.width*W,D.height=F.height*W,D.style.width=`${F.width}px`,D.style.height=`${F.height}px`;let X=D.getContext("2d");X&&X.scale(W,W),E();},[E]);J.useEffect(()=>(I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)),[I]);let L=D=>{let H=x.current;if(!H)return null;let F=H.getBoundingClientRect(),W,X,Z;if("touches"in D){if(D.touches.length===0)return null;W=D.touches[0].clientX,X=D.touches[0].clientY,Z=D.touches[0].force;}else W=D.clientX,X=D.clientY,Z=D.pressure;return {x:W-F.left,y:X-F.top,pressure:Z}},V=D=>{if(a||i)return;D.preventDefault();let H=L(D);H&&(C(true),S([H]),l?.());},A=D=>{if(!T||a||i)return;D.preventDefault();let H=L(D);H&&S(F=>[...F,H]);},z=()=>{if(T){if(C(false),P.length>1){let D={points:P,color:N(),width:n};M(H=>[...H,D]),k(false),c?.(false);}S([]),d?.();}},O=J.useCallback(()=>{M([]),S([]),k(true),c?.(true);},[c]),$=J.useCallback(()=>{M(D=>{let H=D.slice(0,-1),F=H.length===0;return k(F),c?.(F),H});},[c]),_=J.useCallback(()=>R.length===0&&P.length===0,[R.length,P.length]),B=J.useCallback((D="image/png",H=1)=>{let F=x.current;return F?F.toDataURL(D,H):""},[]),U=J.useCallback(()=>{let D=x.current;if(!D)return "";let H=D.width/(window.devicePixelRatio||1),F=D.height/(window.devicePixelRatio||1),W="";return R.forEach(X=>{if(X.points.length<2)return;let Z=`M ${X.points[0].x} ${X.points[0].y}`;for(let me=1;me<X.points.length;me++){let ve=X.points[me-1],j=X.points[me],G=(ve.x+j.x)/2,Y=(ve.y+j.y)/2;Z+=` Q ${ve.x} ${ve.y} ${G} ${Y}`;}W+=`<path d="${Z}" stroke="${X.color}" stroke-width="${X.width}" fill="none" stroke-linecap="round" stroke-linejoin="round"/>`;}),`<svg xmlns="http://www.w3.org/2000/svg" width="${H}" height="${F}" viewBox="0 0 ${H} ${F}">${W}</svg>`},[R]),K=J.useCallback(()=>x.current,[]);return J.useImperativeHandle(h,()=>({clear:O,undo:$,isEmpty:_,toDataURL:B,toSVG:U,getCanvas:K}),[O,$,_,B,U,K]),J.useEffect(()=>{E();},[E]),jsxs("div",{className:u(jy({size:t}),a&&"opacity-50 cursor-not-allowed",i&&"cursor-default",e),"data-disabled":a||void 0,"data-readonly":i||void 0,"data-required":s||void 0,...b,children:[jsxs("div",{ref:y,className:"absolute inset-0 overflow-hidden rounded-[inherit]",children:[jsx("canvas",{ref:x,className:u("touch-none",!a&&!i&&"cursor-crosshair"),onMouseDown:V,onMouseMove:A,onMouseUp:z,onMouseLeave:z,onTouchStart:V,onTouchMove:A,onTouchEnd:z}),w&&m&&jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:jsx("span",{className:"text-muted-foreground text-sm",children:m})})]}),(p||f)&&!i&&jsxs("div",{className:"absolute bottom-2 right-2 flex gap-1",children:[f&&jsx("button",{type:"button",onClick:$,disabled:a||w,className:u("px-2 py-1 text-xs rounded bg-muted hover:bg-muted/80 transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:v}),p&&jsx("button",{type:"button",onClick:O,disabled:a||w,className:u("px-2 py-1 text-xs rounded bg-muted hover:bg-muted/80 transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:g})]})]})});Yy.displayName="SignaturePad";var Xy=cva(["fixed top-0 left-0 z-[9999]","px-4 py-3 text-sm font-medium","bg-background text-foreground border border-border shadow-lg","rounded-br-lg","transform -translate-y-full transition-transform duration-200","focus:translate-y-0 focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-2","focus-visible:translate-y-0"],{variants:{variant:{default:"bg-background text-foreground",primary:"bg-primary text-primary-foreground"}},defaultVariants:{variant:"default"}}),Zy=J.forwardRef(({className:e,variant:t,targetId:r="main-content",label:n="Skip to main content",additionalLinks:o,...a},s)=>{let i=(l,d)=>{l.preventDefault();let m=document.getElementById(d);m&&(m.hasAttribute("tabindex")||m.setAttribute("tabindex","-1"),m.focus(),m.scrollIntoView({behavior:"smooth",block:"start"}));};if(!o||o.length===0)return jsx("a",{ref:s,href:`#${r}`,className:u(Xy({variant:t}),e),onClick:l=>i(l,r),...a,children:n});let c=[{targetId:r,label:n},...o];return jsx("div",{className:u("fixed top-0 left-0 z-[9999] flex flex-col gap-1 p-2","transform -translate-y-full transition-transform duration-200","focus-within:translate-y-0","bg-background border border-border shadow-lg rounded-br-lg"),children:c.map((l,d)=>jsx("a",{ref:d===0?s:void 0,href:`#${l.targetId}`,className:u("px-3 py-2 text-sm font-medium rounded-md","hover:bg-accent hover:text-accent-foreground","focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-2","transition-colors"),onClick:m=>i(m,l.targetId),...d===0?a:{},children:l.label},l.targetId))})});Zy.displayName="SkipLink";function Ra(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[r,n]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{n(o.matches);};return n(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),r}function aL(){return Ra("(max-width: 767px)")}function sL(){return Ra("(min-width: 768px) and (max-width: 1023px)")}function iL(){return Ra("(min-width: 1024px)")}function lL(){return Ra("(prefers-color-scheme: dark)")?"dark":"light"}function cL(){return Ra("(prefers-reduced-motion: reduce)")}function bs(e={}){let{initialWidth:t=0,initialHeight:r=0,debounce:n=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:r}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),c=useCallback(()=>{let l=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(l,n)):l();},[n,o]);return useEffect(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),i.current&&clearTimeout(i.current);}),[c]),a}function fL(){let{width:e}=bs();return e}function gL(){let{height:e}=bs();return e}function bL(e){let{width:t}=bs();return t>=e}function vL(){let{width:e}=bs();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function yL(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let c=i instanceof Function?i(n):i;o(c),window.localStorage.setItem(e,JSON.stringify(c)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(c)}));}catch(c){console.warn(`Error setting localStorage key "${e}":`,c);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=c=>{if(c.key===e&&c.newValue!==null)try{o(JSON.parse(c.newValue));}catch{o(c.newValue);}else c.key===e&&c.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[n,a,s]}function wL(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let c=i instanceof Function?i(n):i;o(c),window.sessionStorage.setItem(e,JSON.stringify(c));}catch(c){console.warn(`Error setting sessionStorage key "${e}":`,c);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [n,a,s]}function ML(e,t=500){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function NL(e,t=500){let r=useRef(null),n=useRef(e);return useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...a)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...a);},t);},[t])}function kL(e,t=500){let r=useRef(null),n=useRef(e),o=useRef(null);useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]);let a=useCallback((...l)=>{o.current=l,r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...l),r.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null,o.current=null);},[]),i=useCallback(()=>{r.current&&o.current&&(clearTimeout(r.current),n.current(...o.current),r.current=null,o.current=null);},[]),c=useCallback(()=>r.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:c}}function EL(e,t=500){let[r,n]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,n(e);else {let s=setTimeout(()=>{o.current=Date.now(),n(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),r}function LL(e,t=500){let r=useRef(0),n=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...s)=>{let i=Date.now();i-r.current>=t?(o.current(...s),r.current=i):(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{o.current(...s),r.current=Date.now();},t-(i-r.current)));},[t])}function IL(e,t=true){let r=useRef(null);return useEffect(()=>{if(!t)return;let n=o=>{let a=r.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t]),r}function HL(e,t,r=true){useEffect(()=>{if(!r)return;let n=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t,r]);}function VL(e=2e3){let[t,r]=useState(null),[n,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{r(null),o(false);},[]),c=useCallback(async l=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(l),r(l),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),r(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:n,isLoading:a,copy:c,reset:i}}function AL(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Qy(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function e0(e,t){let r=e.key.toLowerCase(),n=r===" "?"space":r==="escape"?"esc":r,o=t.key==="space"?" ":t.key;return (n===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function zL(e,t,r={}){let{enabled:n=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=r,i=useRef(t);i.current=t;let c=Qy(e);useEffect(()=>{if(!n)return;let l=m=>{e0(m,c)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",l),()=>{d.removeEventListener("keydown",l);}},[n,o,a,s,c]);}function OL(e,t={}){let{enabled:r=true,preventDefault:n=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([c,l])=>({parsed:Qy(c),handler:l}));useEffect(()=>{if(!r)return;let c=d=>{for(let{parsed:m,handler:p}of i)if(e0(d,m)){n&&d.preventDefault(),o&&d.stopPropagation(),p(d);break}},l=a||document;return l.addEventListener("keydown",c),()=>{l.removeEventListener("keydown",c);}},[r,n,o,a,i]);}function FL(e){let t=useRef(false);return useEffect(()=>{let r=o=>{o.key===e&&(t.current=true);},n=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",r),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",r),document.removeEventListener("keyup",n);}},[e]),t.current}function BL(e,t,r,n){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(r==null?a=window:"current"in r?a=r.current:a=r,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a?.removeEventListener(e,s,n);}},[e,r,n]);}function $L(e,t,r){let n=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=n.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r);}},[e,r]),n}function KL(e,t,r={}){let{target:n,event:o="keydown",enabled:a=true}=r,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=n?.current||window,c=l=>{l.key===e&&s.current(l);};return i.addEventListener(o,c),()=>{i.removeEventListener(o,c);}},[e,n,o,a]);}function GL(e,t={}){let{threshold:r=500,onStart:n,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),c=useRef(null),l=useCallback(m=>{a&&(c.current=m,i.current=false,n?.(m),s.current=setTimeout(()=>{i.current=true,c.current&&e(c.current);},r));},[e,r,n,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,c.current=null);},[o,a]);return {onMouseDown:l,onMouseUp:d,onMouseLeave:d,onTouchStart:l,onTouchEnd:d}}function UL(e){let t=useRef(null),[r,n]=useState(false),o=useCallback(()=>{n(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{n(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:r}}function _L(e,t){let[r,n]=useState(false),o=useCallback(()=>{n(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{n(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),r}function WL(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function jL(e=0){let t=useRef(null),[r,n]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:r}}function qL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=n=>{t({x:n.clientX,y:n.clientY});};return window.addEventListener("mousemove",r),()=>{window.removeEventListener("mousemove",r);}},[]),e}function XL(e={}){let{enabled:t=true,resetOnLeave:r=false}=e,n=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=n.current;if(!s||!t)return;let i=l=>{let d=s.getBoundingClientRect();a({x:l.clientX,y:l.clientY,elementX:l.clientX-d.left,elementY:l.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:l.pageX,pageY:l.pageY});},c=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",c),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",c);}},[t,r]),{ref:n,...o}}function ZL(e,t={}){let{enabled:r=true,resetOnLeave:n=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!r)return;let i=l=>{let d=s.getBoundingClientRect();a({x:l.clientX,y:l.clientY,elementX:l.clientX-d.left,elementY:l.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:l.pageX,pageY:l.pageY});},c=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",c),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",c);}},[e,r,n]),o}function JL(e={}){let{threshold:t=0,throttle:r=0,element:n}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),c=useRef(false),l=useRef(0),d=useCallback(()=>{let p=n?.current,f=p?p.scrollTop:window.scrollY,g=p?p.scrollLeft:window.scrollX,v=p?p.scrollHeight-p.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=f>s.current?1:f<s.current?-1:0,h=g>i.current?1:g<i.current?-1:0;s.current=f,i.current=g,a({x:g,y:f,isScrolled:f>t,directionY:b,directionX:h,isAtBottom:f>=v-1,isAtTop:f<=0,progress:v>0?f/v:0}),c.current=false;},[n,t]),m=useCallback(()=>{let p=Date.now();if(r>0&&p-l.current<r){c.current||(c.current=true,requestAnimationFrame(d));return}l.current=p,c.current||(c.current=true,requestAnimationFrame(d));},[r,d]);return useEffect(()=>{let p=n?.current||window;return p.addEventListener("scroll",m,{passive:true}),d(),()=>{p.removeEventListener("scroll",m);}},[n,m,d]),o}function QL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",r,{passive:true}),r(),()=>{window.removeEventListener("scroll",r);}},[]),e}function i0(e={}){let{autoLock:t=false,lockX:r=true}=e,n=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||n.current)return;let{body:c}=document,l=window.scrollY,d=window.scrollX;o.current={x:d,y:l},a.current={overflow:c.style.overflow,overflowX:c.style.overflowX,overflowY:c.style.overflowY,position:c.style.position,top:c.style.top,left:c.style.left,width:c.style.width},c.style.overflow="hidden",r&&(c.style.overflowX="hidden"),c.style.overflowY="hidden",c.style.position="fixed",c.style.top=`-${l}px`,c.style.left=r?`-${d}px`:"0",c.style.width="100%",n.current=true;},[r]),i=useCallback(()=>{if(typeof document>"u"||!n.current)return;let{body:c}=document,l=a.current;l&&(c.style.overflow=l.overflow,c.style.overflowX=l.overflowX,c.style.overflowY=l.overflowY,c.style.position=l.position,c.style.top=l.top,c.style.left=l.left,c.style.width=l.width),window.scrollTo(o.current.x,o.current.y),n.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:n.current}}function eD(e=true){let{lock:t,unlock:r}=i0();useEffect(()=>{e?t():r();},[e,t,r]);}function d0(e={}){let{root:t=null,rootMargin:r="0px",threshold:n=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,c]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let l=s.current;if(!l||!a)return;let d=new IntersectionObserver(([m])=>{c({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:r,threshold:n});return d.observe(l),()=>{d.disconnect();}},[t,r,n,o,a]),{ref:s,...i}}function rD(e,t={}){let{root:r=null,rootMargin:n="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,c]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let l=e.current;if(!l||!s)return;let d=new IntersectionObserver(([m])=>{c({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:r,rootMargin:n,threshold:o});return d.observe(l),()=>{d.disconnect();}},[e,r,n,o,a,s]),i}function nD(e="200px"){let{ref:t,isIntersecting:r}=d0({rootMargin:e,once:true});return {ref:t,isVisible:r}}function oD(e,t={}){let{enabled:r=true,childList:n=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:c=false,attributeFilter:l}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let p=d.current;if(!p||!r)return;let f=new MutationObserver((g,v)=>{m.current(g,v);});return f.observe(p,{childList:n,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:c,attributeFilter:l}),()=>{f.disconnect();}},[r,n,o,a,s,i,c,l]),d}function aD(e,t,r={}){let{enabled:n=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:c=false,characterDataOldValue:l=false,attributeFilter:d}=r,m=useRef(t);m.current=t,useEffect(()=>{let p=e.current;if(!p||!n)return;let f=new MutationObserver((g,v)=>{m.current(g,v);});return f.observe(p,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:c,characterDataOldValue:l,attributeFilter:d}),()=>{f.disconnect();}},[e,n,o,a,s,i,c,l,d]);}function sD(e={}){let{enabled:t=true,box:r="content-box",debounce:n=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),c=useCallback(l=>{let d=l[0];if(!d)return;let m,p;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,p=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,p=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,p=d.contentRect.height);let f=()=>s({width:m,height:p});n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(f,n)):f();},[r,n]);return useEffect(()=>{let l=o.current;if(!l||!t)return;let d=new ResizeObserver(c);d.observe(l,{box:r});let m=l.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,r,c]),{ref:o,...a}}function iD(e,t={}){let{enabled:r=true,box:n="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),c=useCallback(l=>{let d=l[0];if(!d)return;let m,p;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,p=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,p=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,p=d.contentRect.height);let f=()=>s({width:m,height:p});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(f,o)):f();},[n,o]);return useEffect(()=>{let l=e.current;if(!l||!r)return;let d=new ResizeObserver(c);d.observe(l,{box:n});let m=l.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,r,n,c]),a}function lD(){let e=useRef(null),t=useCallback(()=>{let r=e.current;if(!r)return {width:0,height:0};let n=r.getBoundingClientRect();return {width:n.width,height:n.height}},[]);return {ref:e,measure:t}}function f0(e={}){let{defaultOpen:t=false,isOpen:r,onOpen:n,onClose:o,onChange:a,id:s}=e,[i,c]=useState(t),l=r!==void 0,d=l?r:i,m=useCallback(()=>{l||c(true),n?.(),a?.(true);},[l,n,a]),p=useCallback(()=>{l||c(false),o?.(),a?.(false);},[l,o,a]),f=useCallback(()=>{d?p():m();},[d,m,p]),g=useCallback(h=>{h?m():p();},[m,p]),v=useCallback(()=>({onClick:f,"aria-expanded":d,...s&&{"aria-controls":s}}),[f,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:p,toggle:f,setIsOpen:g,getButtonProps:v,getDisclosureProps:b}),[d,m,p,f,g,v,b])}function uD(e){return f0({...e,defaultOpen:true})}function mD(e=false){let[t,r]=useState(e),n=useCallback(()=>{r(o=>!o);},[]);return [t,n,r]}function pD(e,t=0){let[r,n]=useState(t),o=useCallback(()=>{n(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{n(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let c=e.indexOf(i);c!==-1&&n(c);},[e]);return useMemo(()=>({value:e[r],index:r,next:o,prev:a,setIndex:n,setValue:s}),[e,r,o,a,s])}function fD(e=false){let[t,r]=useState(e),n=useCallback(()=>r(s=>!s),[]),o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]);return useMemo(()=>({value:t,toggle:n,on:o,off:a,set:r}),[t,n,o,a])}function bD(e=0,t={}){let{min:r=-1/0,max:n=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,r),n),[r,n]),[s,i]=useState(()=>a(e)),c=useCallback(()=>{i(g=>a(g+o));},[a,o]),l=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),p=s<=r,f=s>=n;return useMemo(()=>({count:s,increment:c,decrement:l,set:d,reset:m,isMin:p,isMax:f}),[s,c,l,d,m,p,f])}function vD(e=0){let[t,r]=useState(e),n=useCallback(()=>r(o=>o+1),[]);return [t,n]}function hD(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function xD(e,t){let r=useRef(t);return useEffect(()=>{r.current=e;},[e]),r.current}function yD(e){let t=useRef(void 0),r=useRef(e),n=r.current!==e;return useEffect(()=>{t.current=r.current,r.current=e;},[e]),{current:e,previous:t.current,hasChanged:n}}function CD(e=[]){let[t,r]=useState(e),n=useCallback(C=>{r(C);},[]),o=useCallback(C=>{r(R=>[...R,C]);},[]),a=useCallback(C=>{r(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{r(M=>{let P=[...M];return P.splice(C,0,R),P});},[]),i=useCallback((C,R)=>{r(M=>{let P=[...M];return P[C]=R,P});},[]),c=useCallback(C=>{r(R=>R.filter((M,P)=>P!==C));},[]),l=useCallback(C=>{r(R=>{let M=R.indexOf(C);return M===-1?R:R.filter((P,S)=>S!==M)});},[]),d=useCallback(C=>{r(R=>R.filter(M=>!C(M)));},[]),m=useCallback(()=>{let C;return r(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),p=useCallback(C=>{r(R=>[C,...R]);},[]),f=useCallback(()=>{let C;return r(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{r([]);},[]),v=useCallback(()=>{r(e);},[e]),b=useCallback((C,R)=>{r(M=>{let P=[...M],[S]=P.splice(C,1);return P.splice(R,0,S),P});},[]),h=useCallback((C,R)=>{r(M=>{let P=[...M];return [P[C],P[R]]=[P[R],P[C]],P});},[]),x=useCallback(C=>t.filter(C),[t]),y=useCallback(C=>t.find(C),[t]),T=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:n,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:c,remove:l,removeWhere:d,shift:m,unshift:p,pop:f,clear:g,reset:v,move:b,swap:h,filter:x,find:y,includes:T,length:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i,c,l,d,m,p,f,g,v,b,h,x,y,T])}function TD(e=[]){let[t,r]=useState(()=>new Map(e)),n=useCallback(f=>t.get(f),[t]),o=useCallback((f,g)=>{r(v=>{let b=new Map(v);return b.set(f,g),b});},[]),a=useCallback(f=>{r(g=>{let v=new Map(g);return f.forEach(([b,h])=>v.set(b,h)),v});},[]),s=useCallback(f=>t.has(f),[t]),i=useCallback(f=>{r(g=>{let v=new Map(g);return v.delete(f),v});},[]),c=useCallback(()=>{r(new Map);},[]),l=useCallback(()=>{r(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),p=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:n,set:o,setMany:a,has:s,delete:i,clear:c,reset:l,keys:d,values:m,entries:p,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,c,l,d,m,p])}function MD(e={}){let[t,r]=useState(e),n=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{r(p=>({...p,[d]:m}));},[]),a=useCallback(d=>{r(m=>({...m,...d}));},[]),s=useCallback(d=>{r(m=>{let{[d]:p,...f}=m;return f});},[]),i=useCallback(()=>{r({});},[]),c=useCallback(()=>{r(e);},[e]),l=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:n,set:o,setAll:a,remove:s,clear:i,reset:c,has:l,keys:Object.keys(t),values:Object.values(t)}),[t,n,o,a,s,i,c,l])}function y0(e=[]){let[t,r]=useState(()=>new Set(e)),n=useCallback(m=>{r(p=>{let f=new Set(p);return f.add(m),f});},[]),o=useCallback(m=>{r(p=>{let f=new Set(p);return m.forEach(g=>f.add(g)),f});},[]),a=useCallback(m=>{r(p=>{let f=new Set(p);return f.delete(m),f});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{r(p=>{let f=new Set(p);return f.has(m)?f.delete(m):f.add(m),f});},[]),c=useCallback(()=>{r(new Set);},[]),l=useCallback(()=>{r(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:n,addMany:o,remove:a,has:s,toggle:i,clear:c,reset:l,values:d,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,c,l,d])}function kD(e=[]){let{add:t,remove:r,has:n,toggle:o,clear:a,addMany:s,values:i,size:c}=y0(e);return useMemo(()=>({selected:i(),isSelected:n,select:t,deselect:r,toggle:o,selectAll:s,deselectAll:a,count:c,isEmpty:c===0}),[i,n,t,r,o,s,a,c])}function SD(e=[]){let[t,r]=useState(e),n=useCallback(l=>{r(d=>[...d,l]);},[]),o=useCallback(l=>{r(d=>[...d,...l]);},[]),a=useCallback(()=>{let l;return r(d=>d.length===0?d:(l=d[0],d.slice(1))),l},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),c=useCallback(()=>{r([]);},[]);return useMemo(()=>({queue:t,enqueue:n,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:c,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,n,o,a,s,i,c])}function PD(e=[]){let[t,r]=useState(e),n=useCallback(c=>{r(l=>[...l,c]);},[]),o=useCallback(c=>{r(l=>[...l,...c]);},[]),a=useCallback(()=>{let c;return r(l=>l.length===0?l:(c=l[l.length-1],l.slice(0,-1))),c},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{r([]);},[]);return useMemo(()=>({stack:t,push:n,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i])}function T0(e,t=false){let[r,n]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...c)=>{n(l=>({...l,isLoading:true,isIdle:false,isError:false,error:null}));try{let l=await a.current(...c);return o.current&&n({data:l,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),l}catch(l){let d=l instanceof Error?l:new Error(String(l));return o.current&&n({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{n({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...r,execute:s,reset:i}}function LD(e,t=3,r=1e3){let[n,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...c)=>{let l=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...c)}catch(m){l=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(p=>setTimeout(p,r));}throw l},[t,r]);return {...T0(s,false),retryCount:n}}var k0=new Map,DD=300*1e3;function ID(e,t={}){let{immediate:r=true,init:n,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:c}=t,[l,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),p=useRef(true),f=useCallback(async()=>{if(!e||!s)return;let v=c||e,b=k0.get(v);if(b&&Date.now()-b.timestamp<DD){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(h=>({...h,isLoading:true,error:null}));try{let h=await fetch(e,{...n,signal:m.current.signal});if(!h.ok)throw new Error(`HTTP error! status: ${h.status}`);let x=await h.json(),y=o?o(x):x;k0.set(v,{data:y,timestamp:Date.now()}),p.current&&d({data:y,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(h){if(h instanceof Error&&h.name==="AbortError")return;let x=h instanceof Error?h:new Error(String(h));p.current&&d({data:null,error:x,isLoading:false,isSuccess:false,isError:true});}},[e,s,n,o,c]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(p.current=true,r&&s&&f(),()=>{p.current=false,g();}),[e,r,s,...a]),useEffect(()=>{if(!i||!s)return;let v=setInterval(f,i);return ()=>{clearInterval(v);}},[i,s,f]),{...l,refetch:f,abort:g}}function HD(e,t={}){let{transform:r,...n}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async c=>{a(l=>({...l,isLoading:true,error:null}));try{let l=await fetch(e,{...n,method:n.method||"POST",headers:{"Content-Type":"application/json",...n.headers},body:c?JSON.stringify(c):void 0});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);let d=await l.json(),m=r?r(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(l){let d=l instanceof Error?l:new Error(String(l));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,n,r]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function Cl(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setInterval(()=>{r.current();},t);return ()=>{clearInterval(n);}},[t]);}function AD(e,t){let[r,n]=useState(false);Cl(e,r?t:null);let o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]),s=useCallback(()=>n(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:r}}function zD(e,t={}){let{interval:r=1e3,onComplete:n,autoStart:o=false}=t,[a,s]=useState(e),[i,c]=useState(o),l=useRef(n);l.current=n;let d=a<=0;Cl(()=>{s(g=>{let v=g-1;return v<=0?(c(false),l.current?.(),0):v});},i&&!d?r:null);let m=useCallback(()=>{d||c(true);},[d]),p=useCallback(()=>{c(false);},[]),f=useCallback(g=>{s(g??e),c(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:p,reset:f}}function OD(e={}){let{interval:t=1e3,maxSeconds:r,autoStart:n=false}=e,[o,a]=useState(0),[s,i]=useState(n),c=s&&(r===void 0||o<r);Cl(()=>{a(f=>f+1);},c?t:null);let l=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(f=>!f),[]),p=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:l,stop:d,reset:p,toggle:m}}function E0(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setTimeout(()=>{r.current();},t);return ()=>{clearTimeout(n);}},[t]);}function FD(e,t){let[r,n]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),n(false);},[]),i=useCallback(()=>{s(),n(true),o.current=setTimeout(()=>{a.current(),n(false);},t);},[t,s]),c=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:c,isScheduled:r}}function BD(e,t){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function $D(e,t=true){let[r,n]=useState(false);return E0(()=>{n(true);},t?e:null),r}function KD(e,t=true){let[r,n]=useState(t),[o,a]=useState(0),[s,i]=useState(0),c=useRef(e);c.current=e;let l=useRef(null),d=useRef(0),m=useRef(0),p=useRef(0),f=useRef(0),g=useCallback(h=>{let x=d.current?h-d.current:0;d.current=h,f.current++,h-p.current>=1e3&&(a(f.current),f.current=0,p.current=h),m.current++,i(m.current),c.current(x,h),l.current=requestAnimationFrame(g);},[]),v=useCallback(()=>{l.current===null&&(d.current=0,p.current=performance.now(),f.current=0,l.current=requestAnimationFrame(g),n(true));},[g]),b=useCallback(()=>{l.current!==null&&(cancelAnimationFrame(l.current),l.current=null,n(false));},[]);return useEffect(()=>(t&&v(),()=>{l.current!==null&&cancelAnimationFrame(l.current);}),[t,v]),{start:v,stop:b,isRunning:r,frameCount:s,fps:o}}function GD(e,t={}){let{duration:r=300,easing:n="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),c=useRef(null),l={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let p=m-i.current,f=Math.min(p/r,1),g=l[n](f),v=s.current+(e-s.current)*g;a(v),f<1&&(c.current=requestAnimationFrame(d));};return c.current=requestAnimationFrame(d),()=>{c.current!==null&&cancelAnimationFrame(c.current);}},[e,r,n]),o}function UD(e,t={}){let{stiffness:r=100,damping:n=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),c=useRef(null),l=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{l.current===null&&(l.current=m);let p=Math.min((m-l.current)/1e3,.064);l.current=m;let f=(e-a)*r,g=i.current*n,v=(f-g)/o;i.current+=v*p;let b=a+i.current*p;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?c.current=requestAnimationFrame(d):(s(e),i.current=0);};return l.current=null,c.current=requestAnimationFrame(d),()=>{c.current!==null&&cancelAnimationFrame(c.current);}},[e,r,n,o,a]),a}var H0=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function _D(e,t={}){let{events:r=H0,initialState:n=false,enabled:o=true}=t,[a,s]=useState(n),i=useRef(null),c=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return c(),r.forEach(l=>{window.addEventListener(l,c);}),()=>{i.current&&clearTimeout(i.current),r.forEach(l=>{window.removeEventListener(l,c);});}},[o,r,c]),a}function WD(e,t,r,n={}){let{events:o=H0,initialState:a=false,enabled:s=true}=n,[i,c]=useState(a),l=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,r?.()),c(false),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{d.current=true,c(true),t?.();},e);},[e,t,r]);return useEffect(()=>{if(s)return m(),o.forEach(p=>{window.addEventListener(p,m);}),()=>{l.current&&clearTimeout(l.current),o.forEach(p=>{window.removeEventListener(p,m);});}},[s,o,m]),i}function A0(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let r=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}},[]),e}function qD(){return A0()==="visible"}function XD(e,t){let r=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}),[r]);}function ZD(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let r=()=>t(true),n=()=>t(false);return window.addEventListener("online",r),window.addEventListener("offline",n),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n);}},[]),e}function JD(e,t){let[r,n]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{n(true),e?.();},[e]),a=useCallback(()=>{n(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),r}function B0(e){let[t,r]=useState(false),n=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(c){console.error("Failed to enter fullscreen:",c);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{r(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:n}}function r1(){let e=useRef(null),t=B0(e);return {ref:e,...t}}function a1(e={}){let{watch:t=false,immediate:r=true,enableHighAccuracy:n=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),c=typeof navigator<"u"&&"geolocation"in navigator,l=useCallback(p=>{i({isLoading:false,position:p,error:null,latitude:p.coords.latitude,longitude:p.coords.longitude,accuracy:p.coords.accuracy,altitude:p.coords.altitude,altitudeAccuracy:p.coords.altitudeAccuracy,heading:p.coords.heading,speed:p.coords.speed,timestamp:p.timestamp});},[]),d=useCallback(p=>{i(f=>({...f,isLoading:false,error:p}));},[]),m=useCallback(()=>{c&&(i(p=>({...p,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(l,d,{enableHighAccuracy:n,maximumAge:o,timeout:a}));},[c,l,d,n,o,a]);return useEffect(()=>{if(c&&(r&&m(),t)){let p=navigator.geolocation.watchPosition(l,d,{enableHighAccuracy:n,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(p);}}},[t,r,c,m,l,d,n,o,a]),{...s,getCurrentPosition:m,isSupported:c}}function s1(e,t,r,n){if(e===null||t===null||r===null||n===null)return null;let o=6371e3,a=e*Math.PI/180,s=r*Math.PI/180,i=(r-e)*Math.PI/180,c=(n-t)*Math.PI/180,l=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(c/2)*Math.sin(c/2),d=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return o*d}function i1(e){let[t,r]=useState(null),[n,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return r(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,c=()=>{i&&r(i.state);};return navigator.permissions.query({name:e}).then(l=>{i=l,r(l.state),o(false),l.addEventListener("change",c);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",c);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:n,isSupported:a,query:s}}function l1(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),r=typeof Notification<"u",n=useCallback(async()=>{if(!r)return "default";let o=await Notification.requestPermission();return t(o),o},[r]);return useEffect(()=>{r&&t(Notification.permission);},[r]),{permission:e,request:n,isSupported:r}}function c1(e){let[t,r]=useState(null),[n,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,c=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return r(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),l=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),r(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:n,isLoading:a,request:c,stop:l,isSupported:i}}function u1(e={}){let{voice:t=null,rate:r=1,pitch:n=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[c,l]=useState(false),[d,m]=useState([]),p=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!p)return;let h=()=>{m(window.speechSynthesis.getVoices());};return h(),window.speechSynthesis.addEventListener("voiceschanged",h),()=>{window.speechSynthesis.removeEventListener("voiceschanged",h);}},[p]);let f=useCallback(h=>{if(!p)return;window.speechSynthesis.cancel();let x=new SpeechSynthesisUtterance(h);x.voice=t,x.rate=r,x.pitch=n,x.volume=o,x.lang=a,x.onstart=()=>i(true),x.onend=()=>{i(false),l(false);},x.onerror=()=>{i(false),l(false);},window.speechSynthesis.speak(x);},[p,t,r,n,o,a]),g=useCallback(()=>{p&&(window.speechSynthesis.cancel(),i(false),l(false));},[p]),v=useCallback(()=>{p&&(window.speechSynthesis.pause(),l(true));},[p]),b=useCallback(()=>{p&&(window.speechSynthesis.resume(),l(false));},[p]);return {speak:f,stop:g,pause:v,resume:b,isSpeaking:s,isPaused:c,isSupported:p,voices:d}}function m1(e={}){let{lang:t="en-US",continuous:r=false,interimResults:n=true}=e,[o,a]=useState(false),[s,i]=useState(""),[c,l]=useState(""),[d,m]=useState(null),p=useRef(null),f=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=f!==null;useEffect(()=>{if(!g||!f)return;let y=new f;return y.lang=t,y.continuous=r,y.interimResults=n,y.onstart=()=>{a(true),m(null);},y.onend=()=>{a(false);},y.onerror=T=>{m(new Error(T.error)),a(false);},y.onresult=T=>{let C="",R="";for(let M=T.resultIndex;M<T.results.length;M++){let P=T.results[M];P.isFinal?R+=P[0].transcript:C+=P[0].transcript;}R&&i(M=>M+R),l(C);},p.current=y,()=>{y.abort();}},[g,f,t,r,n]);let v=useCallback(()=>{if(p.current&&!o)try{p.current.start();}catch{}},[o]),b=useCallback(()=>{p.current&&p.current.stop();},[]),h=useCallback(()=>{p.current&&p.current.abort();},[]),x=useCallback(()=>{i(""),l(""),m(null);},[]);return {start:v,stop:b,abort:h,isListening:o,transcript:s,interimTranscript:c,isSupported:g,error:d,reset:x}}var K0=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function p1(e,t=K0){return e?t.filter(n=>n.test(e)).length/t.length:0}function f1(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function g1(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}function Br(e){let t=e.replace(/^#/,""),r=t.length===3?t.split("").map(o=>o+o).join(""):t;if(r.length!==6)return null;let n=parseInt(r,16);return isNaN(n)?null:{r:n>>16&255,g:n>>8&255,b:n&255}}function b1(e){let t=e.replace(/^#/,"");if(t.length===8){let n=Br(t.slice(0,6));if(!n)return null;let o=parseInt(t.slice(6,8),16)/255;return {...n,a:Math.round(o*100)/100}}let r=Br(e);return r?{...r,a:1}:null}function Rs(e,t,r){let n=o=>{let a=Math.max(0,Math.min(255,Math.round(o))).toString(16);return a.length===1?"0"+a:a};return `#${n(e)}${n(t)}${n(r)}`}function v1(e,t,r,n){let o=Rs(e,t,r),a=Math.round(n*255).toString(16).padStart(2,"0");return `${o}${a}`}function G0(e,t,r){e/=255,t/=255,r/=255;let n=Math.max(e,t,r),o=Math.min(e,t,r),a=0,s=0,i=(n+o)/2;if(n!==o){let c=n-o;switch(s=i>.5?c/(2-n-o):c/(n+o),n){case e:a=((t-r)/c+(t<r?6:0))/6;break;case t:a=((r-e)/c+2)/6;break;case r:a=((e-t)/c+4)/6;break}}return {h:Math.round(a*360),s:Math.round(s*100),l:Math.round(i*100)}}function cu(e,t,r){e/=360,t/=100,r/=100;let n,o,a;if(t===0)n=o=a=r;else {let s=(l,d,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<.16666666666666666?l+(d-l)*6*m:m<.5?d:m<.6666666666666666?l+(d-l)*(.6666666666666666-m)*6:l),i=r<.5?r*(1+t):r+t-r*t,c=2*r-i;n=s(c,i,e+1/3),o=s(c,i,e),a=s(c,i,e-1/3);}return {r:Math.round(n*255),g:Math.round(o*255),b:Math.round(a*255)}}function Io(e){let t=Br(e);return t?G0(t.r,t.g,t.b):null}function Ma(e,t,r){let n=cu(e,t,r);return Rs(n.r,n.g,n.b)}function lu(e,t,r){let[n,o,a]=[e,t,r].map(s=>(s/=255,s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)));return .2126*n+.7152*o+.0722*a}function du(e,t){let r=Br(e),n=Br(t);if(!r||!n)return 1;let o=lu(r.r,r.g,r.b),a=lu(n.r,n.g,n.b),s=Math.max(o,a),i=Math.min(o,a);return Math.round((s+.05)/(i+.05)*100)/100}function h1(e,t,r=false){let n=du(e,t);return r?n>=3:n>=4.5}function x1(e,t,r=false){let n=du(e,t);return r?n>=4.5:n>=7}function uu(e){let t=Io(e);return t?t.l>50:false}function y1(e){return !uu(e)}function R1(e){return uu(e)?"#000000":"#ffffff"}function w1(e,t){let r=Io(e);if(!r)return e;let n=Math.min(100,r.l+t);return Ma(r.h,r.s,n)}function C1(e,t){let r=Io(e);if(!r)return e;let n=Math.max(0,r.l-t);return Ma(r.h,r.s,n)}function T1(e,t){let r=Io(e);if(!r)return e;let n=Math.min(100,r.s+t);return Ma(r.h,n,r.l)}function M1(e,t){let r=Io(e);if(!r)return e;let n=Math.max(0,r.s-t);return Ma(r.h,n,r.l)}function N1(e,t){let r=Br(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${t})`:e}function k1(e,t,r=.5){let n=Br(e),o=Br(t);if(!n||!o)return e;let a=Math.round(n.r*r+o.r*(1-r)),s=Math.round(n.g*r+o.g*(1-r)),i=Math.round(n.b*r+o.b*(1-r));return Rs(a,s,i)}function S1(e){let t=Io(e);if(!t)return e;let r=(t.h+180)%360;return Ma(r,t.s,t.l)}function P1(e){let t=Br(e);return t?Rs(255-t.r,255-t.g,255-t.b):e}function E1(e){if(e.startsWith("#"))return Br(e);let t=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+)?\s*\)/i);if(t)return {r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)};let r=e.match(/hsla?\s*\(\s*(\d+)\s*,\s*(\d+)%?\s*,\s*(\d+)%?\s*(?:,\s*[\d.]+)?\s*\)/i);return r?cu(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)):null}function we(e){return e instanceof Date?e:typeof e=="number"?new Date(e):new Date(e)}function U0(e){let t=we(e);return !isNaN(t.getTime())}var L1=["January","February","March","April","May","June","July","August","September","October","November","December"],D1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],I1=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],H1=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function mu(e,t="yyyy-MM-dd"){let r=we(e);if(!U0(r))return "Invalid Date";let n=r.getFullYear(),o=r.getMonth(),a=r.getDate(),s=r.getDay(),i=r.getHours(),c=r.getMinutes(),l=r.getSeconds(),d=v=>v.toString().padStart(2,"0"),m=i%12||12,p={yyyy:n.toString(),yy:n.toString().slice(-2),MMMM:L1[o],MMM:D1[o],MM:d(o+1),M:(o+1).toString(),dd:d(a),d:a.toString(),EEEE:I1[s],EEE:H1[s],HH:d(i),H:i.toString(),hh:d(m),h:m.toString(),mm:d(c),m:c.toString(),ss:d(l),s:l.toString(),a:i<12?"AM":"PM"},f=Object.keys(p).sort((v,b)=>b.length-v.length),g=t;for(let v of f)g=g.replace(new RegExp(v,"g"),p[v]);return g}function V1(e){return mu(e,"yyyy-MM-dd")}function A1(e){return we(e).toISOString()}function z1(e,t=false){return mu(e,t?"HH:mm":"h:mm a")}var O1=[["year",31536e6],["month",2592e6],["week",6048e5],["day",864e5],["hour",36e5],["minute",6e4],["second",1e3]];function _0(e,t={}){let{locale:r="en",addSuffix:n=true,style:o="long"}=t,a=we(e),s=new Date,i=a.getTime()-s.getTime(),c=Math.abs(i);for(let[l,d]of O1)if(c>=d||l==="second"){let m=Math.round(i/d);try{return new Intl.RelativeTimeFormat(r,{style:o}).format(m,l)}catch{let p=Math.abs(m),f=p===1?l:`${l}s`;return n?m<0?`${p} ${f} ago`:`in ${p} ${f}`:`${p} ${f}`}}return "just now"}function F1(e,t=new Date){let r=we(e),o=we(t).getTime()-r.getTime();if(o<0)return _0(e);let a=Math.floor(o/1e3),s=Math.floor(a/60),i=Math.floor(s/60),c=Math.floor(i/24),l=Math.floor(c/7),d=Math.floor(c/30),m=Math.floor(c/365);return a<60?"just now":s<60?`${s}m ago`:i<24?`${i}h ago`:c<7?`${c}d ago`:l<4?`${l}w ago`:d<12?`${d}mo ago`:`${m}y ago`}function B1(e){let t=we(e),r=new Date;return t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function $1(e){let t=we(e),r=new Date;return r.setDate(r.getDate()-1),t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function K1(e){let t=we(e),r=new Date;return r.setDate(r.getDate()+1),t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function G1(e){return we(e).getTime()<Date.now()}function U1(e){return we(e).getTime()>Date.now()}function _1(e,t){let r=we(e),n=we(t);return r.getDate()===n.getDate()&&r.getMonth()===n.getMonth()&&r.getFullYear()===n.getFullYear()}function W1(e,t){let r=we(e),n=we(t);return r.getMonth()===n.getMonth()&&r.getFullYear()===n.getFullYear()}function j1(e,t){return we(e).getFullYear()===we(t).getFullYear()}function Y1(e,t){let r=new Date(we(e));return r.setDate(r.getDate()+t),r}function q1(e,t){let r=new Date(we(e));return r.setMonth(r.getMonth()+t),r}function X1(e,t){let r=new Date(we(e));return r.setFullYear(r.getFullYear()+t),r}function Z1(e,t){let r=new Date(we(e));return r.setTime(r.getTime()+t*36e5),r}function J1(e,t){let r=new Date(we(e));return r.setTime(r.getTime()+t*6e4),r}function Q1(e){let t=new Date(we(e));return t.setHours(0,0,0,0),t}function eI(e){let t=new Date(we(e));return t.setHours(23,59,59,999),t}function tI(e){let t=new Date(we(e));return t.setDate(1),t.setHours(0,0,0,0),t}function rI(e){let t=new Date(we(e));return t.setMonth(t.getMonth()+1,0),t.setHours(23,59,59,999),t}function nI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/864e5)}function oI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/36e5)}function aI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/6e4)}function sI(e,t={}){let{locale:r="en-US",minimumFractionDigits:n,maximumFractionDigits:o,useGrouping:a=true}=t;try{return new Intl.NumberFormat(r,{minimumFractionDigits:n,maximumFractionDigits:o,useGrouping:a}).format(e)}catch{return e.toString()}}function iI(e,t="USD",r={}){let{locale:n="en-US",display:o="symbol",minimumFractionDigits:a=2,maximumFractionDigits:s=2}=r;try{return new Intl.NumberFormat(n,{style:"currency",currency:t,currencyDisplay:o,minimumFractionDigits:a,maximumFractionDigits:s}).format(e)}catch{return `${t} ${e.toFixed(2)}`}}function lI(e,t={}){let{locale:r="en-US",minimumFractionDigits:n=0,maximumFractionDigits:o=1,signDisplay:a="auto"}=t,s=Math.abs(e)>1?e/100:e;try{return new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:n,maximumFractionDigits:o,signDisplay:a}).format(s)}catch{return `${(s*100).toFixed(o)}%`}}function cI(e,t={}){let{decimals:r=2,binary:n=true}=t;if(e===0)return "0 Bytes";let o=n?1024:1e3,a=n?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","kB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(o));return `${(e/Math.pow(o,s)).toFixed(r)} ${a[s]}`}function dI(e,t={}){let{locale:r="en-US",maximumFractionDigits:n=1}=t;try{return new Intl.NumberFormat(r,{notation:"compact",maximumFractionDigits:n}).format(e)}catch{let o=["","K","M","B","T"],a=Math.floor(Math.log10(Math.abs(e))/3);if(a===0)return e.toString();let s=o[a]||"",i=Math.pow(10,a*3);return (e/i).toFixed(n).replace(/\.0$/,"")+s}}function uI(e){let t=["th","st","nd","rd"],r=e%100;return r>=11&&r<=13?`${e}th`:`${e}${t[r%10]||"th"}`}function mI(e,t="(###) ###-####"){let r=e.replace(/\D/g,""),n=t,o=0;for(let a=0;a<n.length&&o<r.length;a++)n[a]==="#"&&(n=n.substring(0,a)+r[o]+n.substring(a+1),o++);return n.replace(/#/g,"").trim()}function pI(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function fI(e,t,r="..."){return e.length<=t?e:e.slice(0,t-r.length)+r}function gI(e,t,r="..."){if(e.length<=t)return e;let n=t-r.length,o=Math.ceil(n/2),a=Math.floor(n/2);return e.slice(0,o)+r+e.slice(-a)}function bI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function W0(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase())}function vI(e){let t=W0(e);return t.charAt(0).toUpperCase()+t.slice(1)}function hI(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function xI(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function yI(e){return e.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function RI(e){let t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function wI(e){return e.charAt(0).toUpperCase()+e.slice(1)}function CI(e,t=2){return e.split(" ").filter(Boolean).map(r=>r[0]).slice(0,t).join("").toUpperCase()}function TI(e,t,r){return e===1?t:r||`${t}s`}function MI(e,t="and"){if(e.length===0)return "";if(e.length===1)return e[0];if(e.length===2)return `${e[0]} ${t} ${e[1]}`;let r=e[e.length-1];return `${e.slice(0,-1).join(", ")}, ${t} ${r}`}function NI(e,t=0,r=0,n="*"){if(e.length<=t+r)return e;let o=e.slice(0,t),a=e.slice(-r||void 0),s=e.length-t-r;return `${o}${n.repeat(s)}${r>0?a:""}`}function kI(e){let[t,r]=e.split("@");return !t||!r?e:`${t.length<=2?t:t[0]+"*".repeat(t.length-2)+t[t.length-1]}@${r}`}function SI(e,t=4){let r=e.replace(/\D/g,"");return r.length<=t?e:"*".repeat(r.length-t)+r.slice(-t)}function PI(e){return `**** **** **** ${e.replace(/\D/g,"").slice(-4)}`}
82
- export{Fm as Accordion,Bm as AccordionItem,Sh as ActionBar,Ph as ActionBarButton,Nh as ActionGroup,ix as ActionSheet,rR as Alert,oR as AlertDescription,nR as AlertTitle,rh as AreaChart,pp as AspectRatio,Gy as AudioPlayer,cv as Autocomplete,co as Avatar,uo as AvatarFallback,pg as AvatarGroup,Bo as AvatarImage,Eb as BackTop,lR as Badge,Jh as Banner,eh as BarChart,Ey as Blockquote,ox as BottomNavigation,wx as Bounce,op as Breadcrumb,dp as BreadcrumbEllipsis,sp as BreadcrumbItem,ip as BreadcrumbLink,ap as BreadcrumbList,lp as BreadcrumbPage,cp as BreadcrumbSeparator,ie as Button,yu as ButtonGroup,Ru as ButtonGroupSeparator,rC as CALENDAR_SYSTEM_NAMES,vb as COUNTRIES,ei as Calendar,Nu as Card,Eu as CardContent,Pu as CardDescription,Lu as CardFooter,ku as CardHeader,Su as CardTitle,ch as Carousel,dh as CarouselContent,uh as CarouselItem,Wc as CarouselNext,_c as CarouselPrevious,Na as Checkbox,Bx as Checkmark,hg as Chip,Tg as CircularProgress,Ft as CloseButton,Sv as Code,Iv as CodeBlock,vx as Collapse,Wm as Collapsible,jm as CollapsibleContent,Xl as CollapsibleTrigger,$h as ColorArea,ib as ColorPicker,Uh as ColorSlider,Wa as ColorSwatch,ab as ColorSwatchPicker,Wh as ColorWheel,uc as Command,BC as CommandDialog,ng as CommandEmpty,og as CommandGroup,tg as CommandInput,sg as CommandItem,rg as CommandList,ag as CommandSeparator,ig as CommandShortcut,$x as Confetti,Gv as ConfirmDialog,mm as ContextMenu,Rm as ContextMenuCheckboxItem,vm as ContextMenuContent,fm as ContextMenuGroup,ym as ContextMenuItem,gm as ContextMenuPortal,wm as ContextMenuSection,Cm as ContextMenuSeparator,Tm as ContextMenuShortcut,bm as ContextMenuSub,xm as ContextMenuSubContent,hm as ContextMenuSubTrigger,pm as ContextMenuTrigger,Hh as ContextualHelp,qv as CopyButton,kx as Counter,mb as CurrencyInput,ts as DEFAULT_COLORS,dy as DataGrid,Jw as DataTable,Ch as DatePicker,Fv as DateRangePicker,wy as Diff,rc as DirectionContext,qs as DirectionProvider,qx as Dock,Xx as DockItem,Zx as DockSeparator,tc as Drawer,zp as DrawerBody,$p as DrawerClose,Vp as DrawerContent,Bp as DrawerDescription,Op as DrawerFooter,Yp as DrawerGroup,qp as DrawerGroupLabel,Ap as DrawerHeader,Xp as DrawerInset,Up as DrawerMenu,jp as DrawerMenuButton,_p as DrawerMenuItem,Hw as DrawerProvider,Gp as DrawerSeparator,Ip as DrawerSidebar,Fp as DrawerTitle,Kp as DrawerToggle,Hp as DrawerTrigger,At as Dropdown,Ot as DropdownContent,Qu as DropdownGroup,xt as DropdownItem,jR as DropdownLabel,Al as DropdownSection,Zu as DropdownSeparator,Ju as DropdownShortcut,em as DropdownSub,rm as DropdownSubContent,tm as DropdownSubTrigger,zt as DropdownTrigger,Yc as EMOJIS,qi as EMOJI_CATEGORIES,ph as EmojiPicker,Ag as EmptyState,hx as Expand,oP as FAB,fx as Fade,kc as FieldContext,tb as FileUpload,yx as Flip,ud as FloatingActionButton,dv as Form,Dr as FormContext,fv as FormControl,gv as FormDescription,uv as FormField,mv as FormItem,pv as FormLabel,bv as FormMessage,Jv as FullCalendar,fy as GanttChart,Kx as Glow,Fh as GridList,My as H1,Ny as H2,ky as H3,Sy as H4,Oy as HeatmapCalendar,ep as HoverCard,rp as HoverCardContent,tp as HoverCardTrigger,oc as I18nContext,Hf as I18nProvider,zv as Image,fE as ImageComparison,bh as ImageCropper,Oc as ImageViewer,_v as ImageViewerTrigger,Kv as InfiniteScroll,Ly as InlineCode,Sn as Input,kg as InputOTP,Sg as InputOTPGroup,Eg as InputOTPSeparator,Pg as InputOTPSlot,sh as KanbanBoard,jv as Kbd,Aa as LOCALE_DEFAULT_CALENDARS,io as Label,Iy as Large,Dy as Lead,Qv as LineChart,Sb as Link,$T as List,Gg as ListItem,Ug as ListItemText,hc as MASK_PRESETS,jx as Marquee,gb as MaskedInput,ay as Masonry,sy as MasonryItem,ey as Mentions,Vb as Menubar,Wb as MenubarCheckboxItem,Ub as MenubarContent,zb as MenubarGroup,_b as MenubarItem,OM as MenubarLabel,Ab as MenubarMenu,Ob as MenubarPortal,Bb as MenubarRadioGroup,jb as MenubarRadioItem,wc as MenubarSection,Yb as MenubarSeparator,qb as MenubarShortcut,Fb as MenubarSub,Gb as MenubarSubContent,Kb as MenubarSubTrigger,$b as MenubarTrigger,li as Modal,mi as ModalBody,eg as ModalClose,di as ModalContent,gi as ModalDescription,pi as ModalFooter,ui as ModalHeader,dc as ModalOverlay,cc as ModalPortal,ci as ModalRoot,fi as ModalTitle,Qf as ModalTrigger,Vy as Muted,Rb as Navbar,wb as NavbarBrand,Cb as NavbarContent,Tb as NavbarItem,Mb as NavbarLink,xp as NavigationMenu,Tp as NavigationMenuContent,kp as NavigationMenuIndicator,Rp as NavigationMenuItem,Np as NavigationMenuLink,yp as NavigationMenuList,Cp as NavigationMenuTrigger,Ql as NavigationMenuViewport,yv as NumberField,Ba as NumberInput,yy as OrgChart,Uy as PDFViewer,$f as Pagination,Kf as PaginationContent,Wf as PaginationEllipsis,Gf as PaginationItem,ni as PaginationLink,_f as PaginationNext,Uf as PaginationPrevious,Py as Paragraph,Ax as Parallax,cg as PasswordInput,hb as PhoneInput,th as PieChart,Nx as Pop,jt as Popover,En as PopoverAnchor,Yt as PopoverContent,Pn as PopoverTrigger,_s as Progress,px as PullToRefresh,Tx as Pulse,vh as QRCode,Df as RTL_LOCALES,Kl as Radio,jl as RadioContent,Gl as RadioControl,Wl as RadioDescription,Pm as RadioGroup,Em as RadioGroupItem,Ul as RadioIndicator,_l as RadioLabel,ri as RangeCalendar,Lh as RangeSlider,gg as Rating,Qc as ReeverUIContext,yh as ReeverUIProvider,uT as ResizableHandle,dT as ResizablePanel,cT as ResizablePanelGroup,Rx as Ripple,xx as Rotate,bx as Scale,Le as ScrollArea,Vx as ScrollProgress,Hx as ScrollReveal,mo as Select,wv as SelectField,NR as Separator,Cx as Shake,Fx as Shimmer,ef as Sidebar,rf as SidebarContent,nf as SidebarFooter,of as SidebarGroup,sf as SidebarGroupAction,lf as SidebarGroupContent,af as SidebarGroupLabel,tf as SidebarHeader,wf as SidebarInset,cf as SidebarMenu,pf as SidebarMenuAction,ff as SidebarMenuBadge,mf as SidebarMenuButton,df as SidebarMenuItem,hf as SidebarMenuSkeleton,gf as SidebarMenuSub,vf as SidebarMenuSubButton,bf as SidebarMenuSubItem,Qp as SidebarProvider,yf as SidebarRail,Rf as SidebarSeparator,xf as SidebarTrigger,Yy as SignaturePad,Is as Skeleton,Zy as SkipLink,gx as Slide,yr as Slider,Hy as Small,Av as Snippet,Gx as Sparkles,Ms as Spinner,oy as SplitButton,Xh as SpotlightSearch,Fg as StatCard,Qb as Step,Zb as Steps,dx as SwipeActions,Vu as Switch,Hv as TabbedCodeBlock,Cf as Table,Mf as TableBody,Ef as TableCaption,Pf as TableCell,Nf as TableFooter,Sf as TableHead,Tf as TableHeader,kf as TableRow,im as Tabs,dm as TabsContent,lm as TabsList,cm as TabsTrigger,Hg as TagInput,Ty as Terminal,dR as TextBadge,vv as TextField,Px as TextReveal,Ds as Textarea,hv as TextareaField,Xi as ThemeProvider,hh as ThemeToggle,cb as TimeInput,Bv as TimePicker,jg as Timeline,Xg as TimelineContent,qg as TimelineItem,Zg as TimelineOpposite,ZR as Toaster,Lm as Toggle,Im as ToggleGroup,Hm as ToggleGroupItem,$r as Tooltip,Ku as TooltipArrow,Gr as TooltipContent,Kr as TooltipTrigger,Wy as Tour,ry as TransferList,sv as Tree,Sx as Typewriter,Ay as UL,Mv as User,$y as VideoPlayer,Mx as Wiggle,Ex as WordRotate,kh as actionBarVariants,Mh as actionGroupVariants,sx as actionSheetItemVariants,Y1 as addDays,Z1 as addHours,J1 as addMinutes,q1 as addMonths,X1 as addYears,eR as alertVariants,N1 as alpha,Ti as applyMask,lv as autocompleteInputVariants,mg as avatarGroupVariants,Pb as backTopVariants,aR as badgeIndicatorVariants,Zh as bannerVariants,nx as bottomNavigationVariants,nc as buildFullLocale,zo as buttonVariants,p1 as calculatePasswordStrength,W0 as camelCase,wI as capitalize,Mu as cardVariants,ih as carouselVariants,es as chartContainerVariants,vg as chipVariants,Cg as circularProgressVariants,Lp as closeButtonVariants,u as cn,kv as codeVariants,Bh as colorAreaVariants,Gh as colorSliderVariants,ob as colorSwatchPickerVariants,nb as colorSwatchVariants,_h as colorWheelVariants,S1 as complement,sd as contextualHelpTriggerVariants,Yv as copyButtonVariants,ub as currencyInputVariants,C1 as darken,wd as dataGridVariants,wh as datePickerVariants,K0 as defaultPasswordRequirements,M1 as desaturate,ml as diffVariants,nI as differenceInDays,oI as differenceInHours,aI as differenceInMinutes,Yx as dockVariants,Wp as drawerMenuButtonVariants,mh as emojiPickerVariants,eI as endOfDay,rI as endOfMonth,as as fabVariants,Jg as fileUploadVariants,cI as formatBytes,dI as formatCompact,pI as formatCreditCard,iI as formatCurrency,mu as formatDate,wi as formatFileSize,V1 as formatISO,A1 as formatISODateTime,MI as formatList,sI as formatNumber,uI as formatOrdinal,lI as formatPercent,mI as formatPhone,Mi as formatPhoneNumber,_0 as formatRelative,z1 as formatTime,Zv as fullCalendarVariants,dl as ganttChartVariants,In as getBaseLocale,du as getContrastRatio,If as getDefaultCalendarForLocale,Js as getDirectionForLocale,Qg as getFileIcon,CI as getInitials,lu as getLuminance,fb as getMaskPlaceholder,f1 as getPasswordStrengthColor,g1 as getPasswordStrengthLabel,R1 as getTextColor,Oh as gridListItemVariants,zh as gridListVariants,Io as hexToHsl,Br as hexToRgb,b1 as hexToRgba,Ma as hslToHex,cu as hslToRgb,gh as imageCropperVariants,Dc as imageVariants,Ac as infiniteScrollLoaderVariants,Vc as infiniteScrollVariants,Ng as inputOTPVariants,P1 as invert,y1 as isDarkColor,U1 as isFuture,uu as isLightColor,G1 as isPast,nC as isRTLLocale,_1 as isSameDay,W1 as isSameMonth,j1 as isSameYear,B1 as isToday,K1 as isTomorrow,U0 as isValidDate,$1 as isYesterday,Wv as kbdVariants,hI as kebabCase,w1 as lighten,Kg as listItemVariants,Ua as listVariants,Wx as marqueeVariants,NI as mask,PI as maskCreditCard,kI as maskEmail,SI as maskPhone,pb as maskedInputVariants,Rd as masonryVariants,h1 as meetsContrastAA,x1 as meetsContrastAAA,Qx as mentionsVariants,k1 as mix,lc as modalContentVariants,yb as navbarVariants,Mp as navigationMenuLinkStyle,wp as navigationMenuTriggerStyle,hy as nodeVariants,vy as orgChartVariants,Xs as parseCalendarFromLocale,E1 as parseColor,we as parseDate,vI as pascalCase,RM as phoneInputVariants,TI as pluralize,mx as pullToRefreshVariants,Xc as qrCodeVariants,Eh as rangeSliderVariants,fg as ratingVariants,Rs as rgbToHex,G0 as rgbToHsl,v1 as rgbaToHex,T1 as saturate,ju as selectVariants,RI as sentenceCase,uf as sidebarMenuButtonVariants,jy as signaturePadVariants,zu as skeletonVariants,Xy as skipLinkVariants,bI as slugify,xI as snakeCase,Vv as snippetVariants,Ts as spinnerVariants,ny as splitButtonVariants,Q1 as startOfDay,tI as startOfMonth,Og as statCardVariants,Jb as stepVariants,Xb as stepsVariants,pd as swipeActionVariants,cx as swipeActionsVariants,Ss as switchColors,Ig as tagVariants,Cy as terminalVariants,cR as textBadgeVariants,aS as themeToggleVariants,F1 as timeAgo,lb as timeInputVariants,Yg as timelineItemVariants,Wg as timelineVariants,yI as titleCase,Ks as toggleVariants,ty as transferListVariants,rv as treeItemVariants,tv as treeVariants,fI as truncate,gI as truncateMiddle,xc as unmask,GD as useAnimatedValue,T0 as useAsync,LD as useAsyncRetry,eD as useBodyScrollLock,fD as useBooleanToggle,bL as useBreakpoint,vL as useBreakpoints,Sl as useButtonGroup,iC as useCalendarSystem,Yi as useCarousel,IL as useClickOutside,HL as useClickOutsideMultiple,SP as useConfetti,AL as useCopy,VL as useCopyToClipboard,zD as useCountdown,bD as useCounter,pD as useCycle,ML as useDebounce,NL as useDebouncedCallback,kL as useDebouncedCallbackWithControls,BD as useDelayedValue,Va as useDirection,Qw as useDirectionValue,f0 as useDisclosure,uD as useDisclosureOpen,s1 as useDistance,qD as useDocumentIsVisible,A0 as useDocumentVisibility,XD as useDocumentVisibilityCallback,Nw as useDrawer,lD as useElementSize,BL as useEventListener,$L as useEventListenerRef,ID as useFetch,Li as useFieldContext,VC as useFocusTrap,ai as useFocusTrapRef,Sc as useFormContext,B0 as useFullscreen,r1 as useFullscreenRef,a1 as useGeolocation,zL as useHotkeys,OL as useHotkeysMap,UL as useHover,jL as useHoverDelay,WL as useHoverProps,_L as useHoverRef,cr as useI18n,_D as useIdle,WD as useIdleCallback,vD as useIncrementCounter,d0 as useIntersectionObserver,rD as useIntersectionObserverRef,Cl as useInterval,AD as useIntervalControls,iL as useIsDesktop,aL as useIsMobile,eC as useIsRTL,sL as useIsTablet,KL as useKeyPress,FL as useKeyPressed,ZN as useKeyboardShortcut,nD as useLazyLoad,CD as useList,yL as useLocalStorage,sC as useLocale,GL as useLongPress,TD as useMap,c1 as useMediaPermission,Ra as useMediaQuery,qL as useMouse,XL as useMouseElement,ZL as useMouseElementRef,HD as useMutation,oD as useMutationObserver,aD as useMutationObserverRef,l1 as useNotificationPermission,ZD as useOnlineStatus,JD as useOnlineStatusCallback,i1 as usePermission,lL as usePrefersColorScheme,cL as usePrefersReducedMotion,hD as usePrevious,yD as usePreviousDistinct,xD as usePreviousWithInitial,SD as useQueue,KD as useRafLoop,MD as useRecord,iS as useReeverUI,sD as useResizeObserver,iD as useResizeObserverRef,i0 as useScrollLock,JL as useScrollPosition,kD as useSelection,wL as useSessionStorage,y0 as useSet,Gw as useSidebar,Ia as useSidebarSafe,m1 as useSpeechRecognition,u1 as useSpeechSynthesis,jS as useSpotlight,UD as useSpringValue,PD as useStack,EL as useThrottle,LL as useThrottledCallback,E0 as useTimeout,FD as useTimeoutControls,$D as useTimeoutFlag,OD as useTimer,mD as useToggle,gL as useWindowHeight,QL as useWindowScroll,bs as useWindowSize,fL as useWindowWidth,Tv as userVariants,eb as validateFile,sN as validators};//# sourceMappingURL=index.js.map
81
+ )`,boxShadow:"0 0 0 9999px rgba(0, 0, 0, 0.5)"}}),x&&jsx("div",{className:"fixed z-[9999] pointer-events-none border-2 border-primary transition-all duration-200",style:{top:x.top-f,left:x.left-f,width:x.width+f*2,height:x.height+f*2,borderRadius:g}}),jsxs("div",{ref:P,className:u("fixed z-[10000] w-80 bg-popover text-popover-foreground rounded-lg shadow-lg border p-4","animate-in fade-in-0 zoom-in-95 duration-200",p),style:{top:T.top,left:T.left},children:[l&&jsx("button",{onClick:z,className:"absolute top-3 right-3 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Close tour",children:jsx(X,{className:"h-4 w-4"})}),k.content?k.content:jsxs("div",{className:"pr-6",children:[k.title&&jsx("h3",{className:"font-semibold text-base mb-2",children:k.title}),k.description&&jsx("p",{className:"text-sm text-muted-foreground",children:k.description})]}),jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-border",children:[c&&e.length>1&&jsx("div",{className:"flex items-center gap-1",children:e.map((B,U)=>jsx("div",{className:u("w-1.5 h-1.5 rounded-full transition-colors",U===w?"bg-primary":"bg-muted-foreground/30")},U))}),jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[!$&&jsx(ie,{variant:"ghost",size:"sm",onClick:A,startContent:jsx(ChevronLeft,{className:"h-4 w-4"}),children:E}),$&&e.length>1&&jsx(ie,{variant:"ghost",size:"sm",onClick:z,children:I}),jsx(ie,{variant:"solid",size:"sm",onClick:V,endContent:_?void 0:jsx(ChevronRight,{className:"h-4 w-4"}),children:_?L:N})]})]})]})]}),document.body)}Wy.displayName="Tour";var jy=cva("relative border border-input rounded-md bg-background transition-colors",{variants:{size:{sm:"h-32",md:"h-48",lg:"h-64"}},defaultVariants:{size:"md"}}),Yy=J.forwardRef(({className:e,size:t,strokeColor:r="currentColor",strokeWidth:n=2,backgroundColor:o="transparent",isDisabled:a=false,isRequired:s=false,isReadOnly:i=false,onChange:c,onBegin:l,onEnd:d,placeholder:m="Sign here",showClearButton:p=true,showUndoButton:f=true,clearLabel:g="Clear",undoLabel:v="Undo",...b},h)=>{let x=J.useRef(null),y=J.useRef(null),[T,C]=J.useState(false),[R,M]=J.useState([]),[P,S]=J.useState([]),[w,k]=J.useState(true),N=J.useCallback(()=>r==="currentColor"&&x.current?window.getComputedStyle(x.current).color:r,[r]),E=J.useCallback(()=>{let D=x.current;if(!D)return;let H=D.getContext("2d");if(H&&(H.fillStyle=o,H.fillRect(0,0,D.width,D.height),R.forEach(F=>{if(!(F.points.length<2)){H.beginPath(),H.strokeStyle=F.color,H.lineWidth=F.width,H.lineCap="round",H.lineJoin="round",H.moveTo(F.points[0].x,F.points[0].y);for(let W=1;W<F.points.length;W++){let X=F.points[W-1],Z=F.points[W],me=(X.x+Z.x)/2,ve=(X.y+Z.y)/2;H.quadraticCurveTo(X.x,X.y,me,ve);}H.stroke();}}),P.length>1)){H.beginPath(),H.strokeStyle=N(),H.lineWidth=n,H.lineCap="round",H.lineJoin="round",H.moveTo(P[0].x,P[0].y);for(let F=1;F<P.length;F++){let W=P[F-1],X=P[F],Z=(W.x+X.x)/2,me=(W.y+X.y)/2;H.quadraticCurveTo(W.x,W.y,Z,me);}H.stroke();}},[R,P,o,N,n]),I=J.useCallback(()=>{let D=x.current,H=y.current;if(!D||!H)return;let F=H.getBoundingClientRect(),W=window.devicePixelRatio||1;D.width=F.width*W,D.height=F.height*W,D.style.width=`${F.width}px`,D.style.height=`${F.height}px`;let X=D.getContext("2d");X&&X.scale(W,W),E();},[E]);J.useEffect(()=>(I(),window.addEventListener("resize",I),()=>window.removeEventListener("resize",I)),[I]);let L=D=>{let H=x.current;if(!H)return null;let F=H.getBoundingClientRect(),W,X,Z;if("touches"in D){if(D.touches.length===0)return null;W=D.touches[0].clientX,X=D.touches[0].clientY,Z=D.touches[0].force;}else W=D.clientX,X=D.clientY,Z=D.pressure;return {x:W-F.left,y:X-F.top,pressure:Z}},V=D=>{if(a||i)return;D.preventDefault();let H=L(D);H&&(C(true),S([H]),l?.());},A=D=>{if(!T||a||i)return;D.preventDefault();let H=L(D);H&&S(F=>[...F,H]);},z=()=>{if(T){if(C(false),P.length>1){let D={points:P,color:N(),width:n};M(H=>[...H,D]),k(false),c?.(false);}S([]),d?.();}},O=J.useCallback(()=>{M([]),S([]),k(true),c?.(true);},[c]),$=J.useCallback(()=>{M(D=>{let H=D.slice(0,-1),F=H.length===0;return k(F),c?.(F),H});},[c]),_=J.useCallback(()=>R.length===0&&P.length===0,[R.length,P.length]),B=J.useCallback((D="image/png",H=1)=>{let F=x.current;return F?F.toDataURL(D,H):""},[]),U=J.useCallback(()=>{let D=x.current;if(!D)return "";let H=D.width/(window.devicePixelRatio||1),F=D.height/(window.devicePixelRatio||1),W="";return R.forEach(X=>{if(X.points.length<2)return;let Z=`M ${X.points[0].x} ${X.points[0].y}`;for(let me=1;me<X.points.length;me++){let ve=X.points[me-1],j=X.points[me],G=(ve.x+j.x)/2,Y=(ve.y+j.y)/2;Z+=` Q ${ve.x} ${ve.y} ${G} ${Y}`;}W+=`<path d="${Z}" stroke="${X.color}" stroke-width="${X.width}" fill="none" stroke-linecap="round" stroke-linejoin="round"/>`;}),`<svg xmlns="http://www.w3.org/2000/svg" width="${H}" height="${F}" viewBox="0 0 ${H} ${F}">${W}</svg>`},[R]),K=J.useCallback(()=>x.current,[]);return J.useImperativeHandle(h,()=>({clear:O,undo:$,isEmpty:_,toDataURL:B,toSVG:U,getCanvas:K}),[O,$,_,B,U,K]),J.useEffect(()=>{E();},[E]),jsxs("div",{className:u(jy({size:t}),a&&"opacity-50 cursor-not-allowed",i&&"cursor-default",e),"data-disabled":a||void 0,"data-readonly":i||void 0,"data-required":s||void 0,...b,children:[jsxs("div",{ref:y,className:"absolute inset-0 overflow-hidden rounded-[inherit]",children:[jsx("canvas",{ref:x,className:u("touch-none",!a&&!i&&"cursor-crosshair"),onMouseDown:V,onMouseMove:A,onMouseUp:z,onMouseLeave:z,onTouchStart:V,onTouchMove:A,onTouchEnd:z}),w&&m&&jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:jsx("span",{className:"text-muted-foreground text-sm",children:m})})]}),(p||f)&&!i&&jsxs("div",{className:"absolute bottom-2 right-2 flex gap-1",children:[f&&jsx("button",{type:"button",onClick:$,disabled:a||w,className:u("px-2 py-1 text-xs rounded bg-muted hover:bg-muted/80 transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:v}),p&&jsx("button",{type:"button",onClick:O,disabled:a||w,className:u("px-2 py-1 text-xs rounded bg-muted hover:bg-muted/80 transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),children:g})]})]})});Yy.displayName="SignaturePad";var Xy=cva(["fixed top-0 left-0 z-[9999]","px-4 py-3 text-sm font-medium","bg-background text-foreground border border-border shadow-lg","rounded-br-lg","transform -translate-y-full transition-transform duration-200","focus:translate-y-0 focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-2","focus-visible:translate-y-0"],{variants:{variant:{default:"bg-background text-foreground",primary:"bg-primary text-primary-foreground"}},defaultVariants:{variant:"default"}}),Zy=J.forwardRef(({className:e,variant:t,targetId:r="main-content",label:n="Skip to main content",additionalLinks:o,...a},s)=>{let i=(l,d)=>{l.preventDefault();let m=document.getElementById(d);m&&(m.hasAttribute("tabindex")||m.setAttribute("tabindex","-1"),m.focus(),m.scrollIntoView({behavior:"smooth",block:"start"}));};if(!o||o.length===0)return jsx("a",{ref:s,href:`#${r}`,className:u(Xy({variant:t}),e),onClick:l=>i(l,r),...a,children:n});let c=[{targetId:r,label:n},...o];return jsx("div",{className:u("fixed top-0 left-0 z-[9999] flex flex-col gap-1 p-2","transform -translate-y-full transition-transform duration-200","focus-within:translate-y-0","bg-background border border-border shadow-lg rounded-br-lg"),children:c.map((l,d)=>jsx("a",{ref:d===0?s:void 0,href:`#${l.targetId}`,className:u("px-3 py-2 text-sm font-medium rounded-md","hover:bg-accent hover:text-accent-foreground","focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-2","transition-colors"),onClick:m=>i(m,l.targetId),...d===0?a:{},children:l.label},l.targetId))})});Zy.displayName="SkipLink";function Ra(e){let t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:false,[]),[r,n]=useState(()=>t(e));return useEffect(()=>{let o=window.matchMedia(e),a=()=>{n(o.matches);};return n(o.matches),o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}},[e]),r}function sL(){return Ra("(max-width: 767px)")}function iL(){return Ra("(min-width: 768px) and (max-width: 1023px)")}function lL(){return Ra("(min-width: 1024px)")}function cL(){return Ra("(prefers-color-scheme: dark)")?"dark":"light"}function dL(){return Ra("(prefers-reduced-motion: reduce)")}function bs(e={}){let{initialWidth:t=0,initialHeight:r=0,debounce:n=0,includeScrollbar:o=true}=e,[a,s]=useState(()=>typeof window>"u"?{width:t,height:r}:{width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight}),i=useRef(null),c=useCallback(()=>{let l=()=>{s({width:o?window.innerWidth:document.documentElement.clientWidth,height:o?window.innerHeight:document.documentElement.clientHeight});};n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(l,n)):l();},[n,o]);return useEffect(()=>(c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),i.current&&clearTimeout(i.current);}),[c]),a}function gL(){let{width:e}=bs();return e}function bL(){let{height:e}=bs();return e}function vL(e){let{width:t}=bs();return t>=e}function hL(){let{width:e}=bs();return {isSm:e>=640,isMd:e>=768,isLg:e>=1024,isXl:e>=1280,is2xl:e>=1536}}function RL(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading localStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting localStorage key "${e}" even though environment is not a browser`);return}try{let c=i instanceof Function?i(n):i;o(c),window.localStorage.setItem(e,JSON.stringify(c)),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:JSON.stringify(c)}));}catch(c){console.warn(`Error setting localStorage key "${e}":`,c);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.localStorage.removeItem(e),o(t),window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:null}));}catch(i){console.warn(`Error removing localStorage key "${e}":`,i);}},[e,t]);return useEffect(()=>{let i=c=>{if(c.key===e&&c.newValue!==null)try{o(JSON.parse(c.newValue));}catch{o(c.newValue);}else c.key===e&&c.newValue===null&&o(t);};return window.addEventListener("storage",i),()=>{window.removeEventListener("storage",i);}},[e,t]),[n,a,s]}function CL(e,t){let r=useCallback(()=>{if(typeof window>"u")return t;try{let i=window.sessionStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return console.warn(`Error reading sessionStorage key "${e}":`,i),t}},[t,e]),[n,o]=useState(r),a=useCallback(i=>{if(typeof window>"u"){console.warn(`Tried setting sessionStorage key "${e}" even though environment is not a browser`);return}try{let c=i instanceof Function?i(n):i;o(c),window.sessionStorage.setItem(e,JSON.stringify(c));}catch(c){console.warn(`Error setting sessionStorage key "${e}":`,c);}},[e,n]),s=useCallback(()=>{if(!(typeof window>"u"))try{window.sessionStorage.removeItem(e),o(t);}catch(i){console.warn(`Error removing sessionStorage key "${e}":`,i);}},[e,t]);return [n,a,s]}function NL(e,t=500){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function kL(e,t=500){let r=useRef(null),n=useRef(e);return useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]),useCallback((...a)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...a);},t);},[t])}function SL(e,t=500){let r=useRef(null),n=useRef(e),o=useRef(null);useEffect(()=>{n.current=e;},[e]),useEffect(()=>()=>{r.current&&clearTimeout(r.current);},[]);let a=useCallback((...l)=>{o.current=l,r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n.current(...l),r.current=null,o.current=null;},t);},[t]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null,o.current=null);},[]),i=useCallback(()=>{r.current&&o.current&&(clearTimeout(r.current),n.current(...o.current),r.current=null,o.current=null);},[]),c=useCallback(()=>r.current!==null,[]);return {debouncedCallback:a,cancel:s,flush:i,isPending:c}}function LL(e,t=500){let[r,n]=useState(e),o=useRef(Date.now());return useEffect(()=>{let a=Date.now();if(a>=o.current+t)o.current=a,n(e);else {let s=setTimeout(()=>{o.current=Date.now(),n(e);},t-(a-o.current));return ()=>clearTimeout(s)}},[e,t]),r}function DL(e,t=500){let r=useRef(0),n=useRef(null),o=useRef(e);return useEffect(()=>{o.current=e;},[e]),useEffect(()=>()=>{n.current&&clearTimeout(n.current);},[]),useCallback((...s)=>{let i=Date.now();i-r.current>=t?(o.current(...s),r.current=i):(n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{o.current(...s),r.current=Date.now();},t-(i-r.current)));},[t])}function HL(e,t=true){let r=useRef(null);return useEffect(()=>{if(!t)return;let n=o=>{let a=r.current;!a||a.contains(o.target)||e(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t]),r}function VL(e,t,r=true){useEffect(()=>{if(!r)return;let n=o=>{e.some(s=>{let i=s.current;return i&&i.contains(o.target)})||t(o);};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n);}},[e,t,r]);}function AL(e=2e3){let[t,r]=useState(null),[n,o]=useState(false),[a,s]=useState(false),i=useCallback(()=>{r(null),o(false);},[]),c=useCallback(async l=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;s(true);try{return await navigator.clipboard.writeText(l),r(l),o(!0),e>0&&setTimeout(()=>{o(!1);},e),!0}catch(d){return console.warn("Copy to clipboard failed:",d),r(null),o(false),false}finally{s(false);}},[e]);return {copiedValue:t,success:n,isLoading:a,copy:c,reset:i}}function zL(){return useCallback(async e=>{if(!navigator?.clipboard)return console.warn("Clipboard API not available"),false;try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.warn("Copy to clipboard failed:",t),false}},[])}function Qy(e){let t=e.toLowerCase().split("+");return {key:t[t.length-1],ctrl:t.includes("ctrl")||t.includes("control"),alt:t.includes("alt")||t.includes("option"),shift:t.includes("shift"),meta:t.includes("meta")||t.includes("cmd")||t.includes("command")}}function e0(e,t){let r=e.key.toLowerCase(),n=r===" "?"space":r==="escape"?"esc":r,o=t.key==="space"?" ":t.key;return (n===o||e.code.toLowerCase()===`key${o}`)&&e.ctrlKey===t.ctrl&&e.altKey===t.alt&&e.shiftKey===t.shift&&e.metaKey===t.meta}function OL(e,t,r={}){let{enabled:n=true,preventDefault:o=true,stopPropagation:a=false,target:s=null}=r,i=useRef(t);i.current=t;let c=Qy(e);useEffect(()=>{if(!n)return;let l=m=>{e0(m,c)&&(o&&m.preventDefault(),a&&m.stopPropagation(),i.current(m));},d=s||document;return d.addEventListener("keydown",l),()=>{d.removeEventListener("keydown",l);}},[n,o,a,s,c]);}function FL(e,t={}){let{enabled:r=true,preventDefault:n=true,stopPropagation:o=false,target:a=null}=t,s=useRef(e);s.current=e;let i=Object.entries(e).map(([c,l])=>({parsed:Qy(c),handler:l}));useEffect(()=>{if(!r)return;let c=d=>{for(let{parsed:m,handler:p}of i)if(e0(d,m)){n&&d.preventDefault(),o&&d.stopPropagation(),p(d);break}},l=a||document;return l.addEventListener("keydown",c),()=>{l.removeEventListener("keydown",c);}},[r,n,o,a,i]);}function BL(e){let t=useRef(false);return useEffect(()=>{let r=o=>{o.key===e&&(t.current=true);},n=o=>{o.key===e&&(t.current=false);};return document.addEventListener("keydown",r),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",r),document.removeEventListener("keyup",n);}},[e]),t.current}function $L(e,t,r,n){let o=useRef(t);o.current=t,useEffect(()=>{let a;if(r==null?a=window:"current"in r?a=r.current:a=r,!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,n),()=>{a?.removeEventListener(e,s,n);}},[e,r,n]);}function KL(e,t,r){let n=useRef(null),o=useRef(t);return o.current=t,useEffect(()=>{let a=n.current;if(!a)return;let s=i=>{o.current(i);};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r);}},[e,r]),n}function GL(e,t,r={}){let{target:n,event:o="keydown",enabled:a=true}=r,s=useRef(t);s.current=t,useEffect(()=>{if(!a)return;let i=n?.current||window,c=l=>{l.key===e&&s.current(l);};return i.addEventListener(o,c),()=>{i.removeEventListener(o,c);}},[e,n,o,a]);}function UL(e,t={}){let{threshold:r=500,onStart:n,onCancel:o,enabled:a=true}=t,s=useRef(null),i=useRef(false),c=useRef(null),l=useCallback(m=>{a&&(c.current=m,i.current=false,n?.(m),s.current=setTimeout(()=>{i.current=true,c.current&&e(c.current);},r));},[e,r,n,a]),d=useCallback(m=>{a&&(s.current&&(clearTimeout(s.current),s.current=null),i.current||o?.(m),i.current=false,c.current=null);},[o,a]);return {onMouseDown:l,onMouseUp:d,onMouseLeave:d,onTouchStart:l,onTouchEnd:d}}function _L(e){let t=useRef(null),[r,n]=useState(false),o=useCallback(()=>{n(true),e?.onHoverStart?.();},[e]),a=useCallback(()=>{n(false),e?.onHoverEnd?.();},[e]);return useEffect(()=>{let s=t.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[o,a]),{ref:t,isHovered:r}}function WL(e,t){let[r,n]=useState(false),o=useCallback(()=>{n(true),t?.onHoverStart?.();},[t]),a=useCallback(()=>{n(false),t?.onHoverEnd?.();},[t]);return useEffect(()=>{let s=e.current;if(s)return s.addEventListener("mouseenter",o),s.addEventListener("mouseleave",a),()=>{s.removeEventListener("mouseenter",o),s.removeEventListener("mouseleave",a);}},[e,o,a]),r}function jL(){let[e,t]=useState(false);return {isHovered:e,hoverProps:{onMouseEnter:()=>t(true),onMouseLeave:()=>t(false)}}}function YL(e=0){let t=useRef(null),[r,n]=useState(false),o=useRef(null);return useEffect(()=>{let a=t.current;if(!a)return;let s=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(true);},e);},i=()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(false);},e);};return a.addEventListener("mouseenter",s),a.addEventListener("mouseleave",i),()=>{a.removeEventListener("mouseenter",s),a.removeEventListener("mouseleave",i),o.current&&clearTimeout(o.current);}},[e]),{ref:t,isHovered:r}}function XL(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=n=>{t({x:n.clientX,y:n.clientY});};return window.addEventListener("mousemove",r),()=>{window.removeEventListener("mousemove",r);}},[]),e}function ZL(e={}){let{enabled:t=true,resetOnLeave:r=false}=e,n=useRef(null),[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=n.current;if(!s||!t)return;let i=l=>{let d=s.getBoundingClientRect();a({x:l.clientX,y:l.clientY,elementX:l.clientX-d.left,elementY:l.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:l.pageX,pageY:l.pageY});},c=()=>{r&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),r&&s.addEventListener("mouseleave",c),()=>{s.removeEventListener("mousemove",i),r&&s.removeEventListener("mouseleave",c);}},[t,r]),{ref:n,...o}}function JL(e,t={}){let{enabled:r=true,resetOnLeave:n=false}=t,[o,a]=useState({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});return useEffect(()=>{let s=e.current;if(!s||!r)return;let i=l=>{let d=s.getBoundingClientRect();a({x:l.clientX,y:l.clientY,elementX:l.clientX-d.left,elementY:l.clientY-d.top,elementPositionX:d.left,elementPositionY:d.top,pageX:l.pageX,pageY:l.pageY});},c=()=>{n&&a({x:0,y:0,elementX:0,elementY:0,elementPositionX:0,elementPositionY:0,pageX:0,pageY:0});};return s.addEventListener("mousemove",i),n&&s.addEventListener("mouseleave",c),()=>{s.removeEventListener("mousemove",i),n&&s.removeEventListener("mouseleave",c);}},[e,r,n]),o}function QL(e={}){let{threshold:t=0,throttle:r=0,element:n}=e,[o,a]=useState({x:0,y:0,isScrolled:false,directionY:0,directionX:0,isAtBottom:false,isAtTop:true,progress:0}),s=useRef(0),i=useRef(0),c=useRef(false),l=useRef(0),d=useCallback(()=>{let p=n?.current,f=p?p.scrollTop:window.scrollY,g=p?p.scrollLeft:window.scrollX,v=p?p.scrollHeight-p.clientHeight:document.documentElement.scrollHeight-window.innerHeight,b=f>s.current?1:f<s.current?-1:0,h=g>i.current?1:g<i.current?-1:0;s.current=f,i.current=g,a({x:g,y:f,isScrolled:f>t,directionY:b,directionX:h,isAtBottom:f>=v-1,isAtTop:f<=0,progress:v>0?f/v:0}),c.current=false;},[n,t]),m=useCallback(()=>{let p=Date.now();if(r>0&&p-l.current<r){c.current||(c.current=true,requestAnimationFrame(d));return}l.current=p,c.current||(c.current=true,requestAnimationFrame(d));},[r,d]);return useEffect(()=>{let p=n?.current||window;return p.addEventListener("scroll",m,{passive:true}),d(),()=>{p.removeEventListener("scroll",m);}},[n,m,d]),o}function eD(){let[e,t]=useState({x:0,y:0});return useEffect(()=>{let r=()=>{t({x:window.scrollX,y:window.scrollY});};return window.addEventListener("scroll",r,{passive:true}),r(),()=>{window.removeEventListener("scroll",r);}},[]),e}function i0(e={}){let{autoLock:t=false,lockX:r=true}=e,n=useRef(false),o=useRef({x:0,y:0}),a=useRef(null),s=useCallback(()=>{if(typeof document>"u"||n.current)return;let{body:c}=document,l=window.scrollY,d=window.scrollX;o.current={x:d,y:l},a.current={overflow:c.style.overflow,overflowX:c.style.overflowX,overflowY:c.style.overflowY,position:c.style.position,top:c.style.top,left:c.style.left,width:c.style.width},c.style.overflow="hidden",r&&(c.style.overflowX="hidden"),c.style.overflowY="hidden",c.style.position="fixed",c.style.top=`-${l}px`,c.style.left=r?`-${d}px`:"0",c.style.width="100%",n.current=true;},[r]),i=useCallback(()=>{if(typeof document>"u"||!n.current)return;let{body:c}=document,l=a.current;l&&(c.style.overflow=l.overflow,c.style.overflowX=l.overflowX,c.style.overflowY=l.overflowY,c.style.position=l.position,c.style.top=l.top,c.style.left=l.left,c.style.width=l.width),window.scrollTo(o.current.x,o.current.y),n.current=false;},[]);return useEffect(()=>(t&&s(),()=>{i();}),[t,s,i]),{lock:s,unlock:i,isLocked:n.current}}function tD(e=true){let{lock:t,unlock:r}=i0();useEffect(()=>{e?t():r();},[e,t,r]);}function d0(e={}){let{root:t=null,rootMargin:r="0px",threshold:n=0,once:o=false,enabled:a=true}=e,s=useRef(null),[i,c]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let l=s.current;if(!l||!a)return;let d=new IntersectionObserver(([m])=>{c({isIntersecting:m.isIntersecting,entry:m}),o&&m.isIntersecting&&d.disconnect();},{root:t,rootMargin:r,threshold:n});return d.observe(l),()=>{d.disconnect();}},[t,r,n,o,a]),{ref:s,...i}}function nD(e,t={}){let{root:r=null,rootMargin:n="0px",threshold:o=0,once:a=false,enabled:s=true}=t,[i,c]=useState({isIntersecting:false,entry:null});return useEffect(()=>{let l=e.current;if(!l||!s)return;let d=new IntersectionObserver(([m])=>{c({isIntersecting:m.isIntersecting,entry:m}),a&&m.isIntersecting&&d.disconnect();},{root:r,rootMargin:n,threshold:o});return d.observe(l),()=>{d.disconnect();}},[e,r,n,o,a,s]),i}function oD(e="200px"){let{ref:t,isIntersecting:r}=d0({rootMargin:e,once:true});return {ref:t,isVisible:r}}function aD(e,t={}){let{enabled:r=true,childList:n=true,attributes:o=true,characterData:a=false,subtree:s=false,attributeOldValue:i=false,characterDataOldValue:c=false,attributeFilter:l}=t,d=useRef(null),m=useRef(e);return m.current=e,useEffect(()=>{let p=d.current;if(!p||!r)return;let f=new MutationObserver((g,v)=>{m.current(g,v);});return f.observe(p,{childList:n,attributes:o,characterData:a,subtree:s,attributeOldValue:i,characterDataOldValue:c,attributeFilter:l}),()=>{f.disconnect();}},[r,n,o,a,s,i,c,l]),d}function sD(e,t,r={}){let{enabled:n=true,childList:o=true,attributes:a=true,characterData:s=false,subtree:i=false,attributeOldValue:c=false,characterDataOldValue:l=false,attributeFilter:d}=r,m=useRef(t);m.current=t,useEffect(()=>{let p=e.current;if(!p||!n)return;let f=new MutationObserver((g,v)=>{m.current(g,v);});return f.observe(p,{childList:o,attributes:a,characterData:s,subtree:i,attributeOldValue:c,characterDataOldValue:l,attributeFilter:d}),()=>{f.disconnect();}},[e,n,o,a,s,i,c,l,d]);}function iD(e={}){let{enabled:t=true,box:r="content-box",debounce:n=0}=e,o=useRef(null),[a,s]=useState({width:0,height:0}),i=useRef(null),c=useCallback(l=>{let d=l[0];if(!d)return;let m,p;r==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,p=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,p=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,p=d.contentRect.height);let f=()=>s({width:m,height:p});n>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(f,n)):f();},[r,n]);return useEffect(()=>{let l=o.current;if(!l||!t)return;let d=new ResizeObserver(c);d.observe(l,{box:r});let m=l.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[t,r,c]),{ref:o,...a}}function lD(e,t={}){let{enabled:r=true,box:n="content-box",debounce:o=0}=t,[a,s]=useState({width:0,height:0}),i=useRef(null),c=useCallback(l=>{let d=l[0];if(!d)return;let m,p;n==="border-box"&&d.borderBoxSize?.[0]?(m=d.borderBoxSize[0].inlineSize,p=d.borderBoxSize[0].blockSize):d.contentBoxSize?.[0]?(m=d.contentBoxSize[0].inlineSize,p=d.contentBoxSize[0].blockSize):(m=d.contentRect.width,p=d.contentRect.height);let f=()=>s({width:m,height:p});o>0?(i.current&&clearTimeout(i.current),i.current=setTimeout(f,o)):f();},[n,o]);return useEffect(()=>{let l=e.current;if(!l||!r)return;let d=new ResizeObserver(c);d.observe(l,{box:n});let m=l.getBoundingClientRect();return s({width:m.width,height:m.height}),()=>{d.disconnect(),i.current&&clearTimeout(i.current);}},[e,r,n,c]),a}function cD(){let e=useRef(null),t=useCallback(()=>{let r=e.current;if(!r)return {width:0,height:0};let n=r.getBoundingClientRect();return {width:n.width,height:n.height}},[]);return {ref:e,measure:t}}function f0(e={}){let{defaultOpen:t=false,isOpen:r,onOpen:n,onClose:o,onChange:a,id:s}=e,[i,c]=useState(t),l=r!==void 0,d=l?r:i,m=useCallback(()=>{l||c(true),n?.(),a?.(true);},[l,n,a]),p=useCallback(()=>{l||c(false),o?.(),a?.(false);},[l,o,a]),f=useCallback(()=>{d?p():m();},[d,m,p]),g=useCallback(h=>{h?m():p();},[m,p]),v=useCallback(()=>({onClick:f,"aria-expanded":d,...s&&{"aria-controls":s}}),[f,d,s]),b=useCallback(()=>({hidden:!d,...s&&{id:s}}),[d,s]);return useMemo(()=>({isOpen:d,open:m,close:p,toggle:f,setIsOpen:g,getButtonProps:v,getDisclosureProps:b}),[d,m,p,f,g,v,b])}function mD(e){return f0({...e,defaultOpen:true})}function pD(e=false){let[t,r]=useState(e),n=useCallback(()=>{r(o=>!o);},[]);return [t,n,r]}function fD(e,t=0){let[r,n]=useState(t),o=useCallback(()=>{n(i=>(i+1)%e.length);},[e.length]),a=useCallback(()=>{n(i=>(i-1+e.length)%e.length);},[e.length]),s=useCallback(i=>{let c=e.indexOf(i);c!==-1&&n(c);},[e]);return useMemo(()=>({value:e[r],index:r,next:o,prev:a,setIndex:n,setValue:s}),[e,r,o,a,s])}function gD(e=false){let[t,r]=useState(e),n=useCallback(()=>r(s=>!s),[]),o=useCallback(()=>r(true),[]),a=useCallback(()=>r(false),[]);return useMemo(()=>({value:t,toggle:n,on:o,off:a,set:r}),[t,n,o,a])}function vD(e=0,t={}){let{min:r=-1/0,max:n=1/0,step:o=1}=t,a=useCallback(g=>Math.min(Math.max(g,r),n),[r,n]),[s,i]=useState(()=>a(e)),c=useCallback(()=>{i(g=>a(g+o));},[a,o]),l=useCallback(()=>{i(g=>a(g-o));},[a,o]),d=useCallback(g=>{i(a(g));},[a]),m=useCallback(()=>{i(a(e));},[a,e]),p=s<=r,f=s>=n;return useMemo(()=>({count:s,increment:c,decrement:l,set:d,reset:m,isMin:p,isMax:f}),[s,c,l,d,m,p,f])}function hD(e=0){let[t,r]=useState(e),n=useCallback(()=>r(o=>o+1),[]);return [t,n]}function xD(e){let t=useRef(void 0);return useEffect(()=>{t.current=e;},[e]),t.current}function yD(e,t){let r=useRef(t);return useEffect(()=>{r.current=e;},[e]),r.current}function RD(e){let t=useRef(void 0),r=useRef(e),n=r.current!==e;return useEffect(()=>{t.current=r.current,r.current=e;},[e]),{current:e,previous:t.current,hasChanged:n}}function TD(e=[]){let[t,r]=useState(e),n=useCallback(C=>{r(C);},[]),o=useCallback(C=>{r(R=>[...R,C]);},[]),a=useCallback(C=>{r(R=>[...R,...C]);},[]),s=useCallback((C,R)=>{r(M=>{let P=[...M];return P.splice(C,0,R),P});},[]),i=useCallback((C,R)=>{r(M=>{let P=[...M];return P[C]=R,P});},[]),c=useCallback(C=>{r(R=>R.filter((M,P)=>P!==C));},[]),l=useCallback(C=>{r(R=>{let M=R.indexOf(C);return M===-1?R:R.filter((P,S)=>S!==M)});},[]),d=useCallback(C=>{r(R=>R.filter(M=>!C(M)));},[]),m=useCallback(()=>{let C;return r(R=>R.length===0?R:(C=R[0],R.slice(1))),C},[]),p=useCallback(C=>{r(R=>[C,...R]);},[]),f=useCallback(()=>{let C;return r(R=>R.length===0?R:(C=R[R.length-1],R.slice(0,-1))),C},[]),g=useCallback(()=>{r([]);},[]),v=useCallback(()=>{r(e);},[e]),b=useCallback((C,R)=>{r(M=>{let P=[...M],[S]=P.splice(C,1);return P.splice(R,0,S),P});},[]),h=useCallback((C,R)=>{r(M=>{let P=[...M];return [P[C],P[R]]=[P[R],P[C]],P});},[]),x=useCallback(C=>t.filter(C),[t]),y=useCallback(C=>t.find(C),[t]),T=useCallback(C=>t.includes(C),[t]);return useMemo(()=>({list:t,set:n,push:o,pushMany:a,insertAt:s,updateAt:i,removeAt:c,remove:l,removeWhere:d,shift:m,unshift:p,pop:f,clear:g,reset:v,move:b,swap:h,filter:x,find:y,includes:T,length:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i,c,l,d,m,p,f,g,v,b,h,x,y,T])}function MD(e=[]){let[t,r]=useState(()=>new Map(e)),n=useCallback(f=>t.get(f),[t]),o=useCallback((f,g)=>{r(v=>{let b=new Map(v);return b.set(f,g),b});},[]),a=useCallback(f=>{r(g=>{let v=new Map(g);return f.forEach(([b,h])=>v.set(b,h)),v});},[]),s=useCallback(f=>t.has(f),[t]),i=useCallback(f=>{r(g=>{let v=new Map(g);return v.delete(f),v});},[]),c=useCallback(()=>{r(new Map);},[]),l=useCallback(()=>{r(new Map(e));},[e]),d=useCallback(()=>Array.from(t.keys()),[t]),m=useCallback(()=>Array.from(t.values()),[t]),p=useCallback(()=>Array.from(t.entries()),[t]);return useMemo(()=>({map:t,get:n,set:o,setMany:a,has:s,delete:i,clear:c,reset:l,keys:d,values:m,entries:p,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,c,l,d,m,p])}function ND(e={}){let[t,r]=useState(e),n=useCallback(d=>t[d],[t]),o=useCallback((d,m)=>{r(p=>({...p,[d]:m}));},[]),a=useCallback(d=>{r(m=>({...m,...d}));},[]),s=useCallback(d=>{r(m=>{let{[d]:p,...f}=m;return f});},[]),i=useCallback(()=>{r({});},[]),c=useCallback(()=>{r(e);},[e]),l=useCallback(d=>d in t,[t]);return useMemo(()=>({value:t,get:n,set:o,setAll:a,remove:s,clear:i,reset:c,has:l,keys:Object.keys(t),values:Object.values(t)}),[t,n,o,a,s,i,c,l])}function y0(e=[]){let[t,r]=useState(()=>new Set(e)),n=useCallback(m=>{r(p=>{let f=new Set(p);return f.add(m),f});},[]),o=useCallback(m=>{r(p=>{let f=new Set(p);return m.forEach(g=>f.add(g)),f});},[]),a=useCallback(m=>{r(p=>{let f=new Set(p);return f.delete(m),f});},[]),s=useCallback(m=>t.has(m),[t]),i=useCallback(m=>{r(p=>{let f=new Set(p);return f.has(m)?f.delete(m):f.add(m),f});},[]),c=useCallback(()=>{r(new Set);},[]),l=useCallback(()=>{r(new Set(e));},[e]),d=useCallback(()=>Array.from(t),[t]);return useMemo(()=>({set:t,add:n,addMany:o,remove:a,has:s,toggle:i,clear:c,reset:l,values:d,size:t.size,isEmpty:t.size===0}),[t,n,o,a,s,i,c,l,d])}function SD(e=[]){let{add:t,remove:r,has:n,toggle:o,clear:a,addMany:s,values:i,size:c}=y0(e);return useMemo(()=>({selected:i(),isSelected:n,select:t,deselect:r,toggle:o,selectAll:s,deselectAll:a,count:c,isEmpty:c===0}),[i,n,t,r,o,s,a,c])}function PD(e=[]){let[t,r]=useState(e),n=useCallback(l=>{r(d=>[...d,l]);},[]),o=useCallback(l=>{r(d=>[...d,...l]);},[]),a=useCallback(()=>{let l;return r(d=>d.length===0?d:(l=d[0],d.slice(1))),l},[]),s=useCallback(()=>t[0],[t]),i=useCallback(()=>t[t.length-1],[t]),c=useCallback(()=>{r([]);},[]);return useMemo(()=>({queue:t,enqueue:n,enqueueMany:o,dequeue:a,peek:s,peekLast:i,clear:c,size:t.length,isEmpty:t.length===0,hasItems:t.length>0}),[t,n,o,a,s,i,c])}function ED(e=[]){let[t,r]=useState(e),n=useCallback(c=>{r(l=>[...l,c]);},[]),o=useCallback(c=>{r(l=>[...l,...c]);},[]),a=useCallback(()=>{let c;return r(l=>l.length===0?l:(c=l[l.length-1],l.slice(0,-1))),c},[]),s=useCallback(()=>t[t.length-1],[t]),i=useCallback(()=>{r([]);},[]);return useMemo(()=>({stack:t,push:n,pushMany:o,pop:a,peek:s,clear:i,size:t.length,isEmpty:t.length===0}),[t,n,o,a,s,i])}function T0(e,t=false){let[r,n]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true}),o=useRef(true),a=useRef(e);a.current=e;let s=useCallback(async(...c)=>{n(l=>({...l,isLoading:true,isIdle:false,isError:false,error:null}));try{let l=await a.current(...c);return o.current&&n({data:l,error:null,isLoading:!1,isSuccess:!0,isError:!1,isIdle:!1}),l}catch(l){let d=l instanceof Error?l:new Error(String(l));return o.current&&n({data:null,error:d,isLoading:false,isSuccess:false,isError:true,isIdle:false}),null}},[]),i=useCallback(()=>{n({data:null,error:null,isLoading:false,isSuccess:false,isError:false,isIdle:true});},[]);return useEffect(()=>(o.current=true,t&&s(),()=>{o.current=false;}),[t,s]),{...r,execute:s,reset:i}}function DD(e,t=3,r=1e3){let[n,o]=useState(0),a=useRef(e);a.current=e;let s=useCallback(async(...c)=>{let l=null;for(let d=0;d<=t;d++)try{return o(d),await a.current(...c)}catch(m){l=m instanceof Error?m:new Error(String(m)),d<t&&await new Promise(p=>setTimeout(p,r));}throw l},[t,r]);return {...T0(s,false),retryCount:n}}var k0=new Map,ID=300*1e3;function HD(e,t={}){let{immediate:r=true,init:n,transform:o,deps:a=[],enabled:s=true,refetchInterval:i,cacheKey:c}=t,[l,d]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),m=useRef(null),p=useRef(true),f=useCallback(async()=>{if(!e||!s)return;let v=c||e,b=k0.get(v);if(b&&Date.now()-b.timestamp<ID){d({data:b.data,error:null,isLoading:false,isSuccess:true,isError:false});return}m.current&&m.current.abort(),m.current=new AbortController,d(h=>({...h,isLoading:true,error:null}));try{let h=await fetch(e,{...n,signal:m.current.signal});if(!h.ok)throw new Error(`HTTP error! status: ${h.status}`);let x=await h.json(),y=o?o(x):x;k0.set(v,{data:y,timestamp:Date.now()}),p.current&&d({data:y,error:null,isLoading:!1,isSuccess:!0,isError:!1});}catch(h){if(h instanceof Error&&h.name==="AbortError")return;let x=h instanceof Error?h:new Error(String(h));p.current&&d({data:null,error:x,isLoading:false,isSuccess:false,isError:true});}},[e,s,n,o,c]),g=useCallback(()=>{m.current&&m.current.abort();},[]);return useEffect(()=>(p.current=true,r&&s&&f(),()=>{p.current=false,g();}),[e,r,s,...a]),useEffect(()=>{if(!i||!s)return;let v=setInterval(f,i);return ()=>{clearInterval(v);}},[i,s,f]),{...l,refetch:f,abort:g}}function VD(e,t={}){let{transform:r,...n}=t,[o,a]=useState({data:null,error:null,isLoading:false,isSuccess:false,isError:false}),s=useCallback(async c=>{a(l=>({...l,isLoading:true,error:null}));try{let l=await fetch(e,{...n,method:n.method||"POST",headers:{"Content-Type":"application/json",...n.headers},body:c?JSON.stringify(c):void 0});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);let d=await l.json(),m=r?r(d):d;return a({data:m,error:null,isLoading:!1,isSuccess:!0,isError:!1}),m}catch(l){let d=l instanceof Error?l:new Error(String(l));return a({data:null,error:d,isLoading:false,isSuccess:false,isError:true}),null}},[e,n,r]),i=useCallback(()=>{a({data:null,error:null,isLoading:false,isSuccess:false,isError:false});},[]);return {...o,mutate:s,reset:i}}function Cl(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setInterval(()=>{r.current();},t);return ()=>{clearInterval(n);}},[t]);}function zD(e,t){let[r,n]=useState(false);Cl(e,r?t:null);let o=useCallback(()=>n(true),[]),a=useCallback(()=>n(false),[]),s=useCallback(()=>n(i=>!i),[]);return {start:o,stop:a,toggle:s,isRunning:r}}function OD(e,t={}){let{interval:r=1e3,onComplete:n,autoStart:o=false}=t,[a,s]=useState(e),[i,c]=useState(o),l=useRef(n);l.current=n;let d=a<=0;Cl(()=>{s(g=>{let v=g-1;return v<=0?(c(false),l.current?.(),0):v});},i&&!d?r:null);let m=useCallback(()=>{d||c(true);},[d]),p=useCallback(()=>{c(false);},[]),f=useCallback(g=>{s(g??e),c(false);},[e]);return {seconds:a,isRunning:i,isComplete:d,start:m,pause:p,reset:f}}function FD(e={}){let{interval:t=1e3,maxSeconds:r,autoStart:n=false}=e,[o,a]=useState(0),[s,i]=useState(n),c=s&&(r===void 0||o<r);Cl(()=>{a(f=>f+1);},c?t:null);let l=useCallback(()=>i(true),[]),d=useCallback(()=>i(false),[]),m=useCallback(()=>i(f=>!f),[]),p=useCallback(()=>{a(0),i(false);},[]);return {seconds:o,isRunning:s,start:l,stop:d,reset:p,toggle:m}}function E0(e,t){let r=useRef(e);r.current=e,useEffect(()=>{if(t===null)return;let n=setTimeout(()=>{r.current();},t);return ()=>{clearTimeout(n);}},[t]);}function BD(e,t){let[r,n]=useState(false),o=useRef(null),a=useRef(e);a.current=e;let s=useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null),n(false);},[]),i=useCallback(()=>{s(),n(true),o.current=setTimeout(()=>{a.current(),n(false);},t);},[t,s]),c=useCallback(()=>{i();},[i]);return useEffect(()=>()=>{o.current&&clearTimeout(o.current);},[]),{start:i,cancel:s,reset:c,isScheduled:r}}function $D(e,t){let[r,n]=useState(e);return useEffect(()=>{let o=setTimeout(()=>{n(e);},t);return ()=>{clearTimeout(o);}},[e,t]),r}function KD(e,t=true){let[r,n]=useState(false);return E0(()=>{n(true);},t?e:null),r}function GD(e,t=true){let[r,n]=useState(t),[o,a]=useState(0),[s,i]=useState(0),c=useRef(e);c.current=e;let l=useRef(null),d=useRef(0),m=useRef(0),p=useRef(0),f=useRef(0),g=useCallback(h=>{let x=d.current?h-d.current:0;d.current=h,f.current++,h-p.current>=1e3&&(a(f.current),f.current=0,p.current=h),m.current++,i(m.current),c.current(x,h),l.current=requestAnimationFrame(g);},[]),v=useCallback(()=>{l.current===null&&(d.current=0,p.current=performance.now(),f.current=0,l.current=requestAnimationFrame(g),n(true));},[g]),b=useCallback(()=>{l.current!==null&&(cancelAnimationFrame(l.current),l.current=null,n(false));},[]);return useEffect(()=>(t&&v(),()=>{l.current!==null&&cancelAnimationFrame(l.current);}),[t,v]),{start:v,stop:b,isRunning:r,frameCount:s,fps:o}}function UD(e,t={}){let{duration:r=300,easing:n="easeOutCubic"}=t,[o,a]=useState(e),s=useRef(e),i=useRef(null),c=useRef(null),l={linear:d=>d,easeInCubic:d=>d*d*d,easeOutCubic:d=>1-Math.pow(1-d,3),easeInOutCubic:d=>d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2};return useEffect(()=>{if(o===e)return;s.current=o,i.current=null;let d=m=>{i.current===null&&(i.current=m);let p=m-i.current,f=Math.min(p/r,1),g=l[n](f),v=s.current+(e-s.current)*g;a(v),f<1&&(c.current=requestAnimationFrame(d));};return c.current=requestAnimationFrame(d),()=>{c.current!==null&&cancelAnimationFrame(c.current);}},[e,r,n]),o}function _D(e,t={}){let{stiffness:r=100,damping:n=10,mass:o=1}=t,[a,s]=useState(e),i=useRef(0),c=useRef(null),l=useRef(null);return useEffect(()=>{if(Math.abs(a-e)<.01&&Math.abs(i.current)<.01){s(e);return}let d=m=>{l.current===null&&(l.current=m);let p=Math.min((m-l.current)/1e3,.064);l.current=m;let f=(e-a)*r,g=i.current*n,v=(f-g)/o;i.current+=v*p;let b=a+i.current*p;s(b),Math.abs(b-e)>.01||Math.abs(i.current)>.01?c.current=requestAnimationFrame(d):(s(e),i.current=0);};return l.current=null,c.current=requestAnimationFrame(d),()=>{c.current!==null&&cancelAnimationFrame(c.current);}},[e,r,n,o,a]),a}var H0=["mousemove","mousedown","resize","keydown","touchstart","wheel","scroll"];function WD(e,t={}){let{events:r=H0,initialState:n=false,enabled:o=true}=t,[a,s]=useState(n),i=useRef(null),c=useCallback(()=>{s(false),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{s(true);},e);},[e]);return useEffect(()=>{if(o)return c(),r.forEach(l=>{window.addEventListener(l,c);}),()=>{i.current&&clearTimeout(i.current),r.forEach(l=>{window.removeEventListener(l,c);});}},[o,r,c]),a}function jD(e,t,r,n={}){let{events:o=H0,initialState:a=false,enabled:s=true}=n,[i,c]=useState(a),l=useRef(null),d=useRef(a),m=useCallback(()=>{d.current&&(d.current=false,r?.()),c(false),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{d.current=true,c(true),t?.();},e);},[e,t,r]);return useEffect(()=>{if(s)return m(),o.forEach(p=>{window.addEventListener(p,m);}),()=>{l.current&&clearTimeout(l.current),o.forEach(p=>{window.removeEventListener(p,m);});}},[s,o,m]),i}function A0(){let[e,t]=useState(()=>typeof document>"u"?"visible":document.visibilityState);return useEffect(()=>{let r=()=>{t(document.visibilityState);};return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}},[]),e}function XD(){return A0()==="visible"}function ZD(e,t){let r=useCallback(()=>{document.visibilityState==="visible"?e?.():t?.();},[e,t]);useEffect(()=>(document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r);}),[r]);}function JD(){let[e,t]=useState(()=>typeof navigator>"u"?true:navigator.onLine);return useEffect(()=>{let r=()=>t(true),n=()=>t(false);return window.addEventListener("online",r),window.addEventListener("offline",n),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n);}},[]),e}function QD(e,t){let[r,n]=useState(()=>typeof navigator>"u"?true:navigator.onLine),o=useCallback(()=>{n(true),e?.();},[e]),a=useCallback(()=>{n(false),t?.();},[t]);return useEffect(()=>(window.addEventListener("online",o),window.addEventListener("offline",a),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",a);}),[o,a]),r}function B0(e){let[t,r]=useState(false),n=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),o=useCallback(async()=>{let i=e?.current||document.documentElement;try{i.requestFullscreen?await i.requestFullscreen():i.webkitRequestFullscreen?await i.webkitRequestFullscreen():i.mozRequestFullScreen?await i.mozRequestFullScreen():i.msRequestFullscreen&&await i.msRequestFullscreen();}catch(c){console.error("Failed to enter fullscreen:",c);}},[e]),a=useCallback(async()=>{try{document.exitFullscreen?await document.exitFullscreen():document.webkitExitFullscreen?await document.webkitExitFullscreen():document.mozCancelFullScreen?await document.mozCancelFullScreen():document.msExitFullscreen&&await document.msExitFullscreen();}catch(i){console.error("Failed to exit fullscreen:",i);}},[]),s=useCallback(async()=>{t?await a():await o();},[t,o,a]);return useEffect(()=>{let i=()=>{r(!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement));};return document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i),document.addEventListener("mozfullscreenchange",i),document.addEventListener("MSFullscreenChange",i),()=>{document.removeEventListener("fullscreenchange",i),document.removeEventListener("webkitfullscreenchange",i),document.removeEventListener("mozfullscreenchange",i),document.removeEventListener("MSFullscreenChange",i);}},[]),{isFullscreen:t,enter:o,exit:a,toggle:s,isSupported:n}}function n1(){let e=useRef(null),t=B0(e);return {ref:e,...t}}function s1(e={}){let{watch:t=false,immediate:r=true,enableHighAccuracy:n=true,maximumAge:o=0,timeout:a=1e4}=e,[s,i]=useState({isLoading:false,position:null,error:null,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null}),c=typeof navigator<"u"&&"geolocation"in navigator,l=useCallback(p=>{i({isLoading:false,position:p,error:null,latitude:p.coords.latitude,longitude:p.coords.longitude,accuracy:p.coords.accuracy,altitude:p.coords.altitude,altitudeAccuracy:p.coords.altitudeAccuracy,heading:p.coords.heading,speed:p.coords.speed,timestamp:p.timestamp});},[]),d=useCallback(p=>{i(f=>({...f,isLoading:false,error:p}));},[]),m=useCallback(()=>{c&&(i(p=>({...p,isLoading:true,error:null})),navigator.geolocation.getCurrentPosition(l,d,{enableHighAccuracy:n,maximumAge:o,timeout:a}));},[c,l,d,n,o,a]);return useEffect(()=>{if(c&&(r&&m(),t)){let p=navigator.geolocation.watchPosition(l,d,{enableHighAccuracy:n,maximumAge:o,timeout:a});return ()=>{navigator.geolocation.clearWatch(p);}}},[t,r,c,m,l,d,n,o,a]),{...s,getCurrentPosition:m,isSupported:c}}function i1(e,t,r,n){if(e===null||t===null||r===null||n===null)return null;let o=6371e3,a=e*Math.PI/180,s=r*Math.PI/180,i=(r-e)*Math.PI/180,c=(n-t)*Math.PI/180,l=Math.sin(i/2)*Math.sin(i/2)+Math.cos(a)*Math.cos(s)*Math.sin(c/2)*Math.sin(c/2),d=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return o*d}function l1(e){let[t,r]=useState(null),[n,o]=useState(true),a=typeof navigator<"u"&&"permissions"in navigator,s=useCallback(async()=>{if(!a)return o(false),null;try{o(!0);let i=await navigator.permissions.query({name:e});return r(i.state),o(!1),i.state}catch(i){return console.error(`Permission query failed for ${e}:`,i),o(false),null}},[e,a]);return useEffect(()=>{if(!a){o(false);return}let i=null,c=()=>{i&&r(i.state);};return navigator.permissions.query({name:e}).then(l=>{i=l,r(l.state),o(false),l.addEventListener("change",c);}).catch(()=>{o(false);}),()=>{i&&i.removeEventListener("change",c);}},[e,a]),{state:t,isGranted:t==="granted",isDenied:t==="denied",isPrompt:t==="prompt",isLoading:n,isSupported:a,query:s}}function c1(){let[e,t]=useState(typeof Notification<"u"?Notification.permission:"default"),r=typeof Notification<"u",n=useCallback(async()=>{if(!r)return "default";let o=await Notification.requestPermission();return t(o),o},[r]);return useEffect(()=>{r&&t(Notification.permission);},[r]),{permission:e,request:n,isSupported:r}}function d1(e){let[t,r]=useState(null),[n,o]=useState(null),[a,s]=useState(false),i=typeof navigator<"u"&&"mediaDevices"in navigator,c=useCallback(async()=>{if(!i)return null;s(true),o(null);try{let d=await navigator.mediaDevices.getUserMedia(e);return r(d),s(!1),d}catch(d){let m=d instanceof Error?d:new Error(String(d));return o(m),s(false),null}},[e,i]),l=useCallback(()=>{t&&(t.getTracks().forEach(d=>d.stop()),r(null));},[t]);return useEffect(()=>()=>{t&&t.getTracks().forEach(d=>d.stop());},[t]),{stream:t,error:n,isLoading:a,request:c,stop:l,isSupported:i}}function m1(e={}){let{voice:t=null,rate:r=1,pitch:n=1,volume:o=1,lang:a="en-US"}=e,[s,i]=useState(false),[c,l]=useState(false),[d,m]=useState([]),p=typeof window<"u"&&"speechSynthesis"in window;useEffect(()=>{if(!p)return;let h=()=>{m(window.speechSynthesis.getVoices());};return h(),window.speechSynthesis.addEventListener("voiceschanged",h),()=>{window.speechSynthesis.removeEventListener("voiceschanged",h);}},[p]);let f=useCallback(h=>{if(!p)return;window.speechSynthesis.cancel();let x=new SpeechSynthesisUtterance(h);x.voice=t,x.rate=r,x.pitch=n,x.volume=o,x.lang=a,x.onstart=()=>i(true),x.onend=()=>{i(false),l(false);},x.onerror=()=>{i(false),l(false);},window.speechSynthesis.speak(x);},[p,t,r,n,o,a]),g=useCallback(()=>{p&&(window.speechSynthesis.cancel(),i(false),l(false));},[p]),v=useCallback(()=>{p&&(window.speechSynthesis.pause(),l(true));},[p]),b=useCallback(()=>{p&&(window.speechSynthesis.resume(),l(false));},[p]);return {speak:f,stop:g,pause:v,resume:b,isSpeaking:s,isPaused:c,isSupported:p,voices:d}}function p1(e={}){let{lang:t="en-US",continuous:r=false,interimResults:n=true}=e,[o,a]=useState(false),[s,i]=useState(""),[c,l]=useState(""),[d,m]=useState(null),p=useRef(null),f=typeof window<"u"?window.SpeechRecognition||window.webkitSpeechRecognition:null,g=f!==null;useEffect(()=>{if(!g||!f)return;let y=new f;return y.lang=t,y.continuous=r,y.interimResults=n,y.onstart=()=>{a(true),m(null);},y.onend=()=>{a(false);},y.onerror=T=>{m(new Error(T.error)),a(false);},y.onresult=T=>{let C="",R="";for(let M=T.resultIndex;M<T.results.length;M++){let P=T.results[M];P.isFinal?R+=P[0].transcript:C+=P[0].transcript;}R&&i(M=>M+R),l(C);},p.current=y,()=>{y.abort();}},[g,f,t,r,n]);let v=useCallback(()=>{if(p.current&&!o)try{p.current.start();}catch{}},[o]),b=useCallback(()=>{p.current&&p.current.stop();},[]),h=useCallback(()=>{p.current&&p.current.abort();},[]),x=useCallback(()=>{i(""),l(""),m(null);},[]);return {start:v,stop:b,abort:h,isListening:o,transcript:s,interimTranscript:c,isSupported:g,error:d,reset:x}}var K0=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains uppercase",test:e=>/[A-Z]/.test(e)},{label:"Contains lowercase",test:e=>/[a-z]/.test(e)},{label:"Contains number",test:e=>/[0-9]/.test(e)},{label:"Contains special character",test:e=>/[!@#$%^&*(),.?":{}|<>]/.test(e)}];function f1(e,t=K0){return e?t.filter(n=>n.test(e)).length/t.length:0}function g1(e){return e<.4?"bg-red-500":e<.7?"bg-yellow-500":"bg-green-500"}function b1(e){return e<.4?"Weak":e<.7?"Medium":"Strong"}function Br(e){let t=e.replace(/^#/,""),r=t.length===3?t.split("").map(o=>o+o).join(""):t;if(r.length!==6)return null;let n=parseInt(r,16);return isNaN(n)?null:{r:n>>16&255,g:n>>8&255,b:n&255}}function v1(e){let t=e.replace(/^#/,"");if(t.length===8){let n=Br(t.slice(0,6));if(!n)return null;let o=parseInt(t.slice(6,8),16)/255;return {...n,a:Math.round(o*100)/100}}let r=Br(e);return r?{...r,a:1}:null}function Rs(e,t,r){let n=o=>{let a=Math.max(0,Math.min(255,Math.round(o))).toString(16);return a.length===1?"0"+a:a};return `#${n(e)}${n(t)}${n(r)}`}function h1(e,t,r,n){let o=Rs(e,t,r),a=Math.round(n*255).toString(16).padStart(2,"0");return `${o}${a}`}function G0(e,t,r){e/=255,t/=255,r/=255;let n=Math.max(e,t,r),o=Math.min(e,t,r),a=0,s=0,i=(n+o)/2;if(n!==o){let c=n-o;switch(s=i>.5?c/(2-n-o):c/(n+o),n){case e:a=((t-r)/c+(t<r?6:0))/6;break;case t:a=((r-e)/c+2)/6;break;case r:a=((e-t)/c+4)/6;break}}return {h:Math.round(a*360),s:Math.round(s*100),l:Math.round(i*100)}}function cu(e,t,r){e/=360,t/=100,r/=100;let n,o,a;if(t===0)n=o=a=r;else {let s=(l,d,m)=>(m<0&&(m+=1),m>1&&(m-=1),m<.16666666666666666?l+(d-l)*6*m:m<.5?d:m<.6666666666666666?l+(d-l)*(.6666666666666666-m)*6:l),i=r<.5?r*(1+t):r+t-r*t,c=2*r-i;n=s(c,i,e+1/3),o=s(c,i,e),a=s(c,i,e-1/3);}return {r:Math.round(n*255),g:Math.round(o*255),b:Math.round(a*255)}}function Io(e){let t=Br(e);return t?G0(t.r,t.g,t.b):null}function Ma(e,t,r){let n=cu(e,t,r);return Rs(n.r,n.g,n.b)}function lu(e,t,r){let[n,o,a]=[e,t,r].map(s=>(s/=255,s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)));return .2126*n+.7152*o+.0722*a}function du(e,t){let r=Br(e),n=Br(t);if(!r||!n)return 1;let o=lu(r.r,r.g,r.b),a=lu(n.r,n.g,n.b),s=Math.max(o,a),i=Math.min(o,a);return Math.round((s+.05)/(i+.05)*100)/100}function x1(e,t,r=false){let n=du(e,t);return r?n>=3:n>=4.5}function y1(e,t,r=false){let n=du(e,t);return r?n>=4.5:n>=7}function uu(e){let t=Io(e);return t?t.l>50:false}function R1(e){return !uu(e)}function w1(e){return uu(e)?"#000000":"#ffffff"}function C1(e,t){let r=Io(e);if(!r)return e;let n=Math.min(100,r.l+t);return Ma(r.h,r.s,n)}function T1(e,t){let r=Io(e);if(!r)return e;let n=Math.max(0,r.l-t);return Ma(r.h,r.s,n)}function M1(e,t){let r=Io(e);if(!r)return e;let n=Math.min(100,r.s+t);return Ma(r.h,n,r.l)}function N1(e,t){let r=Io(e);if(!r)return e;let n=Math.max(0,r.s-t);return Ma(r.h,n,r.l)}function k1(e,t){let r=Br(e);return r?`rgba(${r.r}, ${r.g}, ${r.b}, ${t})`:e}function S1(e,t,r=.5){let n=Br(e),o=Br(t);if(!n||!o)return e;let a=Math.round(n.r*r+o.r*(1-r)),s=Math.round(n.g*r+o.g*(1-r)),i=Math.round(n.b*r+o.b*(1-r));return Rs(a,s,i)}function P1(e){let t=Io(e);if(!t)return e;let r=(t.h+180)%360;return Ma(r,t.s,t.l)}function E1(e){let t=Br(e);return t?Rs(255-t.r,255-t.g,255-t.b):e}function L1(e){if(e.startsWith("#"))return Br(e);let t=e.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+)?\s*\)/i);if(t)return {r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)};let r=e.match(/hsla?\s*\(\s*(\d+)\s*,\s*(\d+)%?\s*,\s*(\d+)%?\s*(?:,\s*[\d.]+)?\s*\)/i);return r?cu(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10)):null}function we(e){return e instanceof Date?e:typeof e=="number"?new Date(e):new Date(e)}function U0(e){let t=we(e);return !isNaN(t.getTime())}var D1=["January","February","March","April","May","June","July","August","September","October","November","December"],I1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],H1=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],V1=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function mu(e,t="yyyy-MM-dd"){let r=we(e);if(!U0(r))return "Invalid Date";let n=r.getFullYear(),o=r.getMonth(),a=r.getDate(),s=r.getDay(),i=r.getHours(),c=r.getMinutes(),l=r.getSeconds(),d=v=>v.toString().padStart(2,"0"),m=i%12||12,p={yyyy:n.toString(),yy:n.toString().slice(-2),MMMM:D1[o],MMM:I1[o],MM:d(o+1),M:(o+1).toString(),dd:d(a),d:a.toString(),EEEE:H1[s],EEE:V1[s],HH:d(i),H:i.toString(),hh:d(m),h:m.toString(),mm:d(c),m:c.toString(),ss:d(l),s:l.toString(),a:i<12?"AM":"PM"},f=Object.keys(p).sort((v,b)=>b.length-v.length),g=t;for(let v of f)g=g.replace(new RegExp(v,"g"),p[v]);return g}function A1(e){return mu(e,"yyyy-MM-dd")}function z1(e){return we(e).toISOString()}function O1(e,t=false){return mu(e,t?"HH:mm":"h:mm a")}var F1=[["year",31536e6],["month",2592e6],["week",6048e5],["day",864e5],["hour",36e5],["minute",6e4],["second",1e3]];function _0(e,t={}){let{locale:r="en",addSuffix:n=true,style:o="long"}=t,a=we(e),s=new Date,i=a.getTime()-s.getTime(),c=Math.abs(i);for(let[l,d]of F1)if(c>=d||l==="second"){let m=Math.round(i/d);try{return new Intl.RelativeTimeFormat(r,{style:o}).format(m,l)}catch{let p=Math.abs(m),f=p===1?l:`${l}s`;return n?m<0?`${p} ${f} ago`:`in ${p} ${f}`:`${p} ${f}`}}return "just now"}function B1(e,t=new Date){let r=we(e),o=we(t).getTime()-r.getTime();if(o<0)return _0(e);let a=Math.floor(o/1e3),s=Math.floor(a/60),i=Math.floor(s/60),c=Math.floor(i/24),l=Math.floor(c/7),d=Math.floor(c/30),m=Math.floor(c/365);return a<60?"just now":s<60?`${s}m ago`:i<24?`${i}h ago`:c<7?`${c}d ago`:l<4?`${l}w ago`:d<12?`${d}mo ago`:`${m}y ago`}function $1(e){let t=we(e),r=new Date;return t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function K1(e){let t=we(e),r=new Date;return r.setDate(r.getDate()-1),t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function G1(e){let t=we(e),r=new Date;return r.setDate(r.getDate()+1),t.getDate()===r.getDate()&&t.getMonth()===r.getMonth()&&t.getFullYear()===r.getFullYear()}function U1(e){return we(e).getTime()<Date.now()}function _1(e){return we(e).getTime()>Date.now()}function W1(e,t){let r=we(e),n=we(t);return r.getDate()===n.getDate()&&r.getMonth()===n.getMonth()&&r.getFullYear()===n.getFullYear()}function j1(e,t){let r=we(e),n=we(t);return r.getMonth()===n.getMonth()&&r.getFullYear()===n.getFullYear()}function Y1(e,t){return we(e).getFullYear()===we(t).getFullYear()}function q1(e,t){let r=new Date(we(e));return r.setDate(r.getDate()+t),r}function X1(e,t){let r=new Date(we(e));return r.setMonth(r.getMonth()+t),r}function Z1(e,t){let r=new Date(we(e));return r.setFullYear(r.getFullYear()+t),r}function J1(e,t){let r=new Date(we(e));return r.setTime(r.getTime()+t*36e5),r}function Q1(e,t){let r=new Date(we(e));return r.setTime(r.getTime()+t*6e4),r}function eI(e){let t=new Date(we(e));return t.setHours(0,0,0,0),t}function tI(e){let t=new Date(we(e));return t.setHours(23,59,59,999),t}function rI(e){let t=new Date(we(e));return t.setDate(1),t.setHours(0,0,0,0),t}function nI(e){let t=new Date(we(e));return t.setMonth(t.getMonth()+1,0),t.setHours(23,59,59,999),t}function oI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/864e5)}function aI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/36e5)}function sI(e,t){let r=we(e),n=we(t),o=r.getTime()-n.getTime();return Math.floor(o/6e4)}function iI(e,t={}){let{locale:r="en-US",minimumFractionDigits:n,maximumFractionDigits:o,useGrouping:a=true}=t;try{return new Intl.NumberFormat(r,{minimumFractionDigits:n,maximumFractionDigits:o,useGrouping:a}).format(e)}catch{return e.toString()}}function lI(e,t="USD",r={}){let{locale:n="en-US",display:o="symbol",minimumFractionDigits:a=2,maximumFractionDigits:s=2}=r;try{return new Intl.NumberFormat(n,{style:"currency",currency:t,currencyDisplay:o,minimumFractionDigits:a,maximumFractionDigits:s}).format(e)}catch{return `${t} ${e.toFixed(2)}`}}function cI(e,t={}){let{locale:r="en-US",minimumFractionDigits:n=0,maximumFractionDigits:o=1,signDisplay:a="auto"}=t,s=Math.abs(e)>1?e/100:e;try{return new Intl.NumberFormat(r,{style:"percent",minimumFractionDigits:n,maximumFractionDigits:o,signDisplay:a}).format(s)}catch{return `${(s*100).toFixed(o)}%`}}function dI(e,t={}){let{decimals:r=2,binary:n=true}=t;if(e===0)return "0 Bytes";let o=n?1024:1e3,a=n?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","kB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(o));return `${(e/Math.pow(o,s)).toFixed(r)} ${a[s]}`}function uI(e,t={}){let{locale:r="en-US",maximumFractionDigits:n=1}=t;try{return new Intl.NumberFormat(r,{notation:"compact",maximumFractionDigits:n}).format(e)}catch{let o=["","K","M","B","T"],a=Math.floor(Math.log10(Math.abs(e))/3);if(a===0)return e.toString();let s=o[a]||"",i=Math.pow(10,a*3);return (e/i).toFixed(n).replace(/\.0$/,"")+s}}function mI(e){let t=["th","st","nd","rd"],r=e%100;return r>=11&&r<=13?`${e}th`:`${e}${t[r%10]||"th"}`}function pI(e,t="(###) ###-####"){let r=e.replace(/\D/g,""),n=t,o=0;for(let a=0;a<n.length&&o<r.length;a++)n[a]==="#"&&(n=n.substring(0,a)+r[o]+n.substring(a+1),o++);return n.replace(/#/g,"").trim()}function fI(e){return e.replace(/\D/g,"").slice(0,16).replace(/(.{4})/g,"$1 ").trim()}function gI(e,t,r="..."){return e.length<=t?e:e.slice(0,t-r.length)+r}function bI(e,t,r="..."){if(e.length<=t)return e;let n=t-r.length,o=Math.ceil(n/2),a=Math.floor(n/2);return e.slice(0,o)+r+e.slice(-a)}function vI(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function W0(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(t,r)=>r.toUpperCase())}function hI(e){let t=W0(e);return t.charAt(0).toUpperCase()+t.slice(1)}function xI(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function yI(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function RI(e){return e.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function wI(e){let t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function CI(e){return e.charAt(0).toUpperCase()+e.slice(1)}function TI(e,t=2){return e.split(" ").filter(Boolean).map(r=>r[0]).slice(0,t).join("").toUpperCase()}function MI(e,t,r){return e===1?t:r||`${t}s`}function NI(e,t="and"){if(e.length===0)return "";if(e.length===1)return e[0];if(e.length===2)return `${e[0]} ${t} ${e[1]}`;let r=e[e.length-1];return `${e.slice(0,-1).join(", ")}, ${t} ${r}`}function kI(e,t=0,r=0,n="*"){if(e.length<=t+r)return e;let o=e.slice(0,t),a=e.slice(-r||void 0),s=e.length-t-r;return `${o}${n.repeat(s)}${r>0?a:""}`}function SI(e){let[t,r]=e.split("@");return !t||!r?e:`${t.length<=2?t:t[0]+"*".repeat(t.length-2)+t[t.length-1]}@${r}`}function PI(e,t=4){let r=e.replace(/\D/g,"");return r.length<=t?e:"*".repeat(r.length-t)+r.slice(-t)}function EI(e){return `**** **** **** ${e.replace(/\D/g,"").slice(-4)}`}
82
+ export{Fm as Accordion,Bm as AccordionItem,Sh as ActionBar,Ph as ActionBarButton,Nh as ActionGroup,ix as ActionSheet,rR as Alert,oR as AlertDescription,nR as AlertTitle,rh as AreaChart,pp as AspectRatio,Gy as AudioPlayer,cv as Autocomplete,co as Avatar,uo as AvatarFallback,pg as AvatarGroup,Bo as AvatarImage,Eb as BackTop,lR as Badge,Jh as Banner,eh as BarChart,Ey as Blockquote,ox as BottomNavigation,wx as Bounce,op as Breadcrumb,dp as BreadcrumbEllipsis,sp as BreadcrumbItem,ip as BreadcrumbLink,ap as BreadcrumbList,lp as BreadcrumbPage,cp as BreadcrumbSeparator,ie as Button,yu as ButtonGroup,Ru as ButtonGroupSeparator,rC as CALENDAR_SYSTEM_NAMES,vb as COUNTRIES,ei as Calendar,Nu as Card,Eu as CardContent,Pu as CardDescription,Lu as CardFooter,ku as CardHeader,Su as CardTitle,ch as Carousel,dh as CarouselContent,uh as CarouselItem,Wc as CarouselNext,_c as CarouselPrevious,Na as Checkbox,Bx as Checkmark,hg as Chip,Tg as CircularProgress,Ft as CloseButton,Sv as Code,Iv as CodeBlock,vx as Collapse,Wm as Collapsible,jm as CollapsibleContent,Xl as CollapsibleTrigger,$h as ColorArea,ib as ColorPicker,Uh as ColorSlider,Wa as ColorSwatch,ab as ColorSwatchPicker,Wh as ColorWheel,uc as Command,BC as CommandDialog,ng as CommandEmpty,og as CommandGroup,tg as CommandInput,sg as CommandItem,rg as CommandList,ag as CommandSeparator,ig as CommandShortcut,$x as Confetti,Gv as ConfirmDialog,mm as ContextMenu,Rm as ContextMenuCheckboxItem,vm as ContextMenuContent,fm as ContextMenuGroup,ym as ContextMenuItem,gm as ContextMenuPortal,wm as ContextMenuSection,Cm as ContextMenuSeparator,Tm as ContextMenuShortcut,bm as ContextMenuSub,xm as ContextMenuSubContent,hm as ContextMenuSubTrigger,pm as ContextMenuTrigger,Hh as ContextualHelp,qv as CopyButton,kx as Counter,mb as CurrencyInput,ts as DEFAULT_COLORS,dy as DataGrid,Jw as DataTable,Ch as DatePicker,Fv as DateRangePicker,wy as Diff,rc as DirectionContext,qs as DirectionProvider,qx as Dock,Xx as DockItem,Zx as DockSeparator,tc as Drawer,zp as DrawerBody,$p as DrawerClose,Vp as DrawerContent,Bp as DrawerDescription,Op as DrawerFooter,Yp as DrawerGroup,qp as DrawerGroupLabel,Ap as DrawerHeader,Xp as DrawerInset,Up as DrawerMenu,jp as DrawerMenuButton,_p as DrawerMenuItem,Hw as DrawerProvider,Gp as DrawerSeparator,Ip as DrawerSidebar,Fp as DrawerTitle,Kp as DrawerToggle,Hp as DrawerTrigger,At as Dropdown,Ot as DropdownContent,Qu as DropdownGroup,xt as DropdownItem,jR as DropdownLabel,Al as DropdownSection,Zu as DropdownSeparator,Ju as DropdownShortcut,em as DropdownSub,rm as DropdownSubContent,tm as DropdownSubTrigger,zt as DropdownTrigger,Yc as EMOJIS,qi as EMOJI_CATEGORIES,ph as EmojiPicker,Ag as EmptyState,hx as Expand,oP as FAB,fx as Fade,kc as FieldContext,tb as FileUpload,yx as Flip,ud as FloatingActionButton,dv as Form,Dr as FormContext,fv as FormControl,gv as FormDescription,uv as FormField,mv as FormItem,pv as FormLabel,bv as FormMessage,Jv as FullCalendar,fy as GanttChart,Kx as Glow,Fh as GridList,My as H1,Ny as H2,ky as H3,Sy as H4,Oy as HeatmapCalendar,ep as HoverCard,rp as HoverCardContent,tp as HoverCardTrigger,oc as I18nContext,Hf as I18nProvider,zv as Image,gE as ImageComparison,bh as ImageCropper,Oc as ImageViewer,_v as ImageViewerTrigger,Kv as InfiniteScroll,Ly as InlineCode,Sn as Input,kg as InputOTP,Sg as InputOTPGroup,Eg as InputOTPSeparator,Pg as InputOTPSlot,sh as KanbanBoard,jv as Kbd,Aa as LOCALE_DEFAULT_CALENDARS,io as Label,Iy as Large,Dy as Lead,Qv as LineChart,Sb as Link,$T as List,Gg as ListItem,Ug as ListItemText,hc as MASK_PRESETS,jx as Marquee,gb as MaskedInput,ay as Masonry,sy as MasonryItem,ey as Mentions,Vb as Menubar,Wb as MenubarCheckboxItem,Ub as MenubarContent,zb as MenubarGroup,_b as MenubarItem,OM as MenubarLabel,Ab as MenubarMenu,Ob as MenubarPortal,Bb as MenubarRadioGroup,jb as MenubarRadioItem,wc as MenubarSection,Yb as MenubarSeparator,qb as MenubarShortcut,Fb as MenubarSub,Gb as MenubarSubContent,Kb as MenubarSubTrigger,$b as MenubarTrigger,li as Modal,mi as ModalBody,eg as ModalClose,di as ModalContent,gi as ModalDescription,pi as ModalFooter,ui as ModalHeader,dc as ModalOverlay,cc as ModalPortal,ci as ModalRoot,fi as ModalTitle,Qf as ModalTrigger,Vy as Muted,Rb as Navbar,wb as NavbarBrand,Cb as NavbarContent,Tb as NavbarItem,Mb as NavbarLink,xp as NavigationMenu,Tp as NavigationMenuContent,kp as NavigationMenuIndicator,Rp as NavigationMenuItem,Np as NavigationMenuLink,yp as NavigationMenuList,Cp as NavigationMenuTrigger,Ql as NavigationMenuViewport,yv as NumberField,Ba as NumberInput,yy as OrgChart,Uy as PDFViewer,$f as Pagination,Kf as PaginationContent,Wf as PaginationEllipsis,Gf as PaginationItem,ni as PaginationLink,_f as PaginationNext,Uf as PaginationPrevious,Py as Paragraph,Ax as Parallax,cg as PasswordInput,hb as PhoneInput,th as PieChart,Nx as Pop,jt as Popover,En as PopoverAnchor,Yt as PopoverContent,Pn as PopoverTrigger,_s as Progress,px as PullToRefresh,Tx as Pulse,vh as QRCode,Df as RTL_LOCALES,Kl as Radio,jl as RadioContent,Gl as RadioControl,Wl as RadioDescription,Pm as RadioGroup,Em as RadioGroupItem,Ul as RadioIndicator,_l as RadioLabel,ri as RangeCalendar,Lh as RangeSlider,gg as Rating,Qc as ReeverUIContext,yh as ReeverUIProvider,uT as ResizableHandle,dT as ResizablePanel,cT as ResizablePanelGroup,Rx as Ripple,xx as Rotate,bx as Scale,Le as ScrollArea,Vx as ScrollProgress,Hx as ScrollReveal,mo as Select,wv as SelectField,NR as Separator,Cx as Shake,Fx as Shimmer,ef as Sidebar,rf as SidebarContent,nf as SidebarFooter,of as SidebarGroup,sf as SidebarGroupAction,lf as SidebarGroupContent,af as SidebarGroupLabel,tf as SidebarHeader,wf as SidebarInset,cf as SidebarMenu,pf as SidebarMenuAction,ff as SidebarMenuBadge,mf as SidebarMenuButton,df as SidebarMenuItem,hf as SidebarMenuSkeleton,gf as SidebarMenuSub,vf as SidebarMenuSubButton,bf as SidebarMenuSubItem,Qp as SidebarProvider,yf as SidebarRail,Rf as SidebarSeparator,xf as SidebarTrigger,Yy as SignaturePad,Is as Skeleton,Zy as SkipLink,gx as Slide,yr as Slider,Hy as Small,Av as Snippet,Gx as Sparkles,Ms as Spinner,oy as SplitButton,Xh as SpotlightSearch,Fg as StatCard,Qb as Step,Zb as Steps,dx as SwipeActions,Vu as Switch,Hv as TabbedCodeBlock,Cf as Table,Mf as TableBody,Ef as TableCaption,Pf as TableCell,Nf as TableFooter,Sf as TableHead,Tf as TableHeader,kf as TableRow,im as Tabs,dm as TabsContent,lm as TabsList,cm as TabsTrigger,Hg as TagInput,Ty as Terminal,dR as TextBadge,vv as TextField,Px as TextReveal,Ds as Textarea,hv as TextareaField,Xi as ThemeProvider,hh as ThemeToggle,cb as TimeInput,Bv as TimePicker,jg as Timeline,Xg as TimelineContent,qg as TimelineItem,Zg as TimelineOpposite,ZR as Toaster,Lm as Toggle,Im as ToggleGroup,Hm as ToggleGroupItem,$r as Tooltip,Ku as TooltipArrow,Gr as TooltipContent,Kr as TooltipTrigger,Wy as Tour,ry as TransferList,sv as Tree,Sx as Typewriter,Ay as UL,Mv as User,$y as VideoPlayer,Mx as Wiggle,Ex as WordRotate,kh as actionBarVariants,Mh as actionGroupVariants,sx as actionSheetItemVariants,q1 as addDays,J1 as addHours,Q1 as addMinutes,X1 as addMonths,Z1 as addYears,eR as alertVariants,k1 as alpha,Ti as applyMask,lv as autocompleteInputVariants,mg as avatarGroupVariants,Pb as backTopVariants,aR as badgeIndicatorVariants,Zh as bannerVariants,nx as bottomNavigationVariants,nc as buildFullLocale,zo as buttonVariants,f1 as calculatePasswordStrength,W0 as camelCase,CI as capitalize,Mu as cardVariants,ih as carouselVariants,es as chartContainerVariants,vg as chipVariants,Cg as circularProgressVariants,Lp as closeButtonVariants,u as cn,kv as codeVariants,Bh as colorAreaVariants,Gh as colorSliderVariants,ob as colorSwatchPickerVariants,nb as colorSwatchVariants,_h as colorWheelVariants,P1 as complement,sd as contextualHelpTriggerVariants,Yv as copyButtonVariants,ub as currencyInputVariants,T1 as darken,wd as dataGridVariants,wh as datePickerVariants,K0 as defaultPasswordRequirements,N1 as desaturate,ml as diffVariants,oI as differenceInDays,aI as differenceInHours,sI as differenceInMinutes,Yx as dockVariants,Wp as drawerMenuButtonVariants,mh as emojiPickerVariants,tI as endOfDay,nI as endOfMonth,as as fabVariants,Jg as fileUploadVariants,dI as formatBytes,uI as formatCompact,fI as formatCreditCard,lI as formatCurrency,mu as formatDate,wi as formatFileSize,A1 as formatISO,z1 as formatISODateTime,NI as formatList,iI as formatNumber,mI as formatOrdinal,cI as formatPercent,pI as formatPhone,Mi as formatPhoneNumber,_0 as formatRelative,O1 as formatTime,Zv as fullCalendarVariants,dl as ganttChartVariants,In as getBaseLocale,du as getContrastRatio,If as getDefaultCalendarForLocale,Js as getDirectionForLocale,Qg as getFileIcon,TI as getInitials,lu as getLuminance,fb as getMaskPlaceholder,g1 as getPasswordStrengthColor,b1 as getPasswordStrengthLabel,w1 as getTextColor,Oh as gridListItemVariants,zh as gridListVariants,Io as hexToHsl,Br as hexToRgb,v1 as hexToRgba,Ma as hslToHex,cu as hslToRgb,gh as imageCropperVariants,Dc as imageVariants,Ac as infiniteScrollLoaderVariants,Vc as infiniteScrollVariants,Ng as inputOTPVariants,E1 as invert,R1 as isDarkColor,_1 as isFuture,uu as isLightColor,U1 as isPast,nC as isRTLLocale,W1 as isSameDay,j1 as isSameMonth,Y1 as isSameYear,$1 as isToday,G1 as isTomorrow,U0 as isValidDate,K1 as isYesterday,Wv as kbdVariants,xI as kebabCase,C1 as lighten,Kg as listItemVariants,Ua as listVariants,Wx as marqueeVariants,kI as mask,EI as maskCreditCard,SI as maskEmail,PI as maskPhone,pb as maskedInputVariants,Rd as masonryVariants,x1 as meetsContrastAA,y1 as meetsContrastAAA,Qx as mentionsVariants,S1 as mix,lc as modalContentVariants,yb as navbarVariants,Mp as navigationMenuLinkStyle,wp as navigationMenuTriggerStyle,hy as nodeVariants,vy as orgChartVariants,Xs as parseCalendarFromLocale,L1 as parseColor,we as parseDate,hI as pascalCase,RM as phoneInputVariants,MI as pluralize,mx as pullToRefreshVariants,Xc as qrCodeVariants,Eh as rangeSliderVariants,fg as ratingVariants,Rs as rgbToHex,G0 as rgbToHsl,h1 as rgbaToHex,M1 as saturate,ju as selectVariants,wI as sentenceCase,uf as sidebarMenuButtonVariants,jy as signaturePadVariants,zu as skeletonVariants,Xy as skipLinkVariants,vI as slugify,yI as snakeCase,Vv as snippetVariants,Ts as spinnerVariants,ny as splitButtonVariants,eI as startOfDay,rI as startOfMonth,Og as statCardVariants,Jb as stepVariants,Xb as stepsVariants,pd as swipeActionVariants,cx as swipeActionsVariants,Ss as switchColors,Ig as tagVariants,Cy as terminalVariants,cR as textBadgeVariants,aS as themeToggleVariants,B1 as timeAgo,lb as timeInputVariants,Yg as timelineItemVariants,Wg as timelineVariants,RI as titleCase,Ks as toggleVariants,ty as transferListVariants,rv as treeItemVariants,tv as treeVariants,gI as truncate,bI as truncateMiddle,xc as unmask,UD as useAnimatedValue,T0 as useAsync,DD as useAsyncRetry,tD as useBodyScrollLock,gD as useBooleanToggle,vL as useBreakpoint,hL as useBreakpoints,Sl as useButtonGroup,iC as useCalendarSystem,Yi as useCarousel,HL as useClickOutside,VL as useClickOutsideMultiple,SP as useConfetti,zL as useCopy,AL as useCopyToClipboard,OD as useCountdown,vD as useCounter,fD as useCycle,NL as useDebounce,kL as useDebouncedCallback,SL as useDebouncedCallbackWithControls,$D as useDelayedValue,Va as useDirection,Qw as useDirectionValue,f0 as useDisclosure,mD as useDisclosureOpen,i1 as useDistance,XD as useDocumentIsVisible,A0 as useDocumentVisibility,ZD as useDocumentVisibilityCallback,Nw as useDrawer,cD as useElementSize,$L as useEventListener,KL as useEventListenerRef,HD as useFetch,Li as useFieldContext,VC as useFocusTrap,ai as useFocusTrapRef,Sc as useFormContext,B0 as useFullscreen,n1 as useFullscreenRef,s1 as useGeolocation,OL as useHotkeys,FL as useHotkeysMap,_L as useHover,YL as useHoverDelay,jL as useHoverProps,WL as useHoverRef,cr as useI18n,WD as useIdle,jD as useIdleCallback,hD as useIncrementCounter,d0 as useIntersectionObserver,nD as useIntersectionObserverRef,Cl as useInterval,zD as useIntervalControls,lL as useIsDesktop,sL as useIsMobile,eC as useIsRTL,iL as useIsTablet,GL as useKeyPress,BL as useKeyPressed,ZN as useKeyboardShortcut,oD as useLazyLoad,TD as useList,RL as useLocalStorage,sC as useLocale,UL as useLongPress,MD as useMap,d1 as useMediaPermission,Ra as useMediaQuery,XL as useMouse,ZL as useMouseElement,JL as useMouseElementRef,VD as useMutation,aD as useMutationObserver,sD as useMutationObserverRef,c1 as useNotificationPermission,JD as useOnlineStatus,QD as useOnlineStatusCallback,l1 as usePermission,cL as usePrefersColorScheme,dL as usePrefersReducedMotion,xD as usePrevious,RD as usePreviousDistinct,yD as usePreviousWithInitial,PD as useQueue,GD as useRafLoop,ND as useRecord,iS as useReeverUI,iD as useResizeObserver,lD as useResizeObserverRef,i0 as useScrollLock,QL as useScrollPosition,SD as useSelection,CL as useSessionStorage,y0 as useSet,Gw as useSidebar,Ia as useSidebarSafe,p1 as useSpeechRecognition,m1 as useSpeechSynthesis,jS as useSpotlight,_D as useSpringValue,ED as useStack,LL as useThrottle,DL as useThrottledCallback,E0 as useTimeout,BD as useTimeoutControls,KD as useTimeoutFlag,FD as useTimer,pD as useToggle,bL as useWindowHeight,eD as useWindowScroll,bs as useWindowSize,gL as useWindowWidth,Tv as userVariants,eb as validateFile,sN as validators};//# sourceMappingURL=index.js.map
83
83
  //# sourceMappingURL=index.js.map