@vacano/ui 1.0.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,790 +1,1374 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./X-BRRD8eNW.cjs"),qe=require("@emotion/react"),_=require("react"),ft=require("react-dom"),Ue=require("react/jsx-runtime");function Lo(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const w=Lo(_),$n=Lo(ft);function ar(){return ar=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ar.apply(null,arguments)}const In=6,Tn="Loading";var On=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mn=m.memoize(function(e){return On.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),An=Mn,Pn=function(t){return t!=="theme"},jr=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?An:Pn},Br=function(t,r,o){var i;if(r){var c=r.shouldForwardProp;i=t.__emotion_forwardProp&&c?function(l){return t.__emotion_forwardProp(l)&&c(l)}:c}return typeof i!="function"&&o&&(i=t.__emotion_forwardProp),i},Dn=function(t){var r=t.cache,o=t.serialized,i=t.isStringTag;return m.registerStyles(r,o,i),m.useInsertionEffectAlwaysWithSyncFallback(function(){return m.insertStyles(r,o,i)}),null},Ln=function e(t,r){var o=t.__emotion_real===t,i=o&&t.__emotion_base||t,c,l;r!==void 0&&(c=r.label,l=r.target);var s=Br(t,r,o),d=s||jr(i),a=!d("as");return function(){var u=arguments,h=o&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(c!==void 0&&h.push("label:"+c+";"),u[0]==null||u[0].raw===void 0)h.push.apply(h,u);else{var f=u[0];h.push(f[0]);for(var b=u.length,C=1;C<b;C++)h.push(u[C],f[C])}var g=qe.withEmotionCache(function(y,p,v){var k=a&&y.as||i,S="",T=[],M=y;if(y.theme==null){M={};for(var N in y)M[N]=y[N];M.theme=w.useContext(qe.ThemeContext)}typeof y.className=="string"?S=m.getRegisteredStyles(p.registered,T,y.className):y.className!=null&&(S=y.className+" ");var B=m.serializeStyles(h.concat(T),p.registered,M);S+=p.key+"-"+B.name,l!==void 0&&(S+=" "+l);var X=a&&s===void 0?jr(k):d,O={};for(var F in y)a&&F==="as"||X(F)&&(O[F]=y[F]);return O.className=S,v&&(O.ref=v),w.createElement(w.Fragment,null,w.createElement(Dn,{cache:p,serialized:B,isStringTag:typeof k=="string"}),w.createElement(k,O))});return g.displayName=c!==void 0?c:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=i,g.__emotion_styles=h,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+l}}),g.withComponent=function(y,p){var v=e(y,ar({},r,p,{shouldForwardProp:Br(g,p,!0)}));return v.apply(void 0,h)},g}},Nn=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],I=Ln.bind(null);Nn.forEach(function(e){I[e]=I(e)});const Fn=qe.keyframes`
2
- 0%, 100% {
3
- opacity: 1;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./X-CI1qRJDP.cjs"),ie=require("@emotion/react"),g=require("react"),t=require("./media-OVL6YjWb.cjs"),I=require("./tooling-Dflq0Y98.cjs"),ge=require("react-dom");function qo(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const Ce=qo(g);function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ot.apply(null,arguments)}const Ko=ie.css`
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
4
6
  }
