@stackloop/ui 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +703 -700
- package/dist/index.js.map +1 -1
- package/dist/stackloop-ui.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),x=require("framer-motion"),v=require("lucide-react");function ke(r){var t,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(o=ke(r[t]))&&(s&&(s+=" "),s+=o)}else for(o in r)r[o]&&(s&&(s+=" "),s+=o);return s}function Xe(){for(var r,t,o=0,s="",a=arguments.length;o<a;o++)(r=arguments[o])&&(t=ke(r))&&(s&&(s+=" "),s+=t);return s}const Ye=(r,t)=>{const o=new Array(r.length+t.length);for(let s=0;s<r.length;s++)o[s]=r[s];for(let s=0;s<t.length;s++)o[r.length+s]=t[s];return o},qe=(r,t)=>({classGroupId:r,validator:t}),Ce=(r=new Map,t=null,o)=>({nextPart:r,validators:t,classGroupId:o}),ne="-",ye=[],He="arbitrary..",Je=r=>{const t=Qe(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:n=>{if(n.startsWith("[")&&n.endsWith("]"))return Ke(n);const c=n.split(ne),i=c[0]===""&&c.length>1?1:0;return Se(c,i,t)},getConflictingClassGroupIds:(n,c)=>{if(c){const i=s[n],d=o[n];return i?d?Ye(d,i):i:d||ye}return o[n]||ye}}},Se=(r,t,o)=>{if(r.length-t===0)return o.classGroupId;const a=r[t],l=o.nextPart.get(a);if(l){const d=Se(r,t+1,l);if(d)return d}const n=o.validators;if(n===null)return;const c=t===0?r.join(ne):r.slice(t).join(ne),i=n.length;for(let d=0;d<i;d++){const g=n[d];if(g.validator(c))return g.classGroupId}},Ke=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),o=t.indexOf(":"),s=t.slice(0,o);return s?He+s:void 0})(),Qe=r=>{const{theme:t,classGroups:o}=r;return Ze(o,t)},Ze=(r,t)=>{const o=Ce();for(const s in r){const a=r[s];pe(a,o,s,t)}return o},pe=(r,t,o,s)=>{const a=r.length;for(let l=0;l<a;l++){const n=r[l];er(n,t,o,s)}},er=(r,t,o,s)=>{if(typeof r=="string"){rr(r,t,o);return}if(typeof r=="function"){tr(r,t,o,s);return}sr(r,t,o,s)},rr=(r,t,o)=>{const s=r===""?t:Te(t,r);s.classGroupId=o},tr=(r,t,o,s)=>{if(or(r)){pe(r(s),t,o,s);return}t.validators===null&&(t.validators=[]),t.validators.push(qe(o,r))},sr=(r,t,o,s)=>{const a=Object.entries(r),l=a.length;for(let n=0;n<l;n++){const[c,i]=a[n];pe(i,Te(t,c),o,s)}},Te=(r,t)=>{let o=r;const s=t.split(ne),a=s.length;for(let l=0;l<a;l++){const n=s[l];let c=o.nextPart.get(n);c||(c=Ce(),o.nextPart.set(n,c)),o=c}return o},or=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,ar=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),s=Object.create(null);const a=(l,n)=>{o[l]=n,t++,t>r&&(t=0,s=o,o=Object.create(null))};return{get(l){let n=o[l];if(n!==void 0)return n;if((n=s[l])!==void 0)return a(l,n),n},set(l,n){l in o?o[l]=n:a(l,n)}}},ue="!",we=":",nr=[],ve=(r,t,o,s,a)=>({modifiers:r,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),ir=r=>{const{prefix:t,experimentalParseClassName:o}=r;let s=a=>{const l=[];let n=0,c=0,i=0,d;const g=a.length;for(let w=0;w<g;w++){const R=a[w];if(n===0&&c===0){if(R===we){l.push(a.slice(i,w)),i=w+1;continue}if(R==="/"){d=w;continue}}R==="["?n++:R==="]"?n--:R==="("?c++:R===")"&&c--}const h=l.length===0?a:a.slice(i);let b=h,k=!1;h.endsWith(ue)?(b=h.slice(0,-1),k=!0):h.startsWith(ue)&&(b=h.slice(1),k=!0);const y=d&&d>i?d-i:void 0;return ve(l,k,b,y)};if(t){const a=t+we,l=s;s=n=>n.startsWith(a)?l(n.slice(a.length)):ve(nr,!1,n,void 0,!0)}if(o){const a=s;s=l=>o({className:l,parseClassName:a})}return s},lr=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((o,s)=>{t.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let l=0;l<o.length;l++){const n=o[l],c=n[0]==="[",i=t.has(n);c||i?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(n)):a.push(n)}return a.length>0&&(a.sort(),s.push(...a)),s}},cr=r=>({cache:ar(r.cacheSize),parseClassName:ir(r),sortModifiers:lr(r),...Je(r)}),dr=/\s+/,mr=(r,t)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:l}=t,n=[],c=r.trim().split(dr);let i="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:h,modifiers:b,hasImportantModifier:k,baseClassName:y,maybePostfixModifierPosition:w}=o(g);if(h){i=g+(i.length>0?" "+i:i);continue}let R=!!w,D=s(R?y.substring(0,w):y);if(!D){if(!R){i=g+(i.length>0?" "+i:i);continue}if(D=s(y),!D){i=g+(i.length>0?" "+i:i);continue}R=!1}const P=b.length===0?"":b.length===1?b[0]:l(b).join(":"),z=k?P+ue:P,L=z+D;if(n.indexOf(L)>-1)continue;n.push(L);const O=a(D,R);for(let j=0;j<O.length;++j){const E=O[j];n.push(z+E)}i=g+(i.length>0?" "+i:i)}return i},ur=(...r)=>{let t=0,o,s,a="";for(;t<r.length;)(o=r[t++])&&(s=ze(o))&&(a&&(a+=" "),a+=s);return a},ze=r=>{if(typeof r=="string")return r;let t,o="";for(let s=0;s<r.length;s++)r[s]&&(t=ze(r[s]))&&(o&&(o+=" "),o+=t);return o},pr=(r,...t)=>{let o,s,a,l;const n=i=>{const d=t.reduce((g,h)=>h(g),r());return o=cr(d),s=o.cache.get,a=o.cache.set,l=c,c(i)},c=i=>{const d=s(i);if(d)return d;const g=mr(i,o);return a(i,g),g};return l=n,(...i)=>l(ur(...i))},xr=[],M=r=>{const t=o=>o[r]||xr;return t.isThemeGetter=!0,t},Re=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Me=/^\((?:(\w[\w-]*):)?(.+)\)$/i,br=/^\d+\/\d+$/,fr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,H=r=>br.test(r),T=r=>!!r&&!Number.isNaN(Number(r)),Y=r=>!!r&&Number.isInteger(Number(r)),de=r=>r.endsWith("%")&&T(r.slice(0,-1)),V=r=>fr.test(r),vr=()=>!0,jr=r=>hr.test(r)&&!gr.test(r),Ae=()=>!1,Nr=r=>yr.test(r),kr=r=>wr.test(r),Cr=r=>!u(r)&&!p(r),Sr=r=>J(r,Pe,Ae),u=r=>Re.test(r),q=r=>J(r,Ee,jr),me=r=>J(r,Ar,T),je=r=>J(r,Ie,Ae),Tr=r=>J(r,De,kr),oe=r=>J(r,Oe,Nr),p=r=>Me.test(r),Z=r=>K(r,Ee),zr=r=>K(r,Ir),Ne=r=>K(r,Ie),Rr=r=>K(r,Pe),Mr=r=>K(r,De),ae=r=>K(r,Oe,!0),J=(r,t,o)=>{const s=Re.exec(r);return s?s[1]?t(s[1]):o(s[2]):!1},K=(r,t,o=!1)=>{const s=Me.exec(r);return s?s[1]?t(s[1]):o:!1},Ie=r=>r==="position"||r==="percentage",De=r=>r==="image"||r==="url",Pe=r=>r==="length"||r==="size"||r==="bg-size",Ee=r=>r==="length",Ar=r=>r==="number",Ir=r=>r==="family-name",Oe=r=>r==="shadow",Dr=()=>{const r=M("color"),t=M("font"),o=M("text"),s=M("font-weight"),a=M("tracking"),l=M("leading"),n=M("breakpoint"),c=M("container"),i=M("spacing"),d=M("radius"),g=M("shadow"),h=M("inset-shadow"),b=M("text-shadow"),k=M("drop-shadow"),y=M("blur"),w=M("perspective"),R=M("aspect"),D=M("ease"),P=M("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...L(),p,u],j=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],f=()=>[p,u,i],C=()=>[H,"full","auto",...f()],A=()=>[Y,"none","subgrid",p,u],$=()=>["auto",{span:["full",Y,p,u]},Y,p,u],W=()=>[Y,"auto",p,u],_=()=>["auto","min","max","fr",p,u],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...f()],B=()=>[H,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],N=()=>[r,p,u],xe=()=>[...L(),Ne,je,{position:[p,u]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Rr,Sr,{size:[p,u]}],le=()=>[de,Z,q],F=()=>["","none","full",d,p,u],U=()=>["",T,Z,q],ee=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[T,de,Ne,je],ge=()=>["","none",y,p,u],re=()=>["none",T,p,u],te=()=>["none",T,p,u],ce=()=>[T,p,u],se=()=>[H,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[vr],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Cr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",T],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",H,u,p,R]}],container:["container"],columns:[{columns:[T,u,p,c]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[Y,"auto",p,u]}],basis:[{basis:[H,"full","auto",c,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[T,H,"auto","initial","none",u]}],grow:[{grow:["",T,p,u]}],shrink:[{shrink:["",T,p,u]}],order:[{order:[Y,"first","last","none",p,u]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[c,"screen",...B()]}],"min-w":[{"min-w":[c,"screen","none",...B()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[n]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",o,Z,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,p,me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",de,u]}],"font-family":[{font:[zr,u,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,p,u]}],"line-clamp":[{"line-clamp":[T,"none",p,me]}],leading:[{leading:[l,...f()]}],"list-image":[{"list-image":["none",p,u]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[T,"from-font","auto",p,q]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[T,"auto",p,u]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:xe()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Y,p,u],radial:["",p,u],conic:[Y,p,u]},Mr,Tr]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[T,p,u]}],"outline-w":[{outline:["",T,Z,q]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",g,ae,oe]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",h,ae,oe]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[T,q]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",b,ae,oe]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[T,p,u]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[T]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[p,u]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[T]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,u]}],filter:[{filter:["","none",p,u]}],blur:[{blur:ge()}],brightness:[{brightness:[T,p,u]}],contrast:[{contrast:[T,p,u]}],"drop-shadow":[{"drop-shadow":["","none",k,ae,oe]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",T,p,u]}],"hue-rotate":[{"hue-rotate":[T,p,u]}],invert:[{invert:["",T,p,u]}],saturate:[{saturate:[T,p,u]}],sepia:[{sepia:["",T,p,u]}],"backdrop-filter":[{"backdrop-filter":["","none",p,u]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[T,p,u]}],"backdrop-contrast":[{"backdrop-contrast":[T,p,u]}],"backdrop-grayscale":[{"backdrop-grayscale":["",T,p,u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[T,p,u]}],"backdrop-invert":[{"backdrop-invert":["",T,p,u]}],"backdrop-opacity":[{"backdrop-opacity":[T,p,u]}],"backdrop-saturate":[{"backdrop-saturate":[T,p,u]}],"backdrop-sepia":[{"backdrop-sepia":["",T,p,u]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,u]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[T,"initial",p,u]}],ease:[{ease:["linear","initial",D,p,u]}],delay:[{delay:[T,p,u]}],animate:[{animate:["none",P,p,u]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,p,u]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[p,u,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,u]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,u]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[T,Z,q,me]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pr=pr(Dr);function m(...r){return Pr(Xe(r))}const ie=S.forwardRef(({variant:r="primary",size:t="md",loading:o,icon:s,className:a,children:l,disabled:n,...c},i)=>{const d="inline-flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] flex-shrink-0 whitespace-nowrap",g={primary:"bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 shadow-sm",secondary:"bg-secondary text-foreground hover:bg-border active:bg-border-dark",outline:"bg-transparent text-primary border-2 border-primary hover:bg-secondary active:bg-border",ghost:"bg-transparent text-primary hover:bg-secondary active:bg-border",danger:"bg-error text-white hover:bg-red-600 active:bg-red-700 shadow-sm"},h={sm:"px-3 py-2 text-sm min-h-[2.25rem]",md:"px-4 py-2.5 text-base min-h-[2.75rem]",lg:"px-6 py-3.5 text-lg min-h-[3.25rem]"};return e.jsxs(x.motion.button,{ref:i,whileTap:{scale:n||o?1:.98},className:m(d,g[r],h[t],a),disabled:n||o,...c,children:[o?e.jsx(v.Loader2,{className:"h-5 w-5 animate-spin"}):s?e.jsx("span",{className:"flex-shrink-0",children:s}):null,l]})});ie.displayName="Button";const Fe=S.forwardRef(({label:r,error:t,hint:o,leftIcon:s,rightIcon:a,className:l,type:n,...c},i)=>{const[d,g]=S.useState(!1),h=n==="password",b=h&&d?"text":n;return e.jsxs("div",{className:"w-full space-y-1.5",children:[r&&e.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[r,c.required&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsxs("div",{className:"relative",children:[s&&e.jsx("div",{className:"absolute flex items-center pointer-events-none text-primary",style:{left:"14px",top:"50%",transform:"translateY(-50%)"},children:s}),e.jsx("input",{ref:i,type:b,className:m("w-full rounded-md border transition-all duration-200","bg-background text-foreground placeholder:text-foreground/50","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:cursor-not-allowed","touch-target text-base",t&&"border-error focus:ring-error",!t&&"border-border",l),style:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:s?"44px":"16px",paddingRight:a||h?"44px":"16px"},...c}),h&&e.jsx(x.motion.button,{type:"button",onClick:()=>g(!d),className:"absolute text-primary hover:text-primary-dark transition-colors",style:{right:"14px",top:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-label":d?"Hide password":"Show password",whileTap:{scale:.9,y:"-50%"},animate:{y:"-50%"},transition:{duration:.1},children:d?e.jsx(v.EyeOff,{className:"w-5 h-5"}):e.jsx(v.Eye,{className:"w-5 h-5"})}),a&&!h&&e.jsx("div",{className:"absolute flex items-center pointer-events-none text-primary",style:{right:"14px",top:"50%",transform:"translateY(-50%)"},children:a})]}),t&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-error",children:t}),o&&!t&&e.jsx("p",{className:"text-sm text-primary/70",children:o})]})});Fe.displayName="Input";const Le=S.forwardRef(({label:r,error:t,helperText:o,className:s,required:a,...l},n)=>e.jsxs(x.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full",children:[r&&e.jsxs("label",{className:"block text-sm font-medium text-foreground mb-1.5",children:[r,a&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsx("textarea",{ref:n,className:m("w-full px-4 py-3 bg-background border border-border rounded-md","text-foreground placeholder:text-foreground/50","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200 resize-vertical","text-base touch-target",t&&"border-error focus:ring-error",s),...l}),t&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1 text-sm text-error",children:t}),o&&!t&&e.jsx("p",{className:"mt-1 text-sm text-primary/70",children:o})]}));Le.displayName="Textarea";const Be=S.forwardRef(({label:r,description:t,className:o,checked:s,defaultChecked:a,onChange:l,...n},c)=>{const[i,d]=S.useState(a||!1),g=s!==void 0?s:i,h=b=>{s===void 0&&d(b.target.checked),l?.(b.target.checked)};return e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[e.jsxs("div",{className:"relative flex-shrink-0 mt-0.5",children:[e.jsx("input",{ref:c,type:"checkbox",className:"sr-only peer",checked:g,onChange:h,...n}),e.jsx(x.motion.div,{className:m("w-6 h-6 rounded-md border-2 transition-all duration-200","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed","flex items-center justify-center",g?"bg-primary border-primary":"border-border bg-secondary",o),whileTap:{scale:.95},children:e.jsx(v.Check,{className:m("w-4 h-4 text-white transition-opacity duration-200",g?"opacity-100":"opacity-0")})})]}),(r||t)&&e.jsxs("div",{className:"flex-1 space-y-0.5",children:[r&&e.jsx("div",{className:"text-base font-medium text-foreground group-hover:text-primary transition-colors",children:r}),t&&e.jsx("div",{className:"text-sm text-primary/70",children:t})]})]})});Be.displayName="Checkbox";const Er=({options:r,value:t,onChange:o,name:s,disabled:a,className:l})=>e.jsx("div",{className:m("flex flex-wrap gap-2",l),children:r.map(n=>{const c=t===n.value;return e.jsxs("label",{className:"relative cursor-pointer",children:[e.jsx("input",{type:"radio",name:s,value:n.value,checked:c,onChange:i=>o?.(i.target.value),disabled:a,className:"sr-only peer"}),e.jsxs(x.motion.div,{whileTap:{scale:a?1:.95},className:m("px-4 py-2.5 rounded-full border-2 transition-all duration-200","flex items-center gap-2 min-h-[2.75rem]","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",c?"bg-primary border-primary text-white":"bg-background border-border text-primary hover:border-border-dark"),children:[n.icon&&e.jsx("span",{className:"flex-shrink-0",children:n.icon}),e.jsx("span",{className:"font-medium text-base",children:n.label})]})]},n.value)})}),Ge=S.forwardRef(({label:r,description:t,className:o,checked:s,onChange:a,...l},n)=>{const c=i=>{a?.(i.target.checked)};return e.jsxs("label",{className:"flex items-center justify-between gap-4 cursor-pointer group",children:[(r||t)&&e.jsxs("div",{className:"flex-1 space-y-0.5",children:[r&&e.jsx("div",{className:"text-base font-medium text-foreground",children:r}),t&&e.jsx("div",{className:"text-sm text-primary/70",children:t})]}),e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("input",{ref:n,type:"checkbox",onChange:c,className:"sr-only peer",checked:s,...l}),e.jsx("div",{className:m("w-12 h-7 rounded-full transition-all duration-200 relative","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",s?"bg-primary":"bg-border-dark",o),children:e.jsx(x.motion.div,{className:"absolute top-1 w-5 h-5 bg-white rounded-full shadow-sm",animate:{left:s?"24px":"4px"},transition:{type:"spring",stiffness:500,damping:30}})})]})]})});Ge.displayName="Toggle";const Or=({value:r,onChange:t,min:o=0,max:s=100,step:a=1,label:l,showValue:n=!0,unit:c="%",disabled:i,className:d})=>{const[g,h]=S.useState(!1),b=(r-o)/(s-o)*100;return e.jsxs("div",{className:m("w-full space-y-2",d),children:[(l||n)&&e.jsxs("div",{className:"flex items-center justify-between",children:[l&&e.jsx("label",{className:"text-sm font-medium text-primary",children:l}),n&&e.jsxs("span",{className:"text-sm font-semibold text-primary",children:[r,c]})]}),e.jsxs("div",{className:"relative h-12 flex items-center",children:[e.jsx("div",{className:"relative w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"absolute left-0 top-0 h-full bg-primary rounded-full",style:{width:`${b}%`},initial:!1,animate:{width:`${b}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:o,max:s,step:a,value:r,onChange:k=>t(Number(k.target.value)),onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onTouchStart:()=>h(!0),onTouchEnd:()=>h(!1),disabled:i,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed",style:{zIndex:10}}),e.jsx(x.motion.div,{className:m("absolute w-6 h-6 bg-background border-2 border-primary rounded-full shadow-md","pointer-events-none",i&&"opacity-50"),style:{left:`calc(${b}% - 12px)`},animate:{scale:g?1.2:1},transition:{type:"spring",stiffness:300,damping:20}})]})]})},Fr=({value1:r,value2:t,onChange:o,label1:s,label2:a,min:l=0,max:n=100,step:c=1,unit:i="%",disabled:d,className:g})=>{const h=r+t,b=h>0?r/h*100:50,k=h>0?t/h*100:50,y=w=>{const R=n-w;o(w,Math.max(l,Math.min(n,R)))};return e.jsxs("div",{className:m("w-full space-y-3",g),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:s}),e.jsxs("span",{className:"text-sm font-semibold text-primary",children:[r,i]})]}),e.jsxs("div",{className:"relative h-10 flex items-center",children:[e.jsx("div",{className:"w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"h-full bg-primary",initial:!1,animate:{width:`${b}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:l,max:n,step:c,value:r,onChange:w=>y(Number(w.target.value)),disabled:d,className:"absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:a}),e.jsxs("span",{className:"text-sm font-semibold text-success",children:[t,i]})]}),e.jsxs("div",{className:"relative h-10 flex items-center",children:[e.jsx("div",{className:"w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"h-full bg-success",initial:!1,animate:{width:`${k}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:l,max:n,step:c,value:t,onChange:w=>y(n-Number(w.target.value)),disabled:d,className:"absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"})]})]}),e.jsxs("div",{className:"text-xs text-primary/70 text-center",children:["Total: ",h,i]})]})},Lr=({options:r,value:t,onChange:o,placeholder:s="Select an option",label:a,error:l,searchable:n=!1,clearable:c=!0,disabled:i,className:d})=>{const[g,h]=S.useState(!1),[b,k]=S.useState(""),y=S.useRef(null),w=r.find(z=>z.value===t),R=n?r.filter(z=>z.label.toLowerCase().includes(b.toLowerCase())):r;S.useEffect(()=>{const z=L=>{y.current&&!y.current.contains(L.target)&&(h(!1),k(""))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const D=z=>{o(z),h(!1),k("")},P=z=>{z.stopPropagation(),o("")};return e.jsxs("div",{ref:y,className:m("relative w-full",d),children:[a&&e.jsx("label",{className:"block mb-1.5 text-sm font-medium text-foreground",children:a}),e.jsxs("button",{type:"button",onClick:()=>!i&&h(!g),disabled:i,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary","disabled:bg-secondary disabled:cursor-not-allowed","touch-target",l&&"border-error",!l&&"border-border",g&&"ring-2 ring-primary"),children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[w?.icon&&e.jsx("span",{className:"flex-shrink-0",children:w.icon}),e.jsx("span",{className:m("truncate",!w&&"text-foreground/50"),children:w?.label||s})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[c&&w&&e.jsx("button",{type:"button",onClick:P,className:"p-1 hover:bg-secondary rounded transition-colors",children:e.jsx(v.X,{className:"w-4 h-4 text-primary"})}),e.jsx(v.ChevronDown,{className:m("w-5 h-5 text-primary transition-transform",g&&"rotate-180")})]})]}),e.jsx(x.AnimatePresence,{children:g&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",children:[n&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx(v.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50"}),e.jsx("input",{type:"text",placeholder:"Search...",value:b,onChange:z=>k(z.target.value),className:"w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"}),b&&e.jsx("button",{onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(v.X,{className:"w-4 h-4 text-primary/50 hover:text-primary"})})]})}),e.jsx("div",{className:"overflow-y-auto max-h-64",children:R.length>0?R.map(z=>e.jsxs("button",{onClick:()=>D(z.value),className:m("w-full px-4 py-3 text-left flex items-center gap-2","hover:bg-secondary transition-colors",z.value===t&&"bg-border text-foreground"),children:[z.icon&&e.jsx("span",{className:"flex-shrink-0",children:z.icon}),e.jsx("span",{children:z.label})]},z.value)):e.jsx("div",{className:"px-4 py-6 text-center text-primary/70 text-sm",children:"No options found"})})]})}),l&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1.5 text-sm text-error",children:l})]})},Ue=S.forwardRef(({options:r,value:t,onChange:o,placeholder:s="Select an option",label:a,error:l,hint:n,searchable:c=!1,clearable:i=!0,disabled:d,required:g,className:h},b)=>{const[k,y]=S.useState(!1),[w,R]=S.useState(""),D=S.useRef(null),P=r.find(j=>j.value===t),z=c?r.filter(j=>j.label.toLowerCase().includes(w.toLowerCase())):r;S.useEffect(()=>{const j=E=>{D.current&&!D.current.contains(E.target)&&(y(!1),R(""))};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const L=j=>{o(j),y(!1),R("")},O=j=>{j.stopPropagation(),o("")};return e.jsxs("div",{ref:b,className:m("w-full space-y-1.5",h),children:[a&&e.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[a,g&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsxs("div",{ref:D,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>!d&&y(!k),disabled:d,"aria-haspopup":"listbox","aria-expanded":k,"aria-required":g,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:cursor-not-allowed","touch-target text-base",l&&"border-error focus:ring-error",!l&&"border-border",k&&"ring-2 ring-primary"),children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[P?.icon&&e.jsx("span",{className:"flex-shrink-0",children:P.icon}),e.jsx("span",{className:m("truncate",!P&&"text-foreground/50"),children:P?.label||s})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[i&&P&&!d&&e.jsx("span",{role:"button",tabIndex:0,onClick:O,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),O(j))},className:"p-1 hover:bg-secondary rounded transition-colors cursor-pointer","aria-label":"Clear selection",children:e.jsx(v.X,{className:"w-4 h-4 text-primary"})}),e.jsx(v.ChevronDown,{className:m("w-5 h-5 text-primary transition-transform",k&&"rotate-180")})]})]}),e.jsx(x.AnimatePresence,{children:k&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},role:"listbox",className:"absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",children:[c&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx(v.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50"}),e.jsx("input",{type:"text",placeholder:"Search...",value:w,onChange:j=>R(j.target.value),className:"w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary","aria-label":"Search options"}),w&&e.jsx("button",{type:"button",onClick:()=>R(""),className:"absolute right-2 top-1/2 -translate-y-1/2","aria-label":"Clear search",children:e.jsx(v.X,{className:"w-4 h-4 text-primary/50 hover:text-primary"})})]})}),e.jsx("div",{className:"overflow-y-auto max-h-64",children:z.length>0?z.map(j=>e.jsxs("button",{type:"button",role:"option","aria-selected":j.value===t,onClick:()=>!j.disabled&&L(j.value),disabled:j.disabled,className:m("w-full px-4 py-3 text-left flex items-center gap-2","hover:bg-secondary transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",j.value===t&&"bg-border text-foreground font-medium"),children:[j.icon&&e.jsx("span",{className:"flex-shrink-0",children:j.icon}),e.jsx("span",{children:j.label})]},j.value)):e.jsx("div",{className:"px-4 py-6 text-center text-primary/70 text-sm",children:"No options found"})})]})})]}),l&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-error",children:l}),n&&!l&&e.jsx("p",{className:"text-sm text-primary/70",children:n})]})});Ue.displayName="Select";const Br=({value:r,onChange:t,label:o,placeholder:s="Select date",error:a,disabled:l,minDate:n,maxDate:c,className:i})=>{const[d,g]=S.useState(!1),[h,b]=S.useState(r||new Date),k=S.useRef(null);S.useEffect(()=>{const C=A=>{k.current&&!k.current.contains(A.target)&&g(!1)};return d&&document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[d]);const y=["January","February","March","April","May","June","July","August","September","October","November","December"],w=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],R=C=>{const A=C.getFullYear(),$=C.getMonth(),W=new Date(A,$,1),Q=new Date(A,$+1,0).getDate(),X=W.getDay(),G=[];for(let B=0;B<X;B++)G.push(null);for(let B=1;B<=Q;B++)G.push(new Date(A,$,B));return G},D=()=>{b(new Date(h.getFullYear(),h.getMonth()-1,1))},P=()=>{b(new Date(h.getFullYear(),h.getMonth()+1,1))},z=C=>{t(C),g(!1)},L=C=>!!(n&&C<n||c&&C>c),O=(C,A)=>!C||!A?!1:C.getDate()===A.getDate()&&C.getMonth()===A.getMonth()&&C.getFullYear()===A.getFullYear(),j=C=>C?O(C,new Date):!1,E=C=>C?C.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",f=R(h);return e.jsxs("div",{ref:k,className:m("relative w-full",i),children:[o&&e.jsx("label",{className:"block mb-1.5 text-sm font-medium text-foreground",children:o}),e.jsxs("button",{type:"button",onClick:()=>!l&&g(!d),disabled:l,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary","disabled:bg-secondary disabled:cursor-not-allowed","touch-target",a&&"border-error",!a&&"border-border",d&&"ring-2 ring-primary"),children:[e.jsx("span",{className:m("truncate",!r&&"text-foreground/50"),children:r?E(r):s}),e.jsx(v.Calendar,{className:"w-5 h-5 text-primary flex-shrink-0"})]}),e.jsx(x.AnimatePresence,{children:d&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute z-50 w-80 mt-2 bg-background rounded-md border border-border shadow-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("button",{type:"button",onClick:D,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:e.jsx(v.ChevronLeft,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"font-semibold text-foreground",children:[y[h.getMonth()]," ",h.getFullYear()]}),e.jsx("button",{type:"button",onClick:P,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:e.jsx(v.ChevronRight,{className:"w-5 h-5 text-primary"})})]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:w.map(C=>e.jsx("div",{className:"text-center text-xs font-medium text-primary/70 py-2",children:C},C))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:f.map((C,A)=>{if(!C)return e.jsx("div",{className:"aspect-square"},`empty-${A}`);const $=O(C,r||null),W=j(C),_=L(C);return e.jsx(x.motion.button,{type:"button",whileTap:{scale:_?1:.95},onClick:()=>!_&&z(C),disabled:_,className:m("aspect-square rounded-lg flex items-center justify-center","text-sm font-medium transition-all duration-200","hover:bg-secondary",$&&"bg-primary text-white hover:bg-primary-dark",W&&!$&&"border-2 border-primary text-primary",_&&"text-border-dark cursor-not-allowed hover:bg-transparent",!$&&!W&&!_&&"text-foreground"),children:C.getDate()},C.toISOString())})}),e.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e.jsx("button",{type:"button",onClick:()=>z(new Date),className:"w-full py-2 text-sm font-medium text-primary hover:bg-secondary rounded-lg transition-colors",children:"Today"})})]})}),a&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1.5 text-sm text-error",children:a})]})},Gr=({children:r,variant:t="default",padding:o="md",className:s,onClick:a,hover:l=!1})=>{const n={default:"bg-background border border-border",outlined:"bg-transparent border-2 border-border-dark",elevated:"bg-background border-2 border-border shadow-card"},c={none:"p-0",sm:"p-3",md:"p-4 sm:p-6",lg:"p-6 sm:p-8"},i=a?x.motion.button:x.motion.div;return e.jsx(i,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},whileHover:l||a?{y:-2,boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1)"}:void 0,whileTap:a?{scale:.98}:void 0,className:m("rounded-lg transition-all duration-200",n[t],c[o],a&&"cursor-pointer w-full text-left",s),onClick:a,children:r})},Ur=({children:r,className:t})=>e.jsx("div",{className:m("mb-4",t),children:r}),$r=({children:r,className:t})=>e.jsx("h3",{className:m("text-lg font-semibold text-foreground",t),children:r}),Wr=({children:r,className:t})=>e.jsx("p",{className:m("text-sm text-foreground/70 mt-1",t),children:r}),_r=({children:r,className:t})=>e.jsx("div",{className:t,children:r}),Vr=({isOpen:r,onClose:t,children:o,title:s,position:a="right",className:l})=>(S.useEffect(()=>{const n=c=>{c.key==="Escape"&&t()};return r&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow="unset"}},[r,t]),e.jsx(x.AnimatePresence,{children:r&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:t}),e.jsxs(x.motion.div,{initial:{x:a==="left"?"-100%":"100%"},animate:{x:0},exit:{x:a==="left"?"-100%":"100%"},transition:{type:"spring",damping:30,stiffness:300},className:m("fixed top-0 z-50 h-full w-[400px] sm:w-[480px] bg-background shadow-xl",a==="left"?"left-0 border-r":"right-0 border-l","border-border",l),children:[s&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:s}),e.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-secondary transition-colors","aria-label":"Close drawer",children:e.jsx(v.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto h-[calc(100%-5rem)] p-6",children:o})]})]})})),Xr=({isOpen:r,onClose:t,children:o,title:s,size:a="md",className:l})=>{const n=S.useRef(null);S.useEffect(()=>{const i=d=>{d.key==="Escape"&&t()};return r&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow="unset"}},[r,t]);const c={sm:"max-w-lg",md:"max-w-2xl",lg:"max-w-4xl",xl:"max-w-6xl",full:"max-w-full mx-4"};return e.jsx(x.AnimatePresence,{children:r&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsxs(x.motion.div,{ref:n,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:m("bg-background border border-border rounded-lg shadow-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",c[a],l),children:[s&&e.jsxs("div",{className:"px-6 py-4 border-b border-border flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:s}),e.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-secondary transition-colors","aria-label":"Close modal",children:e.jsx(v.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto flex-1",children:o})]})})})},Yr=({children:r,className:t})=>e.jsx("div",{className:m("px-6 py-4",t),children:r}),qr=({children:r,className:t})=>e.jsx("div",{className:m("px-6 py-4 border-t border-border flex items-center justify-end gap-3 bg-background sticky bottom-0",t),children:r}),Hr=({isOpen:r,onClose:t,title:o,children:s,showCloseButton:a=!0,className:l})=>(S.useEffect(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),e.jsx(x.AnimatePresence,{children:r&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/50 z-40"}),e.jsxs(x.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:m("fixed bottom-0 left-0 right-0 z-50","bg-white rounded-t-3xl shadow-2xl","max-h-[90vh] flex flex-col",l),children:[e.jsx("div",{className:"flex justify-center pt-3 pb-2",children:e.jsx("div",{className:"w-12 h-1.5 bg-border-dark rounded-full"})}),(o||a)&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[o&&e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:o}),a&&e.jsx("button",{onClick:t,className:"p-2 rounded-full hover:bg-secondary transition-colors",children:e.jsx(v.X,{className:"w-5 h-5 text-primary"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:s})]})]})}));function Jr({data:r,columns:t,loading:o=!1,onRowClick:s,keyExtractor:a,className:l}){const[n,c]=S.useState(null),[i,d]=S.useState("asc"),g=b=>{n===b?d(i==="asc"?"desc":"asc"):(c(b),d("asc"))},h=n?[...r].sort((b,k)=>{const y=b[n],w=k[n];return y<w?i==="asc"?-1:1:y>w?i==="asc"?1:-1:0}):r;return o?e.jsx("div",{className:m("border border-border rounded-lg overflow-hidden",l),children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b border-border",children:e.jsx("tr",{children:t.map((b,k)=>e.jsx("th",{className:"px-6 py-4 text-left",children:e.jsx("div",{className:"h-4 bg-border rounded w-24 animate-pulse"})},k))})}),e.jsx("tbody",{children:[...Array(5)].map((b,k)=>e.jsx("tr",{className:"border-b border-border",children:t.map((y,w)=>e.jsx("td",{className:"px-6 py-4",children:e.jsx("div",{className:"h-4 bg-secondary rounded animate-pulse"})},w))},k))})]})})}):e.jsx(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:m("border border-border rounded-lg overflow-hidden",l),children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b border-border",children:e.jsx("tr",{children:t.map((b,k)=>e.jsx("th",{className:m("px-6 py-4 text-left text-sm font-semibold text-foreground",b.width,b.sortable&&"cursor-pointer transition-colors"),onClick:()=>b.sortable&&g(b.key),children:e.jsxs("div",{className:"flex items-center gap-2",children:[b.header,b.sortable&&e.jsx("span",{className:"text-primary/50 hover:text-primary transition-colors",children:n===b.key?i==="asc"?e.jsx(v.ArrowUp,{className:"w-4 h-4"}):e.jsx(v.ArrowDown,{className:"w-4 h-4"}):e.jsx(v.ChevronsUpDown,{className:"w-4 h-4"})})]})},k))})}),e.jsx("tbody",{children:h.map((b,k)=>e.jsx(x.motion.tr,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,delay:k*.05},onClick:()=>s&&s(b),className:m("border-b border-border transition-colors",s&&"cursor-pointer hover:bg-secondary"),children:t.map((y,w)=>e.jsx("td",{className:m("px-6 py-4 text-sm text-foreground/70",y.width),style:y.width?{width:y.width}:void 0,title:y.truncate&&!y.render?String(b[y.key]??""):void 0,children:y.truncate&&!y.render?e.jsx("div",{className:"truncate",children:String(b[y.key]??"")}):y.render?y.render(b):String(b[y.key]??"")},w))},a(b)))})]})})})}const Kr=({currentPage:r,totalPages:t,onPageChange:o,totalItems:s,itemsPerPage:a,className:l})=>{const c=Array.from({length:t},(i,d)=>d+1).slice(Math.max(0,r-2),Math.min(t,r+1));return e.jsxs(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:m("flex items-center justify-between gap-4 flex-wrap",l),children:[e.jsx("div",{className:"text-sm text-foreground/70",children:s&&a&&e.jsxs("span",{children:["Showing ",Math.min((r-1)*a+1,s)," to"," ",Math.min(r*a,s)," of ",s," results"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ie,{variant:"secondary",size:"sm",disabled:r===1,onClick:()=>o(r-1),icon:e.jsx(v.ChevronLeft,{className:"w-4 h-4"}),children:"Previous"}),e.jsxs("div",{className:"flex items-center gap-1",children:[r>3&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(1),className:"w-10 h-10 rounded-md hover:bg-secondary border border-border text-sm transition-colors",children:"1"}),e.jsx("span",{className:"text-primary/50 px-1",children:"..."})]}),c.map(i=>e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(i),className:m("w-10 h-10 rounded-md text-sm border transition-all",i===r?"bg-primary text-white border-primary shadow-sm":"hover:bg-secondary border-border"),children:i},i)),r<t-2&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-primary/50 px-1",children:"..."}),e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(t),className:"w-10 h-10 rounded-md hover:bg-secondary border border-border text-sm transition-colors",children:t})]})]}),e.jsx(ie,{variant:"secondary",size:"sm",disabled:r===t,onClick:()=>o(r+1),icon:e.jsx(v.ChevronRight,{className:"w-4 h-4"}),children:"Next"})]})]})},$e=({icon:r,onClick:t,label:o,actions:s,variant:a="primary",position:l="bottom-right",disabled:n,className:c})=>{const[i,d]=S.useState(!1),g={"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2"},h={primary:"bg-primary text-white hover:bg-primary-dark shadow-lg",secondary:"bg-background text-primary border-2 border-primary hover:bg-secondary shadow-md"},b={primary:"bg-primary text-white",success:"bg-success text-white",danger:"bg-error text-white",warning:"bg-warning text-white"},k=()=>{s&&s.length>0?d(!i):t&&t()};return e.jsxs("div",{className:m(g[l],"z-50",c),children:[e.jsx(x.AnimatePresence,{children:i&&s&&e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute bottom-20 right-0 flex flex-col gap-3 mb-2",children:s.map((y,w)=>e.jsxs(x.motion.div,{initial:{opacity:0,y:20,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.8},transition:{delay:w*.05},className:"flex items-center gap-3",children:[e.jsx("span",{className:m("bg-background border border-border rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap shadow-lg",y.labelClassName),style:y.labelStyle,children:y.label}),e.jsx(x.motion.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>{y.onClick(),d(!1)},className:m("w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",b[y.variant||"primary"]),children:y.icon})]},w))})}),e.jsxs(x.motion.button,{whileTap:{scale:n?1:.9},whileHover:{scale:n?1:1.05},onClick:k,disabled:n,className:m("z-30 rounded-full p-4 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center gap-2",h[a],o?"px-6":"w-16 h-16 justify-center",i&&"rotate-45"),children:[e.jsx("span",{className:"flex-shrink-0",children:r||(i?e.jsx(v.X,{className:"w-6 h-6"}):e.jsx(v.Plus,{className:"w-6 h-6"}))}),o&&e.jsx("span",{className:"font-medium",children:o})]})]})},Qr=$e,Zr=({steps:r,currentStep:t,className:o})=>{const s=r[t];return e.jsxs("div",{className:m("w-full",o),children:[e.jsx("div",{className:"hidden md:block",children:e.jsx("div",{className:"relative flex items-center mb-2",children:r.map((a,l)=>{const n=l<t,c=l===t,i=l>t;return e.jsxs(S.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center relative z-10",children:[e.jsx(x.motion.div,{initial:!1,animate:{scale:c?1.05:1},className:m("w-12 h-12 rounded-full flex items-center justify-center","font-semibold text-base transition-all duration-300","ring-4 ring-white",(n||c)&&"bg-primary text-white shadow-lg",i&&"bg-border text-muted-foreground"),children:n?e.jsx(v.Check,{className:"w-6 h-6 stroke-[3]"}):e.jsx("span",{children:l+1})}),e.jsxs("div",{className:"mt-3 text-center max-w-[120px]",children:[e.jsx("span",{className:m("text-sm font-semibold block",c&&"text-primary",n&&"text-primary",i&&"text-primary/50"),children:a.label}),a.description&&e.jsx("p",{className:m("text-xs mt-1 leading-tight",c&&"text-primary",n&&"text-primary/70",i&&"text-primary/50"),children:a.description})]})]}),l<r.length-1&&e.jsx("div",{className:"flex-1 relative",style:{marginTop:"-48px",marginLeft:"4px",marginRight:"4px"},children:e.jsx("div",{className:"h-1.5 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{initial:!1,animate:{width:l<t?"100%":"0%"},transition:{duration:.4,ease:"easeInOut"},className:"h-full bg-primary rounded-full"})})})]},l)})})}),e.jsxs("div",{className:"md:hidden",children:[e.jsx("div",{className:"flex items-center justify-center gap-2 mb-3",children:r.map((a,l)=>{const n=l<t,c=l===t;return e.jsx(x.motion.div,{initial:!1,animate:{scale:c?1.2:1,backgroundColor:n||c?"var(--color-primary)":"var(--color-border-dark)"},className:m("rounded-full transition-all duration-300",c?"w-3 h-3":"w-2 h-2",(n||c)&&"shadow-sm")},l)})}),e.jsx(x.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},className:"text-center",children:e.jsx("p",{className:"text-sm font-semibold text-foreground",children:s?.label})},t)]})]})},et=({children:r,variant:t="default",size:o="md",className:s,dot:a=!1})=>{const l={default:"bg-secondary text-primary border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-success/10 text-success border border-success/20",warning:"bg-warning/10 text-warning border border-warning/20",danger:"bg-error/10 text-error border border-error/20",info:"bg-info/10 text-info border border-info/20"},n={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},c={default:"bg-primary",primary:"bg-primary",success:"bg-success",warning:"bg-warning",danger:"bg-error",info:"bg-info"};return e.jsxs(x.motion.span,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:m("inline-flex items-center gap-1.5 rounded-lg font-medium",l[t],n[o],s),children:[a&&e.jsx("span",{className:m("w-1.5 h-1.5 rounded-full",c[t])}),r]})},rt=({isOffline:r,className:t})=>r?e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:m("inline-flex items-center gap-2 px-3 py-1.5 rounded-full","bg-warning text-white text-sm font-medium shadow-sm",t),children:[e.jsx(v.WifiOff,{className:"w-4 h-4"}),e.jsx("span",{children:"Offline Mode"})]}):null,tt=({status:r,count:t,className:o})=>{const a={synced:{icon:e.jsx(v.Wifi,{className:"w-4 h-4"}),label:"Synced",color:"bg-success text-white"},syncing:{icon:e.jsx(x.motion.div,{animate:{rotate:360},transition:{repeat:1/0,duration:1,ease:"linear"},children:e.jsx(v.Wifi,{className:"w-4 h-4"})}),label:"Syncing...",color:"bg-info text-white"},unsynced:{icon:e.jsx(v.WifiOff,{className:"w-4 h-4"}),label:t?`${t} Unsynced`:"Unsynced",color:"bg-warning text-white"},error:{icon:e.jsx(v.WifiOff,{className:"w-4 h-4"}),label:"Sync Error",color:"bg-error text-white"}}[r];return e.jsxs(x.motion.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:m("inline-flex items-center gap-2 px-3 py-1.5 rounded-full","text-sm font-medium shadow-sm",a.color,o),children:[a.icon,e.jsx("span",{children:a.label})]})},st={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},ot={primary:"border-primary border-t-transparent",secondary:"border-secondary border-t-transparent",white:"border-white border-t-transparent"},We=({size:r="md",variant:t="primary",className:o,label:s})=>e.jsxs("div",{className:m("inline-flex flex-col items-center gap-2",o),children:[e.jsx(x.motion.div,{className:m("rounded-full",st[r],ot[t]),animate:{rotate:360},transition:{duration:.8,repeat:1/0,ease:"linear"},role:"status","aria-label":s||"Loading"}),s&&e.jsx("span",{className:"text-sm text-foreground/70",children:s})]});We.displayName="Spinner";const _e=S.createContext(void 0),at=()=>{const r=S.useContext(_e);if(!r)throw new Error("useToast must be used within ToastProvider");return r},nt={success:"bg-success/10 border-success text-success backdrop-blur-2xl",error:"bg-error/10 border-error text-error backdrop-blur-2xl",warning:"bg-warning/10 border-warning text-warning backdrop-blur-2xl",info:"bg-info/10 border-info text-info backdrop-blur-2xl",default:"bg-background border-border text-foreground backdrop-blur-2xl"},it={success:v.CheckCircle,error:v.AlertCircle,warning:v.AlertTriangle,info:v.Info,default:null},lt={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},ct=({toast:r,onRemove:t})=>{const o=r.variant||"default",s=it[o],a=typeof r.message=="string"?r.message:String(r.message);return e.jsxs(x.motion.div,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:100,scale:.95},transition:{duration:.2},className:m("flex items-start gap-3 p-4 rounded-md border shadow-lg min-w-[320px] max-w-md",nt[o]),children:[s&&e.jsx(s,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium leading-relaxed",children:a}),r.action&&e.jsx("button",{onClick:r.action.onClick,className:"mt-2 text-xs font-semibold hover:underline",children:r.action.label})]}),e.jsx("button",{onClick:()=>t(r.id),className:"flex-shrink-0 hover:opacity-70 transition-opacity","aria-label":"Close notification",children:e.jsx(v.X,{className:"w-4 h-4"})})]})},Ve=({children:r,position:t="top-right",maxToasts:o=5})=>{const[s,a]=S.useState([]),l=S.useCallback(c=>{a(i=>i.filter(d=>d.id!==c))},[]),n=S.useCallback(c=>{if(typeof c.message!="string"){console.error("Toast message must be a string, received:",c.message);return}const i=Math.random().toString(36).substring(2,9),d=c.duration??5e3;a(g=>[...g,{...c,id:i}].slice(-o)),d>0&&setTimeout(()=>{l(i)},d)},[o,l]);return e.jsxs(_e.Provider,{value:{toasts:s,addToast:n,removeToast:l},children:[r,e.jsx("div",{className:m("fixed z-[100] flex flex-col gap-2",lt[t]),children:e.jsx(x.AnimatePresence,{mode:"popLayout",children:s.map(c=>e.jsx(ct,{toast:c,onRemove:l},c.id))})})]})};Ve.displayName="ToastProvider";const dt=({onCapture:r,onRemove:t,preview:o,label:s="Take Photo",disabled:a,className:l})=>{const n=S.useRef(null),c=i=>{const d=i.target.files?.[0];d&&r(d)};return e.jsxs("div",{className:m("w-full",l),children:[s&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:s}),o?e.jsxs("div",{className:"relative rounded-lg overflow-hidden border-2 border-border",children:[e.jsx("img",{src:o,alt:"Preview",className:"w-full h-48 object-cover"}),t&&e.jsx("button",{onClick:t,className:"absolute top-2 right-2 p-2 bg-error text-white rounded-full shadow-lg hover:bg-red-600",children:e.jsx(v.X,{className:"w-4 h-4"})})]}):e.jsxs(x.motion.button,{type:"button",whileTap:{scale:a?1:.98},onClick:()=>n.current?.click(),disabled:a,className:m("w-full p-4 rounded-lg border-2 border-border","flex items-center justify-center gap-3","bg-secondary hover:bg-border hover:border-border-dark","transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed"),children:[e.jsx(v.Camera,{className:"w-6 h-6 text-primary"}),e.jsx("span",{className:"font-medium text-foreground",children:"Capture Photo"})]}),e.jsx("input",{ref:n,type:"file",accept:"image/*",capture:"environment",onChange:c,className:"hidden",disabled:a})]})},mt=({onUpload:r,accept:t="*/*",multiple:o=!1,label:s="Upload Files",disabled:a,className:l})=>{const n=S.useRef(null),c=i=>{i&&r(Array.from(i))};return e.jsxs("div",{className:m("w-full",l),children:[s&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:s}),e.jsxs(x.motion.button,{type:"button",whileTap:{scale:a?1:.98},onClick:()=>!a&&n.current?.click(),disabled:a,className:m("w-full p-4 rounded-lg border-2 border-border","flex items-center justify-center gap-3","bg-secondary hover:bg-border hover:border-border-dark","transition-all duration-200 cursor-pointer","disabled:opacity-50 disabled:cursor-not-allowed"),children:[e.jsx(v.Upload,{className:"w-6 h-6 text-primary"}),e.jsx("span",{className:"font-medium text-foreground",children:o?"Upload Files":"Upload File"})]}),e.jsx("input",{ref:n,type:"file",accept:t,multiple:o,onChange:i=>c(i.target.files),className:"hidden",disabled:a})]})},ut=({onRecordingComplete:r,label:t="Record Audio",maxDuration:o=300,disabled:s,className:a})=>{const[l,n]=S.useState(!1),[c,i]=S.useState(!1),[d,g]=S.useState(0),[h,b]=S.useState(null),k=S.useRef(null),y=S.useRef([]),w=S.useRef(null),R=async()=>{try{const j=await navigator.mediaDevices.getUserMedia({audio:!0}),E=new MediaRecorder(j);k.current=E,y.current=[],E.ondataavailable=f=>{f.data.size>0&&y.current.push(f.data)},E.onstop=()=>{const f=new Blob(y.current,{type:"audio/webm"}),C=URL.createObjectURL(f);b(C),r(f),j.getTracks().forEach(A=>A.stop())},E.start(),n(!0),g(0),w.current=setInterval(()=>{g(f=>f>=o?(z(),f):f+1)},1e3)}catch(j){console.error("Error accessing microphone:",j)}},D=()=>{k.current?.state==="recording"&&(k.current.pause(),i(!0),w.current&&clearInterval(w.current))},P=()=>{k.current?.state==="paused"&&(k.current.resume(),i(!1),w.current=setInterval(()=>{g(j=>Math.min(j+1,o))},1e3))},z=()=>{k.current&&(k.current.stop(),n(!1),i(!1),w.current&&(clearInterval(w.current),w.current=null))},L=()=>{b(null),g(0)},O=j=>{const E=Math.floor(j/60),f=j%60;return`${E.toString().padStart(2,"0")}:${f.toString().padStart(2,"0")}`};return e.jsxs("div",{className:m("w-full",a),children:[t&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:t}),e.jsxs("div",{className:"p-4 md:p-6 bg-background rounded-lg border-2 border-border space-y-4",children:[!h&&e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(x.motion.button,{type:"button",whileTap:{scale:s?1:.95},onClick:l?c?P:D:R,disabled:s,className:m("w-16 h-16 md:w-20 md:h-20 rounded-full flex items-center justify-center","transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed",l?"bg-warning text-white animate-pulse":"bg-primary text-white hover:bg-primary-dark"),children:l?c?e.jsx(v.Play,{className:"w-6 h-6 md:w-8 md:h-8"}):e.jsx(v.Pause,{className:"w-6 h-6 md:w-8 md:h-8"}):e.jsx(v.Mic,{className:"w-6 h-6 md:w-8 md:h-8"})}),l&&!c&&e.jsx(x.motion.div,{className:"absolute top-0 right-0 w-4 h-4 bg-error rounded-full border-2 border-white",animate:{scale:[1,1.2,1]},transition:{repeat:1/0,duration:1.5}})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xl md:text-2xl font-mono font-semibold text-foreground",children:O(d)}),e.jsx("p",{className:"text-xs md:text-sm text-primary/70 mt-1",children:l?c?"Paused":"Recording...":"Tap to record"})]}),l&&e.jsxs(x.motion.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},type:"button",onClick:z,className:"px-4 py-2 text-sm bg-error text-white rounded-full font-medium hover:bg-red-600 flex items-center gap-2",children:[e.jsx(v.Square,{className:"w-4 h-4"}),"Stop"]})]}),h&&e.jsxs(x.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"space-y-3",children:[e.jsx("audio",{src:h,controls:!0,className:"w-full"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-primary/70",children:["Duration: ",O(d)]}),e.jsxs("button",{type:"button",onClick:L,className:"flex items-center gap-2 px-3 py-1.5 text-sm text-error hover:bg-red-50 rounded-lg transition-colors",children:[e.jsx(v.Trash2,{className:"w-4 h-4"}),"Delete"]})]})]})]})]})},pt=({items:r,onRemove:t,onView:o,columns:s=3,className:a})=>{const l={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},n=i=>{if(!i)return"";const d=i/1024;return d<1024?`${d.toFixed(1)} KB`:`${(d/1024).toFixed(1)} MB`},c=i=>{switch(i){case"document":return e.jsx(v.FileText,{className:"w-8 h-8 text-primary"});case"audio":return e.jsx(v.FileText,{className:"w-8 h-8 text-primary"});default:return e.jsx(v.Image,{className:"w-8 h-8 text-primary"})}};return r.length===0?null:e.jsx("div",{className:m("w-full",a),children:e.jsx("div",{className:m("grid gap-3",l[s]),children:r.map(i=>e.jsxs(x.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"relative group",children:[e.jsx("div",{onClick:()=>o?.(i),className:m("aspect-square rounded-lg overflow-hidden border-2 border-border","flex items-center justify-center","cursor-pointer hover:border-border-dark transition-all",i.type==="image"?"bg-border":"bg-secondary"),children:i.type==="image"?e.jsx("img",{src:i.url,alt:i.name,className:"w-full h-full object-cover"}):e.jsxs("div",{className:"flex flex-col items-center gap-2 p-3",children:[c(i.type),e.jsx("p",{className:"text-xs text-center text-primary line-clamp-2",children:i.name})]})}),t&&e.jsx(x.motion.button,{initial:{opacity:0},whileHover:{opacity:1},className:"absolute -top-2 -right-2 p-1.5 bg-error text-white rounded-full shadow-lg hover:bg-red-600 opacity-0 group-hover:opacity-100 transition-opacity",onClick:d=>{d.stopPropagation(),t(i.id)},children:e.jsx(v.X,{className:"w-4 h-4"})}),i.size&&e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1.5 backdrop-blur-sm",children:[e.jsx("p",{className:"truncate",children:i.name}),e.jsx("p",{className:"text-white/70",children:n(i.size)})]})]},i.id))})})},xt=({text:r="Built by StackLoop",showHeart:t=!0,href:o,position:s="fixed",backgroundColor:a="bg-gray-900",textColor:l="text-gray-400",className:n=""})=>{const c=t?e.jsxs(e.Fragment,{children:["Built with ",e.jsx("span",{className:"text-red-500 mx-1",children:"❤️"})," by ",r.replace(/^Built by /,"")]}):r,i=o?e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:`${l} hover:text-white transition-colors duration-200 text-sm`,children:c}):e.jsx("span",{className:`${l} text-sm`,children:c});return e.jsx("div",{className:`${s} bottom-0 left-0 right-0 ${a} ${n}`,style:{zIndex:40},children:e.jsx("div",{className:"flex items-center justify-center py-2 px-4",children:i})})};exports.AudioRecorder=ut;exports.Badge=et;exports.BottomSheet=Hr;exports.Button=ie;exports.CameraCapture=dt;exports.Card=Gr;exports.CardContent=_r;exports.CardDescription=Wr;exports.CardHeader=Ur;exports.CardTitle=$r;exports.Checkbox=Be;exports.CreditBar=xt;exports.DatePicker=Br;exports.Drawer=Vr;exports.Dropdown=Lr;exports.DualSlider=Fr;exports.FAB=Qr;exports.FileUploader=mt;exports.FloatingActionButton=$e;exports.Input=Fe;exports.Modal=Xr;exports.ModalContent=Yr;exports.ModalFooter=qr;exports.OfflineBadge=rt;exports.Pagination=Kr;exports.RadioPills=Er;exports.Select=Ue;exports.Slider=Or;exports.Spinner=We;exports.StepProgress=Zr;exports.SyncIndicator=tt;exports.Table=Jr;exports.Textarea=Le;exports.ThumbnailGrid=pt;exports.ToastProvider=Ve;exports.Toggle=Ge;exports.cn=m;exports.useToast=at;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react"),x=require("framer-motion"),N=require("lucide-react");function ke(r){var t,o,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(o=ke(r[t]))&&(s&&(s+=" "),s+=o)}else for(o in r)r[o]&&(s&&(s+=" "),s+=o);return s}function Ye(){for(var r,t,o=0,s="",a=arguments.length;o<a;o++)(r=arguments[o])&&(t=ke(r))&&(s&&(s+=" "),s+=t);return s}const qe=(r,t)=>{const o=new Array(r.length+t.length);for(let s=0;s<r.length;s++)o[s]=r[s];for(let s=0;s<t.length;s++)o[r.length+s]=t[s];return o},Xe=(r,t)=>({classGroupId:r,validator:t}),Ce=(r=new Map,t=null,o)=>({nextPart:r,validators:t,classGroupId:o}),ne="-",ye=[],He="arbitrary..",Je=r=>{const t=Ke(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:n=>{if(n.startsWith("[")&&n.endsWith("]"))return Qe(n);const c=n.split(ne),i=c[0]===""&&c.length>1?1:0;return Se(c,i,t)},getConflictingClassGroupIds:(n,c)=>{if(c){const i=s[n],d=o[n];return i?d?qe(d,i):i:d||ye}return o[n]||ye}}},Se=(r,t,o)=>{if(r.length-t===0)return o.classGroupId;const a=r[t],l=o.nextPart.get(a);if(l){const d=Se(r,t+1,l);if(d)return d}const n=o.validators;if(n===null)return;const c=t===0?r.join(ne):r.slice(t).join(ne),i=n.length;for(let d=0;d<i;d++){const g=n[d];if(g.validator(c))return g.classGroupId}},Qe=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),o=t.indexOf(":"),s=t.slice(0,o);return s?He+s:void 0})(),Ke=r=>{const{theme:t,classGroups:o}=r;return Ze(o,t)},Ze=(r,t)=>{const o=Ce();for(const s in r){const a=r[s];pe(a,o,s,t)}return o},pe=(r,t,o,s)=>{const a=r.length;for(let l=0;l<a;l++){const n=r[l];er(n,t,o,s)}},er=(r,t,o,s)=>{if(typeof r=="string"){rr(r,t,o);return}if(typeof r=="function"){tr(r,t,o,s);return}sr(r,t,o,s)},rr=(r,t,o)=>{const s=r===""?t:Te(t,r);s.classGroupId=o},tr=(r,t,o,s)=>{if(or(r)){pe(r(s),t,o,s);return}t.validators===null&&(t.validators=[]),t.validators.push(Xe(o,r))},sr=(r,t,o,s)=>{const a=Object.entries(r),l=a.length;for(let n=0;n<l;n++){const[c,i]=a[n];pe(i,Te(t,c),o,s)}},Te=(r,t)=>{let o=r;const s=t.split(ne),a=s.length;for(let l=0;l<a;l++){const n=s[l];let c=o.nextPart.get(n);c||(c=Ce(),o.nextPart.set(n,c)),o=c}return o},or=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,ar=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),s=Object.create(null);const a=(l,n)=>{o[l]=n,t++,t>r&&(t=0,s=o,o=Object.create(null))};return{get(l){let n=o[l];if(n!==void 0)return n;if((n=s[l])!==void 0)return a(l,n),n},set(l,n){l in o?o[l]=n:a(l,n)}}},ue="!",we=":",nr=[],ve=(r,t,o,s,a)=>({modifiers:r,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:s,isExternal:a}),ir=r=>{const{prefix:t,experimentalParseClassName:o}=r;let s=a=>{const l=[];let n=0,c=0,i=0,d;const g=a.length;for(let w=0;w<g;w++){const R=a[w];if(n===0&&c===0){if(R===we){l.push(a.slice(i,w)),i=w+1;continue}if(R==="/"){d=w;continue}}R==="["?n++:R==="]"?n--:R==="("?c++:R===")"&&c--}const h=l.length===0?a:a.slice(i);let b=h,j=!1;h.endsWith(ue)?(b=h.slice(0,-1),j=!0):h.startsWith(ue)&&(b=h.slice(1),j=!0);const y=d&&d>i?d-i:void 0;return ve(l,j,b,y)};if(t){const a=t+we,l=s;s=n=>n.startsWith(a)?l(n.slice(a.length)):ve(nr,!1,n,void 0,!0)}if(o){const a=s;s=l=>o({className:l,parseClassName:a})}return s},lr=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((o,s)=>{t.set(o,1e6+s)}),o=>{const s=[];let a=[];for(let l=0;l<o.length;l++){const n=o[l],c=n[0]==="[",i=t.has(n);c||i?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(n)):a.push(n)}return a.length>0&&(a.sort(),s.push(...a)),s}},cr=r=>({cache:ar(r.cacheSize),parseClassName:ir(r),sortModifiers:lr(r),...Je(r)}),dr=/\s+/,mr=(r,t)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:l}=t,n=[],c=r.trim().split(dr);let i="";for(let d=c.length-1;d>=0;d-=1){const g=c[d],{isExternal:h,modifiers:b,hasImportantModifier:j,baseClassName:y,maybePostfixModifierPosition:w}=o(g);if(h){i=g+(i.length>0?" "+i:i);continue}let R=!!w,I=s(R?y.substring(0,w):y);if(!I){if(!R){i=g+(i.length>0?" "+i:i);continue}if(I=s(y),!I){i=g+(i.length>0?" "+i:i);continue}R=!1}const z=b.length===0?"":b.length===1?b[0]:l(b).join(":"),E=j?z+ue:z,B=E+I;if(n.indexOf(B)>-1)continue;n.push(B);const T=a(I,R);for(let M=0;M<T.length;++M){const F=T[M];n.push(E+F)}i=g+(i.length>0?" "+i:i)}return i},ur=(...r)=>{let t=0,o,s,a="";for(;t<r.length;)(o=r[t++])&&(s=ze(o))&&(a&&(a+=" "),a+=s);return a},ze=r=>{if(typeof r=="string")return r;let t,o="";for(let s=0;s<r.length;s++)r[s]&&(t=ze(r[s]))&&(o&&(o+=" "),o+=t);return o},pr=(r,...t)=>{let o,s,a,l;const n=i=>{const d=t.reduce((g,h)=>h(g),r());return o=cr(d),s=o.cache.get,a=o.cache.set,l=c,c(i)},c=i=>{const d=s(i);if(d)return d;const g=mr(i,o);return a(i,g),g};return l=n,(...i)=>l(ur(...i))},xr=[],A=r=>{const t=o=>o[r]||xr;return t.isThemeGetter=!0,t},Re=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Me=/^\((?:(\w[\w-]*):)?(.+)\)$/i,br=/^\d+\/\d+$/,fr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,H=r=>br.test(r),S=r=>!!r&&!Number.isNaN(Number(r)),q=r=>!!r&&Number.isInteger(Number(r)),de=r=>r.endsWith("%")&&S(r.slice(0,-1)),V=r=>fr.test(r),vr=()=>!0,jr=r=>hr.test(r)&&!gr.test(r),Ae=()=>!1,Nr=r=>yr.test(r),kr=r=>wr.test(r),Cr=r=>!u(r)&&!p(r),Sr=r=>J(r,Pe,Ae),u=r=>Re.test(r),X=r=>J(r,Ee,jr),me=r=>J(r,Ar,S),je=r=>J(r,Ie,Ae),Tr=r=>J(r,De,kr),oe=r=>J(r,Oe,Nr),p=r=>Me.test(r),Z=r=>Q(r,Ee),zr=r=>Q(r,Ir),Ne=r=>Q(r,Ie),Rr=r=>Q(r,Pe),Mr=r=>Q(r,De),ae=r=>Q(r,Oe,!0),J=(r,t,o)=>{const s=Re.exec(r);return s?s[1]?t(s[1]):o(s[2]):!1},Q=(r,t,o=!1)=>{const s=Me.exec(r);return s?s[1]?t(s[1]):o:!1},Ie=r=>r==="position"||r==="percentage",De=r=>r==="image"||r==="url",Pe=r=>r==="length"||r==="size"||r==="bg-size",Ee=r=>r==="length",Ar=r=>r==="number",Ir=r=>r==="family-name",Oe=r=>r==="shadow",Dr=()=>{const r=A("color"),t=A("font"),o=A("text"),s=A("font-weight"),a=A("tracking"),l=A("leading"),n=A("breakpoint"),c=A("container"),i=A("spacing"),d=A("radius"),g=A("shadow"),h=A("inset-shadow"),b=A("text-shadow"),j=A("drop-shadow"),y=A("blur"),w=A("perspective"),R=A("aspect"),I=A("ease"),z=A("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...B(),p,u],M=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],f=()=>[p,u,i],k=()=>[H,"full","auto",...f()],D=()=>[q,"none","subgrid",p,u],$=()=>["auto",{span:["full",q,p,u]},q,p,u],W=()=>[q,"auto",p,u],_=()=>["auto","min","max","fr",p,u],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...f()],L=()=>[H,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],v=()=>[r,p,u],xe=()=>[...B(),Ne,je,{position:[p,u]}],be=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",Rr,Sr,{size:[p,u]}],le=()=>[de,Z,X],O=()=>["","none","full",d,p,u],U=()=>["",S,Z,X],ee=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>[S,de,Ne,je],ge=()=>["","none",y,p,u],re=()=>["none",S,p,u],te=()=>["none",S,p,u],ce=()=>[S,p,u],se=()=>[H,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[vr],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Cr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",S],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",H,u,p,R]}],container:["container"],columns:[{columns:[S,u,p,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",p,u]}],basis:[{basis:[H,"full","auto",c,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[S,H,"auto","initial","none",u]}],grow:[{grow:["",S,p,u]}],shrink:[{shrink:["",S,p,u]}],order:[{order:[q,"first","last","none",p,u]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[c,"screen",...L()]}],"min-w":[{"min-w":[c,"screen","none",...L()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[n]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",o,Z,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,p,me]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",de,u]}],"font-family":[{font:[zr,u,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,p,u]}],"line-clamp":[{"line-clamp":[S,"none",p,me]}],leading:[{leading:[l,...f()]}],"list-image":[{"list-image":["none",p,u]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",p,u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:v()}],"text-color":[{text:v()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[S,"from-font","auto",p,X]}],"text-decoration-color":[{decoration:v()}],"underline-offset":[{"underline-offset":[S,"auto",p,u]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",p,u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p,u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:xe()}],"bg-repeat":[{bg:be()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,p,u],radial:["",p,u],conic:[q,p,u]},Mr,Tr]}],"bg-color":[{bg:v()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:v()}],"gradient-via":[{via:v()}],"gradient-to":[{to:v()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:v()}],"border-color-x":[{"border-x":v()}],"border-color-y":[{"border-y":v()}],"border-color-s":[{"border-s":v()}],"border-color-e":[{"border-e":v()}],"border-color-t":[{"border-t":v()}],"border-color-r":[{"border-r":v()}],"border-color-b":[{"border-b":v()}],"border-color-l":[{"border-l":v()}],"divide-color":[{divide:v()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[S,p,u]}],"outline-w":[{outline:["",S,Z,X]}],"outline-color":[{outline:v()}],shadow:[{shadow:["","none",g,ae,oe]}],"shadow-color":[{shadow:v()}],"inset-shadow":[{"inset-shadow":["none",h,ae,oe]}],"inset-shadow-color":[{"inset-shadow":v()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:v()}],"ring-offset-w":[{"ring-offset":[S,X]}],"ring-offset-color":[{"ring-offset":v()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":v()}],"text-shadow":[{"text-shadow":["none",b,ae,oe]}],"text-shadow-color":[{"text-shadow":v()}],opacity:[{opacity:[S,p,u]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[S]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":v()}],"mask-image-linear-to-color":[{"mask-linear-to":v()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":v()}],"mask-image-t-to-color":[{"mask-t-to":v()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":v()}],"mask-image-r-to-color":[{"mask-r-to":v()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":v()}],"mask-image-b-to-color":[{"mask-b-to":v()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":v()}],"mask-image-l-to-color":[{"mask-l-to":v()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":v()}],"mask-image-x-to-color":[{"mask-x-to":v()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":v()}],"mask-image-y-to-color":[{"mask-y-to":v()}],"mask-image-radial":[{"mask-radial":[p,u]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":v()}],"mask-image-radial-to-color":[{"mask-radial-to":v()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[S]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":v()}],"mask-image-conic-to-color":[{"mask-conic-to":v()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:xe()}],"mask-repeat":[{mask:be()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",p,u]}],filter:[{filter:["","none",p,u]}],blur:[{blur:ge()}],brightness:[{brightness:[S,p,u]}],contrast:[{contrast:[S,p,u]}],"drop-shadow":[{"drop-shadow":["","none",j,ae,oe]}],"drop-shadow-color":[{"drop-shadow":v()}],grayscale:[{grayscale:["",S,p,u]}],"hue-rotate":[{"hue-rotate":[S,p,u]}],invert:[{invert:["",S,p,u]}],saturate:[{saturate:[S,p,u]}],sepia:[{sepia:["",S,p,u]}],"backdrop-filter":[{"backdrop-filter":["","none",p,u]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[S,p,u]}],"backdrop-contrast":[{"backdrop-contrast":[S,p,u]}],"backdrop-grayscale":[{"backdrop-grayscale":["",S,p,u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[S,p,u]}],"backdrop-invert":[{"backdrop-invert":["",S,p,u]}],"backdrop-opacity":[{"backdrop-opacity":[S,p,u]}],"backdrop-saturate":[{"backdrop-saturate":[S,p,u]}],"backdrop-sepia":[{"backdrop-sepia":["",S,p,u]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",p,u]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[S,"initial",p,u]}],ease:[{ease:["linear","initial",I,p,u]}],delay:[{delay:[S,p,u]}],animate:[{animate:["none",z,p,u]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,p,u]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:re()}],"rotate-x":[{"rotate-x":re()}],"rotate-y":[{"rotate-y":re()}],"rotate-z":[{"rotate-z":re()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[p,u,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:se()}],"translate-x":[{"translate-x":se()}],"translate-y":[{"translate-y":se()}],"translate-z":[{"translate-z":se()}],"translate-none":["translate-none"],accent:[{accent:v()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:v()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p,u]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p,u]}],fill:[{fill:["none",...v()]}],"stroke-w":[{stroke:[S,Z,X,me]}],stroke:[{stroke:["none",...v()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pr=pr(Dr);function m(...r){return Pr(Ye(r))}const ie=C.forwardRef(({variant:r="primary",size:t="md",loading:o,icon:s,className:a,children:l,disabled:n,...c},i)=>{const d="inline-flex items-center justify-center gap-2 font-medium rounded-md transition-all duration-200 touch-target disabled:opacity-50 disabled:cursor-not-allowed active:scale-[0.98] flex-shrink-0 whitespace-nowrap",g={primary:"bg-primary text-white hover:bg-primary-dark active:bg-primary-dark/90 shadow-sm",secondary:"bg-secondary text-foreground hover:bg-border active:bg-border-dark",outline:"bg-transparent text-primary border-2 border-primary hover:bg-secondary active:bg-border",ghost:"bg-transparent text-primary hover:bg-secondary active:bg-border",danger:"bg-error text-white hover:bg-red-600 active:bg-red-700 shadow-sm"},h={sm:"px-3 py-2 text-sm min-h-[2.25rem]",md:"px-4 py-2.5 text-base min-h-[2.75rem]",lg:"px-6 py-3.5 text-lg min-h-[3.25rem]"};return e.jsxs(x.motion.button,{ref:i,whileTap:{scale:n||o?1:.98},className:m(d,g[r],h[t],a),disabled:n||o,...c,children:[o?e.jsx(N.Loader2,{className:"h-5 w-5 animate-spin"}):s?e.jsx("span",{className:"flex-shrink-0",children:s}):null,l]})});ie.displayName="Button";const Fe=C.forwardRef(({label:r,error:t,hint:o,leftIcon:s,rightIcon:a,className:l,type:n,...c},i)=>{const[d,g]=C.useState(!1),h=n==="password",b=h&&d?"text":n;return e.jsxs("div",{className:"w-full space-y-1.5",children:[r&&e.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[r,c.required&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsxs("div",{className:"relative",children:[s&&e.jsx("div",{className:"absolute flex items-center pointer-events-none text-primary",style:{left:"14px",top:"50%",transform:"translateY(-50%)"},children:s}),e.jsx("input",{ref:i,type:b,className:m("w-full rounded-md border transition-all duration-200","bg-background text-foreground placeholder:text-foreground/50","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:cursor-not-allowed","touch-target text-base",t&&"border-error focus:ring-error",!t&&"border-border",l),style:{paddingTop:"12px",paddingBottom:"12px",paddingLeft:s?"44px":"16px",paddingRight:a||h?"44px":"16px"},...c}),h&&e.jsx(x.motion.button,{type:"button",onClick:()=>g(!d),className:"absolute text-primary hover:text-primary-dark transition-colors",style:{right:"14px",top:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-label":d?"Hide password":"Show password",whileTap:{scale:.9,y:"-50%"},animate:{y:"-50%"},transition:{duration:.1},children:d?e.jsx(N.EyeOff,{className:"w-5 h-5"}):e.jsx(N.Eye,{className:"w-5 h-5"})}),a&&!h&&e.jsx("div",{className:"absolute flex items-center pointer-events-none text-primary",style:{right:"14px",top:"50%",transform:"translateY(-50%)"},children:a})]}),t&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-error",children:t}),o&&!t&&e.jsx("p",{className:"text-sm text-primary/70",children:o})]})});Fe.displayName="Input";const Le=C.forwardRef(({label:r,error:t,helperText:o,className:s,required:a,...l},n)=>e.jsxs(x.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},className:"w-full",children:[r&&e.jsxs("label",{className:"block text-sm font-medium text-foreground mb-1.5",children:[r,a&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsx("textarea",{ref:n,className:m("w-full px-4 py-3 bg-background border border-border rounded-md","text-foreground placeholder:text-foreground/50","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200 resize-vertical","text-base touch-target",t&&"border-error focus:ring-error",s),...l}),t&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1 text-sm text-error",children:t}),o&&!t&&e.jsx("p",{className:"mt-1 text-sm text-primary/70",children:o})]}));Le.displayName="Textarea";const Be=C.forwardRef(({label:r,description:t,className:o,checked:s,defaultChecked:a,onChange:l,...n},c)=>{const[i,d]=C.useState(a||!1),g=s!==void 0?s:i,h=b=>{s===void 0&&d(b.target.checked),l?.(b.target.checked)};return e.jsxs("label",{className:"flex items-start gap-3 cursor-pointer group",children:[e.jsxs("div",{className:"relative flex-shrink-0 mt-0.5",children:[e.jsx("input",{ref:c,type:"checkbox",className:"sr-only peer",checked:g,onChange:h,...n}),e.jsx(x.motion.div,{className:m("w-6 h-6 rounded-md border-2 transition-all duration-200","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed","flex items-center justify-center",g?"bg-primary border-primary":"border-border bg-secondary",o),whileTap:{scale:.95},children:e.jsx(N.Check,{className:m("w-4 h-4 text-white transition-opacity duration-200",g?"opacity-100":"opacity-0")})})]}),(r||t)&&e.jsxs("div",{className:"flex-1 space-y-0.5",children:[r&&e.jsx("div",{className:"text-base font-medium text-foreground group-hover:text-primary transition-colors",children:r}),t&&e.jsx("div",{className:"text-sm text-primary/70",children:t})]})]})});Be.displayName="Checkbox";const Er=({options:r,value:t,onChange:o,name:s,disabled:a,className:l})=>e.jsx("div",{className:m("flex flex-wrap gap-2",l),children:r.map(n=>{const c=t===n.value;return e.jsxs("label",{className:"relative cursor-pointer",children:[e.jsx("input",{type:"radio",name:s,value:n.value,checked:c,onChange:i=>o?.(i.target.value),disabled:a,className:"sr-only peer"}),e.jsxs(x.motion.div,{whileTap:{scale:a?1:.95},className:m("px-4 py-2.5 rounded-full border-2 transition-all duration-200","flex items-center gap-2 min-h-[2.75rem]","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",c?"bg-primary border-primary text-white":"bg-background border-border text-primary hover:border-border-dark"),children:[n.icon&&e.jsx("span",{className:"flex-shrink-0",children:n.icon}),e.jsx("span",{className:"font-medium text-base",children:n.label})]})]},n.value)})}),Ge=C.forwardRef(({label:r,description:t,className:o,checked:s,onChange:a,...l},n)=>{const c=i=>{a?.(i.target.checked)};return e.jsxs("label",{className:"flex items-center justify-between gap-4 cursor-pointer group",children:[(r||t)&&e.jsxs("div",{className:"flex-1 space-y-0.5",children:[r&&e.jsx("div",{className:"text-base font-medium text-foreground",children:r}),t&&e.jsx("div",{className:"text-sm text-primary/70",children:t})]}),e.jsxs("div",{className:"relative flex-shrink-0",children:[e.jsx("input",{ref:n,type:"checkbox",onChange:c,className:"sr-only peer",checked:s,...l}),e.jsx("div",{className:m("w-12 h-7 rounded-full transition-all duration-200 relative","peer-focus:ring-2 peer-focus:ring-primary peer-focus:ring-offset-2","peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",s?"bg-primary":"bg-border-dark",o),children:e.jsx(x.motion.div,{className:"absolute top-1 w-5 h-5 bg-white rounded-full shadow-sm",animate:{left:s?"24px":"4px"},transition:{type:"spring",stiffness:500,damping:30}})})]})]})});Ge.displayName="Toggle";const Or=({value:r,onChange:t,min:o=0,max:s=100,step:a=1,label:l,showValue:n=!0,unit:c="%",disabled:i,className:d})=>{const[g,h]=C.useState(!1),b=(r-o)/(s-o)*100;return e.jsxs("div",{className:m("w-full space-y-2",d),children:[(l||n)&&e.jsxs("div",{className:"flex items-center justify-between",children:[l&&e.jsx("label",{className:"text-sm font-medium text-primary",children:l}),n&&e.jsxs("span",{className:"text-sm font-semibold text-primary",children:[r,c]})]}),e.jsxs("div",{className:"relative h-12 flex items-center",children:[e.jsx("div",{className:"relative w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"absolute left-0 top-0 h-full bg-primary rounded-full",style:{width:`${b}%`},initial:!1,animate:{width:`${b}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:o,max:s,step:a,value:r,onChange:j=>t(Number(j.target.value)),onMouseDown:()=>h(!0),onMouseUp:()=>h(!1),onTouchStart:()=>h(!0),onTouchEnd:()=>h(!1),disabled:i,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed",style:{zIndex:10}}),e.jsx(x.motion.div,{className:m("absolute w-6 h-6 bg-background border-2 border-primary rounded-full shadow-md","pointer-events-none",i&&"opacity-50"),style:{left:`calc(${b}% - 12px)`},animate:{scale:g?1.2:1},transition:{type:"spring",stiffness:300,damping:20}})]})]})},Fr=({value1:r,value2:t,onChange:o,label1:s,label2:a,min:l=0,max:n=100,step:c=1,unit:i="%",disabled:d,className:g})=>{const h=r+t,b=h>0?r/h*100:50,j=h>0?t/h*100:50,y=w=>{const R=n-w;o(w,Math.max(l,Math.min(n,R)))};return e.jsxs("div",{className:m("w-full space-y-3",g),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:s}),e.jsxs("span",{className:"text-sm font-semibold text-primary",children:[r,i]})]}),e.jsxs("div",{className:"relative h-10 flex items-center",children:[e.jsx("div",{className:"w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"h-full bg-primary",initial:!1,animate:{width:`${b}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:l,max:n,step:c,value:r,onChange:w=>y(Number(w.target.value)),disabled:d,className:"absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("label",{className:"text-sm font-medium text-primary",children:a}),e.jsxs("span",{className:"text-sm font-semibold text-success",children:[t,i]})]}),e.jsxs("div",{className:"relative h-10 flex items-center",children:[e.jsx("div",{className:"w-full h-2 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{className:"h-full bg-success",initial:!1,animate:{width:`${j}%`},transition:{type:"spring",stiffness:300,damping:30}})}),e.jsx("input",{type:"range",min:l,max:n,step:c,value:t,onChange:w=>y(n-Number(w.target.value)),disabled:d,className:"absolute inset-0 w-full opacity-0 cursor-pointer disabled:cursor-not-allowed"})]})]}),e.jsxs("div",{className:"text-xs text-primary/70 text-center",children:["Total: ",h,i]})]})},Lr=({options:r,value:t,onChange:o,placeholder:s="Select an option",label:a,error:l,searchable:n=!1,clearable:c=!0,disabled:i,className:d})=>{const[g,h]=C.useState(!1),[b,j]=C.useState(""),y=C.useRef(null),w=r.find(z=>z.value===t),R=n?r.filter(z=>z.label.toLowerCase().includes(b.toLowerCase())):r;C.useEffect(()=>{const z=E=>{y.current&&!y.current.contains(E.target)&&(h(!1),j(""))};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[]);const I=z=>{o(z),h(!1),j("")};return e.jsxs("div",{ref:y,className:m("relative w-full",d),children:[a&&e.jsx("label",{className:"block mb-1.5 text-sm font-medium text-foreground",children:a}),e.jsxs("button",{type:"button",onClick:()=>!i&&h(!g),disabled:i,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary","disabled:bg-secondary disabled:cursor-not-allowed","touch-target",l&&"border-error",!l&&"border-border",g&&"ring-2 ring-primary"),children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[w?.icon&&e.jsx("span",{className:"flex-shrink-0",children:w.icon}),e.jsx("span",{className:m("truncate",!w&&"text-foreground/50"),children:w?.label||s})]}),e.jsx(N.ChevronDown,{className:m("w-5 h-5 text-primary transition-transform flex-shrink-0",g&&"rotate-180")})]}),e.jsx(x.AnimatePresence,{children:g&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",children:[n&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx(N.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50"}),e.jsx("input",{type:"text",placeholder:"Search...",value:b,onChange:z=>j(z.target.value),className:"w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-primary"}),b&&e.jsx("button",{onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsx(N.X,{className:"w-4 h-4 text-primary/50 hover:text-primary"})})]})}),e.jsxs("div",{className:"overflow-y-auto max-h-64 p-2",children:[c&&e.jsx("button",{type:"button",onClick:()=>I(""),className:m("w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer","hover:bg-secondary transition-colors","text-foreground/70 italic",!t&&"bg-border text-foreground"),children:e.jsx("span",{children:"None"})}),R.length>0?R.map(z=>e.jsxs("button",{onClick:()=>I(z.value),className:m("w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer","hover:bg-secondary transition-colors",z.value===t&&"bg-border text-foreground"),children:[z.icon&&e.jsx("span",{className:"flex-shrink-0",children:z.icon}),e.jsx("span",{children:z.label})]},z.value)):e.jsx("div",{className:"px-4 py-6 text-center text-primary/70 text-sm",children:"No options found"})]})]})}),l&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1.5 text-sm text-error",children:l})]})},Ue=C.forwardRef(({options:r,value:t,onChange:o,placeholder:s="Select an option",label:a,error:l,hint:n,searchable:c=!1,clearable:i=!0,disabled:d,required:g,className:h},b)=>{const[j,y]=C.useState(!1),[w,R]=C.useState(""),I=C.useRef(null),z=r.find(T=>T.value===t),E=c?r.filter(T=>T.label.toLowerCase().includes(w.toLowerCase())):r;C.useEffect(()=>{const T=M=>{I.current&&!I.current.contains(M.target)&&(y(!1),R(""))};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const B=T=>{o(T),y(!1),R("")};return e.jsxs("div",{ref:b,className:m("w-full space-y-1.5",h),children:[a&&e.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[a,g&&e.jsx("span",{className:"text-error ml-1",children:"*"})]}),e.jsxs("div",{ref:I,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>!d&&y(!j),disabled:d,"aria-haspopup":"listbox","aria-expanded":j,"aria-required":g,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","disabled:bg-secondary disabled:cursor-not-allowed","touch-target text-base",l&&"border-error focus:ring-error",!l&&"border-border",j&&"ring-2 ring-primary"),children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[z?.icon&&e.jsx("span",{className:"flex-shrink-0",children:z.icon}),e.jsx("span",{className:m("truncate",!z&&"text-foreground/50"),children:z?.label||s})]}),e.jsx(N.ChevronDown,{className:m("w-5 h-5 text-primary transition-transform flex-shrink-0",j&&"rotate-180")})]}),e.jsx(x.AnimatePresence,{children:j&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},role:"listbox",className:"absolute z-50 w-full mt-2 bg-background rounded-md border border-border shadow-lg max-h-80 overflow-hidden",children:[c&&e.jsx("div",{className:"p-2 border-b border-border",children:e.jsxs("div",{className:"relative",children:[e.jsx(N.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-primary/50"}),e.jsx("input",{type:"text",placeholder:"Search...",value:w,onChange:T=>R(T.target.value),className:"w-full pl-10 pr-8 py-2 text-sm border border-border rounded-md bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary","aria-label":"Search options"}),w&&e.jsx("button",{type:"button",onClick:()=>R(""),className:"absolute right-2 top-1/2 -translate-y-1/2","aria-label":"Clear search",children:e.jsx(N.X,{className:"w-4 h-4 text-primary/50 hover:text-primary"})})]})}),e.jsxs("div",{className:"overflow-y-auto max-h-64 p-2",children:[i&&e.jsx("button",{type:"button",role:"option","aria-selected":!t,onClick:()=>B(""),className:m("w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer","hover:bg-secondary transition-colors","text-foreground/70 italic",!t&&"bg-border text-foreground font-medium"),children:e.jsx("span",{children:"None"})}),E.length>0?E.map(T=>e.jsxs("button",{type:"button",role:"option","aria-selected":T.value===t,onClick:()=>!T.disabled&&B(T.value),disabled:T.disabled,className:m("w-full px-4 py-3 text-left flex items-center gap-2 rounded-sm cursor-pointer","hover:bg-secondary transition-colors","disabled:opacity-50 disabled:cursor-not-allowed",T.value===t&&"bg-border text-foreground font-medium"),children:[T.icon&&e.jsx("span",{className:"flex-shrink-0",children:T.icon}),e.jsx("span",{children:T.label})]},T.value)):e.jsx("div",{className:"px-4 py-6 text-center text-primary/70 text-sm",children:"No options found"})]})]})})]}),l&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-sm text-error",children:l}),n&&!l&&e.jsx("p",{className:"text-sm text-primary/70",children:n})]})});Ue.displayName="Select";const Br=({value:r,onChange:t,label:o,placeholder:s="Select date",error:a,disabled:l,minDate:n,maxDate:c,className:i})=>{const[d,g]=C.useState(!1),[h,b]=C.useState(r||new Date),j=C.useRef(null);C.useEffect(()=>{const k=D=>{j.current&&!j.current.contains(D.target)&&g(!1)};return d&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[d]);const y=["January","February","March","April","May","June","July","August","September","October","November","December"],w=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],R=k=>{const D=k.getFullYear(),$=k.getMonth(),W=new Date(D,$,1),K=new Date(D,$+1,0).getDate(),Y=W.getDay(),G=[];for(let L=0;L<Y;L++)G.push(null);for(let L=1;L<=K;L++)G.push(new Date(D,$,L));return G},I=()=>{b(new Date(h.getFullYear(),h.getMonth()-1,1))},z=()=>{b(new Date(h.getFullYear(),h.getMonth()+1,1))},E=k=>{t(k),g(!1)},B=k=>!!(n&&k<n||c&&k>c),T=(k,D)=>!k||!D?!1:k.getDate()===D.getDate()&&k.getMonth()===D.getMonth()&&k.getFullYear()===D.getFullYear(),M=k=>k?T(k,new Date):!1,F=k=>k?k.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):"",f=R(h);return e.jsxs("div",{ref:j,className:m("relative w-full",i),children:[o&&e.jsx("label",{className:"block mb-1.5 text-sm font-medium text-foreground",children:o}),e.jsxs("button",{type:"button",onClick:()=>!l&&g(!d),disabled:l,className:m("w-full px-4 py-3 rounded-md border transition-all duration-200","bg-background text-left flex items-center justify-between gap-2","focus:outline-none focus:ring-2 focus:ring-primary","disabled:bg-secondary disabled:cursor-not-allowed","touch-target",a&&"border-error",!a&&"border-border",d&&"ring-2 ring-primary"),children:[e.jsx("span",{className:m("truncate",!r&&"text-foreground/50"),children:r?F(r):s}),e.jsx(N.Calendar,{className:"w-5 h-5 text-primary flex-shrink-0"})]}),e.jsx(x.AnimatePresence,{children:d&&e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute z-50 w-80 mt-2 bg-background rounded-md border border-border shadow-lg p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("button",{type:"button",onClick:I,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:e.jsx(N.ChevronLeft,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{className:"font-semibold text-foreground",children:[y[h.getMonth()]," ",h.getFullYear()]}),e.jsx("button",{type:"button",onClick:z,className:"p-2 hover:bg-secondary rounded-lg transition-colors",children:e.jsx(N.ChevronRight,{className:"w-5 h-5 text-primary"})})]}),e.jsx("div",{className:"grid grid-cols-7 gap-1 mb-2",children:w.map(k=>e.jsx("div",{className:"text-center text-xs font-medium text-primary/70 py-2",children:k},k))}),e.jsx("div",{className:"grid grid-cols-7 gap-1",children:f.map((k,D)=>{if(!k)return e.jsx("div",{className:"aspect-square"},`empty-${D}`);const $=T(k,r||null),W=M(k),_=B(k);return e.jsx(x.motion.button,{type:"button",whileTap:{scale:_?1:.95},onClick:()=>!_&&E(k),disabled:_,className:m("aspect-square rounded-lg flex items-center justify-center","text-sm font-medium transition-all duration-200","hover:bg-secondary",$&&"bg-primary text-white hover:bg-primary-dark",W&&!$&&"border-2 border-primary text-primary",_&&"text-border-dark cursor-not-allowed hover:bg-transparent",!$&&!W&&!_&&"text-foreground"),children:k.getDate()},k.toISOString())})}),e.jsx("div",{className:"mt-4 pt-4 border-t border-border",children:e.jsx("button",{type:"button",onClick:()=>E(new Date),className:"w-full py-2 text-sm font-medium text-primary hover:bg-secondary rounded-lg transition-colors",children:"Today"})})]})}),a&&e.jsx(x.motion.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-1.5 text-sm text-error",children:a})]})},Gr=({children:r,variant:t="default",padding:o="md",className:s,onClick:a,hover:l=!1})=>{const n={default:"bg-background border border-border",outlined:"bg-transparent border-2 border-border-dark",elevated:"bg-background border-2 border-border shadow-card"},c={none:"p-0",sm:"p-3",md:"p-4 sm:p-6",lg:"p-6 sm:p-8"},i=a?x.motion.button:x.motion.div;return e.jsx(i,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},whileHover:l||a?{y:-2,boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1)"}:void 0,whileTap:a?{scale:.98}:void 0,className:m("rounded-lg transition-all duration-200",n[t],c[o],a&&"cursor-pointer w-full text-left",s),onClick:a,children:r})},Ur=({children:r,className:t})=>e.jsx("div",{className:m("mb-4",t),children:r}),$r=({children:r,className:t})=>e.jsx("h3",{className:m("text-lg font-semibold text-foreground",t),children:r}),Wr=({children:r,className:t})=>e.jsx("p",{className:m("text-sm text-foreground/70 mt-1",t),children:r}),_r=({children:r,className:t})=>e.jsx("div",{className:t,children:r}),Vr=({isOpen:r,onClose:t,children:o,title:s,position:a="right",className:l})=>(C.useEffect(()=>{const n=c=>{c.key==="Escape"&&t()};return r&&(document.addEventListener("keydown",n),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",n),document.body.style.overflow="unset"}},[r,t]),e.jsx(x.AnimatePresence,{children:r&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:t}),e.jsxs(x.motion.div,{initial:{x:a==="left"?"-100%":"100%"},animate:{x:0},exit:{x:a==="left"?"-100%":"100%"},transition:{type:"spring",damping:30,stiffness:300},className:m("fixed top-0 z-50 h-full w-[400px] sm:w-[480px] bg-background shadow-xl",a==="left"?"left-0 border-r":"right-0 border-l","border-border",l),children:[s&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:s}),e.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-secondary transition-colors","aria-label":"Close drawer",children:e.jsx(N.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto h-[calc(100%-5rem)] p-6",children:o})]})]})})),Yr=({isOpen:r,onClose:t,children:o,title:s,size:a="md",className:l})=>{const n=C.useRef(null);C.useEffect(()=>{const i=d=>{d.key==="Escape"&&t()};return r&&(document.addEventListener("keydown",i),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",i),document.body.style.overflow="unset"}},[r,t]);const c={sm:"max-w-lg",md:"max-w-2xl",lg:"max-w-4xl",xl:"max-w-6xl",full:"max-w-full mx-4"};return e.jsx(x.AnimatePresence,{children:r&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4",onClick:i=>{i.target===i.currentTarget&&t()},children:e.jsxs(x.motion.div,{ref:n,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:m("bg-background border border-border rounded-lg shadow-2xl w-full max-h-[90vh] overflow-hidden flex flex-col",c[a],l),children:[s&&e.jsxs("div",{className:"px-6 py-4 border-b border-border flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:s}),e.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-secondary transition-colors","aria-label":"Close modal",children:e.jsx(N.X,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"overflow-y-auto flex-1",children:o})]})})})},qr=({children:r,className:t})=>e.jsx("div",{className:m("px-6 py-4",t),children:r}),Xr=({children:r,className:t})=>e.jsx("div",{className:m("px-6 py-4 border-t border-border flex items-center justify-end gap-3 bg-background sticky bottom-0",t),children:r}),Hr=({isOpen:r,onClose:t,title:o,children:s,showCloseButton:a=!0,className:l})=>(C.useEffect(()=>(r?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[r]),e.jsx(x.AnimatePresence,{children:r&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:"fixed inset-0 bg-black/50 z-40"}),e.jsxs(x.motion.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:m("fixed bottom-0 left-0 right-0 z-50","bg-white rounded-t-3xl shadow-2xl","max-h-[90vh] flex flex-col",l),children:[e.jsx("div",{className:"flex justify-center pt-3 pb-2",children:e.jsx("div",{className:"w-12 h-1.5 bg-border-dark rounded-full"})}),(o||a)&&e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[o&&e.jsx("h2",{className:"text-lg font-semibold text-foreground",children:o}),a&&e.jsx("button",{onClick:t,className:"p-2 rounded-full hover:bg-secondary transition-colors",children:e.jsx(N.X,{className:"w-5 h-5 text-primary"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:s})]})]})}));function Jr({data:r,columns:t,loading:o=!1,onRowClick:s,keyExtractor:a,className:l}){const[n,c]=C.useState(null),[i,d]=C.useState("asc"),g=b=>{n===b?d(i==="asc"?"desc":"asc"):(c(b),d("asc"))},h=n?[...r].sort((b,j)=>{const y=b[n],w=j[n];return y<w?i==="asc"?-1:1:y>w?i==="asc"?1:-1:0}):r;return o?e.jsx("div",{className:m("border border-border rounded-lg overflow-hidden",l),children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b border-border",children:e.jsx("tr",{children:t.map((b,j)=>e.jsx("th",{className:"px-6 py-4 text-left",children:e.jsx("div",{className:"h-4 bg-border rounded w-24 animate-pulse"})},j))})}),e.jsx("tbody",{children:[...Array(5)].map((b,j)=>e.jsx("tr",{className:"border-b border-border",children:t.map((y,w)=>e.jsx("td",{className:"px-6 py-4",children:e.jsx("div",{className:"h-4 bg-secondary rounded animate-pulse"})},w))},j))})]})})}):e.jsx(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:m("border border-border rounded-lg overflow-hidden",l),children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"border-b border-border",children:e.jsx("tr",{children:t.map((b,j)=>e.jsx("th",{className:m("px-6 py-4 text-left text-sm font-semibold text-foreground",b.width,b.sortable&&"cursor-pointer transition-colors"),onClick:()=>b.sortable&&g(b.key),children:e.jsxs("div",{className:"flex items-center gap-2",children:[b.header,b.sortable&&e.jsx("span",{className:"text-primary/50 hover:text-primary transition-colors",children:n===b.key?i==="asc"?e.jsx(N.ArrowUp,{className:"w-4 h-4"}):e.jsx(N.ArrowDown,{className:"w-4 h-4"}):e.jsx(N.ChevronsUpDown,{className:"w-4 h-4"})})]})},j))})}),e.jsx("tbody",{children:h.map((b,j)=>e.jsx(x.motion.tr,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,delay:j*.05},onClick:()=>s&&s(b),className:m("border-b border-border transition-colors",s&&"cursor-pointer hover:bg-secondary"),children:t.map((y,w)=>e.jsx("td",{className:m("px-6 py-4 text-sm text-foreground/70",y.width),style:y.width?{width:y.width}:void 0,title:y.truncate&&!y.render?String(b[y.key]??""):void 0,children:y.truncate&&!y.render?e.jsx("div",{className:"truncate",children:String(b[y.key]??"")}):y.render?y.render(b):String(b[y.key]??"")},w))},a(b)))})]})})})}const Qr=({currentPage:r,totalPages:t,onPageChange:o,totalItems:s,itemsPerPage:a,className:l})=>{const c=Array.from({length:t},(i,d)=>d+1).slice(Math.max(0,r-2),Math.min(t,r+1));return e.jsxs(x.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:m("flex items-center justify-between gap-4 flex-wrap",l),children:[e.jsx("div",{className:"text-sm text-foreground/70",children:s&&a&&e.jsxs("span",{children:["Showing ",Math.min((r-1)*a+1,s)," to"," ",Math.min(r*a,s)," of ",s," results"]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ie,{variant:"secondary",size:"sm",disabled:r===1,onClick:()=>o(r-1),icon:e.jsx(N.ChevronLeft,{className:"w-4 h-4"}),children:"Previous"}),e.jsxs("div",{className:"flex items-center gap-1",children:[r>3&&e.jsxs(e.Fragment,{children:[e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(1),className:"w-10 h-10 rounded-md hover:bg-secondary border border-border text-sm transition-colors",children:"1"}),e.jsx("span",{className:"text-primary/50 px-1",children:"..."})]}),c.map(i=>e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(i),className:m("w-10 h-10 rounded-md text-sm border transition-all",i===r?"bg-primary text-white border-primary shadow-sm":"hover:bg-secondary border-border"),children:i},i)),r<t-2&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-primary/50 px-1",children:"..."}),e.jsx(x.motion.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:()=>o(t),className:"w-10 h-10 rounded-md hover:bg-secondary border border-border text-sm transition-colors",children:t})]})]}),e.jsx(ie,{variant:"secondary",size:"sm",disabled:r===t,onClick:()=>o(r+1),icon:e.jsx(N.ChevronRight,{className:"w-4 h-4"}),children:"Next"})]})]})},$e=({icon:r,onClick:t,label:o,actions:s,variant:a="primary",position:l="bottom-right",disabled:n,className:c})=>{const[i,d]=C.useState(!1),g={"bottom-right":"fixed bottom-6 right-6","bottom-left":"fixed bottom-6 left-6","bottom-center":"fixed bottom-6 left-1/2 -translate-x-1/2"},h={primary:"bg-primary text-white hover:bg-primary-dark shadow-lg",secondary:"bg-background text-primary border-2 border-primary hover:bg-secondary shadow-md"},b={primary:"bg-primary text-white",success:"bg-success text-white",danger:"bg-error text-white",warning:"bg-warning text-white"},j=()=>{s&&s.length>0?d(!i):t&&t()};return e.jsxs("div",{className:m(g[l],"z-50",c),children:[e.jsx(x.AnimatePresence,{children:i&&s&&e.jsx(x.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute bottom-20 right-0 flex flex-col gap-3 mb-2",children:s.map((y,w)=>e.jsxs(x.motion.div,{initial:{opacity:0,y:20,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.8},transition:{delay:w*.05},className:"flex items-center gap-3",children:[e.jsx("span",{className:m("bg-background border border-border rounded-md px-3 py-1.5 text-sm font-medium whitespace-nowrap shadow-lg",y.labelClassName),style:y.labelStyle,children:y.label}),e.jsx(x.motion.button,{whileHover:{scale:1.1},whileTap:{scale:.9},onClick:()=>{y.onClick(),d(!1)},className:m("w-12 h-12 rounded-full shadow-lg flex items-center justify-center transition-all",b[y.variant||"primary"]),children:y.icon})]},w))})}),e.jsxs(x.motion.button,{whileTap:{scale:n?1:.9},whileHover:{scale:n?1:1.05},onClick:j,disabled:n,className:m("z-30 rounded-full p-4 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center gap-2",h[a],o?"px-6":"w-16 h-16 justify-center",i&&"rotate-45"),children:[e.jsx("span",{className:"flex-shrink-0",children:r||(i?e.jsx(N.X,{className:"w-6 h-6"}):e.jsx(N.Plus,{className:"w-6 h-6"}))}),o&&e.jsx("span",{className:"font-medium",children:o})]})]})},Kr=$e,Zr=({steps:r,currentStep:t,className:o})=>{const s=r[t];return e.jsxs("div",{className:m("w-full",o),children:[e.jsx("div",{className:"hidden md:block",children:e.jsx("div",{className:"relative flex items-center mb-2",children:r.map((a,l)=>{const n=l<t,c=l===t,i=l>t;return e.jsxs(C.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center relative z-10",children:[e.jsx(x.motion.div,{initial:!1,animate:{scale:c?1.05:1},className:m("w-12 h-12 rounded-full flex items-center justify-center","font-semibold text-base transition-all duration-300","ring-4 ring-white",(n||c)&&"bg-primary text-white shadow-lg",i&&"bg-border text-muted-foreground"),children:n?e.jsx(N.Check,{className:"w-6 h-6 stroke-[3]"}):e.jsx("span",{children:l+1})}),e.jsxs("div",{className:"mt-3 text-center max-w-[120px]",children:[e.jsx("span",{className:m("text-sm font-semibold block",c&&"text-primary",n&&"text-primary",i&&"text-primary/50"),children:a.label}),a.description&&e.jsx("p",{className:m("text-xs mt-1 leading-tight",c&&"text-primary",n&&"text-primary/70",i&&"text-primary/50"),children:a.description})]})]}),l<r.length-1&&e.jsx("div",{className:"flex-1 relative",style:{marginTop:"-48px",marginLeft:"4px",marginRight:"4px"},children:e.jsx("div",{className:"h-1.5 bg-border rounded-full overflow-hidden",children:e.jsx(x.motion.div,{initial:!1,animate:{width:l<t?"100%":"0%"},transition:{duration:.4,ease:"easeInOut"},className:"h-full bg-primary rounded-full"})})})]},l)})})}),e.jsxs("div",{className:"md:hidden",children:[e.jsx("div",{className:"flex items-center justify-center gap-2 mb-3",children:r.map((a,l)=>{const n=l<t,c=l===t;return e.jsx(x.motion.div,{initial:!1,animate:{scale:c?1.2:1,backgroundColor:n||c?"var(--color-primary)":"var(--color-border-dark)"},className:m("rounded-full transition-all duration-300",c?"w-3 h-3":"w-2 h-2",(n||c)&&"shadow-sm")},l)})}),e.jsx(x.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},className:"text-center",children:e.jsx("p",{className:"text-sm font-semibold text-foreground",children:s?.label})},t)]})]})},et=({children:r,variant:t="default",size:o="md",className:s,dot:a=!1})=>{const l={default:"bg-secondary text-primary border border-border",primary:"bg-primary/10 text-primary border border-primary/20",success:"bg-success/10 text-success border border-success/20",warning:"bg-warning/10 text-warning border border-warning/20",danger:"bg-error/10 text-error border border-error/20",info:"bg-info/10 text-info border border-info/20"},n={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},c={default:"bg-primary",primary:"bg-primary",success:"bg-success",warning:"bg-warning",danger:"bg-error",info:"bg-info"};return e.jsxs(x.motion.span,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:m("inline-flex items-center gap-1.5 rounded-lg font-medium",l[t],n[o],s),children:[a&&e.jsx("span",{className:m("w-1.5 h-1.5 rounded-full",c[t])}),r]})},rt=({isOffline:r,className:t})=>r?e.jsxs(x.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:m("inline-flex items-center gap-2 px-3 py-1.5 rounded-full","bg-warning text-white text-sm font-medium shadow-sm",t),children:[e.jsx(N.WifiOff,{className:"w-4 h-4"}),e.jsx("span",{children:"Offline Mode"})]}):null,tt=({status:r,count:t,className:o})=>{const a={synced:{icon:e.jsx(N.Wifi,{className:"w-4 h-4"}),label:"Synced",color:"bg-success text-white"},syncing:{icon:e.jsx(x.motion.div,{animate:{rotate:360},transition:{repeat:1/0,duration:1,ease:"linear"},children:e.jsx(N.Wifi,{className:"w-4 h-4"})}),label:"Syncing...",color:"bg-info text-white"},unsynced:{icon:e.jsx(N.WifiOff,{className:"w-4 h-4"}),label:t?`${t} Unsynced`:"Unsynced",color:"bg-warning text-white"},error:{icon:e.jsx(N.WifiOff,{className:"w-4 h-4"}),label:"Sync Error",color:"bg-error text-white"}}[r];return e.jsxs(x.motion.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:m("inline-flex items-center gap-2 px-3 py-1.5 rounded-full","text-sm font-medium shadow-sm",a.color,o),children:[a.icon,e.jsx("span",{children:a.label})]})},st={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},ot={primary:"border-primary border-t-transparent",secondary:"border-secondary border-t-transparent",white:"border-white border-t-transparent"},We=({size:r="md",variant:t="primary",className:o,label:s})=>e.jsxs("div",{className:m("inline-flex flex-col items-center gap-2",o),children:[e.jsx(x.motion.div,{className:m("rounded-full",st[r],ot[t]),animate:{rotate:360},transition:{duration:.8,repeat:1/0,ease:"linear"},role:"status","aria-label":s||"Loading"}),s&&e.jsx("span",{className:"text-sm text-foreground/70",children:s})]});We.displayName="Spinner";const _e=C.createContext(void 0),at=()=>{const r=C.useContext(_e);if(!r)throw new Error("useToast must be used within ToastProvider");return r},nt={success:"bg-success/10 border-success text-success backdrop-blur-2xl",error:"bg-error/10 border-error text-error backdrop-blur-2xl",warning:"bg-warning/10 border-warning text-warning backdrop-blur-2xl",info:"bg-info/10 border-info text-info backdrop-blur-2xl",default:"bg-background border-border text-foreground backdrop-blur-2xl"},it={success:N.CheckCircle,error:N.AlertCircle,warning:N.AlertTriangle,info:N.Info,default:null},lt={"top-left":"top-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-center":"bottom-4 left-1/2 -translate-x-1/2","bottom-right":"bottom-4 right-4"},ct=({toast:r,onRemove:t})=>{const o=r.variant||"default",s=it[o],a=typeof r.message=="string"?r.message:String(r.message);return e.jsxs(x.motion.div,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:100,scale:.95},transition:{duration:.2},className:m("flex items-start gap-3 p-4 rounded-md border shadow-lg min-w-[320px] max-w-md",nt[o]),children:[s&&e.jsx(s,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium leading-relaxed",children:a}),r.action&&e.jsx("button",{onClick:r.action.onClick,className:"mt-2 text-xs font-semibold hover:underline",children:r.action.label})]}),e.jsx("button",{onClick:()=>t(r.id),className:"flex-shrink-0 hover:opacity-70 transition-opacity","aria-label":"Close notification",children:e.jsx(N.X,{className:"w-4 h-4"})})]})},Ve=({children:r,position:t="top-right",maxToasts:o=5})=>{const[s,a]=C.useState([]),l=C.useCallback(c=>{a(i=>i.filter(d=>d.id!==c))},[]),n=C.useCallback(c=>{if(typeof c.message!="string"){console.error("Toast message must be a string, received:",c.message);return}const i=Math.random().toString(36).substring(2,9),d=c.duration??5e3;a(g=>[...g,{...c,id:i}].slice(-o)),d>0&&setTimeout(()=>{l(i)},d)},[o,l]);return e.jsxs(_e.Provider,{value:{toasts:s,addToast:n,removeToast:l},children:[r,e.jsx("div",{className:m("fixed z-[100] flex flex-col gap-2",lt[t]),children:e.jsx(x.AnimatePresence,{mode:"popLayout",children:s.map(c=>e.jsx(ct,{toast:c,onRemove:l},c.id))})})]})};Ve.displayName="ToastProvider";const dt=({onCapture:r,onRemove:t,preview:o,label:s="Take Photo",disabled:a,className:l})=>{const n=C.useRef(null),c=i=>{const d=i.target.files?.[0];d&&r(d)};return e.jsxs("div",{className:m("w-full",l),children:[s&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:s}),o?e.jsxs("div",{className:"relative rounded-lg overflow-hidden border-2 border-border",children:[e.jsx("img",{src:o,alt:"Preview",className:"w-full h-48 object-cover"}),t&&e.jsx("button",{onClick:t,className:"absolute top-2 right-2 p-2 bg-error text-white rounded-full shadow-lg hover:bg-red-600",children:e.jsx(N.X,{className:"w-4 h-4"})})]}):e.jsxs(x.motion.button,{type:"button",whileTap:{scale:a?1:.98},onClick:()=>n.current?.click(),disabled:a,className:m("w-full p-4 rounded-lg border-2 border-border","flex items-center justify-center gap-3","bg-secondary hover:bg-border hover:border-border-dark","transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed"),children:[e.jsx(N.Camera,{className:"w-6 h-6 text-primary"}),e.jsx("span",{className:"font-medium text-foreground",children:"Capture Photo"})]}),e.jsx("input",{ref:n,type:"file",accept:"image/*",capture:"environment",onChange:c,className:"hidden",disabled:a})]})},mt=({onUpload:r,accept:t="*/*",multiple:o=!1,label:s="Upload Files",disabled:a,className:l})=>{const n=C.useRef(null),c=i=>{i&&r(Array.from(i))};return e.jsxs("div",{className:m("w-full",l),children:[s&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:s}),e.jsxs(x.motion.button,{type:"button",whileTap:{scale:a?1:.98},onClick:()=>!a&&n.current?.click(),disabled:a,className:m("w-full p-4 rounded-lg border-2 border-border","flex items-center justify-center gap-3","bg-secondary hover:bg-border hover:border-border-dark","transition-all duration-200 cursor-pointer","disabled:opacity-50 disabled:cursor-not-allowed"),children:[e.jsx(N.Upload,{className:"w-6 h-6 text-primary"}),e.jsx("span",{className:"font-medium text-foreground",children:o?"Upload Files":"Upload File"})]}),e.jsx("input",{ref:n,type:"file",accept:t,multiple:o,onChange:i=>c(i.target.files),className:"hidden",disabled:a})]})},ut=({onRecordingComplete:r,label:t="Record Audio",maxDuration:o=300,disabled:s,className:a})=>{const[l,n]=C.useState(!1),[c,i]=C.useState(!1),[d,g]=C.useState(0),[h,b]=C.useState(null),j=C.useRef(null),y=C.useRef([]),w=C.useRef(null),R=async()=>{try{const M=await navigator.mediaDevices.getUserMedia({audio:!0}),F=new MediaRecorder(M);j.current=F,y.current=[],F.ondataavailable=f=>{f.data.size>0&&y.current.push(f.data)},F.onstop=()=>{const f=new Blob(y.current,{type:"audio/webm"}),k=URL.createObjectURL(f);b(k),r(f),M.getTracks().forEach(D=>D.stop())},F.start(),n(!0),g(0),w.current=setInterval(()=>{g(f=>f>=o?(E(),f):f+1)},1e3)}catch(M){console.error("Error accessing microphone:",M)}},I=()=>{j.current?.state==="recording"&&(j.current.pause(),i(!0),w.current&&clearInterval(w.current))},z=()=>{j.current?.state==="paused"&&(j.current.resume(),i(!1),w.current=setInterval(()=>{g(M=>Math.min(M+1,o))},1e3))},E=()=>{j.current&&(j.current.stop(),n(!1),i(!1),w.current&&(clearInterval(w.current),w.current=null))},B=()=>{b(null),g(0)},T=M=>{const F=Math.floor(M/60),f=M%60;return`${F.toString().padStart(2,"0")}:${f.toString().padStart(2,"0")}`};return e.jsxs("div",{className:m("w-full",a),children:[t&&e.jsx("label",{className:"block mb-2 text-sm font-medium text-primary",children:t}),e.jsxs("div",{className:"p-4 md:p-6 bg-background rounded-lg border-2 border-border space-y-4",children:[!h&&e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(x.motion.button,{type:"button",whileTap:{scale:s?1:.95},onClick:l?c?z:I:R,disabled:s,className:m("w-16 h-16 md:w-20 md:h-20 rounded-full flex items-center justify-center","transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed",l?"bg-warning text-white animate-pulse":"bg-primary text-white hover:bg-primary-dark"),children:l?c?e.jsx(N.Play,{className:"w-6 h-6 md:w-8 md:h-8"}):e.jsx(N.Pause,{className:"w-6 h-6 md:w-8 md:h-8"}):e.jsx(N.Mic,{className:"w-6 h-6 md:w-8 md:h-8"})}),l&&!c&&e.jsx(x.motion.div,{className:"absolute top-0 right-0 w-4 h-4 bg-error rounded-full border-2 border-white",animate:{scale:[1,1.2,1]},transition:{repeat:1/0,duration:1.5}})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xl md:text-2xl font-mono font-semibold text-foreground",children:T(d)}),e.jsx("p",{className:"text-xs md:text-sm text-primary/70 mt-1",children:l?c?"Paused":"Recording...":"Tap to record"})]}),l&&e.jsxs(x.motion.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},type:"button",onClick:E,className:"px-4 py-2 text-sm bg-error text-white rounded-full font-medium hover:bg-red-600 flex items-center gap-2",children:[e.jsx(N.Square,{className:"w-4 h-4"}),"Stop"]})]}),h&&e.jsxs(x.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"space-y-3",children:[e.jsx("audio",{src:h,controls:!0,className:"w-full"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-primary/70",children:["Duration: ",T(d)]}),e.jsxs("button",{type:"button",onClick:B,className:"flex items-center gap-2 px-3 py-1.5 text-sm text-error hover:bg-red-50 rounded-lg transition-colors",children:[e.jsx(N.Trash2,{className:"w-4 h-4"}),"Delete"]})]})]})]})]})},pt=({items:r,onRemove:t,onView:o,columns:s=3,className:a})=>{const l={2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4"},n=i=>{if(!i)return"";const d=i/1024;return d<1024?`${d.toFixed(1)} KB`:`${(d/1024).toFixed(1)} MB`},c=i=>{switch(i){case"document":return e.jsx(N.FileText,{className:"w-8 h-8 text-primary"});case"audio":return e.jsx(N.FileText,{className:"w-8 h-8 text-primary"});default:return e.jsx(N.Image,{className:"w-8 h-8 text-primary"})}};return r.length===0?null:e.jsx("div",{className:m("w-full",a),children:e.jsx("div",{className:m("grid gap-3",l[s]),children:r.map(i=>e.jsxs(x.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:"relative group",children:[e.jsx("div",{onClick:()=>o?.(i),className:m("aspect-square rounded-lg overflow-hidden border-2 border-border","flex items-center justify-center","cursor-pointer hover:border-border-dark transition-all",i.type==="image"?"bg-border":"bg-secondary"),children:i.type==="image"?e.jsx("img",{src:i.url,alt:i.name,className:"w-full h-full object-cover"}):e.jsxs("div",{className:"flex flex-col items-center gap-2 p-3",children:[c(i.type),e.jsx("p",{className:"text-xs text-center text-primary line-clamp-2",children:i.name})]})}),t&&e.jsx(x.motion.button,{initial:{opacity:0},whileHover:{opacity:1},className:"absolute -top-2 -right-2 p-1.5 bg-error text-white rounded-full shadow-lg hover:bg-red-600 opacity-0 group-hover:opacity-100 transition-opacity",onClick:d=>{d.stopPropagation(),t(i.id)},children:e.jsx(N.X,{className:"w-4 h-4"})}),i.size&&e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1.5 backdrop-blur-sm",children:[e.jsx("p",{className:"truncate",children:i.name}),e.jsx("p",{className:"text-white/70",children:n(i.size)})]})]},i.id))})})},xt=({text:r="Built by StackLoop",showHeart:t=!0,href:o,position:s="fixed",backgroundColor:a="bg-gray-900",textColor:l="text-gray-400",className:n=""})=>{const c=t?e.jsxs(e.Fragment,{children:["Built with ",e.jsx("span",{className:"text-red-500 mx-1",children:"❤️"})," by ",r.replace(/^Built by /,"")]}):r,i=o?e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:`${l} hover:text-white transition-colors duration-200 text-sm`,children:c}):e.jsx("span",{className:`${l} text-sm`,children:c});return e.jsx("div",{className:`${s} bottom-0 left-0 right-0 ${a} ${n}`,style:{zIndex:40},children:e.jsx("div",{className:"flex items-center justify-center py-2 px-4",children:i})})};exports.AudioRecorder=ut;exports.Badge=et;exports.BottomSheet=Hr;exports.Button=ie;exports.CameraCapture=dt;exports.Card=Gr;exports.CardContent=_r;exports.CardDescription=Wr;exports.CardHeader=Ur;exports.CardTitle=$r;exports.Checkbox=Be;exports.CreditBar=xt;exports.DatePicker=Br;exports.Drawer=Vr;exports.Dropdown=Lr;exports.DualSlider=Fr;exports.FAB=Kr;exports.FileUploader=mt;exports.FloatingActionButton=$e;exports.Input=Fe;exports.Modal=Yr;exports.ModalContent=qr;exports.ModalFooter=Xr;exports.OfflineBadge=rt;exports.Pagination=Qr;exports.RadioPills=Er;exports.Select=Ue;exports.Slider=Or;exports.Spinner=We;exports.StepProgress=Zr;exports.SyncIndicator=tt;exports.Table=Jr;exports.Textarea=Le;exports.ThumbnailGrid=pt;exports.ToastProvider=Ve;exports.Toggle=Ge;exports.cn=m;exports.useToast=at;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|