5
- 50% {
6
- opacity: 0.3;
7
+
8
+ * {
9
+ margin: 0;
10
+ padding: 0;
7
11
  }
8
- `,_n=I.span`
9
- display: inline-flex;
10
- align-items: center;
11
- gap: ${({$size:e})=>Math.round(e*.6)}px;
12
- `,Xt=I.span`
13
- width: ${({$size:e})=>e}px;
14
- height: ${({$size:e})=>e}px;
15
- border-radius: 50%;
16
- background: currentColor;
17
- animation: ${Fn} 0.8s ease-in-out infinite;
18
- animation-delay: ${({$delay:e})=>e}s;
19
- `,jn=m.classNameGetter("loader"),No=({"aria-label":e=Tn,className:t,classnames:r,size:o=In,...i})=>m.jsxs(_n,{...i,className:jn("container",t,r==null?void 0:r.container),role:"status","aria-label":e,$size:o,children:[m.jsx(Xt,{$size:o,$delay:0}),m.jsx(Xt,{$size:o,$delay:.15}),m.jsx(Xt,{$size:o,$delay:.3})]}),Bn=24,zn="Loading",Wn=qe.keyframes`
20
- to {
21
- transform: rotate(1turn);
12
+
13
+ html {
14
+ -webkit-text-size-adjust: 100%;
15
+ -moz-tab-size: 4;
16
+ tab-size: 4;
22
17
  }
23
- `,zr=e=>Math.max(2,Math.round(e/10)),Vn=I.span`
24
- display: inline-block;
25
- width: ${({$size:e})=>e}px;
26
- aspect-ratio: 1;
27
- border-radius: 50%;
28
- position: relative;
29
18
 
30
- /* Track (faint background circle) */
31
- &::before {
32
- content: '';
33
- position: absolute;
34
- inset: 0;
35
- border-radius: 50%;
36
- border: ${({$size:e})=>zr(e)}px solid currentColor;
37
- opacity: 0.2;
19
+ body {
20
+ min-height: 100vh;
21
+ font-size: 14px;
22
+ line-height: 1.5;
23
+ -webkit-font-smoothing: antialiased;
24
+ -moz-osx-font-smoothing: grayscale;
25
+ text-rendering: optimizeLegibility;
38
26
  }
39
27
 
40
- /* Spinning arc */
41
- &::after {
42
- content: '';
43
- position: absolute;
44
- inset: 0;
45
- border-radius: 50%;
46
- border: ${({$size:e})=>zr(e)}px solid transparent;
47
- border-right-color: currentColor;
48
- animation: ${Wn} 0.8s linear infinite;
28
+ img,
29
+ picture,
30
+ video,
31
+ canvas,
32
+ svg {
33
+ display: block;
34
+ max-width: 100%;
49
35
  }
50
- `,Hn=m.classNameGetter("spinner"),Fo=({"aria-label":e=zn,className:t,classnames:r,size:o=Bn,...i})=>m.jsx(Vn,{...i,className:Hn("container",t,r==null?void 0:r.container),role:"status","aria-label":e,$size:o}),Un="primary",pe=(e,t)=>e.button[t],Kn=I.button`
51
- display: inline-flex;
36
+
37
+ input,
38
+ button,
39
+ textarea,
40
+ select {
41
+ font: inherit;
42
+ color: inherit;
43
+ }
44
+
45
+ p,
46
+ h1,
47
+ h2,
48
+ h3,
49
+ h4,
50
+ h5,
51
+ h6 {
52
+ overflow-wrap: break-word;
53
+ }
54
+
55
+ a {
56
+ color: inherit;
57
+ text-decoration: inherit;
58
+ }
59
+
60
+ button {
61
+ background: none;
62
+ border: none;
63
+ cursor: pointer;
64
+ }
65
+
66
+ ul,
67
+ ol {
68
+ list-style: none;
69
+ }
70
+
71
+ table {
72
+ border-collapse: collapse;
73
+ border-spacing: 0;
74
+ }
75
+
76
+ /*
77
+ * Inter Font Configuration
78
+ * Optimized for UI with modern CSS features
79
+ */
80
+
81
+ html {
82
+ font-family:
83
+ 'Inter',
84
+ -apple-system,
85
+ BlinkMacSystemFont,
86
+ 'Segoe UI',
87
+ Roboto,
88
+ 'Helvetica Neue',
89
+ Arial,
90
+ sans-serif;
91
+
92
+ /* Variable font optical sizing */
93
+ font-optical-sizing: auto;
94
+
95
+ /*
96
+ * OpenType features for Inter:
97
+ * - cv01: alternate 1 (distinguishable from l/I)
98
+ * - cv02: alternate 4 (open top)
99
+ * - cv03: alternate 6 (straight tail)
100
+ * - cv04: alternate 9 (straight tail)
101
+ * - ss01: open digits
102
+ * - ss02: disambiguation (alt a, g)
103
+ * - tnum: tabular numbers (monospaced digits for alignment)
104
+ * - zero: slashed zero
105
+ */
106
+ font-feature-settings:
107
+ 'cv01' 1,
108
+ 'cv02' 1,
109
+ 'ss01' 1,
110
+ 'tnum' 1,
111
+ 'zero' 1;
112
+
113
+ /* Improved kerning */
114
+ font-kerning: normal;
115
+
116
+ /* Slight negative tracking for Inter at UI sizes */
117
+ letter-spacing: -0.011em;
118
+ }
119
+
120
+ /* Tabular figures for numbers in data contexts */
121
+ .tabular-nums {
122
+ font-variant-numeric: tabular-nums;
123
+ }
124
+
125
+ /* Proportional figures for running text */
126
+ .proportional-nums {
127
+ font-variant-numeric: proportional-nums;
128
+ }
129
+
130
+ /* Selection styling */
131
+ ::selection {
132
+ background-color: rgba(0, 122, 255, 0.25);
133
+ }
134
+
135
+ /* Focus visible for accessibility */
136
+ :focus-visible {
137
+ outline: 2px solid rgba(0, 122, 255, 0.5);
138
+ outline-offset: 2px;
139
+ }
140
+
141
+ :focus:not(:focus-visible) {
142
+ outline: none;
143
+ }
144
+ `,Zo=()=>a.jsx(ie.Global,{styles:Ko});var Jo=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Qo=a.memoize(function(e){return Jo.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),er=Qo,tr=function(o){return o!=="theme"},Lt=function(o){return typeof o=="string"&&o.charCodeAt(0)>96?er:tr},zt=function(o,r,i){var n;if(r){var l=r.shouldForwardProp;n=o.__emotion_forwardProp&&l?function(c){return o.__emotion_forwardProp(c)&&l(c)}:l}return typeof n!="function"&&i&&(n=o.__emotion_forwardProp),n},or=function(o){var r=o.cache,i=o.serialized,n=o.isStringTag;return a.registerStyles(r,i,n),a.useInsertionEffectAlwaysWithSyncFallback(function(){return a.insertStyles(r,i,n)}),null},rr=function e(o,r){var i=o.__emotion_real===o,n=i&&o.__emotion_base||o,l,c;r!==void 0&&(l=r.label,c=r.target);var d=zt(o,r,i),p=d||Lt(n),h=!p("as");return function(){var u=arguments,f=i&&o.__emotion_styles!==void 0?o.__emotion_styles.slice(0):[];if(l!==void 0&&f.push("label:"+l+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var O=u[0];f.push(O[0]);for(var k=u.length,y=1;y<k;y++)f.push(u[y],O[y])}var S=ie.withEmotionCache(function($,x,v){var b=h&&$.as||n,L="",j=[],E=$;if($.theme==null){E={};for(var G in $)E[G]=$[G];E.theme=Ce.useContext(ie.ThemeContext)}typeof $.className=="string"?L=a.getRegisteredStyles(x.registered,j,$.className):$.className!=null&&(L=$.className+" ");var P=a.serializeStyles(f.concat(j),x.registered,E);L+=x.key+"-"+P.name,c!==void 0&&(L+=" "+c);var D=h&&d===void 0?Lt(b):p,N={};for(var C in $)h&&C==="as"||D(C)&&(N[C]=$[C]);return N.className=L,v&&(N.ref=v),Ce.createElement(Ce.Fragment,null,Ce.createElement(or,{cache:x,serialized:P,isStringTag:typeof b=="string"}),Ce.createElement(b,N))});return S.displayName=l!==void 0?l:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",S.defaultProps=o.defaultProps,S.__emotion_real=S,S.__emotion_base=n,S.__emotion_styles=f,S.__emotion_forwardProp=d,Object.defineProperty(S,"toString",{value:function(){return"."+c}}),S.withComponent=function($,x){var v=e($,Ot({},r,x,{shouldForwardProp:zt(S,x,!0)}));return v.apply(void 0,f)},S}},ir=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],s=rr.bind(null);ir.forEach(function(e){s[e]=s(e)});const Pt={compact:{height:"32px",padding:"0 8px",radius:"12px",iconSize:"16px"},default:{height:"40px",padding:"0 12px",radius:"16px",iconSize:"20px"}},jt={normal:{background:{static:t.COLORS["steel-blue"],hover:t.alpha(t.COLORS["steel-blue"],90),active:t.alpha(t.COLORS["steel-blue"],80),disabled:t.alpha(t.COLORS["steel-blue"],50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},system:{background:{static:t.COLORS.black,hover:t.alpha(t.COLORS.black,90),active:t.alpha(t.COLORS.black,80),disabled:t.alpha(t.COLORS.black,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},success:{background:{static:t.COLORS.green,hover:t.alpha(t.COLORS.green,90),active:t.alpha(t.COLORS.green,80),disabled:t.alpha(t.COLORS.green,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},warning:{background:{static:t.COLORS.yellow,hover:t.alpha(t.COLORS.yellow,90),active:t.alpha(t.COLORS.yellow,80),disabled:t.alpha(t.COLORS.yellow,50)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.COLORS.black},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},danger:{background:{static:t.COLORS.red,hover:t.alpha(t.COLORS.red,90),active:t.alpha(t.COLORS.red,80),disabled:t.alpha(t.COLORS.red,50)},color:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.COLORS.white},borderColor:{static:"transparent",hover:"transparent",active:"transparent",disabled:"transparent"}},transparent:{background:{static:t.alpha(t.COLORS["iron-grey"],1),hover:t.alpha(t.COLORS["iron-grey"],5),active:t.alpha(t.COLORS["iron-grey"],10),disabled:t.alpha(t.COLORS["iron-grey"],5)},color:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,30)},borderColor:{static:t.alpha(t.COLORS["iron-grey"],20),hover:t.alpha(t.COLORS["iron-grey"],20),active:t.alpha(t.COLORS["iron-grey"],20),disabled:t.alpha(t.COLORS["iron-grey"],10)}}},J=e=>{const o=jt[e];return o||jt.normal},oe=e=>{const o=Pt[e];return o||Pt.default},nr=e=>e?"auto":"fit-content",ar=s.button`
145
+ display: flex;
146
+ gap: 6px;
147
+ text-decoration: none;
52
148
  align-items: center;
53
149
  justify-content: center;
54
- gap: 6px;
55
- height: 32px;
56
- padding: ${({$iconOnly:e})=>e?"0 6px":"0 12px"};
57
- border-radius: 12px;
58
- border: 1px solid;
59
- font-size: 14px;
60
- font-weight: 500;
61
- font-family: inherit;
62
- line-height: 1.5;
63
- cursor: pointer;
64
- user-select: none;
65
- transition:
66
- background-color 0.15s ease,
67
- border-color 0.15s ease;
68
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
69
- min-width: ${({$iconOnly:e})=>e?"32px":"auto"};
70
-
71
- color: ${({theme:e,$variant:t})=>pe(e,t).color};
72
- background-color: ${({theme:e,$variant:t})=>pe(e,t).backgroundColor};
73
- border-color: ${({theme:e,$variant:t})=>pe(e,t).borderColor};
150
+ width: ${e=>e.$iconOnly?oe(e.$size).height:nr(!!e.$fullWidth)};
151
+ color: ${e=>J(e.$variant).color.static};
152
+ background-color: ${e=>J(e.$variant).background.static};
153
+ height: ${e=>oe(e.$size).height};
154
+ padding: ${e=>e.$iconOnly?"0":oe(e.$size).padding};
155
+ border-radius: ${e=>oe(e.$size).radius};
156
+ border: 1px solid ${e=>J(e.$variant).borderColor.static};
74
157
 
75
158
  &:hover:not(:disabled) {
76
- background-color: ${({theme:e,$variant:t})=>pe(e,t).hover.backgroundColor};
77
- border-color: ${({theme:e,$variant:t})=>pe(e,t).hover.borderColor};
159
+ color: ${e=>J(e.$variant).color.hover};
160
+ background-color: ${e=>J(e.$variant).background.hover};
161
+ border-color: ${e=>J(e.$variant).borderColor.hover};
78
162
  }
79
163
 
80
164
  &:active:not(:disabled) {
81
- background-color: ${({theme:e,$variant:t})=>pe(e,t).active.backgroundColor};
82
- border-color: ${({theme:e,$variant:t})=>pe(e,t).active.borderColor};
165
+ color: ${e=>J(e.$variant).color.active};
166
+ background-color: ${e=>J(e.$variant).background.active};
167
+ border-color: ${e=>J(e.$variant).borderColor.active};
83
168
  }
84
169
 
85
170
  &:focus-visible {
86
- outline: 2px solid
87
- ${({theme:e,$variant:t})=>pe(e,t).focus.outlineColor};
88
- outline-offset: 1px;
171
+ outline-color: ${t.alpha(t.COLORS["iron-grey"],30)};
89
172
  }
90
173
 
91
174
  &:disabled {
92
- cursor: ${({$loading:e})=>e?"wait":"not-allowed"};
93
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
94
- background-color: ${({theme:e,$variant:t})=>pe(e,t).disabled.backgroundColor};
95
- border-color: ${({theme:e,$variant:t})=>pe(e,t).disabled.borderColor};
175
+ cursor: not-allowed;
176
+ color: ${e=>J(e.$variant).color.disabled};
177
+ background-color: ${e=>J(e.$variant).background.disabled};
178
+ border-color: ${e=>J(e.$variant).borderColor.disabled};
96
179
  }
97
- `,Gn=I.span`
98
- position: relative;
99
- display: inline-flex;
100
- align-items: center;
101
- gap: 6px;
102
- `,qn=I.span`
103
- display: inline-flex;
104
- align-items: center;
105
- justify-content: center;
106
- flex-shrink: 0;
107
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
108
- color: ${({theme:e,$variant:t})=>pe(e,t).icon.color};
180
+ `,lr=s.div`
181
+ display: grid;
182
+ place-items: center;
183
+ width: ${e=>oe(e.$size).iconSize};
184
+ height: ${e=>oe(e.$size).iconSize};
109
185
 
110
- button:disabled & {
111
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
186
+ & svg {
187
+ width: ${e=>oe(e.$size).iconSize};
188
+ height: ${e=>oe(e.$size).iconSize};
112
189
  }
113
- `,Xn=I.span`
190
+ `,dr=s.span`
191
+ font-weight: 600;
114
192
  overflow: hidden;
115
193
  white-space: nowrap;
116
194
  text-overflow: ellipsis;
117
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
118
- `,Yn=I.span`
119
- display: inline-flex;
120
- align-items: center;
195
+ `,cr=s(a.LoaderCircle)`
196
+ width: ${e=>oe(e.$size).iconSize};
197
+ height: ${e=>oe(e.$size).iconSize};
198
+ animation: ${t.KEYFRAMES.rotate} 0.8s linear infinite;
199
+ `,sr=s.div`
200
+ display: flex;
201
+ gap: 3px;
202
+ `,pr=s.span`
203
+ text-align: center;
204
+ display: flex;
121
205
  justify-content: center;
206
+ align-items: center;
207
+ font-size: 12px;
208
+ height: 18px;
209
+ min-width: 18px;
210
+ line-height: 1.6;
122
211
  padding: 2px 4px;
123
212
  border-radius: 4px;
124
- font-size: 12px;
125
- font-weight: 600;
126
- line-height: 1.5;
127
- visibility: ${({$loading:e})=>e?"hidden":"visible"};
128
- color: ${({theme:e,$variant:t})=>pe(e,t).char.color};
129
- background-color: ${({theme:e,$variant:t})=>pe(e,t).char.backgroundColor};
130
-
131
- button:disabled & {
132
- color: ${({theme:e,$variant:t})=>pe(e,t).disabled.color};
133
- background-color: transparent;
134
- }
135
- `,Wr=I.span`
136
- position: absolute;
137
- inset: 0;
138
- display: inline-flex;
139
- align-items: center;
140
- justify-content: center;
141
- `,Qn=(e,t,r,o,i)=>{const c=_.useMemo(()=>!!e&&!t&&!r,[e,t,r]),l=_.useMemo(()=>o&&c,[o,c]),s=_.useMemo(()=>o&&!c,[o,c]),d=_.useCallback(a=>{if(o){a.preventDefault();return}i==null||i(a)},[o,i]);return{iconOnly:c,showSpinner:l,showDots:s,handleClick:d}},Ve=m.classNameGetter("button"),Zn=18,Jn=({char:e,children:t,className:r,classnames:o,disabled:i,fullWidth:c,icon:l,loading:s,onClick:d,variant:a=Un,...u})=>{const{iconOnly:h,showSpinner:f,showDots:b,handleClick:C}=Qn(l,t,e,s,d),g=()=>l?m.jsx(qn,{className:Ve("icon",o==null?void 0:o.icon),$variant:a,$loading:s,children:l}):null,y=()=>f?m.jsx(Wr,{className:Ve("loader",o==null?void 0:o.loader),children:m.jsx(Fo,{size:Zn})}):b?m.jsx(Wr,{className:Ve("loader",o==null?void 0:o.loader),children:m.jsx(No,{size:4})}):null;return m.jsx(Kn,{...u,className:Ve("container",r,o==null?void 0:o.container),disabled:i||s,onClick:C,$variant:a,$fullWidth:c,$loading:s,$iconOnly:h,children:m.jsxs(Gn,{className:Ve("content",o==null?void 0:o.content),children:[g(),y(),t&&m.jsx(Xn,{className:Ve("text",o==null?void 0:o.text),$loading:s,children:t}),e&&m.jsx(Yn,{className:Ve("char",o==null?void 0:o.char),$variant:a,$loading:s,children:e})]})})},ei=(e,t,r,o)=>t||r?o==="warning"?e.checkbox.state.warning.box.checked.borderColor:o==="error"?e.checkbox.state.error.box.checked.borderColor:e.checkbox.box.checked.borderColor:o==="warning"?e.checkbox.state.warning.box.borderColor:o==="error"?e.checkbox.state.error.box.borderColor:e.checkbox.box.borderColor,ti=(e,t,r,o)=>t||r?o==="warning"?e.checkbox.state.warning.box.checked.backgroundColor:o==="error"?e.checkbox.state.error.box.checked.backgroundColor:e.checkbox.box.checked.backgroundColor:e.checkbox.box.backgroundColor,ri=(e,t)=>t==="warning"?e.checkbox.state.warning.box.focus.shadowColor:t==="error"?e.checkbox.state.error.box.focus.shadowColor:e.checkbox.box.focus.shadowColor,oi=(e,t)=>t==="warning"?e.checkbox.state.warning.label.color:t==="error"?e.checkbox.state.error.label.color:e.checkbox.label.color,ni=I.label`
213
+ width: fit-content;
214
+ background-color: ${e=>e.$variant==="light"?t.alpha(t.COLORS.white,25):t.alpha(t.COLORS.black,25)};
215
+ `,ur=I.newClassNameGetter("key-symbol"),bo=({className:e,ref:o,symbol:r,variant:i="light",...n})=>r?a.jsx(pr,{...n,ref:o,className:ur("container",e),$variant:i,children:r}):null,Et=I.newClassNameGetter("key-bindings"),go=({className:e,classnames:o,keys:r,ref:i,variant:n,...l})=>{const c=g.useMemo(()=>t.getKeySymbols(r),[r]);return c.length===0?null:a.jsx(sr,{...l,ref:i,className:Et("container",e),children:c.map(d=>a.jsx(bo,{symbol:d,className:Et("item",o==null?void 0:o.item),variant:n},d))})},Tt=I.newClassNameGetter("button"),Ie=({children:e,className:o,classnames:r,disabled:i,fullWidth:n,icon:l,loading:c,onClick:d,ref:p=null,keyBindings:h=[],size:u="default",type:f="button",variant:O="normal",...k})=>{const y=g.useRef(null);g.useImperativeHandle(p,()=>y.current,[]),t.useKeyBinding(h,()=>{var $;($=y.current)==null||$.click()});const S=g.useMemo(()=>{switch(f){case"link":return"button";default:return f}},[f]);return a.jsxs(ar,{...k,onClick:d,ref:y,type:S,disabled:i,className:Tt("container",o),$variant:O,$size:u,$fullWidth:!!n,$iconOnly:!!l&&!(e||(h==null?void 0:h.length)>0),children:[c&&a.jsx(cr,{$size:u}),l&&!c&&a.jsx(lr,{$size:u,children:l}),e&&a.jsx(dr,{className:Tt("label",r==null?void 0:r.label),children:e}),a.jsx(go,{keys:h,variant:O==="system"?"light":"dark"})]})},hr=s.div`
216
+ background-color: ${t.COLORS.white};
217
+ border-radius: 16px;
218
+ border: ${e=>e.$border?`1px solid ${t.alpha(t.COLORS["iron-grey"],15)}`:"none"};
219
+ box-shadow: ${e=>e.$shadow?`0 2px 8px ${t.alpha(t.COLORS.black,10)}`:"none"};
220
+ `,br=I.newClassNameGetter("card"),gr=({children:e,className:o,ref:r,border:i=!1,shadow:n=!1,...l})=>a.jsx(hr,{...l,ref:r,className:br("container",o),$border:i,$shadow:n,children:e}),Nt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.black,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},label:t.COLORS.black,icon:t.COLORS.white},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.red,focusShadow:t.alpha(t.COLORS.red,30)},label:t.COLORS.red,icon:t.COLORS.white}},ue=e=>Nt[e]??Nt.normal,fr=s.label`
142
221
  display: inline-flex;
143
222
  align-items: center;
144
223
  gap: 8px;
145
- cursor: pointer;
224
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
225
+ opacity: ${e=>e.$disabled?.5:1};
146
226
 
147
227
  &:has(input:focus-visible) > span:first-of-type {
148
- box-shadow: 0 0 0 3px ${({theme:e,$state:t})=>ri(e,t)};
228
+ box-shadow: 0 0 0 2px ${e=>ue(e.$variant).box.focusShadow};
149
229
  }
150
-
151
- ${({$disabled:e})=>e&&`
152
- opacity: 0.5;
153
- cursor: not-allowed;
154
- `}
155
- `,ii=I.input`
230
+ `,xr=s.input`
156
231
  position: absolute;
157
232
  opacity: 0;
158
233
  width: 0;
159
234
  height: 0;
160
235
  pointer-events: none;
161
- `,li=I.span`
236
+ `,Or=s.span`
162
237
  display: inline-flex;
163
238
  align-items: center;
164
239
  justify-content: center;
240
+ flex-shrink: 0;
165
241
  width: 18px;
166
242
  height: 18px;
167
243
  border-radius: 6px;
168
244
  border: 1.5px solid
169
- ${({theme:e,$checked:t,$indeterminate:r,$state:o})=>ei(e,t,r,o)};
170
- background-color: ${({theme:e,$checked:t,$indeterminate:r,$state:o})=>ti(e,t,r,o)};
245
+ ${e=>e.$checked||e.$indeterminate?ue(e.$variant).box.borderChecked:ue(e.$variant).box.border};
246
+ background-color: ${e=>e.$checked||e.$indeterminate?ue(e.$variant).box.backgroundChecked:ue(e.$variant).box.background};
171
247
  transition:
172
248
  border-color 0.15s ease,
173
249
  background-color 0.15s ease,
174
250
  box-shadow 0.15s ease;
175
- `,ci=I.span`
251
+ `,$r=s.span`
176
252
  display: inline-flex;
177
253
  align-items: center;
178
254
  justify-content: center;
179
- color: ${({theme:e})=>e.checkbox.icon.color};
180
- opacity: ${({$visible:e})=>e?1:0};
181
- transform: ${({$visible:e})=>e?"scale(1)":"scale(0.5)"};
255
+ color: ${e=>ue(e.$variant).icon};
256
+ opacity: ${e=>e.$visible?1:0};
257
+ transform: ${e=>e.$visible?"scale(1)":"scale(0.5)"};
182
258
  transition:
183
259
  opacity 0.15s ease,
184
260
  transform 0.15s ease;
185
- `,si=I.span`
261
+
262
+ & svg {
263
+ width: 12px;
264
+ height: 12px;
265
+ }
266
+ `,Sr=s.span`
186
267
  font-size: 14px;
187
- line-height: 1.5;
188
- color: ${({theme:e,$state:t})=>oi(e,t)};
189
- user-select: none;
190
268
  font-weight: 500;
191
- `,ct=m.classNameGetter("checkbox"),mr=({checked:e,className:t,classnames:r,disabled:o,indeterminate:i,label:c,onChange:l,ref:s,state:d,...a})=>m.jsxs(ni,{className:ct("container",t,r==null?void 0:r.container),$disabled:o,$state:d,children:[m.jsx(ii,{...a,ref:s,type:"checkbox",className:ct("input",r==null?void 0:r.input),checked:e,disabled:o,onChange:l}),m.jsx(li,{className:ct("box",r==null?void 0:r.box),$checked:e,$indeterminate:i,$state:d,children:m.jsx(ci,{className:ct("icon",r==null?void 0:r.icon),$visible:i||e,children:i?m.jsx(m.Minus,{}):m.jsx(m.Check,{})})}),c&&m.jsx(si,{className:ct("label",r==null?void 0:r.label),$state:d,children:c})]}),ai=(e,t)=>{switch(t){case"neutral":return e.chip.color.neutral;case"success":return e.chip.color.success;case"warning":return e.chip.color.warning;case"error":return e.chip.color.error;default:return e.chip.color.default}},ui=(e,t)=>{switch(t){case"neutral":return e.chip.backgroundColor.neutral;case"success":return e.chip.backgroundColor.success;case"warning":return e.chip.backgroundColor.warning;case"error":return e.chip.backgroundColor.error;default:return e.chip.backgroundColor.default}},di=I.span`
192
- display: inline-flex;
193
- align-items: center;
194
- justify-content: center;
195
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
196
- height: 24px;
197
- padding: 0 12px;
269
+ line-height: 1;
270
+ color: ${e=>ue(e.$variant).label};
271
+ user-select: none;
272
+ `,Re=I.newClassNameGetter("checkbox"),Je=({checked:e,className:o,classnames:r,disabled:i,indeterminate:n=!1,label:l,onChange:c,ref:d,variant:p="normal",...h})=>a.jsxs(fr,{className:Re("container",o),$disabled:!!i,$variant:p,children:[a.jsx(xr,{...h,ref:d,type:"checkbox",className:Re("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:c}),a.jsx(Or,{className:Re("box",r==null?void 0:r.box),$checked:e,$indeterminate:n,$variant:p,children:a.jsx($r,{className:Re("icon",r==null?void 0:r.icon),$visible:n||e,$variant:p,children:n?a.jsx(a.Minus,{}):a.jsx(a.Check,{})})}),l&&a.jsx(Sr,{className:Re("label",r==null?void 0:r.label),$variant:p,children:l})]}),It={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},ce=e=>It[e]??It.normal,yr=s.label`
273
+ display: grid;
274
+ grid-template-columns: auto 1fr;
275
+ align-items: start;
276
+ gap: 8px;
277
+ padding: 12px;
278
+ background-color: ${e=>{const o=ce(e.$variant);return e.$disabled?o.background.disabled:e.$checked?o.backgroundChecked:o.background.static}};
279
+ border: 1px solid
280
+ ${e=>{const o=ce(e.$variant);return e.$disabled?o.border.disabled:e.$checked?o.borderChecked:o.border.static}};
198
281
  border-radius: 12px;
199
- font-size: 12px;
200
- font-weight: 600;
282
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
283
+ transition:
284
+ border-color 0.15s ease,
285
+ background-color 0.15s ease;
286
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
201
287
  min-width: 0;
202
- max-width: ${({$fullWidth:e})=>e?"none":"200px"};
203
- color: ${({theme:e,$status:t})=>ai(e,t)};
204
- background-color: ${({theme:e,$status:t})=>ui(e,t)};
205
- `,fi=I.span`
288
+
289
+ &:hover:not([data-disabled='true']) {
290
+ border-color: ${e=>{const o=ce(e.$variant);return e.$checked?o.borderChecked:o.border.hover}};
291
+ }
292
+
293
+ &:has(:focus-visible) {
294
+ outline: none;
295
+ box-shadow: 0 0 0 3px ${e=>ce(e.$variant).focusRing};
296
+ }
297
+
298
+ .vacano_checkbox_container {
299
+ pointer-events: none;
300
+ }
301
+ `,vr=s.input`
302
+ position: absolute;
303
+ width: 1px;
304
+ height: 1px;
305
+ margin: -1px;
306
+ padding: 0;
206
307
  overflow: hidden;
207
- text-overflow: ellipsis;
308
+ clip: rect(0, 0, 0, 0);
208
309
  white-space: nowrap;
209
- `,Vr=m.classNameGetter("chip"),gi=({children:e,className:t,classnames:r,fullWidth:o,status:i,...c})=>m.jsx(di,{...c,className:Vr("container",t,r==null?void 0:r.container),$fullWidth:o,$status:i,children:m.jsx(fi,{className:Vr("text",r==null?void 0:r.text),children:e})}),_o="bottom",jo="start",Bo=4,hi=e=>e.dropdown.content.backgroundColor,pi=e=>e.dropdown.content.borderColor,bi=e=>e.dropdown.content.shadow,xi=I.div`
210
- display: inline-block;
211
- position: relative;
212
- min-width: 0;
213
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
214
- `,mi=I.div`
215
- display: inline-flex;
216
- min-width: 0;
217
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
218
- `,Ci=I.div`
219
- z-index: 1000;
220
- width: max-content;
221
- border-radius: 12px;
222
- border: 1px solid ${({theme:e})=>pi(e)};
223
- background-color: ${({theme:e})=>hi(e)};
224
- box-shadow: ${({theme:e})=>bi(e)};
225
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
226
- opacity: ${({$isOpen:e})=>e?1:0};
227
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
228
- transition:
229
- opacity 0.15s ease,
230
- visibility 0.15s ease;
231
- `;function Bt(){return typeof window<"u"}function ze(e){return zo(e)?(e.nodeName||"").toLowerCase():"#document"}function ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(zo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zo(e){return Bt()?e instanceof Node||e instanceof ye(e).Node:!1}function ie(e){return Bt()?e instanceof Element||e instanceof ye(e).Element:!1}function se(e){return Bt()?e instanceof HTMLElement||e instanceof ye(e).HTMLElement:!1}function ur(e){return!Bt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ye(e).ShadowRoot}const vi=new Set(["inline","contents"]);function gt(e){const{overflow:t,overflowX:r,overflowY:o,display:i}=Re(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!vi.has(i)}const wi=new Set(["table","td","th"]);function yi(e){return wi.has(ze(e))}const ki=[":popover-open",":modal"];function zt(e){return ki.some(t=>{try{return e.matches(t)}catch{return!1}})}const Si=["transform","translate","scale","rotate","perspective"],Ri=["transform","translate","scale","rotate","perspective","filter"],Ei=["paint","layout","strict","content"];function Cr(e){const t=Wt(),r=ie(e)?Re(e):e;return Si.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Ri.some(o=>(r.willChange||"").includes(o))||Ei.some(o=>(r.contain||"").includes(o))}function $i(e){let t=De(e);for(;se(t)&&!Pe(t);){if(Cr(t))return t;if(zt(t))return null;t=De(t)}return null}function Wt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ii=new Set(["html","body","#document"]);function Pe(e){return Ii.has(ze(e))}function Re(e){return ye(e).getComputedStyle(e)}function Vt(e){return ie(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function De(e){if(ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ur(e)&&e.host||Me(e);return ur(t)?t.host:t}function Wo(e){const t=De(e);return Pe(t)?e.ownerDocument?e.ownerDocument.body:e.body:se(t)&&gt(t)?t:Wo(t)}function je(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Wo(e),c=i===((o=e.ownerDocument)==null?void 0:o.body),l=ye(i);if(c){const s=dr(l);return t.concat(l,l.visualViewport||[],gt(i)?i:[],s&&r?je(s):[])}return t.concat(i,je(i,[],r))}function dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ot=Math.min,we=Math.max,Ot=Math.round,et=Math.floor,Oe=e=>({x:e,y:e}),Ti={left:"right",right:"left",bottom:"top",top:"bottom"},Oi={start:"end",end:"start"};function Hr(e,t,r){return we(e,ot(t,r))}function ht(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function pt(e){return e.split("-")[1]}function Vo(e){return e==="x"?"y":"x"}function Ho(e){return e==="y"?"height":"width"}const Mi=new Set(["top","bottom"]);function Ae(e){return Mi.has(Be(e))?"y":"x"}function Uo(e){return Vo(Ae(e))}function Ai(e,t,r){r===void 0&&(r=!1);const o=pt(e),i=Uo(e),c=Ho(i);let l=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(l=Mt(l)),[l,Mt(l)]}function Pi(e){const t=Mt(e);return[fr(e),t,fr(t)]}function fr(e){return e.replace(/start|end/g,t=>Oi[t])}const Ur=["left","right"],Kr=["right","left"],Di=["top","bottom"],Li=["bottom","top"];function Ni(e,t,r){switch(e){case"top":case"bottom":return r?t?Kr:Ur:t?Ur:Kr;case"left":case"right":return t?Di:Li;default:return[]}}function Fi(e,t,r,o){const i=pt(e);let c=Ni(Be(e),r==="start",o);return i&&(c=c.map(l=>l+"-"+i),t&&(c=c.concat(c.map(fr)))),c}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Ti[t])}function _i(e){return{top:0,right:0,bottom:0,left:0,...e}}function ji(e){return typeof e!="number"?_i(e):{top:e,right:e,bottom:e,left:e}}function At(e){const{x:t,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:t,right:t+o,bottom:r+i,x:t,y:r}}/*!
232
- * tabbable 6.3.0
233
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
234
- */var Bi=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Pt=Bi.join(","),Ko=typeof Element>"u",nt=Ko?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Dt=!Ko&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},ut=function(t,r){var o;r===void 0&&(r=!0);var i=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),c=i===""||i==="true",l=c||r&&t&&ut(t.parentNode);return l},zi=function(t){var r,o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return o===""||o==="true"},Go=function(t,r,o){if(ut(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Pt));return r&&nt.call(t,Pt)&&i.unshift(t),i=i.filter(o),i},Lt=function(t,r,o){for(var i=[],c=Array.from(t);c.length;){var l=c.shift();if(!ut(l,!1))if(l.tagName==="SLOT"){var s=l.assignedElements(),d=s.length?s:l.children,a=Lt(d,!0,o);o.flatten?i.push.apply(i,a):i.push({scopeParent:l,candidates:a})}else{var u=nt.call(l,Pt);u&&o.filter(l)&&(r||!t.includes(l))&&i.push(l);var h=l.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(l),f=!ut(h,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(l));if(h&&f){var b=Lt(h===!0?l.children:h.children,!0,o);o.flatten?i.push.apply(i,b):i.push({scopeParent:l,candidates:b})}else c.unshift.apply(c,l.children)}}return i},qo=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xo=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zi(t))&&!qo(t)?0:t.tabIndex},Wi=function(t,r){var o=Xo(t);return o<0&&r&&!qo(t)?0:o},Vi=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Yo=function(t){return t.tagName==="INPUT"},Hi=function(t){return Yo(t)&&t.type==="hidden"},Ui=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return r},Ki=function(t,r){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===r)return t[o]},Gi=function(t){if(!t.name)return!0;var r=t.form||Dt(t),o=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=o(window.CSS.escape(t.name));else try{i=o(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var c=Ki(i,t.form);return!c||c===t},qi=function(t){return Yo(t)&&t.type==="radio"},Xi=function(t){return qi(t)&&!Gi(t)},Yi=function(t){var r,o=t&&Dt(t),i=(r=o)===null||r===void 0?void 0:r.host,c=!1;if(o&&o!==t){var l,s,d;for(c=!!((l=i)!==null&&l!==void 0&&(s=l.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!c&&i;){var a,u,h;o=Dt(i),i=(a=o)===null||a===void 0?void 0:a.host,c=!!((u=i)!==null&&u!==void 0&&(h=u.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return c},Gr=function(t){var r=t.getBoundingClientRect(),o=r.width,i=r.height;return o===0&&i===0},Qi=function(t,r){var o=r.displayCheck,i=r.getShadowRoot;if(o==="full-native"&&"checkVisibility"in t){var c=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!c}if(getComputedStyle(t).visibility==="hidden")return!0;var l=nt.call(t,"details>summary:first-of-type"),s=l?t.parentElement:t;if(nt.call(s,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof i=="function"){for(var d=t;t;){var a=t.parentElement,u=Dt(t);if(a&&!a.shadowRoot&&i(a)===!0)return Gr(t);t.assignedSlot?t=t.assignedSlot:!a&&u!==t.ownerDocument?t=u.host:t=a}t=d}if(Yi(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Gr(t);return!1},Zi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var o=0;o<r.children.length;o++){var i=r.children.item(o);if(i.tagName==="LEGEND")return nt.call(r,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}r=r.parentElement}return!1},gr=function(t,r){return!(r.disabled||ut(r)||Hi(r)||Qi(r,t)||Ui(r)||Zi(r))},hr=function(t,r){return!(Xi(r)||Xo(r)<0||!gr(t,r))},Ji=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},Qo=function(t){var r=[],o=[];return t.forEach(function(i,c){var l=!!i.scopeParent,s=l?i.scopeParent:i,d=Wi(s,l),a=l?Qo(i.candidates):s;d===0?l?r.push.apply(r,a):r.push(s):o.push({documentOrder:c,tabIndex:d,item:i,isScope:l,content:a})}),o.sort(Vi).reduce(function(i,c){return c.isScope?i.push.apply(i,c.content):i.push(c.content),i},[]).concat(r)},vr=function(t,r){r=r||{};var o;return r.getShadowRoot?o=Lt([t],r.includeContainer,{filter:hr.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Ji}):o=Go(t,r.includeContainer,hr.bind(null,r)),Qo(o)},el=function(t,r){r=r||{};var o;return r.getShadowRoot?o=Lt([t],r.includeContainer,{filter:gr.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):o=Go(t,r.includeContainer,gr.bind(null,r)),o},Zo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return nt.call(t,Pt)===!1?!1:hr(r,t)};function tl(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Jo(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:o}=t;return r+"/"+o}).join(" "):navigator.userAgent}function rl(){return/apple/i.test(navigator.vendor)}function pr(){const e=/android/i;return e.test(tl())||e.test(Jo())}function ol(){return Jo().includes("jsdom/")}const qr="data-floating-ui-focusable",nl="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Yt="ArrowLeft",Qt="ArrowRight",il="ArrowUp",ll="ArrowDown";function Ne(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function me(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ur(r)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fe(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Zt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function cl(e){return e.matches("html,body")}function Se(e){return(e==null?void 0:e.ownerDocument)||document}function en(e){return se(e)&&e.matches(nl)}function br(e){return e?e.getAttribute("role")==="combobox"&&en(e):!1}function Nt(e){return e?e.hasAttribute(qr)?e:e.querySelector("["+qr+"]")||e:null}function Ke(e,t,r){return r===void 0&&(r=!0),e.filter(i=>{var c;return i.parentId===t&&(!r||((c=i.context)==null?void 0:c.open))}).flatMap(i=>[i,...Ke(e,i.id,r)])}function sl(e,t){let r,o=-1;function i(c,l){l>o&&(r=c,o=l),Ke(e,c).forEach(d=>{i(d.id,l+1)})}return i(t,0),e.find(c=>c.id===r)}function Xr(e,t){var r;let o=[],i=(r=e.find(c=>c.id===t))==null?void 0:r.parentId;for(;i;){const c=e.find(l=>l.id===i);i=c==null?void 0:c.parentId,c&&(o=o.concat(c))}return o}function fe(e){e.preventDefault(),e.stopPropagation()}function al(e){return"nativeEvent"in e}function tn(e){return e.mozInputSource===0&&e.isTrusted?!0:pr()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function rn(e){return ol()?!1:!pr()&&e.width===0&&e.height===0||pr()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Yr(e,t){return["mouse","pen"].includes(e)}var ul=typeof document<"u",dl=function(){},ae=ul?_.useLayoutEffect:dl;const fl={...w};function Te(e){const t=w.useRef(e);return ae(()=>{t.current=e}),t}const gl=fl.useInsertionEffect,hl=gl||(e=>e());function ge(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return hl(()=>{t.current=e}),w.useCallback(function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function yt(e,t,r){return Math.floor(e/t)!==r}function at(e,t){return t<0||t>=e.current.length}function Jt(e,t){return be(e,{disabledIndices:t})}function Qr(e,t){return be(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function be(e,t){let{startingIndex:r=-1,decrement:o=!1,disabledIndices:i,amount:c=1}=t===void 0?{}:t,l=r;do l+=o?-c:c;while(l>=0&&l<=e.current.length-1&&It(e,l,i));return l}function pl(e,t){let{event:r,orientation:o,loop:i,rtl:c,cols:l,disabledIndices:s,minIndex:d,maxIndex:a,prevIndex:u,stopEvent:h=!1}=t,f=u;if(r.key===il){if(h&&fe(r),u===-1)f=a;else if(f=be(e,{startingIndex:f,amount:l,decrement:!0,disabledIndices:s}),i&&(u-l<d||f<0)){const b=u%l,C=a%l,g=a-(C-b);C===b?f=a:f=C>b?g:g-l}at(e,f)&&(f=u)}if(r.key===ll&&(h&&fe(r),u===-1?f=d:(f=be(e,{startingIndex:u,amount:l,disabledIndices:s}),i&&u+l>a&&(f=be(e,{startingIndex:u%l-l,amount:l,disabledIndices:s}))),at(e,f)&&(f=u)),o==="both"){const b=et(u/l);r.key===(c?Yt:Qt)&&(h&&fe(r),u%l!==l-1?(f=be(e,{startingIndex:u,disabledIndices:s}),i&&yt(f,l,b)&&(f=be(e,{startingIndex:u-u%l-1,disabledIndices:s}))):i&&(f=be(e,{startingIndex:u-u%l-1,disabledIndices:s})),yt(f,l,b)&&(f=u)),r.key===(c?Qt:Yt)&&(h&&fe(r),u%l!==0?(f=be(e,{startingIndex:u,decrement:!0,disabledIndices:s}),i&&yt(f,l,b)&&(f=be(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:s}))):i&&(f=be(e,{startingIndex:u+(l-u%l),decrement:!0,disabledIndices:s})),yt(f,l,b)&&(f=u));const C=et(a/l)===b;at(e,f)&&(i&&C?f=r.key===(c?Qt:Yt)?a:be(e,{startingIndex:u-u%l-1,disabledIndices:s}):f=u)}return f}function bl(e,t,r){const o=[];let i=0;return e.forEach((c,l)=>{let{width:s,height:d}=c;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+l+" is greater than grid columns");let a=!1;for(r&&(i=0);!a;){const u=[];for(let h=0;h<s;h++)for(let f=0;f<d;f++)u.push(i+h+f*t);i%t+s<=t&&u.every(h=>o[h]==null)?(u.forEach(h=>{o[h]=l}),a=!0):i++}}),[...o]}function xl(e,t,r,o,i){if(e===-1)return-1;const c=r.indexOf(e),l=t[e];switch(i){case"tl":return c;case"tr":return l?c+l.width-1:c;case"bl":return l?c+(l.height-1)*o:c;case"br":return r.lastIndexOf(e)}}function ml(e,t){return t.flatMap((r,o)=>e.includes(r)?[o]:[])}function It(e,t,r){if(typeof r=="function")return r(t);if(r)return r.includes(t);const o=e.current[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}const Ht=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function on(e,t){const r=vr(e,Ht()),o=r.length;if(o===0)return;const i=Ne(Se(e)),c=r.indexOf(i),l=c===-1?t===1?0:o-1:c+t;return r[l]}function Cl(e){return on(Se(e).body,1)||e}function vl(e){return on(Se(e).body,-1)||e}function Zr(e,t){const r=t||e.currentTarget,o=e.relatedTarget;return!o||!me(r,o)}function Jr(e,t,r){let{reference:o,floating:i}=e;const c=Ae(t),l=Uo(t),s=Ho(l),d=Be(t),a=c==="y",u=o.x+o.width/2-i.width/2,h=o.y+o.height/2-i.height/2,f=o[s]/2-i[s]/2;let b;switch(d){case"top":b={x:u,y:o.y-i.height};break;case"bottom":b={x:u,y:o.y+o.height};break;case"right":b={x:o.x+o.width,y:h};break;case"left":b={x:o.x-i.width,y:h};break;default:b={x:o.x,y:o.y}}switch(pt(t)){case"start":b[l]-=f*(r&&a?-1:1);break;case"end":b[l]+=f*(r&&a?-1:1);break}return b}const wl=async(e,t,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:c=[],platform:l}=r,s=c.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let a=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=Jr(a,o,d),f=o,b={},C=0;for(let g=0;g<s.length;g++){const{name:y,fn:p}=s[g],{x:v,y:k,data:S,reset:T}=await p({x:u,y:h,initialPlacement:o,placement:f,strategy:i,middlewareData:b,rects:a,platform:l,elements:{reference:e,floating:t}});u=v??u,h=k??h,b={...b,[y]:{...b[y],...S}},T&&C<=50&&(C++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(a=T.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:u,y:h}=Jr(a,f,d)),g=-1)}return{x:u,y:h,placement:f,strategy:i,middlewareData:b}};async function wr(e,t){var r;t===void 0&&(t={});const{x:o,y:i,platform:c,rects:l,elements:s,strategy:d}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:f=!1,padding:b=0}=ht(t,e),C=ji(b),y=s[f?h==="floating"?"reference":"floating":h],p=At(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(y)))==null||r?y:y.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(s.floating)),boundary:a,rootBoundary:u,strategy:d})),v=h==="floating"?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(s.floating)),S=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},T=At(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:k,strategy:d}):v);return{top:(p.top-T.top+C.top)/S.y,bottom:(T.bottom-p.bottom+C.bottom)/S.y,left:(p.left-T.left+C.left)/S.x,right:(T.right-p.right+C.right)/S.x}}const yl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:i,middlewareData:c,rects:l,initialPlacement:s,platform:d,elements:a}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:g=!0,...y}=ht(e,t);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const p=Be(i),v=Ae(s),k=Be(s)===s,S=await(d.isRTL==null?void 0:d.isRTL(a.floating)),T=f||(k||!g?[Mt(s)]:Pi(s)),M=C!=="none";!f&&M&&T.push(...Fi(s,g,C,S));const N=[s,...T],B=await wr(t,y),X=[];let O=((o=c.flip)==null?void 0:o.overflows)||[];if(u&&X.push(B[p]),h){const R=Ai(i,l,S);X.push(B[R[0]],B[R[1]])}if(O=[...O,{placement:i,overflows:X}],!X.every(R=>R<=0)){var F,G;const R=(((F=c.flip)==null?void 0:F.index)||0)+1,$=N[R];if($&&(!(h==="alignment"?v!==Ae($):!1)||O.every(x=>Ae(x.placement)===v?x.overflows[0]>0:!0)))return{data:{index:R,overflows:O},reset:{placement:$}};let j=(G=O.filter(L=>L.overflows[0]<=0).sort((L,x)=>L.overflows[1]-x.overflows[1])[0])==null?void 0:G.placement;if(!j)switch(b){case"bestFit":{var V;const L=(V=O.filter(x=>{if(M){const E=Ae(x.placement);return E===v||E==="y"}return!0}).map(x=>[x.placement,x.overflows.filter(E=>E>0).reduce((E,A)=>E+A,0)]).sort((x,E)=>x[1]-E[1])[0])==null?void 0:V[0];L&&(j=L);break}case"initialPlacement":j=s;break}if(i!==j)return{reset:{placement:j}}}return{}}}},kl=new Set(["left","top"]);async function Sl(e,t){const{placement:r,platform:o,elements:i}=e,c=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=Be(r),s=pt(r),d=Ae(r)==="y",a=kl.has(l)?-1:1,u=c&&d?-1:1,h=ht(t,e);let{mainAxis:f,crossAxis:b,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return s&&typeof C=="number"&&(b=s==="end"?C*-1:C),d?{x:b*u,y:f*a}:{x:f*a,y:b*u}}const Rl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:i,y:c,placement:l,middlewareData:s}=t,d=await Sl(t,e);return l===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:c+d.y,data:{...d,placement:l}}}}},El=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:i}=t,{mainAxis:c=!0,crossAxis:l=!1,limiter:s={fn:y=>{let{x:p,y:v}=y;return{x:p,y:v}}},...d}=ht(e,t),a={x:r,y:o},u=await wr(t,d),h=Ae(Be(i)),f=Vo(h);let b=a[f],C=a[h];if(c){const y=f==="y"?"top":"left",p=f==="y"?"bottom":"right",v=b+u[y],k=b-u[p];b=Hr(v,b,k)}if(l){const y=h==="y"?"top":"left",p=h==="y"?"bottom":"right",v=C+u[y],k=C-u[p];C=Hr(v,C,k)}const g=s.fn({...t,[f]:b,[h]:C});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[f]:c,[h]:l}}}}}},$l=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:i,rects:c,platform:l,elements:s}=t,{apply:d=()=>{},...a}=ht(e,t),u=await wr(t,a),h=Be(i),f=pt(i),b=Ae(i)==="y",{width:C,height:g}=c.floating;let y,p;h==="top"||h==="bottom"?(y=h,p=f===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(p=h,y=f==="end"?"top":"bottom");const v=g-u.top-u.bottom,k=C-u.left-u.right,S=ot(g-u[y],v),T=ot(C-u[p],k),M=!t.middlewareData.shift;let N=S,B=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=k),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(N=v),M&&!f){const O=we(u.left,0),F=we(u.right,0),G=we(u.top,0),V=we(u.bottom,0);b?B=C-2*(O!==0||F!==0?O+F:we(u.left,u.right)):N=g-2*(G!==0||V!==0?G+V:we(u.top,u.bottom))}await d({...t,availableWidth:B,availableHeight:N});const X=await l.getDimensions(s.floating);return C!==X.width||g!==X.height?{reset:{rects:!0}}:{}}}};function nn(e){const t=Re(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=se(e),c=i?e.offsetWidth:r,l=i?e.offsetHeight:o,s=Ot(r)!==c||Ot(o)!==l;return s&&(r=c,o=l),{width:r,height:o,$:s}}function yr(e){return ie(e)?e:e.contextElement}function tt(e){const t=yr(e);if(!se(t))return Oe(1);const r=t.getBoundingClientRect(),{width:o,height:i,$:c}=nn(t);let l=(c?Ot(r.width):r.width)/o,s=(c?Ot(r.height):r.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Il=Oe(0);function ln(e){const t=ye(e);return!Wt()||!t.visualViewport?Il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tl(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ye(e)?!1:t}function Xe(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),c=yr(e);let l=Oe(1);t&&(o?ie(o)&&(l=tt(o)):l=tt(e));const s=Tl(c,r,o)?ln(c):Oe(0);let d=(i.left+s.x)/l.x,a=(i.top+s.y)/l.y,u=i.width/l.x,h=i.height/l.y;if(c){const f=ye(c),b=o&&ie(o)?ye(o):o;let C=f,g=dr(C);for(;g&&o&&b!==C;){const y=tt(g),p=g.getBoundingClientRect(),v=Re(g),k=p.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,S=p.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;d*=y.x,a*=y.y,u*=y.x,h*=y.y,d+=k,a+=S,C=ye(g),g=dr(C)}}return At({width:u,height:h,x:d,y:a})}function Ut(e,t){const r=Vt(e).scrollLeft;return t?t.left+r:Xe(Me(e)).left+r}function cn(e,t){const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ut(e,r),i=r.top+t.scrollTop;return{x:o,y:i}}function Ol(e){let{elements:t,rect:r,offsetParent:o,strategy:i}=e;const c=i==="fixed",l=Me(o),s=t?zt(t.floating):!1;if(o===l||s&&c)return r;let d={scrollLeft:0,scrollTop:0},a=Oe(1);const u=Oe(0),h=se(o);if((h||!h&&!c)&&((ze(o)!=="body"||gt(l))&&(d=Vt(o)),se(o))){const b=Xe(o);a=tt(o),u.x=b.x+o.clientLeft,u.y=b.y+o.clientTop}const f=l&&!h&&!c?cn(l,d):Oe(0);return{width:r.width*a.x,height:r.height*a.y,x:r.x*a.x-d.scrollLeft*a.x+u.x+f.x,y:r.y*a.y-d.scrollTop*a.y+u.y+f.y}}function Ml(e){return Array.from(e.getClientRects())}function Al(e){const t=Me(e),r=Vt(e),o=e.ownerDocument.body,i=we(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),c=we(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-r.scrollLeft+Ut(e);const s=-r.scrollTop;return Re(o).direction==="rtl"&&(l+=we(t.clientWidth,o.clientWidth)-i),{width:i,height:c,x:l,y:s}}const eo=25;function Pl(e,t){const r=ye(e),o=Me(e),i=r.visualViewport;let c=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){c=i.width,l=i.height;const u=Wt();(!u||u&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}const a=Ut(o);if(a<=0){const u=o.ownerDocument,h=u.body,f=getComputedStyle(h),b=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,C=Math.abs(o.clientWidth-h.clientWidth-b);C<=eo&&(c-=C)}else a<=eo&&(c+=a);return{width:c,height:l,x:s,y:d}}const Dl=new Set(["absolute","fixed"]);function Ll(e,t){const r=Xe(e,!0,t==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,c=se(e)?tt(e):Oe(1),l=e.clientWidth*c.x,s=e.clientHeight*c.y,d=i*c.x,a=o*c.y;return{width:l,height:s,x:d,y:a}}function to(e,t,r){let o;if(t==="viewport")o=Pl(e,r);else if(t==="document")o=Al(Me(e));else if(ie(t))o=Ll(t,r);else{const i=ln(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return At(o)}function sn(e,t){const r=De(e);return r===t||!ie(r)||Pe(r)?!1:Re(r).position==="fixed"||sn(r,t)}function Nl(e,t){const r=t.get(e);if(r)return r;let o=je(e,[],!1).filter(s=>ie(s)&&ze(s)!=="body"),i=null;const c=Re(e).position==="fixed";let l=c?De(e):e;for(;ie(l)&&!Pe(l);){const s=Re(l),d=Cr(l);!d&&s.position==="fixed"&&(i=null),(c?!d&&!i:!d&&s.position==="static"&&!!i&&Dl.has(i.position)||gt(l)&&!d&&sn(e,l))?o=o.filter(u=>u!==l):i=s,l=De(l)}return t.set(e,o),o}function Fl(e){let{element:t,boundary:r,rootBoundary:o,strategy:i}=e;const l=[...r==="clippingAncestors"?zt(t)?[]:Nl(t,this._c):[].concat(r),o],s=l[0],d=l.reduce((a,u)=>{const h=to(t,u,i);return a.top=we(h.top,a.top),a.right=ot(h.right,a.right),a.bottom=ot(h.bottom,a.bottom),a.left=we(h.left,a.left),a},to(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function _l(e){const{width:t,height:r}=nn(e);return{width:t,height:r}}function jl(e,t,r){const o=se(t),i=Me(t),c=r==="fixed",l=Xe(e,!0,c,t);let s={scrollLeft:0,scrollTop:0};const d=Oe(0);function a(){d.x=Ut(i)}if(o||!o&&!c)if((ze(t)!=="body"||gt(i))&&(s=Vt(t)),o){const b=Xe(t,!0,c,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&a();c&&!o&&i&&a();const u=i&&!o&&!c?cn(i,s):Oe(0),h=l.left+s.scrollLeft-d.x-u.x,f=l.top+s.scrollTop-d.y-u.y;return{x:h,y:f,width:l.width,height:l.height}}function er(e){return Re(e).position==="static"}function ro(e,t){if(!se(e)||Re(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Me(e)===r&&(r=r.ownerDocument.body),r}function an(e,t){const r=ye(e);if(zt(e))return r;if(!se(e)){let i=De(e);for(;i&&!Pe(i);){if(ie(i)&&!er(i))return i;i=De(i)}return r}let o=ro(e,t);for(;o&&yi(o)&&er(o);)o=ro(o,t);return o&&Pe(o)&&er(o)&&!Cr(o)?r:o||$i(e)||r}const Bl=async function(e){const t=this.getOffsetParent||an,r=this.getDimensions,o=await r(e.floating);return{reference:jl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function zl(e){return Re(e).direction==="rtl"}const Wl={convertOffsetParentRelativeRectToViewportRelativeRect:Ol,getDocumentElement:Me,getClippingRect:Fl,getOffsetParent:an,getElementRects:Bl,getClientRects:Ml,getDimensions:_l,getScale:tt,isElement:ie,isRTL:zl};function un(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vl(e,t){let r=null,o;const i=Me(e);function c(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),c();const a=e.getBoundingClientRect(),{left:u,top:h,width:f,height:b}=a;if(s||t(),!f||!b)return;const C=et(h),g=et(i.clientWidth-(u+f)),y=et(i.clientHeight-(h+b)),p=et(u),k={rootMargin:-C+"px "+-g+"px "+-y+"px "+-p+"px",threshold:we(0,ot(1,d))||1};let S=!0;function T(M){const N=M[0].intersectionRatio;if(N!==d){if(!S)return l();N?l(!1,N):o=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!un(a,e.getBoundingClientRect())&&l(),S=!1}try{r=new IntersectionObserver(T,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(T,k)}r.observe(e)}return l(!0),c}function kr(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,a=yr(e),u=i||c?[...a?je(a):[],...je(t)]:[];u.forEach(p=>{i&&p.addEventListener("scroll",r,{passive:!0}),c&&p.addEventListener("resize",r)});const h=a&&s?Vl(a,r):null;let f=-1,b=null;l&&(b=new ResizeObserver(p=>{let[v]=p;v&&v.target===a&&b&&(b.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var k;(k=b)==null||k.observe(t)})),r()}),a&&!d&&b.observe(a),b.observe(t));let C,g=d?Xe(e):null;d&&y();function y(){const p=Xe(e);g&&!un(g,p)&&r(),g=p,C=requestAnimationFrame(y)}return r(),()=>{var p;u.forEach(v=>{i&&v.removeEventListener("scroll",r),c&&v.removeEventListener("resize",r)}),h==null||h(),(p=b)==null||p.disconnect(),b=null,d&&cancelAnimationFrame(C)}}const Hl=Rl,Ul=El,Kl=yl,Gl=$l,ql=(e,t,r)=>{const o=new Map,i={platform:Wl,...r},c={...i.platform,_c:o};return wl(e,t,{...i,platform:c})};var Xl=typeof document<"u",Yl=function(){},Tt=Xl?_.useLayoutEffect:Yl;function Ft(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!Ft(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=r;o--!==0;){const c=i[o];if(!(c==="_owner"&&e.$$typeof)&&!Ft(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function dn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oo(e,t){const r=dn(e);return Math.round(t*r)/r}function tr(e){const t=w.useRef(e);return Tt(()=>{t.current=e}),t}function Ql(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:c,floating:l}={},transform:s=!0,whileElementsMounted:d,open:a}=e,[u,h]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,b]=w.useState(o);Ft(f,o)||b(o);const[C,g]=w.useState(null),[y,p]=w.useState(null),v=w.useCallback(x=>{x!==M.current&&(M.current=x,g(x))},[]),k=w.useCallback(x=>{x!==N.current&&(N.current=x,p(x))},[]),S=c||C,T=l||y,M=w.useRef(null),N=w.useRef(null),B=w.useRef(u),X=d!=null,O=tr(d),F=tr(i),G=tr(a),V=w.useCallback(()=>{if(!M.current||!N.current)return;const x={placement:t,strategy:r,middleware:f};F.current&&(x.platform=F.current),ql(M.current,N.current,x).then(E=>{const A={...E,isPositioned:G.current!==!1};R.current&&!Ft(B.current,A)&&(B.current=A,$n.flushSync(()=>{h(A)}))})},[f,t,r,F,G]);Tt(()=>{a===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h(x=>({...x,isPositioned:!1})))},[a]);const R=w.useRef(!1);Tt(()=>(R.current=!0,()=>{R.current=!1}),[]),Tt(()=>{if(S&&(M.current=S),T&&(N.current=T),S&&T){if(O.current)return O.current(S,T,V);V()}},[S,T,V,O,X]);const $=w.useMemo(()=>({reference:M,floating:N,setReference:v,setFloating:k}),[v,k]),j=w.useMemo(()=>({reference:S,floating:T}),[S,T]),L=w.useMemo(()=>{const x={position:r,left:0,top:0};if(!j.floating)return x;const E=oo(j.floating,u.x),A=oo(j.floating,u.y);return s?{...x,transform:"translate("+E+"px, "+A+"px)",...dn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:E,top:A}},[r,s,j.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:V,refs:$,elements:j,floatingStyles:L}),[u,V,$,j,L])}const Sr=(e,t)=>({...Hl(e),options:[e,t]}),Rr=(e,t)=>({...Ul(e),options:[e,t]}),Er=(e,t)=>({...Kl(e),options:[e,t]}),fn=(e,t)=>({...Gl(e),options:[e,t]}),Zl="data-floating-ui-focusable",no="active",io="selected",bt="ArrowLeft",xt="ArrowRight",gn="ArrowUp",Kt="ArrowDown",Jl={...w};let lo=!1,ec=0;const co=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ec++;function tc(){const[e,t]=w.useState(()=>lo?co():void 0);return ae(()=>{e==null&&t(co())},[]),w.useEffect(()=>{lo=!0},[]),e}const rc=Jl.useId,hn=rc||tc;let dt;process.env.NODE_ENV!=="production"&&(dt=new Set);function rr(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];const i="Floating UI: "+r.join(" ");if(!((e=dt)!=null&&e.has(i))){var c;(c=dt)==null||c.add(i),console.warn(i)}}function oc(){for(var e,t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];const i="Floating UI: "+r.join(" ");if(!((e=dt)!=null&&e.has(i))){var c;(c=dt)==null||c.add(i),console.error(i)}}function nc(){const e=new Map;return{emit(t,r){var o;(o=e.get(t))==null||o.forEach(i=>i(r))},on(t,r){e.has(t)||e.set(t,new Set),e.get(t).add(r)},off(t,r){var o;(o=e.get(t))==null||o.delete(r)}}}const ic=w.createContext(null),lc=w.createContext(null),$r=()=>{var e;return((e=w.useContext(ic))==null?void 0:e.id)||null},Gt=()=>w.useContext(lc);function _t(e){return"data-floating-ui-"+e}function xr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}let so=0;function He(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:o=!0,sync:i=!1}=t;o&&cancelAnimationFrame(so);const c=()=>e==null?void 0:e.focus({preventScroll:r});i?c():so=requestAnimationFrame(c)}function cc(e){return(e==null?void 0:e.ownerDocument)||document}const rt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ao(e){return e==="inert"?rt.inert:e==="aria-hidden"?rt["aria-hidden"]:rt.none}let kt=new WeakSet,St={},or=0;const sc=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,pn=e=>e&&(e.host||pn(e.parentNode)),ac=(e,t)=>t.map(r=>{if(e.contains(r))return r;const o=pn(r);return e.contains(o)?o:null}).filter(r=>r!=null);function uc(e,t,r,o){const i="data-floating-ui-inert",c=o?"inert":r?"aria-hidden":null,l=ac(t,e),s=new Set,d=new Set(l),a=[];St[i]||(St[i]=new WeakMap);const u=St[i];l.forEach(h),f(t),s.clear();function h(b){!b||s.has(b)||(s.add(b),b.parentNode&&h(b.parentNode))}function f(b){!b||d.has(b)||[].forEach.call(b.children,C=>{if(ze(C)!=="script")if(s.has(C))f(C);else{const g=c?C.getAttribute(c):null,y=g!==null&&g!=="false",p=ao(c),v=(p.get(C)||0)+1,k=(u.get(C)||0)+1;p.set(C,v),u.set(C,k),a.push(C),v===1&&y&&kt.add(C),k===1&&C.setAttribute(i,""),!y&&c&&C.setAttribute(c,c==="inert"?"":"true")}})}return or++,()=>{a.forEach(b=>{const C=ao(c),y=(C.get(b)||0)-1,p=(u.get(b)||0)-1;C.set(b,y),u.set(b,p),y||(!kt.has(b)&&c&&b.removeAttribute(c),kt.delete(b)),p||b.removeAttribute(i)}),or--,or||(rt.inert=new WeakMap,rt["aria-hidden"]=new WeakMap,rt.none=new WeakMap,kt=new WeakSet,St={})}}function uo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=cc(e[0]).body;return uc(e.concat(Array.from(o.querySelectorAll('[aria-live],[role="status"],output'))),o,t,r)}const Ir={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},fo=w.forwardRef(function(t,r){const[o,i]=w.useState();ae(()=>{rl()&&i("button")},[]);const c={ref:r,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[_t("focus-guard")]:"",style:Ir};return Ue.jsx("span",{...t,...c})}),dc=w.createContext(null),fc=()=>w.useContext(dc);function go(e){return w.useMemo(()=>t=>{e.forEach(r=>{r&&(r.current=t)})},e)}const gc=20;let _e=[];function Tr(){_e=_e.filter(e=>e.isConnected)}function hc(e){Tr(),e&&ze(e)!=="body"&&(_e.push(e),_e.length>gc&&(_e=_e.slice(-20)))}function ho(){return Tr(),_e[_e.length-1]}function pc(e){const t=Ht();return Zo(e,t)?e:vr(e,t)[0]||e}function po(e,t){var r;if(!t.current.includes("floating")&&!((r=e.getAttribute("role"))!=null&&r.includes("dialog")))return;const o=Ht(),c=el(e,o).filter(s=>{const d=s.getAttribute("data-tabindex")||"";return Zo(s,o)||s.hasAttribute("data-tabindex")&&!d.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||c.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const bc=w.forwardRef(function(t,r){return Ue.jsx("button",{...t,type:"button",ref:r,tabIndex:-1,style:Ir})});function bn(e){const{context:t,children:r,disabled:o=!1,order:i=["content"],guards:c=!0,initialFocus:l=0,returnFocus:s=!0,restoreFocus:d=!1,modal:a=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:h=!0,outsideElementsInert:f=!1,getInsideElements:b=()=>[]}=e,{open:C,onOpenChange:g,events:y,dataRef:p,elements:{domReference:v,floating:k}}=t,S=ge(()=>{var W;return(W=p.current.floatingContext)==null?void 0:W.nodeId}),T=ge(b),M=typeof l=="number"&&l<0,N=br(v)&&M,B=sc(),X=B?c:!0,O=!X||B&&f,F=Te(i),G=Te(l),V=Te(s),R=Gt(),$=fc(),j=w.useRef(null),L=w.useRef(null),x=w.useRef(!1),E=w.useRef(!1),A=w.useRef(-1),ee=w.useRef(-1),ue=$!=null,z=Nt(k),Y=ge(function(W){return W===void 0&&(W=z),W?vr(W,Ht()):[]}),H=ge(W=>{const Q=Y(W);return F.current.map(U=>v&&U==="reference"?v:z&&U==="floating"?z:Q).filter(Boolean).flat()});w.useEffect(()=>{if(o||!a)return;function W(U){if(U.key==="Tab"){me(z,Ne(Se(z)))&&Y().length===0&&!N&&fe(U);const re=H(),le=Fe(U);F.current[0]==="reference"&&le===v&&(fe(U),U.shiftKey?He(re[re.length-1]):He(re[1])),F.current[1]==="floating"&&le===z&&U.shiftKey&&(fe(U),He(re[0]))}}const Q=Se(z);return Q.addEventListener("keydown",W),()=>{Q.removeEventListener("keydown",W)}},[o,v,z,a,F,N,Y,H]),w.useEffect(()=>{if(o||!k)return;function W(Q){const U=Fe(Q),le=Y().indexOf(U);le!==-1&&(A.current=le)}return k.addEventListener("focusin",W),()=>{k.removeEventListener("focusin",W)}},[o,k,Y]),w.useEffect(()=>{if(o||!h)return;function W(){E.current=!0,setTimeout(()=>{E.current=!1})}function Q(le){const Z=le.relatedTarget,xe=le.currentTarget,de=Fe(le);queueMicrotask(()=>{const he=S(),$e=!(me(v,Z)||me(k,Z)||me(Z,k)||me($==null?void 0:$.portalNode,Z)||Z!=null&&Z.hasAttribute(_t("focus-guard"))||R&&(Ke(R.nodesRef.current,he).find(D=>{var K,P;return me((K=D.context)==null?void 0:K.elements.floating,Z)||me((P=D.context)==null?void 0:P.elements.domReference,Z)})||Xr(R.nodesRef.current,he).find(D=>{var K,P,J;return[(K=D.context)==null?void 0:K.elements.floating,Nt((P=D.context)==null?void 0:P.elements.floating)].includes(Z)||((J=D.context)==null?void 0:J.elements.domReference)===Z})));if(xe===v&&z&&po(z,F),d&&xe!==v&&!(de!=null&&de.isConnected)&&Ne(Se(z))===Se(z).body){se(z)&&z.focus();const D=A.current,K=Y(),P=K[D]||K[K.length-1]||z;se(P)&&P.focus()}if(p.current.insideReactTree){p.current.insideReactTree=!1;return}(N||!a)&&Z&&$e&&!E.current&&Z!==ho()&&(x.current=!0,g(!1,le,"focus-out"))})}const U=!!(!R&&$);function re(){xr(ee),p.current.insideReactTree=!0,ee.current=window.setTimeout(()=>{p.current.insideReactTree=!1})}if(k&&se(v))return v.addEventListener("focusout",Q),v.addEventListener("pointerdown",W),k.addEventListener("focusout",Q),U&&k.addEventListener("focusout",re,!0),()=>{v.removeEventListener("focusout",Q),v.removeEventListener("pointerdown",W),k.removeEventListener("focusout",Q),U&&k.removeEventListener("focusout",re,!0)}},[o,v,k,z,a,R,$,g,h,d,Y,N,S,F,p]);const te=w.useRef(null),q=w.useRef(null),ne=go([te,$==null?void 0:$.beforeInsideRef]),Ee=go([q,$==null?void 0:$.afterInsideRef]);w.useEffect(()=>{var W,Q;if(o||!k)return;const U=Array.from(($==null||(W=$.portalNode)==null?void 0:W.querySelectorAll("["+_t("portal")+"]"))||[]),le=(Q=(R?Xr(R.nodesRef.current,S()):[]).find(de=>{var he;return br(((he=de.context)==null?void 0:he.elements.domReference)||null)}))==null||(Q=Q.context)==null?void 0:Q.elements.domReference,Z=[k,le,...U,...T(),j.current,L.current,te.current,q.current,$==null?void 0:$.beforeOutsideRef.current,$==null?void 0:$.afterOutsideRef.current,F.current.includes("reference")||N?v:null].filter(de=>de!=null),xe=a||N?uo(Z,!O,O):uo(Z);return()=>{xe()}},[o,v,k,a,F,$,N,X,O,R,S,T]),ae(()=>{if(o||!se(z))return;const W=Se(z),Q=Ne(W);queueMicrotask(()=>{const U=H(z),re=G.current,le=(typeof re=="number"?U[re]:re.current)||z,Z=me(z,Q);!M&&!Z&&C&&He(le,{preventScroll:le===z})})},[o,C,z,M,H,G]),ae(()=>{if(o||!z)return;const W=Se(z),Q=Ne(W);hc(Q);function U(Z){let{reason:xe,event:de,nested:he}=Z;if(["hover","safe-polygon"].includes(xe)&&de.type==="mouseleave"&&(x.current=!0),xe==="outside-press")if(he)x.current=!1;else if(tn(de)||rn(de))x.current=!1;else{let $e=!1;document.createElement("div").focus({get preventScroll(){return $e=!0,!1}}),$e?x.current=!1:x.current=!0}}y.on("openchange",U);const re=W.createElement("span");re.setAttribute("tabindex","-1"),re.setAttribute("aria-hidden","true"),Object.assign(re.style,Ir),ue&&v&&v.insertAdjacentElement("afterend",re);function le(){if(typeof V.current=="boolean"){const Z=v||ho();return Z&&Z.isConnected?Z:re}return V.current.current||re}return()=>{y.off("openchange",U);const Z=Ne(W),xe=me(k,Z)||R&&Ke(R.nodesRef.current,S(),!1).some(he=>{var $e;return me(($e=he.context)==null?void 0:$e.elements.floating,Z)}),de=le();queueMicrotask(()=>{const he=pc(de);V.current&&!x.current&&se(he)&&(!(he!==Z&&Z!==W.body)||xe)&&he.focus({preventScroll:!0}),re.remove()})}},[o,k,z,V,p,y,R,ue,v,S]),w.useEffect(()=>(queueMicrotask(()=>{x.current=!1}),()=>{queueMicrotask(Tr)}),[o]),ae(()=>{if(!o&&$)return $.setFocusManagerState({modal:a,closeOnFocusOut:h,open:C,onOpenChange:g,domReference:v}),()=>{$.setFocusManagerState(null)}},[o,$,a,C,g,h,v]),ae(()=>{o||z&&po(z,F)},[o,z,F]);function Ce(W){return o||!u||!a?null:Ue.jsx(bc,{ref:W==="start"?j:L,onClick:Q=>g(!1,Q.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const Ye=!o&&X&&(a?!N:!0)&&(ue||a);return Ue.jsxs(Ue.Fragment,{children:[Ye&&Ue.jsx(fo,{"data-type":"inside",ref:ne,onFocus:W=>{if(a){const U=H();He(i[0]==="reference"?U[0]:U[U.length-1])}else if($!=null&&$.preserveTabOrder&&$.portalNode)if(x.current=!1,Zr(W,$.portalNode)){const U=Cl(v);U==null||U.focus()}else{var Q;(Q=$.beforeOutsideRef.current)==null||Q.focus()}}}),!N&&Ce("start"),r,Ce("end"),Ye&&Ue.jsx(fo,{"data-type":"inside",ref:Ee,onFocus:W=>{if(a)He(H()[0]);else if($!=null&&$.preserveTabOrder&&$.portalNode)if(h&&(x.current=!0),Zr(W,$.portalNode)){const U=vl(v);U==null||U.focus()}else{var Q;(Q=$.afterOutsideRef.current)==null||Q.focus()}}})]})}function bo(e){return se(e.target)&&e.target.tagName==="BUTTON"}function xc(e){return se(e.target)&&e.target.tagName==="A"}function xo(e){return en(e)}function Or(e,t){t===void 0&&(t={});const{open:r,onOpenChange:o,dataRef:i,elements:{domReference:c}}=e,{enabled:l=!0,event:s="click",toggle:d=!0,ignoreMouse:a=!1,keyboardHandlers:u=!0,stickIfOpen:h=!0}=t,f=w.useRef(),b=w.useRef(!1),C=w.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){const y=f.current;g.button===0&&s!=="click"&&(Yr(y)&&a||(r&&d&&(!(i.current.openEvent&&h)||i.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Yr(y)&&a||(r&&d&&(!(i.current.openEvent&&h)||i.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||bo(g))&&(g.key===" "&&!xo(c)&&(g.preventDefault(),b.current=!0),!xc(g)&&g.key==="Enter"&&o(!(r&&d),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||bo(g)||xo(c)||g.key===" "&&b.current&&(b.current=!1,o(!(r&&d),g.nativeEvent,"click"))}}),[i,c,s,a,u,o,r,h,d]);return w.useMemo(()=>l?{reference:C}:{},[l,C])}const mc={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Cc={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mo=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function Mr(e,t){t===void 0&&(t={});const{open:r,onOpenChange:o,elements:i,dataRef:c}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:d=!0,outsidePressEvent:a="pointerdown",referencePress:u=!1,referencePressEvent:h="pointerdown",ancestorScroll:f=!1,bubbles:b,capture:C}=t,g=Gt(),y=ge(typeof d=="function"?d:()=>!1),p=typeof d=="function"?y:d,v=w.useRef(!1),{escapeKey:k,outsidePress:S}=mo(b),{escapeKey:T,outsidePress:M}=mo(C),N=w.useRef(!1),B=ge(R=>{var $;if(!r||!l||!s||R.key!=="Escape"||N.current)return;const j=($=c.current.floatingContext)==null?void 0:$.nodeId,L=g?Ke(g.nodesRef.current,j):[];if(!k&&(R.stopPropagation(),L.length>0)){let x=!0;if(L.forEach(E=>{var A;if((A=E.context)!=null&&A.open&&!E.context.dataRef.current.__escapeKeyBubbles){x=!1;return}}),!x)return}o(!1,al(R)?R.nativeEvent:R,"escape-key")}),X=ge(R=>{var $;const j=()=>{var L;B(R),(L=Fe(R))==null||L.removeEventListener("keydown",j)};($=Fe(R))==null||$.addEventListener("keydown",j)}),O=ge(R=>{var $;const j=c.current.insideReactTree;c.current.insideReactTree=!1;const L=v.current;if(v.current=!1,a==="click"&&L||j||typeof p=="function"&&!p(R))return;const x=Fe(R),E="["+_t("inert")+"]",A=Se(i.floating).querySelectorAll(E);let ee=ie(x)?x:null;for(;ee&&!Pe(ee);){const H=De(ee);if(Pe(H)||!ie(H))break;ee=H}if(A.length&&ie(x)&&!cl(x)&&!me(x,i.floating)&&Array.from(A).every(H=>!me(ee,H)))return;if(se(x)&&V){const H=Pe(x),te=Re(x),q=/auto|scroll/,ne=H||q.test(te.overflowX),Ee=H||q.test(te.overflowY),Ce=ne&&x.clientWidth>0&&x.scrollWidth>x.clientWidth,Ye=Ee&&x.clientHeight>0&&x.scrollHeight>x.clientHeight,W=te.direction==="rtl",Q=Ye&&(W?R.offsetX<=x.offsetWidth-x.clientWidth:R.offsetX>x.clientWidth),U=Ce&&R.offsetY>x.clientHeight;if(Q||U)return}const ue=($=c.current.floatingContext)==null?void 0:$.nodeId,z=g&&Ke(g.nodesRef.current,ue).some(H=>{var te;return Zt(R,(te=H.context)==null?void 0:te.elements.floating)});if(Zt(R,i.floating)||Zt(R,i.domReference)||z)return;const Y=g?Ke(g.nodesRef.current,ue):[];if(Y.length>0){let H=!0;if(Y.forEach(te=>{var q;if((q=te.context)!=null&&q.open&&!te.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}o(!1,R,"outside-press")}),F=ge(R=>{var $;const j=()=>{var L;O(R),(L=Fe(R))==null||L.removeEventListener(a,j)};($=Fe(R))==null||$.addEventListener(a,j)});w.useEffect(()=>{if(!r||!l)return;c.current.__escapeKeyBubbles=k,c.current.__outsidePressBubbles=S;let R=-1;function $(A){o(!1,A,"ancestor-scroll")}function j(){window.clearTimeout(R),N.current=!0}function L(){R=window.setTimeout(()=>{N.current=!1},Wt()?5:0)}const x=Se(i.floating);s&&(x.addEventListener("keydown",T?X:B,T),x.addEventListener("compositionstart",j),x.addEventListener("compositionend",L)),p&&x.addEventListener(a,M?F:O,M);let E=[];return f&&(ie(i.domReference)&&(E=je(i.domReference)),ie(i.floating)&&(E=E.concat(je(i.floating))),!ie(i.reference)&&i.reference&&i.reference.contextElement&&(E=E.concat(je(i.reference.contextElement)))),E=E.filter(A=>{var ee;return A!==((ee=x.defaultView)==null?void 0:ee.visualViewport)}),E.forEach(A=>{A.addEventListener("scroll",$,{passive:!0})}),()=>{s&&(x.removeEventListener("keydown",T?X:B,T),x.removeEventListener("compositionstart",j),x.removeEventListener("compositionend",L)),p&&x.removeEventListener(a,M?F:O,M),E.forEach(A=>{A.removeEventListener("scroll",$)}),window.clearTimeout(R)}},[c,i,s,p,a,r,o,f,l,k,S,B,T,X,O,M,F]),w.useEffect(()=>{c.current.insideReactTree=!1},[c,p,a]);const G=w.useMemo(()=>({onKeyDown:B,...u&&{[mc[h]]:R=>{o(!1,R.nativeEvent,"reference-press")},...h!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[B,o,u,h]),V=w.useMemo(()=>({onKeyDown:B,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[Cc[a]]:()=>{c.current.insideReactTree=!0}}),[B,a,c]);return w.useMemo(()=>l?{reference:G,floating:V}:{},[l,G,V])}function vc(e){const{open:t=!1,onOpenChange:r,elements:o}=e,i=hn(),c=w.useRef({}),[l]=w.useState(()=>nc()),s=$r()!=null;if(process.env.NODE_ENV!=="production"){const b=o.reference;b&&!ie(b)&&oc("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[d,a]=w.useState(o.reference),u=ge((b,C,g)=>{c.current.openEvent=b?C:void 0,l.emit("openchange",{open:b,event:C,reason:g,nested:s}),r==null||r(b,C,g)}),h=w.useMemo(()=>({setPositionReference:a}),[]),f=w.useMemo(()=>({reference:d||o.reference||null,floating:o.floating||null,domReference:o.reference}),[d,o.reference,o.floating]);return w.useMemo(()=>({dataRef:c,open:t,onOpenChange:u,elements:f,events:l,floatingId:i,refs:h}),[t,u,f,l,i,h])}function Ar(e){e===void 0&&(e={});const{nodeId:t}=e,r=vc({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||r,i=o.elements,[c,l]=w.useState(null),[s,d]=w.useState(null),u=(i==null?void 0:i.domReference)||c,h=w.useRef(null),f=Gt();ae(()=>{u&&(h.current=u)},[u]);const b=Ql({...e,elements:{...i,...s&&{reference:s}}}),C=w.useCallback(k=>{const S=ie(k)?{getBoundingClientRect:()=>k.getBoundingClientRect(),getClientRects:()=>k.getClientRects(),contextElement:k}:k;d(S),b.refs.setReference(S)},[b.refs]),g=w.useCallback(k=>{(ie(k)||k===null)&&(h.current=k,l(k)),(ie(b.refs.reference.current)||b.refs.reference.current===null||k!==null&&!ie(k))&&b.refs.setReference(k)},[b.refs]),y=w.useMemo(()=>({...b.refs,setReference:g,setPositionReference:C,domReference:h}),[b.refs,g,C]),p=w.useMemo(()=>({...b.elements,domReference:u}),[b.elements,u]),v=w.useMemo(()=>({...b,...o,refs:y,elements:p,nodeId:t}),[b,y,p,t,o]);return ae(()=>{o.dataRef.current.floatingContext=v;const k=f==null?void 0:f.nodesRef.current.find(S=>S.id===t);k&&(k.context=v)}),w.useMemo(()=>({...b,context:v,refs:y,elements:p}),[b,y,p,v])}function nr(e,t,r){const o=new Map,i=r==="item";let c=e;if(i&&e){const{[no]:l,[io]:s,...d}=e;c=d}return{...r==="floating"&&{tabIndex:-1,[Zl]:""},...c,...t.map(l=>{const s=l?l[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(d=>{let[a,u]=d;if(!(i&&[no,io].includes(a)))if(a.indexOf("on")===0){if(o.has(a)||o.set(a,[]),typeof u=="function"){var h;(h=o.get(a))==null||h.push(u),l[a]=function(){for(var f,b=arguments.length,C=new Array(b),g=0;g<b;g++)C[g]=arguments[g];return(f=o.get(a))==null?void 0:f.map(y=>y(...C)).find(y=>y!==void 0)}}}else l[a]=u}),l),{})}}function Pr(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),r=e.map(s=>s==null?void 0:s.floating),o=e.map(s=>s==null?void 0:s.item),i=w.useCallback(s=>nr(s,e,"reference"),t),c=w.useCallback(s=>nr(s,e,"floating"),r),l=w.useCallback(s=>nr(s,e,"item"),o);return w.useMemo(()=>({getReferenceProps:i,getFloatingProps:c,getItemProps:l}),[i,c,l])}const wc="Escape";function qt(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function Rt(e,t){return qt(t,e===gn||e===Kt,e===bt||e===xt)}function ir(e,t,r){return qt(t,e===Kt,r?e===bt:e===xt)||e==="Enter"||e===" "||e===""}function Co(e,t,r){return qt(t,r?e===bt:e===xt,e===Kt)}function vo(e,t,r,o){const i=r?e===xt:e===bt,c=e===gn;return t==="both"||t==="horizontal"&&o&&o>1?e===wc:qt(t,i,c)}function xn(e,t){const{open:r,onOpenChange:o,elements:i,floatingId:c}=e,{listRef:l,activeIndex:s,onNavigate:d=()=>{},enabled:a=!0,selectedIndex:u=null,allowEscape:h=!1,loop:f=!1,nested:b=!1,rtl:C=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:p=!0,openOnArrowKeyDown:v=!0,disabledIndices:k=void 0,orientation:S="vertical",parentOrientation:T,cols:M=1,scrollItemIntoView:N=!0,virtualItemRef:B,itemSizes:X,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(h&&(f||rr("`useListNavigation` looping must be enabled to allow escaping."),g||rr("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&M>1&&rr("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=Nt(i.floating),G=Te(F),V=$r(),R=Gt();ae(()=>{e.dataRef.current.orientation=S},[e,S]);const $=ge(()=>{d(x.current===-1?null:x.current)}),j=br(i.domReference),L=w.useRef(y),x=w.useRef(u??-1),E=w.useRef(null),A=w.useRef(!0),ee=w.useRef($),ue=w.useRef(!!i.floating),z=w.useRef(r),Y=w.useRef(!1),H=w.useRef(!1),te=Te(k),q=Te(r),ne=Te(N),Ee=Te(u),[Ce,Ye]=w.useState(),[W,Q]=w.useState(),U=ge(()=>{function D(oe){if(g){var ce;(ce=oe.id)!=null&&ce.endsWith("-fui-option")&&(oe.id=c+"-"+Math.random().toString(16).slice(2,10)),Ye(oe.id),R==null||R.events.emit("virtualfocus",oe),B&&(B.current=oe)}else He(oe,{sync:Y.current,preventScroll:!0})}const K=l.current[x.current],P=H.current;K&&D(K),(Y.current?oe=>oe():requestAnimationFrame)(()=>{const oe=l.current[x.current]||K;if(!oe)return;K||D(oe);const ce=ne.current;ce&&le&&(P||!A.current)&&(oe.scrollIntoView==null||oe.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});ae(()=>{a&&(r&&i.floating?L.current&&u!=null&&(H.current=!0,x.current=u,$()):ue.current&&(x.current=-1,ee.current()))},[a,r,i.floating,u,$]),ae(()=>{if(a&&r&&i.floating)if(s==null){if(Y.current=!1,Ee.current!=null)return;if(ue.current&&(x.current=-1,U()),(!z.current||!ue.current)&&L.current&&(E.current!=null||L.current===!0&&E.current==null)){let D=0;const K=()=>{l.current[0]==null?(D<2&&(D?requestAnimationFrame:queueMicrotask)(K),D++):(x.current=E.current==null||ir(E.current,S,C)||b?Jt(l,te.current):Qr(l,te.current),E.current=null,$())};K()}}else at(l,s)||(x.current=s,U(),H.current=!1)},[a,r,i.floating,s,Ee,b,l,S,C,$,U,te]),ae(()=>{var D;if(!a||i.floating||!R||g||!ue.current)return;const K=R.nodesRef.current,P=(D=K.find(ce=>ce.id===V))==null||(D=D.context)==null?void 0:D.elements.floating,J=Ne(Se(i.floating)),oe=K.some(ce=>ce.context&&me(ce.context.elements.floating,J));P&&!oe&&A.current&&P.focus({preventScroll:!0})},[a,i.floating,R,V,g]),ae(()=>{if(!a||!R||!g||V)return;function D(K){Q(K.id),B&&(B.current=K)}return R.events.on("virtualfocus",D),()=>{R.events.off("virtualfocus",D)}},[a,R,g,V,B]),ae(()=>{ee.current=$,z.current=r,ue.current=!!i.floating}),ae(()=>{r||(E.current=null,L.current=y)},[r,y]);const re=s!=null,le=w.useMemo(()=>{function D(P){if(!q.current)return;const J=l.current.indexOf(P);J!==-1&&x.current!==J&&(x.current=J,$())}return{onFocus(P){let{currentTarget:J}=P;Y.current=!0,D(J)},onClick:P=>{let{currentTarget:J}=P;return J.focus({preventScroll:!0})},onMouseMove(P){let{currentTarget:J}=P;Y.current=!0,H.current=!1,p&&D(J)},onPointerLeave(P){let{pointerType:J}=P;if(!(!A.current||J==="touch")&&(Y.current=!0,!!p&&(x.current=-1,$(),!g))){var oe;(oe=G.current)==null||oe.focus({preventScroll:!0})}}}},[q,G,p,l,$,g]),Z=w.useCallback(()=>{var D;return T??(R==null||(D=R.nodesRef.current.find(K=>K.id===V))==null||(D=D.context)==null||(D=D.dataRef)==null?void 0:D.current.orientation)},[V,R,T]),xe=ge(D=>{if(A.current=!1,Y.current=!0,D.which===229||!q.current&&D.currentTarget===G.current)return;if(b&&vo(D.key,S,C,M)){Rt(D.key,Z())||fe(D),o(!1,D.nativeEvent,"list-navigation"),se(i.domReference)&&(g?R==null||R.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const K=x.current,P=Jt(l,k),J=Qr(l,k);if(j||(D.key==="Home"&&(fe(D),x.current=P,$()),D.key==="End"&&(fe(D),x.current=J,$())),M>1){const oe=X||Array.from({length:l.current.length},()=>({width:1,height:1})),ce=bl(oe,M,O),it=ce.findIndex(ke=>ke!=null&&!It(l,ke,k)),mt=ce.reduce((ke,We,Ct)=>We!=null&&!It(l,We,k)?Ct:ke,-1),lt=ce[pl({current:ce.map(ke=>ke!=null?l.current[ke]:null)},{event:D,orientation:S,loop:f,rtl:C,cols:M,disabledIndices:ml([...(typeof k!="function"?k:null)||l.current.map((ke,We)=>It(l,We,k)?We:void 0),void 0],ce),minIndex:it,maxIndex:mt,prevIndex:xl(x.current>J?P:x.current,oe,ce,M,D.key===Kt?"bl":D.key===(C?bt:xt)?"tr":"tl"),stopEvent:!0})];if(lt!=null&&(x.current=lt,$()),S==="both")return}if(Rt(D.key,S)){if(fe(D),r&&!g&&Ne(D.currentTarget.ownerDocument)===D.currentTarget){x.current=ir(D.key,S,C)?P:J,$();return}ir(D.key,S,C)?f?x.current=K>=J?h&&K!==l.current.length?-1:P:be(l,{startingIndex:K,disabledIndices:k}):x.current=Math.min(J,be(l,{startingIndex:K,disabledIndices:k})):f?x.current=K<=P?h&&K!==-1?l.current.length:J:be(l,{startingIndex:K,decrement:!0,disabledIndices:k}):x.current=Math.max(P,be(l,{startingIndex:K,decrement:!0,disabledIndices:k})),at(l,x.current)&&(x.current=-1),$()}}),de=w.useMemo(()=>g&&r&&re&&{"aria-activedescendant":W||Ce},[g,r,re,W,Ce]),he=w.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...j?{}:de,onKeyDown:xe,onPointerMove(){A.current=!0}}),[de,xe,S,j]),$e=w.useMemo(()=>{function D(P){y==="auto"&&tn(P.nativeEvent)&&(L.current=!0)}function K(P){L.current=y,y==="auto"&&rn(P.nativeEvent)&&(L.current=!0)}return{...de,onKeyDown(P){A.current=!1;const J=P.key.startsWith("Arrow"),oe=["Home","End"].includes(P.key),ce=J||oe,it=Co(P.key,S,C),mt=vo(P.key,S,C,M),lt=Co(P.key,Z(),C),ke=Rt(P.key,S),We=(b?lt:ke)||P.key==="Enter"||P.key.trim()==="";if(g&&r){const vt=R==null?void 0:R.nodesRef.current.find(wt=>wt.parentId==null),Le=R&&vt?sl(R.nodesRef.current,vt.id):null;if(ce&&Le&&B){const wt=new KeyboardEvent("keydown",{key:P.key,bubbles:!0});if(it||mt){var Ct,Lr;const En=((Ct=Le.context)==null?void 0:Ct.elements.domReference)===P.currentTarget,Fr=mt&&!En?(Lr=Le.context)==null?void 0:Lr.elements.domReference:it?l.current.find(_r=>(_r==null?void 0:_r.id)===Ce):null;Fr&&(fe(P),Fr.dispatchEvent(wt),Q(void 0))}if((ke||oe)&&Le.context&&Le.context.open&&Le.parentId&&P.currentTarget!==Le.context.elements.domReference){var Nr;fe(P),(Nr=Le.context.elements.domReference)==null||Nr.dispatchEvent(wt);return}}return xe(P)}if(!(!r&&!v&&J)){if(We){const vt=Rt(P.key,Z());E.current=b&&vt?null:P.key}if(b){lt&&(fe(P),r?(x.current=Jt(l,te.current),$()):o(!0,P.nativeEvent,"list-navigation"));return}ke&&(u!=null&&(x.current=u),fe(P),!r&&v?o(!0,P.nativeEvent,"list-navigation"):xe(P),r&&$())}},onFocus(){r&&!g&&(x.current=-1,$())},onPointerDown:K,onPointerEnter:K,onMouseDown:D,onClick:D}},[Ce,de,M,xe,te,y,l,b,$,o,r,v,S,Z,C,u,R,g,B]);return w.useMemo(()=>a?{reference:$e,floating:he,item:le}:{},[a,$e,he,le])}const yc=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function mn(e,t){var r,o;t===void 0&&(t={});const{open:i,elements:c,floatingId:l}=e,{enabled:s=!0,role:d="dialog"}=t,a=hn(),u=((r=c.domReference)==null?void 0:r.id)||a,h=w.useMemo(()=>{var v;return((v=Nt(c.floating))==null?void 0:v.id)||l},[c.floating,l]),f=(o=yc.get(d))!=null?o:d,C=$r()!=null,g=w.useMemo(()=>f==="tooltip"||d==="label"?{["aria-"+(d==="label"?"labelledby":"describedby")]:i?h:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":i?h:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&C&&{role:"menuitem"},...d==="select"&&{"aria-autocomplete":"none"},...d==="combobox"&&{"aria-autocomplete":"list"}},[f,h,C,i,u,d]),y=w.useMemo(()=>{const v={id:h,...f&&{role:f}};return f==="tooltip"||d==="label"?v:{...v,...f==="menu"&&{"aria-labelledby":u}}},[f,h,u,d]),p=w.useCallback(v=>{let{active:k,selected:S}=v;const T={role:"option",...k&&{id:h+"-fui-option"}};switch(d){case"select":case"combobox":return{...T,"aria-selected":S}}return{}},[h,d]);return w.useMemo(()=>s?{reference:g,floating:y,item:p}:{},[s,g,y,p])}function kc(e,t){var r;const{open:o,dataRef:i}=e,{listRef:c,activeIndex:l,onMatch:s,onTypingChange:d,enabled:a=!0,findMatch:u=null,resetMs:h=750,ignoreKeys:f=[],selectedIndex:b=null}=t,C=w.useRef(-1),g=w.useRef(""),y=w.useRef((r=b??l)!=null?r:-1),p=w.useRef(null),v=ge(s),k=ge(d),S=Te(u),T=Te(f);ae(()=>{o&&(xr(C),p.current=null,g.current="")},[o]),ae(()=>{if(o&&g.current===""){var O;y.current=(O=b??l)!=null?O:-1}},[o,b,l]);const M=ge(O=>{O?i.current.typing||(i.current.typing=O,k(O)):i.current.typing&&(i.current.typing=O,k(O))}),N=ge(O=>{function F(j,L,x){const E=S.current?S.current(L,x):L.find(A=>(A==null?void 0:A.toLocaleLowerCase().indexOf(x.toLocaleLowerCase()))===0);return E?j.indexOf(E):-1}const G=c.current;if(g.current.length>0&&g.current[0]!==" "&&(F(G,G,g.current)===-1?M(!1):O.key===" "&&fe(O)),G==null||T.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;o&&O.key!==" "&&(fe(O),M(!0)),G.every(j=>{var L,x;return j?((L=j[0])==null?void 0:L.toLocaleLowerCase())!==((x=j[1])==null?void 0:x.toLocaleLowerCase()):!0})&&g.current===O.key&&(g.current="",y.current=p.current),g.current+=O.key,xr(C),C.current=window.setTimeout(()=>{g.current="",y.current=p.current,M(!1)},h);const R=y.current,$=F(G,[...G.slice((R||0)+1),...G.slice(0,(R||0)+1)],g.current);$!==-1?(v($),p.current=$):O.key!==" "&&(g.current="",M(!1))}),B=w.useMemo(()=>({onKeyDown:N}),[N]),X=w.useMemo(()=>({onKeyDown:N,onKeyUp(O){O.key===" "&&M(!1)}}),[N,M]);return w.useMemo(()=>a?{reference:B,floating:X}:{},[a,B,X])}const Sc=(e,t)=>`${e}-${t}`,Rc=(e=_o,t=jo,r=Bo,o,i)=>{const[c,l]=_.useState(!1),s=o!==void 0,d=s?o:c,a=_.useCallback(v=>{s||l(v),i==null||i(v)},[s,i]),u=_.useMemo(()=>Sc(e,t),[e,t]),{refs:h,floatingStyles:f,context:b}=Ar({open:d,onOpenChange:a,placement:u,middleware:[Sr(r),Er(),Rr({padding:8})],whileElementsMounted:kr}),C=Or(b),g=Mr(b,{escapeKey:!0,outsidePress:!0}),{getReferenceProps:y,getFloatingProps:p}=Pr([C,g]);return{isOpen:d,setIsOpen:a,refs:{setReference:h.setReference,setFloating:h.setFloating},floatingStyles:f,getReferenceProps:y,getFloatingProps:p}},lr=m.classNameGetter("dropdown"),Ec=({trigger:e,children:t,placement:r=_o,align:o=jo,offset:i=Bo,open:c,onOpenChange:l,portalRenderNode:s,classnames:d,className:a,fullWidth:u,...h})=>{const{isOpen:f,refs:b,floatingStyles:C,getReferenceProps:g,getFloatingProps:y}=Rc(r,o,i,c,l),p=()=>{const v=m.jsx(Ci,{ref:b.setFloating,className:lr("content",d==null?void 0:d.content),style:C,$isOpen:f,...y(),children:t});return s?ft.createPortal(v,s):v};return m.jsxs(xi,{...h,className:lr("container",a,d==null?void 0:d.container),$fullWidth:u,children:[m.jsx(mi,{ref:b.setReference,className:lr("trigger",d==null?void 0:d.trigger),$fullWidth:u,...g(),children:e}),p()]})},wo={hidden:["M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7 7 0 0 0-2.79.588l.77.771A6 6 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755q-.247.248-.517.486z","M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829","M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z"],visible:["M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8M1.173 8a13 13 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5s3.879 1.168 5.168 2.457A13 13 0 0 1 14.828 8q-.086.13-.195.288c-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5s-3.879-1.168-5.168-2.457A13 13 0 0 1 1.172 8z","M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0"]},$c=(e,t,r)=>r?e.input.wrapper.disabled.backgroundColor:t==="warning"?e.input.state.warning.wrapper.backgroundColor:t==="error"?e.input.state.error.wrapper.backgroundColor:e.input.wrapper.backgroundColor,Ic=(e,t,r)=>r?e.input.wrapper.disabled.borderColor:t==="warning"?e.input.state.warning.wrapper.borderColor:t==="error"?e.input.state.error.wrapper.borderColor:e.input.wrapper.borderColor,Tc=(e,t)=>t==="warning"?e.input.state.warning.wrapper.focus.outlineColor:t==="error"?e.input.state.error.wrapper.focus.outlineColor:e.input.wrapper.focus.outlineColor,Oc=(e,t)=>t==="warning"?e.input.state.warning.label.color:t==="error"?e.input.state.error.label.color:e.input.label.color,Mc=(e,t)=>t==="warning"?e.input.state.warning.input.color:t==="error"?e.input.state.error.input.color:e.input.input.color,Ac=(e,t)=>t==="warning"?e.input.state.warning.input.placeholderColor:t==="error"?e.input.state.error.input.placeholderColor:e.input.input.placeholderColor,Pc=(e,t,r)=>r?e.input.icon.disabled.color:t==="warning"?e.input.state.warning.icon.color:t==="error"?e.input.state.error.icon.color:e.input.icon.color,Dc=(e,t)=>t==="warning"?e.input.state.warning.icon.color:t==="error"?e.input.state.error.icon.color:e.input.toggle.color,Lc=I.div`
310
+ border: 0;
311
+ `,mr=s.div`
235
312
  display: flex;
236
313
  flex-direction: column;
237
314
  gap: 2px;
238
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
239
315
  min-width: 0;
240
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
241
- `,Nc=I.label`
242
- font-size: 11px;
316
+ `,wr=s.span`
317
+ font-size: 14px;
243
318
  font-weight: 500;
244
- line-height: 1.5;
245
- color: ${({theme:e,$state:t})=>Oc(e,t)};
246
- margin-left: 2px;
247
- `,Fc=I.div`
248
- display: grid;
249
- grid-template-columns: auto 1fr auto;
250
- align-items: center;
251
- height: 32px;
252
- padding: 0 12px;
253
- background-color: ${({theme:e,$state:t,$disabled:r})=>$c(e,t,r)};
254
- border-radius: 10px;
255
- border: 1px solid
256
- ${({theme:e,$state:t,$disabled:r})=>Ic(e,t,r)};
257
- transition: border-color 0.15s ease;
319
+ line-height: 1.4;
320
+ color: ${e=>ce(e.$variant).label.static};
258
321
 
259
- &:has(:focus-visible) {
260
- outline: 2px solid ${({theme:e,$state:t})=>Tc(e,t)};
261
- outline-offset: 1px;
322
+ label[data-disabled='true'] & {
323
+ color: ${e=>ce(e.$variant).label.disabled};
262
324
  }
263
-
264
- ${({$disabled:e})=>e&&`
265
- cursor: not-allowed;
266
- `}
267
- `,_c=I.input`
268
- grid-column: 2;
269
- width: 100%;
270
- height: 100%;
271
- font-size: 14px;
325
+ `,Cr=s.span`
326
+ font-size: 12px;
272
327
  font-weight: 400;
273
- line-height: 1.5;
274
- color: ${({theme:e,$state:t})=>Mc(e,t)};
275
- background-color: transparent;
276
- border: none;
277
- outline: none;
278
-
279
- &::placeholder {
280
- color: ${({theme:e,$state:t})=>Ac(e,t)};
281
- }
282
-
283
- &:disabled {
284
- color: ${({theme:e})=>e.input.input.disabled.color};
285
- cursor: not-allowed;
286
- }
287
-
288
- &::-webkit-outer-spin-button,
289
- &::-webkit-inner-spin-button {
290
- appearance: none;
291
- margin: 0;
292
- }
328
+ line-height: 1.4;
329
+ color: ${e=>ce(e.$variant).description.static};
293
330
 
294
- &[type='number'] {
295
- appearance: textfield;
331
+ label[data-disabled='true'] & {
332
+ color: ${e=>ce(e.$variant).description.disabled};
296
333
  }
297
- `,jc=I.span`
298
- display: flex;
299
- align-items: center;
300
- justify-content: center;
301
- margin-right: 8px;
302
- color: ${({theme:e,$state:t,$disabled:r})=>Pc(e,t,r)};
303
- `,Bc=I.button`
304
- display: grid;
305
- place-items: center;
306
- margin-left: 8px;
307
- padding: 0;
308
- background: none;
309
- border: none;
310
- cursor: pointer;
311
- color: ${({theme:e,$state:t})=>Dc(e,t)};
312
-
313
- ${({$disabled:e})=>e&&`
314
- opacity: 0.5;
315
- pointer-events: none;
316
- `}
317
- `,zc=I.svg`
318
- width: 16px;
319
- height: 16px;
320
- `,Wc=({onBlur:e,onFocus:t,type:r,value:o})=>{const[i,c]=_.useState(!1),l=r==="password";return{inputType:_.useMemo(()=>l&&i?"text":r,[l,i,r]),isPassword:l,isPasswordVisible:i,handleBlur:f=>{e==null||e(f)},handleFocus:f=>{t==null||t(f)},handlePasswordMouseDown:f=>{f.preventDefault(),o&&c(!0)},handlePasswordMouseUp:()=>{c(!1)}}},Qe=m.classNameGetter("input"),Vc=({className:e,classnames:t,fullWidth:r,icon:o,label:i,onChange:c,onBlur:l,onFocus:s,ref:d,state:a,type:u,value:h,...f})=>{const{inputType:b,isPassword:C,isPasswordVisible:g,handleBlur:y,handleFocus:p,handlePasswordMouseDown:v,handlePasswordMouseUp:k}=Wc({onBlur:l,onFocus:s,type:u,value:h}),S=g?wo.visible:wo.hidden,T=()=>o||null;return m.jsxs(Lc,{className:Qe("container",e,t==null?void 0:t.container),$fullWidth:r,children:[i&&m.jsx(Nc,{className:Qe("label",t==null?void 0:t.label),$state:a,children:i}),m.jsxs(Fc,{className:Qe("wrapper",t==null?void 0:t.wrapper),$state:a,$disabled:f.disabled,children:[o&&m.jsx(jc,{className:Qe("icon",t==null?void 0:t.icon),$disabled:f.disabled,$state:a,children:T()}),m.jsx(_c,{...f,ref:d,className:Qe("input",t==null?void 0:t.input),$state:a,type:b,value:h,onChange:c,onFocus:p,onBlur:y}),C&&m.jsx(Bc,{type:"button",className:Qe("toggle",t==null?void 0:t.toggle),$state:a,$disabled:f.disabled,onMouseDown:v,onMouseUp:k,onMouseLeave:k,tabIndex:-1,children:m.jsx(zc,{viewBox:"0 0 16 16",fill:"currentColor",children:S.map(M=>m.jsx("path",{d:M},M))})})]})]})};function Ze(e,t,r){let o=r.initialDeps??[],i,c=!0;function l(){var s,d,a;let u;r.key&&((s=r.debug)!=null&&s.call(r))&&(u=Date.now());const h=e();if(!(h.length!==o.length||h.some((C,g)=>o[g]!==C)))return i;o=h;let b;if(r.key&&((d=r.debug)!=null&&d.call(r))&&(b=Date.now()),i=t(...h),r.key&&((a=r.debug)!=null&&a.call(r))){const C=Math.round((Date.now()-u)*100)/100,g=Math.round((Date.now()-b)*100)/100,y=g/16,p=(v,k)=>{for(v=String(v);v.length<k;)v=" "+v;return v};console.info(`%c⏱ ${p(g,5)} /${p(C,5)} ms`,`
321
- font-size: .6rem;
322
- font-weight: bold;
323
- color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(c&&r.skipInitialOnChange)&&r.onChange(i),c=!1,i}return l.updateDeps=s=>{o=s},l}function yo(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Hc=(e,t)=>Math.abs(e-t)<1.01,Uc=(e,t,r)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),r)}},ko=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Kc=e=>e,Gc=e=>{const t=Math.max(e.startIndex-e.overscan,0),r=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let i=t;i<=r;i++)o.push(i);return o},qc=(e,t)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;const i=l=>{const{width:s,height:d}=l;t({width:Math.round(s),height:Math.round(d)})};if(i(ko(r)),!o.ResizeObserver)return()=>{};const c=new o.ResizeObserver(l=>{const s=()=>{const d=l[0];if(d!=null&&d.borderBoxSize){const a=d.borderBoxSize[0];if(a){i({width:a.inlineSize,height:a.blockSize});return}}i(ko(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return c.observe(r,{box:"border-box"}),()=>{c.unobserve(r)}},So={passive:!0},Ro=typeof window>"u"?!0:"onscrollend"in window,Xc=(e,t)=>{const r=e.scrollElement;if(!r)return;const o=e.targetWindow;if(!o)return;let i=0;const c=e.options.useScrollendEvent&&Ro?()=>{}:Uc(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),l=u=>()=>{const{horizontal:h,isRtl:f}=e.options;i=h?r.scrollLeft*(f&&-1||1):r.scrollTop,c(),t(i,u)},s=l(!0),d=l(!1);d(),r.addEventListener("scroll",s,So);const a=e.options.useScrollendEvent&&Ro;return a&&r.addEventListener("scrollend",d,So),()=>{r.removeEventListener("scroll",s),a&&r.removeEventListener("scrollend",d)}},Yc=(e,t,r)=>{if(t!=null&&t.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[r.options.horizontal?"inlineSize":"blockSize"])}return e[r.options.horizontal?"offsetWidth":"offsetHeight"]},Qc=(e,{adjustments:t=0,behavior:r},o)=>{var i,c;const l=e+t;(c=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||c.call(i,{[o.options.horizontal?"left":"top"]:l,behavior:r})};class Zc{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const o=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(i=>{i.forEach(c=>{const l=()=>{this._measureElement(c.target,c)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),r=null},observe:i=>{var c;return(c=o())==null?void 0:c.observe(i,{box:"border-box"})},unobserve:i=>{var c;return(c=o())==null?void 0:c.unobserve(i)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([o,i])=>{typeof i>"u"&&delete r[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Kc,rangeExtractor:Gc,onChange:()=>{},measureElement:Yc,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,r)},this.maybeNotify=Ze(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,c)=>{this.scrollAdjustments=0,this.scrollDirection=c?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=c,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,o)=>{const i=new Map,c=new Map;for(let l=o-1;l>=0;l--){const s=r[l];if(i.has(s.lane))continue;const d=c.get(s.lane);if(d==null||s.end>d.end?c.set(s.lane,s):s.end<d.end&&i.set(s.lane,!0),i.size===this.options.lanes)break}return c.size===this.options.lanes?Array.from(c.values()).sort((l,s)=>l.end===s.end?l.index-s.index:l.end-s.end)[0]:void 0},this.getMeasurementOptions=Ze(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,o,i,c,l,s)=>(this.prevLanes!==void 0&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:l,lanes:s}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=Ze(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:o,scrollMargin:i,getItemKey:c,enabled:l,lanes:s},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const f of this.laneAssignments.keys())f>=r&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const a=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const u=this.measurementsCache.slice(0,a),h=new Array(s).fill(void 0);for(let f=0;f<a;f++){const b=u[f];b&&(h[b.lane]=f)}for(let f=a;f<r;f++){const b=c(f),C=this.laneAssignments.get(f);let g,y;if(C!==void 0&&this.options.lanes>1){g=C;const S=h[g],T=S!==void 0?u[S]:void 0;y=T?T.end+this.options.gap:o+i}else{const S=this.options.lanes===1?u[f-1]:this.getFurthestMeasurement(u,f);y=S?S.end+this.options.gap:o+i,g=S?S.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,g)}const p=d.get(b),v=typeof p=="number"?p:this.options.estimateSize(f),k=y+v;u[f]={index:f,start:y,size:v,end:k,key:b,lane:g},h[g]=f}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Ze(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,o,i,c)=>this.range=r.length>0&&o>0?Jc({measurements:r,outerSize:o,scrollOffset:i,lanes:c}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Ze(()=>{let r=null,o=null;const i=this.calculateRange();return i&&(r=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,o]},(r,o,i,c,l)=>c===null||l===null?[]:r({startIndex:c,endIndex:l,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=r=>{const o=this.options.indexAttribute,i=r.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(r,o)=>{const i=this.indexFromElement(r),c=this.measurementsCache[i];if(!c)return;const l=c.key,s=this.elementsCache.get(l);s!==r&&(s&&this.observer.unobserve(s),this.observer.observe(r),this.elementsCache.set(l,r)),r.isConnected&&this.resizeItem(i,this.options.measureElement(r,o,this))},this.resizeItem=(r,o)=>{const i=this.measurementsCache[r];if(!i)return;const c=this.itemSizeCache.get(i.key)??i.size,l=o-c;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,l,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",l),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(r,void 0)},this.getVirtualItems=Ze(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,o)=>{const i=[];for(let c=0,l=r.length;c<l;c++){const s=r[c],d=o[s];i.push(d)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const o=this.getMeasurements();if(o.length!==0)return yo(o[Cn(0,o.length-1,i=>yo(o[i]).start,r)])},this.getOffsetForAlignment=(r,o,i=0)=>{const c=this.getSize(),l=this.getScrollOffset();o==="auto"&&(o=r>=l+c?"end":"start"),o==="center"?r+=(i-c)/2:o==="end"&&(r-=c);const s=this.getTotalSize()+this.options.scrollMargin-c;return Math.max(Math.min(s,r),0)},this.getOffsetForIndex=(r,o="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const i=this.measurementsCache[r];if(!i)return;const c=this.getSize(),l=this.getScrollOffset();if(o==="auto")if(i.end>=l+c-this.options.scrollPaddingEnd)o="end";else if(i.start<=l+this.options.scrollPaddingStart)o="start";else return[l,o];const s=o==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,o,i.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:o="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(r,{align:o="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1));let c=0;const l=10,s=a=>{if(!this.targetWindow)return;const u=this.getOffsetForIndex(r,a);if(!u){console.warn("Failed to get offset for index:",r);return}const[h,f]=u;this._scrollToOffset(h,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const b=this.getScrollOffset(),C=this.getOffsetForIndex(r,f);if(!C){console.warn("Failed to get offset for index:",r);return}Hc(C[0],b)||d(f)})},d=a=>{this.targetWindow&&(c++,c<l?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",c,l),this.targetWindow.requestAnimationFrame(()=>s(a))):console.warn(`Failed to scroll to index ${r} after ${l} attempts.`))};s(o)},this.scrollBy=(r,{behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var r;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((r=o[o.length-1])==null?void 0:r.end)??0;else{const c=Array(this.options.lanes).fill(null);let l=o.length-1;for(;l>=0&&c.some(s=>s===null);){const s=o[l];c[s.lane]===null&&(c[s.lane]=s.end),l--}i=Math.max(...c.filter(s=>s!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:o,behavior:i})=>{this.options.scrollToFn(r,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const Cn=(e,t,r,o)=>{for(;e<=t;){const i=(e+t)/2|0,c=r(i);if(c<o)e=i+1;else if(c>o)t=i-1;else return i}return e>0?e-1:0};function Jc({measurements:e,outerSize:t,scrollOffset:r,lanes:o}){const i=e.length-1,c=d=>e[d].start;if(e.length<=o)return{startIndex:0,endIndex:i};let l=Cn(0,i,c,r),s=l;if(o===1)for(;s<i&&e[s].end<r+t;)s++;else if(o>1){const d=Array(o).fill(0);for(;s<i&&d.some(u=>u<r+t);){const u=e[s];d[u.lane]=u.end,s++}const a=Array(o).fill(r+t);for(;l>=0&&a.some(u=>u>=r);){const u=e[l];a[u.lane]=u.start,l--}l=Math.max(0,l-l%o),s=Math.min(i,s+(o-1-s%o))}return{startIndex:l,endIndex:s}}const Eo=typeof document<"u"?w.useLayoutEffect:w.useEffect;function es(e){const t=w.useReducer(()=>({}),{})[1],r={...e,onChange:(i,c)=>{var l;c?ft.flushSync(t):t(),(l=e.onChange)==null||l.call(e,i,c)}},[o]=w.useState(()=>new Zc(r));return o.setOptions(r),Eo(()=>o._didMount(),[]),Eo(()=>o._willUpdate()),o}function vn(e){return es({observeElementRect:qc,observeElementOffset:Xc,scrollToFn:Qc,...e})}const ts="Select...",rs="Search...",os="No options",wn="bottom",ns=256,is=32,ls=4,cs=(e,t,r)=>r?e.multiSelect.trigger.disabled.backgroundColor:t==="warning"?e.multiSelect.state.warning.trigger.backgroundColor:t==="error"?e.multiSelect.state.error.trigger.backgroundColor:e.multiSelect.trigger.backgroundColor,ss=(e,t,r)=>r?e.multiSelect.trigger.disabled.borderColor:t==="warning"?e.multiSelect.state.warning.trigger.borderColor:t==="error"?e.multiSelect.state.error.trigger.borderColor:e.multiSelect.trigger.borderColor,as=(e,t)=>t==="warning"?e.multiSelect.state.warning.trigger.focus.outlineColor:t==="error"?e.multiSelect.state.error.trigger.focus.outlineColor:e.multiSelect.trigger.focus.outlineColor,us=(e,t)=>t==="warning"?e.multiSelect.state.warning.label.color:t==="error"?e.multiSelect.state.error.label.color:e.multiSelect.label.color,ds=(e,t)=>t?e.multiSelect.placeholder.disabled.color:e.multiSelect.placeholder.color,fs=(e,t,r)=>r?e.multiSelect.chip.disabled.backgroundColor:t==="warning"?e.multiSelect.state.warning.chip.backgroundColor:t==="error"?e.multiSelect.state.error.chip.backgroundColor:e.multiSelect.chip.backgroundColor,gs=(e,t,r)=>r?e.multiSelect.chip.disabled.color:t==="warning"?e.multiSelect.state.warning.chip.color:t==="error"?e.multiSelect.state.error.chip.color:e.multiSelect.chip.color,hs=(e,t,r)=>r?e.multiSelect.chip.disabled.remove.color:t==="warning"?e.multiSelect.state.warning.chip.remove.color:t==="error"?e.multiSelect.state.error.chip.remove.color:e.multiSelect.chip.remove.color,ps=(e,t,r)=>r?e.multiSelect.icon.disabled.color:t==="warning"?e.multiSelect.state.warning.icon.color:t==="error"?e.multiSelect.state.error.icon.color:e.multiSelect.icon.color,bs=(e,t,r)=>r?e.multiSelect.chevron.disabled.color:t==="warning"?e.multiSelect.state.warning.chevron.color:t==="error"?e.multiSelect.state.error.chevron.color:e.multiSelect.chevron.color,xs=I.div`
334
+ `,Fe=I.newClassNameGetter("checkbox-card"),Rr=({checked:e,className:o,classnames:r,description:i,disabled:n,fullWidth:l=!1,label:c,onChange:d,ref:p,variant:h="normal",...u})=>a.jsxs(yr,{className:Fe("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:h,"data-disabled":n,children:[a.jsx(vr,{...u,ref:p,type:"checkbox",checked:e,disabled:n,onChange:d}),a.jsx(Je,{className:r==null?void 0:r.checkbox,checked:e,disabled:n,variant:h,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),a.jsxs(mr,{className:Fe("content",r==null?void 0:r.content),children:[a.jsx(wr,{className:Fe("label",r==null?void 0:r.label),$variant:h,children:c}),i&&a.jsx(Cr,{className:Fe("description",r==null?void 0:r.description),$variant:h,children:i})]})]}),At={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},kr=s.div`
324
335
  display: flex;
325
336
  flex-direction: column;
326
- gap: 2px;
327
- position: relative;
328
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
329
- min-width: 120px;
330
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
331
- `,ms=I.label`
332
- font-size: 11px;
337
+ gap: 8px;
338
+ `,Lr=s.span`
339
+ font-size: 13px;
333
340
  font-weight: 500;
334
341
  line-height: 1.5;
335
- color: ${({theme:e,$state:t})=>us(e,t)};
336
- margin-left: 2px;
337
- `,Cs=I.button`
342
+ color: ${e=>e.$disabled?At.label.disabledColor:At.label.color};
343
+ margin-bottom: 4px;
344
+ `,zr=s.div`
338
345
  display: flex;
346
+ flex-direction: column;
347
+ gap: 12px;
348
+ `,tt=I.newClassNameGetter("checkbox-group"),Pr=({className:e,classnames:o,disabled:r,label:i,onChange:n,options:l,ref:c,value:d,...p})=>{const h=(u,f)=>{n(f?[...d,u]:d.filter(O=>O!==u))};return a.jsxs(kr,{...p,ref:c,className:tt("container",e),children:[i&&a.jsx(Lr,{className:tt("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx(zr,{className:tt("options",o==null?void 0:o.options),children:l.map(u=>a.jsx(Je,{className:o==null?void 0:o.checkbox,checked:d.includes(u.value),label:u.label,disabled:r,onChange:f=>h(u.value,f.target.checked)},u.value))})]})},Dt={gray:{background:t.alpha(t.COLORS["iron-grey"],10),color:t.COLORS["iron-grey"],deleteHover:t.alpha(t.COLORS["iron-grey"],20)},red:{background:t.alpha(t.COLORS.red,10),color:t.COLORS.red,deleteHover:t.alpha(t.COLORS.red,20)},blue:{background:t.alpha(t.COLORS["steel-blue"],10),color:t.COLORS["steel-blue"],deleteHover:t.alpha(t.COLORS["steel-blue"],20)},black:{background:t.COLORS.black,color:t.COLORS.white,deleteHover:t.alpha(t.COLORS.white,20)}},$t=e=>Dt[e]??Dt.gray,jr=s.span`
349
+ display: inline-flex;
339
350
  align-items: center;
340
- min-height: 32px;
341
- padding: 4px 12px 4px 8px;
342
- background-color: ${({theme:e,$state:t,$disabled:r})=>cs(e,t,r)};
343
- border-radius: 10px;
344
- border: 1px solid
345
- ${({theme:e,$state:t,$disabled:r})=>ss(e,t,r)};
346
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
347
- transition: border-color 0.15s ease;
348
- font-family: inherit;
349
- text-align: left;
350
- width: 100%;
351
351
  gap: 4px;
352
-
353
- &:focus-visible {
354
- outline: 2px solid ${({theme:e,$state:t})=>as(e,t)};
355
- outline-offset: 1px;
356
- }
357
- `,vs=I.span`
358
- display: flex;
359
- align-items: center;
360
- justify-content: center;
361
- flex-shrink: 0;
362
- color: ${({theme:e,$state:t,$disabled:r})=>ps(e,t,r)};
363
- `,ws=I.div`
364
- display: flex;
365
- flex-wrap: wrap;
366
- gap: 4px;
367
- flex: 1;
368
- min-width: 0;
369
- min-height: 24px;
370
- align-items: center;
371
- `,ys=I.span`
372
- display: inline-flex;
373
- align-items: center;
352
+ padding: 0 ${e=>e.$deletable?"7px":"10px"} 0 10px;
353
+ border-radius: 12px;
374
354
  height: 24px;
375
- padding: 0 4px 0 8px;
376
- border-radius: 6px;
377
- font-size: 13px;
378
- font-weight: 400;
379
- min-width: 0;
380
- max-width: 100%;
381
- background-color: ${({theme:e,$state:t,$disabled:r})=>fs(e,t,r)};
382
- color: ${({theme:e,$state:t,$disabled:r})=>gs(e,t,r)};
383
- `,ks=I.span`
384
- flex: 1;
385
- min-width: 0;
386
- overflow: hidden;
387
- text-overflow: ellipsis;
388
- white-space: nowrap;
389
- `,Ss=I.span`
390
- display: flex;
355
+ font-size: 12px;
356
+ font-weight: 500;
357
+ line-height: 1.5;
358
+ background-color: ${e=>$t(e.$variant).background};
359
+ color: ${e=>$t(e.$variant).color};
360
+ `,Er=s.button`
361
+ display: inline-flex;
391
362
  align-items: center;
392
363
  justify-content: center;
393
- width: 16px;
394
- height: 16px;
395
- margin-left: 4px;
364
+ padding: 0;
365
+ margin: 0;
366
+ margin-left: 2px;
367
+ border: none;
368
+ background: transparent;
369
+ color: inherit;
370
+ cursor: pointer;
396
371
  border-radius: 4px;
397
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
398
- color: ${({theme:e,$state:t,$disabled:r})=>hs(e,t,r)};
399
- transition: color 0.15s ease;
372
+ transition: background-color 0.15s ease;
400
373
 
401
374
  &:hover {
402
- color: ${({theme:e,$disabled:t})=>t?e.multiSelect.chip.disabled.remove.color:e.multiSelect.chip.remove.hover.color};
375
+ background-color: ${e=>$t(e.$variant).deleteHover};
403
376
  }
404
- `,Rs=I.span`
405
- font-size: 14px;
406
- font-weight: 400;
407
- line-height: 1.5;
408
- color: ${({theme:e,$disabled:t})=>ds(e,t)};
409
- `,Es=I.span`
410
- display: flex;
411
- align-items: center;
412
- justify-content: center;
413
- flex-shrink: 0;
414
- margin-left: auto;
415
- color: ${({theme:e,$state:t,$disabled:r})=>bs(e,t,r)};
416
- transition: transform 0.15s ease;
417
- transform: ${({$isOpen:e})=>e?"rotate(180deg)":"rotate(0deg)"};
418
- `,$s=I.div`
419
- z-index: 1000;
420
- max-height: ${({$maxHeight:e})=>e}px;
421
- overflow: hidden;
422
- border-radius: 12px;
423
- border: 1px solid ${({theme:e})=>e.multiSelect.content.borderColor};
424
- background-color: ${({theme:e})=>e.multiSelect.content.backgroundColor};
425
- box-shadow: ${({theme:e})=>e.multiSelect.content.shadow};
426
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
427
- opacity: ${({$isOpen:e})=>e?1:0};
428
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
429
- transition:
430
- opacity 0.15s ease,
431
- visibility 0.15s ease;
432
- `,Is=I.div`
433
- border-bottom: 1px solid ${({theme:e})=>e.multiSelect.search.borderColor};
434
- `,Ts=I.input`
435
- width: 100%;
436
- height: 32px;
437
- padding: 0 12px;
438
- font-size: 14px;
439
- font-weight: 500;
440
- line-height: 1.5;
441
- font-family: inherit;
442
- color: ${({theme:e})=>e.multiSelect.search.color};
443
- background-color: transparent;
444
- outline: none;
445
- border: 0;
446
377
 
447
- &::placeholder {
448
- color: ${({theme:e})=>e.multiSelect.search.placeholderColor};
378
+ & svg {
379
+ width: 14px;
380
+ height: 14px;
449
381
  }
450
- `,$o=I.div`
451
- padding: 4px;
452
- overflow-y: auto;
453
- max-height: inherit;
454
- `,Io=I.div`
455
- display: flex;
456
- align-items: center;
457
- height: 32px;
458
- padding: 0 12px;
459
- font-size: 14px;
460
- font-weight: 400;
461
- line-height: 1.5;
462
- border-radius: 8px;
463
- cursor: pointer;
464
- transition: background-color 0.1s ease;
465
- color: ${({theme:e})=>e.multiSelect.option.color};
466
- background-color: ${({theme:e,$isHighlighted:t})=>t?e.multiSelect.option.hover.backgroundColor:e.multiSelect.option.backgroundColor};
467
-
468
- &:hover {
469
- background-color: ${({theme:e})=>e.multiSelect.option.hover.backgroundColor};
382
+ `,Tr=s.span`
383
+ flex: 1 0 auto;
384
+ text-align: center;
385
+ `,ot=I.newClassNameGetter("chip"),Ke=({children:e,className:o,classnames:r,deletable:i,onDelete:n,ref:l,variant:c="gray",...d})=>a.jsxs(jr,{...d,ref:l,className:ot("container",o),$variant:c,$deletable:!!i,children:[a.jsx(Tr,{className:ot("label",r==null?void 0:r.label),children:e}),i&&a.jsx(Er,{type:"button",className:ot("delete",r==null?void 0:r.delete),$variant:c,onClick:n,children:a.jsx(a.X,{})})]}),Nr="Confirm",Ir="Cancel",Ar=ie.keyframes`
386
+ from {
387
+ opacity: 0;
388
+ transform: translateX(-50%) translateY(100%);
389
+ }
390
+ to {
391
+ opacity: 1;
392
+ transform: translateX(-50%) translateY(0);
470
393
  }
471
- `,To=I.span`
394
+ `,Dr=ie.keyframes`
395
+ from {
396
+ opacity: 1;
397
+ transform: translateX(-50%) translateY(0);
398
+ }
399
+ to {
400
+ opacity: 0;
401
+ transform: translateX(-50%) translateY(100%);
402
+ }
403
+ `,_r=s.div`
404
+ position: fixed;
405
+ bottom: 24px;
406
+ left: 50%;
407
+ transform: translateX(-50%);
472
408
  display: flex;
473
409
  align-items: center;
474
- justify-content: center;
475
- width: 16px;
476
- height: 16px;
477
- margin-right: 8px;
478
- flex-shrink: 0;
479
- color: ${({theme:e})=>e.multiSelect.option.check.color};
480
- opacity: ${({$isSelected:e})=>e?1:.15};
481
- `,Oo=I.span`
482
- flex: 1;
483
- min-width: 0;
484
- overflow: hidden;
485
- text-overflow: ellipsis;
410
+ gap: 16px;
411
+ padding: 12px 16px;
412
+ background-color: ${t.COLORS.white};
413
+ border: 1px dashed ${t.COLORS.gray};
414
+ border-radius: 12px;
415
+ box-shadow:
416
+ 0 4px 6px -1px rgba(0, 0, 0, 0.1),
417
+ 0 2px 4px -2px rgba(0, 0, 0, 0.1);
418
+ animation: ${({$open:e})=>e?Ar:Dr} 0.2s ease-out forwards;
419
+ z-index: 1000;
420
+ `,Mr=s.p`
421
+ margin: 0;
422
+ font-size: 14px;
423
+ color: ${t.COLORS.black};
486
424
  white-space: nowrap;
487
- `,Os=I.div`
425
+ `,Fr=s.div`
488
426
  display: flex;
489
427
  align-items: center;
490
- justify-content: center;
491
- height: 64px;
492
- font-size: 14px;
493
- font-weight: 400;
494
- color: ${({theme:e})=>e.multiSelect.empty.color};
495
- `,Ms=e=>`${e}-start`,As=({options:e,value:t,onChange:r,placement:o=wn,searchable:i=!1,disabled:c=!1})=>{const[l,s]=_.useState(!1),[d,a]=_.useState(""),[u,h]=_.useState(null),f=_.useRef([]),b=_.useRef(null),C=_.useMemo(()=>e.filter(x=>t.includes(x.value)),[e,t]),g=_.useMemo(()=>{if(!i||!d)return e;const x=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(x))},[e,d,i]),y=_.useCallback(x=>{c||(s(x),x||(a(""),h(null)))},[c]),p=_.useMemo(()=>Ms(o),[o]),{refs:v,floatingStyles:k,context:S}=Ar({open:l,onOpenChange:y,placement:p,middleware:[Sr(ls),Er(),Rr({padding:8}),fn({apply({rects:x,elements:E}){Object.assign(E.floating.style,{width:`${x.reference.width}px`})}})],whileElementsMounted:kr}),T=Or(S,{enabled:!c}),M=Mr(S),N=mn(S,{role:"listbox"}),B=xn(S,{listRef:f,activeIndex:u,onNavigate:h,virtual:!0,loop:!0}),X=_.useCallback(x=>t.includes(x),[t]),O=_.useCallback(x=>{const E=t.includes(x.value);r(E?t.filter(A=>A!==x.value):[...t,x.value])},[t,r]),F=_.useCallback((x,E)=>{E.stopPropagation(),r(t.filter(A=>A!==x))},[t,r]),{getReferenceProps:G,getFloatingProps:V,getItemProps:R}=Pr([T,M,N,B]),$=_.useCallback(()=>{const x=G(),E=x.onKeyDown;return{...x,onKeyDown:A=>{if(E==null||E(A),A.key==="Enter"&&l&&u!==null){A.preventDefault();const ee=g[u];ee&&O(ee)}A.key==="Backspace"&&!i&&t.length>0&&(A.preventDefault(),r(t.slice(0,-1)))}}},[G,l,u,g,O,i,t,r]),j=_.useCallback(x=>{a(x.target.value),h(0)},[]),L=_.useCallback(x=>{if(x.key==="Enter"&&u!==null){x.preventDefault();const E=g[u];E&&O(E)}x.key==="Backspace"&&d===""&&t.length>0&&(x.preventDefault(),r(t.slice(0,-1)))},[u,g,O,d,t,r]);return{isOpen:l,setIsOpen:y,selectedOptions:C,filteredOptions:g,searchQuery:d,setSearchQuery:a,highlightedIndex:u,context:S,refs:{setReference:v.setReference,setFloating:v.setFloating},floatingStyles:k,getReferenceProps:$,getFloatingProps:V,getItemProps:x=>R({onClick:()=>{const E=g[x];E&&O(E)},onKeyDown:E=>{if(E.key==="Enter"||E.key===" "){E.preventDefault();const A=g[x];A&&O(A)}}}),listRef:f,handleToggle:O,handleRemove:F,handleSearchChange:j,handleSearchKeyDown:L,searchInputRef:b,isSelected:X}},ve=m.classNameGetter("multiselect"),Ps=({options:e,value:t,onChange:r,placeholder:o=ts,searchPlaceholder:i=rs,emptyMessage:c=os,label:l,icon:s,state:d,disabled:a,fullWidth:u,placement:h=wn,maxHeight:f=ns,virtualized:b,searchable:C,portalRenderNode:g,className:y,classnames:p,...v})=>{const k=_.useRef(null),{isOpen:S,selectedOptions:T,filteredOptions:M,searchQuery:N,context:B,refs:X,floatingStyles:O,getReferenceProps:F,getFloatingProps:G,getItemProps:V,listRef:R,handleSearchChange:$,handleSearchKeyDown:j,handleRemove:L,searchInputRef:x,highlightedIndex:E,isSelected:A}=As({options:e,value:t,onChange:r,placement:h,searchable:C,disabled:a}),ue=f-(C?56:0)-8,z=vn({count:M.length,getScrollElement:()=>k.current,estimateSize:()=>is,overscan:5,enabled:b}),Y=()=>M.length===0?m.jsx(Os,{className:ve("empty",p==null?void 0:p.empty),children:c}):b?m.jsx($o,{ref:k,className:ve("list",p==null?void 0:p.list),style:{maxHeight:ue,overflow:"auto"},children:m.jsx("div",{style:{height:z.getTotalSize(),width:"100%",position:"relative"},children:z.getVirtualItems().map(q=>{const ne=M[q.index];if(!ne)return null;const Ee=A(ne.value);return m.jsxs(Io,{ref:Ce=>{R.current[q.index]=Ce},className:ve("option",p==null?void 0:p.option),$isHighlighted:E===q.index,style:{position:"absolute",top:0,left:0,width:"100%",height:q.size,transform:`translateY(${q.start}px)`},...V(q.index),children:[m.jsx(To,{$isSelected:Ee,children:m.jsx(m.Check,{size:16})}),m.jsx(Oo,{children:ne.label})]},ne.value)})})}):m.jsx($o,{ref:k,className:ve("list",p==null?void 0:p.list),style:{maxHeight:ue},children:M.map((q,ne)=>{const Ee=A(q.value);return m.jsxs(Io,{ref:Ce=>{R.current[ne]=Ce},className:ve("option",p==null?void 0:p.option),$isHighlighted:E===ne,...V(ne),children:[m.jsx(To,{$isSelected:Ee,children:m.jsx(m.Check,{size:16})}),m.jsx(Oo,{children:q.label})]},q.value)})}),H=()=>{if(!S)return null;const q=m.jsx(bn,{context:B,initialFocus:C?x:void 0,modal:!1,children:m.jsxs($s,{ref:X.setFloating,className:ve("content",p==null?void 0:p.content),style:O,$isOpen:S,$maxHeight:f,...G(),children:[C&&m.jsx(Is,{className:ve("search",p==null?void 0:p.search),children:m.jsx(Ts,{ref:x,type:"text",placeholder:i,value:N,onChange:$,onKeyDown:j,onClick:ne=>ne.stopPropagation()})}),Y()]})});return g?ft.createPortal(q,g):q},te=()=>T.length===0?m.jsx(Rs,{$disabled:a,children:o}):T.map(q=>m.jsxs(ys,{className:ve("chip",p==null?void 0:p.chip),$state:d,$disabled:a,children:[m.jsx(ks,{children:q.label}),m.jsx(Ss,{role:"button",tabIndex:a?-1:0,className:ve("chip-remove",p==null?void 0:p.chipRemove),$state:d,$disabled:a,onClick:ne=>!a&&L(q.value,ne),onKeyDown:ne=>{!a&&(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),L(q.value,ne))},"aria-label":`Remove ${q.label}`,children:m.jsx(m.X,{size:12})})]},q.value));return m.jsxs(xs,{...v,className:ve("container",y,p==null?void 0:p.container),$fullWidth:u,children:[l&&m.jsx(ms,{className:ve("label",p==null?void 0:p.label),$state:d,children:l}),m.jsxs(Cs,{ref:X.setReference,type:"button",className:ve("trigger",p==null?void 0:p.trigger),$state:d,$disabled:a,$isOpen:S,$hasValue:T.length>0,disabled:a,"aria-haspopup":"listbox","aria-expanded":S,...F(),children:[s&&m.jsx(vs,{$state:d,$disabled:a,children:s}),m.jsx(ws,{className:ve("chips",p==null?void 0:p.chips),children:te()}),m.jsx(Es,{$state:d,$disabled:a,$isOpen:S,children:m.jsx(m.ChevronDown,{size:16})})]}),H()]})},Ds=(e,t,r)=>t?r==="warning"?e.radio.state.warning.circle.checked.borderColor:r==="error"?e.radio.state.error.circle.checked.borderColor:e.radio.circle.checked.borderColor:r==="warning"?e.radio.state.warning.circle.borderColor:r==="error"?e.radio.state.error.circle.borderColor:e.radio.circle.borderColor,Ls=(e,t)=>t==="warning"?e.radio.state.warning.circle.focus.shadowColor:t==="error"?e.radio.state.error.circle.focus.shadowColor:e.radio.circle.focus.shadowColor,Ns=(e,t)=>t==="warning"?e.radio.state.warning.dot.color:t==="error"?e.radio.state.error.dot.color:e.radio.dot.color,Fs=(e,t)=>t==="warning"?e.radio.state.warning.label.color:t==="error"?e.radio.state.error.label.color:e.radio.label.color,_s=I.label`
496
- display: inline-flex;
497
- align-items: center;
498
428
  gap: 8px;
499
- cursor: pointer;
429
+ `,ke=I.newClassNameGetter("confirmation"),Br=({cancelBindings:e,cancelLabel:o=Ir,className:r,classnames:i,confirmLabel:n=Nr,loading:l=!1,message:c,onCancel:d,onConfirm:p,open:h=!0,ref:u,submitBindings:f,...O})=>h?a.jsxs(_r,{...O,ref:u,className:ke("container",r),$open:h,children:[a.jsx(Mr,{className:ke("message",i==null?void 0:i.message),children:c}),a.jsxs(Fr,{className:ke("actions",i==null?void 0:i.actions),children:[a.jsx(Ie,{variant:"system",size:"compact",onClick:d,keyBindings:e,className:ke("cancel-button",i==null?void 0:i.cancelButton),children:o}),a.jsx(Ie,{variant:"danger",size:"compact",onClick:p,loading:l,keyBindings:f,className:ke("confirm-button",i==null?void 0:i.confirmButton),children:n})]})]}):null,Le={sm:`${t.BREAKPOINTS.sm}px`,md:`${t.BREAKPOINTS.md}px`,lg:`${t.BREAKPOINTS.lg}px`,xl:`${t.BREAKPOINTS.xl}px`,"2xl":`${t.BREAKPOINTS["2xl"]}px`},Yr=s.div`
430
+ width: 100%;
500
431
 
501
- &:has(input:focus-visible) > span:first-of-type {
502
- box-shadow: 0 0 0 3px ${({theme:e,$state:t})=>Ls(e,t)};
432
+ ${t.mediaUp("sm")} {
433
+ max-width: ${Le.sm};
503
434
  }
504
435
 
505
- ${({$disabled:e})=>e&&`
506
- opacity: 0.5;
507
- cursor: not-allowed;
508
- `}
509
- `,js=I.input`
510
- position: absolute;
511
- opacity: 0;
512
- width: 0;
513
- height: 0;
514
- pointer-events: none;
515
- `,Bs=I.span`
516
- display: inline-flex;
517
- align-items: center;
518
- justify-content: center;
519
- width: 18px;
520
- height: 18px;
521
- border-radius: 50%;
522
- border: 1.5px solid
523
- ${({theme:e,$checked:t,$state:r})=>Ds(e,t,r)};
524
- background-color: transparent;
525
- transition:
526
- border-color 0.15s ease,
527
- box-shadow 0.15s ease;
528
- `,zs=I.span`
529
- width: 10px;
530
- height: 10px;
531
- border-radius: 50%;
532
- background-color: ${({theme:e,$state:t})=>Ns(e,t)};
533
- opacity: ${({$visible:e})=>e?1:0};
534
- transform: ${({$visible:e})=>e?"scale(1)":"scale(0)"};
535
- transition:
536
- opacity 0.15s ease,
537
- transform 0.15s ease;
538
- `,Ws=I.span`
539
- font-size: 14px;
540
- line-height: 1.5;
541
- color: ${({theme:e,$state:t})=>Fs(e,t)};
542
- user-select: none;
436
+ ${t.mediaUp("md")} {
437
+ max-width: ${Le.md};
438
+ }
439
+
440
+ ${t.mediaUp("lg")} {
441
+ max-width: ${Le.lg};
442
+ }
443
+
444
+ ${t.mediaUp("xl")} {
445
+ max-width: ${Le.xl};
446
+ }
447
+
448
+ ${t.mediaUp("2xl")} {
449
+ max-width: ${Le["2xl"]};
450
+ }
451
+ `,Hr=I.newClassNameGetter("container"),Gr=({children:e,className:o,ref:r,...i})=>a.jsx(Yr,{...i,ref:r,className:Hr("container",o),children:e}),qe={compact:{height:"32px",padding:"0 10px",radius:"14px",iconSize:16},default:{height:"40px",padding:"0 14px",radius:"16px",iconSize:20}},$e={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},ne=36,Qe=2,Vr=12,fo=(e,o,r="en")=>{const i=e.getFullYear(),n=e.getMonth(),l=e.getDate(),c=e.getHours(),d=e.getMinutes(),p=e.getSeconds(),h=c%12||12,u=c>=12,f=new Intl.DateTimeFormat(r,{month:"long"}).format(e),O=new Intl.DateTimeFormat(r,{month:"short"}).format(e),k=new Intl.DateTimeFormat(r,{weekday:"long"}).format(e),y=new Intl.DateTimeFormat(r,{weekday:"short"}).format(e),S=L=>L.toString().padStart(2,"0"),$=L=>L.toString().padStart(2," "),x=L=>`\0${L}\0`,v=[["2006","YEARFOUR",i.toString()],["January","MONTHLONG",f],["Monday","WEEKDAYLONG",k],["Jan","MONTHSHORT",O],["Mon","WEEKDAYSHORT",y],["06","YEARTWO",i.toString().slice(-2)],["01","MONTHPAD",S(n+1)],["_2","DAYSPACE",$(l)],["02","DAYPAD",S(l)],["15","HOURTWENTYFOUR",S(c)],["03","HOURTWELVEPAD",S(h)],["04","MINUTE",S(d)],["05","SECOND",S(p)],["PM","AMPMUP",u?"PM":"AM"],["pm","AMPMLOW",u?"pm":"am"],["1","MONTH",(n+1).toString()],["2","DAY",l.toString()],["3","HOURTWELVE",h.toString()]];let b=o;for(const[L,j]of v)b=b.split(L).join(x(j));for(const[,L,j]of v)b=b.split(x(L)).join(j);return b},Wr=(e,o)=>new Date(e,o+1,0).getDate(),Ur=(e,o)=>new Date(e,o,1).getDay(),Xr=(e,o,r=1)=>{const i=Wr(e,o);let l=Ur(e,o)-r;l<0&&(l+=7);const c=[];for(let d=0;d<l;d++)c.push(null);for(let d=1;d<=i;d++)c.push(d);for(;c.length<42;)c.push(null);return c},qr=(e,o=1)=>{const r=[];for(let i=0;i<7;i++){const n=(o+i)%7,l=new Date(2024,0,7+n);r.push(new Intl.DateTimeFormat(e,{weekday:"short"}).format(l))}return r},Kr=e=>{const o=[];for(let r=0;r<12;r++){const i=new Date(2024,r,1);o.push(new Intl.DateTimeFormat(e,{month:"short"}).format(i))}return o},_t=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate(),Mt=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth(),Zr=(e,o)=>e.getFullYear()===o.getFullYear(),Ft=(e,o,r,i,n)=>{const l=new Date(e,o,r);if(i){const c=new Date(i.getFullYear(),i.getMonth(),i.getDate());if(l<c)return!0}if(n){const c=new Date(n.getFullYear(),n.getMonth(),n.getDate());if(l>c)return!0}return!1},Bt=(e,o,r,i)=>{if(r){const n=r.getFullYear(),l=r.getMonth();if(e<n||e===n&&o<l)return!0}if(i){const n=i.getFullYear(),l=i.getMonth();if(e>n||e===n&&o>l)return!0}return!1},Yt=(e,o,r)=>!!(o&&e<o.getFullYear()||r&&e>r.getFullYear()),Jr=(e,o=12)=>{const r=e-Math.floor(o/2),i=[];for(let n=0;n<o;n++)i.push(r+n);return i},Qr=e=>{switch(e){case"date":return"02.01.2006";case"month":return"January 2006";case"year":return"2006"}},ei=s.span`
452
+ font-size: 12px;
543
453
  font-weight: 500;
544
- `,st=m.classNameGetter("radio"),Dr=({checked:e,className:t,classnames:r,disabled:o,label:i,onChange:c,ref:l,state:s,...d})=>m.jsxs(_s,{className:st("container",t,r==null?void 0:r.container),$disabled:o,$state:s,children:[m.jsx(js,{...d,ref:l,type:"radio",className:st("input",r==null?void 0:r.input),checked:e,disabled:o,onChange:c}),m.jsx(Bs,{className:st("circle",r==null?void 0:r.circle),$checked:e,$state:s,children:m.jsx(zs,{className:st("dot",r==null?void 0:r.dot),$visible:e,$state:s})}),i&&m.jsx(Ws,{className:st("label",r==null?void 0:r.label),$state:s,children:i})]}),Vs="Select...",Hs="Search...",Us="No options",yn="bottom",Ks=256,Gs=32,qs=4,Xs=(e,t,r)=>r?e.select.trigger.disabled.backgroundColor:t==="warning"?e.select.state.warning.trigger.backgroundColor:t==="error"?e.select.state.error.trigger.backgroundColor:e.select.trigger.backgroundColor,Ys=(e,t,r)=>r?e.select.trigger.disabled.borderColor:t==="warning"?e.select.state.warning.trigger.borderColor:t==="error"?e.select.state.error.trigger.borderColor:e.select.trigger.borderColor,Qs=(e,t)=>t==="warning"?e.select.state.warning.trigger.focus.outlineColor:t==="error"?e.select.state.error.trigger.focus.outlineColor:e.select.trigger.focus.outlineColor,Zs=(e,t)=>t==="warning"?e.select.state.warning.label.color:t==="error"?e.select.state.error.label.color:e.select.label.color,Js=(e,t,r,o)=>r?e.select.value.disabled.color:o?t==="warning"?e.select.state.warning.value.placeholderColor:t==="error"?e.select.state.error.value.placeholderColor:e.select.value.placeholderColor:t==="warning"?e.select.state.warning.value.color:t==="error"?e.select.state.error.value.color:e.select.value.color,ea=(e,t,r)=>r?e.select.icon.disabled.color:t==="warning"?e.select.state.warning.icon.color:t==="error"?e.select.state.error.icon.color:e.select.icon.color,ta=(e,t,r)=>r?e.select.chevron.disabled.color:t==="warning"?e.select.state.warning.chevron.color:t==="error"?e.select.state.error.chevron.color:e.select.chevron.color,ra=I.div`
545
- display: flex;
454
+ color: ${e=>e.$variant==="normal"?t.COLORS.black:t.COLORS.red};
455
+ `,ti=I.newClassNameGetter("field-label"),fe=({children:e,className:o,ref:r,required:i,variant:n="normal",...l})=>e?a.jsxs(ei,{...l,ref:r,className:ti("container",o),$variant:n,children:[e," ",i&&"*"]}):null,oi=s.div`
456
+ position: relative;
457
+ display: inline-flex;
546
458
  flex-direction: column;
547
459
  gap: 2px;
548
- position: relative;
549
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
550
- min-width: 120px;
551
- max-width: ${({$fullWidth:e})=>e?"none":"320px"};
552
- `,oa=I.label`
553
- font-size: 11px;
554
- font-weight: 500;
555
- line-height: 1.5;
556
- color: ${({theme:e,$state:t})=>Zs(e,t)};
557
- margin-left: 2px;
558
- `,na=I.button`
460
+ min-width: 180px;
461
+ width: ${({$fullWidth:e})=>e?"100%":"fit-content"};
462
+ `,ri=s(fe)`
463
+ margin-left: 6px;
464
+ `,ii=s.button`
559
465
  display: flex;
560
466
  align-items: center;
561
- height: 32px;
562
- padding: 0 12px;
563
- background-color: ${({theme:e,$state:t,$disabled:r})=>Xs(e,t,r)};
564
- border-radius: 10px;
565
- border: 1px solid
566
- ${({theme:e,$state:t,$disabled:r})=>Ys(e,t,r)};
467
+ justify-content: space-between;
468
+ gap: 8px;
469
+ width: 100%;
567
470
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
568
- transition: border-color 0.15s ease;
569
- font-family: inherit;
471
+ outline: none;
472
+ font-size: 14px;
473
+ font-weight: 500;
570
474
  text-align: left;
571
- width: 100%;
475
+ height: ${({$size:e})=>qe[e].height};
476
+ padding: ${({$size:e})=>qe[e].padding};
477
+ border-radius: ${({$size:e})=>qe[e].radius};
478
+ color: ${({$variant:e,$disabled:o,$hasValue:r})=>r?$e[e].color[o?"disabled":"static"]:$e[e].placeholder[o?"disabled":"static"]};
479
+ border: 1px solid
480
+ ${({$variant:e,$disabled:o})=>$e[e].border[o?"disabled":"static"]};
481
+ background-color: ${({$variant:e,$disabled:o})=>$e[e].background[o?"disabled":"static"]};
572
482
 
573
483
  &:focus-visible {
574
- outline: 2px solid ${({theme:e,$state:t})=>Qs(e,t)};
575
- outline-offset: 1px;
484
+ outline: 2px solid ${({$variant:e})=>$e[e].focus};
576
485
  }
577
- `,ia=I.span`
578
- display: flex;
579
- align-items: center;
580
- justify-content: center;
581
- margin-right: 8px;
582
- color: ${({theme:e,$state:t,$disabled:r})=>ea(e,t,r)};
583
- `,la=I.span`
486
+
487
+ ${({$open:e,$variant:o})=>e&&`
488
+ outline: 2px solid ${$e[o].focus};
489
+ `}
490
+ `,ni=s.span`
584
491
  flex: 1;
585
- min-width: 0;
586
- font-size: 14px;
587
- font-weight: 400;
588
- line-height: 1.5;
589
492
  overflow: hidden;
590
- white-space: nowrap;
591
493
  text-overflow: ellipsis;
592
- color: ${({theme:e,$state:t,$disabled:r,$isPlaceholder:o})=>Js(e,t,r,o)};
593
- `,ca=I.span`
494
+ white-space: nowrap;
495
+ `,ai=s.span`
594
496
  display: flex;
595
497
  align-items: center;
596
498
  justify-content: center;
597
- margin-left: 8px;
598
- color: ${({theme:e,$state:t,$disabled:r})=>ta(e,t,r)};
499
+ flex-shrink: 0;
599
500
  transition: transform 0.15s ease;
600
- transform: ${({$isOpen:e})=>e?"rotate(180deg)":"rotate(0deg)"};
601
- `,sa=I.div`
602
- z-index: 1000;
603
- max-height: ${({$maxHeight:e})=>e}px;
604
- overflow: hidden;
501
+ transform: ${({$open:e})=>e?"rotate(180deg)":"rotate(0deg)"};
502
+ `,xo=`
503
+ z-index: 100;
504
+ background-color: ${t.COLORS.white};
505
+ border: 1px solid ${t.alpha(t.COLORS.black,15)};
605
506
  border-radius: 12px;
606
- border: 1px solid ${({theme:e})=>e.select.content.borderColor};
607
- background-color: ${({theme:e})=>e.select.content.backgroundColor};
608
- box-shadow: ${({theme:e})=>e.select.content.shadow};
609
- visibility: ${({$isOpen:e})=>e?"visible":"hidden"};
610
- opacity: ${({$isOpen:e})=>e?1:0};
611
- pointer-events: ${({$isOpen:e})=>e?"auto":"none"};
507
+ box-shadow: 0 4px 16px ${t.alpha(t.COLORS.black,12)};
508
+ padding: ${Vr}px;
509
+ `,Oo=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",li=s.div`
510
+ position: absolute;
511
+ ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
512
+ left: 0;
513
+ ${xo}
514
+ opacity: ${({$open:e})=>e?1:0};
515
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
516
+ transform: ${({$open:e,$position:o})=>Oo(e,o)};
612
517
  transition:
613
518
  opacity 0.15s ease,
614
- visibility 0.15s ease;
615
- `,aa=I.div`
616
- border-bottom: 1px solid ${({theme:e})=>e.select.search.borderColor};
617
- `,ua=I.input`
618
- width: 100%;
619
- height: 32px;
620
- padding: 0 12px;
621
- font-size: 14px;
622
- font-weight: 400;
623
- line-height: 1.5;
624
- font-family: inherit;
625
- color: ${({theme:e})=>e.select.search.color};
626
- background-color: transparent;
627
- border: 0;
628
- outline: none;
629
-
630
- &::placeholder {
631
- color: ${({theme:e})=>e.select.search.placeholderColor};
632
- }
633
- `,Mo=I.div`
634
- padding: 4px;
635
- overflow-y: auto;
636
- max-height: inherit;
637
- `,Ao=I.div`
519
+ transform 0.15s ease,
520
+ visibility 0.15s;
521
+ `,di=s.div`
522
+ position: fixed;
523
+ ${xo}
524
+ opacity: ${({$open:e})=>e?1:0};
525
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
526
+ transform: ${({$open:e,$position:o})=>Oo(e,o)};
527
+ transition:
528
+ opacity 0.15s ease,
529
+ transform 0.15s ease,
530
+ visibility 0.15s;
531
+ `,rt=s.div`
638
532
  display: flex;
639
533
  align-items: center;
640
534
  justify-content: space-between;
641
- height: 32px;
642
- padding: 0 12px;
535
+ margin-bottom: 8px;
536
+ `,it=s.button`
537
+ display: flex;
538
+ align-items: center;
539
+ gap: 4px;
540
+ padding: 4px 8px;
541
+ border: none;
542
+ background: transparent;
543
+ border-radius: 6px;
643
544
  font-size: 14px;
644
- font-weight: 400;
645
- line-height: 1.5;
646
- border-radius: 8px;
545
+ font-weight: 600;
546
+ color: ${t.COLORS.black};
647
547
  cursor: pointer;
648
- transition: background-color 0.1s ease;
649
- color: ${({theme:e})=>e.select.option.color};
650
- background-color: ${({theme:e,$isHighlighted:t})=>t?e.select.option.hover.backgroundColor:e.select.option.backgroundColor};
651
548
 
652
549
  &:hover {
653
- background-color: ${({theme:e})=>e.select.option.hover.backgroundColor};
550
+ background-color: ${t.alpha(t.COLORS.black,5)};
654
551
  }
655
- `,Po=I.span`
656
- flex: 1;
657
- min-width: 0;
658
- overflow: hidden;
659
- text-overflow: ellipsis;
660
- white-space: nowrap;
661
- `,Do=I.span`
552
+
553
+ &:focus-visible {
554
+ outline: 2px solid ${t.alpha(t.COLORS.black,20)};
555
+ }
556
+ `,Se=s.button`
662
557
  display: flex;
663
558
  align-items: center;
664
559
  justify-content: center;
665
- margin-left: 8px;
666
- flex-shrink: 0;
667
- color: ${({theme:e})=>e.select.option.check.color};
668
- opacity: ${({$isSelected:e})=>e?1:.15};
669
- `,da=I.div`
560
+ width: 28px;
561
+ height: 28px;
562
+ border: none;
563
+ background: transparent;
564
+ border-radius: 6px;
565
+ color: ${t.COLORS.black};
566
+ cursor: pointer;
567
+
568
+ &:hover {
569
+ background-color: ${t.alpha(t.COLORS.black,5)};
570
+ }
571
+
572
+ &:focus-visible {
573
+ outline: 2px solid ${t.alpha(t.COLORS.black,20)};
574
+ }
575
+
576
+ &:disabled {
577
+ opacity: 0.3;
578
+ cursor: not-allowed;
579
+
580
+ &:hover {
581
+ background: transparent;
582
+ }
583
+ }
584
+ `,nt=s.div`
585
+ display: flex;
586
+ gap: 4px;
587
+ `,ci=s.div`
588
+ display: grid;
589
+ grid-template-columns: repeat(7, ${ne}px);
590
+ gap: ${Qe}px;
591
+ margin-bottom: 4px;
592
+ `,si=s.div`
670
593
  display: flex;
671
594
  align-items: center;
672
595
  justify-content: center;
673
- height: 64px;
674
- font-size: 14px;
675
- font-weight: 400;
676
- color: ${({theme:e})=>e.select.empty.color};
677
- `,fa=e=>`${e}-start`,ga=({options:e,value:t,onChange:r,placement:o=yn,searchable:i=!1,disabled:c=!1})=>{const[l,s]=_.useState(!1),[d,a]=_.useState(""),[u,h]=_.useState(null),f=_.useRef([]),b=_.useRef(null),C=_.useMemo(()=>e.find(x=>x.value===t),[e,t]),g=_.useMemo(()=>{if(!i||!d)return e;const x=d.toLowerCase();return e.filter(E=>E.label.toLowerCase().includes(x))},[e,d,i]),y=_.useRef(e.map(x=>x.label));y.current=g.map(x=>x.label);const p=_.useCallback(x=>{c||(s(x),x||(a(""),h(null)))},[c]),v=_.useMemo(()=>fa(o),[o]),{refs:k,floatingStyles:S,context:T}=Ar({open:l,onOpenChange:p,placement:v,middleware:[Sr(qs),Er(),Rr({padding:8}),fn({apply({rects:x,elements:E}){Object.assign(E.floating.style,{width:`${x.reference.width}px`})}})],whileElementsMounted:kr}),M=Or(T,{enabled:!c}),N=Mr(T),B=mn(T,{role:"listbox"}),X=xn(T,{listRef:f,activeIndex:u,onNavigate:h,virtual:!0,loop:!0}),O=kc(T,{listRef:y,activeIndex:u,onMatch:i?void 0:h,enabled:!i}),F=_.useCallback(x=>{r==null||r(x.value),s(!1),a(""),h(null)},[r]),{getReferenceProps:G,getFloatingProps:V,getItemProps:R}=Pr([M,N,B,X,O]),$=_.useCallback(()=>{const x=G(),E=x.onKeyDown;return{...x,onKeyDown:A=>{if(E==null||E(A),A.key==="Enter"&&l&&u!==null){A.preventDefault();const ee=g[u];ee&&F(ee)}}}},[G,l,u,g,F]),j=_.useCallback(x=>{a(x.target.value),h(0)},[]),L=_.useCallback(x=>{if(x.key==="Enter"&&u!==null){x.preventDefault();const E=g[u];E&&F(E)}},[u,g,F]);return{isOpen:l,setIsOpen:p,selectedOption:C,filteredOptions:g,searchQuery:d,setSearchQuery:a,highlightedIndex:u,context:T,refs:{setReference:k.setReference,setFloating:k.setFloating},floatingStyles:S,getReferenceProps:$,getFloatingProps:V,getItemProps:x=>R({onClick:()=>{const E=g[x];E&&F(E)},onKeyDown:E=>{if(E.key==="Enter"){E.preventDefault();const A=g[x];A&&F(A)}}}),listRef:f,handleSelect:F,handleSearchChange:j,handleSearchKeyDown:L,searchInputRef:b}},Ie=m.classNameGetter("select"),ha=({options:e,value:t,onChange:r,placeholder:o=Vs,searchPlaceholder:i=Hs,emptyMessage:c=Us,label:l,icon:s,state:d,disabled:a,fullWidth:u,placement:h=yn,maxHeight:f=Ks,virtualized:b,searchable:C,portalRenderNode:g,className:y,classnames:p,...v})=>{const k=_.useRef(null),{isOpen:S,selectedOption:T,filteredOptions:M,searchQuery:N,context:B,refs:X,floatingStyles:O,getReferenceProps:F,getFloatingProps:G,getItemProps:V,listRef:R,handleSearchChange:$,handleSearchKeyDown:j,searchInputRef:L,highlightedIndex:x}=ga({options:e,value:t,onChange:r,placement:h,searchable:C,disabled:a}),A=f-(C?56:0)-8,ee=vn({count:M.length,getScrollElement:()=>k.current,estimateSize:()=>Gs,overscan:5,enabled:b}),ue=()=>M.length===0?m.jsx(da,{className:Ie("empty",p==null?void 0:p.empty),children:c}):b?m.jsx(Mo,{ref:k,className:Ie("list",p==null?void 0:p.list),style:{maxHeight:A,overflow:"auto"},children:m.jsx("div",{style:{height:ee.getTotalSize(),width:"100%",position:"relative"},children:ee.getVirtualItems().map(Y=>{const H=M[Y.index];if(!H)return null;const te=H.value===t;return m.jsxs(Ao,{ref:q=>{R.current[Y.index]=q},className:Ie("option",p==null?void 0:p.option),$isHighlighted:x===Y.index,style:{position:"absolute",top:0,left:0,width:"100%",height:Y.size,transform:`translateY(${Y.start}px)`},...V(Y.index),children:[m.jsx(Po,{children:H.label}),m.jsx(Do,{$isSelected:te,children:m.jsx(m.Check,{size:16})})]},H.value)})})}):m.jsx(Mo,{ref:k,className:Ie("list",p==null?void 0:p.list),style:{maxHeight:A},children:M.map((Y,H)=>{const te=Y.value===t;return m.jsxs(Ao,{ref:q=>{R.current[H]=q},className:Ie("option",p==null?void 0:p.option),$isHighlighted:x===H,...V(H),children:[m.jsx(Po,{children:Y.label}),m.jsx(Do,{$isSelected:te,children:m.jsx(m.Check,{size:16})})]},Y.value)})}),z=()=>{if(!S)return null;const Y=m.jsx(bn,{context:B,initialFocus:C?L:void 0,modal:!1,children:m.jsxs(sa,{ref:X.setFloating,className:Ie("content",p==null?void 0:p.content),style:O,$isOpen:S,$maxHeight:f,...G(),children:[C&&m.jsx(aa,{className:Ie("search",p==null?void 0:p.search),children:m.jsx(ua,{ref:L,type:"text",placeholder:i,value:N,onChange:$,onKeyDown:j,onClick:H=>H.stopPropagation()})}),ue()]})});return g?ft.createPortal(Y,g):Y};return m.jsxs(ra,{...v,className:Ie("container",y,p==null?void 0:p.container),$fullWidth:u,children:[l&&m.jsx(oa,{className:Ie("label",p==null?void 0:p.label),$state:d,children:l}),m.jsxs(na,{ref:X.setReference,type:"button",className:Ie("trigger",p==null?void 0:p.trigger),$state:d,$disabled:a,$isOpen:S,disabled:a,"aria-haspopup":"listbox","aria-expanded":S,...F(),children:[s&&m.jsx(ia,{$state:d,$disabled:a,children:s}),m.jsx(la,{$isPlaceholder:!T,$state:d,$disabled:a,children:T?T.label:o}),m.jsx(ca,{$state:d,$disabled:a,$isOpen:S,children:m.jsx(m.ChevronDown,{size:16})})]}),z()]})},pa=(e,t,r)=>r?e.checkboxCard.container.disabled.backgroundColor:t?e.checkboxCard.container.checked.backgroundColor:e.checkboxCard.container.backgroundColor,ba=(e,t,r,o)=>o?e.checkboxCard.container.disabled.borderColor:t==="warning"?r?e.checkboxCard.state.warning.container.checked.borderColor:e.checkboxCard.state.warning.container.borderColor:t==="error"?r?e.checkboxCard.state.error.container.checked.borderColor:e.checkboxCard.state.error.container.borderColor:r?e.checkboxCard.container.checked.borderColor:e.checkboxCard.container.borderColor,xa=(e,t,r)=>t==="warning"?r?e.checkboxCard.state.warning.container.checked.borderColor:e.checkboxCard.state.warning.container.borderColor:t==="error"?r?e.checkboxCard.state.error.container.checked.borderColor:e.checkboxCard.state.error.container.borderColor:r?e.checkboxCard.container.checked.borderColor:e.checkboxCard.container.hover.borderColor,ma=(e,t)=>t==="warning"?e.checkboxCard.state.warning.container.borderColor:t==="error"?e.checkboxCard.state.error.container.borderColor:e.checkboxCard.container.focus.outlineColor,Ca=(e,t,r)=>t==="warning"?e.checkboxCard.state.warning.label.color:t==="error"?e.checkboxCard.state.error.label.color:e.checkboxCard.label.color,va=(e,t,r)=>t==="warning"?e.checkboxCard.state.warning.description.color:t==="error"?e.checkboxCard.state.error.description.color:e.checkboxCard.description.color,wa=I.label`
596
+ height: ${ne}px;
597
+ font-size: 12px;
598
+ font-weight: 500;
599
+ color: ${t.alpha(t.COLORS.black,50)};
600
+ text-transform: uppercase;
601
+ `,pi=s.div`
678
602
  display: grid;
679
- grid-template-columns: auto 1fr;
680
- align-items: start;
681
- gap: 12px;
682
- padding: 12px;
683
- background-color: ${({theme:e,$checked:t,$disabled:r})=>pa(e,t,r)};
684
- border: 1px solid
685
- ${({theme:e,$state:t,$checked:r,$disabled:o})=>ba(e,t,r,o)};
686
- border-radius: 12px;
603
+ grid-template-columns: repeat(7, ${ne}px);
604
+ gap: ${Qe}px;
605
+ `,ui=s.button`
606
+ display: flex;
607
+ align-items: center;
608
+ justify-content: center;
609
+ width: ${ne}px;
610
+ height: ${ne}px;
611
+ border: none;
612
+ border-radius: 8px;
613
+ font-size: 13px;
614
+ font-weight: ${({$selected:e,$today:o})=>e||o?600:500};
687
615
  cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
688
- transition:
689
- border-color 0.15s ease,
690
- background-color 0.15s ease;
691
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
692
- min-width: 0;
616
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
617
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
693
618
 
694
- &:hover:not([data-disabled='true']) {
695
- border-color: ${({theme:e,$state:t,$checked:r})=>xa(e,t,r)};
619
+ ${({$today:e,$selected:o})=>e&&!o&&`
620
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
621
+ `}
622
+
623
+ &:hover:not(:disabled) {
624
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
696
625
  }
697
626
 
698
- &:has(:focus-visible) {
699
- outline: 2px solid ${({theme:e,$state:t})=>ma(e,t)};
627
+ &:focus-visible {
628
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
700
629
  outline-offset: 1px;
701
630
  }
702
631
 
703
- .vacano_checkbox_container {
704
- pointer-events: none;
632
+ &:disabled {
633
+ cursor: not-allowed;
705
634
  }
706
- `,ya=I.input`
707
- position: absolute;
708
- width: 1px;
709
- height: 1px;
710
- margin: -1px;
711
- padding: 0;
712
- overflow: hidden;
713
- clip: rect(0, 0, 0, 0);
714
- white-space: nowrap;
715
- border: 0;
716
- `,ka=I.div`
635
+ `,hi=s.div`
636
+ display: grid;
637
+ grid-template-columns: repeat(3, 1fr);
638
+ gap: 8px;
639
+ width: ${7*ne+6*Qe}px;
640
+ `,bi=s.button`
717
641
  display: flex;
718
- flex-direction: column;
719
- gap: 2px;
720
- min-width: 0;
721
- `,Sa=I.span`
642
+ align-items: center;
643
+ justify-content: center;
644
+ padding: 12px 8px;
645
+ border: none;
646
+ border-radius: 8px;
722
647
  font-size: 14px;
723
- font-weight: 500;
724
- line-height: 1.4;
725
- color: ${({theme:e,$state:t})=>Ca(e,t)};
648
+ font-weight: ${({$selected:e,$current:o})=>e||o?600:400};
649
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
650
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
651
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
726
652
 
727
- label[data-disabled='true'] & {
728
- color: ${({theme:e})=>e.checkboxCard.label.disabled.color};
653
+ ${({$current:e,$selected:o})=>e&&!o&&`
654
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
655
+ `}
656
+
657
+ &:hover:not(:disabled) {
658
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
659
+ }
660
+
661
+ &:focus-visible {
662
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
663
+ outline-offset: 1px;
664
+ }
665
+ `,gi=s.div`
666
+ display: grid;
667
+ grid-template-columns: repeat(3, 1fr);
668
+ gap: 8px;
669
+ width: ${7*ne+6*Qe}px;
670
+ `,fi=s.button`
671
+ display: flex;
672
+ align-items: center;
673
+ justify-content: center;
674
+ padding: 12px 8px;
675
+ border: none;
676
+ border-radius: 8px;
677
+ font-size: 14px;
678
+ font-weight: ${({$selected:e,$current:o})=>e||o?600:400};
679
+ cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
680
+ background-color: ${({$selected:e})=>e?t.COLORS.black:"transparent"};
681
+ color: ${({$selected:e,$disabled:o})=>e?t.COLORS.white:o?t.alpha(t.COLORS.black,30):t.COLORS.black};
682
+
683
+ ${({$current:e,$selected:o})=>e&&!o&&`
684
+ box-shadow: inset 0 0 0 1px ${t.COLORS.black};
685
+ `}
686
+
687
+ &:hover:not(:disabled) {
688
+ background-color: ${({$selected:e})=>e?t.COLORS.black:t.alpha(t.COLORS.black,8)};
689
+ }
690
+
691
+ &:focus-visible {
692
+ outline: 2px solid ${t.alpha(t.COLORS.black,30)};
693
+ outline-offset: 1px;
694
+ }
695
+ `,xi=s.div`
696
+ width: ${ne}px;
697
+ height: ${ne}px;
698
+ `,K=I.newClassNameGetter("date-picker"),Be=4,Oi=300,$i=({value:e,onChange:o,mode:r="date",displayFormat:i,placeholder:n,locale:l="en",weekStartsOn:c=1,minDate:d,maxDate:p,size:h="default",variant:u="normal",disabled:f=!1,fullWidth:O=!1,label:k,portalRenderNode:y,open:S,onOpen:$,onClose:x,className:v,classnames:b,ref:L,...j})=>{const E=g.useMemo(()=>new Date,[]),[G,P]=g.useState(!1),[D,N]=g.useState({top:0,left:0}),[C,F]=g.useState("bottom"),[m,T]=g.useState(()=>r==="year"?"years":r==="month"?"months":"days"),[R,_]=g.useState(()=>e??E),[Y,M]=g.useState(()=>((e==null?void 0:e.getFullYear())??E.getFullYear())-6),H=g.useRef(null),z=g.useRef(null),A=g.useRef(null),X=S!==void 0,q=X?S:G,xe=i??Qr(r),Ae=g.useMemo(()=>qr(l,c),[l,c]),et=g.useMemo(()=>Kr(l),[l]),jo=g.useMemo(()=>Xr(R.getFullYear(),R.getMonth(),c),[R,c]),De=g.useMemo(()=>Jr(Y+6,12),[Y]),wt=g.useMemo(()=>e?fo(e,xe,l):null,[e,xe,l]),Eo=n??xe.replace(/2006|06|January|Jan|01|02/g,"__"),ve=g.useCallback(()=>{var we;if(!z.current)return;const w=z.current.getBoundingClientRect(),B=((we=A.current)==null?void 0:we.offsetHeight)??Oi,me=window.innerHeight-w.bottom-Be,_e=w.top-Be,Oe=me<B&&_e>me?"top":"bottom";if(F(Oe),y){const Me=Oe==="bottom"?w.bottom+Be:w.top-B-Be;N({top:Me,left:w.left})}},[y]),Ct=g.useCallback(()=>{if(f)return;X||P(!0),$==null||$(),T(r==="year"?"years":r==="month"?"months":"days");const w=e??E;_(w),M(w.getFullYear()-6)},[f,X,$,r,e,E]),Z=g.useCallback(()=>{X||P(!1),x==null||x()},[X,x]),To=g.useCallback(()=>{q?Z():Ct()},[q,Z,Ct]),No=g.useCallback(w=>{const B=new Date(R.getFullYear(),R.getMonth(),w);o==null||o(B),Z()},[R,o,Z]),Io=g.useCallback(w=>{if(r==="month"){const B=new Date(R.getFullYear(),w,1);o==null||o(B),Z()}else _(new Date(R.getFullYear(),w,1)),T("days")},[r,R,o,Z]),Ao=g.useCallback(w=>{if(r==="year"){const B=new Date(w,0,1);o==null||o(B),Z()}else r==="month"?(_(new Date(w,R.getMonth(),1)),T("months")):(_(new Date(w,R.getMonth(),1)),T("months"))},[r,R,o,Z]),Do=g.useCallback(()=>{_(w=>new Date(w.getFullYear(),w.getMonth()-1,1))},[]),_o=g.useCallback(()=>{_(w=>new Date(w.getFullYear(),w.getMonth()+1,1))},[]),Mo=g.useCallback(()=>{_(w=>new Date(w.getFullYear()-1,w.getMonth(),1))},[]),Fo=g.useCallback(()=>{_(w=>new Date(w.getFullYear()+1,w.getMonth(),1))},[]),Bo=g.useCallback(()=>{M(w=>w-12)},[]),Yo=g.useCallback(()=>{M(w=>w+12)},[]),Rt=g.useCallback(()=>{m==="days"?T("months"):m==="months"&&T("years")},[m]);g.useLayoutEffect(()=>{q&&ve()},[q,ve]),g.useEffect(()=>{const w=Oe=>{const we=Oe.target,Me=H.current&&!H.current.contains(we),Xo=A.current&&!A.current.contains(we);y?Me&&Xo&&Z():Me&&Z()},B=Oe=>{Oe.key==="Escape"&&Z()},me=()=>{q&&y&&ve()},_e=()=>{q&&y&&ve()};return q&&(document.addEventListener("mousedown",w),document.addEventListener("keydown",B),y&&(window.addEventListener("scroll",me,!0),window.addEventListener("resize",_e))),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("keydown",B),window.removeEventListener("scroll",me,!0),window.removeEventListener("resize",_e)}},[q,Z,y,ve]);const Ho=qe[h].iconSize,Go=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",b==null?void 0:b.header),children:[a.jsx(it,{onClick:Rt,type:"button",children:new Intl.DateTimeFormat(l,{month:"long",year:"numeric"}).format(R)}),a.jsxs(nt,{children:[a.jsx(Se,{onClick:Do,type:"button","aria-label":"Previous month",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Se,{onClick:_o,type:"button","aria-label":"Next month",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(ci,{children:Ae.map((w,B)=>a.jsx(si,{children:w},B))}),a.jsx(pi,{className:K("grid",b==null?void 0:b.grid),children:jo.map((w,B)=>w===null?a.jsx(xi,{},B):a.jsx(ui,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?_t(e,new Date(R.getFullYear(),R.getMonth(),w)):!1,$today:_t(E,new Date(R.getFullYear(),R.getMonth(),w)),$disabled:Ft(R.getFullYear(),R.getMonth(),w,d,p),disabled:Ft(R.getFullYear(),R.getMonth(),w,d,p),onClick:()=>No(w),children:w},B))})]}),Vo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",b==null?void 0:b.header),children:[a.jsx(it,{onClick:Rt,type:"button",children:R.getFullYear()}),a.jsxs(nt,{children:[a.jsx(Se,{onClick:Mo,type:"button","aria-label":"Previous year",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Se,{onClick:Fo,type:"button","aria-label":"Next year",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(hi,{className:K("grid",b==null?void 0:b.grid),children:et.map((w,B)=>a.jsx(bi,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?Mt(e,new Date(R.getFullYear(),B,1)):!1,$current:Mt(E,new Date(R.getFullYear(),B,1)),$disabled:Bt(R.getFullYear(),B,d,p),disabled:Bt(R.getFullYear(),B,d,p),onClick:()=>Io(B),children:w},B))})]}),Wo=()=>a.jsxs(a.Fragment,{children:[a.jsxs(rt,{className:K("header",b==null?void 0:b.header),children:[a.jsxs(it,{type:"button",style:{cursor:"default"},children:[De[0]," - ",De[De.length-1]]}),a.jsxs(nt,{children:[a.jsx(Se,{onClick:Bo,type:"button","aria-label":"Previous years",children:a.jsx(a.ChevronLeft,{size:16})}),a.jsx(Se,{onClick:Yo,type:"button","aria-label":"Next years",children:a.jsx(a.ChevronRight,{size:16})})]})]}),a.jsx(gi,{className:K("grid",b==null?void 0:b.grid),children:De.map(w=>a.jsx(fi,{type:"button",className:K("cell",b==null?void 0:b.cell),$selected:e?Zr(e,new Date(w,0,1)):!1,$current:E.getFullYear()===w,$disabled:Yt(w,d,p),disabled:Yt(w,d,p),onClick:()=>Ao(w),children:w},w))})]}),kt=()=>{switch(m){case"days":return Go();case"months":return Vo();case"years":return Wo()}},Uo=y?ge.createPortal(a.jsx(di,{ref:A,$open:q,$position:C,className:K("calendar",b==null?void 0:b.calendar),style:{top:D.top,left:D.left},children:kt()}),y):a.jsx(li,{ref:A,$open:q,$position:C,className:K("calendar",b==null?void 0:b.calendar),children:kt()});return a.jsxs(oi,{...j,ref:L??H,$fullWidth:O,className:K("container",v),children:[k&&a.jsx(ri,{children:k}),a.jsxs(ii,{ref:z,type:"button",onClick:To,disabled:f,$size:h,$variant:u,$disabled:f,$open:q,$hasValue:!!wt,className:K("trigger",b==null?void 0:b.trigger),children:[a.jsx(ni,{children:wt??Eo}),a.jsx(ai,{$open:q,children:a.jsx(a.ChevronDown,{size:Ho})})]}),Uo]})},Si={left:t.KEYFRAMES.slideInLeft,right:t.KEYFRAMES.slideInRight,top:t.KEYFRAMES.slideInTop,bottom:t.KEYFRAMES.slideInBottom},yi=(e,o)=>{switch(e){case"left":return`
699
+ top: 0;
700
+ left: 0;
701
+ height: 100%;
702
+ width: ${o};
703
+ `;case"right":return`
704
+ top: 0;
705
+ right: 0;
706
+ height: 100%;
707
+ width: ${o};
708
+ `;case"top":return`
709
+ top: 0;
710
+ left: 0;
711
+ width: 100%;
712
+ height: ${o};
713
+ `;case"bottom":return`
714
+ bottom: 0;
715
+ left: 0;
716
+ width: 100%;
717
+ height: ${o};
718
+ `}},vi=s.div`
719
+ position: fixed;
720
+ z-index: 1001;
721
+ background-color: ${t.COLORS.white};
722
+ box-shadow: 0 4px 24px ${t.alpha(t.COLORS.black,20)};
723
+ ${e=>yi(e.$position,e.$size)}
724
+ animation: ${e=>Si[e.$position]} ${e=>e.$animated?"0.05s":"0s"} ease-out forwards;
725
+ `,mi=I.newClassNameGetter("drawer"),wi=({animated:e,children:o,className:r,open:i,position:n="right",ref:l,size:c="400px",...d})=>i?ge.createPortal(a.jsx(vi,{...d,ref:l,className:mi("container",r),$animated:!!e,$position:n,$size:c,children:o}),document.body):null,Ci=s.div`
726
+ position: relative;
727
+ display: inline-block;
728
+ `,Ri=s.div`
729
+ cursor: pointer;
730
+ `,$o=`
731
+ z-index: 100;
732
+ min-width: 160px;
733
+ padding: 8px;
734
+ background-color: ${t.COLORS.white};
735
+ border: 1px solid ${t.COLORS.gray};
736
+ border-radius: 8px;
737
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
738
+ `,So=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",ki=s.div`
739
+ position: absolute;
740
+ ${({$position:e})=>e==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
741
+ ${({$align:e})=>e==="left"?"left: 0;":"right: 0;"}
742
+ ${$o}
743
+ opacity: ${({$open:e})=>e?1:0};
744
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
745
+ transform: ${({$open:e,$position:o})=>So(e,o)};
746
+ transition:
747
+ opacity 0.15s ease,
748
+ transform 0.15s ease,
749
+ visibility 0.15s;
750
+ `,Li=s.div`
751
+ position: fixed;
752
+ ${$o}
753
+ opacity: ${({$open:e})=>e?1:0};
754
+ visibility: ${({$open:e})=>e?"visible":"hidden"};
755
+ transform: ${({$open:e,$position:o})=>So(e,o)};
756
+ transition:
757
+ opacity 0.15s ease,
758
+ transform 0.15s ease,
759
+ visibility 0.15s;
760
+ `,Ye=I.newClassNameGetter("dropdown"),He=4,zi=100,Pi=({align:e="left",children:o,className:r,classnames:i,onClose:n,onOpen:l,open:c,portalRenderNode:d,ref:p,trigger:h,...u})=>{const[f,O]=g.useState(!1),[k,y]=g.useState({top:0,left:0}),[S,$]=g.useState("bottom"),x=g.useRef(null),v=g.useRef(null),b=g.useRef(null),L=c!==void 0,j=L?c:f,E=g.useCallback(()=>{var _,Y;if(!v.current)return;const N=v.current.getBoundingClientRect(),C=((_=b.current)==null?void 0:_.offsetHeight)??zi,F=((Y=b.current)==null?void 0:Y.offsetWidth)??160,m=window.innerHeight-N.bottom-He,T=N.top-He,R=m<C&&T>m?"top":"bottom";if($(R),d){let M;e==="left"?M=N.left:M=N.right-F;const H=R==="bottom"?N.bottom+He:N.top-C-He;y({top:H,left:M})}},[e,d]),G=g.useCallback(()=>{L?j?n==null||n():l==null||l():O(N=>{const C=!N;return C?l==null||l():n==null||n(),C})},[L,j,n,l]),P=g.useCallback(()=>{L||O(!1),n==null||n()},[L,n]);g.useLayoutEffect(()=>{j&&E()},[j,E]),g.useEffect(()=>{const N=T=>{const R=T.target,_=x.current&&!x.current.contains(R),Y=b.current&&!b.current.contains(R);d?_&&Y&&P():_&&P()},C=T=>{T.key==="Escape"&&P()},F=()=>{j&&d&&E()},m=()=>{j&&d&&E()};return j&&(document.addEventListener("mousedown",N),document.addEventListener("keydown",C),d&&(window.addEventListener("scroll",F,!0),window.addEventListener("resize",m))),()=>{document.removeEventListener("mousedown",N),document.removeEventListener("keydown",C),window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",m)}},[j,P,d,E]);const D=d?ge.createPortal(a.jsx(Li,{ref:b,$open:j,$position:S,className:Ye("content",i==null?void 0:i.content),style:{top:k.top,left:k.left},children:o}),d):a.jsx(ki,{ref:b,$align:e,$open:j,$position:S,className:Ye("content",i==null?void 0:i.content),children:o});return a.jsxs(Ci,{...u,ref:p??x,className:Ye("container",r),children:[a.jsx(Ri,{ref:v,onClick:G,className:Ye("trigger",i==null?void 0:i.trigger),children:g.cloneElement(h)}),D]})},ji=s.div`
761
+ display: flex;
762
+ flex-direction: column;
763
+ gap: 12px;
764
+ `,Ei=s.div`
765
+ width: ${({$size:e})=>e}px;
766
+ height: ${({$size:e})=>e}px;
767
+ border-radius: 8px;
768
+ border: 1px dashed ${t.COLORS.gray};
769
+ overflow: hidden;
770
+ display: flex;
771
+ align-items: center;
772
+ justify-content: center;
773
+ background-color: ${t.COLORS.white};
774
+
775
+ img {
776
+ width: 100%;
777
+ height: 100%;
778
+ object-fit: cover;
729
779
  }
730
- `,Ra=I.span`
780
+ `,Ti=s.span`
731
781
  font-size: 12px;
732
- font-weight: 400;
733
- line-height: 1.4;
734
- color: ${({theme:e,$state:t})=>va(e,t)};
782
+ color: ${t.COLORS["iron-grey"]};
783
+ `,Ni=e=>`
784
+ .${e} {
785
+ padding: 7px 16px;
786
+ font-size: 14px;
787
+ outline: 0;
788
+ border: 0;
789
+ background-color: #2F7FEF;
790
+ color: #FFFFFF;
791
+ border-radius: 20px;
792
+ user-select: none;
793
+ cursor: pointer;
794
+ -moz-user-select: none;
795
+ -webkit-user-select: none;
796
+ }
735
797
 
736
- label[data-disabled='true'] & {
737
- color: ${({theme:e})=>e.checkboxCard.description.disabled.color};
798
+ .${e}:active {
799
+ transform: translate(0, 1px);
800
+ }
801
+ `,Ii=e=>`
802
+ .${e} {
803
+ display: flex;
804
+ flex: 1 1 auto;
805
+ background: #33393F;
806
+ overflow: hidden;
807
+ align-items: center;
808
+ justify-content: center;
809
+ position: relative;
810
+ width: 500px;
811
+ height: 500px;
812
+ max-width: 100%;
813
+ max-height: 60vh;
814
+ min-height: 250px;
815
+ }
816
+
817
+ @media (max-width: 540px) {
818
+ .${e} {
819
+ width: 100%;
820
+ height: auto;
821
+ aspect-ratio: 1;
822
+ max-height: 70vh;
823
+ }
824
+ }
825
+ `,Ai=e=>`
826
+ .${e} {
827
+ padding: 7px 16px;
828
+ font-size: 14px;
829
+ outline: 0;
830
+ border: 0;
831
+ background-color: #E8EFF7;
832
+ color: #768BA7;
833
+ border-radius: 20px;
834
+ cursor: pointer;
835
+ user-select: none;
836
+ -moz-user-select: none;
837
+ -webkit-user-select: none;
838
+ }
839
+
840
+ .${e}:active {
841
+ transform: translate(0, 1px);
842
+ }
843
+ `,Di=e=>`
844
+ .${e} {
845
+ display: flex;
846
+ flex-direction: column;
847
+ background-color: #FFFFFF;
848
+ border-radius: 6px;
849
+ box-shadow: 0 4px 16px rgba(77, 96, 124, 0.2);
850
+ max-width: 100%;
851
+ max-height: 100%;
852
+ overflow: hidden;
853
+ }
854
+
855
+ @media (max-width: 540px) {
856
+ .${e} {
857
+ width: 100%;
858
+ border-radius: 8px;
859
+ }
860
+ }
861
+ `,_i=e=>`
862
+ .${e} {
863
+ display: flex;
864
+ justify-content: flex-end;
865
+ gap: 10px;
866
+ align-items: center;
867
+ height: 60px;
868
+ flex: 0 0 auto;
869
+ padding: 0 20px;
870
+ border-top: 1px solid #EEE;
871
+ }
872
+
873
+ @media (max-width: 540px) {
874
+ .${e} {
875
+ height: 56px;
876
+ padding: 0 12px;
877
+ gap: 8px;
878
+ }
879
+ }
880
+ `,Mi=e=>`
881
+ .${e} {
882
+ display: flex;
883
+ justify-content: flex-start;
884
+ gap: 10px;
885
+ align-items: center;
886
+ height: 60px;
887
+ flex: 0 0 auto;
888
+ padding: 0 20px;
889
+ border-top-left-radius: 6px;
890
+ border-top-right-radius: 6px;
891
+ border-bottom: 1px solid #EEE;
892
+ overflow: hidden;
893
+ }
894
+
895
+ @media (max-width: 540px) {
896
+ .${e} {
897
+ height: 48px;
898
+ padding: 0 12px;
899
+ font-size: 14px;
900
+ }
901
+ }
902
+ `,Fi=e=>`
903
+ .${e} {
904
+ display: block;
905
+ z-index: 101;
906
+ outline: 1px dashed #aaa;
907
+ background-color: transparent;
908
+ cursor: move;
909
+ -webkit-user-select: none;
910
+ -moz-user-select: none;
911
+ -ms-user-select: none;
912
+ user-select: none;
913
+ left: 0;
914
+ top: 0;
915
+ bottom: 0;
916
+ right: 0;
917
+ position: absolute;
918
+ touch-action: none;
919
+ }
920
+ `,Bi=e=>`
921
+ .${e} {
922
+ position: absolute;
923
+ z-index: 2;
924
+ background-color: rgba(0, 0, 0, 0.6);
925
+ touch-action: none;
926
+ }
927
+ `,Yi=e=>`
928
+ .${e} {
929
+ position: absolute;
930
+ z-index: 3;
931
+ touch-action: none;
932
+ }
933
+ `,Hi=e=>`
934
+ .${e} {
935
+ backface-visibility: hidden;
936
+ perspective: 1000px;
937
+ max-inline-size: unset !important;
938
+ max-block-size: unset !important;
939
+ }
940
+ `,Gi=e=>`
941
+ .${e} {
942
+ position: absolute;
943
+ z-index: 100;
944
+ left: 0;
945
+ top: 0;
946
+ right: 0;
947
+ bottom: 0;
948
+ overflow: hidden;
949
+ border-radius: 50%;
950
+ }
951
+ `,Vi={tl:"nw-resize",tr:"ne-resize",bl:"sw-resize",br:"se-resize"},Wi={tl:{h:"left",v:"top"},tr:{h:"right",v:"top"},bl:{h:"left",v:"bottom"},br:{h:"right",v:"bottom"}},Ge=(e,o)=>{const r=Vi[o],{h:i,v:n}=Wi[o];return`
952
+ .${e} {
953
+ display: block;
954
+ z-index: 102;
955
+ background-color: rgba(255, 255, 255, .6);
956
+ cursor: ${r};
957
+ -webkit-user-select: none;
958
+ -moz-user-select: none;
959
+ -ms-user-select: none;
960
+ user-select: none;
961
+ ${i}: -3px;
962
+ ${n}: -3px;
963
+ position: absolute;
964
+ width: 5px;
965
+ height: 5px;
966
+ touch-action: none;
967
+ }
968
+
969
+ @media (max-width: 540px), (pointer: coarse) {
970
+ .${e} {
971
+ width: 24px;
972
+ height: 24px;
973
+ ${i}: -12px;
974
+ ${n}: -12px;
975
+ }
976
+ }
977
+ `},Ui=e=>`
978
+ .${e} {
979
+ display: flex;
980
+ align-items: center;
981
+ justify-content: center;
982
+ background-color: rgba(0, 0, 0, .4);
983
+ width: 100vw;
984
+ height: 100vh;
985
+ height: 100dvh;
986
+ position: fixed;
987
+ left: 0;
988
+ top: 0;
989
+ z-index: 1000;
990
+ overflow-y: auto;
991
+ box-sizing: border-box;
992
+ padding: 16px;
993
+ }
994
+
995
+ @media (max-width: 540px) {
996
+ .${e} {
997
+ padding: 8px;
998
+ align-items: flex-start;
999
+ padding-top: env(safe-area-inset-top, 8px);
1000
+ padding-bottom: env(safe-area-inset-bottom, 8px);
1001
+ }
1002
+ }
1003
+ `,Xi=e=>`
1004
+ .${e} {
1005
+ backface-visibility: hidden;
1006
+ user-select: none;
1007
+ perspective: 1000px;
1008
+ overflow: hidden;
1009
+ display: block;
1010
+ transform: translateZ(0);
1011
+ width: auto;
1012
+ -webkit-user-drag: none;
1013
+ position: absolute;
1014
+ z-index: 1;
1015
+ }
1016
+ `,qi=e=>{let o=5381;for(let r=0;r<e.length;r++)o=(o<<5)+o^e.charCodeAt(r);return Math.abs(o).toString(36)},V=e=>`hq-cropper__${qi(e)}`,W=e=>e||[],U=(e,o)=>{if(o)for(const r of o)e.classList.add(r)},Ki=e=>{const o={applyButton:[V("applyButton"),...W(e.applyButton)],cancelButton:[V("cancelButton"),...W(e.cancelButton)],container:[V("container"),...W(e.container)],handlerMove:[V("handlerMove"),...W(e.handlerMove)],handlerResizeTopLeft:[V("handlerResizeTopLeft"),...W(e.handlerResizeTopLeft)],handlerResizeTopRight:[V("handlerResizeTopRight"),...W(e.handlerResizeTopRight)],handlerResizeBottomLeft:[V("handlerResizeBottomLeft"),...W(e.handlerResizeBottomLeft)],handlerResizeBottomRight:[V("handlerResizeBottomRight"),...W(e.handlerResizeBottomRight)],sourceImage:[V("sourceImage"),...W(e.sourceImage)],portalArea:[V("portalArea"),...W(e.portalArea)],previewImage:[V("previewImage"),...W(e.previewImage)],body:[V("body"),...W(e.body)],header:[V("header"),...W(e.header)],footer:[V("footer"),...W(e.footer)],portal:[V("portal"),...W(e.portal)],preview:[V("preview"),...W(e.preview)],root:[V("root"),...W(e.root)]},r=`
1017
+ ${Ni(o.applyButton[0])}
1018
+ ${Ii(o.body[0])}
1019
+ ${Ai(o.cancelButton[0])}
1020
+ ${Di(o.container[0])}
1021
+ ${_i(o.footer[0])}
1022
+ ${Mi(o.header[0])}
1023
+ ${Fi(o.handlerMove[0])}
1024
+ ${Bi(o.portalArea[0])}
1025
+ ${Yi(o.portal[0])}
1026
+ ${Hi(o.previewImage[0])}
1027
+ ${Gi(o.preview[0])}
1028
+ ${Ge(o.handlerResizeBottomLeft[0],"bl")}
1029
+ ${Ge(o.handlerResizeBottomRight[0],"br")}
1030
+ ${Ge(o.handlerResizeTopLeft[0],"tl")}
1031
+ ${Ge(o.handlerResizeTopRight[0],"tr")}
1032
+ ${Ui(o.root[0])}
1033
+ ${Xi(o.sourceImage[0])}
1034
+ `,i=document.createElement("style");return i.innerHTML=r,document.getElementsByTagName("head")[0].prepend(i),o};let Zi=0;const Ji=e=>{const o=new Map,r=new Proxy({...e},{set(i,n,l){return Reflect.set(i,n,l),(o.get(n)||[]).forEach(c=>c.action(l,i,n)),!0}});return{getState:()=>({...r}),setState:i=>{for(const n of Object.keys(i)){const l=i[n];l!==void 0&&(r[n]=l)}},subscribe:(i,n)=>{const l=String(++Zi),c=o.get(i)||[];return o.set(i,[...c,{action:n,id:l}]),l},unsubscribe:i=>{for(const[n,l]of o.entries()){const c=l.filter(d=>d.id!==i);if(c.length!==l.length){o.set(n,c);return}}},unsubscribeAll:()=>{o.clear()}}},St={action:null,sourceBase64:"",fileName:"",sourceHeight:0,sourceWidth:0,frame:{left:0,top:0,width:0,height:0},portal:{left:0,top:0,size:0},emitted:{X:0,Y:0,left:0,top:0,size:0},config:{applyButtonLabel:"Apply",cancelButtonLabel:"Cancel",compression:1,framePadding:3,minPortalSize:50,portalPosition:"center",portalSize:150,outputSize:0,type:"jpeg",maxFileSize:0,allowedTypes:["image/jpeg","image/png","image/gif","image/webp"]}},Qi=(e={},o={})=>Ji({...St,config:{...St.config,...e},css:Ki(o)}),en=(e,o)=>{var O;const r=e(),i=document.querySelector(`.${(O=r.css)==null?void 0:O.body[0]}`);if(!i)return r.frame;const{width:n,height:l}=i.getBoundingClientRect(),c=n/l,d=o.width/o.height;let p,h,u=0,f=0;return c>d?(p=l*d,h=l,f=(n-p)/2):(p=n,h=n*(o.height/o.width),u=(l-h)/2),{width:p,height:h,left:f,top:u}},tn=(e,o,r)=>{const[i,n]=o,l=i+e>r.width?(r.width-e)/2:i,c=n+e>r.height?(r.height-e)/2:n;return[l,c]},on=(e,o)=>{const{config:r}=e(),i=Math.min(o.width,o.height)-r.framePadding*2,n=r.portalSize>i?i:r.portalSize;if(Array.isArray(r.portalPosition)&&r.portalPosition.length===2){const[l,c]=tn(n,r.portalPosition,o);return{left:l,top:c,size:n}}return r.portalPosition==="center"?{size:n,left:(o.width-n)/2,top:(o.height-n)/2}:{left:0,top:0,size:n}};var te=(e=>(e.MOVE="MOVE",e.RESIZE_TL="RESIZE_TL",e.RESIZE_TR="RESIZE_TR",e.RESIZE_BR="RESIZE_BR",e.RESIZE_BL="RESIZE_BL",e))(te||{});const rn=e=>{var i;const o=e(),r=document.createElement("span");return U(r,(i=o.css)==null?void 0:i.handlerMove),r.setAttribute("data-action",te.MOVE),r},nn=e=>{var i;const o=e(),r=document.createElement("span");return U(r,(i=o.css)==null?void 0:i.handlerResizeBottomLeft),r.setAttribute("data-action",te.RESIZE_BL),r},an=e=>{var i;const o=e(),r=document.createElement("span");return U(r,(i=o.css)==null?void 0:i.handlerResizeBottomRight),r.setAttribute("data-action",te.RESIZE_BR),r},ln=e=>{var i;const o=e(),r=document.createElement("span");return U(r,(i=o.css)==null?void 0:i.handlerResizeTopLeft),r.setAttribute("data-action",te.RESIZE_TL),r},dn=e=>{var i;const o=e(),r=document.createElement("span");return U(r,(i=o.css)==null?void 0:i.handlerResizeTopRight),r.setAttribute("data-action",te.RESIZE_TR),r},cn=e=>{var i;const o=e(),r=document.createElement("img");return U(r,(i=o.css)==null?void 0:i.previewImage),r},sn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.preview),r.appendChild(cn(e)),r},pn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portal),r.appendChild(sn(e)),r.appendChild(rn(e)),r.appendChild(ln(e)),r.appendChild(dn(e)),r.appendChild(nn(e)),r.appendChild(an(e)),r},un=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.portalArea),r.appendChild(pn(e)),r},hn=e=>{var i;const o=e(),r=document.createElement("img");return U(r,(i=o.css)==null?void 0:i.sourceImage),r.setAttribute("alt","source"),r.setAttribute("crossOrigin","anonymous"),r.setAttribute("draggable","false"),r.setAttribute("src",o.sourceBase64),r},bn=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.body),r.appendChild(hn(e)),r.appendChild(un(e)),r},gn=(e,o)=>{var n;const r=e(),i=document.createElement("div");return U(i,(n=r.css)==null?void 0:n.applyButton),i.setAttribute("role","button"),i.innerText=r.config.applyButtonLabel,i.addEventListener("click",o),i},fn=(e,o)=>{var n;const r=e(),i=document.createElement("div");return U(i,(n=r.css)==null?void 0:n.cancelButton),i.setAttribute("role","button"),i.innerText=r.config.cancelButtonLabel,i.addEventListener("click",o),i},xn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");return U(n,(l=i.css)==null?void 0:l.footer),n.appendChild(fn(e,r)),n.appendChild(gn(e,o)),n},On=e=>{var i;const o=e(),r=document.createElement("div");return U(r,(i=o.css)==null?void 0:i.header),r},$n=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");return U(n,(l=i.css)==null?void 0:l.container),n.appendChild(On(e)),n.appendChild(bn(e)),n.appendChild(xn(e,o,r)),n},Sn=(e,o,r)=>{var l;const i=e(),n=document.createElement("div");U(n,(l=i.css)==null?void 0:l.root),n.appendChild($n(e,o,r)),document.body.appendChild(n)},yn=e=>{const o=document.createElement("input");return o.style.display="none",o.setAttribute("type","file"),o.setAttribute("accept","image/x-png,image/jpeg"),o.addEventListener("change",e,!1),document.body.appendChild(o),o},Te=new Map,vn={header:"header",sourceImage:"sourceImage",portalArea:"portalArea",portal:"portal",previewImage:"previewImage"},he=(e,o)=>{if(Te.has(e))return Te.get(e);if(!o)return null;const r=o[vn[e]],i=document.querySelector(`.${r[0]}`);return Te.set(e,i),i},mn=()=>{Te.clear()},wn=()=>{Te.clear()},Cn=(e,o)=>{const r=he("header",o.css);r&&(r.innerText=e)},Rn=(e,o)=>{const r=he("sourceImage",o.css);r&&(r.setAttribute("src",e),r.style.height=`${o.frame.height}px`,r.style.width=`${o.frame.width}px`,r.style.left=`${o.frame.left}px`,r.style.top=`${o.frame.top}px`);const i=he("portalArea",o.css);i&&(i.style.height=`${o.frame.height}px`,i.style.width=`${o.frame.width}px`,i.style.left=`${o.frame.left}px`,i.style.top=`${o.frame.top}px`);const n=he("portal",o.css);n&&(n.style.width=`${o.portal.size}px`,n.style.height=`${o.portal.size}px`,n.style.left=`${o.portal.left}px`,n.style.top=`${o.portal.top}px`);const l=he("previewImage",o.css);l&&(l.setAttribute("src",e),l.style.height=`${o.frame.height}px`,l.style.width=`${o.frame.width}px`,l.style.marginLeft=`-${o.portal.left}px`,l.style.marginTop=`-${o.portal.top}px`)},kn=(e,o)=>{const r=he("portal",o.css);r&&(r.style.left=`${e.left}px`,r.style.top=`${e.top}px`,r.style.width=`${e.size}px`,r.style.height=`${e.size}px`);const i=he("previewImage",o.css);i&&(i.style.marginLeft=`-${e.left}px`,i.style.marginTop=`-${e.top}px`)},at=1,Ln=e=>{var k,y;const o=e(),r=document.createElement("canvas"),i=o.frame.width||at,n=o.frame.height||at,l=o.sourceWidth/i,c=o.sourceHeight/n,d=o.portal.left*l,p=o.portal.top*c,h=Math.max(o.portal.size*Math.min(l,c),at),u=o.config.outputSize>0?o.config.outputSize:h;r.width=u,r.height=u;const f=document.querySelector(`.${(k=o.css)==null?void 0:k.sourceImage[0]}`);f&&((y=r.getContext("2d"))==null||y.drawImage(f,d,p,h,h,0,0,u,u));const O=r.toDataURL(`image/${o.config.type}`,o.config.compression);return new Promise((S,$)=>{try{r.toBlob(x=>{if(r.remove(),!x){$(new Error(`Failed to create blob for type: image/${o.config.type}`));return}S([O,x])},`image/${o.config.type}`,o.config.compression)}catch(x){r.remove(),$(x)}})},zn=(e,o,r)=>{const{emitted:i,portal:n,frame:l,config:c}=o();let d=i.left-i.X+e.clientX,p=i.top-i.Y+e.clientY;const h=c.framePadding,u=l.width-c.framePadding-n.size,f=c.framePadding,O=l.height-c.framePadding-n.size;d<h&&(d=h),d>u&&(d=u),p<f&&(p=f),p>O&&(p=O),r({portal:{...n,left:d,top:p}})},Pn=(e,o,r)=>{const{action:i,emitted:n,portal:l,frame:c,config:d}=o(),p=e.pageX-n.X,h=e.pageY-n.Y;switch(i){case te.RESIZE_BR:{let u=n.size+Math.max(p,h);return u<d.minPortalSize&&(u=d.minPortalSize),n.top+u>c.height-d.framePadding&&(u=c.height-n.top-d.framePadding),n.left+u>c.width-d.framePadding&&(u=c.width-n.left-d.framePadding),r({portal:{...l,size:u}})}case te.RESIZE_TR:{let u=p+h>0?n.size+p:n.size-h,f=p+h>0?n.top-p:n.top+h;return u<d.minPortalSize&&(f=n.top+n.size-d.minPortalSize,u=d.minPortalSize),n.left+u>c.width-d.framePadding&&(u=c.width-n.left-d.framePadding,f=n.top-c.width+n.left+n.size),f<d.framePadding&&(u=n.top+n.size,f=d.framePadding),r({portal:{...l,top:f,size:u}})}case te.RESIZE_TL:{const u=Math.min(p,h);let f=n.size-u,O=n.left+u,k=n.top+u;if(f<d.minPortalSize){const y=n.size-d.minPortalSize;f=d.minPortalSize,O=n.left+y,k=n.top+y}if(k<d.framePadding){const y=d.framePadding-k;k=d.framePadding,O=O+y,f=f-y}if(O<d.framePadding){const y=d.framePadding-O;O=d.framePadding,k=k+y,f=f-y}return r({portal:{...l,top:k,left:O,size:f}})}case te.RESIZE_BL:{let u=p+h>0?n.size+h:n.size-p,f=p+h>0?n.left-h:n.left+p;return u<d.minPortalSize&&(f=n.left+n.size-d.minPortalSize,u=d.minPortalSize),u+n.top>c.height-d.framePadding&&(f=n.left-c.height+n.top+n.size,u=c.height-n.top-d.framePadding),f<d.framePadding&&(f=d.framePadding,u=n.left+n.size-d.framePadding),r({portal:{...l,left:f,size:u}})}default:return}},Ht=e=>{if("touches"in e&&e.touches.length>0){const r=e.touches[0];return{clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY}}if("changedTouches"in e&&e.changedTouches.length>0){const r=e.changedTouches[0];return{clientX:r.clientX,clientY:r.clientY,pageX:r.pageX,pageY:r.pageY}}const o=e;return{clientX:o.clientX,clientY:o.clientY,pageX:o.pageX,pageY:o.pageY}},jn=(e,o)=>{var O,k,y;const r=e(),i=document.querySelector(`.${(O=r.css)==null?void 0:O.portal[0]}`),n=document.querySelector(`.${(k=r.css)==null?void 0:k.portalArea[0]}`),l=document.querySelector(`.${(y=r.css)==null?void 0:y.root[0]}`);let c=null,d=null;const p=S=>{S.preventDefault();const{portal:$}=e(),x=Ht(S);if(S.target){const v=S.target.getAttribute("data-action"),b={X:x.pageX,Y:x.pageY,left:$.left,top:$.top,size:$.size};o({action:v,emitted:b})}},h=()=>{const{action:S}=e();c!==null&&(cancelAnimationFrame(c),c=null),d=null,S&&o({action:null})},u=()=>{if(c=null,!d)return;const S=d;d=null;const{action:$}=e();if($)switch($){case te.MOVE:zn(S,e,o);break;default:Pn(S,e,o)}},f=S=>{const{action:$}=e();$&&(S.preventDefault(),d=Ht(S),c===null&&(c=requestAnimationFrame(u)))};return l&&(l.addEventListener("mouseup",h),l.addEventListener("touchend",h),l.addEventListener("touchcancel",h)),i&&(i.addEventListener("mousedown",p),i.addEventListener("touchstart",p,{passive:!1})),n&&(n.addEventListener("mousemove",f),n.addEventListener("touchmove",f,{passive:!1})),()=>{c!==null&&cancelAnimationFrame(c),l&&(l.removeEventListener("mouseup",h),l.removeEventListener("touchend",h),l.removeEventListener("touchcancel",h)),i&&(i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",p)),n&&(n.removeEventListener("mousemove",f),n.removeEventListener("touchmove",f))}},Gt=1024*1024,En=(e,o)=>{if(!o.allowedTypes.includes(e.type))return`Invalid file type "${e.type}". Allowed types: ${o.allowedTypes.join(", ")}`;if(o.maxFileSize>0&&e.size>o.maxFileSize){const r=(o.maxFileSize/Gt).toFixed(2);return`File size (${(e.size/Gt).toFixed(2)}MB) exceeds maximum allowed size (${r}MB)`}return null},Tn=(e,o,r,i,n,l,c)=>{const d=x=>{c?c(x):console.error(`HqCropper: ${x}`)};if(!e.target.files||e.target.files.length===0){d("Can't read file input");return}const p=e.target.files[0],{config:h}=o(),u=En(p,h);if(u){d(u),e.target.value="";return}const f=new FileReader;let O=null;const k=()=>{var b;const x=o(),v=document.querySelector(`.${(b=x.css)==null?void 0:b.root[0]}`);v&&(v.remove(),document.removeEventListener("keydown",y),O==null||O(),wn(),l(),r(St))},y=x=>{x.key==="Escape"&&o().sourceBase64&&S(x)},S=x=>{x.preventDefault(),k()},$=x=>{x.preventDefault();const v=o();Ln(o).then(([b,L])=>{i(b,L,v),S(x)}).catch(b=>{d(b instanceof Error?b.message:"Failed to crop image")})};f.onload=x=>{const v=new Image;if(!x.target||typeof x.target.result!="string"){d("Can't load result image");return}v.src=x.target.result,v.onerror=()=>{d("Failed to load image")},v.onload=()=>{var j;Sn(o,$,S),mn(),n("fileName",Cn),n("sourceBase64",Rn),n("portal",kn);const b=en(o,v),L=on(o,b);r({frame:b,portal:L,fileName:p.name,sourceBase64:(j=x.target)==null?void 0:j.result,sourceHeight:v.height,sourceWidth:v.width}),O=jn(o,r),document.addEventListener("keydown",y)}},f.onerror=()=>{d("Failed to read file")},f.readAsDataURL(p),e.target.value=""},Nn=(e,o,r,i)=>{const{getState:n,setState:l,subscribe:c,unsubscribeAll:d}=Qi(o,r),p=yn(h=>Tn(h,n,l,e,c,d,i));return{open:()=>p.click()}},ae={portalSize:200,outputSize:400,compression:.9,type:"jpeg",maxFileSize:10*1024*1024,allowedTypes:["image/jpeg","image/png","image/webp"],applyLabel:"Apply",cancelLabel:"Cancel"},Vt="vacano-image-cropper-styles",In=`
1035
+ .vacano-cropper-root {
1036
+ background-color: rgba(0, 0, 0, 0.5);
1037
+ backdrop-filter: blur(4px);
1038
+ }
1039
+
1040
+ .vacano-cropper-header {
1041
+ border-bottom: 1px solid ${t.COLORS.gray};
1042
+ padding: 16px 20px;
738
1043
  }
739
- `,Et=m.classNameGetter("checkboxCard"),Ea=({checked:e,className:t,classnames:r,description:o,disabled:i,fullWidth:c,label:l,onChange:s,ref:d,state:a,...u})=>m.jsxs(wa,{className:Et("container",t,r==null?void 0:r.container),$checked:e,$disabled:i,$fullWidth:c,$state:a,"data-disabled":i,children:[m.jsx(ya,{...u,ref:d,type:"checkbox",checked:e,disabled:i,onChange:s}),m.jsx(mr,{className:r==null?void 0:r.checkbox,checked:e,disabled:i,state:a,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),m.jsxs(ka,{className:Et("content",r==null?void 0:r.content),children:[m.jsx(Sa,{className:Et("label",r==null?void 0:r.label),$state:a,children:l}),o&&m.jsx(Ra,{className:Et("description",r==null?void 0:r.description),$state:a,children:o})]})]}),$a=I.div`
1044
+
1045
+ .vacano-cropper-footer {
1046
+ border-top: 1px solid ${t.COLORS.gray};
1047
+ padding: 16px 20px;
1048
+ gap: 12px;
1049
+ }
1050
+
1051
+ .vacano-cropper-cancel-button {
1052
+ padding: 8px 16px;
1053
+ border-radius: 16px;
1054
+ border: 1px solid ${t.COLORS.gray};
1055
+ background-color: ${t.COLORS.white};
1056
+ color: ${t.COLORS.black};
1057
+ font-size: 14px;
1058
+ font-weight: 500;
1059
+ cursor: pointer;
1060
+ transition: background-color 0.2s;
1061
+ }
1062
+
1063
+ .vacano-cropper-cancel-button:hover {
1064
+ background-color: ${t.COLORS.gray};
1065
+ }
1066
+
1067
+ .vacano-cropper-apply-button {
1068
+ padding: 8px 16px;
1069
+ border-radius: 16px;
1070
+ border: none;
1071
+ background-color: ${t.COLORS.black};
1072
+ color: ${t.COLORS.white};
1073
+ font-size: 14px;
1074
+ font-weight: 500;
1075
+ cursor: pointer;
1076
+ transition: background-color 0.2s;
1077
+ }
1078
+
1079
+ .vacano-cropper-apply-button:hover {
1080
+ background-color: ${t.COLORS["iron-grey"]};
1081
+ }
1082
+ `,An=()=>{if(typeof document>"u"||document.getElementById(Vt))return;const e=document.createElement("style");e.id=Vt,e.textContent=In,document.head.appendChild(e)},Dn={root:["vacano-cropper-root"],container:["vacano-cropper-container"],header:["vacano-cropper-header"],body:["vacano-cropper-body"],footer:["vacano-cropper-footer"],cancelButton:["vacano-cropper-cancel-button"],applyButton:["vacano-cropper-apply-button"],portal:["vacano-cropper-portal"]},yo=(e={})=>{const{allowedTypes:o=ae.allowedTypes,applyLabel:r=ae.applyLabel,cancelLabel:i=ae.cancelLabel,compression:n=ae.compression,maxFileSize:l=ae.maxFileSize,onCrop:c,onError:d,outputSize:p=ae.outputSize,portalSize:h=ae.portalSize,type:u=ae.type}=e,f=g.useRef(null);return{open:g.useCallback(()=>{f.current||(An(),f.current=Nn((k,y,S)=>{y&&(c==null||c({base64:k,blob:y,state:S}))},{portalSize:h,outputSize:p,compression:n,type:u,maxFileSize:l,allowedTypes:o,applyButtonLabel:r,cancelButtonLabel:i},Dn,k=>{d==null||d({code:"CROPPER_ERROR",message:k})})),f.current.open()},[o,r,i,n,l,c,d,p,h,u])}},lt=I.newClassNameGetter("image-cropper"),_n=({allowedTypes:e,applyLabel:o,buttonLabel:r="Select Image",cancelLabel:i,className:n,classnames:l,compression:c,maxFileSize:d,onCrop:p,onError:h,outputSize:u,portalSize:f,previewSize:O=120,ref:k,type:y,value:S,...$})=>{const[x,v]=g.useState(S??null),{open:b}=yo({allowedTypes:e,applyLabel:o,cancelLabel:i,compression:c,maxFileSize:d,onCrop:L=>{v(L.base64),p==null||p(L)},onError:h,outputSize:u,portalSize:f,type:y});return a.jsxs(ji,{...$,ref:k,className:lt("container",n),children:[a.jsx(Ei,{$size:O,className:lt("preview",l==null?void 0:l.preview),children:x?a.jsx("img",{src:x,alt:"Preview"}):a.jsx(Ti,{children:"No image"})}),a.jsx(Ie,{variant:"system",onClick:b,className:lt("button",l==null?void 0:l.button),style:{width:O},children:r})]})},Wt={compact:{height:"32px",padding:"0 10px",radius:"14px",prefixSize:"16px"},default:{height:"40px",padding:"0 14px",radius:"16px",prefixSize:"20px"}},Ut={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:{static:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:{static:t.alpha(t.COLORS.red,40),disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},re=e=>Ut[e]??Ut.normal,dt=e=>Wt[e]??Wt.default,Mn=s.div`
1083
+ display: grid;
1084
+ flex-direction: column;
1085
+ gap: 2px;
1086
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
1087
+ `,Fn=s(fe)`
1088
+ margin-left: 6px;
1089
+ `,Bn=s.input`
1090
+ flex: 1;
1091
+ min-width: 0;
1092
+ outline: none;
1093
+ font-size: 14px;
1094
+ font-weight: 500;
1095
+ height: ${e=>dt(e.$size).height};
1096
+ padding: ${e=>dt(e.$size).padding};
1097
+ border-radius: ${e=>dt(e.$size).radius};
1098
+
1099
+ color: ${e=>re(e.$variant).color.static};
1100
+ border: 1px solid ${e=>re(e.$variant).border.static};
1101
+ background-color: ${e=>re(e.$variant).background.static};
1102
+
1103
+ &::placeholder {
1104
+ color: ${e=>re(e.$variant).placeholder.static};
1105
+ }
1106
+
1107
+ &:disabled {
1108
+ cursor: not-allowed;
1109
+ color: ${e=>re(e.$variant).color.disabled};
1110
+ background-color: ${e=>re(e.$variant).background.disabled};
1111
+ border-color: ${e=>re(e.$variant).border.disabled};
1112
+
1113
+ &::placeholder {
1114
+ color: ${e=>re(e.$variant).placeholder.disabled};
1115
+ }
1116
+ }
1117
+
1118
+ &:focus-visible {
1119
+ outline: 2px solid ${e=>re(e.$variant).focus};
1120
+ }
1121
+ `,ct=I.newClassNameGetter("input"),vo=({className:e,classnames:o,disabled:r,fullWidth:i,label:n,ref:l,size:c="default",variant:d="normal",...p})=>a.jsxs(Mn,{className:ct("container",e),$fullWidth:!!i,children:[a.jsx(Fn,{variant:d,className:ct("label",o==null?void 0:o.label),children:n}),a.jsx(Bn,{...p,ref:l,disabled:r,$size:c,$variant:d,className:ct("input",o==null?void 0:o.input)})]}),Yn=s.div`
1122
+ position: fixed;
1123
+ inset: 0;
1124
+ z-index: 1000;
1125
+ display: flex;
1126
+ align-items: center;
1127
+ justify-content: center;
1128
+ background-color: ${t.alpha(t.COLORS.black,50)};
1129
+ animation: ${t.KEYFRAMES.fadeIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
1130
+ `,Hn=s.div`
1131
+ position: relative;
1132
+ z-index: 1001;
1133
+ width: ${e=>e.$width};
1134
+ max-width: calc(100vw - 32px);
1135
+ max-height: calc(100vh - 32px);
1136
+ overflow: auto;
1137
+ background-color: ${t.COLORS.white};
1138
+ border-radius: 16px;
1139
+ box-shadow: 0 8px 32px ${t.alpha(t.COLORS.black,20)};
1140
+ animation: ${t.KEYFRAMES.scaleIn} ${e=>e.$animated?"0.15s":"0s"} ease-out forwards;
1141
+ `,Xt=I.newClassNameGetter("modal"),mo=({animated:e,children:o,className:r,classnames:i,open:n,ref:l,width:c="500px",...d})=>n?ge.createPortal(a.jsx(Yn,{className:Xt("overlay",i==null?void 0:i.overlay),$animated:!!e,children:a.jsx(Hn,{...d,ref:l,className:Xt("content",r,i==null?void 0:i.content),$animated:!!e,$width:c,children:o})}),document.body):null,wo={normal:{border:t.COLORS["iron-grey"],label:t.COLORS.black},error:{border:t.COLORS.red,label:t.COLORS.red}},Gn=s.div`
740
1142
  display: flex;
741
1143
  flex-direction: column;
742
- gap: 8px;
743
- border: none;
1144
+ gap: 4px;
1145
+ `,Vn=s(fe)`
1146
+ margin-left: 6px;
1147
+ color: ${e=>wo[e.$variant].label};
1148
+ `,Wn=s.button`
1149
+ display: flex;
1150
+ flex-wrap: wrap;
1151
+ align-items: center;
1152
+ gap: 6px;
1153
+ min-height: 44px;
1154
+ padding: 8px 12px;
1155
+ border: 1px dashed ${e=>wo[e.$variant].border};
1156
+ border-radius: 8px;
1157
+ background: ${t.COLORS.white};
1158
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1159
+ opacity: ${e=>e.$disabled?.5:1};
1160
+ transition: border-color 0.15s ease;
1161
+ text-align: left;
1162
+
1163
+ &:hover:not(:disabled) {
1164
+ border-color: ${e=>e.$variant==="error"?t.COLORS.red:t.COLORS.black};
1165
+ }
1166
+
1167
+ &:focus-visible {
1168
+ outline: 2px solid
1169
+ ${e=>e.$variant==="error"?t.COLORS.red:t.COLORS["steel-blue"]};
1170
+ outline-offset: 2px;
1171
+ }
1172
+ `,Un=s.span`
1173
+ color: ${t.COLORS["iron-grey"]};
1174
+ font-size: 14px;
1175
+ `,Xn=s.div`
1176
+ display: flex;
1177
+ flex-direction: column;
1178
+ padding: 20px;
1179
+ gap: 16px;
1180
+ `,qn=s.div`
1181
+ display: flex;
1182
+ align-items: center;
1183
+ justify-content: space-between;
1184
+ `,Kn=s.h3`
744
1185
  margin: 0;
745
- padding: 0;
746
- `,Ia=I.span`
747
- font-size: 13px;
748
- font-weight: 500;
749
- line-height: 1.5;
750
- line-height: 1.5;
751
- color: ${({theme:e})=>e.checkboxGroup.label.color};
752
- margin-bottom: 4px;
753
- padding: 0;
754
- `,Ta=I.div`
1186
+ font-size: 18px;
1187
+ font-weight: 600;
1188
+ color: ${t.COLORS.black};
1189
+ `,Zn=s.div`
755
1190
  display: flex;
756
1191
  flex-direction: column;
757
- gap: 12px;
758
- `,cr=m.classNameGetter("checkboxGroup"),Oa=({className:e,classnames:t,disabled:r,label:o,onChange:i,options:c,value:l,...s})=>{const d=(a,u)=>{i(u?[...l,a]:l.filter(h=>h!==a))};return m.jsxs($a,{...s,className:cr("container",e,t==null?void 0:t.container),children:[o&&m.jsx(Ia,{className:cr("label",t==null?void 0:t.label),children:o}),m.jsx(Ta,{className:cr("options",t==null?void 0:t.options),children:c.map(a=>m.jsx(mr,{className:t==null?void 0:t.checkbox,checked:l.includes(a.value),label:a.label,disabled:r,onChange:u=>d(a.value,u.target.checked)},a.value))})]})},Ma=(e,t,r)=>r?e.radioCard.container.disabled.backgroundColor:t?e.radioCard.container.checked.backgroundColor:e.radioCard.container.backgroundColor,Aa=(e,t,r,o)=>o?e.radioCard.container.disabled.borderColor:t==="warning"?r?e.radioCard.state.warning.container.checked.borderColor:e.radioCard.state.warning.container.borderColor:t==="error"?r?e.radioCard.state.error.container.checked.borderColor:e.radioCard.state.error.container.borderColor:r?e.radioCard.container.checked.borderColor:e.radioCard.container.borderColor,Pa=(e,t,r)=>t==="warning"?r?e.radioCard.state.warning.container.checked.borderColor:e.radioCard.state.warning.container.borderColor:t==="error"?r?e.radioCard.state.error.container.checked.borderColor:e.radioCard.state.error.container.borderColor:r?e.radioCard.container.checked.borderColor:e.radioCard.container.hover.borderColor,Da=(e,t)=>t==="warning"?e.radioCard.state.warning.container.borderColor:t==="error"?e.radioCard.state.error.container.borderColor:e.radioCard.container.focus.outlineColor,La=(e,t,r)=>t==="warning"?e.radioCard.state.warning.label.color:t==="error"?e.radioCard.state.error.label.color:e.radioCard.label.color,Na=(e,t,r)=>t==="warning"?e.radioCard.state.warning.description.color:t==="error"?e.radioCard.state.error.description.color:e.radioCard.description.color,Fa=I.label`
1192
+ gap: 4px;
1193
+ min-height: 200px;
1194
+ max-height: 300px;
1195
+ overflow-y: auto;
1196
+ `,Jn=s.label`
1197
+ display: flex;
1198
+ align-items: center;
1199
+ gap: 10px;
1200
+ padding: 10px 12px;
1201
+ border-radius: 8px;
1202
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1203
+ opacity: ${e=>e.$disabled?.5:1};
1204
+ transition: background-color 0.15s ease;
1205
+
1206
+ &:hover {
1207
+ background-color: ${e=>e.$disabled?"transparent":t.COLORS.gray};
1208
+ }
1209
+ `,Qn=s.span`
1210
+ font-size: 14px;
1211
+ color: ${t.COLORS.black};
1212
+ `,ea=s.div`
1213
+ display: flex;
1214
+ align-items: center;
1215
+ justify-content: center;
1216
+ padding: 32px 16px;
1217
+ color: ${t.COLORS["iron-grey"]};
1218
+ font-size: 14px;
1219
+ text-align: center;
1220
+ `,Q=I.newClassNameGetter("multi-select"),ta=({className:e,classnames:o,disabled:r=!1,emptyMessage:i="No options found",label:n,maxVisible:l=1/0,modalTitle:c="Select options",onChange:d,options:p,placeholder:h="Select...",ref:u,searchPlaceholder:f="Search...",value:O,variant:k="normal",...y})=>{const[S,$]=g.useState(!1),[x,v]=g.useState(""),b=g.useMemo(()=>p.filter(C=>O.includes(C.value)),[p,O]),L=g.useMemo(()=>{if(!x.trim())return p;const C=x.toLowerCase().trim();return p.filter(F=>F.label.toLowerCase().includes(C))},[p,x]),j=l===1/0?b:b.slice(0,l),E=b.length-j.length,G=()=>{r||($(!0),v(""))},P=()=>{$(!1),v("")},D=C=>{O.includes(C)?d(O.filter(F=>F!==C)):d([...O,C])},N=C=>{d(O.filter(F=>F!==C))};return a.jsxs(Gn,{...y,ref:u,className:Q("container",e),children:[n&&a.jsx(Vn,{$variant:k,className:Q("label",o==null?void 0:o.trigger),children:n}),a.jsx(Wn,{type:"button",$variant:k,$disabled:r,disabled:r,onClick:G,className:Q("trigger",o==null?void 0:o.trigger),children:b.length===0?a.jsx(Un,{className:Q("placeholder",o==null?void 0:o.placeholder),children:h}):a.jsxs(a.Fragment,{children:[j.map(C=>a.jsx(Ke,{deletable:!0,onDelete:()=>N(C.value),onClick:F=>F.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:C.label},C.value)),E>0&&a.jsxs(Ke,{variant:"gray",onClick:C=>C.stopPropagation(),className:Q("chip",o==null?void 0:o.chip),children:["+",E]})]})}),a.jsx(mo,{open:S,width:"400px",animated:!0,className:Q("modal",o==null?void 0:o.modal),children:a.jsxs(Xn,{children:[a.jsxs(qn,{children:[a.jsx(Kn,{children:c}),a.jsx(Ie,{variant:"transparent",size:"compact",icon:a.jsx(a.X,{}),onClick:P})]}),a.jsx(vo,{type:"text",value:x,onChange:C=>v(C.target.value),placeholder:f,autoFocus:!0,fullWidth:!0,className:Q("search",o==null?void 0:o.search)}),a.jsx(Zn,{className:Q("options",o==null?void 0:o.options),children:L.length===0?a.jsx(ea,{className:Q("empty",o==null?void 0:o.empty),children:i}):L.map(C=>a.jsxs(Jn,{$disabled:!!C.disabled,className:Q("option",o==null?void 0:o.option),children:[a.jsx(Je,{checked:O.includes(C.value),disabled:C.disabled,onChange:()=>D(C.value)}),a.jsx(Qn,{children:C.label})]},C.value))})]})})]})},qt={compact:{width:"36px",height:"40px",fontSize:"16px",radius:"10px",gap:"8px"},default:{width:"44px",height:"52px",fontSize:"20px",radius:"12px",gap:"10px"}},Kt={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},focus:t.alpha(t.COLORS.red,30)}},Ee=e=>qt[e]??qt.default,pe=e=>Kt[e]??Kt.normal,oa=s.div`
1221
+ display: inline-flex;
1222
+ flex-direction: column;
1223
+ gap: 2px;
1224
+ `,ra=s(fe)`
1225
+ margin-left: 6px;
1226
+ `,ia=s.div`
1227
+ display: flex;
1228
+ gap: ${e=>Ee(e.$size).gap};
1229
+ `,na=s.input`
1230
+ width: ${e=>Ee(e.$size).width};
1231
+ height: ${e=>Ee(e.$size).height};
1232
+ border-radius: ${e=>Ee(e.$size).radius};
1233
+ font-size: ${e=>Ee(e.$size).fontSize};
1234
+ font-weight: 600;
1235
+ text-align: center;
1236
+ outline: none;
1237
+ border: 1px solid ${e=>pe(e.$variant).border.static};
1238
+ background-color: ${e=>pe(e.$variant).background.static};
1239
+ color: ${e=>pe(e.$variant).color.static};
1240
+ transition:
1241
+ border-color 0.15s ease,
1242
+ box-shadow 0.15s ease;
1243
+
1244
+ &:disabled {
1245
+ cursor: not-allowed;
1246
+ color: ${e=>pe(e.$variant).color.disabled};
1247
+ background-color: ${e=>pe(e.$variant).background.disabled};
1248
+ border-color: ${e=>pe(e.$variant).border.disabled};
1249
+ }
1250
+
1251
+ &:focus-visible {
1252
+ outline: 2px solid ${e=>pe(e.$variant).focus};
1253
+ }
1254
+
1255
+ &::selection {
1256
+ background-color: transparent;
1257
+ }
1258
+ `,st=I.newClassNameGetter("otp-code"),aa=({className:e,classnames:o,disabled:r,label:i,length:n=6,onChange:l,ref:c,size:d="default",value:p="",variant:h="normal",...u})=>{const f=g.useRef([]),O=g.useCallback($=>{const x=f.current[$];x&&(x.focus(),x.select())},[]),k=g.useCallback(($,x)=>{const b=x.target.value.replace(/\D/g,"").slice(-1);if(!b)return;const L=p.padEnd(n," ").split(""),j=L.findIndex(D=>D===" "||D===""),E=j!==-1?j:$;L[E]=b;const G=L.join("").replace(/ /g,"");l==null||l(G);const P=E+1;P<n&&O(P)},[p,n,l,O]),y=g.useCallback(($,x)=>{if(x.key==="Backspace"){x.preventDefault();const v=p.split("");v[$]?(v[$]="",l==null||l(v.join(""))):$>0&&(v[$-1]="",l==null||l(v.join("")),O($-1))}else x.key==="ArrowLeft"&&$>0?(x.preventDefault(),O($-1)):x.key==="ArrowRight"&&$<n-1&&(x.preventDefault(),O($+1))},[p,n,l,O]),S=g.useCallback($=>{$.preventDefault();const x=$.clipboardData.getData("text").replace(/\D/g,"").slice(0,n);if(x){l==null||l(x);const v=Math.min(x.length,n-1);O(v)}},[n,l,O]);return a.jsxs(oa,{ref:c,className:st("container",e),...u,children:[i&&a.jsx(ra,{variant:h,className:st("label",o==null?void 0:o.label),children:i}),a.jsx(ia,{$size:d,children:Array.from({length:n}).map(($,x)=>a.jsx(na,{ref:v=>{f.current[x]=v},type:"text",inputMode:"numeric",autoComplete:"one-time-code",maxLength:2,disabled:r,value:p[x]??"",onChange:v=>k(x,v),onKeyDown:v=>y(x,v),onPaste:S,onFocus:v=>v.target.select(),$size:d,$variant:h,className:st("input",o==null?void 0:o.input)},x))})]})},Zt={light:{background:t.COLORS.white,border:t.alpha(t.COLORS.black,30),title:t.COLORS.black,description:t.COLORS["iron-grey"]},dark:{background:t.alpha(t.COLORS.white,5),border:t.alpha(t.COLORS.white,30),title:t.COLORS.white,description:"#9ca3af"}},Ze=e=>Zt[e]??Zt.light,la=s.div`
1259
+ display: flex;
1260
+ flex-direction: column;
1261
+ gap: 16px;
1262
+ padding: 12px;
1263
+ border: 1px dashed ${({$variant:e})=>Ze(e).border};
1264
+ border-radius: 16px;
1265
+ background-color: ${({$variant:e})=>Ze(e).background};
1266
+ `,da=s.div`
1267
+ display: flex;
1268
+ flex-direction: column;
1269
+ gap: 4px;
1270
+ `,ca=s.div`
1271
+ font-size: 18px;
1272
+ font-weight: 600;
1273
+ line-height: 1.4;
1274
+ color: ${({$variant:e})=>Ze(e).title};
1275
+ `,sa=s.div`
1276
+ font-size: 14px;
1277
+ line-height: 1.5;
1278
+ color: ${({$variant:e})=>Ze(e).description};
1279
+ `,pa=s.div`
1280
+ display: flex;
1281
+ flex-wrap: wrap;
1282
+ gap: 8px;
1283
+ `,Ve=I.newClassNameGetter("panel"),ua=({children:e,className:o,classnames:r,description:i,ref:n,title:l,variant:c="light",...d})=>{const p=l||i;return a.jsxs(la,{...d,ref:n,className:Ve("container",o),$variant:c,children:[p&&a.jsxs(da,{children:[l&&a.jsx(ca,{className:Ve("title",r==null?void 0:r.title),$variant:c,children:l}),i&&a.jsx(sa,{className:Ve("description",r==null?void 0:r.description),$variant:c,children:i})]}),a.jsx(pa,{className:Ve("content",r==null?void 0:r.content),children:e})]})},yt={compact:{height:4,radius:2},default:{height:8,radius:4}},ha=s.div`
1284
+ width: 100%;
1285
+ height: ${({$size:e})=>yt[e].height}px;
1286
+ border-radius: ${({$size:e})=>yt[e].radius}px;
1287
+ background-color: ${t.COLORS.gray};
1288
+ overflow: hidden;
1289
+ `,ba=s.div`
1290
+ height: 100%;
1291
+ width: ${({$value:e})=>Math.min(100,Math.max(0,e))}%;
1292
+ border-radius: ${({$size:e})=>yt[e].radius}px;
1293
+ background-color: ${t.COLORS.black};
1294
+ transition: width 0.2s ease;
1295
+ `,Jt=I.newClassNameGetter("progress"),ga=({value:e,size:o="default",className:r,classnames:i,ref:n,...l})=>a.jsx(ha,{...l,ref:n,$size:o,className:Jt("track",r,i==null?void 0:i.track),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:a.jsx(ba,{$size:o,$value:e,className:Jt("bar",i==null?void 0:i.bar)})}),Qt={normal:{box:{border:t.alpha(t.COLORS["iron-grey"],30),borderChecked:t.COLORS["iron-grey"],background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS["iron-grey"],30)},dot:t.COLORS.black,label:t.COLORS.black},error:{box:{border:t.COLORS.red,borderChecked:t.COLORS.red,background:t.COLORS.white,backgroundChecked:t.COLORS.white,focusShadow:t.alpha(t.COLORS.red,30)},dot:t.COLORS.red,label:t.COLORS.red}},be=e=>Qt[e]??Qt.normal,fa=s.label`
1296
+ display: inline-flex;
1297
+ align-items: center;
1298
+ gap: 8px;
1299
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1300
+ opacity: ${e=>e.$disabled?.5:1};
1301
+
1302
+ &:has(input:focus-visible) > span:first-of-type {
1303
+ box-shadow: 0 0 0 2px ${e=>be(e.$variant).box.focusShadow};
1304
+ }
1305
+ `,xa=s.input`
1306
+ position: absolute;
1307
+ opacity: 0;
1308
+ width: 0;
1309
+ height: 0;
1310
+ pointer-events: none;
1311
+ `,Oa=s.span`
1312
+ display: inline-flex;
1313
+ align-items: center;
1314
+ justify-content: center;
1315
+ flex-shrink: 0;
1316
+ width: 18px;
1317
+ height: 18px;
1318
+ border-radius: 50%;
1319
+ border: 1.5px solid
1320
+ ${e=>e.$checked?be(e.$variant).box.borderChecked:be(e.$variant).box.border};
1321
+ background-color: ${e=>e.$checked?be(e.$variant).box.backgroundChecked:be(e.$variant).box.background};
1322
+ transition:
1323
+ border-color 0.15s ease,
1324
+ background-color 0.15s ease,
1325
+ box-shadow 0.15s ease;
1326
+ `,$a=s.span`
1327
+ width: 8px;
1328
+ height: 8px;
1329
+ border-radius: 50%;
1330
+ background-color: ${e=>be(e.$variant).dot};
1331
+ opacity: ${e=>e.$visible?1:0};
1332
+ transform: ${e=>e.$visible?"scale(1)":"scale(0.5)"};
1333
+ transition:
1334
+ opacity 0.15s ease,
1335
+ transform 0.15s ease;
1336
+ `,Sa=s.span`
1337
+ font-size: 14px;
1338
+ font-weight: 500;
1339
+ line-height: 1.5;
1340
+ color: ${e=>be(e.$variant).label};
1341
+ user-select: none;
1342
+ `,ze=I.newClassNameGetter("radio"),mt=({checked:e,className:o,classnames:r,disabled:i,label:n,onChange:l,ref:c,variant:d="normal",...p})=>a.jsxs(fa,{className:ze("container",o),$disabled:!!i,$variant:d,children:[a.jsx(xa,{...p,ref:c,type:"radio",className:ze("input",r==null?void 0:r.input),checked:e,disabled:i,onChange:l}),a.jsx(Oa,{className:ze("box",r==null?void 0:r.box),$checked:e,$variant:d,children:a.jsx($a,{className:ze("dot",r==null?void 0:r.dot),$visible:e,$variant:d})}),n&&a.jsx(Sa,{className:ze("label",r==null?void 0:r.label),$variant:d,children:n})]}),eo={normal:{border:{static:t.alpha(t.COLORS.black,20),hover:t.alpha(t.COLORS.black,40),active:t.alpha(t.COLORS.black,40),disabled:t.alpha(t.COLORS.black,10)},borderChecked:t.COLORS.black,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.black,5)},backgroundChecked:t.alpha(t.COLORS.black,5),focusRing:t.alpha(t.COLORS.black,20),label:{static:t.COLORS.black,hover:t.COLORS.black,active:t.COLORS.black,disabled:t.alpha(t.COLORS.black,40)},description:{static:t.alpha(t.COLORS.black,60),hover:t.alpha(t.COLORS.black,60),active:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,30)}},error:{border:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,30)},borderChecked:t.COLORS.red,background:{static:t.COLORS.white,hover:t.COLORS.white,active:t.COLORS.white,disabled:t.alpha(t.COLORS.red,5)},backgroundChecked:t.alpha(t.COLORS.red,5),focusRing:t.alpha(t.COLORS.red,20),label:{static:t.COLORS.red,hover:t.COLORS.red,active:t.COLORS.red,disabled:t.alpha(t.COLORS.red,40)},description:{static:t.alpha(t.COLORS.red,70),hover:t.alpha(t.COLORS.red,70),active:t.alpha(t.COLORS.red,70),disabled:t.alpha(t.COLORS.red,40)}}},se=e=>eo[e]??eo.normal,ya=s.label`
759
1343
  display: grid;
760
1344
  grid-template-columns: auto 1fr;
761
1345
  align-items: start;
762
- gap: 12px;
1346
+ gap: 8px;
763
1347
  padding: 12px;
764
- background-color: ${({theme:e,$checked:t,$disabled:r})=>Ma(e,t,r)};
1348
+ background-color: ${e=>{const o=se(e.$variant);return e.$disabled?o.background.disabled:e.$checked?o.backgroundChecked:o.background.static}};
765
1349
  border: 1px solid
766
- ${({theme:e,$state:t,$checked:r,$disabled:o})=>Aa(e,t,r,o)};
1350
+ ${e=>{const o=se(e.$variant);return e.$disabled?o.border.disabled:e.$checked?o.borderChecked:o.border.static}};
767
1351
  border-radius: 12px;
768
- cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"};
1352
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
769
1353
  transition:
770
1354
  border-color 0.15s ease,
771
1355
  background-color 0.15s ease;
772
- width: ${({$fullWidth:e})=>e?"100%":"auto"};
1356
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
773
1357
  min-width: 0;
774
1358
 
775
1359
  &:hover:not([data-disabled='true']) {
776
- border-color: ${({theme:e,$state:t,$checked:r})=>Pa(e,t,r)};
1360
+ border-color: ${e=>{const o=se(e.$variant);return e.$checked?o.borderChecked:o.border.hover}};
777
1361
  }
778
1362
 
779
1363
  &:has(:focus-visible) {
780
- outline: 2px solid ${({theme:e,$state:t})=>Da(e,t)};
781
- outline-offset: 1px;
1364
+ outline: none;
1365
+ box-shadow: 0 0 0 3px ${e=>se(e.$variant).focusRing};
782
1366
  }
783
1367
 
784
1368
  .vacano_radio_container {
785
1369
  pointer-events: none;
786
1370
  }
787
- `,_a=I.input`
1371
+ `,va=s.input`
788
1372
  position: absolute;
789
1373
  width: 1px;
790
1374
  height: 1px;
@@ -794,129 +1378,608 @@
794
1378
  clip: rect(0, 0, 0, 0);
795
1379
  white-space: nowrap;
796
1380
  border: 0;
797
- `,ja=I.div`
1381
+ `,ma=s.div`
798
1382
  display: flex;
799
1383
  flex-direction: column;
800
1384
  gap: 2px;
801
1385
  min-width: 0;
802
- `,Ba=I.span`
1386
+ `,wa=s.span`
803
1387
  font-size: 14px;
804
1388
  font-weight: 500;
805
1389
  line-height: 1.4;
806
- color: ${({theme:e,$state:t})=>La(e,t)};
1390
+ color: ${e=>se(e.$variant).label.static};
807
1391
 
808
1392
  label[data-disabled='true'] & {
809
- color: ${({theme:e})=>e.radioCard.label.disabled.color};
1393
+ color: ${e=>se(e.$variant).label.disabled};
810
1394
  }
811
- `,za=I.span`
1395
+ `,Ca=s.span`
812
1396
  font-size: 12px;
813
1397
  font-weight: 400;
814
1398
  line-height: 1.4;
815
- color: ${({theme:e,$state:t})=>Na(e,t)};
1399
+ color: ${e=>se(e.$variant).description.static};
816
1400
 
817
1401
  label[data-disabled='true'] & {
818
- color: ${({theme:e})=>e.radioCard.description.disabled.color};
1402
+ color: ${e=>se(e.$variant).description.disabled};
819
1403
  }
820
- `,$t=m.classNameGetter("radioCard"),Wa=({checked:e,className:t,classnames:r,description:o,disabled:i,fullWidth:c,label:l,onChange:s,ref:d,state:a,...u})=>m.jsxs(Fa,{className:$t("container",t,r==null?void 0:r.container),$checked:e,$disabled:i,$fullWidth:c,$state:a,"data-disabled":i,children:[m.jsx(_a,{...u,ref:d,type:"radio",checked:e,disabled:i,onChange:s}),m.jsx(Dr,{className:r==null?void 0:r.radio,checked:e,disabled:i,state:a,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),m.jsxs(ja,{className:$t("content",r==null?void 0:r.content),children:[m.jsx(Ba,{className:$t("label",r==null?void 0:r.label),$state:a,children:l}),o&&m.jsx(za,{className:$t("description",r==null?void 0:r.description),$state:a,children:o})]})]}),Va=I.div`
1404
+ `,We=I.newClassNameGetter("radio-card"),Ra=({checked:e,className:o,classnames:r,description:i,disabled:n,fullWidth:l=!1,label:c,onChange:d,ref:p,variant:h="normal",...u})=>a.jsxs(ya,{className:We("container",o),$checked:e,$disabled:!!n,$fullWidth:l,$variant:h,"data-disabled":n,children:[a.jsx(va,{...u,ref:p,type:"radio",checked:e,disabled:n,onChange:d}),a.jsx(mt,{className:r==null?void 0:r.radio,checked:e,disabled:n,variant:h,onChange:()=>{},tabIndex:-1,"aria-hidden":!0}),a.jsxs(ma,{className:We("content",r==null?void 0:r.content),children:[a.jsx(wa,{className:We("label",r==null?void 0:r.label),$variant:h,children:c}),i&&a.jsx(Ca,{className:We("description",r==null?void 0:r.description),$variant:h,children:i})]})]}),to={label:{color:t.COLORS.black,disabledColor:t.alpha(t.COLORS.black,40)}},ka=s.div`
821
1405
  display: flex;
822
1406
  flex-direction: column;
823
1407
  gap: 8px;
824
- border: none;
825
- margin: 0;
826
- padding: 0;
827
- `,Ha=I.span`
1408
+ `,La=s.span`
828
1409
  font-size: 13px;
829
1410
  font-weight: 500;
830
1411
  line-height: 1.5;
831
- color: ${({theme:e})=>e.radioGroup.label.color};
1412
+ color: ${e=>e.$disabled?to.label.disabledColor:to.label.color};
832
1413
  margin-bottom: 4px;
833
- padding: 0;
834
- `,Ua=I.div`
1414
+ `,za=s.div`
835
1415
  display: flex;
836
1416
  flex-direction: column;
837
1417
  gap: 12px;
838
- `,sr=m.classNameGetter("radioGroup"),Ka=({className:e,classnames:t,disabled:r,label:o,name:i,onChange:c,options:l,value:s,...d})=>m.jsxs(Va,{...d,className:sr("container",e,t==null?void 0:t.container),children:[o&&m.jsx(Ha,{className:sr("label",t==null?void 0:t.label),children:o}),m.jsx(Ua,{className:sr("options",t==null?void 0:t.options),children:l.map(a=>m.jsx(Dr,{className:t==null?void 0:t.radio,name:i,checked:s===a.value,label:a.label,disabled:r,onChange:()=>c(a.value)},a.value))})]}),n={black:"#000000",white:"#ffffff",onyx:"#111111",carbonBlack:"#232323",graphite:"#343434",slate:"#484848",ash:"#6b6b6b",silver:"#8c8c8c",mist:"#b0b0b0",cloud:"#d4d4d4",snow:"#ebebeb",icyBlue:"#bde0fe",blue:"#0050c8",green:"#009650",amber:"#b48200",red:"#c83232",grey:"#646464",blueBg:"#0064ff1a",greenBg:"#00c8641a",amberBg:"#ffb4001a",redBg:"#ff50501a",greyBg:"#0000000d",hoverLight:"#00000008",activeLight:"#00000012",hoverDark:"#ffffff12",activeDark:"#ffffff20",redLight:"#c8323214",redMedium:"#c8323228",focusRingDark:"#00000080",focusRingDarkSubtle:"#00000040",focusRingLight:"#ffffff80",focusRingLightSubtle:"#ffffff40",focusRingDanger:"#c8323280",focusRingWarning:"#b4820040",focusRingError:"#c8323240",inputBgLight:"#00000008",inputBgDark:"#ffffff0d",inputBgWarning:"#ffb4001a",inputBgError:"#ff50501a"},Ge={none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",lg:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",xl:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl2:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",xl3:"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},Je={sm:640,md:768,lg:1024,xl:1280,xl2:1536},Ga={sm:`@media (min-width: ${Je.sm}px)`,md:`@media (min-width: ${Je.md}px)`,lg:`@media (min-width: ${Je.lg}px)`,xl:`@media (min-width: ${Je.xl}px)`,xl2:`@media (min-width: ${Je.xl2}px)`},jt={chip:{color:{default:n.grey,neutral:n.blue,success:n.green,warning:n.amber,error:n.red},backgroundColor:{default:n.greyBg,neutral:n.blueBg,success:n.greenBg,warning:n.amberBg,error:n.redBg}},button:{primary:{color:n.white,backgroundColor:n.onyx,borderColor:n.onyx,hover:{backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},active:{backgroundColor:n.graphite,borderColor:n.graphite},focus:{outlineColor:n.focusRingDark},disabled:{color:n.silver,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.snow,backgroundColor:n.slate},icon:{color:n.white}},secondary:{color:n.onyx,backgroundColor:n.snow,borderColor:n.cloud,hover:{backgroundColor:n.cloud,borderColor:n.mist},active:{backgroundColor:n.cloud,borderColor:n.silver},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{color:n.silver,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.slate,backgroundColor:n.mist},icon:{color:n.slate}},ghost:{color:n.onyx,backgroundColor:"transparent",borderColor:"transparent",hover:{backgroundColor:n.hoverLight,borderColor:"transparent"},active:{backgroundColor:n.activeLight,borderColor:"transparent"},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{color:n.silver,backgroundColor:"transparent",borderColor:"transparent"},char:{color:n.ash,backgroundColor:n.snow},icon:{color:n.slate}},danger:{color:n.red,backgroundColor:"transparent",borderColor:n.redLight,hover:{backgroundColor:n.redLight,borderColor:n.redLight},active:{backgroundColor:n.redMedium,borderColor:n.redMedium},focus:{outlineColor:n.focusRingDanger},disabled:{color:n.mist,backgroundColor:n.snow,borderColor:n.snow},char:{color:n.red,backgroundColor:n.redLight},icon:{color:n.red}}},checkbox:{box:{backgroundColor:"transparent",borderColor:n.mist,checked:{backgroundColor:n.onyx,borderColor:n.onyx},focus:{shadowColor:n.focusRingDarkSubtle}},icon:{color:n.white},label:{color:n.onyx},state:{warning:{box:{borderColor:n.amber,checked:{backgroundColor:n.amber,borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},label:{color:n.amber}},error:{box:{borderColor:n.red,checked:{backgroundColor:n.red,borderColor:n.red},focus:{shadowColor:n.focusRingError}},label:{color:n.red}}}},checkboxCard:{container:{backgroundColor:n.white,borderColor:n.mist,hover:{borderColor:n.silver},checked:{backgroundColor:n.white,borderColor:n.onyx},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.onyx,disabled:{color:n.silver}},description:{color:n.slate,disabled:{color:n.silver}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},checkboxGroup:{label:{color:n.onyx}},input:{wrapper:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},input:{color:n.onyx,placeholderColor:n.silver,disabled:{color:n.silver}},icon:{color:n.slate,disabled:{color:n.silver}},toggle:{color:n.slate},state:{warning:{wrapper:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},input:{color:n.onyx,placeholderColor:n.amber},icon:{color:n.amber}},error:{wrapper:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},input:{color:n.onyx,placeholderColor:n.red},icon:{color:n.red}}}},radio:{circle:{borderColor:n.mist,checked:{borderColor:n.onyx},focus:{shadowColor:n.focusRingDarkSubtle}},dot:{color:n.onyx},label:{color:n.onyx},state:{warning:{circle:{borderColor:n.amber,checked:{borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},dot:{color:n.amber},label:{color:n.amber}},error:{circle:{borderColor:n.red,checked:{borderColor:n.red},focus:{shadowColor:n.focusRingError}},dot:{color:n.red},label:{color:n.red}}}},radioCard:{container:{backgroundColor:n.white,borderColor:n.mist,hover:{borderColor:n.silver},checked:{backgroundColor:n.white,borderColor:n.onyx},focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.onyx,disabled:{color:n.silver}},description:{color:n.slate,disabled:{color:n.silver}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},radioGroup:{label:{color:n.onyx}},dropdown:{content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl}},select:{trigger:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},value:{color:n.onyx,placeholderColor:n.silver,disabled:{color:n.silver}},icon:{color:n.slate,disabled:{color:n.silver}},chevron:{color:n.slate,disabled:{color:n.silver}},content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl},option:{color:n.onyx,backgroundColor:"transparent",hover:{backgroundColor:n.hoverLight},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.snow,borderColor:n.cloud,color:n.onyx,placeholderColor:n.silver},empty:{color:n.silver},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},value:{color:n.onyx,placeholderColor:n.amber},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},value:{color:n.onyx,placeholderColor:n.red},icon:{color:n.red},chevron:{color:n.red}}}},multiSelect:{trigger:{backgroundColor:n.inputBgLight,borderColor:n.mist,focus:{outlineColor:n.focusRingDarkSubtle},disabled:{backgroundColor:n.snow,borderColor:n.cloud}},label:{color:n.slate},placeholder:{color:n.silver,disabled:{color:n.silver}},chip:{backgroundColor:n.snow,color:n.onyx,remove:{color:n.slate,hover:{color:n.onyx}},disabled:{backgroundColor:n.cloud,color:n.silver,remove:{color:n.silver}}},icon:{color:n.slate,disabled:{color:n.silver}},chevron:{color:n.slate,disabled:{color:n.silver}},content:{backgroundColor:n.white,borderColor:n.cloud,shadow:Ge.xl},option:{color:n.onyx,backgroundColor:"transparent",hover:{backgroundColor:n.hoverLight},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.snow,borderColor:n.cloud,color:n.onyx,placeholderColor:n.silver},empty:{color:n.silver},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},chip:{backgroundColor:n.amberBg,color:n.amber,remove:{color:n.amber}},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},chip:{backgroundColor:n.redBg,color:n.red,remove:{color:n.red}},icon:{color:n.red},chevron:{color:n.red}}}}},kn={chip:{color:{default:n.icyBlue,neutral:n.icyBlue,success:n.green,warning:n.amber,error:n.red},backgroundColor:{default:n.graphite,neutral:n.graphite,success:n.greenBg,warning:n.amberBg,error:n.redBg}},button:{primary:{color:n.black,backgroundColor:n.white,borderColor:n.white,hover:{backgroundColor:n.cloud,borderColor:n.cloud},active:{backgroundColor:n.mist,borderColor:n.mist},focus:{outlineColor:n.focusRingLight},disabled:{color:n.ash,backgroundColor:n.graphite,borderColor:n.graphite},char:{color:n.slate,backgroundColor:n.cloud},icon:{color:n.black}},secondary:{color:n.white,backgroundColor:n.graphite,borderColor:n.slate,hover:{backgroundColor:n.slate,borderColor:n.ash},active:{backgroundColor:n.ash,borderColor:n.silver},focus:{outlineColor:n.focusRingLightSubtle},disabled:{color:n.ash,backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},char:{color:n.mist,backgroundColor:n.slate},icon:{color:n.cloud}},ghost:{color:n.white,backgroundColor:"transparent",borderColor:"transparent",hover:{backgroundColor:n.hoverDark,borderColor:"transparent"},active:{backgroundColor:n.activeDark,borderColor:"transparent"},focus:{outlineColor:n.focusRingLightSubtle},disabled:{color:n.ash,backgroundColor:"transparent",borderColor:"transparent"},char:{color:n.mist,backgroundColor:n.graphite},icon:{color:n.cloud}},danger:{color:n.red,backgroundColor:"transparent",borderColor:n.redLight,hover:{backgroundColor:n.redLight,borderColor:n.redLight},active:{backgroundColor:n.redMedium,borderColor:n.redMedium},focus:{outlineColor:n.focusRingDanger},disabled:{color:n.ash,backgroundColor:n.carbonBlack,borderColor:n.carbonBlack},char:{color:n.red,backgroundColor:n.redLight},icon:{color:n.red}}},checkbox:{box:{backgroundColor:"transparent",borderColor:n.ash,checked:{backgroundColor:n.white,borderColor:n.white},focus:{shadowColor:n.focusRingLightSubtle}},icon:{color:n.black},label:{color:n.white},state:{warning:{box:{borderColor:n.amber,checked:{backgroundColor:n.amber,borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},label:{color:n.amber}},error:{box:{borderColor:n.red,checked:{backgroundColor:n.red,borderColor:n.red},focus:{shadowColor:n.focusRingError}},label:{color:n.red}}}},checkboxCard:{container:{backgroundColor:n.graphite,borderColor:n.slate,hover:{borderColor:n.ash},checked:{backgroundColor:n.graphite,borderColor:n.white},focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.carbonBlack,borderColor:n.slate}},label:{color:n.white,disabled:{color:n.ash}},description:{color:n.cloud,disabled:{color:n.ash}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},checkboxGroup:{label:{color:n.white}},input:{wrapper:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},input:{color:n.white,placeholderColor:n.ash,disabled:{color:n.ash}},icon:{color:n.cloud,disabled:{color:n.ash}},toggle:{color:n.cloud},state:{warning:{wrapper:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},input:{color:n.white,placeholderColor:n.amber},icon:{color:n.amber}},error:{wrapper:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},input:{color:n.white,placeholderColor:n.red},icon:{color:n.red}}}},radio:{circle:{borderColor:n.ash,checked:{borderColor:n.white},focus:{shadowColor:n.focusRingLightSubtle}},dot:{color:n.white},label:{color:n.white},state:{warning:{circle:{borderColor:n.amber,checked:{borderColor:n.amber},focus:{shadowColor:n.focusRingWarning}},dot:{color:n.amber},label:{color:n.amber}},error:{circle:{borderColor:n.red,checked:{borderColor:n.red},focus:{shadowColor:n.focusRingError}},dot:{color:n.red},label:{color:n.red}}}},radioCard:{container:{backgroundColor:n.graphite,borderColor:n.slate,hover:{borderColor:n.ash},checked:{backgroundColor:n.graphite,borderColor:n.white},focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.carbonBlack,borderColor:n.slate}},label:{color:n.white,disabled:{color:n.ash}},description:{color:n.cloud,disabled:{color:n.ash}},state:{warning:{container:{borderColor:n.amber,checked:{borderColor:n.amber}},label:{color:n.amber},description:{color:n.amber}},error:{container:{borderColor:n.red,checked:{borderColor:n.red}},label:{color:n.red},description:{color:n.red}}}},radioGroup:{label:{color:n.white}},dropdown:{content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl}},select:{trigger:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},value:{color:n.white,placeholderColor:n.ash,disabled:{color:n.ash}},icon:{color:n.cloud,disabled:{color:n.ash}},chevron:{color:n.cloud,disabled:{color:n.ash}},content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl},option:{color:n.white,backgroundColor:"transparent",hover:{backgroundColor:n.hoverDark},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.carbonBlack,borderColor:n.slate,color:n.white,placeholderColor:n.ash},empty:{color:n.ash},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},value:{color:n.white,placeholderColor:n.amber},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},value:{color:n.white,placeholderColor:n.red},icon:{color:n.red},chevron:{color:n.red}}}},multiSelect:{trigger:{backgroundColor:n.inputBgDark,borderColor:n.slate,focus:{outlineColor:n.focusRingLightSubtle},disabled:{backgroundColor:n.graphite,borderColor:n.slate}},label:{color:n.cloud},placeholder:{color:n.ash,disabled:{color:n.ash}},chip:{backgroundColor:n.slate,color:n.white,remove:{color:n.cloud,hover:{color:n.white}},disabled:{backgroundColor:n.graphite,color:n.ash,remove:{color:n.ash}}},icon:{color:n.cloud,disabled:{color:n.ash}},chevron:{color:n.cloud,disabled:{color:n.ash}},content:{backgroundColor:n.graphite,borderColor:n.slate,shadow:Ge.xl},option:{color:n.white,backgroundColor:"transparent",hover:{backgroundColor:n.hoverDark},selected:{backgroundColor:n.blueBg,color:n.blue},check:{color:n.blue}},search:{backgroundColor:n.carbonBlack,borderColor:n.slate,color:n.white,placeholderColor:n.ash},empty:{color:n.ash},state:{warning:{trigger:{backgroundColor:n.inputBgWarning,borderColor:n.amber,focus:{outlineColor:n.focusRingWarning}},label:{color:n.amber},chip:{backgroundColor:n.amberBg,color:n.amber,remove:{color:n.amber}},icon:{color:n.amber},chevron:{color:n.amber}},error:{trigger:{backgroundColor:n.inputBgError,borderColor:n.red,focus:{outlineColor:n.focusRingError}},label:{color:n.red},chip:{backgroundColor:n.redBg,color:n.red,remove:{color:n.red}},icon:{color:n.red},chevron:{color:n.red}}}}},Sn=_.createContext({mode:"light",theme:jt,setMode:()=>{}}),qa=()=>{const e=_.useContext(Sn);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Xa=qe.css`
839
- *,
840
- *::before,
841
- *::after {
842
- box-sizing: border-box;
1418
+ `,pt=I.newClassNameGetter("radio-group"),Pa=({className:e,classnames:o,disabled:r,label:i,name:n,onChange:l,options:c,ref:d,value:p,...h})=>a.jsxs(ka,{...h,ref:d,className:pt("container",e),children:[i&&a.jsx(La,{className:pt("label",o==null?void 0:o.label),$disabled:r,children:i}),a.jsx(za,{className:pt("options",o==null?void 0:o.options),children:c.map(u=>a.jsx(mt,{className:o==null?void 0:o.radio,name:n,checked:p===u.value,label:u.label,disabled:r,onChange:()=>l(u.value)},u.value))})]}),ut=40,Pe=4,oo={compact:{height:"32px",padding:"0 10px",radius:"14px"},default:{height:"40px",padding:"0 14px",radius:"16px"}},ro={normal:{background:{static:t.alpha(t.COLORS.black,2),disabled:t.alpha(t.COLORS.black,10)},border:{static:t.alpha(t.COLORS.black,60),disabled:t.alpha(t.COLORS.black,10)},color:{static:t.COLORS.black,disabled:t.alpha(t.COLORS.black,65)},placeholder:t.alpha(t.COLORS.black,40),focus:t.alpha(t.COLORS["iron-grey"],30)},error:{background:{static:t.alpha(t.COLORS.red,2),disabled:t.alpha(t.COLORS.red,10)},border:{static:t.alpha(t.COLORS.red,60),disabled:t.alpha(t.COLORS.red,10)},color:{static:t.COLORS.red,disabled:t.alpha(t.COLORS.red,65)},placeholder:t.alpha(t.COLORS.red,40),focus:t.alpha(t.COLORS.red,30)}},ht=e=>oo[e]??oo.default,le=e=>ro[e]??ro.normal,ja=s.div`
1419
+ position: relative;
1420
+ display: grid;
1421
+ gap: 2px;
1422
+ min-width: 180px;
1423
+ width: ${e=>e.$fullWidth?"100%":"fit-content"};
1424
+ `,Ea=s(fe)`
1425
+ margin-left: 6px;
1426
+ `,Ta=s.button`
1427
+ display: flex;
1428
+ align-items: center;
1429
+ justify-content: space-between;
1430
+ gap: 8px;
1431
+ width: 100%;
1432
+ outline: none;
1433
+ font-size: 14px;
1434
+ font-weight: 500;
1435
+ text-align: left;
1436
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1437
+ height: ${e=>ht(e.$size).height};
1438
+ padding: ${e=>ht(e.$size).padding};
1439
+ border-radius: ${e=>ht(e.$size).radius};
1440
+
1441
+ color: ${e=>e.$hasValue?e.$disabled?le(e.$variant).color.disabled:le(e.$variant).color.static:le(e.$variant).placeholder};
1442
+ border: 1px solid
1443
+ ${e=>e.$disabled?le(e.$variant).border.disabled:le(e.$variant).border.static};
1444
+ background-color: ${e=>e.$disabled?le(e.$variant).background.disabled:le(e.$variant).background.static};
1445
+
1446
+ &:focus-visible {
1447
+ outline: 2px solid ${e=>le(e.$variant).focus};
1448
+ }
1449
+ `,Na=s.span`
1450
+ flex: 1;
1451
+ min-width: 0;
1452
+ overflow: hidden;
1453
+ text-overflow: ellipsis;
1454
+ white-space: nowrap;
1455
+ `,Ia=s.span`
1456
+ display: flex;
1457
+ align-items: center;
1458
+ justify-content: center;
1459
+ flex-shrink: 0;
1460
+ transition: transform 0.2s ease;
1461
+ transform: rotate(${e=>e.$open?"180deg":"0deg"});
1462
+ `,Co=`
1463
+ padding: 4px;
1464
+ background: ${t.COLORS.white};
1465
+ border: 1px solid ${t.alpha(t.COLORS.black,10)};
1466
+ border-radius: 16px;
1467
+ box-shadow: 0 4px 20px ${t.alpha(t.COLORS.black,15)};
1468
+ z-index: 1000;
1469
+ `,Aa=s.div`
1470
+ position: absolute;
1471
+ left: -4px;
1472
+ width: calc(100% + 8px);
1473
+ ${Co}
1474
+ `,Da=s.div`
1475
+ position: fixed;
1476
+ ${Co}
1477
+ `,_a=s.button`
1478
+ display: flex;
1479
+ align-items: center;
1480
+ justify-content: space-between;
1481
+ gap: 8px;
1482
+ width: 100%;
1483
+ height: 40px;
1484
+ padding: 0 14px;
1485
+ border: none;
1486
+ background: ${e=>e.$selected?t.alpha(t.COLORS.black,6):"transparent"};
1487
+ border-radius: 12px;
1488
+ font-size: 14px;
1489
+ font-weight: 500;
1490
+ text-align: left;
1491
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1492
+ color: ${e=>e.$disabled?t.alpha(t.COLORS.black,40):t.COLORS.black};
1493
+ transition: background-color 0.15s ease;
1494
+
1495
+ &:hover:not(:disabled) {
1496
+ background: ${t.alpha(t.COLORS.black,8)};
843
1497
  }
844
1498
 
845
- * {
846
- margin: 0;
847
- padding: 0;
1499
+ &:focus-visible {
1500
+ outline: none;
1501
+ background: ${t.alpha(t.COLORS.black,8)};
1502
+ }
1503
+ `,Ma=s.span`
1504
+ display: flex;
1505
+ align-items: center;
1506
+ justify-content: center;
1507
+ flex-shrink: 0;
1508
+ color: ${t.COLORS.black};
1509
+ `,ye=I.newClassNameGetter("select"),Fa=({className:e,classnames:o,disabled:r=!1,fullWidth:i=!1,label:n,onChange:l,options:c,placeholder:d="Select...",portalRenderNode:p,ref:h,size:u="default",value:f,variant:O="normal",...k})=>{const[y,S]=g.useState(!1),[$,x]=g.useState({top:0,left:0,width:0}),v=g.useRef(null),b=g.useRef(null),L=g.useRef(null),j=c.find(m=>m.value===f),E=Math.max(0,c.findIndex(m=>m.value===f)),G=-(E*ut+Pe),P=()=>{if(!b.current||!p)return;const m=b.current.getBoundingClientRect(),T=E*ut+Pe;let R=m.top-T;const _=c.length*ut+Pe*2,Y=8,M=window.innerHeight-_-8;R<Y&&(R=Y),R>M&&(R=M),x({top:R,left:m.left-Pe,width:m.width+Pe*2})},D=m=>{var T;l==null||l(m),S(!1),(T=b.current)==null||T.focus()},N=m=>{r||(m.key==="Enter"||m.key===" "?(m.preventDefault(),S(T=>!T)):m.key==="Escape"&&y?(m.preventDefault(),S(!1)):m.key==="ArrowDown"&&!y&&(m.preventDefault(),S(!0)))};g.useLayoutEffect(()=>{y&&p&&P()},[y,p,E,c.length]),g.useEffect(()=>{if(!y)return;const m=_=>{const Y=_.target,M=v.current&&!v.current.contains(Y),H=L.current&&!L.current.contains(Y);p?M&&H&&S(!1):M&&S(!1)},T=()=>{p&&P()},R=()=>{p&&P()};return document.addEventListener("mousedown",m),p&&(window.addEventListener("scroll",T,!0),window.addEventListener("resize",R)),()=>{document.removeEventListener("mousedown",m),window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",R)}},[y,p]);const C=()=>c.map(m=>a.jsxs(_a,{type:"button",role:"option",$selected:m.value===f,$disabled:m.disabled??!1,disabled:m.disabled,"aria-selected":m.value===f,onClick:()=>D(m.value),className:ye("option",o==null?void 0:o.option),children:[a.jsx("span",{children:m.label}),m.value===f&&a.jsx(Ma,{children:a.jsx(a.Check,{size:16})})]},m.value)),F=p?ge.createPortal(a.jsx(Da,{ref:L,role:"listbox",style:{top:$.top,left:$.left,width:$.width},className:ye("dropdown",o==null?void 0:o.dropdown),children:C()}),p):a.jsx(Aa,{ref:L,role:"listbox",style:{top:G},className:ye("dropdown",o==null?void 0:o.dropdown),children:C()});return a.jsxs(ja,{...k,ref:m=>{v.current=m,typeof h=="function"?h(m):h&&(h.current=m)},$fullWidth:i,className:ye("container",e),children:[n&&a.jsx(Ea,{className:ye("label",o==null?void 0:o.label),children:n}),a.jsxs(Ta,{ref:b,type:"button",$size:u,$variant:O,$disabled:r,$hasValue:!!j,disabled:r,onClick:()=>!r&&S(m=>!m),onKeyDown:N,"aria-haspopup":"listbox","aria-expanded":y,className:ye("trigger",o==null?void 0:o.trigger),children:[a.jsx(Na,{children:(j==null?void 0:j.label)??d}),a.jsx(Ia,{$open:y,children:a.jsx(a.ChevronDown,{size:16})})]}),y&&F]})},io={xs:{size:"16px",borderWidth:"2px"},sm:{size:"20px",borderWidth:"2px"},md:{size:"32px",borderWidth:"3px"},lg:{size:"48px",borderWidth:"4px"}},no={track:t.alpha(t.COLORS.black,15),indicator:t.COLORS.black},bt=e=>io[e]??io.md,Ba=ie.keyframes`
1510
+ 0% {
1511
+ transform: rotate(0deg);
1512
+ }
1513
+ 100% {
1514
+ transform: rotate(360deg);
848
1515
  }
1516
+ `,Ya=s.div`
1517
+ display: inline-block;
1518
+ width: ${e=>bt(e.$size).size};
1519
+ height: ${e=>bt(e.$size).size};
1520
+ border: ${e=>bt(e.$size).borderWidth} solid ${no.track};
1521
+ border-top-color: ${no.indicator};
1522
+ border-radius: 50%;
1523
+ animation: ${Ba} 0.8s linear infinite;
1524
+ `,Ha=I.newClassNameGetter("spinner"),Ga=({"aria-label":e="Loading",className:o,ref:r,size:i="md",...n})=>a.jsx(Ya,{...n,ref:r,className:Ha("container",o),role:"status","aria-label":e,$size:i}),ao={positive:t.COLORS.green,negative:t.COLORS.red,neutral:t.COLORS["iron-grey"]},Va=e=>ao[e]??ao.neutral,Wa=s.div`
1525
+ display: flex;
1526
+ flex-direction: column;
1527
+ gap: 4px;
1528
+ padding: 20px;
1529
+ background-color: ${t.COLORS.white};
1530
+ border-radius: 16px;
1531
+ border: ${({$border:e})=>e?"1px solid #e5e7eb":"none"};
1532
+ box-shadow: ${({$shadow:e})=>e?"0 4px 6px -1px rgba(0, 0, 0, 0.1)":"none"};
1533
+ `,Ua=s.div`
1534
+ display: flex;
1535
+ align-items: center;
1536
+ justify-content: space-between;
1537
+ gap: 8px;
1538
+ `,Xa=s.p`
1539
+ margin: 0;
1540
+ font-size: 13px;
1541
+ color: ${t.COLORS["iron-grey"]};
1542
+ `,qa=s.div`
1543
+ display: flex;
1544
+ align-items: center;
1545
+ justify-content: center;
1546
+ width: 32px;
1547
+ height: 32px;
1548
+ border-radius: 8px;
1549
+ background-color: #f5f5f5;
1550
+ color: ${t.COLORS["iron-grey"]};
849
1551
 
850
- html {
851
- font-size: 16px;
852
- -webkit-text-size-adjust: 100%;
853
- text-size-adjust: 100%;
1552
+ & svg {
1553
+ width: 18px;
1554
+ height: 18px;
854
1555
  }
1556
+ `,Ka=s.h3`
1557
+ margin: 0;
1558
+ font-size: 28px;
1559
+ font-weight: 600;
1560
+ line-height: 1.2;
1561
+ color: ${t.COLORS.black};
1562
+ `,Za=s.p`
1563
+ margin: 0;
1564
+ font-size: 12px;
1565
+ color: ${({$variant:e})=>Va(e)};
1566
+ `,Ue=I.newClassNameGetter("status-card"),Ja=({border:e=!1,className:o,classnames:r,icon:i,label:n,ref:l,shadow:c=!1,trend:d,trendVariant:p="neutral",value:h,...u})=>a.jsxs(Wa,{...u,ref:l,className:Ue("container",o),$border:e,$shadow:c,children:[a.jsxs(Ua,{children:[a.jsx(Xa,{className:Ue("label",r==null?void 0:r.label),children:n}),i&&a.jsx(qa,{children:i})]}),a.jsx(Ka,{className:Ue("value",r==null?void 0:r.value),children:h}),d&&a.jsx(Za,{className:Ue("trend",r==null?void 0:r.trend),$variant:p,children:d})]}),Qa=s.div`
1567
+ display: flex;
1568
+ align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
1569
+ flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
1570
+ `,el=s.div`
1571
+ display: flex;
1572
+ align-items: ${e=>e.$orientation==="vertical"?"flex-start":"center"};
1573
+ flex-direction: ${e=>e.$orientation==="vertical"?"column":"row"};
1574
+ ${e=>e.$orientation==="horizontal"&&"flex: 1; min-width: 0;"}
855
1575
 
856
- body {
857
- min-height: 100vh;
858
- font-family: 'Inter', sans-serif;
859
- font-size: 1rem;
860
- font-weight: 400;
861
- line-height: 1.5;
862
- letter-spacing: -0.011em;
863
- font-feature-settings:
864
- 'kern' 1,
865
- 'liga' 1,
866
- 'calt' 1;
867
- font-kerning: normal;
868
- text-rendering: optimizeLegibility;
869
- -webkit-font-smoothing: antialiased;
870
- -moz-osx-font-smoothing: grayscale;
871
- font-optical-sizing: auto;
872
- font-variant-numeric: tabular-nums;
1576
+ &:last-child {
1577
+ flex: 0;
873
1578
  }
1579
+ `,tl=s.button`
1580
+ display: flex;
1581
+ align-items: center;
1582
+ gap: 10px;
1583
+ padding: 0;
1584
+ border: none;
1585
+ background: transparent;
1586
+ cursor: ${e=>e.$clickable?"pointer":"default"};
1587
+ flex-shrink: 0;
874
1588
 
875
- img,
876
- picture,
877
- video,
878
- canvas,
879
- svg {
880
- display: block;
881
- max-width: 100%;
1589
+ &:focus-visible {
1590
+ outline: none;
1591
+
1592
+ & > div:first-of-type {
1593
+ outline: 2px solid ${t.COLORS["steel-blue"]};
1594
+ outline-offset: 2px;
1595
+ }
882
1596
  }
1597
+ `,ol=s.div`
1598
+ display: flex;
1599
+ align-items: center;
1600
+ justify-content: center;
1601
+ width: 32px;
1602
+ height: 32px;
1603
+ border-radius: 50%;
1604
+ font-size: 14px;
1605
+ font-weight: 600;
1606
+ flex-shrink: 0;
1607
+ transition:
1608
+ background-color 0.2s ease,
1609
+ border-color 0.2s ease,
1610
+ color 0.2s ease;
883
1611
 
884
- input,
885
- button,
886
- textarea,
887
- select {
888
- font: inherit;
1612
+ ${e=>e.$active||e.$completed?`
1613
+ background-color: ${t.COLORS.black};
1614
+ border: 2px solid ${t.COLORS.black};
1615
+ color: ${t.COLORS.white};
1616
+ `:`
1617
+ background-color: transparent;
1618
+ border: 2px solid ${t.COLORS.gray};
1619
+ color: ${t.COLORS["iron-grey"]};
1620
+ `}
1621
+ `,rl=s.span`
1622
+ font-size: 14px;
1623
+ font-weight: 500;
1624
+ white-space: nowrap;
1625
+ color: ${e=>e.$active||e.$completed?t.COLORS.black:t.COLORS["iron-grey"]};
1626
+ transition: color 0.2s ease;
1627
+ `,il=s.div`
1628
+ background-color: ${e=>e.$completed?t.COLORS.black:t.COLORS.gray};
1629
+ transition: background-color 0.2s ease;
1630
+
1631
+ ${e=>e.$orientation==="vertical"?`
1632
+ width: 2px;
1633
+ height: 24px;
1634
+ margin: 8px 0 8px 15px;
1635
+ `:`
1636
+ flex: 1;
1637
+ height: 2px;
1638
+ min-width: 16px;
1639
+ margin: 0 12px;
1640
+ `}
1641
+ `,je=I.newClassNameGetter("stepper"),nl=({className:e,classnames:o,onChange:r,orientation:i="horizontal",ref:n,steps:l,value:c,...d})=>{const p=g.useMemo(()=>l.findIndex(h=>h.value===c),[l,c]);return a.jsx(Qa,{...d,ref:n,$orientation:i,className:je("container",e),children:l.map((h,u)=>{const f=h.value===c,O=u<p,k=u===l.length-1;return a.jsxs(el,{$orientation:i,children:[a.jsxs(tl,{type:"button",$active:f,$completed:O,$clickable:!!r,onClick:()=>r==null?void 0:r(h.value),className:je("step",o==null?void 0:o.step),children:[a.jsx(ol,{$active:f,$completed:O,className:je("circle",o==null?void 0:o.circle),children:u+1}),a.jsx(rl,{$active:f,$completed:O,className:je("label",o==null?void 0:o.label),children:h.label})]}),!k&&a.jsx(il,{$completed:O,$orientation:i,className:je("line",o==null?void 0:o.line)})]},h.value)})})},vt={normal:{border:t.COLORS["iron-grey"],label:t.COLORS.black},error:{border:t.COLORS.red,label:t.COLORS.red}},al=s.div`
1642
+ position: relative;
1643
+ display: flex;
1644
+ flex-direction: column;
1645
+ gap: 4px;
1646
+ `,ll=s(fe)`
1647
+ margin-left: 6px;
1648
+ color: ${e=>vt[e.$variant].label};
1649
+ `,dl=s.div`
1650
+ display: flex;
1651
+ flex-wrap: wrap;
1652
+ align-items: center;
1653
+ gap: 6px;
1654
+ min-height: 44px;
1655
+ padding: 8px 12px;
1656
+ border: 1px dashed ${e=>vt[e.$variant].border};
1657
+ border-radius: 8px;
1658
+ background: ${t.COLORS.white};
1659
+ cursor: ${e=>e.$disabled?"not-allowed":"text"};
1660
+ opacity: ${e=>e.$disabled?.5:1};
1661
+ transition: border-color 0.15s ease;
1662
+
1663
+ &:hover {
1664
+ border-color: ${e=>e.$disabled?vt[e.$variant].border:e.$variant==="error"?t.COLORS.red:t.COLORS.black};
889
1665
  }
890
1666
 
891
- p,
892
- h1,
893
- h2,
894
- h3,
895
- h4,
896
- h5,
897
- h6 {
898
- overflow-wrap: break-word;
1667
+ ${e=>e.$focused&&`
1668
+ outline: 2px solid ${e.$variant==="error"?t.COLORS.red:t.COLORS["steel-blue"]};
1669
+ outline-offset: 2px;
1670
+ `}
1671
+ `,cl=s.input`
1672
+ flex: 1;
1673
+ min-width: 80px;
1674
+ border: none;
1675
+ outline: none;
1676
+ background: transparent;
1677
+ font-size: 14px;
1678
+ color: ${t.COLORS.black};
1679
+ cursor: ${e=>e.$disabled?"not-allowed":"text"};
1680
+
1681
+ &::placeholder {
1682
+ color: ${t.COLORS["iron-grey"]};
899
1683
  }
900
1684
 
901
- a {
902
- color: inherit;
903
- text-decoration: none;
1685
+ &:disabled {
1686
+ cursor: not-allowed;
904
1687
  }
1688
+ `,Ro=`
1689
+ z-index: 100;
1690
+ background-color: ${t.COLORS.white};
1691
+ border: 1px solid ${t.alpha(t.COLORS.black,15)};
1692
+ border-radius: 8px;
1693
+ box-shadow: 0 4px 16px ${t.alpha(t.COLORS.black,12)};
1694
+ max-height: 200px;
1695
+ overflow-y: auto;
1696
+ `,ko=(e,o)=>e?"translateY(0)":o==="bottom"?"translateY(-8px)":"translateY(8px)",Lo=`
1697
+ opacity 0.15s ease,
1698
+ transform 0.15s ease,
1699
+ visibility 0.15s;
1700
+ `,sl=s.div`
1701
+ position: absolute;
1702
+ left: 0;
1703
+ right: 0;
1704
+ ${e=>e.$position==="bottom"?"top: calc(100% + 4px);":"bottom: calc(100% + 4px);"}
1705
+ ${Ro}
1706
+ opacity: ${e=>e.$open?1:0};
1707
+ visibility: ${e=>e.$open?"visible":"hidden"};
1708
+ transform: ${e=>ko(e.$open,e.$position)};
1709
+ transition: ${Lo};
1710
+ `,pl=s.div`
1711
+ position: fixed;
1712
+ ${Ro}
1713
+ opacity: ${e=>e.$open?1:0};
1714
+ visibility: ${e=>e.$open?"visible":"hidden"};
1715
+ transform: ${e=>ko(e.$open,e.$position)};
1716
+ transition: ${Lo};
1717
+ `,lo=s.button`
1718
+ display: flex;
1719
+ align-items: center;
1720
+ width: 100%;
1721
+ padding: 10px 12px;
1722
+ border: none;
1723
+ background: transparent;
1724
+ font-size: 14px;
1725
+ color: ${t.COLORS.black};
1726
+ text-align: left;
1727
+ cursor: pointer;
1728
+ transition: background-color 0.15s ease;
905
1729
 
906
- button {
907
- background: none;
908
- border: none;
909
- cursor: pointer;
1730
+ &:hover {
1731
+ background-color: ${t.COLORS.gray};
910
1732
  }
911
1733
 
912
- ul,
913
- ol {
914
- list-style: none;
1734
+ &:first-of-type {
1735
+ border-radius: 7px 7px 0 0;
915
1736
  }
916
1737
 
917
- table {
918
- border-collapse: collapse;
919
- border-spacing: 0;
1738
+ &:last-of-type {
1739
+ border-radius: 0 0 7px 7px;
1740
+ }
1741
+
1742
+ &:only-child {
1743
+ border-radius: 7px;
1744
+ }
1745
+ `,co=s.div`
1746
+ display: flex;
1747
+ align-items: center;
1748
+ justify-content: center;
1749
+ padding: 16px;
1750
+ color: ${t.COLORS["iron-grey"]};
1751
+ font-size: 14px;
1752
+ text-align: center;
1753
+ `,ee=I.newClassNameGetter("tags"),Xe=4,ul=({className:e,classnames:o,createKey:r="Tab",disabled:i=!1,emptyMessage:n="No options",freeSolo:l=!0,label:c,onChange:d,options:p=[],placeholder:h="Add tag...",portalRenderNode:u,ref:f,value:O,variant:k="normal",...y})=>{const S=g.useRef(null),$=g.useRef(null),x=g.useRef(null),v=g.useRef(null),[b,L]=g.useState(""),[j,E]=g.useState(!1),[G,P]=g.useState("bottom"),[D,N]=g.useState({top:0,left:0,width:0}),C=g.useMemo(()=>{const z=p.filter(X=>!O.includes(X.value));if(!b.trim())return z;const A=b.toLowerCase().trim();return z.filter(X=>X.label.toLowerCase().includes(A))},[p,O,b]),F=j&&p.length>0,m=g.useCallback(()=>{var Ae;if(!$.current)return;const z=$.current.getBoundingClientRect(),A=((Ae=x.current)==null?void 0:Ae.offsetHeight)??200,X=window.innerHeight-z.bottom-Xe,q=z.top-Xe,xe=X<A&&q>X?"top":"bottom";if(P(xe),u){const et=xe==="bottom"?z.bottom+Xe:z.top-A-Xe;N({top:et,left:z.left,width:z.width})}},[u]);g.useEffect(()=>{if(j)return m(),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m)}},[j,m]);const T=g.useCallback(z=>{const A=z.trim();return!A||O.includes(A)?!1:(d([...O,A]),L(""),!0)},[O,d]),R=z=>{if(z.key===r&&b.trim())if(z.preventDefault(),l)T(b);else{const A=C.find(X=>X.label.toLowerCase()===b.toLowerCase().trim());A&&T(A.value)}else z.key==="Backspace"&&!b&&O.length>0&&d(O.slice(0,-1))},_=z=>{var A;T(z),(A=v.current)==null||A.focus()},Y=z=>{d(O.filter(A=>A!==z))},M=()=>{var z;i||(z=v.current)==null||z.focus()},H=z=>{const A=p.find(X=>X.value===z);return(A==null?void 0:A.label)??z};return a.jsxs(al,{...y,ref:f,className:ee("container",e),children:[c&&a.jsx(ll,{$variant:k,className:ee("label"),children:c}),a.jsxs("div",{ref:S,style:{position:"relative"},children:[a.jsxs(dl,{ref:$,$variant:k,$disabled:i,$focused:j,onClick:M,className:ee("trigger",o==null?void 0:o.trigger),children:[O.map(z=>a.jsx(Ke,{deletable:!i,onDelete:()=>Y(z),className:ee("chip",o==null?void 0:o.chip),children:H(z)},z)),a.jsx(cl,{ref:v,type:"text",value:b,onChange:z=>L(z.target.value),onFocus:()=>E(!0),onBlur:()=>setTimeout(()=>E(!1),150),onKeyDown:R,placeholder:O.length===0?h:"",disabled:i,$disabled:i,className:ee("input",o==null?void 0:o.input)})]}),p.length>0&&(u?ge.createPortal(a.jsx(pl,{ref:x,$open:F,$position:G,style:{top:D.top,left:D.left,width:D.width},className:ee("dropdown",o==null?void 0:o.dropdown),children:C.length===0?a.jsx(co,{className:ee("empty",o==null?void 0:o.empty),children:n}):C.map(z=>a.jsx(lo,{type:"button",onMouseDown:A=>A.preventDefault(),onClick:()=>_(z.value),className:ee("option",o==null?void 0:o.option),children:z.label},z.value))}),u):a.jsx(sl,{ref:x,$open:F,$position:G,className:ee("dropdown",o==null?void 0:o.dropdown),children:C.length===0?a.jsx(co,{className:ee("empty",o==null?void 0:o.empty),children:n}):C.map(z=>a.jsx(lo,{type:"button",onMouseDown:A=>A.preventDefault(),onClick:()=>_(z.value),className:ee("option",o==null?void 0:o.option),children:z.label},z.value))}))]})]})},hl=s.div`
1754
+ display: flex;
1755
+ align-items: center;
1756
+ gap: 6px;
1757
+ `,bl=s.button`
1758
+ padding: 6px 16px;
1759
+ border: none;
1760
+ border-radius: 12px;
1761
+ background-color: ${e=>e.$active?t.COLORS.gray:"transparent"};
1762
+ color: ${t.COLORS.black};
1763
+ font-size: 14px;
1764
+ font-weight: 500;
1765
+ line-height: 1.4;
1766
+ cursor: ${e=>e.$disabled?"not-allowed":"pointer"};
1767
+ opacity: ${e=>e.$disabled?.5:1};
1768
+ transition:
1769
+ background-color 0.15s ease,
1770
+ opacity 0.15s ease;
1771
+
1772
+ &:hover:not(:disabled) {
1773
+ background-color: ${e=>e.$active?t.COLORS.gray:"rgba(0, 0, 0, 0.05)"};
920
1774
  }
921
- `,Rn=()=>m.jsx(qe.Global,{styles:Xa});function Ya({children:e,defaultMode:t="light"}){const[r,o]=_.useState(t),i=_.useMemo(()=>{switch(r){case"light":return jt;case"dark":return kn;default:return jt}},[r]),c=_.useMemo(()=>({theme:i,mode:r,setMode:o}),[i,r]);return m.jsx(Sn,{value:c,children:m.jsxs(qe.ThemeProvider,{theme:i,children:[m.jsx(Rn,{}),e]})})}exports.Button=Jn;exports.Checkbox=mr;exports.CheckboxCard=Ea;exports.CheckboxGroup=Oa;exports.Chip=gi;exports.Dropdown=Ec;exports.GlobalStyle=Rn;exports.Input=Vc;exports.Loader=No;exports.MultiSelect=Ps;exports.Radio=Dr;exports.RadioCard=Wa;exports.RadioGroup=Ka;exports.Select=ha;exports.Spinner=Fo;exports.ThemeProvider=Ya;exports.breakpoints=Je;exports.colors=n;exports.media=Ga;exports.shadows=Ge;exports.themeDark=kn;exports.themeLight=jt;exports.useTheme=qa;
1775
+
1776
+ &:focus-visible {
1777
+ outline: 2px solid ${t.COLORS["steel-blue"]};
1778
+ outline-offset: 2px;
1779
+ }
1780
+ `,so=I.newClassNameGetter("tabs"),gl=({className:e,classnames:o,onChange:r,ref:i,tabs:n,value:l,...c})=>a.jsx(hl,{...c,ref:i,className:so("container",e),role:"tablist",children:n.map(d=>a.jsx(bl,{type:"button",role:"tab","aria-selected":l===d.value,$active:l===d.value,$disabled:!!d.disabled,disabled:d.disabled,onClick:()=>r(d.value),className:so("tab",o==null?void 0:o.tab),children:d.label},d.value))}),zo=g.createContext(null),gt=3,po={default:{background:"#374151",text:t.COLORS.white,border:"#374151"},success:{background:t.COLORS.green,text:t.COLORS.white,border:t.COLORS.green},warning:{background:t.COLORS.yellow,text:t.COLORS.white,border:t.COLORS.yellow},danger:{background:t.COLORS.red,text:t.COLORS.white,border:t.COLORS.red}},fl=(e,o)=>{switch(o.type){case"ADD_TOAST":{const r=o.payload;return e.toasts.length<gt?{...e,toasts:[...e.toasts,r]}:{...e,queue:[...e.queue,r]}}case"REMOVE_TOAST":{const r=o.payload,i=e.toasts.filter(l=>l.id!==r),n=e.queue[0];return n&&i.length<gt?{toasts:[...i,n],queue:e.queue.slice(1)}:{...e,toasts:i}}case"SHOW_NEXT_FROM_QUEUE":{const r=e.queue[0];return!r||e.toasts.length>=gt?e:{toasts:[...e.toasts,r],queue:e.queue.slice(1)}}default:return e}},xl={toasts:[],queue:[]},ft=e=>po[e]??po.default,Ol=ie.keyframes`
1781
+ from {
1782
+ transform: translateY(100%);
1783
+ opacity: 0;
1784
+ }
1785
+ to {
1786
+ transform: translateY(0);
1787
+ opacity: 1;
1788
+ }
1789
+ `,$l=ie.keyframes`
1790
+ from {
1791
+ transform: translateY(0);
1792
+ opacity: 1;
1793
+ }
1794
+ to {
1795
+ transform: translateY(100%);
1796
+ opacity: 0;
1797
+ }
1798
+ `,Sl=s.div`
1799
+ position: fixed;
1800
+ bottom: 24px;
1801
+ left: 24px;
1802
+ z-index: 9999;
1803
+ display: flex;
1804
+ flex-direction: column;
1805
+ gap: 12px;
1806
+ pointer-events: none;
1807
+ width: auto;
1808
+ max-width: 90vw;
1809
+ `,yl=s.div`
1810
+ display: flex;
1811
+ align-items: center;
1812
+ justify-content: space-between;
1813
+ gap: 12px;
1814
+ min-height: 32px;
1815
+ padding: 8px 8px 8px 16px;
1816
+ background-color: ${({$variant:e})=>ft(e).background};
1817
+ color: ${({$variant:e})=>ft(e).text};
1818
+ border: 1px solid ${({$variant:e})=>ft(e).border};
1819
+ border-radius: 96px;
1820
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1821
+ animation: ${({$isExiting:e})=>e?$l:Ol} 0.3s ease-out;
1822
+ pointer-events: auto;
1823
+ max-width: 500px;
1824
+ `,vl=s.span`
1825
+ font-size: 14px;
1826
+ font-weight: 500;
1827
+ line-height: 1.4;
1828
+ white-space: nowrap;
1829
+ overflow: hidden;
1830
+ text-overflow: ellipsis;
1831
+ `,ml=s.button`
1832
+ display: flex;
1833
+ align-items: center;
1834
+ justify-content: center;
1835
+ width: 20px;
1836
+ height: 20px;
1837
+ padding: 0;
1838
+ background: transparent;
1839
+ border: none;
1840
+ color: inherit;
1841
+ cursor: pointer;
1842
+ opacity: 0.7;
1843
+ transition: opacity 0.2s ease-in-out;
1844
+ flex-shrink: 0;
1845
+
1846
+ &:hover {
1847
+ opacity: 1;
1848
+ }
1849
+ `,wl=s.div`
1850
+ display: flex;
1851
+ align-items: center;
1852
+ justify-content: space-between;
1853
+ gap: 12px;
1854
+ width: 100%;
1855
+ `,Cl=s.div`
1856
+ display: flex;
1857
+ align-items: center;
1858
+ justify-content: center;
1859
+ min-height: 32px;
1860
+ padding: 8px 16px;
1861
+ background-color: #374151;
1862
+ color: ${t.COLORS.white};
1863
+ border-radius: 96px;
1864
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1865
+ pointer-events: auto;
1866
+ font-size: 14px;
1867
+ font-weight: 500;
1868
+ white-space: nowrap;
1869
+ margin-left: auto;
1870
+ `,uo=({toast:e,onRemove:o})=>{const[r,i]=g.useState(!1),n=()=>{i(!0),setTimeout(()=>{o(e.id)},300)};return g.useEffect(()=>{if(e.duration){const l=setTimeout(()=>{n()},e.duration);return()=>clearTimeout(l)}},[e.duration,e.id]),a.jsxs(yl,{$variant:e.variant,$isExiting:r,children:[a.jsx(vl,{children:e.message}),a.jsx(ml,{onClick:n,children:a.jsx(a.X,{style:{width:16,height:16}})})]})},Rl=({toasts:e,queueCount:o,removeToast:r})=>{if(e.length===0)return null;const i=e.length-1;return a.jsx(Sl,{children:e.map((n,l)=>l===i&&o>0?a.jsxs(wl,{children:[a.jsx(uo,{toast:n,onRemove:r}),a.jsxs(Cl,{children:["+",o]})]},n.id):a.jsx(uo,{toast:n,onRemove:r},n.id))})},kl=({children:e})=>{const[o,r]=g.useReducer(fl,xl),i=g.useCallback((l,c="default",d)=>{const p=`toast-${Date.now()}-${Math.random().toString(36).substr(2,9)}`;r({type:"ADD_TOAST",payload:{id:p,message:l,variant:c,duration:d}})},[]),n=g.useCallback(l=>{r({type:"REMOVE_TOAST",payload:l})},[]);return a.jsxs(zo.Provider,{value:{addToast:i,removeToast:n},children:[e,a.jsx(Rl,{toasts:o.toasts,queueCount:o.queue.length,removeToast:n})]})},Ll=()=>{const e=g.useContext(zo);if(!e)throw new Error("useToast must be used within ToastProvider");return e},ho={dark:{background:t.COLORS.black,text:t.COLORS.white},light:{background:t.COLORS.white,text:t.COLORS.black,border:t.COLORS.gray},success:{background:t.COLORS.green,text:t.COLORS.white},warning:{background:t.COLORS.yellow,text:t.COLORS.white},danger:{background:t.COLORS.red,text:t.COLORS.white}},Ne=e=>ho[e]??ho.dark,zl=(e,o)=>{const r=Ne(o).background;switch(e){case"top":return`
1871
+ bottom: -12px;
1872
+ left: 50%;
1873
+ margin-left: -6px;
1874
+ border-top-color: ${r};
1875
+ `;case"bottom":return`
1876
+ top: -12px;
1877
+ left: 50%;
1878
+ margin-left: -6px;
1879
+ border-bottom-color: ${r};
1880
+ `;case"left":return`
1881
+ right: -12px;
1882
+ top: 50%;
1883
+ margin-top: -6px;
1884
+ border-left-color: ${r};
1885
+ `;case"right":return`
1886
+ left: -12px;
1887
+ top: 50%;
1888
+ margin-top: -6px;
1889
+ border-right-color: ${r};
1890
+ `;default:return""}},Pl=(e,o)=>{if(o!=="light")return"";const r=Ne(o).border;switch(e){case"top":return`
1891
+ &::after {
1892
+ bottom: -14px;
1893
+ left: 50%;
1894
+ margin-left: -7px;
1895
+ border-top-color: ${r};
1896
+ }
1897
+ `;case"bottom":return`
1898
+ &::after {
1899
+ top: -14px;
1900
+ left: 50%;
1901
+ margin-left: -7px;
1902
+ border-bottom-color: ${r};
1903
+ }
1904
+ `;case"left":return`
1905
+ &::after {
1906
+ right: -14px;
1907
+ top: 50%;
1908
+ margin-top: -7px;
1909
+ border-left-color: ${r};
1910
+ }
1911
+ `;case"right":return`
1912
+ &::after {
1913
+ left: -14px;
1914
+ top: 50%;
1915
+ margin-top: -7px;
1916
+ border-right-color: ${r};
1917
+ }
1918
+ `;default:return""}},Po=e=>`
1919
+ z-index: 1000;
1920
+ padding: 6px 12px;
1921
+ background-color: ${Ne(e.$variant).background};
1922
+ color: ${Ne(e.$variant).text};
1923
+ font-size: 13px;
1924
+ line-height: 1.4;
1925
+ border-radius: 6px;
1926
+ width: max-content;
1927
+ max-width: 300px;
1928
+ white-space: normal;
1929
+ word-wrap: break-word;
1930
+ pointer-events: none;
1931
+ opacity: ${e.$visible?1:0};
1932
+ visibility: ${e.$visible?"visible":"hidden"};
1933
+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
1934
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
1935
+
1936
+ ${e.$variant==="light"?`border: 1px solid ${Ne(e.$variant).border};`:""}
1937
+
1938
+ &::before {
1939
+ content: '';
1940
+ position: absolute;
1941
+ width: 0;
1942
+ height: 0;
1943
+ border: 6px solid transparent;
1944
+ ${zl(e.$placement,e.$variant)}
1945
+ }
1946
+
1947
+ ${e.$variant==="light"?`
1948
+ &::after {
1949
+ content: '';
1950
+ position: absolute;
1951
+ width: 0;
1952
+ height: 0;
1953
+ border: 7px solid transparent;
1954
+ }
1955
+ `:""}
1956
+
1957
+ ${Pl(e.$placement,e.$variant)}
1958
+ `,jl=s.div`
1959
+ position: relative;
1960
+ display: inline-block;
1961
+ `,El=e=>{switch(e){case"top":return`
1962
+ bottom: calc(100% + 8px);
1963
+ left: 50%;
1964
+ transform: translateX(-50%);
1965
+ `;case"bottom":return`
1966
+ top: calc(100% + 8px);
1967
+ left: 50%;
1968
+ transform: translateX(-50%);
1969
+ `;case"left":return`
1970
+ right: calc(100% + 8px);
1971
+ top: 50%;
1972
+ transform: translateY(-50%);
1973
+ `;case"right":return`
1974
+ left: calc(100% + 8px);
1975
+ top: 50%;
1976
+ transform: translateY(-50%);
1977
+ `;default:return""}},Tl=s.div`
1978
+ position: absolute;
1979
+ ${e=>Po(e)}
1980
+ ${({$placement:e})=>El(e)}
1981
+ `,Nl=s.div`
1982
+ position: fixed;
1983
+ ${e=>Po(e)}
1984
+ `,xt=I.newClassNameGetter("tooltip"),de=8,Il=({children:e,className:o,classnames:r,content:i,delay:n=200,placement:l="top",portalRenderNode:c,ref:d,variant:p="dark",...h})=>{const[u,f]=g.useState(!1),[O,k]=g.useState(null),[y,S]=g.useState(l),[$,x]=g.useState({top:0,left:0}),v=g.useRef(null),b=g.useRef(null),L=g.useCallback(()=>{var _,Y;if(!v.current)return;const P=v.current.getBoundingClientRect(),D=((_=b.current)==null?void 0:_.offsetWidth)??100,N=((Y=b.current)==null?void 0:Y.offsetHeight)??30,C=P.top-de,F=window.innerHeight-P.bottom-de,m=P.left-de,T=window.innerWidth-P.right-de;let R=l;if(l==="top"&&C<N&&F>C?R="bottom":l==="bottom"&&F<N&&C>F?R="top":l==="left"&&m<D&&T>m?R="right":l==="right"&&T<D&&m>T&&(R="left"),S(R),c){let M,H;switch(R){case"top":M=P.top-N-de,H=P.left+P.width/2-D/2;break;case"bottom":M=P.bottom+de,H=P.left+P.width/2-D/2;break;case"left":M=P.top+P.height/2-N/2,H=P.left-D-de;break;case"right":M=P.top+P.height/2-N/2,H=P.right+de;break;default:M=0,H=0}const z=8;H=Math.max(z,Math.min(H,window.innerWidth-D-z)),M=Math.max(z,Math.min(M,window.innerHeight-N-z)),x({top:M,left:H})}},[l,c]);g.useLayoutEffect(()=>{u&&L()},[u,L]);const j=()=>{const P=setTimeout(()=>{f(!0)},n);k(P)},E=()=>{O&&(clearTimeout(O),k(null)),f(!1)},G=c?ge.createPortal(a.jsx(Nl,{ref:b,className:xt("content",r==null?void 0:r.content),$placement:y,$variant:p,$visible:u,style:{top:$.top,left:$.left},children:i}),c):a.jsx(Tl,{ref:b,className:xt("content",r==null?void 0:r.content),$placement:y,$variant:p,$visible:u,children:i});return a.jsxs(jl,{...h,ref:P=>{v.current=P,typeof d=="function"?d(P):d&&(d.current=P)},className:xt("wrapper",o),onMouseEnter:j,onMouseLeave:E,children:[e,G]})};exports.Button=Ie;exports.Card=gr;exports.Checkbox=Je;exports.CheckboxCard=Rr;exports.CheckboxGroup=Pr;exports.Chip=Ke;exports.Confirmation=Br;exports.Container=Gr;exports.DatePicker=$i;exports.Drawer=wi;exports.Dropdown=Pi;exports.FieldLabel=fe;exports.GlobalStyle=Zo;exports.ImageCropper=_n;exports.Input=vo;exports.KeySymbol=bo;exports.KeysBindings=go;exports.Modal=mo;exports.MultiSelect=ta;exports.OtpCode=aa;exports.Panel=ua;exports.Progress=ga;exports.Radio=mt;exports.RadioCard=Ra;exports.RadioGroup=Pa;exports.Select=Fa;exports.Spinner=Ga;exports.StatusCard=Ja;exports.Stepper=nl;exports.Tabs=gl;exports.Tags=ul;exports.ToastProvider=kl;exports.Tooltip=Il;exports.formatDateGo=fo;exports.useImageCropper=yo;exports.useToast=Ll;
922
1985
  //# sourceMappingURL=index.cjs.map